diff --git a/.gitignore b/.gitignore index 3b960b077..19a83abba 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ venv/ .idea/ .DS_Store .pospell/ +.make/ .potodo/ locales/ .venv/ diff --git a/.scripts/check-headers.sh b/.scripts/check-headers.sh index 1c7ad3390..3a876361a 100644 --- a/.scripts/check-headers.sh +++ b/.scripts/check-headers.sh @@ -5,10 +5,41 @@ then exit 0 fi -grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' $* | while read -r file +grep -L '^# Copyright (C) [0-9-]*,\? Python Software Foundation' $* | while read -r file do - echo "Please update the po comment in $file" + cat <, YEAR.' $* | while read -r file +do + cat <, YEAR./d' "$file" + +EOF done + + grep -L '^"Project-Id-Version: Python 3\\n"$' $* | while read -r file do cat </dev/null & fi -for sha in ${FUZZY_REVS} ; do +git blame --line-porcelain ${PO_FILE} | \ +awk '/^[0-9a-f]{40} / { sha=$1 } + /^author / {$1="" ; author=$0 } + /^committer-time / { $1="" ; date=$0 } + /^\s#, fuzzy/ { printf "%-10s %-40s %s\n", date, sha, author}' | +sort --numeric-sort --unique --reverse | +while read line ; do + gdh=$(date --date=@${line:0:10}) + sha=${line:11:40} + author=${line:52} + echo "Comparing with: ${gdh} - ${author}" # filter files à la mode textconv - git show ${sha}:${PO_FILE} | grep -v -e '^#:' -e '^"PO' > ${TMP_DIR}/right.po - git show ${sha}^:${PO_FILE} | grep -v -e '^#:' -e '^"PO' > ${TMP_DIR}/left.po - "${DIFFTOOL}" ${TMP_DIR}/left.po ${TMP_DIR}/right.po + git show ${sha}^:${PO_FILE} | \ + grep --invert-match \ + --regexp='^#:' \ + --regexp='^"PO' > "${TMP_DIR}/${gdh}.po" + # reload current file every time as it may has been modified + grep --invert-match \ + --regexp='^#:' \ + --regexp='^"PO' ${PO_FILE} > ${TMP_DIR}/current.po + "${DIFFTOOL}" "${TMP_DIR}/${gdh}.po" ${TMP_DIR}/current.po done # clean up temp directory diff --git a/.scripts/line-length.py b/.scripts/line-length.py index f50713c77..9d061ad81 100644 --- a/.scripts/line-length.py +++ b/.scripts/line-length.py @@ -9,29 +9,34 @@ It returns 0 on success, 1 on failure. """ -from unicodedata import category import fileinput import sys +from unicodedata import category -SOFT_LIMIT = 80 # used for splitables lines (with spaces in them) -HARD_LIMIT = 88 # used for non-splitables lines (without spaces in them) - +MAX_LINE_LENGTH = 80 def clean(line): - return "".join(char for char in line if category(char) != "Mn").rstrip("\n") + """Prepare the line to be measured. + + See https://lists.gnu.org/archive/html/bug-gettext/2025-10/msg00010.html + about hiding spaces before colon. + """ + line = "".join(char for char in line if category(char) != "Mn").rstrip("\n") + line = line.replace(" :", " :") # It's not allowed to split a line before `:` + return line return_code = 0 for line in fileinput.input(encoding="utf-8"): line = clean(line) - limit = SOFT_LIMIT if line.count(" ") > 1 else HARD_LIMIT - if len(set(line)) <= 6: - continue # msgcat does not wraps the long line of dots in howto/perf_profiling.rst - if len(line) > limit: + + if line.count(" ") <= 2: + continue # Could be hard to break. + if len(line) > MAX_LINE_LENGTH: print( f"{fileinput.filename()}:{fileinput.filelineno()} line too long " - f"({len(line)} > {limit} characters)", + f"({len(line)} > {MAX_LINE_LENGTH} characters)", file=sys.stderr, ) return_code = 1 diff --git a/.scripts/plot.png b/.scripts/plot.png new file mode 100644 index 000000000..ff35514c2 Binary files /dev/null and b/.scripts/plot.png differ diff --git a/.scripts/plot.py b/.scripts/plot.py new file mode 100644 index 000000000..f3062fff6 --- /dev/null +++ b/.scripts/plot.py @@ -0,0 +1,165 @@ +import datetime + +from matplotlib import pyplot as plt + +r"""Update using something like: + +YEAR=2025 +for i in $(seq -w 01 12) +do + git clean -dfqx >/dev/null + git checkout -- . >/dev/null + git checkout $(git log 3.15 --after "$YEAR-$i-01" | grep ^commit | tail -n 1 | cut -d' ' -f2) >/dev/null 2>/dev/null + python -c 'import sys; print("datetime.date({}, {}, {}): {:.1f},".format(int(sys.argv[3]), int(sys.argv[4]), int(sys.argv[5]), 100 * int(sys.argv[1]) / int(sys.argv[2])))' \ + "$(ls -1 *.po */*.po | grep -v 'whatsnew/changelog\|whatsnew/2\|whatsnew/3.[0-8]\|setupscript.po\|random.po\|typing.po' | xargs msgcat -u --use-first | msgattrib --translated | grep -c '^msgid')" \ + "$(ls -1 *.po */*.po | grep -v 'whatsnew/changelog\|whatsnew/2\|whatsnew/3.[0-8]\|setupscript.po\|random.po\|typing.po' | xargs msgcat -u --use-first | grep -c '^msgid')" \ + $(git show -s --pretty=format:%cs | tr '-' ' ') +done +""" + + +plt.xkcd() + +# According to `make progress` + +progress = { + datetime.date(2012, 10, 1): 0, + datetime.date(2012, 12, 1): 4, + datetime.date(2013, 12, 1): 4, + datetime.date(2014, 11, 1): 4, + datetime.date(2015, 12, 1): 5, + datetime.date(2016, 1, 4): 6, # f8933be + datetime.date(2016, 2, 1): 15, # very short untranslatable strings + datetime.date(2016, 3, 4): 16, # 18c7d86 + datetime.date(2016, 4, 12): 17, # 4616b26 + datetime.date(2016, 5, 1): 18, # dd31bac + datetime.date(2016, 6, 13): 20, # d16d992 + datetime.date(2016, 7, 3): 20, # 9e52ea9 + datetime.date(2016, 10, 17): 20, # efc39ad... + # Changement de repo + datetime.date(2016, 11, 5): 19, # e61fde28 + datetime.date(2017, 1, 17): 19, # 384a9e5c + datetime.date(2017, 3, 5): 19.3, # 384a9e5c + datetime.date(2017, 4, 2): 19.5, + datetime.date(2017, 5, 10): 20, + datetime.date(2017, 6, 1): 21.3, + datetime.date(2017, 7, 6): 22.2, + datetime.date(2017, 8, 1): 22.2, + datetime.date(2017, 9, 5): 23.3, + datetime.date(2017, 10, 2): 24.5, + datetime.date(2017, 11, 5): 26.5, + datetime.date(2017, 12, 1): 27.1, + datetime.date(2018, 1, 4): 27.3, + datetime.date(2018, 1, 30): 27.8, + datetime.date(2018, 3, 1): 27.8, + datetime.date(2018, 5, 21): 29.9, + datetime.date(2018, 7, 2): 30, + datetime.date(2018, 8, 1): 33, + datetime.date(2018, 9, 15): 33.2, + datetime.date(2018, 11, 1): 37.6, + datetime.date(2018, 12, 7): 39.6, + datetime.date(2019, 1, 2): 40.1, + datetime.date(2019, 2, 3): 41, + datetime.date(2019, 3, 1): 43.2, + datetime.date(2019, 4, 2): 44.6, + datetime.date(2019, 5, 6): 45, + datetime.date(2019, 6, 3): 45.6, + datetime.date(2019, 7, 2): 47.1, + datetime.date(2019, 8, 13): 47.4, + datetime.date(2019, 9, 3): 49.4, + datetime.date(2019, 9, 30): 47.9, # Coût du passage en 3.8 + datetime.date(2019, 10, 2): 47.9, + datetime.date(2019, 11, 1): 48.5, + datetime.date(2019, 12, 1): 48.8, + datetime.date(2020, 1, 2): 49.6, + datetime.date(2020, 2, 1): 50.0, + datetime.date(2020, 3, 3): 50.9, + datetime.date(2020, 4, 1): 51.1, + datetime.date(2020, 5, 1): 51.4, + datetime.date(2020, 6, 5): 53.2, + datetime.date(2020, 7, 1): 53.4, + datetime.date(2020, 8, 4): 52.8, + datetime.date(2020, 9, 9): 53.4, + datetime.date(2020, 10, 1): 54.1, + datetime.date(2020, 11, 6): 54.1, + datetime.date(2020, 12, 2): 54.1, + datetime.date(2021, 2, 2): 54.0, + datetime.date(2021, 3, 1): 54.4, + datetime.date(2021, 4, 1): 54.8, + datetime.date(2021, 5, 4): 55.1, + datetime.date(2021, 6, 4): 56.2, + datetime.date(2021, 7, 14): 56.4, + datetime.date(2021, 8, 5): 56.4, + datetime.date(2021, 9, 6): 56.4, + datetime.date(2021, 11, 1): 58, + datetime.date(2022, 1, 27): 58.2, + datetime.date(2022, 2, 4): 58.2, + datetime.date(2022, 3, 6): 58.2, + datetime.date(2022, 4, 5): 57.2, + datetime.date(2022, 5, 23): 57.2, + datetime.date(2022, 9, 13): 58.1, + datetime.date(2022, 10, 27): 58.7, + datetime.date(2022, 11, 1): 58.7, + datetime.date(2022, 12, 6): 59.9, + datetime.date(2023, 1, 2): 60.3, + datetime.date(2023, 2, 4): 60.2, + datetime.date(2023, 3, 5): 60.8, + datetime.date(2023, 4, 1): 61.0, + datetime.date(2023, 5, 14): 61.3, + datetime.date(2023, 6, 20): 61.5, + datetime.date(2023, 7, 4): 61.7, + datetime.date(2024, 1, 2): 62.8, + datetime.date(2024, 3, 23): 63.7, + datetime.date(2024, 4, 3): 64.7, + datetime.date(2024, 5, 14): 64.7, + datetime.date(2024, 8, 24): 64.7, + datetime.date(2024, 10, 1): 64.7, + datetime.date(2025, 10, 17): 62.2, +} + +plt.rcParams["figure.figsize"] = (20, 10) + +f, ax = plt.subplots(1) +ax.plot(list(progress.keys()), list(progress.values()), linestyle="-") +ax.annotate( + "Bump to 3.10", + (datetime.date(2021, 9, 24), 56.4), + xytext=(datetime.date(2021, 9, 24), 40), + arrowprops={"arrowstyle": "->"}, +) +ax.annotate( + "Bump to 3.9", + (datetime.date(2020, 8, 4), 52.8), + xytext=(datetime.date(2020, 6, 5), 35), + arrowprops={"arrowstyle": "->"}, +) +ax.annotate( + "Bump to 3.8", + (datetime.date(2019, 9, 30), 47.9), + xytext=(datetime.date(2019, 9, 4), 30), + arrowprops={"arrowstyle": "->"}, +) +ax.annotate( + "Meetups AFPy mensuels", + (datetime.date(2018, 9, 1), 29.4), + xytext=(-10, -40), + textcoords="offset points", + arrowprops={"arrowstyle": "->"}, +) +ax.annotate( + "/python/python-docs-fr/", + (datetime.date(2016, 11, 5), 23.5), + xytext=(-100, 50), + textcoords="offset points", + arrowprops={"arrowstyle": "->"}, +) +ax.annotate( + "Working on very short strings", + (datetime.date(2016, 1, 15), (6 + 16) / 2), + xytext=(-10, -50), + textcoords="offset points", + arrowprops={"arrowstyle": "->"}, +) +plt.ylabel("%") +ax.set_ylim(ymin=0) +plt.savefig("fr_translation_percent.png") diff --git a/.scripts/replace.py b/.scripts/replace.py new file mode 100755 index 000000000..5e1dcc4a8 --- /dev/null +++ b/.scripts/replace.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +"""Search and replace in msgstrs.""" + +import sys +from pathlib import Path + +import polib + + +def replace(file: Path, from_str: str, to_str: str) -> None: + try: + pofile = polib.pofile(file) + except OSError: + print(f"{file} doesn't seem to be a .po file", file=sys.stderr) + return + for entry in pofile: + entry.msgstr = entry.msgstr.replace(from_str, to_str) + pofile.save() + + +def parse_args(): + import argparse + + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("from_str", help="Replace occurrences of this string") + parser.add_argument( + "to_str", + help="with this string.", + ) + parser.add_argument("path", nargs="*", type=Path) + return parser.parse_args() + + +def main(): + args = parse_args() + for filename in args.path: + replace(filename, args.from_str, args.to_str) + + +if __name__ == "__main__": + main() diff --git a/.woodpecker.yml b/.woodpecker.yml index 1e4dd00e9..814831038 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,6 @@ --- -# `make verifs` only checks changed files, so it make sense only on +# `make check` only checks changed files, so it make sense only on # pull requests. # Also we're using `branch: "$CI_COMMIT_SOURCE_BRANCH"` because the @@ -34,4 +34,4 @@ steps: - apt-get install -y hunspell hunspell-fr-comprehensive gettext - python3 -m pip install -r requirements.txt - make diff - - make verifs + - make check diff --git a/CONTRIBUTING-CORE.rst b/CONTRIBUTING-CORE.rst index 8b0f8eb26..445877851 100644 --- a/CONTRIBUTING-CORE.rst +++ b/CONTRIBUTING-CORE.rst @@ -1,12 +1,12 @@ Nouvelle branche upstream ------------------------- -Lorsque cpython crée une nouvelle branche, il debient possible de la +Lorsque cpython crée une nouvelle branche, il devient possible de la traduire :: - git switch -c 3.13 - python .scripts/merge.py --cpython_repo ../cpython/ origin/3.13 - make verifs + git switch -c 3.16 + python .scripts/merge.py --cpython_repo ../cpython/ origin/3.16 + make check-all -j 8 Il faut mettre à jour la variable ``BRANCH`` dans le ``Makefile``. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 91e7be4e9..50679a10f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,14 +1,16 @@ Guide de contribution à la documentation ######################################## +.. |branch| replace:: 3.15 + + Prérequis ========= -Outils souhaitables -------------------- +Outils nécessaires +------------------ -Pour pouvoir participer à la traduction en commun, il est souhaitable -d'installer : +Pour participer à la traduction, vous aurez besoin d'installer : - un client ``git`` `Linux `_, `MacOS `_ ou `Windows `_ ; @@ -18,149 +20,109 @@ d'installer : Outils facultatifs ------------------ + De plus, il peut être utile de s'équiper d'utilitaires pour faciliter la manipulation des fichiers ``.po`` et la traduction. `Poutils `_ est un paquet PyPI qui -regroupe un certain nombre d'outils liés à la traduction. Dans un -environnement disposant de Python 3.7 ou plus, installez-le avec :: +regroupe un certain nombre d'outils liés à la traduction :: python3 -m pip install poutils -Dans notre cas, les utilitaires de *Poutils* qui nous intéressent sont : - -Pospell -^^^^^^^ - -Vérificateur d'orthographe fondé sur Hunspell. ``make spell`` exécute -Pospell. Pour l'utiliser, il vous faut installer Hunspell. Attention, -dans Debian notamment (et ses dérivés comme Ubuntu), il existe plusieurs -dictionnaires français qui diffèrent en raison de l'orthographe -réformée. Installez celui qui contient les deux orthographes avec :: - - sudo apt install hunspell hunspell-fr-comprehensive - -Potodo -^^^^^^ - -Permet d'identifier les parties de la documentation qu'il reste à -traduire. ``make todo`` fait appel à Potodo. - -Pogrep -^^^^^^ - -Permet de rechercher dans la documentation des termes. Utile si on a un doute -sur comment traduire un terme ou chercher la traduction d'un terme dans -d'autres fichiers. Pour connaître les options disponibles, tapez :: - - pogrep --help - -Powrap -^^^^^^ -Formateur de fichier *.po*. C'est l'outil qui se cache derrière ``make -wrap``. - -Padpo (beta) -^^^^^^^^^^^^ +.. _cloner: -Analyseur de code qui encapsule notamment `Grammalecte -`_ et qui vérifie la grammaire, l'orthographe -et la syntaxe des fichiers *.po*. +Première étape : créer et peupler son dépôt +=========================================== -Configuration des outils ------------------------- +Créer un compte +--------------- -Configuration de Poedit -^^^^^^^^^^^^^^^^^^^^^^^ -* N'oubliez pas de configurer votre nom et - votre adresse de courriel (Édition → Préférences → Général). -* Vérifiez également qu'il est configuré pour passer à la ligne à 79 - caractères (Édition → Préférences → Avancé → Passer à la ligne à - 79). +Si ce n'est pas déjà fait, créez un compte sur `la forge de l'AFPy +`_ (souvent nommée Forgejo plus loin, ça se +prononce `/forˈd͡ʒe.jo/ `_). -Configuration de Git (rendre plus lisible l'affichage des modifications) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros -de ligne, comme : +Créer un *fork* du dépôt des fichiers de traduction +--------------------------------------------------- -.. code-block:: diff +Commençons par créer une copie du dépôt ``python-docs-fr`` sur +Forgejo, pour cela rendez-vous sur le dépôt `python-docs-fr +`_ et cliquez sur le bouton +« Fourche » (*Fork*) en haut à droite. - -#: ../Doc/library/sys.rst:406 - +#: ../Doc/library/sys.rst:408 +De votre point de vue il existe maintenant deux versions de +``python-docs-fr`` : +- https://git.afpy.org/AFPy/python-docs-fr le dépôt commun, que vous n'avez pas le droit de modifier. +- https://git.afpy.org/VOTRE_LOGIN/python-docs-fr votre dépôt, que vous avez le droit de modifier. -Pour dire à Git que ce ne sont pas des informations utiles, vous pouvez faire -ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre -``PATH``. -.. code-block:: bash +Créer sa paire de clés SSH (facultatif) +--------------------------------------- - cat < ~/.local/bin/podiff - #!/bin/sh - grep -v '^#:' "\$1" - EOF +Une clé SSH permet d’effectuer des ``git pull`` et des ``git push`` en +utilisant SSH : sans avoir à saisir son identifiant et son mot de +passe HTTP à chaque fois : c'est du confort. - chmod a+x ~/.local/bin/podiff +Vous pouvez sauter cette section pour le moment : vous pourrez y +revenir plus tard. -Allez ensuite dans le répertoire du dépôt récupéré (``python-docs-fr``) et faites : +Si vous n'avez pas encore de clé SSH, créez une paire de clés SSH en +utilisant la commande ``ssh-keygen``, consultez `le guide de GitLab +`_ si vous souhaitez en +savoir plus. -.. code-block:: bash +Vous obtiendrez deux fichiers : typiquement ``id_ed25519`` et +``id_ed25519.pub`` (ou ``id_rsa`` et ``id_rsa.pub``). Le premier est +votre clé privée, elle **doit** rester secrète. La seconde se +terminant par ``.pub`` est votre clé publique, comme son nom l'indique +vous pouvez la partager publiquement. - git config diff.podiff.textconv podiff +Ajouter sa clé SSH à la forge de l'AFPy +--------------------------------------- -Pas d'inquiétude, cela ne change la façon dont Git affiche les changements que sur -les fichiers de la traduction, sans incidence sur les autres. +Pour ajouter votre clé publique sur Forgejo, allez dans le menu de +votre compte en haut à droite et cliquez sur « Configuration », puis +d'aller dans l'onglet « Clés SSH / GPG », et copiez votre clé SSH +publique. -.. _cloner: +Cette clé publique sur le serveur Forgejo lui permet de s'assurer de +votre identité (en générant des défis que seul le détenteur de la clé +privée peut résoudre). -Première étape : créer et peupler son dépôt -=========================================== -Si ce n'est pas déjà fait, créez un compte sur `le serveur Git de -l'AFPy `_. Puis, allez sur le dépôt -`python-docs-fr `_ et -cliquez sur le bouton « Bifurcation » en haut à droite. Vous créez -ainsi sur Gitea une copie privée du projet où vous avez le droit de -faire des modifications. - -À ce stade, il est recommandé, bien que facultatif, de vous créer une -clé SSH si vous n'en avez pas encore, et de l'ajouter à votre compte -Gitea. Pour générer la clé, consultez `le guide de GitLab -`_ ou `celui de GitHub -`_. -Pour l'ajouter à votre compte Gitea, il suffit d'aller dans le menu de -votre compte en haut à droite et de cliquer sur « Configuration », -puis d'aller dans l'onglet « Clés SSH / GPG », et de copier la clé -SSH. - -Si vous le préférez, vous pouvez également vous passer de cette -configuration et utiliser le HTTPS à la place du SSH. Néanmoins, -sachez que vous devrez taper votre nom d'utilisateur et votre mot de -passe Gitea à chaque fois que vous ouvrez ou modifiez une -contribution. +Obtenir une copie du dépôt sur son ordinateur +--------------------------------------------- Enfin, faites une copie locale du dépôt sur votre ordinateur afin de pouvoir éditer les fichiers, avec ces commandes : .. code-block:: bash - # Clonez votre copie sur Gitea avec `git` en utilisant SSH : - git clone git@git.afpy.org:VOTRE_NOM_DE_COMPTE_GITEA/python-docs-fr.git + # Si vous utilisez une clé SSH : + git clone git@git.afpy.org:VOTRE_NOM_DE_COMPTE_FORGEJO/python-docs-fr.git - # ... ou bien avec HTTPS : - git clone https://git.afpy.org/VOTRE_NOM_DE_COMPTE_GITEA/python-docs-fr.git + # Sinon : + git clone https://git.afpy.org/VOTRE_NOM_DE_COMPTE_FORGEJO/python-docs-fr.git - # Allez dans le répertoire cloné + # Allez dans le répertoire cloné : cd python-docs-fr/ - # Ajoutez le dépôt officiel (nommé upstream), - # ceci permet à `git` de savoir quoi et où est *upstream* + # Profitez-en pour indiquer à git qu'il existe aussi le dépôt + # commun (qu'on nomme upstream) : git remote add upstream https://git.afpy.org/AFPy/python-docs-fr.git +À partir de maintenant de votre point de vue il existe trois copies +des fichiers : + +- Une sur votre ordinateur, pour la modifier aisément. +- Une appartenant à l'AFPy sur Forgejo, que ``git`` appelle ``upstream``. +- Une vous appartenant sur Forgejo, que ``git`` appelle ``origin``. + + Deuxième étape : choisir et réserver le fichier sur lequel travailler ===================================================================== @@ -180,23 +142,25 @@ répertoires *c-api/*, *whatsnew/*, *distutils/* et *install/* : obsolètes. De manière générale, il n'est pas utile de traduire un module que sa documentation mentionne comme obsolète. + Trouver un fichier sur lequel travailler ---------------------------------------- -Pour vous aiguiller dans votre choix, vous pouvez utiliser ``potodo``, -un outil recherchant des fichiers ``.po`` à traduire. Une fois -installé, utilisez la commande ``make todo`` dans votre clone local. +Si vous avez besoin d'aide pour choisir un fichier à traduire, vous +pouvez utiliser la commande ``make todo`` (dans le dossier +``python-docs-fr``). La liste renvoyée contient tous les fichiers qui ne sont pas encore complètement traduits. Vous pouvez choisir n'importe quel fichier non réservé dans la liste renvoyée (notez que ceux mentionnés plus haut sont automatiquement exclus). Vous pouvez commencer par des tâches faciles comme réviser les entrées -*fuzzy* pour aider à garder la documentation à jour (trouvez-les à l'aide -de ``make fuzzy``). Une entrée *fuzzy* correspond à une entrée déjà traduite -mais dont la source en anglais a été modifiée depuis (correction orthographique, -changement d'un terme, ajout ou suppression d'une phrase…). Elles sont -généralement plus « faciles » à traduire. +*fuzzy* pour aider à garder la documentation à jour +(trouvez-les à l'aide de ``make fuzzy``). Une entrée *fuzzy* +correspond à une entrée déjà traduite mais dont la source en anglais a +été modifiée depuis (correction orthographique, changement d'un terme, +ajout ou suppression d'une phrase…). Elles sont généralement plus +« faciles » à traduire. Vous pouvez également relire des entrées déjà traduites pour vous faire une idée, et passer ensuite à la traduction de celles qui ne le sont pas encore. @@ -211,60 +175,64 @@ pas nécessaire de terminer un fichier lorsqu'on le commence, vous pouvez donc prendre n'importe quel fichier, mais ne traduire que quelques paragraphes. + Réserver le fichier ------------------- *Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* +Pour éviter que quelqu'un d'autre fasse le travail en double. + Une fois que vous avez choisi un fichier sur lequel travailler vous pouvez nous le signaler par différents moyens : -* Soit en ouvrant un `ticket sur Gitea `_ +* Soit en ouvrant un `ticket sur Forgejo `_ en indiquant dans le titre ``Je travaille sur DOSSIER/FICHIER.po`` (par exemple « Je travaille sur library/sys.po »). -Ceci permet à `potodo`_ de détecter via l'API Gitea les fichiers ``.po`` réservés +Ceci permet à `potodo`_ de détecter via l'API Forgejo les fichiers ``.po`` réservés dans les tickets et les demandes d'ajout. -* Soit en créant un sujet sur le - `discuss de l'AFPy `_ dans la section Traduction - en indiquant sur quoi vous travaillez et l'URL de votre dépôt. - -* Soit sur IRC en venant sur le canal - `irc://irc.libera.chat/#python-docs-fr `_ - pour nous le signaler. - Création de la branche de traduction ------------------------------------ *Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* -Vous êtes maintenant prêt. Pour travailler, nous avons besoin d'une -branche, basée sur une version à jour (fraîchement récupérée) de la -branche « upstream/3.13 ». On met donc à jour notre version locale. +``git`` représente une session de travail sous forme d'une branche (en +traduisant vous allez faire diverger les fichiers qui sont sur votre +ordinateur par rapport aux fichiers publics, comme une branche qui se +sépare de son tronc). + +Pour éviter de travailler sur des fichiers modifiés par d'autres, +assurez-vous toujours que la base de votre future branche est « un +tronc » à jour. Pour ceci utilisez : .. code-block:: bash git fetch upstream -On crée ensuite la branche, en la basant sur « upstream/3.13 », fraîchement récupérée. -Il est pratique de nommer cette branche en fonction du -fichier sur lequel on travaille. Par exemple, si vous travaillez sur +Créez ensuite une branche ``git``, dont la base est « upstream/|branch| », +Il est pratique de nommer cette branche en fonction du fichier sur +lequel on travaille. Par exemple, si vous travaillez sur « library/sys.po », vous pouvez nommer votre branche « library-sys ». .. code-block:: bash - git switch -c library-sys upstream/3.13 + git switch -c library-sys upstream/3.15 +Chaque branche ayant un nom, avec un peu de pratique vous pourrez +bientôt avoir plusieurs sessions de travail en parallèle (avoir +plusieurs branches, travailler un peu sur l'une, puis un peu sur +l'autre, puis revenir à la première, …) ! -Troisième étape: Traduction -=========================== +Troisième étape : la traduction +=============================== -Avec Poedit ------------ +Avec Poedit ou avec votre éditeur préféré +----------------------------------------- Ici, remplacez « library/sys.po » par le fichier que vous avez choisi précédemment. @@ -275,10 +243,22 @@ Ici, remplacez « library/sys.po » par le fichier que vous avez choisi préc Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». +Configurez votre nom et votre adresse de courriel (Édition → + Préférences → Général). + +Vérifiez également que poedit est configuré pour passer à la ligne à +79 caractères (Édition → Préférences → Avancé → Passer à la ligne à +79). + Il n'est pas obligatoire de terminer un fichier, ni de le travailler de haut en bas, chacun traduit ce qu'il souhaite. Cependant évitons de changer plus de 200 lignes par *pull request* (pour le confort des -relecteurs). Faire plusieurs *pull requests* est bien sûr autorisé. +relecteurs). Faire plusieurs *pull requests* est bien sûr autorisé ! + +La vocation de ce projet de traduction n'est pas d'y injecter la +sortie brute d'un outil LLM. Si vous utilisez ce type d'outil, +veillez à faire une relecture attentive afin que ce que vous +soumettez soit agréable à lire et sémantiquement correct. Vérifications après traduction @@ -289,37 +269,25 @@ Après avoir modifié les fichiers, vérifiez que vous respectez les .. code-block:: bash - make verifs + make check vérifie la longueur des lignes et l'orthographe (mais pas la grammaire, pour cela utilisez `padpo (beta)`_). En cas de doute, un `glossaire`_ répertorie déjà les traductions retenues pour certains termes techniques ou faux amis en anglais. -Si ``make verifs`` trouve des problèmes de longueurs de ligne, +Si ``make check`` trouve des problèmes de longueurs de ligne, vérifiez votre configuration ``poedit`` (Édition → Préférences → Avancé → Passer à la ligne à 79) ou utilisez ``make wrap``. -Une fois la traduction finie, il faut compiler la documentation, -c'est-à-dire générer les fichiers HTML affichés par le site, pour les -relire. Si la commande précédente s'est exécutée sans erreur, la -compilation ne devrait pas échouer. - -.. code-block:: bash - - make - - -Vérifiez alors le rendu de la traduction « en vrai ». Lancez un serveur de -documentation local : +Une fois la traduction finie, vous pouvez générer la documentation +pour les relire. Si la commande précédente s'est exécutée sans erreur, +la génération ne devrait pas échouer. .. code-block:: bash make htmlview - -La documentation est publiée à l'adresse ``_. - Attention: le port TCP/8000 ne peut être changé, il convient d'arrêter tout service qui écouterait sur celui-ci. @@ -331,90 +299,62 @@ Poedit donne beaucoup d'avertissements, par exemple pour vous informer que la source. Ces avertissements ne sont pas tous fondés. En cas de doute, *affichez et relisez la page HTML produite* avec ``make htmlview``. + Quatrième étape : publier sa traduction ======================================= -Une fois que le ``make verifs`` ne lève pas d'erreur et que vous êtes certains de bien respecter les -`Conventions`_ de traduction, vient le moment d'envoyer votre travail sur le dépôt local. +Une fois que le ``make check`` ne lève pas d'erreur et que vous êtes +certains de bien respecter les `Conventions`_ de traduction, vient le +moment d'envoyer votre travail sur votre dépôt Forgejo. -* ``git add`` place nos modifications dans l'index de Git en attendant - d'être propagées dans le dépôt local. +* ``git add`` permet d’indiquer à git quels fichiers vous voulez + ajouter au futur ``commit``. .. code-block:: bash git add library/sys.po -* ``git commit`` permet de les propager : +* ``git commit`` permet de valider les modifications effectuées. .. code-block:: bash git commit --message "Traduction de library/sys.po" # Ou un autre message plus inspiré :) - -Poussez ensuite vos modifications sur votre bifurcation (*fork*) avec ``git push``. -Le ``-u`` n'est utile qu'une fois pour que votre client git se souvienne que cette -branche est liée à votre bifurcation (et donc que vos futurs ``git pull`` et -``git push`` sachent quoi tirer). +Publiez ensuite vos modifications sur votre dépôt Forgejo avec ``git push``. .. code-block:: bash - git push --set-upstream origin + git push origin -Sur Gitea ---------- + +Sur Forgejo +----------- La commande précédente vous affiche un lien pour ouvrir une demande d'ajout sur -Gitea. Si vous l'avez manqué, allez simplement sur +Forgejo. Si vous l'avez manqué, allez simplement sur https://git.afpy.org/AFPy/python-docs-fr/pulls et cliquez sur le bouton « Nouvelle demande d'ajout ». Mettez dans le commentaire de la demande d'ajout le texte suivant : -« Closes #XXXX » où XXXX est le numéro du ticket Gitea créé pour réserver le -fichier traduit. Cela permet à Gitea de lier la demande d'ajout au ticket de +« Closes #XXXX » où XXXX est le numéro du ticket Forgejo créé pour réserver le +fichier traduit. Cela permet à Forgejo de lier la demande d'ajout au ticket de réservation. -Il peut arriver que vous ayez besoin de reprendre votre demande d'ajout sur votre -ordinateur après avoir fait des modifications en ligne sur Gitea, -par exemple lorsque Gitea vous offre la possibilité de faire un commit -automatique contenant les suggestions proposées pendant la revue. -Cela fonctionne bien, mais le résultat n'est pas toujours accepté par -``powrap``. Si cela arrive, vous pouvez récupérer le commit fait par -Gitea puis relancer ``powrap`` : +Pour le moment vous savez : -.. code-block:: bash - - git pull - powrap - git add - git commit -m "Formatage après commit automatique" - git push - - -Vous avez peut-être remarqué que cela ressemble à un triangle, avec un -segment manquant : - -- vous récupérez depuis *upstream* (le dépôt commun public sur Gitea) ; -- vous poussez sur *origin* (votre clone sur Gitea). - -C'est le travail de quelqu'un d'autre d'ajouter le dernier segment, -de votre *origin* au *upstream* public, pour « boucler la boucle ». C'est le -rôle des personnes qui fusionnent les demandes d'ajout après les avoir relues. +- récupérez des modifications depuis *upstream* (le dépôt commun sur Forgejo) ; +- poussez des modifications vers *origin* (votre dépôt sur Forgejo). -Vous avez peut-être aussi remarqué que vous n'avez jamais commité sur une -branche de version (3.9, 3.10, etc.), seulement récupéré les -modifications à partir d'elles. +Mais vous ne pouvez pas faire la dernière étape : copier les +modifications depuis votre dépôt Forgejo vers le dépôt commun Forgejo, +c'est le travail d’un administrateur du dépôt commun. Toutes les traductions sont faites sur la dernière version. Nous ne traduisons jamais sur une version plus ancienne. Par exemple, -si la dernière version de python est Python 3.10, nous ne voulons pas +si la dernière version de python est Python |branch|, nous ne voulons pas traduire directement sur la version Python 3.6. -Si nécessaire, les traductions seraient rétroportées sur les versions -les plus anciennes par l'`équipe de documentation -`_. - - Conventions @@ -436,6 +376,7 @@ documentation anglaise, si le rythme l'exige. Il faut aussi chercher des équivalents français aux termes techniques et aux idiotismes rencontrés, et prendre garde aux anglicismes. + Utilisation du futur ^^^^^^^^^^^^^^^^^^^^ @@ -449,6 +390,7 @@ se situe réellement dans le futur (par exemple, on peut penser qu'un processus de compilation n'est pas immédiat) ou pour des raisons de concordance des temps. + Utilisation du conditionnel ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -463,6 +405,7 @@ de possibilité, en particulier quand la phrase est à la voix passive ; la phrase « these objects can be accessed by… » se traduit mieux par « on accède à ces objets en… ». + Utilisation du masculin ^^^^^^^^^^^^^^^^^^^^^^^ @@ -470,6 +413,7 @@ Dans un souci de lisibilité et en accord avec la préconisation de l'Académie française, nous utilisons le masculin pour indiquer un genre neutre. Par exemple : l'utilisateur ou le lecteur. + Règles rst ---------- @@ -640,20 +584,54 @@ underscore tiret bas, *underscore*, sous-tiret whitespace caractère d'espacement ========================== =============================================== + +Utilisation avancée +=================== + +Configuration de Git (rendre plus lisible l'affichage des modifications) +------------------------------------------------------------------------ + +Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros +de ligne, comme : + +.. code-block:: diff + + -#: ../Doc/library/sys.rst:406 + +#: ../Doc/library/sys.rst:408 + + +Pour dire à Git que ce ne sont pas des informations utiles, vous pouvez faire +ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre +``PATH``. + +.. code-block:: bash + + cat < ~/.local/bin/podiff + #!/bin/sh + grep -v '^#:' "\$1" + EOF + + chmod a+x ~/.local/bin/podiff + +Allez ensuite dans le répertoire du dépôt récupéré (``python-docs-fr``) et faites : + +.. code-block:: bash + + git config diff.podiff.textconv podiff + + +Pas d'inquiétude, cela ne change la façon dont Git affiche les changements que sur +les fichiers de la traduction, sans incidence sur les autres. + + Ressources de traduction ======================== - les canaux IRC sur irc.libera.chat : - - `#python-docs-fr `_ — communauté python autour de la documentation française, - `#python-fr `_ — communauté python francophone, - `#python-doc `_ — communauté python autour de la documentation anglophone ; -- les listes de diffusion relatives à la documentation (courriel) : - - - `de l'AFPy `_, - - `de CPython `_ ; - des glossaires et dictionnaires : - - le `glossaire de la documentation Python `_, car il est déjà traduit, - les `glossaires et dictionnaires de traduc.org `_, en particulier le `grand dictionnaire terminologique `_ de l'Office québécois de la langue française, - Wikipédia. En consultant un article sur la version anglaise, puis en basculant sur la version française pour voir comment le sujet de l'article est traduit ; @@ -698,19 +676,19 @@ simplement fonctionner : - :kbd:`Compose ' E` donne ``É`` - etc. + Comment définir la touche de composition ? ------------------------------------------ Cela dépend de votre système d'exploitation et de votre clavier. -⇒ Sous Linux, Unix et \*BSD (tel OpenBSD), vous pouvez la configurer à l'aide de -l'outil graphique de configuration de votre clavier ou avec -``dpkg-reconfigure keyboard-configuration`` -(pour `Ubuntu `_ ou Debian -et distributions assimilées). +- Sur Gnome c'est dans « Paramètres », « Clavier », « Touche de composition ». +- Sur Debian en ligne de commande ``dpkg-reconfigure keyboard-configuration``. +- Ubuntu documente aussi la `Compose Key `_. +- Sur Windows, vous pouvez utiliser `wincompose `_. -À tout le moins, vous pouvez configurer votre fichier *~/.Xmodmap* pour -ajouter l'équivalent de : +Si aucune des solutions précédente ne vous convient, vous pouvez +configurer votre fichier *~/.Xmodmap* pour ajouter l'équivalent de : .. code-block:: shell @@ -728,13 +706,8 @@ Ensuite, dans votre fichier *~/.xsession*, ajoutez : # Gestion des touches clavier xmodmap $HOME/.Xmodmap +Pour finir, redémarrez votre session. -⇒ Sous X, avec un bureau graphique, tel que Gnome, ou Xfce, il faut aller -modifier dans les « Paramètres » → « Clavier » → « Disposition » → -« Touche composée ». Pour finir, redémarrez votre session. - -⇒ Sous Windows, vous -pouvez utiliser `wincompose `_. Le cas de « --- », « -- », « ... » ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -752,6 +725,7 @@ Les *smartquotes* sont normalement responsables de la transformation de | « -- » ou « --- » : faites :kbd:`Compose - - -` | « ... » : faites :kbd:`Compose . . .` + Le cas de « "…" » ^^^^^^^^^^^^^^^^^ @@ -763,6 +737,7 @@ traduire les guillemets mais pas les délimiteurs de chaîne. ⇒ Si vous voyez : | « "…" » : faites :kbd:`Compose < <` ou :kbd:`Compose > >` + Le cas de « :: » ^^^^^^^^^^^^^^^^ @@ -779,7 +754,8 @@ En français, nous mettons une espace insécable devant nos deux-points, comme : Pour saisir une espace insécable faites :kbd:`Compose SPACE SPACE` -Les doubles-espaces + +Les doubles espaces ^^^^^^^^^^^^^^^^^^^ La documentation originale comporte beaucoup de doubles-espaces. @@ -790,6 +766,7 @@ Nous avons décidé de ne rien changer pour les doubles-espaces coté traduction : nous ne les retirons pas et ce n'est pas grave si des traducteurs en retirent par accident. + Les énumérations ^^^^^^^^^^^^^^^^ @@ -818,32 +795,53 @@ les traducteurs suivants et éviter qu'ils ne « corrigent » par erreur ces avertissements. +Outils disponnibles dans poutils +================================ + +Pospell +------- + +Vérificateur d'orthographe fondé sur Hunspell, qu'il vous faut donc installer :: + + sudo apt install hunspell hunspell-fr-comprehensive + +Attention, dans Debian notamment (et ses dérivés comme Ubuntu), il +existe plusieurs dictionnaires français qui diffèrent en raison de +l'orthographe réformée. Nous utilisons la version qui accepte les deux +orthographes. -Migration vers Gitea -==================== +C'est l'outil qui se cache derrière ``make spell``. -En novembre 2022, le dépôt de cette traduction a migré de GitHub à une -instance de Gitea hébergée par l'AFPy. Si vous contribuiez auparavant -sur GitHub, voici comment s'y prendre pour la migration : -- Suivez le guide `plus haut `_ pour faire une bifurcation (*fork*) - du dépôt sur Gitea. De manière facultative mais recommandée, ajoutez - votre clé SSH à votre profil Gitea comme expliqué ci-dessus (vous - aviez probablement une clé sur GitHub, auquel cas il suffit de - réutiliser la même, qui doit se trouver dans le fichier - ``~/.ssh/id_ed25519.pub`` ou un nom similaire). +Potodo +------ -- Exécutez ces deux commandes pour mettre à jour votre dépôt local - afin qu'il interagisse avec Gitea au lieu de GitHub : +Permet d'identifier les parties de la documentation qu'il reste à +traduire. - .. code-block:: bash +C'est l'outil qui se cache derrière ``make todo``. - git remote set-url upstream https://git.afpy.org/AFPy/python-docs-fr.git - git remote set-url origin git@git.afpy.org:VOTRE_NOM_DE_COMPTE_GITEA/python-docs-fr.git - Si vous avez choisi d'utiliser le HTTPS à la place du SSH, remplacez - la deuxième ligne par : +Pogrep +------ - .. code-block:: bash +Permet de rechercher dans la documentation des termes. Utile si on a un doute +sur comment traduire un terme ou chercher la traduction d'un terme dans +d'autres fichiers. Pour connaître les options disponibles, tapez :: + + pogrep --help - git remote set-url origin https://git.afpy.org/VOTRE_NOM_DE_COMPTE_GITEA/python-docs-fr.git + +Powrap +------ + +Formateur de fichier *.po*. C'est l'outil qui se cache derrière ``make +wrap``. + + +Padpo (beta) +------------ + +Analyseur de code qui encapsule notamment `Grammalecte +`_ et qui vérifie la grammaire, l'orthographe +et la syntaxe des fichiers *.po*. diff --git a/Makefile b/Makefile index 46c193533..28e2de51e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ # # - make # Automatically build an HTML local version # - make todo # To list remaining tasks and show current progression -# - make verifs # To check for correctness: wrapping, spelling +# - make check # To check for correctness of modified files: wrapping, spelling, … +# - make check-all # To check for correctness of all files: wrapping, spelling, … # - make wrap # To rewrap modified files # - make spell # To check for spelling # - make clean # To remove build artifacts @@ -20,9 +21,9 @@ # from which we generated our po files. We use it here so when we # test build, we're building with the .rst files that generated our # .po files. -CPYTHON_CURRENT_COMMIT := 256fc5529af23f16f0dca2d0e24a936e1c4d67d3 +CPYTHON_CURRENT_COMMIT := 86e291e6627a6eee2912c4f6ec6848b7e4866029 LANGUAGE := fr -BRANCH := 3.13 +BRANCH := 3.15 EXCLUDED := \ whatsnew/2.?.po \ @@ -63,7 +64,7 @@ UPSTREAM := https://github.com/python/cpython PYTHON := $(shell which python3) MODE := html -POSPELL_TMP_DIR := .pospell/ +MAKE_TMP_DIR := .make/ JOBS := auto SPHINXERRORHANDLING = -W @@ -101,7 +102,6 @@ all: ensure_build_prerequisites $(MODE) @echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them." - # We clone cpython/ inside venv/ because venv/ is the only directory # excluded by cpython' Sphinx configuration. venv/cpython/.git/HEAD: @@ -139,34 +139,47 @@ htmlview: all .PHONY: todo todo: ensure_test_prerequisites - potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) + @potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open' --exclude venv .venv $(EXCLUDED) .PHONY: wrap wrap: ensure_test_prerequisites @echo "Re wrapping modified files" powrap -m -SRCS = $(shell git diff --name-only --diff-filter=d $(BRANCH) | grep '.po$$') -# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out -DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS))) +SRCS_MODIFIED = $(shell git diff --name-only --diff-filter=d $(BRANCH) | grep '.po$$') +SRCS_ALL = $(wildcard *.po */*.po) + +# foo/bar.po => $(MAKE_TMP_DIR)/foo/bar.po.out +DESTS_MODIFIED = $(addprefix $(MAKE_TMP_DIR)/,$(addsuffix .pospell,$(SRCS_MODIFIED))) +DESTS_ALL = $(addprefix $(MAKE_TMP_DIR)/,$(addsuffix .all,$(SRCS_ALL))) .PHONY: spell -spell: ensure_test_prerequisites $(DESTS) +spell: ensure_test_prerequisites $(DESTS_MODIFIED) .PHONY: line-length line-length: @echo Checking line length... - @if [ -n "$(SRCS)" ]; then python .scripts/line-length.py $(SRCS); fi + @if [ -n "$(SRCS_MODIFIED)" ]; then python .scripts/line-length.py $(SRCS_MODIFIED); fi .PHONY: sphinx-lint sphinx-lint: ensure_test_prerequisites @echo Checking reStructuredText syntax... - @if [ -n "$(SRCS)" ]; then sphinx-lint --enable all --disable line-too-long $(SRCS); fi + @if [ -n "$(SRCS_MODIFIED)" ]; then sphinx-lint --enable all --disable line-too-long $(SRCS_MODIFIED); fi -$(POSPELL_TMP_DIR)/%.po.out: %.po dict +$(MAKE_TMP_DIR)/%.po.pospell: %.po dict @echo "Pospell checking $<..." @mkdir -p $(@D) - pospell -p dict -l fr_FR $< && touch $@ + pospell -p dict -l fr_FR $< + @touch $@ + +$(MAKE_TMP_DIR)/%.po.all: %.po dict + @mkdir -p $(@D) + @msgcat $< >/dev/null + @python .scripts/line-length.py $< + @sh .scripts/check-headers.sh $< + @pospell -p dict -l fr_FR $< + @sphinx-lint --enable all --disable line-too-long $< >/dev/null + @touch $@ .PHONY: fuzzy fuzzy: ensure_test_prerequisites @@ -175,12 +188,12 @@ fuzzy: ensure_test_prerequisites .PHONY: check-headers check-headers: @echo Checking po headers... - @sh .scripts/check-headers.sh $(SRCS) + @sh .scripts/check-headers.sh $(SRCS_MODIFIED) # .PHONY: check-colons # check-colons: # @echo Checking colons... -# @python .scripts/check-colon.py --check $(SRCS) +# @python .scripts/check-colon.py --check $(SRCS_MODIFIED) .PHONY: syntax syntax: @@ -189,11 +202,18 @@ syntax: .PHONY: verifs verifs: syntax check-headers sphinx-lint spell line-length + @echo "'make verifs' is deprecated, please use 'make check' instead." + +.PHONY: check +check: syntax check-headers sphinx-lint spell line-length + +.PHONY: check-all +check-all: ensure_test_prerequisites $(DESTS_ALL) .PHONY: clean clean: - @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)" - rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/ + @echo "Cleaning *.mo and $(MAKE_TMP_DIR)" + rm -fr .pospell/ $(MAKE_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/ find -name '*.mo' -delete @echo "Cleaning build directory" $(MAKE) -C venv/cpython/Doc/ clean diff --git a/README.rst b/README.rst index 08b93ba7a..76c23d24f 100644 --- a/README.rst +++ b/README.rst @@ -10,20 +10,26 @@ l'édition francophone de la PyCon, la `PyConFR maintien de nombreux projets communautaires pour enrichir l'écosystème. + Contribuer à la traduction -------------------------- +TL;DR:: + Vous pouvez contribuer : -- en proposant des *pull requests* Github (solution recommandée) ; +- en proposant des *pull requests* sur `notre forge + `_ (solution + recommandée) ; - en remontant des erreurs et propositions d'amélioration sur - le `forum de l'AFPy `_ ou sur la - `liste de diffusion `_ ; + le `forum de l'AFPy `_ ; - en devenant `membre `_ de l'AFPy ou `mécène `_ du projet. Consultez le -`guide `_ +`guide de style `_ +de la documentation, et le +`guide de la traduction en français `_ pour apprendre les conventions à respecter. Le `coordinateur `_ de @@ -68,7 +74,5 @@ Historique du projet - 2019 : 30 % de la documentation traduite ; - 2021 : 50 % de la documentation traduite. -.. image:: https://julienpalard.frama.io/write-the-docs-paris-19/fr_translation_percent.png - :target: https://framagit.org/JulienPalard/write-the-docs-paris-19 +.. image:: .scripts/plot.png :alt: Progression de la traduction - diff --git a/about.po b/about.po index 91392242b..f88579243 100644 --- a/about.po +++ b/about.po @@ -5,30 +5,31 @@ msgid "" 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-02-16 12:02+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2026-10-29 10:59+0100\n" +"Last-Translator: Adrien Precigout \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" +"X-Generator: Poedit 3.10\n" #: about.rst:3 -msgid "About these documents" +msgid "About this documentation" msgstr "À propos de ces documents" #: about.rst:6 msgid "" -"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " -"a document processor specifically written for the Python documentation." +"Python's documentation is generated from `reStructuredText`_ sources using " +"`Sphinx`_, a documentation generator originally created for Python and now " +"maintained as an independent project." msgstr "" -"Ces documents sont générés à partir de sources en `reStructuredText`_ par " -"`Sphinx`_, un analyseur de documents spécialement conçu pour la " -"documentation Python." +"La documentation de Python est générée à partir de sources en " +"`reStructuredText`_ par `Sphinx`_, un générateur de documentation conçu à " +"l'origine pour Python, mais aujourd'hui maintenu comme projet indépendant." -#: about.rst:15 +#: about.rst:16 msgid "" "Development of the documentation and its toolchain is an entirely volunteer " "effort, just like Python itself. If you want to contribute, please take a " @@ -40,19 +41,19 @@ msgstr "" "la page :ref:`reporting-bugs` qui contient des informations pour vous y " "aider. Les nouveaux volontaires sont toujours les bienvenus !" -#: about.rst:20 +#: about.rst:21 msgid "Many thanks go to:" msgstr "Merci beaucoup à :" -#: about.rst:22 +#: about.rst:23 msgid "" "Fred L. Drake, Jr., the creator of the original Python documentation toolset " -"and writer of much of the content;" +"and author of much of the content;" msgstr "" "Fred L. Drake, Jr., créateur des outils originaux de la documentation Python " -"et rédacteur de la plupart de son contenu ;" +"et auteur de la plupart de son contenu ;" -#: about.rst:24 +#: about.rst:25 msgid "" "the `Docutils `_ project for creating " "reStructuredText and the Docutils suite;" @@ -60,7 +61,7 @@ msgstr "" "le projet `Docutils `_ pour avoir créé " "*reStructuredText* et la suite d'outils *Docutils* ;" -#: about.rst:26 +#: about.rst:27 msgid "" "Fredrik Lundh for his Alternative Python Reference project from which Sphinx " "got many good ideas." @@ -68,22 +69,23 @@ msgstr "" "Fredrik Lundh pour son projet *Alternative Python Reference*, dont Sphinx a " "pris beaucoup de bonnes idées." -#: about.rst:31 -msgid "Contributors to the Python Documentation" -msgstr "Contributeurs de la documentation Python" +#: about.rst:32 +msgid "Contributors to the Python documentation" +msgstr "Contributrices et contributeurs de la documentation Python" -#: about.rst:33 +#: about.rst:34 msgid "" "Many people have contributed to the Python language, the Python standard " -"library, and the Python documentation. See :source:`Misc/ACKS` in the " -"Python source distribution for a partial list of contributors." +"library, and the Python documentation. See the `CPython GitHub repository " +"`__ for a partial " +"list of contributors." msgstr "" "De nombreuses personnes ont contribué au langage Python, à sa bibliothèque " -"standard et à sa documentation. Consultez :source:`Misc/ACKS` dans les " -"sources de la distribution Python pour avoir une liste partielle des " -"contributeurs." +"standard et à sa documentation. Consultez le `dépôt GitHub CPython `__ pour avoir une liste " +"partielle des contributeurs." -#: about.rst:37 +#: about.rst:39 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" diff --git a/bugs.po b/bugs.po index 8a38bd8a7..962eb16e6 100644 --- a/bugs.po +++ b/bugs.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" -"PO-Revision-Date: 2025-01-19 14:53+0100\n" -"Last-Translator: Edith Viau \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-17 10:42+0200\n" +"Last-Translator: Julien Palard \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.6\n" #: bugs.rst:5 msgid "Dealing with Bugs" @@ -30,28 +30,30 @@ msgstr "" "tout problème que vous pourriez rencontrer dans Python." #: bugs.rst:11 +#, fuzzy msgid "" "It can be sometimes faster to fix bugs yourself and contribute patches to " -"Python as it streamlines the process and involves less people. Learn how to :" -"ref:`contribute `." +"Python as it streamlines the process and involves fewer people. Learn how " +"to :ref:`contribute `." msgstr "" "Il est parfois plus rapide de réparer les bogues soi-même et d'en proposer " "les correctifs, ça simplifie le processus et implique moins de monde. " "Apprenez à :ref:`contribuer `." -#: bugs.rst:16 +#: bugs.rst:19 msgid "Documentation bugs" msgstr "Bogues de documentation" -#: bugs.rst:18 +#: bugs.rst:21 msgid "" "If you find a bug in this documentation or would like to propose an " -"improvement, please submit a bug report on the :ref:`tracker `. If you have a suggestion on how to fix it, include that as well." +"improvement, please submit a bug report on the :ref:`issue tracker `. If you have a suggestion on how to fix it, include that as " +"well." msgstr "" "Si vous trouvez un bogue dans cette documentation ou si vous désirez " "proposer une amélioration, si cela concerne aussi la documentation en " -"anglais, ouvrez un rapport sur le :ref:`traqueur ` " +"anglais, ouvrez un ticket sur le :ref:`traqueur ` " "décrivant en anglais le bogue et où vous l'avez trouvé. Si le problème ne " "touche que la traduction en français, ouvrez un ticket sur https://" "git.afpy.org/AFPy/python-docs-fr/issues, ou venez nous en toucher un mot sur " @@ -59,7 +61,14 @@ msgstr "" "#python-fr sur *libera.chat* (https://web.libera.chat/#python-fr). Si vous " "avez une suggestion de correction, merci de l'inclure également." -#: bugs.rst:22 +#: bugs.rst:27 +msgid "" +"If the bug or suggested improvement concerns the translation of this " +"documentation, submit the report to the `translation’s repository " +"`_ instead." +msgstr "" + +#: bugs.rst:31 msgid "" "You can also open a discussion item on our `Documentation Discourse forum " "`_." @@ -67,31 +76,21 @@ msgstr "" "Vous pouvez aussi commenter une discussion sur le `forum de discussion de la " "documentation `_." -#: bugs.rst:25 +#: bugs.rst:34 msgid "" "If you find a bug in the theme (HTML / CSS / JavaScript) of the " -"documentation, please submit a bug report on the `python-doc-theme bug " +"documentation, please submit a bug report on the `python-doc-theme issue " "tracker `_." msgstr "" +"Si vous trouvez un bug dans la partie HTML, CSS, ou JavaScript de la " +"documentation, prenez le temps d'écrire un ticket sur le dépôt `python-docs-" +"theme `_." -#: bugs.rst:29 -msgid "" -"If you're short on time, you can also email documentation bug reports to " -"docs@python.org (behavioral bugs can be sent to python-list@python.org). " -"'docs@' is a mailing list run by volunteers; your request will be noticed, " -"though it may take a while to be processed." -msgstr "" -"Si vous êtes limité par le temps, vous pouvez aussi envoyer un courriel à " -"docs@python.org (les bogues de comportement peuvent être envoyés à python-" -"list@python.org). « docs@ » est une liste de diffusion gérée par des " -"volontaires, votre requête sera vue, mais elle peut prendre un moment pour " -"être traitée." - -#: bugs.rst:36 +#: bugs.rst:40 msgid "`Documentation bugs`_" msgstr "`Bogues de documentation`_" -#: bugs.rst:37 +#: bugs.rst:41 msgid "" "A list of documentation bugs that have been submitted to the Python issue " "tracker." @@ -99,18 +98,18 @@ msgstr "" "Liste des bogues de documentation soumis à l'outil de suivi des problèmes " "Python." -#: bugs.rst:39 +#: bugs.rst:43 msgid "`Issue Tracking `_" msgstr "`Outil de suivi des problèmes `_" -#: bugs.rst:40 +#: bugs.rst:44 msgid "" "Overview of the process involved in reporting an improvement on the tracker." msgstr "" "Vue d'ensemble du processus pour proposer une amélioration avec l'outil de " "suivi." -#: bugs.rst:42 +#: bugs.rst:46 msgid "" "`Helping with Documentation `_" @@ -118,33 +117,35 @@ msgstr "" "`Aider avec la documentation `_" -#: bugs.rst:43 +#: bugs.rst:47 msgid "" "Comprehensive guide for individuals that are interested in contributing to " "Python documentation." msgstr "Guide complet pour qui souhaite contribuer à la documentation Python." -#: bugs.rst:45 +#: bugs.rst:49 +#, fuzzy msgid "" "`Documentation Translations `_" +"translations/translating/#translation-coordinators>`_" msgstr "" "`Traductions de la Documentation `_" -#: bugs.rst:46 +#: bugs.rst:50 +#, fuzzy msgid "" -"A list of GitHub pages for documentation translation and their primary " -"contacts." +"A list of GitHub pages for documentation translation and their coordination " +"teams." msgstr "" "Liste de dépôts GitHub où la documentation est traduite, avec les personnes " "à contacter." -#: bugs.rst:52 +#: bugs.rst:56 msgid "Using the Python issue tracker" msgstr "Utilisation du gestionnaire de tickets Python" -#: bugs.rst:54 +#: bugs.rst:58 msgid "" "Issue reports for Python itself should be submitted via the GitHub issues " "tracker (https://github.com/python/cpython/issues). The GitHub issues " @@ -157,7 +158,7 @@ msgstr "" "permettant de saisir des informations pertinentes à soumettre aux " "développeurs." -#: bugs.rst:59 +#: bugs.rst:63 msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " @@ -175,7 +176,7 @@ msgstr "" "contribution est la bienvenue !). Pour ce faire, cherchez dans le " "gestionnaire de tickets grâce à la boîte de recherche en haut de la page." -#: bugs.rst:66 +#: bugs.rst:70 msgid "" "If the problem you're reporting is not already in the list, log in to " "GitHub. If you don't already have a GitHub account, create a new account " @@ -187,7 +188,7 @@ msgstr "" "compte en cliquant sur le lien « Sign Up ». Il n'est pas possible de " "soumettre un rapport de bogue de manière anonyme." -#: bugs.rst:71 +#: bugs.rst:75 msgid "" "Being now logged in, you can submit an issue. Click on the \"New issue\" " "button in the top bar to report a new issue." @@ -196,11 +197,11 @@ msgstr "" "*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de " "rapport." -#: bugs.rst:74 +#: bugs.rst:78 msgid "The submission form has two fields, \"Title\" and \"Comment\"." msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*." -#: bugs.rst:76 +#: bugs.rst:80 msgid "" "For the \"Title\" field, enter a *very* short description of the problem; " "fewer than ten words is good." @@ -208,7 +209,7 @@ msgstr "" "Dans le champ *Title*, entrez une *très* brève description du problème " "rencontré : dix mots ou moins suffiront." -#: bugs.rst:79 +#: bugs.rst:83 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -221,7 +222,7 @@ msgstr "" "plateforme matérielle et logicielle vous utilisiez (en incluant les " "informations de versions)." -#: bugs.rst:84 +#: bugs.rst:88 msgid "" "Each issue report will be reviewed by a developer who will determine what " "needs to be done to correct the problem. You will receive an update each " @@ -231,15 +232,15 @@ msgstr "" "nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " "notification à chaque action concernant le rapport." -#: bugs.rst:91 +#: bugs.rst:95 msgid "" "`How to Report Bugs Effectively `_" msgstr "" -"`Comment signaler des bogues de manière efficace `_ (en anglais)" +"`Comment signaler des bogues de manière efficace `_ (en anglais)" -#: bugs.rst:92 +#: bugs.rst:96 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -248,7 +249,7 @@ msgstr "" "bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " "est utile." -#: bugs.rst:95 +#: bugs.rst:99 msgid "" "`Bug Writing Guidelines `_" @@ -256,7 +257,7 @@ msgstr "" "`Guide pour la rédaction de rapports de bogues `_" -#: bugs.rst:96 +#: bugs.rst:100 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -264,11 +265,11 @@ msgstr "" "Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au " "projet Mozilla mais présentent des bonnes pratiques générales." -#: bugs.rst:102 +#: bugs.rst:106 msgid "Getting started contributing to Python yourself" msgstr "Commencer à contribuer à Python vous-même" -#: bugs.rst:104 +#: bugs.rst:108 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " @@ -283,6 +284,18 @@ msgstr "" "list`_ est un endroit amical pour obtenir des réponses à toutes les " "questions à propos du processus de corrections de bugs dans Python." +#~ msgid "" +#~ "If you're short on time, you can also email documentation bug reports to " +#~ "docs@python.org (behavioral bugs can be sent to python-list@python.org). " +#~ "'docs@' is a mailing list run by volunteers; your request will be " +#~ "noticed, though it may take a while to be processed." +#~ msgstr "" +#~ "Si vous êtes limité par le temps, vous pouvez aussi envoyer un courriel à " +#~ "docs@python.org (les bogues de comportement peuvent être envoyés à python-" +#~ "list@python.org). « docs@ » est une liste de diffusion gérée par des " +#~ "volontaires, votre requête sera vue, mais elle peut prendre un moment " +#~ "pour être traitée." + #~ msgid "" #~ "The submission form has a number of fields. For the \"Title\" field, " #~ "enter a *very* short description of the problem; less than ten words is " diff --git a/c-api/abstract.po b/c-api/abstract.po index 903aed00e..db11cbefb 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2018-10-17 19:31+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -35,11 +35,11 @@ msgstr "" #: c-api/abstract.rst:14 msgid "" "It is not possible to use these functions on objects that are not properly " -"initialized, such as a list object that has been created by :c:func:" -"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` " -"value yet." +"initialized, such as a list object that has been created " +"by :c:func:`PyList_New`, but whose items have not been set to some non-\\ " +"``NULL`` value yet." msgstr "" "Il n'est pas possible d'utiliser ces fonctions sur des objets qui n'ont pas " -"été correctement initialisés, comme un objet liste qui a été créé avec :c:" -"func:`PyList_New` mais dont les éléments n'ont pas encore été mis à une " -"valeur non-\\ ``NULL``." +"été correctement initialisés, comme un objet liste qui a été créé " +"avec :c:func:`PyList_New` mais dont les éléments n'ont pas encore été mis à " +"une valeur non-\\ ``NULL``." diff --git a/c-api/allocation.po b/c-api/allocation.po index baf09aef6..ef3cb7dd4 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-10-20 21:16+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -16,17 +16,19 @@ msgstr "" "X-Generator: Poedit 2.2\n" #: c-api/allocation.rst:6 -msgid "Allocating Objects on the Heap" +#, fuzzy +msgid "Allocating objects on the heap" msgstr "Allouer des objets dans le tas" #: c-api/allocation.rst:17 #, fuzzy msgid "" "Initialize a newly allocated object *op* with its type and initial " -"reference. Returns the initialized object. If *type* indicates that the " -"object participates in the cyclic garbage detector, it is added to the " -"detector's set of observed objects. Other fields of the object are not " -"affected." +"reference. Returns the initialized object. Other fields of the object are " +"not initialized. Despite its name, this function is unrelated to the " +"object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` " +"slot). Specifically, this function does **not** call the object's :meth:`!" +"__init__` method." msgstr "" "Permet d'initialiser un objet *op* nouvellement alloué ainsi que son type et " "sa référence initiale. Renvoie l'objet initialisé. La présence de *type* " @@ -34,7 +36,21 @@ msgstr "" "il est de ce fait ajouté à l'ensemble du détecteur d'objets observés. Les " "autres champs de l'objet ne sont pas affectés." -#: c-api/allocation.rst:26 +#: c-api/allocation.rst:24 +msgid "" +"In general, consider this function to be a low-level routine. " +"Use :c:member:`~PyTypeObject.tp_alloc` where possible. For " +"implementing :c:member:`!tp_alloc` for your type, " +"prefer :c:func:`PyType_GenericAlloc` or :c:func:`PyObject_New`." +msgstr "" + +#: c-api/allocation.rst:31 +msgid "" +"This function only initializes the object's memory corresponding to the " +"initial :c:type:`PyObject` structure. It does not zero the rest." +msgstr "" + +#: c-api/allocation.rst:37 msgid "" "This does everything :c:func:`PyObject_Init` does, and also initializes the " "length information for a variable-size object." @@ -43,61 +59,133 @@ msgstr "" "initialise également l'information de la longueur pour un objet de taille " "variable." -#: c-api/allocation.rst:32 +#: c-api/allocation.rst:42 +msgid "" +"This function only initializes some of the object's memory. It does not " +"zero the rest." +msgstr "" + +#: c-api/allocation.rst:48 #, fuzzy msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The caller will own the only " -"reference to the object (i.e. its reference count will be one). The size of " -"the memory allocation is determined from the :c:member:`~PyTypeObject." -"tp_basicsize` field of the type object." +"Allocates a new Python object using the C structure type *TYPE* and the " +"Python type object *typeobj* (``PyTypeObject*``) by " +"calling :c:func:`PyObject_Malloc` to allocate memory and initializing it " +"like :c:func:`PyObject_Init`. The caller will own the only reference to the " +"object (i.e. its reference count will be one)." msgstr "" "Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " "l'objet Python *type*. Les champs non définis par l'en-tête de l'objet " "Python ne sont pas initialisés; le compteur de la référence objet sera égal " -"à un. La taille de l'allocation mémoire est déterminée par le champ :c:" -"member:`~PyTypeObject.tp_basicsize` de l'objet type." +"à un. La taille de l'allocation mémoire est déterminée par le " +"champ :c:member:`~PyTypeObject.tp_basicsize` de l'objet type." -#: c-api/allocation.rst:43 -#, fuzzy +#: c-api/allocation.rst:107 msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The allocated memory allows for " -"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given " -"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is " -"useful for implementing objects like tuples, which are able to determine " -"their size at construction time. Embedding the array of fields into the " -"same allocation decreases the number of allocations, improving the memory " -"management efficiency." +"Avoid calling this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." msgstr "" -"Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " -"l'objet Python de type *type*. Les champs non définis par l'en-tête de " -"l'objet Python ne sont pas initialisés. La mémoire allouée est suffisante " -"pour la structure *TYPE* plus *size* champs de la taille donnée par le champ " -"de *type* :c:member:`~PyTypeObject.tp_itemsize`. Ceci est utile pour " -"l'implémentation d'objets comme les *n*-uplets, qui sont capables de " -"déterminer leur taille à la construction. Allouer les champs en même temps " -"que l'objet diminue le nombre d'allocations, améliorant ainsi les " -"performances." - -#: c-api/allocation.rst:57 + +#: c-api/allocation.rst:110 +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` " +"slot, :c:func:`PyType_GenericAlloc` is preferred over a custom function that " +"simply calls this macro." +msgstr "" + +#: c-api/allocation.rst:61 +msgid "" +"This macro does not " +"call :c:member:`~PyTypeObject.tp_alloc`, :c:member:`~PyTypeObject.tp_new` " +"(:meth:`~object.__new__`), or :c:member:`~PyTypeObject.tp_init` " +"(:meth:`~object.__init__`)." +msgstr "" + +#: c-api/allocation.rst:65 +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set " +"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` " +"instead." +msgstr "" + +#: c-api/allocation.rst:68 +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: c-api/allocation.rst:123 +msgid "" +"The returned memory is not guaranteed to have been completely zeroed before " +"it was initialized." +msgstr "" + +#: c-api/allocation.rst:128 +msgid "" +"This macro does not construct a fully initialized object of the given type; " +"it merely allocates memory and prepares it for further initialization " +"by :c:member:`~PyTypeObject.tp_init`. To construct a fully initialized " +"object, call *typeobj* instead. For example::" +msgstr "" + +#: c-api/allocation.rst:137 c-api/allocation.rst:186 c-api/allocation.rst:188 #, fuzzy +msgid ":c:func:`PyObject_Free`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:88 +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +#: c-api/allocation.rst:139 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: c-api/allocation.rst:140 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: c-api/allocation.rst:95 +msgid "Like :c:macro:`PyObject_New` except:" +msgstr "" + +#: c-api/allocation.rst:97 msgid "" -"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:" -"macro:`PyObject_NewVar`. This is normally called from the :c:member:" -"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The " -"fields of the object should not be accessed after this call as the memory is " -"no longer a valid Python object." +"It allocates enough memory for the *TYPE* structure plus *size* " +"(``Py_ssize_t``) fields of the size given by " +"the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*." msgstr "" -"Libère la mémoire allouée à un objet utilisant :c:func:`PyObject_New` ou :c:" -"func:`PyObject_NewVar`. Ceci est normalement appelé par le gestionnaire :c:" -"member:`~PyTypeObject.tp_dealloc` spécifié dans le type d'objet. Les champs " -"de l'objet ne doivent plus être accédés après cet appel puisque cet " -"emplacement mémoire ne correspond plus à un objet Python valide." -#: c-api/allocation.rst:66 +#: c-api/allocation.rst:100 +msgid "The memory is initialized like :c:func:`PyObject_InitVar`." +msgstr "" + +#: c-api/allocation.rst:102 +msgid "" +"This is useful for implementing objects like tuples, which are able to " +"determine their size at construction time. Embedding the array of fields " +"into the same allocation decreases the number of allocations, improving the " +"memory management efficiency." +msgstr "" + +#: c-api/allocation.rst:114 +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set " +"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` " +"instead." +msgstr "" + +#: c-api/allocation.rst:118 +msgid "" +"Memory allocated by this function must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: c-api/allocation.rst:138 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: c-api/allocation.rst:145 msgid "" "Object which is visible in Python as ``None``. This should only be accessed " "using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " @@ -107,10 +195,95 @@ msgstr "" "accessible uniquement en utilisant la macro :c:macro:`Py_None`, qui évalue " "cet objet à un pointeur." -#: c-api/allocation.rst:73 -msgid ":c:func:`PyModule_Create`" -msgstr ":c:func:`PyModule_Create`" +#: c-api/allocation.rst:152 +msgid ":ref:`moduleobjects`" +msgstr "" -#: c-api/allocation.rst:74 +#: c-api/allocation.rst:153 msgid "To allocate and create extension modules." msgstr "Allouer et créer des modules d'extension." + +#: c-api/allocation.rst:157 +msgid "Soft-deprecated aliases" +msgstr "" + +#: c-api/allocation.rst:161 +msgid "" +"These are aliases to existing functions and macros. They exist solely for " +"backwards compatibility." +msgstr "" + +#: c-api/allocation.rst:169 +msgid "Soft-deprecated alias" +msgstr "" + +#: c-api/allocation.rst:170 +msgid "Function" +msgstr "" + +#: c-api/allocation.rst:172 +#, fuzzy +msgid ":c:macro:`PyObject_New`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:174 +#, fuzzy +msgid ":c:macro:`PyObject_NewVar`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:176 +#, fuzzy +msgid ":c:func:`PyObject_Init`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:178 +#, fuzzy +msgid ":c:func:`PyObject_InitVar`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:180 +#, fuzzy +msgid ":c:func:`PyObject_Malloc`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:182 +#, fuzzy +msgid ":c:func:`PyObject_Realloc`" +msgstr ":c:func:`PyModule_Create`" + +#, fuzzy +#~ msgid "" +#~ "Allocate a new Python object using the C structure type *TYPE* and the " +#~ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by " +#~ "the Python object header are not initialized. The allocated memory " +#~ "allows for the *TYPE* structure plus *size* (``Py_ssize_t``) fields of " +#~ "the size given by the :c:member:`~PyTypeObject.tp_itemsize` field of " +#~ "*typeobj*. This is useful for implementing objects like tuples, which " +#~ "are able to determine their size at construction time. Embedding the " +#~ "array of fields into the same allocation decreases the number of " +#~ "allocations, improving the memory management efficiency." +#~ msgstr "" +#~ "Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* " +#~ "et l'objet Python de type *type*. Les champs non définis par l'en-tête de " +#~ "l'objet Python ne sont pas initialisés. La mémoire allouée est suffisante " +#~ "pour la structure *TYPE* plus *size* champs de la taille donnée par le " +#~ "champ de *type* :c:member:`~PyTypeObject.tp_itemsize`. Ceci est utile " +#~ "pour l'implémentation d'objets comme les *n*-uplets, qui sont capables de " +#~ "déterminer leur taille à la construction. Allouer les champs en même " +#~ "temps que l'objet diminue le nombre d'allocations, améliorant ainsi les " +#~ "performances." + +#, fuzzy +#~ msgid "" +#~ "Releases memory allocated to an object using :c:macro:`PyObject_New` " +#~ "or :c:macro:`PyObject_NewVar`. This is normally called from " +#~ "the :c:member:`~PyTypeObject.tp_dealloc` handler specified in the " +#~ "object's type. The fields of the object should not be accessed after " +#~ "this call as the memory is no longer a valid Python object." +#~ msgstr "" +#~ "Libère la mémoire allouée à un objet utilisant :c:func:`PyObject_New` " +#~ "ou :c:func:`PyObject_NewVar`. Ceci est normalement appelé par le " +#~ "gestionnaire :c:member:`~PyTypeObject.tp_dealloc` spécifié dans le type " +#~ "d'objet. Les champs de l'objet ne doivent plus être accédés après cet " +#~ "appel puisque cet emplacement mémoire ne correspond plus à un objet " +#~ "Python valide." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 8114b7313..dc2a26880 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-19 18:43+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,36 +18,41 @@ msgstr "" msgid "API and ABI Versioning" msgstr "Version des API et ABI" -#: c-api/apiabiversion.rst:9 +#: c-api/apiabiversion.rst:11 +msgid "Build-time version constants" +msgstr "" + +#: c-api/apiabiversion.rst:13 +#, fuzzy msgid "" "CPython exposes its version number in the following macros. Note that these " -"correspond to the version code is **built** with, not necessarily the " -"version used at **run time**." +"correspond to the version code is **built** with. See :c:var:`Py_Version` " +"for the version used at **run time**." msgstr "" "CPython révèle son numéro de version dans les macros suivantes. À noter " "qu'ils correspondent au code de la version **compilée** avec, pas " "nécessairement la version utilisée à l'**exécution**." -#: c-api/apiabiversion.rst:13 +#: c-api/apiabiversion.rst:17 msgid "" "See :ref:`stable` for a discussion of API and ABI stability across versions." msgstr "" "Voir :ref:`stable` pour une discussion sur la stabilité des API et ABI entre " "(ou en fonction) de la version." -#: c-api/apiabiversion.rst:17 +#: c-api/apiabiversion.rst:21 msgid "The ``3`` in ``3.4.1a2``." msgstr "Le ``3`` dans ``3.4.1a2``.)" -#: c-api/apiabiversion.rst:21 +#: c-api/apiabiversion.rst:25 msgid "The ``4`` in ``3.4.1a2``." msgstr "Le ``4`` dans ``3.4.1a2``." -#: c-api/apiabiversion.rst:25 +#: c-api/apiabiversion.rst:29 msgid "The ``1`` in ``3.4.1a2``." msgstr "Le ``1`` dans ``3.4.1a2``.)" -#: c-api/apiabiversion.rst:29 +#: c-api/apiabiversion.rst:33 msgid "" "The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " "``0xC`` for release candidate or ``0xF`` for final." @@ -55,148 +60,326 @@ msgstr "" " Le ``a`` dans ``3.4.1a2``. Cela peut être ``0xA`` pour alpha, ``0xB`` pour " "bêta, ``0xC`` pour une version candidate ou ``0xF`` pour finale)." -#: c-api/apiabiversion.rst:35 +#: c-api/apiabiversion.rst:48 +msgid "" +"For completeness, the values are available as macros: :c:macro:`!" +"PY_RELEASE_LEVEL_ALPHA` (``0xA``), :c:macro:`!PY_RELEASE_LEVEL_BETA` " +"(``0xB``), :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and :c:macro:`!" +"PY_RELEASE_LEVEL_FINAL` (``0xF``)." +msgstr "" + +#: c-api/apiabiversion.rst:56 msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." msgstr "Le ``2`` dans ``3.4.1a2``. Nul pour des versions finales." -#: c-api/apiabiversion.rst:39 -msgid "The Python version number encoded in a single integer." +#: c-api/apiabiversion.rst:60 +#, fuzzy +msgid "" +"The Python version number encoded in a single integer. " +"See :c:func:`Py_PACK_FULL_VERSION` for the encoding details." msgstr "Le numéro de version de Python encodé en un seul entier." -#: c-api/apiabiversion.rst:41 +#: c-api/apiabiversion.rst:63 +#, fuzzy +msgid "" +"Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." +msgstr "" +"Vous pouvez l'utiliser pour les comparaisons numériques, par exemple, ``#if " +"PY_VERSION_HEX >= ...``." + +#: c-api/apiabiversion.rst:68 +msgid "The Python version as a string, for example, ``\"3.4.1a2\"``." +msgstr "" + +#: c-api/apiabiversion.rst:70 +#, fuzzy +msgid "These macros are defined in :source:`Include/patchlevel.h`." +msgstr "" +"Toutes les macros données sont définies dans :source:`Include/patchlevel.h`." + +#: c-api/apiabiversion.rst:74 +msgid "Run-time version" +msgstr "" + +#: c-api/apiabiversion.rst:78 +#, fuzzy +msgid "" +"The Python runtime version number encoded in a single constant integer. " +"See :c:func:`Py_PACK_FULL_VERSION` for the encoding details. This contains " +"the Python version used at run time." +msgstr "" +"La version à l'exécution de Python est encodée en une constante, avec le " +"même format que la macro :c:macro:`PY_VERSION_HEX`. Cela contient la version " +"de Python utilisée lors de l'exécution." + +#: c-api/apiabiversion.rst:82 +#, fuzzy msgid "" -"The underlying version information can be found by treating it as a 32 bit " -"number in the following manner:" +"Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." +msgstr "" +"Vous pouvez l'utiliser pour les comparaisons numériques, par exemple, ``#if " +"PY_VERSION_HEX >= ...``." + +#: c-api/apiabiversion.rst:88 +msgid "Bit-packing macros" +msgstr "" + +#: c-api/apiabiversion.rst:92 +msgid "" +"Return the given version, encoded as a single 32-bit integer with the " +"following structure:" +msgstr "" + +#: c-api/apiabiversion.rst:98 +msgid "Argument" +msgstr "" + +#: c-api/apiabiversion.rst:96 +msgid "No. of bits" msgstr "" -"L'information sur la version sous-jacente peut être trouvée en la traitant " -"comme un nombre sous 32 bits de la manière suivante :" -#: c-api/apiabiversion.rst:45 -msgid "Bytes" -msgstr "Octets" +#: c-api/apiabiversion.rst:98 +msgid "Bit mask" +msgstr "" -#: c-api/apiabiversion.rst:45 -msgid "Bits (big endian order)" -msgstr "Bits (ordre gros-boutiste)" +#: c-api/apiabiversion.rst:98 +msgid "Bit shift" +msgstr "" -#: c-api/apiabiversion.rst:45 -msgid "Meaning" -msgstr "Signification" +#: c-api/apiabiversion.rst:96 +msgid "Example values" +msgstr "" -#: c-api/apiabiversion.rst:45 -msgid "Value for ``3.4.1a2``" +#: c-api/apiabiversion.rst:116 +#, fuzzy +msgid "``3.4.1a2``" msgstr "Valeur pour ``3.4.1a2``" -#: c-api/apiabiversion.rst:47 -msgid "1" -msgstr "1" +#: c-api/apiabiversion.rst:118 +msgid "``3.10.0``" +msgstr "" -#: c-api/apiabiversion.rst:47 -msgid "1-8" -msgstr "1-8" +#: c-api/apiabiversion.rst:100 +msgid "*major*" +msgstr "" -#: c-api/apiabiversion.rst:47 -msgid "``PY_MAJOR_VERSION``" -msgstr "``PY_MAJOR_VERSION``" +#: c-api/apiabiversion.rst:102 c-api/apiabiversion.rst:104 +msgid "8" +msgstr "8" -#: c-api/apiabiversion.rst:47 -msgid "``0x03``" +#: c-api/apiabiversion.rst:100 +#, fuzzy +msgid "``0xFF000000``" msgstr "``0x03``" -#: c-api/apiabiversion.rst:49 -msgid "2" +#: c-api/apiabiversion.rst:100 +#, fuzzy +msgid "24" msgstr "2" -#: c-api/apiabiversion.rst:49 -msgid "9-16" -msgstr "9-16" +#: c-api/apiabiversion.rst:100 +msgid "``0x03``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:102 +msgid "*minor*" +msgstr "" -#: c-api/apiabiversion.rst:49 -msgid "``PY_MINOR_VERSION``" -msgstr "``PY_MINOR_VERSION``" +#: c-api/apiabiversion.rst:102 +#, fuzzy +msgid "``0x00FF0000``" +msgstr "``0x03``" -#: c-api/apiabiversion.rst:49 +#: c-api/apiabiversion.rst:102 +#, fuzzy +msgid "16" +msgstr "1" + +#: c-api/apiabiversion.rst:102 msgid "``0x04``" msgstr "``0x04``" -#: c-api/apiabiversion.rst:51 -msgid "3" -msgstr "3" +#: c-api/apiabiversion.rst:102 +#, fuzzy +msgid "``0x0A``" +msgstr "``0xA``" -#: c-api/apiabiversion.rst:51 -msgid "17-24" -msgstr "17-24" +#: c-api/apiabiversion.rst:104 +msgid "*micro*" +msgstr "" -#: c-api/apiabiversion.rst:51 -msgid "``PY_MICRO_VERSION``" -msgstr "``PY_MICRO_VERSION``" +#: c-api/apiabiversion.rst:104 +#, fuzzy +msgid "``0x0000FF00``" +msgstr "``0x03``" -#: c-api/apiabiversion.rst:51 +#: c-api/apiabiversion.rst:104 msgid "``0x01``" msgstr "``0x01``" -#: c-api/apiabiversion.rst:53 +#: c-api/apiabiversion.rst:104 +#, fuzzy +msgid "``0x00``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:106 +msgid "*release_level*" +msgstr "" + +#: c-api/apiabiversion.rst:108 msgid "4" msgstr "4" -#: c-api/apiabiversion.rst:53 -msgid "25-28" -msgstr "25-28" - -#: c-api/apiabiversion.rst:53 -msgid "``PY_RELEASE_LEVEL``" -msgstr "``PY_RELEASE_LEVEL``" +#: c-api/apiabiversion.rst:106 +#, fuzzy +msgid "``0x000000F0``" +msgstr "``0x03``" -#: c-api/apiabiversion.rst:53 +#: c-api/apiabiversion.rst:106 msgid "``0xA``" msgstr "``0xA``" -#: c-api/apiabiversion.rst:55 -msgid "29-32" -msgstr "29-32" +#: c-api/apiabiversion.rst:106 +#, fuzzy +msgid "``0xF``" +msgstr "``0xA``" + +#: c-api/apiabiversion.rst:108 +msgid "*release_serial*" +msgstr "" -#: c-api/apiabiversion.rst:55 -msgid "``PY_RELEASE_SERIAL``" -msgstr "``PY_RELEASE_SERIAL``" +#: c-api/apiabiversion.rst:108 +#, fuzzy +msgid "``0x0000000F``" +msgstr "``0x03``" -#: c-api/apiabiversion.rst:55 +#: c-api/apiabiversion.rst:108 +msgid "0" +msgstr "0" + +#: c-api/apiabiversion.rst:108 msgid "``0x2``" msgstr "``0x2``" -#: c-api/apiabiversion.rst:58 -msgid "" -"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " -"``0x030a00f0``." +#: c-api/apiabiversion.rst:108 +#, fuzzy +msgid "``0x0``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:111 +msgid "For example:" +msgstr "Par exemple :" + +#: c-api/apiabiversion.rst:114 +msgid "Version" msgstr "" -"Ainsi, ``0x030401a2`` est la version en notation hexadécimale sur un entier " -"de ``3.4.1a2`` et ``0x030a00f0`` est la version en notation hexadécimale sur " -"un entier de ``3.10.0``" -#: c-api/apiabiversion.rst:61 -msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``." +#: c-api/apiabiversion.rst:114 +msgid "``Py_PACK_FULL_VERSION`` arguments" msgstr "" -"Vous pouvez l'utiliser pour les comparaisons numériques, par exemple, ``#if " -"PY_VERSION_HEX >= ...``." -#: c-api/apiabiversion.rst:63 +#: c-api/apiabiversion.rst:114 +msgid "Encoded version" +msgstr "" + +#: c-api/apiabiversion.rst:116 +msgid "``(3, 4, 1, 0xA, 2)``" +msgstr "" + +#: c-api/apiabiversion.rst:116 #, fuzzy -msgid "This version is also available via the symbol :c:var:`Py_Version`." -msgstr "Cette version est aussi disponible via le symbole :data:`Py_Version`." +msgid "``0x030401a2``" +msgstr "``0x03``" -#: c-api/apiabiversion.rst:67 +#: c-api/apiabiversion.rst:118 +msgid "``(3, 10, 0, 0xF, 0)``" +msgstr "" + +#: c-api/apiabiversion.rst:118 +#, fuzzy +msgid "``0x030a00f0``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:121 msgid "" -"The Python runtime version number encoded in a single constant integer, with " -"the same format as the :c:macro:`PY_VERSION_HEX` macro. This contains the " -"Python version used at run time." +"Out-of range bits in the arguments are ignored. That is, the macro can be " +"defined as:" msgstr "" -"La version à l'exécution de Python est encodée en une constante, avec le " -"même format que la macro :c:macro:`PY_VERSION_HEX`. Cela contient la version " -"de Python utilisée lors de l'exécution." -#: c-api/apiabiversion.rst:73 -msgid "All the given macros are defined in :source:`Include/patchlevel.h`." +#: c-api/apiabiversion.rst:135 +msgid "" +"``Py_PACK_FULL_VERSION`` is primarily a macro, intended for use in ``#if`` " +"directives, but it is also available as an exported function." msgstr "" -"Toutes les macros données sont définies dans :source:`Include/patchlevel.h`." + +#: c-api/apiabiversion.rst:142 +msgid "" +"Equivalent to ``Py_PACK_FULL_VERSION(major, minor, 0, 0, 0)``. The result " +"does not correspond to any Python release, but is useful in numeric " +"comparisons." +msgstr "" + +#~ msgid "" +#~ "The underlying version information can be found by treating it as a 32 " +#~ "bit number in the following manner:" +#~ msgstr "" +#~ "L'information sur la version sous-jacente peut être trouvée en la " +#~ "traitant comme un nombre sous 32 bits de la manière suivante :" + +#~ msgid "Bytes" +#~ msgstr "Octets" + +#~ msgid "Bits (big endian order)" +#~ msgstr "Bits (ordre gros-boutiste)" + +#~ msgid "Meaning" +#~ msgstr "Signification" + +#~ msgid "1-8" +#~ msgstr "1-8" + +#~ msgid "``PY_MAJOR_VERSION``" +#~ msgstr "``PY_MAJOR_VERSION``" + +#~ msgid "9-16" +#~ msgstr "9-16" + +#~ msgid "``PY_MINOR_VERSION``" +#~ msgstr "``PY_MINOR_VERSION``" + +#~ msgid "3" +#~ msgstr "3" + +#~ msgid "17-24" +#~ msgstr "17-24" + +#~ msgid "``PY_MICRO_VERSION``" +#~ msgstr "``PY_MICRO_VERSION``" + +#~ msgid "25-28" +#~ msgstr "25-28" + +#~ msgid "``PY_RELEASE_LEVEL``" +#~ msgstr "``PY_RELEASE_LEVEL``" + +#~ msgid "29-32" +#~ msgstr "29-32" + +#~ msgid "``PY_RELEASE_SERIAL``" +#~ msgstr "``PY_RELEASE_SERIAL``" + +#~ msgid "" +#~ "Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is " +#~ "hexversion ``0x030a00f0``." +#~ msgstr "" +#~ "Ainsi, ``0x030401a2`` est la version en notation hexadécimale sur un " +#~ "entier de ``3.4.1a2`` et ``0x030a00f0`` est la version en notation " +#~ "hexadécimale sur un entier de ``3.10.0``" + +#, fuzzy +#~ msgid "This version is also available via the symbol :c:var:`Py_Version`." +#~ msgstr "" +#~ "Cette version est aussi disponible via le symbole :data:`Py_Version`." #~ msgid "``1``" #~ msgstr "``1``" diff --git a/c-api/arg.po b/c-api/arg.po index 7bf3f34d1..2e17593b2 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-12-11 11:44+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -20,10 +20,11 @@ msgid "Parsing arguments and building values" msgstr "Analyse des arguments et construction des valeurs" #: c-api/arg.rst:8 +#, fuzzy msgid "" -"These functions are useful when creating your own extensions functions and " -"methods. Additional information and examples are available in :ref:" -"`extending-index`." +"These functions are useful when creating your own extension functions and " +"methods. Additional information and examples are available " +"in :ref:`extending-index`." msgstr "" "Ces fonctions sont utiles pour créer vos propres fonctions et méthodes " "d'extensions. Des informations supplémentaires et des exemples sont " @@ -31,17 +32,17 @@ msgstr "" #: c-api/arg.rst:12 msgid "" -"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" -"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " -"*format strings* which are used to tell the function about the expected " -"arguments. The format strings use the same syntax for each of these " -"functions." +"The first three of these functions " +"described, :c:func:`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, " +"and :c:func:`PyArg_Parse`, all use *format strings* which are used to tell " +"the function about the expected arguments. The format strings use the same " +"syntax for each of these functions." msgstr "" -"Dans Les trois premières de ces fonctions décrites, :c:func:" -"`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, et :c:func:" -"`PyArg_Parse`, toutes utilisent *des chaînes de format* qui sont utilisées " -"pour indiquer à la fonction les arguments attendus. Les chaînes de format " -"utilise la même syntaxe pour chacune de ces fonctions." +"Dans Les trois premières de ces fonctions " +"décrites, :c:func:`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, " +"et :c:func:`PyArg_Parse`, toutes utilisent *des chaînes de format* qui sont " +"utilisées pour indiquer à la fonction les arguments attendus. Les chaînes de " +"format utilise la même syntaxe pour chacune de ces fonctions." #: c-api/arg.rst:19 msgid "Parsing arguments" @@ -115,11 +116,12 @@ msgid "" msgstr "" "Néanmoins, quand une structure :c:type:`Py_buffer` est en cours de " "remplissage, le tampon sous-jacent est verrouillé pour permettre à " -"l'appelant d'utiliser le tampon par la suite, même à l'intérieur d'un bloc :" -"c:type:`Py_BEGIN_ALLOW_THREADS`, sans risques de voir des données mutables " -"se faire redimensionner ou supprimer. En conséquence, **il vous appartient " -"d'appeler** :c:func:`PyBuffer_Release` après avoir terminé de traiter les " -"données (ou après une interruption prématurée du traitement de ces données)." +"l'appelant d'utiliser le tampon par la suite, même à l'intérieur d'un " +"bloc :c:type:`Py_BEGIN_ALLOW_THREADS`, sans risques de voir des données " +"mutables se faire redimensionner ou supprimer. En conséquence, **il vous " +"appartient d'appeler** :c:func:`PyBuffer_Release` après avoir terminé de " +"traiter les données (ou après une interruption prématurée du traitement de " +"ces données)." #: c-api/arg.rst:57 msgid "" @@ -147,10 +149,10 @@ msgstr "" #: c-api/arg.rst:70 msgid "" -"To ensure that the underlying buffer may be safely borrowed, the object's :c:" -"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " -"disallows common mutable objects such as :class:`bytearray`, but also some " -"read-only objects such as :class:`memoryview` of :class:`bytes`." +"To ensure that the underlying buffer may be safely borrowed, the " +"object's :c:member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. " +"This disallows common mutable objects such as :class:`bytearray`, but also " +"some read-only objects such as :class:`memoryview` of :class:`bytes`." msgstr "" #: c-api/arg.rst:76 @@ -185,14 +187,14 @@ msgstr "" msgid "" "This format does not accept :term:`bytes-like objects `. " "If you want to accept filesystem paths and convert them to C character " -"strings, it is preferable to use the ``O&`` format with :c:func:" -"`PyUnicode_FSConverter` as *converter*." +"strings, it is preferable to use the ``O&`` format " +"with :c:func:`PyUnicode_FSConverter` as *converter*." msgstr "" "Ce format n'accepte pas les :term:`objets compatibles avec une chaîne " "d'octets `. Si vous voulez accepter les chemins du " "système de fichiers et les convertir vers des chaînes de caractères C, il " -"est préférable d'utiliser le format ``O&`` avec :c:func:" -"`PyUnicode_FSConverter` en tant que *converter*." +"est préférable d'utiliser le format ``O&`` " +"avec :c:func:`PyUnicode_FSConverter` en tant que *converter*." #: c-api/arg.rst:96 msgid "" @@ -222,8 +224,8 @@ msgstr "" #: c-api/arg.rst:106 #, fuzzy msgid "" -"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" -"c:type:`Py_ssize_t`]" +"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char " +"\\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" @@ -243,7 +245,7 @@ msgstr "" "caractères peut contenir des octets NULL. Les objets Unicode sont convertis " "vers des chaînes de caractères C utilisant l'encodage ``'utf-8'``." -#: c-api/arg.rst:581 +#: c-api/arg.rst:643 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` ou ``None``) [``const char *``]" @@ -328,8 +330,8 @@ msgstr "" #: c-api/arg.rst:141 #, fuzzy msgid "" -"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" -"`Py_ssize_t`]" +"``y#`` (read-only :term:`bytes-like object`) [const char " +"\\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" @@ -355,8 +357,8 @@ msgid "" msgstr "" "Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " "de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " -"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" -"`PyObject\\*`." +"type *bytes*. La variable C doit aussi être déclarée en tant " +"que :c:type:`PyObject\\*`." #: c-api/arg.rst:150 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" @@ -366,14 +368,14 @@ msgstr "``Y`` (:class:`bytearray`) [``PyByteArrayObject *``]" #, fuzzy msgid "" "Requires that the Python object is a :class:`bytearray` object, without " -"attempting any conversion. Raises :exc:`TypeError` if the object is not a :" -"class:`bytearray` object. The C variable may also be declared as :c:expr:" -"`PyObject*`." +"attempting any conversion. Raises :exc:`TypeError` if the object is not " +"a :class:`bytearray` object. The C variable may also be declared " +"as :c:expr:`PyObject*`." msgstr "" "Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " "de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " -"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" -"`PyObject\\*`." +"type *bytes*. La variable C doit aussi être déclarée en tant " +"que :c:type:`PyObject\\*`." #: c-api/arg.rst:155 msgid "``U`` (:class:`str`) [PyObject \\*]" @@ -388,20 +390,26 @@ msgid "" msgstr "" "Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " "de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " -"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" -"`PyObject\\*`." +"type *bytes*. La variable C doit aussi être déclarée en tant " +"que :c:type:`PyObject\\*`." #: c-api/arg.rst:160 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "``w*`` (lecture-écriture :term:`bytes-like object`) [``Py_buffer``]" #: c-api/arg.rst:161 +#, fuzzy msgid "" "This format accepts any object which implements the read-write buffer " "interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " -"The buffer may contain embedded null bytes. The caller have to call :c:func:" -"`PyBuffer_Release` when it is done with the buffer." +"The buffer may contain embedded null bytes. The caller has to " +"call :c:func:`PyBuffer_Release` when it is done with the buffer." msgstr "" +"Ce format accepte les objets Unicode et les *bytes-like object*. Cela " +"remplit une structure :c:type:`Py_buffer` qui est fournie par l'appelant. " +"Dans ce cas, la chaîne de caractères C qui en résulte peut contenir des " +"octets NULL. Les objets Unicode sont convertis en chaînes de caractères C en " +"utilisant l'encodage ``'utf-8'``." #: c-api/arg.rst:166 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" @@ -428,8 +436,8 @@ msgstr "" msgid "" ":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " "the encoded data into this buffer and adjust *\\*buffer* to reference the " -"newly allocated storage. The caller is responsible for calling :c:func:" -"`PyMem_Free` to free the allocated buffer after use." +"newly allocated storage. The caller is responsible for " +"calling :c:func:`PyMem_Free` to free the allocated buffer after use." msgstr "" #: c-api/arg.rst:183 @@ -448,8 +456,8 @@ msgstr "" #: c-api/arg.rst:188 #, fuzzy msgid "" -"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" -"`Py_ssize_t` \\*buffer_length]" +"``es#`` (:class:`str`) [const char \\*encoding, char " +"\\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" @@ -531,150 +539,159 @@ msgid "Numbers" msgstr "Les nombres" #: c-api/arg.rst:232 +msgid "" +"These formats allow representing Python numbers or single characters as C " +"numbers. Formats that require :class:`int`, :class:`float` " +"or :class:`complex` can also use the corresponding special " +"methods :meth:`~object.__index__`, :meth:`~object.__float__` " +"or :meth:`~object.__complex__` to convert the Python object to the required " +"type." +msgstr "" + +#: c-api/arg.rst:238 +msgid "" +"For signed integer formats, :exc:`OverflowError` is raised if the value is " +"out of range for the C type. For unsigned integer formats, the most " +"significant bits are silently truncated when the receiving field is too " +"small to receive the value, and :exc:`DeprecationWarning` is emitted when " +"the value is larger than the maximal value for the C type or less than the " +"minimal value for the corresponding signed integer type of the same size." +msgstr "" + +#: c-api/arg.rst:246 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:233 +#: c-api/arg.rst:247 #, fuzzy msgid "" -"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" -"c:expr:`unsigned char`." +"Convert a nonnegative Python integer to an unsigned tiny integer, stored in " +"a C :c:expr:`unsigned char`." msgstr "" "Convertit un entier Python positif ou nul en un ``unsigned tiny int``, " "stocké dans un :c:type:`unsigned char` C." -#: c-api/arg.rst:615 +#: c-api/arg.rst:677 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:237 +#: c-api/arg.rst:251 #, fuzzy msgid "" -"Convert a Python integer to a tiny int without overflow checking, stored in " -"a C :c:expr:`unsigned char`." +"Convert a Python integer to a tiny integer without overflow checking, stored " +"in a C :c:expr:`unsigned char`. Convert a Python integer to a " +"C :c:expr:`unsigned char`." msgstr "" "Convertit un entier Python en un ``tiny int`` sans vérifier le débordement, " "stocké dans un :c:type:`unsigned char` C." -#: c-api/arg.rst:609 +#: c-api/arg.rst:671 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [``short int``]" -#: c-api/arg.rst:241 +#: c-api/arg.rst:256 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "Convertit un entier Python en un :c:type:`short int` C." -#: c-api/arg.rst:618 +#: c-api/arg.rst:680 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [``unsigned short int``]" -#: c-api/arg.rst:244 +#: c-api/arg.rst:259 #, fuzzy -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned short int`, without " -"overflow checking." -msgstr "" -"Convertit un entier Python en un :c:type:`unsigned short int` C, sans " -"contrôle de débordement." +msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." +msgstr "Convertit un entier Python en un :c:type:`short int` C." -#: c-api/arg.rst:603 +#: c-api/arg.rst:665 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [``int``]" -#: c-api/arg.rst:248 +#: c-api/arg.rst:262 #, fuzzy msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "Convertit un entier Python en un :c:type:`int` C." -#: c-api/arg.rst:621 +#: c-api/arg.rst:683 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [``unsigned int``]" -#: c-api/arg.rst:251 +#: c-api/arg.rst:265 #, fuzzy -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " -"checking." -msgstr "" -"Convertit un entier Python en un :c:type:`unsigned int` C, sans contrôle de " -"le débordement." +msgid "Convert a Python integer to a C :c:expr:`unsigned int`." +msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:612 +#: c-api/arg.rst:674 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [``long int``]" -#: c-api/arg.rst:255 +#: c-api/arg.rst:268 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:624 +#: c-api/arg.rst:686 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [``unsigned long``]" -#: c-api/arg.rst:258 +#: c-api/arg.rst:271 #, fuzzy -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned long` without overflow " -"checking." +msgid "Convert a Python integer to a C :c:expr:`unsigned long`." +msgstr "Convertit un entier Python en un :c:type:`long int`." + +#: c-api/arg.rst:282 +msgid "Use :meth:`~object.__index__` if available." msgstr "" -"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " -"le débordement." -#: c-api/arg.rst:627 +#: c-api/arg.rst:689 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [``long long``]" -#: c-api/arg.rst:262 +#: c-api/arg.rst:277 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:630 +#: c-api/arg.rst:694 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [``unsigned long long``]" -#: c-api/arg.rst:265 +#: c-api/arg.rst:280 #, fuzzy -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned long long` without " -"overflow checking." -msgstr "" -"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " -"le débordement." +msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." +msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:633 +#: c-api/arg.rst:697 #, fuzzy msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [``Py_ssize_t``]" -#: c-api/arg.rst:269 +#: c-api/arg.rst:286 msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." msgstr "Convertit un entier Python en un :c:type:`Py_ssize_t`." -#: c-api/arg.rst:271 +#: c-api/arg.rst:288 msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" msgstr "``c`` (:class:`bytes` ou :class:`bytearray` de longueur 1) [``char``]" -#: c-api/arg.rst:272 +#: c-api/arg.rst:289 #, fuzzy msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " "object of length 1, to a C :c:expr:`char`." msgstr "" -"Convertit un *byte* Python, représenté comme un objet :class:`bytes` ou :" -"class:`bytearray` de longueur 1, en un :c:type:`char` C." +"Convertit un *byte* Python, représenté comme un objet :class:`bytes` " +"ou :class:`bytearray` de longueur 1, en un :c:type:`char` C." -#: c-api/arg.rst:275 +#: c-api/arg.rst:292 msgid "Allow :class:`bytearray` objects." msgstr "" -#: c-api/arg.rst:640 +#: c-api/arg.rst:715 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C`` (:class:`str` de longueur 1) [``int``]" -#: c-api/arg.rst:279 +#: c-api/arg.rst:296 #, fuzzy msgid "" "Convert a Python character, represented as a :class:`str` object of length " @@ -683,60 +700,68 @@ msgstr "" "Convertit un caractère Python, représenté comme un objet :class:`str` de " "longueur 1, en un :c:type:`int` C." -#: c-api/arg.rst:647 +#: c-api/arg.rst:722 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [``float``]" -#: c-api/arg.rst:283 +#: c-api/arg.rst:300 #, fuzzy msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "Convertit un nombre flottant Python vers un :c:type:`float`." -#: c-api/arg.rst:644 +#: c-api/arg.rst:719 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [``double``]" -#: c-api/arg.rst:286 +#: c-api/arg.rst:303 #, fuzzy msgid "Convert a Python floating-point number to a C :c:expr:`double`." msgstr "Convertit un nombre flottant Python vers un :c:type:`double` C." -#: c-api/arg.rst:288 +#: c-api/arg.rst:305 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [``Py_complex``]" -#: c-api/arg.rst:289 +#: c-api/arg.rst:306 msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." msgstr "" "Convertit un nombre complexe Python vers une structure :c:type:`Py_complex` " "C." -#: c-api/arg.rst:292 +#: c-api/arg.rst:310 +msgid "" +"For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and " +"``K``, :exc:`DeprecationWarning` is emitted when the value is larger than " +"the maximal value for the C type or less than the minimal value for the " +"corresponding signed integer type of the same size." +msgstr "" + +#: c-api/arg.rst:317 msgid "Other objects" msgstr "Autres objets" -#: c-api/arg.rst:653 +#: c-api/arg.rst:728 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (objet) [``PyObject *``]" -#: c-api/arg.rst:295 +#: c-api/arg.rst:320 #, fuzzy msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " -"program thus receives the actual object that was passed. A new :term:" -"`strong reference` to the object is not created (i.e. its reference count is " -"not increased). The pointer stored is not ``NULL``." +"program thus receives the actual object that was passed. A " +"new :term:`strong reference` to the object is not created (i.e. its " +"reference count is not increased). The pointer stored is not ``NULL``." msgstr "" "Stocke un objet Python (sans aucune conversion) en un pointeur sur un objet " "C. Ainsi, Le programme C reçoit l'objet réel qui a été passé. Le compteur de " "référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " "*NULL*." -#: c-api/arg.rst:301 +#: c-api/arg.rst:326 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" -#: c-api/arg.rst:302 +#: c-api/arg.rst:327 msgid "" "Store a Python object in a C object pointer. This is similar to ``O``, but " "takes two C arguments: the first is the address of a Python type object, the " @@ -745,11 +770,12 @@ msgid "" "required type, :exc:`TypeError` is raised." msgstr "" -#: c-api/arg.rst:671 -msgid "``O&`` (object) [*converter*, *anything*]" +#: c-api/arg.rst:335 +#, fuzzy +msgid "``O&`` (object) [*converter*, *address*]" msgstr "``O&`` (objet) [*converter*, *anything*]" -#: c-api/arg.rst:311 +#: c-api/arg.rst:336 msgid "" "Convert a Python object to a C variable through a *converter* function. " "This takes two arguments: the first is a function, the second is the address " @@ -757,34 +783,41 @@ msgid "" "*converter* function in turn is called as follows::" msgstr "" -#: c-api/arg.rst:318 +#: c-api/arg.rst:343 msgid "" -"where *object* is the Python object to be converted and *address* is the :c:" -"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " -"returned *status* should be ``1`` for a successful conversion and ``0`` if " -"the conversion has failed. When the conversion fails, the *converter* " -"function should raise an exception and leave the content of *address* " -"unmodified." +"where *object* is the Python object to be converted and *address* is " +"the :c:expr:`void*` argument that was passed to the ``PyArg_Parse*`` " +"function. The returned *status* should be ``1`` for a successful conversion " +"and ``0`` if the conversion has failed. When the conversion fails, the " +"*converter* function should raise an exception and leave the content of " +"*address* unmodified." msgstr "" -#: c-api/arg.rst:324 +#: c-api/arg.rst:352 msgid "" -"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a " -"second time if the argument parsing eventually fails, giving the converter a " -"chance to release any memory that it had already allocated. In this second " -"call, the *object* parameter will be ``NULL``; *address* will have the same " -"value as in the original call." +"If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " +"called a second time if the argument parsing eventually fails, giving the " +"converter a chance to release any memory that it had already allocated. In " +"this second call, the *object* parameter will be ``NULL``; *address* will " +"have the same value as in the original call." msgstr "" -#: c-api/arg.rst:330 -msgid "``Py_CLEANUP_SUPPORTED`` was added." +#: c-api/arg.rst:358 +msgid "" +"Examples of converters: :c:func:`PyUnicode_FSConverter` " +"and :c:func:`PyUnicode_FSDecoder`." +msgstr "" + +#: c-api/arg.rst:361 +#, fuzzy +msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." -#: c-api/arg.rst:333 +#: c-api/arg.rst:700 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [``int``]" -#: c-api/arg.rst:334 +#: c-api/arg.rst:365 msgid "" "Tests the value passed in for truth (a boolean **p**\\ redicate) and " "converts the result to its equivalent C true/false integer value. Sets the " @@ -793,31 +826,45 @@ msgid "" "how Python tests values for truth." msgstr "" -#: c-api/arg.rst:677 -msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +#: c-api/arg.rst:373 +#, fuzzy +msgid "``(items)`` (sequence) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: c-api/arg.rst:343 +#: c-api/arg.rst:374 +#, fuzzy msgid "" -"The object must be a Python sequence whose length is the number of format " -"units in *items*. The C arguments must correspond to the individual format " -"units in *items*. Format units for sequences may be nested." +"The object must be a Python sequence (except :class:`str`, :class:`bytes` " +"or :class:`bytearray`) whose length is the number of format units in " +"*items*. The C arguments must correspond to the individual format units in " +"*items*. Format units for sequences may be nested." msgstr "" "L'objet doit être une séquence Python dont la longueur est le nombre " "d'unités de formats dans *articles*. Les arguments C doivent correspondre à " "chaque unité de format particulière dans *articles*. Les unités de formats " "pour les séquences peuvent être imbriquées." -#: c-api/arg.rst:347 +#: c-api/arg.rst:379 +msgid "" +"If *items* contains format units which store a :ref:`borrowed buffer ` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``) or " +"a :term:`borrowed reference` (``S``, ``Y``, ``U``, ``O``, or ``O!``), the " +"object must be a Python tuple. The *converter* for the ``O&`` format unit in " +"*items* must not store a borrowed buffer or a borrowed reference." +msgstr "" + +#: c-api/arg.rst:386 msgid "" -"It is possible to pass \"long\" integers (integers whose value exceeds the " -"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- " -"the most significant bits are silently truncated when the receiving field is " -"too small to receive the value (actually, the semantics are inherited from " -"downcasts in C --- your mileage may vary)." +":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." msgstr "" -#: c-api/arg.rst:353 +#: c-api/arg.rst:389 +msgid "" +"Non-tuple sequences are deprecated if *items* contains format units which " +"store a borrowed buffer or a borrowed reference." +msgstr "" + +#: c-api/arg.rst:393 msgid "" "A few other characters have a meaning in a format string. These may not " "occur inside nested parentheses. They are:" @@ -825,11 +872,11 @@ msgstr "" "Quelques autres caractères ont un sens dans une chaîne de format. On ne doit " "pas les trouvées dans des parenthèses imbriquées. Ce sont :" -#: c-api/arg.rst:356 +#: c-api/arg.rst:396 msgid "``|``" msgstr "``|``" -#: c-api/arg.rst:357 +#: c-api/arg.rst:397 msgid "" "Indicates that the remaining arguments in the Python argument list are " "optional. The C variables corresponding to optional arguments should be " @@ -838,11 +885,11 @@ msgid "" "corresponding C variable(s)." msgstr "" -#: c-api/arg.rst:363 +#: c-api/arg.rst:403 msgid "``$``" msgstr "``$``" -#: c-api/arg.rst:364 +#: c-api/arg.rst:404 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " "arguments in the Python argument list are keyword-only. Currently, all " @@ -850,32 +897,32 @@ msgid "" "be specified before ``$`` in the format string." msgstr "" -#: c-api/arg.rst:372 +#: c-api/arg.rst:412 msgid "``:``" msgstr "" -#: c-api/arg.rst:373 +#: c-api/arg.rst:413 msgid "" "The list of format units ends here; the string after the colon is used as " "the function name in error messages (the \"associated value\" of the " "exception that :c:func:`PyArg_ParseTuple` raises)." msgstr "" -#: c-api/arg.rst:377 +#: c-api/arg.rst:417 msgid "``;``" msgstr "" -#: c-api/arg.rst:378 +#: c-api/arg.rst:418 msgid "" "The list of format units ends here; the string after the semicolon is used " -"as the error message *instead* of the default error message. ``:`` and ``;" -"`` mutually exclude each other." +"as the error message *instead* of the default error message. ``:`` and " +"``;`` mutually exclude each other." msgstr "" "La liste des unités de format s'arrête ici ; la chaîne après le point-" "virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " "défaut. ``:`` et ``;`` sont mutuellement exclusifs." -#: c-api/arg.rst:382 +#: c-api/arg.rst:422 #, fuzzy msgid "" "Note that any Python object references which are provided to the caller are " @@ -886,7 +933,7 @@ msgstr "" "à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " "compteur de références !" -#: c-api/arg.rst:386 +#: c-api/arg.rst:426 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " @@ -903,7 +950,7 @@ msgstr "" "devraient correspondre à ce qui est spécifié pour l'unité de format " "correspondante." -#: c-api/arg.rst:392 +#: c-api/arg.rst:432 msgid "" "For the conversion to succeed, the *arg* object must match the format and " "the format must be exhausted. On success, the ``PyArg_Parse*`` functions " @@ -913,24 +960,24 @@ msgid "" "the following format units are left untouched." msgstr "" -#: c-api/arg.rst:401 +#: c-api/arg.rst:441 msgid "API Functions" msgstr "Fonction de l'API" -#: c-api/arg.rst:405 +#: c-api/arg.rst:445 msgid "" "Parse the parameters of a function that takes only positional parameters " "into local variables. Returns true on success; on failure, it returns false " "and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:412 +#: c-api/arg.rst:452 msgid "" "Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" -#: c-api/arg.rst:418 +#: c-api/arg.rst:458 msgid "" "Parse the parameters of a function that takes both positional and keyword " "parameters into local variables. The *keywords* argument is a ``NULL``-" @@ -940,51 +987,68 @@ msgid "" "failure, it returns false and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:429 +#: c-api/arg.rst:469 msgid "" -"The *keywords* parameter declaration is :c:expr:`char * const *` in C and :c:" -"expr:`const char * const *` in C++. This can be overridden with the :c:macro:" -"`PY_CXX_CONST` macro." +"The *keywords* parameter declaration is :c:expr:`char * const *` in C " +"and :c:expr:`const char * const *` in C++. This can be overridden with " +"the :c:macro:`PY_CXX_CONST` macro." msgstr "" -#: c-api/arg.rst:433 +#: c-api/arg.rst:473 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" -#: c-api/arg.rst:437 +#: c-api/arg.rst:477 msgid "" -"The *keywords* parameter has now type :c:expr:`char * const *` in C and :c:" -"expr:`const char * const *` in C++, instead of :c:expr:`char **`. Added " -"support for non-ASCII keyword parameter names." +"The *keywords* parameter has now type :c:expr:`char * const *` in C " +"and :c:expr:`const char * const *` in C++, instead of :c:expr:`char **`. " +"Added support for non-ASCII keyword parameter names." msgstr "" -#: c-api/arg.rst:446 +#: c-api/arg.rst:486 msgid "" "Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " "va_list rather than a variable number of arguments." msgstr "" -#: c-api/arg.rst:452 +#: c-api/arg.rst:492 msgid "" "Ensure that the keys in the keywords argument dictionary are strings. This " "is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " "the latter already does this check." msgstr "" -#: c-api/arg.rst:461 +#: c-api/arg.rst:501 msgid "" "Parse the parameter of a function that takes a single positional parameter " "into a local variable. Returns true on success; on failure, it returns " "false and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:465 +#: c-api/arg.rst:505 msgid "Example::" msgstr "Exemple ::" -#: c-api/arg.rst:481 +#: c-api/arg.rst:521 +msgid "" +"Parse the parameters of a function that takes only array parameters into " +"local variables (that is, a function using the :c:macro:`METH_FASTCALL` " +"calling convention). Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:532 +msgid "" +"Parse the parameters of a function that takes both array and keyword " +"parameters into local variables (that is, a function using " +"the :c:macro:`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` calling " +"convention). Returns true on success; on failure, it returns false and " +"raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:543 msgid "" "A simpler form of parameter retrieval which does not use a format string to " "specify the types of the arguments. Functions which use this method to " @@ -1002,19 +1066,19 @@ msgid "" "if there was a failure." msgstr "" -#: c-api/arg.rst:496 +#: c-api/arg.rst:558 msgid "" "This is an example of the use of this function, taken from the sources for " "the :mod:`!_weakref` helper module for weak references::" msgstr "" -#: c-api/arg.rst:512 +#: c-api/arg.rst:574 msgid "" "The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " "equivalent to this call to :c:func:`PyArg_ParseTuple`::" msgstr "" -#: c-api/arg.rst:519 +#: c-api/arg.rst:581 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " @@ -1023,11 +1087,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" -#: c-api/arg.rst:533 +#: c-api/arg.rst:595 msgid "Building values" msgstr "Construction des valeurs" -#: c-api/arg.rst:537 +#: c-api/arg.rst:599 msgid "" "Create a new value based on a format string similar to those accepted by the " "``PyArg_Parse*`` family of functions and a sequence of values. Returns the " @@ -1035,7 +1099,7 @@ msgid "" "``NULL`` is returned." msgstr "" -#: c-api/arg.rst:542 +#: c-api/arg.rst:604 msgid "" ":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " "only if its format string contains two or more format units. If the format " @@ -1044,18 +1108,18 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" -#: c-api/arg.rst:548 +#: c-api/arg.rst:610 msgid "" "When memory buffers are passed as parameters to supply data to build " "objects, as for the ``s`` and ``s#`` formats, the required data is copied. " "Buffers provided by the caller are never referenced by the objects created " -"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:" -"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your " -"code is responsible for calling :c:func:`free` for that memory once :c:func:" -"`Py_BuildValue` returns." +"by :c:func:`Py_BuildValue`. In other words, if your code " +"invokes :c:func:`malloc` and passes the allocated memory " +"to :c:func:`Py_BuildValue`, your code is responsible for " +"calling :c:func:`free` for that memory once :c:func:`Py_BuildValue` returns." msgstr "" -#: c-api/arg.rst:556 +#: c-api/arg.rst:618 msgid "" "In the following description, the quoted form is the format unit; the entry " "in (round) parentheses is the Python object type that the format unit will " @@ -1063,167 +1127,180 @@ msgid "" "be passed." msgstr "" -#: c-api/arg.rst:560 +#: c-api/arg.rst:622 msgid "" "The characters space, tab, colon and comma are ignored in format strings " "(but not within format units such as ``s#``). This can be used to make long " "format strings a tad more readable." msgstr "" -#: c-api/arg.rst:564 +#: c-api/arg.rst:626 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s`` (:class:`str` ou ``None``) [``const char *``]" -#: c-api/arg.rst:565 +#: c-api/arg.rst:627 msgid "" "Convert a null-terminated C string to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." msgstr "" -#: c-api/arg.rst:568 +#: c-api/arg.rst:630 #, fuzzy msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``s#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" -#: c-api/arg.rst:569 +#: c-api/arg.rst:631 msgid "" "Convert a C string and its length to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " "ignored and ``None`` is returned." msgstr "" -#: c-api/arg.rst:573 +#: c-api/arg.rst:635 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [``const char *``]" -#: c-api/arg.rst:574 +#: c-api/arg.rst:636 msgid "" "This converts a C string to a Python :class:`bytes` object. If the C string " "pointer is ``NULL``, ``None`` is returned." msgstr "" -#: c-api/arg.rst:577 +#: c-api/arg.rst:639 #, fuzzy msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [``const char *, int``]" -#: c-api/arg.rst:578 +#: c-api/arg.rst:640 msgid "" "This converts a C string and its lengths to a Python object. If the C " "string pointer is ``NULL``, ``None`` is returned." msgstr "" -#: c-api/arg.rst:598 +#: c-api/arg.rst:660 msgid "Same as ``s``." msgstr "" -#: c-api/arg.rst:584 +#: c-api/arg.rst:646 #, fuzzy msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``z#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" -#: c-api/arg.rst:601 +#: c-api/arg.rst:663 msgid "Same as ``s#``." msgstr "" -#: c-api/arg.rst:587 +#: c-api/arg.rst:649 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [``const wchar_t *``]" -#: c-api/arg.rst:588 +#: c-api/arg.rst:650 msgid "" "Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " "UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " "``NULL``, ``None`` is returned." msgstr "" -#: c-api/arg.rst:592 +#: c-api/arg.rst:654 #, fuzzy msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [``const wchar_t *``, ``int``]" -#: c-api/arg.rst:593 +#: c-api/arg.rst:655 msgid "" "Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " "Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " "ignored and ``None`` is returned." msgstr "" -#: c-api/arg.rst:597 +#: c-api/arg.rst:659 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U`` (:class:`str` ou ``None``) [``const char *``]" -#: c-api/arg.rst:600 +#: c-api/arg.rst:662 #, fuzzy msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``U#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" -#: c-api/arg.rst:604 +#: c-api/arg.rst:666 #, fuzzy msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:606 +#: c-api/arg.rst:668 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [``char``]" -#: c-api/arg.rst:607 +#: c-api/arg.rst:669 #, fuzzy msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:610 +#: c-api/arg.rst:672 #, fuzzy msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:613 +#: c-api/arg.rst:675 #, fuzzy msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:616 +#: c-api/arg.rst:678 #, fuzzy msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:619 +#: c-api/arg.rst:681 #, fuzzy msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:622 +#: c-api/arg.rst:684 #, fuzzy msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:625 +#: c-api/arg.rst:687 #, fuzzy msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:628 +#: c-api/arg.rst:690 #, fuzzy msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:631 +#: c-api/arg.rst:695 #, fuzzy msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:634 +#: c-api/arg.rst:698 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" -#: c-api/arg.rst:636 +#: c-api/arg.rst:701 +#, fuzzy +msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:703 +msgid "" +"Be aware that this format requires an ``int`` argument. Unlike most other " +"contexts in C, variadic arguments are not coerced to a suitable type " +"automatically. You can convert another type (for example, a pointer or a " +"float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." +msgstr "" + +#: c-api/arg.rst:711 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c`` (:class:`bytes` de taille 1) [``char``]" -#: c-api/arg.rst:637 +#: c-api/arg.rst:712 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " @@ -1232,7 +1309,7 @@ msgstr "" "Convertit un caractère Python, représenté comme un objet :class:`str` de " "longueur 1, en un :c:type:`int` C." -#: c-api/arg.rst:641 +#: c-api/arg.rst:716 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " @@ -1241,119 +1318,160 @@ msgstr "" "Convertit un caractère Python, représenté comme un objet :class:`str` de " "longueur 1, en un :c:type:`int` C." -#: c-api/arg.rst:645 +#: c-api/arg.rst:720 #, fuzzy msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:648 +#: c-api/arg.rst:723 #, fuzzy msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:650 +#: c-api/arg.rst:725 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [``Py_complex *``]" -#: c-api/arg.rst:651 +#: c-api/arg.rst:726 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: c-api/arg.rst:654 +#: c-api/arg.rst:729 msgid "" "Pass a Python object untouched but create a new :term:`strong reference` to " "it (i.e. its reference count is incremented by one). If the object passed in " "is a ``NULL`` pointer, it is assumed that this was caused because the call " -"producing the argument found an error and set an exception. Therefore, :c:" -"func:`Py_BuildValue` will return ``NULL`` but won't raise an exception. If " -"no exception has been raised yet, :exc:`SystemError` is set." +"producing the argument found an error and set an exception. " +"Therefore, :c:func:`Py_BuildValue` will return ``NULL`` but won't raise an " +"exception. If no exception has been raised yet, :exc:`SystemError` is set." msgstr "" -#: c-api/arg.rst:663 +#: c-api/arg.rst:738 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (objet) [``PyObject *``]" -#: c-api/arg.rst:664 +#: c-api/arg.rst:739 msgid "Same as ``O``." msgstr "" -#: c-api/arg.rst:666 +#: c-api/arg.rst:741 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (objet) [``PyObject *``]" -#: c-api/arg.rst:667 +#: c-api/arg.rst:742 msgid "" "Same as ``O``, except it doesn't create a new :term:`strong reference`. " "Useful when the object is created by a call to an object constructor in the " "argument list." msgstr "" -#: c-api/arg.rst:672 +#: c-api/arg.rst:746 +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "``O&`` (objet) [*converter*, *anything*]" + +#: c-api/arg.rst:747 msgid "" "Convert *anything* to a Python object through a *converter* function. The " -"function is called with *anything* (which should be compatible with :c:expr:" -"`void*`) as its argument and should return a \"new\" Python object, or " -"``NULL`` if an error occurred." +"function is called with *anything* (which should be compatible " +"with :c:expr:`void*`) as its argument and should return a \"new\" Python " +"object, or ``NULL`` if an error occurred." msgstr "" -#: c-api/arg.rst:678 +#: c-api/arg.rst:752 +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" + +#: c-api/arg.rst:753 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" -#: c-api/arg.rst:680 +#: c-api/arg.rst:755 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: c-api/arg.rst:681 +#: c-api/arg.rst:756 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" -#: c-api/arg.rst:683 +#: c-api/arg.rst:758 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: c-api/arg.rst:684 +#: c-api/arg.rst:759 msgid "" "Convert a sequence of C values to a Python dictionary. Each pair of " "consecutive C values adds one item to the dictionary, serving as key and " "value, respectively." msgstr "" -#: c-api/arg.rst:688 +#: c-api/arg.rst:763 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" -#: c-api/arg.rst:693 +#: c-api/arg.rst:768 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" +#, fuzzy +#~ msgid "" +#~ "Convert a Python integer to a C :c:expr:`unsigned short int`, without " +#~ "overflow checking." +#~ msgstr "" +#~ "Convertit un entier Python en un :c:type:`unsigned short int` C, sans " +#~ "contrôle de débordement." + +#, fuzzy +#~ msgid "" +#~ "Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " +#~ "checking." +#~ msgstr "" +#~ "Convertit un entier Python en un :c:type:`unsigned int` C, sans contrôle " +#~ "de le débordement." + +#, fuzzy +#~ msgid "" +#~ "Convert a Python integer to a C :c:expr:`unsigned long` without overflow " +#~ "checking." +#~ msgstr "" +#~ "Convertit un entier Python en un :c:type:`unsigned long` C sans en " +#~ "vérifier le débordement." + +#, fuzzy +#~ msgid "" +#~ "Convert a Python integer to a C :c:expr:`unsigned long long` without " +#~ "overflow checking." +#~ msgstr "" +#~ "Convertit un entier Python en un :c:type:`unsigned long` C sans en " +#~ "vérifier le débordement." + #~ msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]" #~ msgstr "``u`` (:class:`str`) [``const Py_UNICODE *``]" #~ msgid "" #~ "Convert a Python Unicode object to a C pointer to a NUL-terminated buffer " -#~ "of Unicode characters. You must pass the address of a :c:type:" -#~ "`Py_UNICODE` pointer variable, which will be filled with the pointer to " -#~ "an existing Unicode buffer. Please note that the width of a :c:type:" -#~ "`Py_UNICODE` character depends on compilation options (it is either 16 or " -#~ "32 bits). The Python string must not contain embedded null code points; " -#~ "if it does, a :exc:`ValueError` exception is raised." +#~ "of Unicode characters. You must pass the address of " +#~ "a :c:type:`Py_UNICODE` pointer variable, which will be filled with the " +#~ "pointer to an existing Unicode buffer. Please note that the width of " +#~ "a :c:type:`Py_UNICODE` character depends on compilation options (it is " +#~ "either 16 or 32 bits). The Python string must not contain embedded null " +#~ "code points; if it does, a :exc:`ValueError` exception is raised." #~ msgstr "" #~ "Convertit un objet Python Unicode en un pointeur C vers un tampon de " #~ "caractères Unicode terminé par *NULL*. Vous devez passer l'adresse d'un " #~ "pointeur :c:type:`Py_UNICODE`, qui sera rempli avec le pointeur vers un " -#~ "tampon Unicode existant. Veuillez noter que la taille d'un :c:type:" -#~ "`Py_UNICODE` dépend des options de compilation (soit 16, soit 32 bits). " -#~ "La chaîne de caractères Python ne doit pas contenir de code *NULL*. Si " -#~ "elle en contient, une exception :exc:`ValueError` est levée." +#~ "tampon Unicode existant. Veuillez noter que la taille " +#~ "d'un :c:type:`Py_UNICODE` dépend des options de compilation (soit 16, " +#~ "soit 32 bits). La chaîne de caractères Python ne doit pas contenir de " +#~ "code *NULL*. Si elle en contient, une exception :exc:`ValueError` est " +#~ "levée." #, fuzzy #~ msgid "``u#`` (:class:`str`) [const Py_UNICODE \\*, :c:type:`Py_ssize_t`]" @@ -1372,8 +1490,8 @@ msgstr "" #, fuzzy #~ msgid "" -#~ "``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\*, :c:type:" -#~ "`Py_ssize_t`]" +#~ "``Z#`` (:class:`str` or ``None``) [const Py_UNICODE " +#~ "\\*, :c:type:`Py_ssize_t`]" #~ msgstr "``Z#`` (:class:`str` ou ``None``) [``const Py_UNICODE *``, ``int``]" #, fuzzy @@ -1394,8 +1512,8 @@ msgstr "" #~ "d'octets ` en lecture seule, et définissent un " #~ "pointeur à la place d'une structure tampon. Ils fonctionnent en vérifiant " #~ "que le champ :c:member:`PyBufferProcs.bf_releasebuffer` de l'objet est " -#~ "*NULL*, ce qui n'autorise pas les objets mutables tels que :class:" -#~ "`bytearray`." +#~ "*NULL*, ce qui n'autorise pas les objets mutables tels " +#~ "que :class:`bytearray`." #~ msgid "" #~ "For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of the " diff --git a/c-api/bool.po b/c-api/bool.po index bff7cd88a..144736bb2 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2021-10-27 19:19+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -28,8 +28,8 @@ msgid "" "following macros are available, however." msgstr "" "Les booléens en Python sont implémentés comme une classe dérivée des " -"entiers. Il y a seulement deux booléens, :const:`Py_False` et :const:" -"`Py_True`. Comme tel, les fonctions de création de suppression ne " +"entiers. Il y a seulement deux booléens, :const:`Py_False` " +"et :const:`Py_True`. Comme tel, les fonctions de création de suppression ne " "s'appliquent pas aux booléens. Toutefois, les macros suivantes sont " "disponibles." @@ -50,8 +50,8 @@ msgstr "" #: c-api/bool.rst:28 #, fuzzy msgid "" -"The Python ``False`` object. This object has no methods and is :term:" -"`immortal`." +"The Python ``False`` object. This object has no methods and " +"is :term:`immortal`." msgstr "" "L'objet Python ``False``. Cet objet n'a pas de méthodes. En ce qui concerne " "le comptage de référence, il doit être traité comme n'importe quel autre " @@ -64,8 +64,8 @@ msgstr "" #: c-api/bool.rst:37 #, fuzzy msgid "" -"The Python ``True`` object. This object has no methods and is :term:" -"`immortal`." +"The Python ``True`` object. This object has no methods and " +"is :term:`immortal`." msgstr "" "L'objet Python ``True``. Cet objet n'a pas de méthodes. En ce qui concerne " "le comptage de références, il doit être traité comme n'importe quel autre " diff --git a/c-api/buffer.po b/c-api/buffer.po index 056480b1e..4c3554242 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-10-27 21:13+0200\n" "Last-Translator: David GIRAUD \n" "Language-Team: FRENCH \n" @@ -19,13 +19,13 @@ msgstr "" msgid "Buffer Protocol" msgstr "Protocole tampon" -#: c-api/buffer.rst:18 +#: c-api/buffer.rst:13 msgid "" "Certain objects available in Python wrap access to an underlying memory " -"array or *buffer*. Such objects include the built-in :class:`bytes` and :" -"class:`bytearray`, and some extension types like :class:`array.array`. Third-" -"party libraries may define their own types for special purposes, such as " -"image processing or numeric analysis." +"array or *buffer*. Such objects include the built-in :class:`bytes` " +"and :class:`bytearray`, and some extension types like :class:`array.array`. " +"Third-party libraries may define their own types for special purposes, such " +"as image processing or numeric analysis." msgstr "" "Certains objets Python enveloppent l'accès à un tableau de mémoire sous-" "jacente (nommée zone tampon ou simplement tampon, *buffer* en anglais). Les " @@ -34,7 +34,7 @@ msgstr "" "bibliothèques tierces peuvent définir leurs propres types à des fins " "spéciales, telles que le traitement d'image ou l'analyse numérique." -#: c-api/buffer.rst:24 +#: c-api/buffer.rst:19 msgid "" "While each of these types have their own semantics, they share the common " "characteristic of being backed by a possibly large memory buffer. It is " @@ -46,35 +46,41 @@ msgstr "" "Il est donc souhaitable, dans certains cas, d'accéder à cette mémoire " "directement sans l'étape intermédiaire de copie." -#: c-api/buffer.rst:29 +#: c-api/buffer.rst:24 +#, fuzzy msgid "" -"Python provides such a facility at the C level in the form of the :ref:" -"`buffer protocol `. This protocol has two sides:" +"Python provides such a facility at the C and Python level in the form of " +"the :ref:`buffer protocol `. This protocol has two sides:" msgstr "" -"Python fournit une telle facilité au niveau du C sous la forme de :ref:" -"`protocole tampon `. Ce protocole comporte deux aspects :" +"Python fournit une telle facilité au niveau du C sous la forme " +"de :ref:`protocole tampon `. Ce protocole comporte deux " +"aspects :" -#: c-api/buffer.rst:34 +#: c-api/buffer.rst:29 +#, fuzzy msgid "" "on the producer side, a type can export a \"buffer interface\" which allows " "objects of that type to expose information about their underlying buffer. " -"This interface is described in the section :ref:`buffer-structs`;" +"This interface is described in the section :ref:`buffer-structs`; for Python " +"see :ref:`python-buffer-protocol`." msgstr "" "du côté producteur, un type peut exporter une \"interface tampon\" qui " "permet aux objets de ce type d'exposer des informations concernant leur " "tampon sous-jacent. Cette interface est décrite dans la section :ref:`buffer-" "structs` ;" -#: c-api/buffer.rst:38 +#: c-api/buffer.rst:34 +#, fuzzy msgid "" "on the consumer side, several means are available to obtain a pointer to the " -"raw underlying data of an object (for example a method parameter)." +"raw underlying data of an object (for example a method parameter). For " +"Python see :class:`memoryview`." msgstr "" "du côté consommateur, plusieurs moyens sont disponibles pour obtenir un " "pointeur vers les données sous-jacentes brutes d'un objet (par exemple un " "paramètre de méthode)." -#: c-api/buffer.rst:41 +#: c-api/buffer.rst:38 msgid "" "Simple objects such as :class:`bytes` and :class:`bytearray` expose their " "underlying buffer in byte-oriented form. Other forms are possible; for " @@ -86,29 +92,29 @@ msgstr "" "possibles ; par exemple, les éléments exposés par un :class:`array.array` " "peuvent être des valeurs multi-octets." -#: c-api/buffer.rst:45 +#: c-api/buffer.rst:42 #, fuzzy msgid "" -"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." -"write` method of file objects: any object that can export a series of bytes " -"through the buffer interface can be written to a file. While :meth:`!write` " -"only needs read-only access to the internal contents of the object passed to " -"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " -"access to the contents of their argument. The buffer interface allows " -"objects to selectively allow or reject exporting of read-write and read-only " -"buffers." -msgstr "" -"Un exemple de consommateur de l'interface tampon est la méthode :meth:`~io." -"BufferedIOBase.write` des objets fichiers : tout objet qui peut exporter une " -"série d'octets à travers l'interface tampon peut être écrit dans un fichier. " -"Alors que :meth:`write` n'a besoin que d'un accès lecture au contenu " -"interne de l'objet qui lui est passé, d'autres méthodes telles que :meth:" -"`~io.BufferedIOBase.readinto` nécessitent un accès écriture au contenu de " -"leur argument. L'interface *buffer* permet aux objets d'autoriser ou de " -"rejeter sélectivement l'exportation de tampons en mode lecture-écriture et " -"en mode lecture seule." - -#: c-api/buffer.rst:53 +"An example consumer of the buffer interface is " +"the :meth:`~io.BufferedIOBase.write` method of file objects: any object that " +"can export a series of bytes through the buffer interface can be written to " +"a file. While :meth:`!write` only needs read-only access to the internal " +"contents of the object passed to it, other methods such " +"as :meth:`~io.BufferedIOBase.readinto` need write access to the contents of " +"their argument. The buffer interface allows objects to selectively allow or " +"reject exporting of read-write and read-only buffers." +msgstr "" +"Un exemple de consommateur de l'interface tampon est la " +"méthode :meth:`~io.BufferedIOBase.write` des objets fichiers : tout objet " +"qui peut exporter une série d'octets à travers l'interface tampon peut être " +"écrit dans un fichier. Alors que :meth:`write` n'a besoin que d'un accès " +"lecture au contenu interne de l'objet qui lui est passé, d'autres méthodes " +"telles que :meth:`~io.BufferedIOBase.readinto` nécessitent un accès écriture " +"au contenu de leur argument. L'interface *buffer* permet aux objets " +"d'autoriser ou de rejeter sélectivement l'exportation de tampons en mode " +"lecture-écriture et en mode lecture seule." + +#: c-api/buffer.rst:50 msgid "" "There are two ways for a consumer of the buffer interface to acquire a " "buffer over a target object:" @@ -116,11 +122,11 @@ msgstr "" "Un consommateur de l'interface tampon peut acquérir un tampon sur un objet " "cible de deux manières :" -#: c-api/buffer.rst:56 +#: c-api/buffer.rst:53 msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" msgstr "appelez :c:func:`PyObject_GetBuffer` avec les paramètres appropriés ;" -#: c-api/buffer.rst:58 +#: c-api/buffer.rst:55 msgid "" "call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " "``y*``, ``w*`` or ``s*`` :ref:`format codes `." @@ -128,7 +134,7 @@ msgstr "" "appelez :c:func:`PyArg_ParseTuple` (ou l'un de ses fonctions sœurs) avec " "l'un des ``y*``, ``w*`` ou ``s*`` :ref:`format codes `." -#: c-api/buffer.rst:61 +#: c-api/buffer.rst:58 msgid "" "In both cases, :c:func:`PyBuffer_Release` must be called when the buffer " "isn't needed anymore. Failure to do so could lead to various issues such as " @@ -138,11 +144,17 @@ msgstr "" "tampon n'est plus nécessaire. Ne pas le faire peut conduire à divers " "problèmes tels que des fuites de ressources." -#: c-api/buffer.rst:69 +#: c-api/buffer.rst:64 +msgid "" +"The buffer protocol is now accessible in Python, see :ref:`python-buffer-" +"protocol` and :class:`memoryview`." +msgstr "" + +#: c-api/buffer.rst:70 msgid "Buffer structure" msgstr "La structure *buffer*" -#: c-api/buffer.rst:71 +#: c-api/buffer.rst:72 msgid "" "Buffer structures (or simply \"buffers\") are useful as a way to expose the " "binary data from another object to the Python programmer. They can also be " @@ -164,7 +176,7 @@ msgstr "" "être utilisé pour transmettre des données structurées dans son format natif " "en mémoire." -#: c-api/buffer.rst:80 +#: c-api/buffer.rst:81 msgid "" "Contrary to most data types exposed by the Python interpreter, buffers are " "not :c:type:`PyObject` pointers but rather simple C structures. This allows " @@ -179,14 +191,14 @@ msgstr "" "(*wrapper* en anglais) pour un tampon, un objet :ref:`memoryview ` peut être créé." -#: c-api/buffer.rst:86 +#: c-api/buffer.rst:87 msgid "" "For short instructions how to write an exporting object, see :ref:`Buffer " -"Object Structures `. For obtaining a buffer, see :c:func:" -"`PyObject_GetBuffer`." +"Object Structures `. For obtaining a buffer, " +"see :c:func:`PyObject_GetBuffer`." msgstr "" -#: c-api/buffer.rst:94 +#: c-api/buffer.rst:95 msgid "" "A pointer to the start of the logical structure described by the buffer " "fields. This can be any location within the underlying physical memory block " @@ -194,13 +206,13 @@ msgid "" "the value may point to the end of the memory block." msgstr "" -#: c-api/buffer.rst:99 +#: c-api/buffer.rst:100 msgid "" "For :term:`contiguous` arrays, the value points to the beginning of the " "memory block." msgstr "" -#: c-api/buffer.rst:104 +#: c-api/buffer.rst:105 msgid "" "A new reference to the exporting object. The reference is owned by the " "consumer and automatically released (i.e. reference count decremented) and " @@ -208,14 +220,14 @@ msgid "" "of the return value of any standard C-API function." msgstr "" -#: c-api/buffer.rst:111 +#: c-api/buffer.rst:112 msgid "" -"As a special case, for *temporary* buffers that are wrapped by :c:func:" -"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " -"``NULL``. In general, exporting objects MUST NOT use this scheme." +"As a special case, for *temporary* buffers that are wrapped " +"by :c:func:`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this " +"field is ``NULL``. In general, exporting objects MUST NOT use this scheme." msgstr "" -#: c-api/buffer.rst:118 +#: c-api/buffer.rst:119 msgid "" "``product(shape) * itemsize``. For contiguous arrays, this is the length of " "the underlying memory block. For non-contiguous arrays, it is the length " @@ -223,104 +235,107 @@ msgid "" "representation." msgstr "" -#: c-api/buffer.rst:123 +#: c-api/buffer.rst:124 msgid "" "Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if " "the buffer has been obtained by a request that guarantees contiguity. In " -"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:" -"`PyBUF_WRITABLE`." +"most cases such a request will be :c:macro:`PyBUF_SIMPLE` " +"or :c:macro:`PyBUF_WRITABLE`." msgstr "" -#: c-api/buffer.rst:129 +#: c-api/buffer.rst:130 msgid "" "An indicator of whether the buffer is read-only. This field is controlled by " "the :c:macro:`PyBUF_WRITABLE` flag." msgstr "" -#: c-api/buffer.rst:134 +#: c-api/buffer.rst:135 msgid "" -"Item size in bytes of a single element. Same as the value of :func:`struct." -"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values." +"Item size in bytes of a single element. Same as the value " +"of :func:`struct.calcsize` called on non-" +"``NULL`` :c:member:`~Py_buffer.format` values." msgstr "" -#: c-api/buffer.rst:137 +#: c-api/buffer.rst:138 msgid "" -"Important exception: If a consumer requests a buffer without the :c:macro:" -"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to " -"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the " -"original format." +"Important exception: If a consumer requests a buffer without " +"the :c:macro:`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set " +"to ``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for " +"the original format." msgstr "" -#: c-api/buffer.rst:142 +#: c-api/buffer.rst:143 msgid "" "If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * " -"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer." -"itemsize` to navigate the buffer." +"itemsize == len`` still holds and the consumer can " +"use :c:member:`~Py_buffer.itemsize` to navigate the buffer." msgstr "" -#: c-api/buffer.rst:146 +#: c-api/buffer.rst:147 msgid "" -"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:" -"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must " -"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." +"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of " +"a :c:macro:`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the " +"consumer must disregard :c:member:`~Py_buffer.itemsize` and assume " +"``itemsize == 1``." msgstr "" -#: c-api/buffer.rst:152 +#: c-api/buffer.rst:153 msgid "" "A *NULL* terminated string in :mod:`struct` module style syntax describing " "the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " "bytes) is assumed." msgstr "" -#: c-api/buffer.rst:156 +#: c-api/buffer.rst:157 msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." msgstr "" -#: c-api/buffer.rst:160 +#: c-api/buffer.rst:161 msgid "" "The number of dimensions the memory represents as an n-dimensional array. If " "it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " -"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." -"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. The maximum " -"number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." +"a scalar. In this " +"case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides` " +"and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. The maximum number " +"of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." msgstr "" -#: c-api/buffer.rst:168 +#: c-api/buffer.rst:169 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " "indicating the shape of the memory as an n-dimensional array. Note that " -"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:" -"`~Py_buffer.len`." +"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal " +"to :c:member:`~Py_buffer.len`." msgstr "" -#: c-api/buffer.rst:173 +#: c-api/buffer.rst:174 msgid "" "Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " "requires special attention. See `complex arrays`_ for further information." msgstr "" -#: c-api/buffer.rst:177 +#: c-api/buffer.rst:178 msgid "The shape array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:181 +#: c-api/buffer.rst:182 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " "giving the number of bytes to skip to get to a new element in each dimension." msgstr "" -#: c-api/buffer.rst:185 +#: c-api/buffer.rst:186 msgid "" "Stride values can be any integer. For regular arrays, strides are usually " "positive, but a consumer MUST be able to handle the case ``strides[n] <= " "0``. See `complex arrays`_ for further information." msgstr "" -#: c-api/buffer.rst:189 +#: c-api/buffer.rst:190 msgid "The strides array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:193 +#: c-api/buffer.rst:194 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If " "``suboffsets[n] >= 0``, the values stored along the nth dimension are " @@ -329,24 +344,24 @@ msgid "" "that no de-referencing should occur (striding in a contiguous memory block)." msgstr "" -#: c-api/buffer.rst:200 +#: c-api/buffer.rst:201 msgid "" "If all suboffsets are negative (i.e. no de-referencing is needed), then this " "field must be ``NULL`` (the default value)." msgstr "" -#: c-api/buffer.rst:203 +#: c-api/buffer.rst:204 msgid "" "This type of array representation is used by the Python Imaging Library " "(PIL). See `complex arrays`_ for further information how to access elements " "of such an array." msgstr "" -#: c-api/buffer.rst:207 +#: c-api/buffer.rst:208 msgid "The suboffsets array is read-only for the consumer." msgstr "" -#: c-api/buffer.rst:211 +#: c-api/buffer.rst:212 msgid "" "This is for use internally by the exporting object. For example, this might " "be re-cast as an integer by the exporter and used to store flags about " @@ -354,22 +369,22 @@ msgid "" "the buffer is released. The consumer MUST NOT alter this value." msgstr "" -#: c-api/buffer.rst:218 +#: c-api/buffer.rst:219 msgid "Constants:" msgstr "" -#: c-api/buffer.rst:222 +#: c-api/buffer.rst:223 msgid "" "The maximum number of dimensions the memory represents. Exporters MUST " "respect this limit, consumers of multi-dimensional buffers SHOULD be able to " "handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64." msgstr "" -#: c-api/buffer.rst:231 +#: c-api/buffer.rst:232 msgid "Buffer request types" msgstr "" -#: c-api/buffer.rst:233 +#: c-api/buffer.rst:234 msgid "" "Buffers are usually obtained by sending a buffer request to an exporting " "object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical " @@ -377,28 +392,27 @@ msgid "" "argument to specify the exact buffer type it can handle." msgstr "" -#: c-api/buffer.rst:238 +#: c-api/buffer.rst:239 msgid "" "All :c:type:`Py_buffer` fields are unambiguously defined by the request type." msgstr "" -#: c-api/buffer.rst:242 +#: c-api/buffer.rst:243 msgid "request-independent fields" msgstr "" -#: c-api/buffer.rst:243 +#: c-api/buffer.rst:244 msgid "" "The following fields are not influenced by *flags* and must always be filled " -"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:" -"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." -"itemsize`, :c:member:`~Py_buffer.ndim`." +"in with the correct " +"values: :c:member:`~Py_buffer.obj`, :c:member:`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`." msgstr "" -#: c-api/buffer.rst:248 +#: c-api/buffer.rst:249 msgid "readonly, format" msgstr "" -#: c-api/buffer.rst:252 +#: c-api/buffer.rst:253 msgid "" "Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " "MUST provide a writable buffer or else report failure. Otherwise, the " @@ -407,180 +421,185 @@ msgid "" "PyBUF_WRITABLE` can be used to request a simple writable buffer." msgstr "" -#: c-api/buffer.rst:260 +#: c-api/buffer.rst:261 +msgid "This is an alias to :c:macro:`PyBUF_WRITABLE`." +msgstr "" + +#: c-api/buffer.rst:267 msgid "" "Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " "filled in correctly. Otherwise, this field MUST be ``NULL``." msgstr "" -#: c-api/buffer.rst:264 +#: c-api/buffer.rst:271 msgid "" ":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next " -"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:" -"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple " -"writable buffer." +"section. Since :c:macro:`PyBUF_SIMPLE` is defined as " +"0, :c:macro:`PyBUF_WRITABLE` can be used as a stand-alone flag to request a " +"simple writable buffer." msgstr "" -#: c-api/buffer.rst:268 +#: c-api/buffer.rst:275 msgid "" -":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:" -"`PyBUF_SIMPLE`, because the latter already implies format ``B`` (unsigned " -"bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own." +":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags " +"except :c:macro:`PyBUF_SIMPLE`, because the latter already implies format " +"``B`` (unsigned bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own." msgstr "" -#: c-api/buffer.rst:274 +#: c-api/buffer.rst:281 msgid "shape, strides, suboffsets" msgstr "" -#: c-api/buffer.rst:276 +#: c-api/buffer.rst:283 msgid "" "The flags that control the logical structure of the memory are listed in " "decreasing order of complexity. Note that each flag contains all bits of the " "flags below it." msgstr "" -#: c-api/buffer.rst:307 c-api/buffer.rst:332 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "Request" msgstr "" -#: c-api/buffer.rst:307 c-api/buffer.rst:332 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "shape" msgstr "" -#: c-api/buffer.rst:307 c-api/buffer.rst:332 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "strides" msgstr "" -#: c-api/buffer.rst:307 c-api/buffer.rst:332 +#: c-api/buffer.rst:314 c-api/buffer.rst:339 msgid "suboffsets" msgstr "" -#: c-api/buffer.rst:287 c-api/buffer.rst:309 c-api/buffer.rst:313 -#: c-api/buffer.rst:334 c-api/buffer.rst:338 c-api/buffer.rst:342 -#: c-api/buffer.rst:346 c-api/buffer.rst:348 +#: c-api/buffer.rst:294 c-api/buffer.rst:316 c-api/buffer.rst:320 +#: c-api/buffer.rst:341 c-api/buffer.rst:345 c-api/buffer.rst:349 +#: c-api/buffer.rst:353 c-api/buffer.rst:355 msgid "yes" msgstr "oui" -#: c-api/buffer.rst:334 c-api/buffer.rst:336 +#: c-api/buffer.rst:341 c-api/buffer.rst:343 msgid "if needed" msgstr "si nécessaire" -#: c-api/buffer.rst:289 c-api/buffer.rst:309 c-api/buffer.rst:313 -#: c-api/buffer.rst:338 c-api/buffer.rst:342 c-api/buffer.rst:346 -#: c-api/buffer.rst:348 +#: c-api/buffer.rst:296 c-api/buffer.rst:316 c-api/buffer.rst:320 +#: c-api/buffer.rst:345 c-api/buffer.rst:349 c-api/buffer.rst:353 +#: c-api/buffer.rst:355 msgid "NULL" msgstr "" -#: c-api/buffer.rst:298 +#: c-api/buffer.rst:305 msgid "contiguity requests" msgstr "" -#: c-api/buffer.rst:300 +#: c-api/buffer.rst:307 msgid "" "C or Fortran :term:`contiguity ` can be explicitly requested, " "with and without stride information. Without stride information, the buffer " "must be C-contiguous." msgstr "" -#: c-api/buffer.rst:332 +#: c-api/buffer.rst:339 msgid "contig" msgstr "" -#: c-api/buffer.rst:315 c-api/buffer.rst:348 +#: c-api/buffer.rst:322 c-api/buffer.rst:355 msgid "C" msgstr "C" -#: c-api/buffer.rst:311 +#: c-api/buffer.rst:318 msgid "F" msgstr "F" -#: c-api/buffer.rst:313 +#: c-api/buffer.rst:320 msgid "C or F" msgstr "" -#: c-api/buffer.rst:315 +#: c-api/buffer.rst:322 msgid ":c:macro:`PyBUF_ND`" msgstr "" -#: c-api/buffer.rst:320 +#: c-api/buffer.rst:327 msgid "compound requests" msgstr "" -#: c-api/buffer.rst:322 +#: c-api/buffer.rst:329 msgid "" "All possible requests are fully defined by some combination of the flags in " "the previous section. For convenience, the buffer protocol provides " "frequently used combinations as single flags." msgstr "" -#: c-api/buffer.rst:326 +#: c-api/buffer.rst:333 msgid "" "In the following table *U* stands for undefined contiguity. The consumer " "would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." msgstr "" -#: c-api/buffer.rst:332 +#: c-api/buffer.rst:339 msgid "readonly" msgstr "lecture seule" -#: c-api/buffer.rst:332 +#: c-api/buffer.rst:339 msgid "format" msgstr "format" -#: c-api/buffer.rst:336 c-api/buffer.rst:340 c-api/buffer.rst:344 +#: c-api/buffer.rst:343 c-api/buffer.rst:347 c-api/buffer.rst:351 msgid "U" msgstr "" -#: c-api/buffer.rst:338 c-api/buffer.rst:346 +#: c-api/buffer.rst:345 c-api/buffer.rst:353 msgid "0" msgstr "0" -#: c-api/buffer.rst:340 c-api/buffer.rst:348 +#: c-api/buffer.rst:347 c-api/buffer.rst:355 msgid "1 or 0" msgstr "0 ou 1" -#: c-api/buffer.rst:353 +#: c-api/buffer.rst:360 msgid "Complex arrays" msgstr "" -#: c-api/buffer.rst:356 +#: c-api/buffer.rst:363 msgid "NumPy-style: shape and strides" msgstr "" -#: c-api/buffer.rst:358 +#: c-api/buffer.rst:365 msgid "" -"The logical structure of NumPy-style arrays is defined by :c:member:" -"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer." -"shape` and :c:member:`~Py_buffer.strides`." +"The logical structure of NumPy-style arrays is defined " +"by :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer.shape` " +"and :c:member:`~Py_buffer.strides`." msgstr "" -#: c-api/buffer.rst:361 +#: c-api/buffer.rst:368 msgid "" -"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer." -"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In " -"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer." -"strides` are ``NULL``." +"If ``ndim == 0``, the memory location pointed to " +"by :c:member:`~Py_buffer.buf` is interpreted as a scalar of " +"size :c:member:`~Py_buffer.itemsize`. In that case, " +"both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides` are " +"``NULL``." msgstr "" -#: c-api/buffer.rst:365 +#: c-api/buffer.rst:372 msgid "" "If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a " "standard n-dimensional C-array. Otherwise, the consumer must access an n-" "dimensional array as follows:" msgstr "" -#: c-api/buffer.rst:375 +#: c-api/buffer.rst:382 msgid "" "As noted above, :c:member:`~Py_buffer.buf` can point to any location within " "the actual memory block. An exporter can check the validity of a buffer with " "this function:" msgstr "" -#: c-api/buffer.rst:409 +#: c-api/buffer.rst:416 msgid "PIL-style: shape, strides and suboffsets" msgstr "" -#: c-api/buffer.rst:411 +#: c-api/buffer.rst:418 msgid "" "In addition to the regular items, PIL-style arrays can contain pointers that " "must be followed in order to get to the next element in a dimension. For " @@ -591,32 +610,32 @@ msgid "" "x[2][3]`` arrays that can be located anywhere in memory." msgstr "" -#: c-api/buffer.rst:420 +#: c-api/buffer.rst:427 msgid "" "Here is a function that returns a pointer to the element in an N-D array " "pointed to by an N-dimensional index when there are both non-``NULL`` " "strides and suboffsets::" msgstr "" -#: c-api/buffer.rst:439 +#: c-api/buffer.rst:446 msgid "Buffer-related functions" msgstr "Fonctions relatives aux tampons" -#: c-api/buffer.rst:443 +#: c-api/buffer.rst:450 msgid "" "Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " "``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " "will succeed. This function always succeeds." msgstr "" -#: c-api/buffer.rst:450 +#: c-api/buffer.rst:457 msgid "" "Send a request to *exporter* to fill in *view* as specified by *flags*. If " -"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:" -"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." +"the exporter cannot provide a buffer of the exact type, it MUST " +"raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/buffer.rst:455 +#: c-api/buffer.rst:462 msgid "" "On success, fill in *view*, set ``view->obj`` to a new reference to " "*exporter* and return 0. In the case of chained buffer providers that " @@ -624,15 +643,15 @@ msgid "" "instead of *exporter* (See :ref:`Buffer Object Structures `)." msgstr "" -#: c-api/buffer.rst:460 +#: c-api/buffer.rst:467 msgid "" "Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls " -"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:" -"`free`. Thus, after the consumer is done with the buffer, :c:func:" -"`PyBuffer_Release` must be called exactly once." +"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` " +"and :c:func:`free`. Thus, after the consumer is done with the " +"buffer, :c:func:`PyBuffer_Release` must be called exactly once." msgstr "" -#: c-api/buffer.rst:468 +#: c-api/buffer.rst:475 msgid "" "Release the buffer *view* and release the :term:`strong reference` (i.e. " "decrement the reference count) to the view's supporting object, ``view-" @@ -640,22 +659,23 @@ msgid "" "used, otherwise reference leaks may occur." msgstr "" -#: c-api/buffer.rst:473 +#: c-api/buffer.rst:480 msgid "" -"It is an error to call this function on a buffer that was not obtained via :" -"c:func:`PyObject_GetBuffer`." +"It is an error to call this function on a buffer that was not obtained " +"via :c:func:`PyObject_GetBuffer`." msgstr "" -#: c-api/buffer.rst:479 +#: c-api/buffer.rst:486 #, fuzzy msgid "" -"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" -"`~Py_buffer.format`. On error, raise an exception and return -1." +"Return the implied :c:member:`~Py_buffer.itemsize` " +"from :c:member:`~Py_buffer.format`. On error, raise an exception and return " +"-1." msgstr "" "Retourne l'\\ :c:data:`~Py_buffer.itemsize` du :c:data:`~Py_buffer.format`. " "En cas d'erreur, lève une exception et retourne -1." -#: c-api/buffer.rst:487 +#: c-api/buffer.rst:494 msgid "" "Return ``1`` if the memory defined by the *view* is C-style (*order* is " "``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either " @@ -663,69 +683,69 @@ msgid "" "succeeds." msgstr "" -#: c-api/buffer.rst:494 +#: c-api/buffer.rst:501 msgid "" "Get the memory area pointed to by the *indices* inside the given *view*. " "*indices* must point to an array of ``view->ndim`` indices." msgstr "" -#: c-api/buffer.rst:500 +#: c-api/buffer.rst:507 msgid "" -"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or " -"``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on " -"success, ``-1`` on error." +"Copy contiguous *len* bytes from *buf* to *view*. *order* can be ``'C'`` or " +"``'F'`` or ``'A'`` (for C-style or Fortran-style ordering or either one). " +"``0`` is returned on success, ``-1`` on error." msgstr "" -#: c-api/buffer.rst:507 +#: c-api/buffer.rst:515 msgid "" "Copy *len* bytes from *src* to its contiguous representation in *buf*. " "*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style " "ordering or either one). ``0`` is returned on success, ``-1`` on error." msgstr "" -#: c-api/buffer.rst:511 +#: c-api/buffer.rst:519 msgid "This function fails if *len* != *src->len*." msgstr "" -#: c-api/buffer.rst:516 +#: c-api/buffer.rst:524 msgid "" "Copy data from *src* to *dest* buffer. Can convert between C-style and or " "Fortran-style buffers." msgstr "" -#: c-api/buffer.rst:519 +#: c-api/buffer.rst:527 msgid "``0`` is returned on success, ``-1`` on error." msgstr "" -#: c-api/buffer.rst:523 +#: c-api/buffer.rst:531 msgid "" "Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style " "if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the " "given shape with the given number of bytes per element." msgstr "" -#: c-api/buffer.rst:530 +#: c-api/buffer.rst:538 msgid "" "Handle buffer requests for an exporter that wants to expose *buf* of size " "*len* with writability set according to *readonly*. *buf* is interpreted as " "a sequence of unsigned bytes." msgstr "" -#: c-api/buffer.rst:534 +#: c-api/buffer.rst:542 msgid "" "The *flags* argument indicates the request type. This function always fills " "in *view* as specified by flags, unless *buf* has been designated as read-" "only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." msgstr "" -#: c-api/buffer.rst:538 +#: c-api/buffer.rst:546 msgid "" "On success, set ``view->obj`` to a new reference to *exporter* and return 0. " "Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and " "return ``-1``;" msgstr "" -#: c-api/buffer.rst:542 +#: c-api/buffer.rst:550 msgid "" "If this function is used as part of a :ref:`getbufferproc `, " "*exporter* MUST be set to the exporting object and *flags* must be passed " diff --git a/c-api/bytearray.po b/c-api/bytearray.po index d4a4c0745..8e2c83d3a 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-05-05 14:32+0200\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" @@ -59,37 +59,43 @@ msgstr "Fonctions directes sur l'API" #: c-api/bytearray.rst:42 msgid "" -"Return a new bytearray object from any object, *o*, that implements the :ref:" -"`buffer protocol `." +"Return a new bytearray object from any object, *o*, that implements " +"the :ref:`buffer protocol `." msgstr "" "Renvoie un nouvel objet *bytearray* depuis n'importe quel objet, *o*, qui " "implémente le :ref:`protocole buffer `." -#: c-api/bytearray.rst:52 c-api/bytearray.rst:59 +#: c-api/bytearray.rst:56 c-api/bytearray.rst:63 msgid "On failure, return ``NULL`` with an exception set." msgstr "" -#: c-api/bytearray.rst:50 +#: c-api/bytearray.rst:66 +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytearray object is being created." +msgstr "" + +#: c-api/bytearray.rst:54 #, fuzzy msgid "Create a new bytearray object from *string* and its length, *len*." msgstr "" "Crée un nouvel objet ``bytearray`` à partir d'un objet *string* et de sa " "longueur, *len*. En cas d'échec, ``NULL`` est renvoyé." -#: c-api/bytearray.rst:57 +#: c-api/bytearray.rst:61 msgid "" "Concat bytearrays *a* and *b* and return a new bytearray with the result." msgstr "" "Concatène les ``bytearrays`` *a* et *b* et renvoie un nouveau ``bytearray`` " "avec le résultat." -#: c-api/bytearray.rst:64 +#: c-api/bytearray.rst:72 msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." msgstr "" "Renvoie la taille de *bytearray* après vérification de la présence d'un " "pointeur ``NULL``." -#: c-api/bytearray.rst:69 +#: c-api/bytearray.rst:77 msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." @@ -98,26 +104,40 @@ msgstr "" "vérifiant que ce n'est pas un pointeur ``NULL``. Le tableau renvoyé a " "toujours un caractère *null* rajouté." -#: c-api/bytearray.rst:76 -msgid "Resize the internal buffer of *bytearray* to *len*." +#: c-api/bytearray.rst:104 +msgid "" +"It is not thread-safe to mutate the bytearray object while using the " +"returned char array." +msgstr "" + +#: c-api/bytearray.rst:87 +#, fuzzy +msgid "" +"Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` " +"return with an exception set." msgstr "Redimensionne le tampon interne de *bytearray* à la taille *len*." -#: c-api/bytearray.rst:79 +#: c-api/bytearray.rst:90 +msgid "" +"A negative *len* will now result in an exception being set and -1 returned." +msgstr "" + +#: c-api/bytearray.rst:95 msgid "Macros" msgstr "Macros" -#: c-api/bytearray.rst:81 +#: c-api/bytearray.rst:97 msgid "These macros trade safety for speed and they don't check pointers." msgstr "" "Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les " "pointeurs." -#: c-api/bytearray.rst:85 +#: c-api/bytearray.rst:101 #, fuzzy msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." msgstr "Version macro de :c:func:`PyByteArray_AsString`." -#: c-api/bytearray.rst:90 +#: c-api/bytearray.rst:109 msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." msgstr "" diff --git a/c-api/bytes.po b/c-api/bytes.po index ef66badcf..07e385e9f 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-07-03 11:50+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -71,7 +71,13 @@ msgid "" "of the bytes object are uninitialized." msgstr "" -#: c-api/bytes.rst:53 +#: c-api/bytes.rst:50 +msgid "" +"Use the :c:type:`PyBytesWriter` API instead of " +"``PyBytes_FromStringAndSize(NULL, len)``." +msgstr "" + +#: c-api/bytes.rst:57 msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python bytes object and " @@ -81,215 +87,221 @@ msgid "" "allowed:" msgstr "" -#: c-api/bytes.rst:65 +#: c-api/bytes.rst:69 msgid "Format Characters" msgstr "Caractères de format" -#: c-api/bytes.rst:65 +#: c-api/bytes.rst:69 msgid "Type" msgstr "Type" -#: c-api/bytes.rst:65 +#: c-api/bytes.rst:69 #, fuzzy msgid "Comment" msgstr "Commentaires" -#: c-api/bytes.rst:67 +#: c-api/bytes.rst:71 msgid "``%%``" msgstr "``%%``" -#: c-api/bytes.rst:67 +#: c-api/bytes.rst:71 msgid "*n/a*" msgstr "" -#: c-api/bytes.rst:67 +#: c-api/bytes.rst:71 msgid "The literal % character." msgstr "" -#: c-api/bytes.rst:69 +#: c-api/bytes.rst:73 msgid "``%c``" msgstr "``%c``" -#: c-api/bytes.rst:72 c-api/bytes.rst:93 +#: c-api/bytes.rst:76 c-api/bytes.rst:97 msgid "int" msgstr "*int*" -#: c-api/bytes.rst:69 +#: c-api/bytes.rst:73 msgid "A single byte, represented as a C int." msgstr "" -#: c-api/bytes.rst:72 +#: c-api/bytes.rst:76 msgid "``%d``" msgstr "``%d``" -#: c-api/bytes.rst:72 +#: c-api/bytes.rst:76 msgid "Equivalent to ``printf(\"%d\")``. [1]_" msgstr "" -#: c-api/bytes.rst:75 +#: c-api/bytes.rst:79 msgid "``%u``" msgstr "``%u``" -#: c-api/bytes.rst:75 +#: c-api/bytes.rst:79 msgid "unsigned int" msgstr "``unsigned int``" -#: c-api/bytes.rst:75 +#: c-api/bytes.rst:79 msgid "Equivalent to ``printf(\"%u\")``. [1]_" msgstr "" -#: c-api/bytes.rst:78 +#: c-api/bytes.rst:82 msgid "``%ld``" msgstr "" -#: c-api/bytes.rst:78 +#: c-api/bytes.rst:82 msgid "long" msgstr "" -#: c-api/bytes.rst:78 +#: c-api/bytes.rst:82 msgid "Equivalent to ``printf(\"%ld\")``. [1]_" msgstr "" -#: c-api/bytes.rst:81 +#: c-api/bytes.rst:85 msgid "``%lu``" msgstr "" -#: c-api/bytes.rst:81 +#: c-api/bytes.rst:85 msgid "unsigned long" msgstr "``unsigned long``" -#: c-api/bytes.rst:81 +#: c-api/bytes.rst:85 msgid "Equivalent to ``printf(\"%lu\")``. [1]_" msgstr "" -#: c-api/bytes.rst:84 +#: c-api/bytes.rst:88 msgid "``%zd``" msgstr "" -#: c-api/bytes.rst:84 -msgid ":c:type:`\\ Py_ssize_t`" +#: c-api/bytes.rst:88 +msgid ":c:type:` Py_ssize_t`" msgstr "" -#: c-api/bytes.rst:84 +#: c-api/bytes.rst:88 msgid "Equivalent to ``printf(\"%zd\")``. [1]_" msgstr "" -#: c-api/bytes.rst:87 +#: c-api/bytes.rst:91 msgid "``%zu``" msgstr "" -#: c-api/bytes.rst:87 +#: c-api/bytes.rst:91 msgid "size_t" msgstr "" -#: c-api/bytes.rst:87 +#: c-api/bytes.rst:91 msgid "Equivalent to ``printf(\"%zu\")``. [1]_" msgstr "" -#: c-api/bytes.rst:90 +#: c-api/bytes.rst:94 msgid "``%i``" msgstr "``%i``" -#: c-api/bytes.rst:90 +#: c-api/bytes.rst:94 msgid "Equivalent to ``printf(\"%i\")``. [1]_" msgstr "" -#: c-api/bytes.rst:93 +#: c-api/bytes.rst:97 msgid "``%x``" msgstr "``%x``" -#: c-api/bytes.rst:93 +#: c-api/bytes.rst:97 msgid "Equivalent to ``printf(\"%x\")``. [1]_" msgstr "" -#: c-api/bytes.rst:96 +#: c-api/bytes.rst:100 msgid "``%s``" msgstr "``%s``" -#: c-api/bytes.rst:96 +#: c-api/bytes.rst:100 msgid "const char\\*" msgstr "" -#: c-api/bytes.rst:96 +#: c-api/bytes.rst:100 msgid "A null-terminated C character array." msgstr "" -#: c-api/bytes.rst:99 +#: c-api/bytes.rst:103 msgid "``%p``" msgstr "``%p``" -#: c-api/bytes.rst:99 +#: c-api/bytes.rst:103 msgid "const void\\*" msgstr "" -#: c-api/bytes.rst:99 +#: c-api/bytes.rst:103 msgid "" "The hex representation of a C pointer. Mostly equivalent to " "``printf(\"%p\")`` except that it is guaranteed to start with the literal " "``0x`` regardless of what the platform's ``printf`` yields." msgstr "" -#: c-api/bytes.rst:108 +#: c-api/bytes.rst:112 msgid "" "An unrecognized format character causes all the rest of the format string to " "be copied as-is to the result object, and any extra arguments discarded." msgstr "" -#: c-api/bytes.rst:111 +#: c-api/bytes.rst:115 msgid "" "For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " "has effect even when a precision is given." msgstr "" -#: c-api/bytes.rst:117 +#: c-api/bytes.rst:121 msgid "" "Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " "arguments." msgstr "" -#: c-api/bytes.rst:123 +#: c-api/bytes.rst:127 msgid "" "Return the bytes representation of object *o* that implements the buffer " "protocol." msgstr "" -#: c-api/bytes.rst:129 +#: c-api/bytes.rst:131 +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytes object is being created." +msgstr "" + +#: c-api/bytes.rst:137 msgid "Return the length of the bytes in bytes object *o*." msgstr "" -#: c-api/bytes.rst:134 +#: c-api/bytes.rst:142 msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." msgstr "" -#: c-api/bytes.rst:139 +#: c-api/bytes.rst:147 msgid "" "Return a pointer to the contents of *o*. The pointer refers to the internal " "buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " "buffer is always null, regardless of whether there are any other null " "bytes. The data must not be modified in any way, unless the object was just " "created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " -"deallocated. If *o* is not a bytes object at all, :c:func:" -"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." +"deallocated. If *o* is not a bytes object at " +"all, :c:func:`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." msgstr "" -#: c-api/bytes.rst:151 +#: c-api/bytes.rst:159 msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." msgstr "" -#: c-api/bytes.rst:156 +#: c-api/bytes.rst:164 msgid "" "Return the null-terminated contents of the object *obj* through the output " "variables *buffer* and *length*. Returns ``0`` on success." msgstr "" -#: c-api/bytes.rst:160 +#: c-api/bytes.rst:168 msgid "" "If *length* is ``NULL``, the bytes object may not contain embedded null " "bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " "raised." msgstr "" -#: c-api/bytes.rst:164 +#: c-api/bytes.rst:172 msgid "" "The buffer refers to an internal buffer of *obj*, which includes an " "additional null byte at the end (not counted in *length*). The data must " @@ -299,13 +311,13 @@ msgid "" "returns ``-1`` and raises :exc:`TypeError`." msgstr "" -#: c-api/bytes.rst:171 +#: c-api/bytes.rst:179 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes object." msgstr "" -#: c-api/bytes.rst:178 +#: c-api/bytes.rst:186 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*; the caller will own the new reference. The reference " @@ -314,14 +326,49 @@ msgid "" "of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." msgstr "" -#: c-api/bytes.rst:187 +#: c-api/bytes.rst:203 +msgid "" +"If *newpart* implements the buffer protocol, then the buffer must not be " +"mutated while the new bytes object is being created." +msgstr "" + +#: c-api/bytes.rst:198 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" -#: c-api/bytes.rst:194 +#: c-api/bytes.rst:209 +msgid "Similar to ``sep.join(iterable)`` in Python." +msgstr "" + +#: c-api/bytes.rst:211 +msgid "" +"*sep* must be Python :class:`bytes` object. (Note " +"that :c:func:`PyUnicode_Join` accepts ``NULL`` separator and treats it as a " +"space, whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" +msgstr "" + +#: c-api/bytes.rst:216 +msgid "" +"*iterable* must be an iterable object yielding objects that implement " +"the :ref:`buffer protocol `." +msgstr "" + +#: c-api/bytes.rst:219 +msgid "" +"On success, return a new :class:`bytes` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/bytes.rst:225 +msgid "" +"If *iterable* objects implement the buffer protocol, then the buffers must " +"not be mutated while the new bytes object is being created." +msgstr "" + +#: c-api/bytes.rst:230 msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " @@ -333,6 +380,256 @@ msgid "" "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" +#: c-api/bytes.rst:241 +msgid "Use the :c:type:`PyBytesWriter` API instead." +msgstr "" + +#: c-api/bytes.rst:247 +msgid "" +"Get the string representation of *bytes*. This function is currently used to " +"implement :meth:`!bytes.__repr__` in Python." +msgstr "" + +#: c-api/bytes.rst:250 +msgid "" +"This function does not do type checking; it is undefined behavior to pass " +"*bytes* as a non-bytes object or ``NULL``." +msgstr "" + +#: c-api/bytes.rst:253 +msgid "" +"If *smartquotes* is true, the representation will use a double-quoted string " +"instead of single-quoted string when single-quotes are present in *bytes*. " +"For example, the byte string ``'Python'`` would be represented as " +"``b\"'Python'\"`` when *smartquotes* is true, or ``b'\\'Python\\''`` when it " +"is false." +msgstr "" + +#: c-api/bytes.rst:259 +msgid "" +"On success, this function returns a :term:`strong reference` to " +"a :class:`str` object containing the representation. On failure, this " +"returns ``NULL`` with an exception set." +msgstr "" + +#: c-api/bytes.rst:266 +msgid "" +"Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " +"must be the size of *s*." +msgstr "" + +#: c-api/bytes.rst:269 +msgid "" +"*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " +"If *errors* is ``NULL``, then ``\"strict\"`` is used by default." +msgstr "" + +#: c-api/bytes.rst:272 +msgid "" +"On success, this function returns a :term:`strong reference` to a " +"Python :class:`bytes` object containing the unescaped string. On failure, " +"this function returns ``NULL`` with an exception set." +msgstr "" + +#: c-api/bytes.rst:276 +msgid "*unicode* and *recode_encoding* are now unused." +msgstr "" + +#: c-api/bytes.rst:283 +msgid "PyBytesWriter" +msgstr "" + +#: c-api/bytes.rst:285 +#, fuzzy +msgid "" +"The :c:type:`PyBytesWriter` API can be used to create a " +"Python :class:`bytes` object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/bytes.rst:292 +msgid "A bytes writer instance." +msgstr "" + +#: c-api/bytes.rst:294 +msgid "" +"The API is **not thread safe**: a writer should only be used by a single " +"thread at the same time." +msgstr "" + +#: c-api/bytes.rst:297 +msgid "" +"The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " +"or :c:func:`PyBytesWriter_Discard` on error." +msgstr "" + +#: c-api/bytes.rst:302 +msgid "Create, Finish, Discard" +msgstr "" + +#: c-api/bytes.rst:306 +msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." +msgstr "" + +#: c-api/bytes.rst:308 +msgid "" +"If *size* is greater than zero, allocate *size* bytes, and set the writer " +"size to *size*. The caller is responsible to write *size* bytes " +"using :c:func:`PyBytesWriter_GetData`. This function does not overallocate." +msgstr "" + +#: c-api/bytes.rst:438 +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +#: c-api/bytes.rst:414 +msgid "*size* must be positive or zero." +msgstr "" + +#: c-api/bytes.rst:319 +msgid "" +"Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +#: c-api/bytes.rst:322 +msgid "" +"On success, return a Python :class:`bytes` object. On error, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/bytes.rst:325 +msgid "" +"The writer instance is invalid after the call in any case. No API can be " +"called on the writer after :c:func:`PyBytesWriter_Finish`." +msgstr "" + +#: c-api/bytes.rst:330 +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " +"bytes before creating the :class:`bytes` object." +msgstr "" + +#: c-api/bytes.rst:335 +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " +"pointer before creating the :class:`bytes` object." +msgstr "" + +#: c-api/bytes.rst:338 +msgid "" +"Set an exception and return ``NULL`` if *buf* pointer is outside the " +"internal buffer bounds." +msgstr "" + +#: c-api/bytes.rst:442 +msgid "Function pseudo-code::" +msgstr "" + +#: c-api/bytes.rst:348 +msgid "" +"Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +#: c-api/bytes.rst:350 +msgid "Do nothing if *writer* is ``NULL``." +msgstr "" + +#: c-api/bytes.rst:352 +msgid "" +"The writer instance is invalid after the call. No API can be called on the " +"writer after :c:func:`PyBytesWriter_Discard`." +msgstr "" + +#: c-api/bytes.rst:356 +msgid "High-level API" +msgstr "" + +#: c-api/bytes.rst:360 +msgid "" +"Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " +"*bytes* at the *writer* end, and add *size* to the *writer* size." +msgstr "" + +#: c-api/bytes.rst:364 +msgid "" +"If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " +"length." +msgstr "" + +#: c-api/bytes.rst:376 c-api/bytes.rst:424 +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +#: c-api/bytes.rst:372 +msgid "" +"Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " +"the writer end. Grow the writer internal buffer on demand. Then add the " +"written size to the writer size." +msgstr "" + +#: c-api/bytes.rst:381 +msgid "Getters" +msgstr "" + +#: c-api/bytes.rst:385 +msgid "Get the writer size." +msgstr "" + +#: c-api/bytes.rst:396 +msgid "The function cannot fail." +msgstr "" + +#: c-api/bytes.rst:391 +msgid "Get the writer data: start of the internal buffer." +msgstr "" + +#: c-api/bytes.rst:393 +msgid "" +"The pointer is valid until :c:func:`PyBytesWriter_Finish` " +"or :c:func:`PyBytesWriter_Discard` is called on *writer*." +msgstr "" + +#: c-api/bytes.rst:400 +msgid "Low-level API" +msgstr "" + +#: c-api/bytes.rst:404 +msgid "" +"Resize the writer to *size* bytes. It can be used to enlarge or to shrink " +"the writer. This function typically overallocates to achieve amortized " +"performance when resizing multiple times." +msgstr "" + +#: c-api/bytes.rst:422 +msgid "Newly allocated bytes are left uninitialized." +msgstr "" + +#: c-api/bytes.rst:418 +msgid "" +"Resize the writer by adding *grow* bytes to the current writer size. This " +"function typically overallocates to achieve amortized performance when " +"resizing multiple times." +msgstr "" + +#: c-api/bytes.rst:427 +msgid "*size* can be negative to shrink the writer." +msgstr "" + +#: c-api/bytes.rst:431 +msgid "" +"Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." +msgstr "" + +#: c-api/bytes.rst:434 +msgid "" +"The *buf* pointer is moved if the internal buffer is moved in memory. The " +"*buf* relative position within the internal buffer is left unchanged." +msgstr "" + +#: c-api/bytes.rst:440 +msgid "*buf* must not be ``NULL``." +msgstr "" + #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/call.po b/c-api/call.po index 6fc84b375..772e63945 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2020-07-20 15:07+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -43,8 +43,9 @@ msgstr "" #: c-api/call.rst:25 msgid "" -"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." -"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." +"This convention is not only used by " +"*tp_call*: :c:member:`~PyTypeObject.tp_new` " +"and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." msgstr "" #: c-api/call.rst:29 @@ -67,18 +68,19 @@ msgstr "" msgid "" "As rule of thumb, CPython will prefer the vectorcall for internal calls if " "the callable supports it. However, this is not a hard rule. Additionally, " -"some third-party extensions use *tp_call* directly (rather than using :c:" -"func:`PyObject_Call`). Therefore, a class supporting vectorcall must also " -"implement :c:member:`~PyTypeObject.tp_call`. Moreover, the callable must " -"behave the same regardless of which protocol is used. The recommended way to " -"achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" -"`PyVectorcall_Call`. This bears repeating:" +"some third-party extensions use *tp_call* directly (rather than " +"using :c:func:`PyObject_Call`). Therefore, a class supporting vectorcall " +"must also implement :c:member:`~PyTypeObject.tp_call`. Moreover, the " +"callable must behave the same regardless of which protocol is used. The " +"recommended way to achieve this is by " +"setting :c:member:`~PyTypeObject.tp_call` to :c:func:`PyVectorcall_Call`. " +"This bears repeating:" msgstr "" #: c-api/call.rst:57 msgid "" -"A class supporting vectorcall **must** also implement :c:member:" -"`~PyTypeObject.tp_call` with the same semantics." +"A class supporting vectorcall **must** also " +"implement :c:member:`~PyTypeObject.tp_call` with the same semantics." msgstr "" #: c-api/call.rst:62 @@ -101,11 +103,11 @@ msgstr "" #: c-api/call.rst:74 msgid "" -"Classes can implement the vectorcall protocol by enabling the :c:macro:" -"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." -"tp_vectorcall_offset` to the offset inside the object structure where a " -"*vectorcallfunc* appears. This is a pointer to a function with the following " -"signature:" +"Classes can implement the vectorcall protocol by enabling " +"the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and " +"setting :c:member:`~PyTypeObject.tp_vectorcall_offset` to the offset inside " +"the object structure where a *vectorcallfunc* appears. This is a pointer to " +"a function with the following signature:" msgstr "" #: c-api/call.rst:82 @@ -180,8 +182,8 @@ msgstr "Contrôle de la récursion" #: c-api/call.rst:121 msgid "" "When using *tp_call*, callees do not need to worry about :ref:`recursion " -"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" -"`Py_LeaveRecursiveCall` for calls made using *tp_call*." +"`: CPython uses :c:func:`Py_EnterRecursiveCall` " +"and :c:func:`Py_LeaveRecursiveCall` for calls made using *tp_call*." msgstr "" #: c-api/call.rst:126 @@ -229,10 +231,10 @@ msgstr "" #: c-api/call.rst:164 msgid "" -"This is a specialized function, intended to be put in the :c:member:" -"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " -"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " -"not fall back to ``tp_call``." +"This is a specialized function, intended to be put in " +"the :c:member:`~PyTypeObject.tp_call` slot or be used in an implementation " +"of ``tp_call``. It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` " +"flag and it does not fall back to ``tp_call``." msgstr "" #: c-api/call.rst:175 @@ -386,7 +388,7 @@ msgid "" msgstr "" #: c-api/call.rst:237 c-api/call.rst:259 c-api/call.rst:291 c-api/call.rst:324 -#: c-api/call.rst:345 c-api/call.rst:392 +#: c-api/call.rst:345 c-api/call.rst:399 msgid "" "Return the result of the call on success, or raise an exception and return " "*NULL* on failure." @@ -431,8 +433,8 @@ msgstr "" #: c-api/call.rst:276 msgid "" -"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" -"`PyObject_CallFunctionObjArgs` is a faster alternative." +"Note that if you only pass :c:expr:`PyObject *` " +"args, :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative." msgstr "" #: c-api/call.rst:279 @@ -458,8 +460,8 @@ msgstr "" #: c-api/call.rst:297 msgid "" -"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" -"`PyObject_CallMethodObjArgs` is a faster alternative." +"Note that if you only pass :c:expr:`PyObject *` " +"args, :c:func:`PyObject_CallMethodObjArgs` is a faster alternative." msgstr "" #: c-api/call.rst:300 @@ -468,9 +470,9 @@ msgstr "" #: c-api/call.rst:306 msgid "" -"Call a callable Python object *callable*, with a variable number of :c:expr:" -"`PyObject *` arguments. The arguments are provided as a variable number of " -"parameters followed by *NULL*." +"Call a callable Python object *callable*, with a variable number " +"of :c:expr:`PyObject *` arguments. The arguments are provided as a variable " +"number of parameters followed by *NULL*." msgstr "" #: c-api/call.rst:313 @@ -500,21 +502,31 @@ msgid "" "*name*." msgstr "" -#: c-api/call.rst:353 +#: c-api/call.rst:355 msgid "" -"Call a callable Python object *callable*. The arguments are the same as for :" -"c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " -"calls the vectorcall function stored in *callable*." +"Call a callable Python object *callable*. The arguments are the same as " +"for :c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this " +"directly calls the vectorcall function stored in *callable*." msgstr "" -#: c-api/call.rst:365 +#: c-api/call.rst:363 +msgid "as ``_PyObject_Vectorcall``" +msgstr "" + +#: c-api/call.rst:367 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: c-api/call.rst:372 msgid "" "Call *callable* with positional arguments passed exactly as in the " "vectorcall_ protocol, but with keyword arguments passed as a dictionary " "*kwdict*. The *args* array contains only the positional arguments." msgstr "" -#: c-api/call.rst:369 +#: c-api/call.rst:376 msgid "" "Regardless of which protocol is used internally, a conversion of arguments " "needs to be done. Therefore, this function should only be used if the caller " @@ -522,29 +534,29 @@ msgid "" "tuple for the positional arguments." msgstr "" -#: c-api/call.rst:379 +#: c-api/call.rst:386 msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " "is *args[0]*, and the *args* array starting at *args[1]* represents the " "arguments of the call. There must be at least one positional argument. " -"*nargsf* is the number of positional arguments including *args[0]*, plus :c:" -"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " -"temporarily be changed. Keyword arguments can be passed just like in :c:func:" -"`PyObject_Vectorcall`." +"*nargsf* is the number of positional arguments including *args[0]*, " +"plus :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` " +"may temporarily be changed. Keyword arguments can be passed just like " +"in :c:func:`PyObject_Vectorcall`." msgstr "" -#: c-api/call.rst:388 +#: c-api/call.rst:395 msgid "" "If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" -#: c-api/call.rst:399 +#: c-api/call.rst:406 msgid "Call Support API" msgstr "" -#: c-api/call.rst:403 +#: c-api/call.rst:410 msgid "" "Determine if the object *o* is callable. Return ``1`` if the object is " "callable and ``0`` otherwise. This function always succeeds." diff --git a/c-api/capsule.po b/c-api/capsule.po index baa7eab3c..595c94fa7 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "" #: c-api/capsule.rst:17 msgid "" "This subtype of :c:type:`PyObject` represents an opaque value, useful for C " -"extension modules who need to pass an opaque value (as a :c:expr:`void*` " +"extension modules which need to pass an opaque value (as a :c:expr:`void*` " "pointer) through Python code to other C code. It is often used to make a C " "function pointer defined in one module available to other modules, so the " "regular import mechanism can be used to access C APIs defined in dynamically " @@ -36,58 +36,64 @@ msgid "" msgstr "" #: c-api/capsule.rst:27 +msgid "" +"The type object corresponding to capsule objects. This is the same object " +"as :class:`types.CapsuleType` in the Python layer." +msgstr "" + +#: c-api/capsule.rst:33 msgid "The type of a destructor callback for a capsule. Defined as::" msgstr "" -#: c-api/capsule.rst:31 +#: c-api/capsule.rst:37 msgid "" "See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " "callbacks." msgstr "" -#: c-api/capsule.rst:37 +#: c-api/capsule.rst:43 msgid "" "Return true if its argument is a :c:type:`PyCapsule`. This function always " "succeeds." msgstr "" -#: c-api/capsule.rst:43 +#: c-api/capsule.rst:49 msgid "" "Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " "argument may not be ``NULL``." msgstr "" -#: c-api/capsule.rst:46 +#: c-api/capsule.rst:52 msgid "On failure, set an exception and return ``NULL``." msgstr "" -#: c-api/capsule.rst:48 +#: c-api/capsule.rst:54 msgid "" "The *name* string may either be ``NULL`` or a pointer to a valid C string. " "If non-``NULL``, this string must outlive the capsule. (Though it is " "permitted to free it inside the *destructor*.)" msgstr "" -#: c-api/capsule.rst:52 +#: c-api/capsule.rst:58 msgid "" "If the *destructor* argument is not ``NULL``, it will be called with the " "capsule as its argument when it is destroyed." msgstr "" -#: c-api/capsule.rst:55 +#: c-api/capsule.rst:61 msgid "" "If this capsule will be stored as an attribute of a module, the *name* " "should be specified as ``modulename.attributename``. This will enable other " "modules to import the capsule using :c:func:`PyCapsule_Import`." msgstr "" -#: c-api/capsule.rst:62 +#: c-api/capsule.rst:68 msgid "" "Retrieve the *pointer* stored in the capsule. On failure, set an exception " "and return ``NULL``." msgstr "" -#: c-api/capsule.rst:65 +#: c-api/capsule.rst:71 msgid "" "The *name* parameter must compare exactly to the name stored in the capsule. " "If the name stored in the capsule is ``NULL``, the *name* passed in must " @@ -95,46 +101,46 @@ msgid "" "capsule names." msgstr "" -#: c-api/capsule.rst:73 +#: c-api/capsule.rst:79 msgid "" "Return the current destructor stored in the capsule. On failure, set an " "exception and return ``NULL``." msgstr "" -#: c-api/capsule.rst:76 +#: c-api/capsule.rst:82 msgid "" "It is legal for a capsule to have a ``NULL`` destructor. This makes a " -"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :" -"c:func:`PyErr_Occurred` to disambiguate." +"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " +"or :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/capsule.rst:83 +#: c-api/capsule.rst:89 msgid "" "Return the current context stored in the capsule. On failure, set an " "exception and return ``NULL``." msgstr "" -#: c-api/capsule.rst:86 +#: c-api/capsule.rst:92 msgid "" "It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` " -"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" -"`PyErr_Occurred` to disambiguate." +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " +"or :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/capsule.rst:93 +#: c-api/capsule.rst:99 msgid "" "Return the current name stored in the capsule. On failure, set an exception " "and return ``NULL``." msgstr "" -#: c-api/capsule.rst:96 +#: c-api/capsule.rst:102 msgid "" "It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` " -"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" -"`PyErr_Occurred` to disambiguate." +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " +"or :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/capsule.rst:103 +#: c-api/capsule.rst:109 msgid "" "Import a pointer to a C object from a capsule attribute in a module. The " "*name* parameter should specify the full name to the attribute, as in " @@ -142,17 +148,31 @@ msgid "" "string exactly." msgstr "" -#: c-api/capsule.rst:108 +#: c-api/capsule.rst:114 +msgid "" +"This function splits *name* on the ``.`` character, and imports the first " +"element. It then processes further elements using attribute lookups." +msgstr "" + +#: c-api/capsule.rst:117 msgid "" "Return the capsule's internal *pointer* on success. On failure, set an " "exception and return ``NULL``." msgstr "" -#: c-api/capsule.rst:111 +#: c-api/capsule.rst:122 +msgid "" +"If *name* points to an attribute of some submodule or subpackage, this " +"submodule or subpackage must be previously imported using other means (for " +"example, by using :c:func:`PyImport_ImportModule`) for the attribute lookups " +"to succeed." +msgstr "" + +#: c-api/capsule.rst:127 msgid "*no_block* has no effect anymore." msgstr "" -#: c-api/capsule.rst:117 +#: c-api/capsule.rst:133 msgid "" "Determines whether or not *capsule* is a valid capsule. A valid capsule is " "non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` " @@ -161,40 +181,40 @@ msgid "" "compared.)" msgstr "" -#: c-api/capsule.rst:123 +#: c-api/capsule.rst:139 msgid "" "In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " "to any of the accessors (any function starting with ``PyCapsule_Get``) are " "guaranteed to succeed." msgstr "" -#: c-api/capsule.rst:127 +#: c-api/capsule.rst:143 msgid "" "Return a nonzero value if the object is valid and matches the name passed " "in. Return ``0`` otherwise. This function will not fail." msgstr "" -#: c-api/capsule.rst:133 +#: c-api/capsule.rst:149 msgid "Set the context pointer inside *capsule* to *context*." msgstr "" -#: c-api/capsule.rst:142 c-api/capsule.rst:159 +#: c-api/capsule.rst:158 c-api/capsule.rst:175 msgid "" "Return ``0`` on success. Return nonzero and set an exception on failure." msgstr "" -#: c-api/capsule.rst:140 +#: c-api/capsule.rst:156 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "" -#: c-api/capsule.rst:147 +#: c-api/capsule.rst:163 msgid "" "Set the name inside *capsule* to *name*. If non-``NULL``, the name must " "outlive the capsule. If the previous *name* stored in the capsule was not " "``NULL``, no attempt is made to free it." msgstr "" -#: c-api/capsule.rst:156 +#: c-api/capsule.rst:172 msgid "" "Set the void pointer inside *capsule* to *pointer*. The pointer may not be " "``NULL``." diff --git a/c-api/cell.po b/c-api/cell.po index 05cb0aca5..377a219d8 100644 --- a/c-api/cell.po +++ b/c-api/cell.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-05-09 10:14+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -20,10 +20,11 @@ msgid "Cell Objects" msgstr "Objets Cellules" #: c-api/cell.rst:8 +#, fuzzy msgid "" "\"Cell\" objects are used to implement variables referenced by multiple " "scopes. For each such variable, a cell object is created to store the value; " -"the local variables of each stack frame that references the value contains a " +"the local variables of each stack frame that references the value contain a " "reference to the cells from outer scopes which also use that variable. When " "the value is accessed, the value contained in the cell is used instead of " "the cell object itself. This de-referencing of the cell object requires " diff --git a/c-api/code.po b/c-api/code.po index c430e25af..d03252802 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-02-15 00:30+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +18,7 @@ msgstr "" msgid "Code Objects" msgstr "Objets code" -#: c-api/code.rst:12 +#: c-api/code.rst:10 msgid "" "Code objects are a low-level detail of the CPython implementation. Each one " "represents a chunk of executable code that hasn't yet been bound into a " @@ -28,7 +28,7 @@ msgstr "" "Chacun d'eux représente une partie de code exécutable, qui n'a pas encore " "été lié dans une fonction." -#: c-api/code.rst:18 +#: c-api/code.rst:16 msgid "" "The C structure of the objects used to describe code objects. The fields of " "this type are subject to change at any time." @@ -36,56 +36,57 @@ msgstr "" "La structure C utilisée pour décrire les objets *Code*. Les attributs de " "cette structure sont sujets à changer à tout moment." -#: c-api/code.rst:24 +#: c-api/code.rst:22 #, fuzzy msgid "" -"This is an instance of :c:type:`PyTypeObject` representing the Python :ref:" -"`code object `." +"This is an instance of :c:type:`PyTypeObject` representing the " +"Python :ref:`code object `." msgstr "" -"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" -"class:`code`." +"C'est une instance de :c:type:`PyTypeObject` représentant le type " +"Python :class:`code`." -#: c-api/code.rst:30 +#: c-api/code.rst:28 #, fuzzy msgid "" "Return true if *co* is a :ref:`code object `. This function " "always succeeds." msgstr "Renvoie vrai si *co* est un objet :class:`code`." -#: c-api/code.rst:35 +#: c-api/code.rst:33 #, fuzzy msgid "" "Return the number of :term:`free (closure) variables ` in " "a code object." msgstr "Renvoie le nombre de variables libres dans *co*." -#: c-api/code.rst:40 +#: c-api/code.rst:38 #, fuzzy msgid "" "Return the position of the first :term:`free (closure) variable ` in a code object." msgstr "Renvoie le nombre de variables libres dans *co*." -#: c-api/code.rst:45 +#: c-api/code.rst:43 msgid "" "Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`. The " "old name is deprecated, but will remain available until the signature " "changes again." msgstr "" -#: c-api/code.rst:51 +#: c-api/code.rst:49 msgid "" "Return a new code object. If you need a dummy code object to create a " "frame, use :c:func:`PyCode_NewEmpty` instead." msgstr "" -#: c-api/code.rst:54 +#: c-api/code.rst:52 msgid "" -"Since the definition of the bytecode changes often, calling :c:func:" -"`PyUnstable_Code_New` directly can bind you to a precise Python version." +"Since the definition of the bytecode changes often, " +"calling :c:func:`PyUnstable_Code_New` directly can bind you to a precise " +"Python version." msgstr "" -#: c-api/code.rst:57 +#: c-api/code.rst:55 #, fuzzy msgid "" "The many arguments of this function are inter-dependent in complex ways, " @@ -93,42 +94,42 @@ msgid "" "execution or VM crashes. Use this function only with extreme care." msgstr "" "Renvoie un nouvel objet *code*. Si vous avez besoin d'un objet code factice " -"pour créer une *frame*, utilisez plutôt :c:func:`PyCode_NewEmpty`. Appeler :" -"c:func:`PyCode_New` peut vous lier directement à une version spécifique de " -"Python, le *bytecode* étant sujet à modifications." +"pour créer une *frame*, utilisez plutôt :c:func:`PyCode_NewEmpty`. " +"Appeler :c:func:`PyCode_New` peut vous lier directement à une version " +"spécifique de Python, le *bytecode* étant sujet à modifications." -#: c-api/code.rst:61 +#: c-api/code.rst:59 msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "" -#: c-api/code.rst:68 +#: c-api/code.rst:66 msgid "" "Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name " "is deprecated, but will remain available until the signature changes again." msgstr "" -#: c-api/code.rst:74 +#: c-api/code.rst:75 msgid "" "Similar to :c:func:`PyUnstable_Code_New`, but with an extra " "\"posonlyargcount\" for positional-only arguments. The same caveats that " "apply to ``PyUnstable_Code_New`` also apply to this function." msgstr "" -#: c-api/code.rst:79 +#: c-api/code.rst:78 msgid "as ``PyCode_NewWithPosOnlyArgs``" msgstr "" -#: c-api/code.rst:81 +#: c-api/code.rst:80 msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "" -#: c-api/code.rst:86 +#: c-api/code.rst:85 msgid "" "Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " "deprecated, but will remain available until the signature changes again." msgstr "" -#: c-api/code.rst:92 +#: c-api/code.rst:91 #, fuzzy msgid "" "Return a new empty code object with the specified filename, function name, " @@ -136,55 +137,56 @@ msgid "" "if executed." msgstr "" "Renvoie un nouvel objet *code* avec le nom de fichier, le nom de fonction, " -"et le numéro de première ligne donnés. Il n'est pas permis d'utiliser :func:" -"`exec` ou :func:`eval` sur l'objet renvoyé." +"et le numéro de première ligne donnés. Il n'est pas permis " +"d'utiliser :func:`exec` ou :func:`eval` sur l'objet renvoyé." -#: c-api/code.rst:98 +#: c-api/code.rst:97 msgid "" "Return the line number of the instruction that occurs on or before " "``byte_offset`` and ends after it. If you just need the line number of a " "frame, use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: c-api/code.rst:101 +#: c-api/code.rst:100 msgid "" -"For efficiently iterating over the line numbers in a code object, use :pep:" -"`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`." +"For efficiently iterating over the line numbers in a code object, " +"use :pep:`the API described in PEP 626 <0626#out-of-process-debuggers-and-" +"profilers>`." msgstr "" -#: c-api/code.rst:106 +#: c-api/code.rst:105 msgid "" "Sets the passed ``int`` pointers to the source code line and column numbers " "for the instruction at ``byte_offset``. Sets the value to ``0`` when " "information is not available for any particular element." msgstr "" -#: c-api/code.rst:110 +#: c-api/code.rst:109 msgid "Returns ``1`` if the function succeeds and 0 otherwise." msgstr "" -#: c-api/code.rst:116 +#: c-api/code.rst:115 msgid "" "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong " "reference to a :c:type:`PyBytesObject` representing the bytecode in a code " "object. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: c-api/code.rst:121 +#: c-api/code.rst:120 msgid "" "This ``PyBytesObject`` may be created on-demand by the interpreter and does " "not necessarily represent the bytecode actually executed by CPython. The " "primary use case for this function is debuggers and profilers." msgstr "" -#: c-api/code.rst:129 +#: c-api/code.rst:128 msgid "" "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " "variables. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: c-api/code.rst:138 +#: c-api/code.rst:137 msgid "" "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " @@ -192,15 +194,15 @@ msgid "" "returned and an exception is raised." msgstr "" -#: c-api/code.rst:147 +#: c-api/code.rst:146 msgid "" "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " -"reference to a :c:type:`PyTupleObject` containing the names of the :term:" -"`free (closure) variables `. On error, ``NULL`` is " -"returned and an exception is raised." +"reference to a :c:type:`PyTupleObject` containing the names of " +"the :term:`free (closure) variables `. On error, ``NULL`` " +"is returned and an exception is raised." msgstr "" -#: c-api/code.rst:156 +#: c-api/code.rst:155 msgid "" "Register *callback* as a code object watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case " @@ -208,33 +210,33 @@ msgid "" "exception." msgstr "" -#: c-api/code.rst:165 +#: c-api/code.rst:164 msgid "" -"Clear watcher identified by *watcher_id* previously returned from :c:func:" -"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or " -"``-1`` and set an exception on error (e.g. if the given *watcher_id* was " -"never registered.)" +"Clear watcher identified by *watcher_id* previously returned " +"from :c:func:`PyCode_AddWatcher` for the current interpreter. Return ``0`` " +"on success, or ``-1`` and set an exception on error (e.g. if the given " +"*watcher_id* was never registered.)" msgstr "" -#: c-api/code.rst:174 +#: c-api/code.rst:173 msgid "" "Enumeration of possible code object watcher events: - " "``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" msgstr "" -#: c-api/code.rst:182 +#: c-api/code.rst:181 msgid "Type of a code object watcher callback function." msgstr "" -#: c-api/code.rst:184 +#: c-api/code.rst:183 msgid "" "If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after " -"`co` has been fully initialized. Otherwise, the callback is invoked before " +"*co* has been fully initialized. Otherwise, the callback is invoked before " "the destruction of *co* takes place, so the prior state of *co* can be " "inspected." msgstr "" -#: c-api/code.rst:189 +#: c-api/code.rst:188 msgid "" "If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback " "to the about-to-be-destroyed code object will resurrect it and prevent it " @@ -242,7 +244,7 @@ msgid "" "later, any watcher callbacks active at that time will be called again." msgstr "" -#: c-api/code.rst:194 +#: c-api/code.rst:193 msgid "" "Users of this API should not rely on internal runtime implementation " "details. Such details may include, but are not limited to, the exact order " @@ -252,14 +254,14 @@ msgid "" "the Python code being executed." msgstr "" -#: c-api/code.rst:201 +#: c-api/code.rst:200 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " -"will be printed as an unraisable exception using :c:func:" -"`PyErr_WriteUnraisable`. Otherwise it should return ``0``." +"will be printed as an unraisable exception " +"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: c-api/code.rst:205 +#: c-api/code.rst:204 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -269,84 +271,205 @@ msgid "" msgstr "" #: c-api/code.rst:215 -msgid "Extra information" +msgid "This is a function that does nothing." msgstr "" #: c-api/code.rst:217 msgid "" +"Prior to Python 3.10, this function would perform basic optimizations to a " +"code object." +msgstr "" + +#: c-api/code.rst:220 +msgid "This function now does nothing." +msgstr "" + +#: c-api/code.rst:229 +#, fuzzy +msgid "Code Object Flags" +msgstr "Objets code" + +#: c-api/code.rst:231 +msgid "" +"Code objects contain a bit-field of flags, which can be retrieved as " +"the :attr:`~codeobject.co_flags` Python attribute (for example " +"using :c:func:`PyObject_GetAttrString`), and set using a *flags* argument " +"to :c:func:`PyUnstable_Code_New` and similar functions." +msgstr "" + +#: c-api/code.rst:236 +msgid "" +"Flags whose names start with ``CO_FUTURE_`` correspond to features normally " +"selectable by :ref:`future statements `. These flags can be used " +"in :c:member:`PyCompilerFlags.cf_flags`. Note that many ``CO_FUTURE_`` flags " +"are mandatory in current versions of Python, and setting them has no effect." +msgstr "" + +#: c-api/code.rst:242 +msgid "" +"The following flags are available. For their meaning, see the linked " +"documentation of their Python equivalents." +msgstr "" + +#: c-api/code.rst:250 +msgid "Flag" +msgstr "Option" + +#: c-api/code.rst:251 +msgid "Meaning" +msgstr "Signification" + +#: c-api/code.rst:253 +msgid ":py:data:`inspect.CO_OPTIMIZED`" +msgstr "" + +#: c-api/code.rst:255 +msgid ":py:data:`inspect.CO_NEWLOCALS`" +msgstr "" + +#: c-api/code.rst:257 +msgid ":py:data:`inspect.CO_VARARGS`" +msgstr "" + +#: c-api/code.rst:259 +msgid ":py:data:`inspect.CO_VARKEYWORDS`" +msgstr "" + +#: c-api/code.rst:261 +msgid ":py:data:`inspect.CO_NESTED`" +msgstr "" + +#: c-api/code.rst:263 +msgid ":py:data:`inspect.CO_GENERATOR`" +msgstr "" + +#: c-api/code.rst:265 +msgid ":py:data:`inspect.CO_COROUTINE`" +msgstr "" + +#: c-api/code.rst:267 +msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" +msgstr "" + +#: c-api/code.rst:269 +msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" +msgstr "" + +#: c-api/code.rst:271 +msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" +msgstr "" + +#: c-api/code.rst:273 +msgid ":py:data:`inspect.CO_METHOD`" +msgstr "" + +#: c-api/code.rst:276 +msgid "no effect (:py:data:`__future__.division`)" +msgstr "" + +#: c-api/code.rst:278 +msgid "no effect (:py:data:`__future__.absolute_import`)" +msgstr "" + +#: c-api/code.rst:280 +msgid "no effect (:py:data:`__future__.with_statement`)" +msgstr "" + +#: c-api/code.rst:282 +msgid "no effect (:py:data:`__future__.print_function`)" +msgstr "" + +#: c-api/code.rst:284 +msgid "no effect (:py:data:`__future__.unicode_literals`)" +msgstr "" + +#: c-api/code.rst:286 +msgid "no effect (:py:data:`__future__.generator_stop`)" +msgstr "" + +#: c-api/code.rst:288 +msgid ":py:data:`__future__.annotations`" +msgstr "" + +#: c-api/code.rst:292 +msgid "Extra information" +msgstr "" + +#: c-api/code.rst:294 +msgid "" "To support low-level extensions to frame evaluation, such as external just-" "in-time compilers, it is possible to attach arbitrary extra data to code " "objects." msgstr "" -#: c-api/code.rst:221 +#: c-api/code.rst:298 msgid "" "These functions are part of the unstable C API tier: this functionality is a " "CPython implementation detail, and the API may change without deprecation " "warnings." msgstr "" -#: c-api/code.rst:227 -msgid "Return a new an opaque index value used to adding data to code objects." +#: c-api/code.rst:307 +msgid "Return a new opaque index value used to adding data to code objects." msgstr "" -#: c-api/code.rst:229 +#: c-api/code.rst:309 msgid "" "You generally call this function once (per interpreter) and use the result " "with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on " "individual code objects." msgstr "" -#: c-api/code.rst:233 +#: c-api/code.rst:313 msgid "" "If *free* is not ``NULL``: when a code object is deallocated, *free* will be " -"called on non-``NULL`` data stored under the new index. Use :c:func:" -"`Py_DecRef` when storing :c:type:`PyObject`." +"called on non-``NULL`` data stored under the new index. " +"Use :c:func:`Py_DecRef` when storing :c:type:`PyObject`." msgstr "" -#: c-api/code.rst:239 +#: c-api/code.rst:317 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" -#: c-api/code.rst:243 +#: c-api/code.rst:321 msgid "" "Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " "is deprecated, but will be available until the API changes." msgstr "" -#: c-api/code.rst:249 +#: c-api/code.rst:330 msgid "" "Set *extra* to the extra data stored under the given index. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: c-api/code.rst:252 +#: c-api/code.rst:333 msgid "" "If no data was set under the index, set *extra* to ``NULL`` and return 0 " "without setting an exception." msgstr "" -#: c-api/code.rst:257 +#: c-api/code.rst:336 msgid "as ``_PyCode_GetExtra``" msgstr "" -#: c-api/code.rst:261 +#: c-api/code.rst:340 msgid "" "Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" -#: c-api/code.rst:267 +#: c-api/code.rst:349 msgid "" "Set the extra data stored under the given index to *extra*. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: c-api/code.rst:272 +#: c-api/code.rst:352 msgid "as ``_PyCode_SetExtra``" msgstr "" -#: c-api/code.rst:276 +#: c-api/code.rst:356 msgid "" "Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " "but will be available until the API changes." diff --git a/c-api/codec.po b/c-api/codec.po index dae30302a..320691b27 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -24,8 +24,9 @@ msgstr "" #: c-api/codec.rst:10 msgid "" -"As side effect, this tries to load the :mod:`!encodings` package, if not yet " -"done, to make sure that it is always first in the list of search functions." +"As a side effect, this tries to load the :mod:`!encodings` package, if not " +"yet done, to make sure that it is always first in the list of search " +"functions." msgstr "" #: c-api/codec.rst:15 @@ -49,8 +50,8 @@ msgstr "" msgid "" "*object* is passed through the encoder function found for the given " "*encoding* using the error handling method defined by *errors*. *errors* " -"may be ``NULL`` to use the default method defined for the codec. Raises a :" -"exc:`LookupError` if no encoder can be found." +"may be ``NULL`` to use the default method defined for the codec. Raises " +"a :exc:`LookupError` if no encoder can be found." msgstr "" #: c-api/codec.rst:37 @@ -61,8 +62,8 @@ msgstr "" msgid "" "*object* is passed through the decoder function found for the given " "*encoding* using the error handling method defined by *errors*. *errors* " -"may be ``NULL`` to use the default method defined for the codec. Raises a :" -"exc:`LookupError` if no encoder can be found." +"may be ``NULL`` to use the default method defined for the codec. Raises " +"a :exc:`LookupError` if no decoder can be found." msgstr "" #: c-api/codec.rst:46 @@ -73,8 +74,8 @@ msgstr "" msgid "" "In the following functions, the *encoding* string is looked up converted to " "all lower-case characters, which makes encodings looked up through this " -"mechanism effectively case-insensitive. If no codec is found, a :exc:" -"`KeyError` is set and ``NULL`` returned." +"mechanism effectively case-insensitive. If no codec is found, " +"a :exc:`KeyError` is set and ``NULL`` returned." msgstr "" #: c-api/codec.rst:55 @@ -121,9 +122,9 @@ msgstr "" #: c-api/codec.rst:88 msgid "" -"The callback gets a single argument, an instance of :exc:" -"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" -"`UnicodeTranslateError` that holds information about the problematic " +"The callback gets a single argument, an instance " +"of :exc:`UnicodeEncodeError`, :exc:`UnicodeDecodeError` " +"or :exc:`UnicodeTranslateError` that holds information about the problematic " "sequence of characters or bytes and their offset in the original string " "(see :ref:`unicodeexceptions` for functions to extract this information). " "The callback must either raise the given exception, or return a two-item " @@ -168,3 +169,13 @@ msgstr "" #: c-api/codec.rst:129 msgid "Replace the unicode encode error with ``\\N{...}`` escapes." msgstr "" + +#: c-api/codec.rst:135 +msgid "Codec utility variables" +msgstr "" + +#: c-api/codec.rst:139 +msgid "" +"A string constant containing the lowercase hexadecimal digits: " +"``\"0123456789abcdef\"``." +msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po index 1e7d5865f..16bb89cd0 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-01-14 20:31+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -19,252 +19,294 @@ msgstr "" msgid "Complex Number Objects" msgstr "Objets représentant des nombres complexes" -#: c-api/complex.rst:10 +#: c-api/complex.rst:13 msgid "" -"Python's complex number objects are implemented as two distinct types when " -"viewed from the C API: one is the Python object exposed to Python programs, " -"and the other is a C structure which represents the actual complex number " -"value. The API provides functions for working with both." +"This subtype of :c:type:`PyObject` represents a Python complex number object." msgstr "" -"Les nombres complexes Python sont implémentés comme deux types distincts, " -"lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel qu'il est vu " -"par les programmes Python, et l'autre est une structure C qui représente la " -"valeur exacte du nombre complexe. L'API fournit des fonctions pour " -"travailler avec ces deux représentations." +"Ce sous-type de l'objet :c:type:`PyObject` représente un nombre complexe en " +"Python." #: c-api/complex.rst:17 -msgid "Complex Numbers as C Structures" -msgstr "Nombres complexes en tant que structures C" - -#: c-api/complex.rst:19 -msgid "" -"Note that the functions which accept these structures as parameters and " -"return them as results do so *by value* rather than dereferencing them " -"through pointers. This is consistent throughout the API." -msgstr "" -"Les fonctions qui acceptent ces structures comme paramètres et les renvoient " -"comme résultats le font en fonction de leur *valeur* au lieu de les dé-" -"référencer en utilisant des pointeurs. C'est constant dans toute l'API." - -#: c-api/complex.rst:26 #, fuzzy msgid "" -"The C structure which corresponds to the value portion of a Python complex " -"number object. Most of the functions for dealing with complex number " -"objects use structures of this type as input or output values, as " -"appropriate." +"The complex number value, using the C :c:type:`Py_complex` representation." msgstr "" -"Structure C représentant la valeur d'un nombre complexe Python. La majorité " -"des fonctions qui traitent des nombres complexes utilisent cette structure " -"en entrée ou en sortie, selon le cas. Elle est définie par ::" +"Renvoie la somme de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:33 -msgid "The structure is defined as::" -msgstr "" - -#: c-api/complex.rst:43 +#: c-api/complex.rst:19 msgid "" -"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to " +"convert a Python complex number to/from the C :c:type:`Py_complex` " "representation." msgstr "" -"Renvoie la somme de deux nombres complexes, sous la forme d'un :c:type:" -"`Py_complex` en C." -#: c-api/complex.rst:49 +#: c-api/complex.rst:28 msgid "" -"Return the difference between two complex numbers, using the C :c:type:" -"`Py_complex` representation." +"This instance of :c:type:`PyTypeObject` represents the Python complex number " +"type. It is the same object as :class:`complex` in the Python layer." msgstr "" -"Renvoie la différence de deux nombres complexes, sous la forme d'un :c:type:" -"`Py_complex` en C." +"Cette instance de :c:type:`PyTypeObject` représente le type nombre complexe " +"Python. C'est le même objet que la classe :class:`complex` de la couche " +"Python." -#: c-api/complex.rst:55 +#: c-api/complex.rst:34 #, fuzzy msgid "" -"Return the negation of the complex number *num*, using the C :c:type:" -"`Py_complex` representation." +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype " +"of :c:type:`PyComplexObject`. This function always succeeds." msgstr "" -"Renvoie l'opposé du nombre complexe *complex*, sous la forme d'un :c:type:" -"`Py_complex` en C." +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject` ou un sous-" +"type de :c:type:`PyComplexObject`." -#: c-api/complex.rst:61 +#: c-api/complex.rst:40 +#, fuzzy msgid "" -"Return the product of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." msgstr "" -"Renvoie le produit de deux nombres complexes, sous la forme d'un :c:type:" -"`Py_complex` en C." +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject`, mais pas " +"un sous-type de :c:type:`PyComplexObject`." -#: c-api/complex.rst:67 +#: c-api/complex.rst:46 +#, fuzzy msgid "" -"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " +"``NULL`` with an exception set on error." msgstr "" -"Renvoie le quotient de deux nombres complexes, sous la forme d'un :c:type:" -"`Py_complex` en C." +"Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." -#: c-api/complex.rst:70 +#: c-api/complex.rst:52 +#, fuzzy +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "" +"Renvoie la partie réelle du nombre complexe *op* sous la forme " +"d'un :c:type:`double` en C." + +#: c-api/complex.rst:54 #, fuzzy msgid "" -"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" -"c:macro:`!EDOM`." +"If *op* is not a Python complex number object but has " +"a :meth:`~object.__complex__` method, this method will first be called to " +"convert *op* to a Python complex number object. If :meth:`!__complex__` is " +"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and " +"returns its result." msgstr "" -"Si *divisor* est nul, cette méthode renvoie zéro et assigne :c:data:`EDOM` " -"à :c:data:`errno`." +"Si *op* n'est pas un nombre complexe Python mais a une " +"méthode :meth:`__complex__`, cette méthode est d'abord appelée pour " +"convertir *op* en nombre complexe Python. En cas d'échec, cette méthode " +"renvoie ``-1.0`` en tant que nombre réel." #: c-api/complex.rst:76 msgid "" -"Return the exponentiation of *num* by *exp*, using the C :c:type:" -"`Py_complex` representation." +"Upon failure, this method returns ``-1.0`` with an exception set, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -"Renvoie *num* à la puissance *exp*, sous la forme d'un :c:type:`Py_complex` " -"en C." #: c-api/complex.rst:79 +msgid "Use :meth:`~object.__complex__` if available." +msgstr "" + +#: c-api/complex.rst:68 #, fuzzy -msgid "" -"If *num* is null and *exp* is not a positive real number, this method " -"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." msgstr "" -"Si *num* est nul et *exp* n'est pas un nombre réel positif, cette méthode " -"renvoie zéro et assigne :c:data:`EDOM` à :c:data:`errno`." +"Renvoie la partie imaginaire du nombre complexe *op* sous la forme " +"d'un :c:type:`double` en C." -#: c-api/complex.rst:84 -msgid "Complex Numbers as Python Objects" -msgstr "Nombres complexes en tant qu'objets Python" +#: c-api/complex.rst:70 +#, fuzzy +msgid "" +"If *op* is not a Python complex number object but has " +"a :meth:`~object.__complex__` method, this method will first be called to " +"convert *op* to a Python complex number object. If :meth:`!__complex__` is " +"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and " +"returns ``0.0`` on success." +msgstr "" +"Si *op* n'est pas un nombre complexe Python mais a une " +"méthode :meth:`__complex__`, cette méthode est d'abord appelée pour " +"convertir *op* en nombre complexe Python. En cas d'échec, cette méthode " +"renvoie ``-1.0`` en tant que nombre réel." -#: c-api/complex.rst:89 +#: c-api/complex.rst:85 +#, fuzzy msgid "" -"This subtype of :c:type:`PyObject` represents a Python complex number object." +"This C structure defines an export format for a Python complex number object." msgstr "" "Ce sous-type de l'objet :c:type:`PyObject` représente un nombre complexe en " "Python." -#: c-api/complex.rst:94 -msgid "" -"This instance of :c:type:`PyTypeObject` represents the Python complex number " -"type. It is the same object as :class:`complex` in the Python layer." +#: c-api/complex.rst:91 +msgid "The structure is defined as::" msgstr "" -"Cette instance de :c:type:`PyTypeObject` représente le type nombre complexe " -"Python. C'est le même objet que la classe :class:`complex` de la couche " -"Python." -#: c-api/complex.rst:100 +#: c-api/complex.rst:101 #, fuzzy msgid "" -"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" -"c:type:`PyComplexObject`. This function always succeeds." +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value. Return ``NULL`` with an exception set on error." msgstr "" -"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject` ou un sous-" -"type de :c:type:`PyComplexObject`." +"Crée un nouveau nombre complexe à partir de la valeur " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:106 -#, fuzzy -msgid "" -"Return true if its argument is a :c:type:`PyComplexObject`, but not a " -"subtype of :c:type:`PyComplexObject`. This function always succeeds." +#: c-api/complex.rst:107 +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." msgstr "" -"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject`, mais pas " -"un sous-type de :c:type:`PyComplexObject`." +"Renvoie la valeur du nombre complexe *op* sous la forme " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:112 +#: c-api/complex.rst:109 #, fuzzy msgid "" -"Create a new Python complex number object from a C :c:type:`Py_complex` " -"value. Return ``NULL`` with an exception set on error." +"If *op* is not a Python complex number object but has " +"a :meth:`~object.__complex__` method, this method will first be called to " +"convert *op* to a Python complex number object. If :meth:`!__complex__` is " +"not defined then it falls back to :meth:`~object.__float__`. If :meth:`!" +"__float__` is not defined then it falls back to :meth:`~object.__index__`." msgstr "" -"Crée un nouveau nombre complexe à partir de la valeur d'un :c:type:" -"`Py_complex` en C." +"Si *op* n'est pas un nombre complexe Python mais a une " +"méthode :meth:`__complex__`, cette méthode est d'abord appelée pour " +"convertir *op* en nombre complexe Python. En cas d'échec, cette méthode " +"renvoie ``-1.0`` en tant que nombre réel." -#: c-api/complex.rst:118 -#, fuzzy +#: c-api/complex.rst:115 msgid "" -"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " -"``NULL`` with an exception set on error." +"Upon failure, this method returns :c:type:`Py_complex` " +"with :c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, " +"so one should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -"Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." -#: c-api/complex.rst:124 -#, fuzzy -msgid "Return the real part of *op* as a C :c:expr:`double`." +#: c-api/complex.rst:119 +msgid "Use :meth:`~object.__index__` if available." msgstr "" -"Renvoie la partie réelle du nombre complexe *op* sous la forme d'un :c:type:" -"`double` en C." + +#: c-api/complex.rst:124 +msgid "Complex Numbers as C Structures" +msgstr "Nombres complexes en tant que structures C" #: c-api/complex.rst:126 #, fuzzy msgid "" -"If *op* is not a Python complex number object but has a :meth:`~object." -"__complex__` method, this method will first be called to convert *op* to a " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." +"The API also provides functions for working with complex numbers, using " +"the :c:type:`Py_complex` representation. Note that the functions which " +"accept these structures as parameters and return them as results do so *by " +"value* rather than dereferencing them through pointers." msgstr "" -"Si *op* n'est pas un nombre complexe Python mais a une méthode :meth:" -"`__complex__`, cette méthode est d'abord appelée pour convertir *op* en " -"nombre complexe Python. En cas d'échec, cette méthode renvoie ``-1.0`` en " -"tant que nombre réel." +"Les fonctions qui acceptent ces structures comme paramètres et les renvoient " +"comme résultats le font en fonction de leur *valeur* au lieu de les dé-" +"référencer en utilisant des pointeurs. C'est constant dans toute l'API." -#: c-api/complex.rst:148 +#: c-api/complex.rst:131 msgid "" -"Upon failure, this method returns ``-1.0`` with an exception set, so one " -"should call :c:func:`PyErr_Occurred` to check for errors." +"Please note, that these functions are :term:`soft deprecated` since Python " +"3.15. Avoid using this API in a new code to do complex arithmetic: either " +"use the :ref:`Number Protocol ` API or use native complex types, " +"like :c:expr:`double complex`." msgstr "" -#: c-api/complex.rst:151 -msgid "Use :meth:`~object.__complex__` if available." +#: c-api/complex.rst:139 +msgid "" +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." msgstr "" +"Renvoie la somme de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:140 -#, fuzzy -msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +#: c-api/complex.rst:147 +msgid "" +"Return the difference between two complex numbers, using the " +"C :c:type:`Py_complex` representation." msgstr "" -"Renvoie la partie imaginaire du nombre complexe *op* sous la forme d'un :c:" -"type:`double` en C." +"Renvoie la différence de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:142 +#: c-api/complex.rst:155 #, fuzzy msgid "" -"If *op* is not a Python complex number object but has a :meth:`~object." -"__complex__` method, this method will first be called to convert *op* to a " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on " -"success." -msgstr "" -"Si *op* n'est pas un nombre complexe Python mais a une méthode :meth:" -"`__complex__`, cette méthode est d'abord appelée pour convertir *op* en " -"nombre complexe Python. En cas d'échec, cette méthode renvoie ``-1.0`` en " -"tant que nombre réel." - -#: c-api/complex.rst:156 -msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +"Return the negation of the complex number *num*, using the " +"C :c:type:`Py_complex` representation." +msgstr "" +"Renvoie l'opposé du nombre complexe *complex*, sous la forme " +"d'un :c:type:`Py_complex` en C." + +#: c-api/complex.rst:163 +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." msgstr "" -"Renvoie la valeur du nombre complexe *op* sous la forme d'un :c:type:" -"`Py_complex` en C." +"Renvoie le produit de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." -#: c-api/complex.rst:158 +#: c-api/complex.rst:171 +msgid "" +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie le quotient de deux nombres complexes, sous la forme " +"d'un :c:type:`Py_complex` en C." + +#: c-api/complex.rst:174 #, fuzzy msgid "" -"If *op* is not a Python complex number object but has a :meth:`~object." -"__complex__` method, this method will first be called to convert *op* to a " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " -"defined then it falls back to :meth:`~object.__index__`." -msgstr "" -"Si *op* n'est pas un nombre complexe Python mais a une méthode :meth:" -"`__complex__`, cette méthode est d'abord appelée pour convertir *op* en " -"nombre complexe Python. En cas d'échec, cette méthode renvoie ``-1.0`` en " -"tant que nombre réel." - -#: c-api/complex.rst:164 +"If *divisor* is null, this method returns zero and sets :c:data:`errno` " +"to :c:macro:`!EDOM`." +msgstr "" +"Si *divisor* est nul, cette méthode renvoie zéro et assigne :c:data:`EDOM` " +"à :c:data:`errno`." + +#: c-api/complex.rst:182 +msgid "" +"Return the exponentiation of *num* by *exp*, using the " +"C :c:type:`Py_complex` representation." +msgstr "" +"Renvoie *num* à la puissance *exp*, sous la forme d'un :c:type:`Py_complex` " +"en C." + +#: c-api/complex.rst:185 +#, fuzzy msgid "" -"Upon failure, this method returns :c:type:`Py_complex` with :c:member:" -"`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should " -"call :c:func:`PyErr_Occurred` to check for errors." +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." msgstr "" +"Si *num* est nul et *exp* n'est pas un nombre réel positif, cette méthode " +"renvoie zéro et assigne :c:data:`EDOM` à :c:data:`errno`." -#: c-api/complex.rst:168 -msgid "Use :meth:`~object.__index__` if available." +#: c-api/complex.rst:197 +msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +msgstr "" + +#: c-api/complex.rst:195 +#, fuzzy +msgid "Return the absolute value of the complex number *num*." msgstr "" +"Renvoie la valeur du nombre complexe *op* sous la forme " +"d'un :c:type:`Py_complex` en C." + +#~ msgid "" +#~ "Python's complex number objects are implemented as two distinct types " +#~ "when viewed from the C API: one is the Python object exposed to Python " +#~ "programs, and the other is a C structure which represents the actual " +#~ "complex number value. The API provides functions for working with both." +#~ msgstr "" +#~ "Les nombres complexes Python sont implémentés comme deux types distincts, " +#~ "lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel qu'il est vu " +#~ "par les programmes Python, et l'autre est une structure C qui représente " +#~ "la valeur exacte du nombre complexe. L'API fournit des fonctions pour " +#~ "travailler avec ces deux représentations." + +#, fuzzy +#~ msgid "" +#~ "The C structure which corresponds to the value portion of a Python " +#~ "complex number object. Most of the functions for dealing with complex " +#~ "number objects use structures of this type as input or output values, as " +#~ "appropriate." +#~ msgstr "" +#~ "Structure C représentant la valeur d'un nombre complexe Python. La " +#~ "majorité des fonctions qui traitent des nombres complexes utilisent cette " +#~ "structure en entrée ou en sortie, selon le cas. Elle est définie par ::" + +#~ msgid "Complex Numbers as Python Objects" +#~ msgstr "Nombres complexes en tant qu'objets Python" #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/concrete.po b/c-api/concrete.po index b12f078eb..985663827 100644 --- a/c-api/concrete.po +++ b/c-api/concrete.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-01-28 14:56+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -32,9 +32,9 @@ msgstr "" "Python. Leur donner un objet du mauvais type n'est pas une bonne idée, si " "vous recevez un objet d'un programme Python, et que vous n'êtes pas sûr " "qu'il soit du bon type, vous devez vérifier son type en premier. Par " -"exemple, pour vérifier qu'un objet est un dictionnaire, utilisez :c:func:" -"`PyDict_Check`. Ce chapitre est organisé comme un arbre généalogique de " -"types d'objets Python." +"exemple, pour vérifier qu'un objet est un dictionnaire, " +"utilisez :c:func:`PyDict_Check`. Ce chapitre est organisé comme un arbre " +"généalogique de types d'objets Python." #: c-api/concrete.rst:19 msgid "" @@ -90,6 +90,10 @@ msgstr "Objets fonctions" msgid "Other Objects" msgstr "Autres objets" +#: c-api/concrete.rst:124 +msgid "C API for extension modules" +msgstr "" + #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 38f74efc7..243613cc7 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2018-08-03 23:47+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,8 +21,9 @@ msgstr "" #: c-api/contextvars.rst:15 msgid "" "In Python 3.7.1 the signatures of all context variables C APIs were " -"**changed** to use :c:type:`PyObject` pointers instead of :c:type:" -"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" +"**changed** to use :c:type:`PyObject` pointers instead " +"of :c:type:`PyContext`, :c:type:`PyContextVar`, " +"and :c:type:`PyContextToken`, e.g.::" msgstr "" #: c-api/contextvars.rst:26 @@ -117,11 +118,61 @@ msgid "" "error." msgstr "" -#: c-api/contextvars.rst:105 +#: c-api/contextvars.rst:106 +msgid "" +"Register *callback* as a context object watcher for the current interpreter. " +"Return an ID which may be passed to :c:func:`PyContext_ClearWatcher`. In " +"case of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +#: c-api/contextvars.rst:115 +msgid "" +"Clear watcher identified by *watcher_id* previously returned " +"from :c:func:`PyContext_AddWatcher` for the current interpreter. Return " +"``0`` on success, or ``-1`` and set an exception on error (e.g. if the given " +"*watcher_id* was never registered.)" +msgstr "" + +#: c-api/contextvars.rst:124 +msgid "Enumeration of possible context object watcher events:" +msgstr "" + +#: c-api/contextvars.rst:126 +msgid "" +"``Py_CONTEXT_SWITCHED``: The :term:`current context` has switched to a " +"different context. The object passed to the watch callback is the now-" +"current :class:`contextvars.Context` object, or None if no context is " +"current." +msgstr "" + +#: c-api/contextvars.rst:135 +msgid "" +"Context object watcher callback function. The object passed to the callback " +"is event-specific; see :c:type:`PyContextEvent` for details." +msgstr "" + +#: c-api/contextvars.rst:138 +msgid "" +"If the callback returns with an exception set, it must return ``-1``; this " +"exception will be printed as an unraisable exception " +"using :c:func:`PyErr_FormatUnraisable`. Otherwise it should return ``0``." +msgstr "" + +#: c-api/contextvars.rst:142 +msgid "" +"There may already be a pending exception set on entry to the callback. In " +"this case, the callback should return ``0`` with the same exception still " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +#: c-api/contextvars.rst:151 msgid "Context variable functions:" msgstr "" -#: c-api/contextvars.rst:109 +#: c-api/contextvars.rst:155 msgid "" "Create a new ``ContextVar`` object. The *name* parameter is used for " "introspection and debug purposes. The *def* parameter specifies a default " @@ -129,44 +180,44 @@ msgid "" "occurred, this function returns ``NULL``." msgstr "" -#: c-api/contextvars.rst:116 +#: c-api/contextvars.rst:162 msgid "" "Get the value of a context variable. Returns ``-1`` if an error has " "occurred during lookup, and ``0`` if no error occurred, whether or not a " "value was found." msgstr "" -#: c-api/contextvars.rst:120 +#: c-api/contextvars.rst:166 msgid "" "If the context variable was found, *value* will be a pointer to it. If the " "context variable was *not* found, *value* will point to:" msgstr "" -#: c-api/contextvars.rst:123 +#: c-api/contextvars.rst:169 msgid "*default_value*, if not ``NULL``;" msgstr "" -#: c-api/contextvars.rst:124 +#: c-api/contextvars.rst:170 msgid "the default value of *var*, if not ``NULL``;" msgstr "" -#: c-api/contextvars.rst:125 +#: c-api/contextvars.rst:171 msgid "``NULL``" msgstr "``NULL``" -#: c-api/contextvars.rst:127 +#: c-api/contextvars.rst:173 msgid "Except for ``NULL``, the function returns a new reference." msgstr "" -#: c-api/contextvars.rst:131 +#: c-api/contextvars.rst:177 msgid "" "Set the value of *var* to *value* in the current context. Returns a new " "token object for this change, or ``NULL`` if an error has occurred." msgstr "" -#: c-api/contextvars.rst:136 +#: c-api/contextvars.rst:182 msgid "" -"Reset the state of the *var* context variable to that it was in before :c:" -"func:`PyContextVar_Set` that returned the *token* was called. This function " -"returns ``0`` on success and ``-1`` on error." +"Reset the state of the *var* context variable to that it was in " +"before :c:func:`PyContextVar_Set` that returned the *token* was called. This " +"function returns ``0`` on success and ``-1`` on error." msgstr "" diff --git a/c-api/conversion.po b/c-api/conversion.po index 014aed2f4..3c85a55c8 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -27,15 +27,15 @@ msgstr "" #: c-api/conversion.rst:13 msgid "" "Output not more than *size* bytes to *str* according to the format string " -"*format* and the extra arguments. See the Unix man page :manpage:" -"`snprintf(3)`." +"*format* and the extra arguments. See the Unix man " +"page :manpage:`snprintf(3)`." msgstr "" #: c-api/conversion.rst:19 msgid "" "Output not more than *size* bytes to *str* according to the format string " -"*format* and the variable argument list *va*. Unix man page :manpage:" -"`vsnprintf(3)`." +"*format* and the variable argument list *va*. Unix man " +"page :manpage:`vsnprintf(3)`." msgstr "" #: c-api/conversion.rst:23 @@ -77,9 +77,9 @@ msgstr "" #: c-api/conversion.rst:44 msgid "" -"When ``rv < 0``, \"something bad happened.\" ``str[size-1]`` is ``'\\0'`` in " -"this case too, but the rest of *str* is undefined. The exact cause of the " -"error depends on the underlying platform." +"When ``rv < 0``, the output conversion failed and ``str[size-1]`` is " +"``'\\0'`` in this case too, but the rest of *str* is undefined. The exact " +"cause of the error depends on the underlying platform." msgstr "" #: c-api/conversion.rst:49 @@ -107,9 +107,9 @@ msgstr "" #: c-api/conversion.rst:63 msgid "" "If the converted value falls out of range of corresponding return type, " -"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:" -"macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is " -"returned." +"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) " +"and :c:macro:`!ULONG_MAX` is returned. If no conversion can be performed, " +"``0`` is returned." msgstr "" #: c-api/conversion.rst:68 @@ -144,9 +144,9 @@ msgstr "" #: c-api/conversion.rst:95 msgid "" -"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" -"`ValueError` and return ``-1.0`` if the string is not a valid representation " -"of a floating-point number." +"If ``endptr`` is ``NULL``, convert the whole string. " +"Raise :exc:`ValueError` and return ``-1.0`` if the string is not a valid " +"representation of a floating-point number." msgstr "" #: c-api/conversion.rst:99 @@ -162,7 +162,7 @@ msgstr "" msgid "" "If ``s`` represents a value that is too large to store in a float (for " "example, ``\"1e500\"`` is such a string on many platforms) then if " -"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an " +"``overflow_exception`` is ``NULL`` return :c:macro:`!INFINITY` (with an " "appropriate sign) and don't set any exception. Otherwise, " "``overflow_exception`` must point to a Python exception object; raise that " "exception and return ``-1.0``. In both cases, set ``*endptr`` to point to " @@ -189,52 +189,152 @@ msgid "" msgstr "" #: c-api/conversion.rst:131 -msgid "" -"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, " -"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:" +msgid "*flags* can be zero or more of the following values or-ed together:" msgstr "" -#: c-api/conversion.rst:134 +#: c-api/conversion.rst:137 msgid "" -"``Py_DTSF_SIGN`` means to always precede the returned string with a sign " -"character, even if *val* is non-negative." +"Always precede the returned string with a sign character, even if *val* is " +"non-negative." msgstr "" -#: c-api/conversion.rst:137 -msgid "" -"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " -"like an integer." +#: c-api/conversion.rst:142 +msgid "Ensure that the returned string will not look like an integer." msgstr "" -#: c-api/conversion.rst:140 +#: c-api/conversion.rst:146 msgid "" -"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the " -"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." +"Apply \"alternate\" formatting rules. See the documentation for " +"the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." msgstr "" -#: c-api/conversion.rst:144 +#: c-api/conversion.rst:152 +msgid "Negative zero is converted to positive zero." +msgstr "" + +#: c-api/conversion.rst:156 msgid "" "If *ptype* is non-``NULL``, then the value it points to will be set to one " -"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " -"that *val* is a finite number, an infinite number, or not a number, " -"respectively." +"of the following constants depending on the type of *val*:" +msgstr "" + +#: c-api/conversion.rst:163 +msgid "*\\*ptype*" +msgstr "" + +#: c-api/conversion.rst:164 +msgid "type of *val*" +msgstr "" + +#: c-api/conversion.rst:166 +msgid "finite number" +msgstr "" + +#: c-api/conversion.rst:168 +msgid "infinite number" +msgstr "" + +#: c-api/conversion.rst:170 +msgid "not a number" msgstr "" -#: c-api/conversion.rst:148 +#: c-api/conversion.rst:172 msgid "" "The return value is a pointer to *buffer* with the converted string or " "``NULL`` if the conversion failed. The caller is responsible for freeing the " "returned string by calling :c:func:`PyMem_Free`." msgstr "" -#: c-api/conversion.rst:157 +#: c-api/conversion.rst:182 msgid "" -"Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`!strcmp` except that it ignores the case." +"Case insensitive comparison of strings. These functions work almost " +"identically to :c:func:`!strcmp` and :c:func:`!strncmp` (respectively), " +"except that they ignore the case of ASCII characters." msgstr "" -#: c-api/conversion.rst:163 +#: c-api/conversion.rst:186 +msgid "" +"Return ``0`` if the strings are equal, a negative value if *str1* sorts " +"lexicographically before *str2*, or a positive value if it sorts after." +msgstr "" + +#: c-api/conversion.rst:189 +msgid "" +"In the *str1* or *str2* arguments, a NUL byte marks the end of the string. " +"For :c:func:`!PyOS_mystrnicmp`, the *size* argument gives the maximum size " +"of the string, as if NUL was present at the index given by *size*." +msgstr "" + +#: c-api/conversion.rst:193 +msgid "These functions do not use the locale." +msgstr "" + +#: c-api/conversion.rst:199 +msgid "Case insensitive comparison of strings." +msgstr "" + +#: c-api/conversion.rst:201 +msgid "" +"On Windows, these are aliases of :c:func:`!stricmp` and :c:func:`!strnicmp`, " +"respectively." +msgstr "" + +#: c-api/conversion.rst:204 +msgid "" +"On other platforms, they are aliases of :c:func:`PyOS_mystricmp` " +"and :c:func:`PyOS_mystrnicmp`, respectively." +msgstr "" + +#: c-api/conversion.rst:209 +msgid "Character classification and conversion" +msgstr "" + +#: c-api/conversion.rst:211 +msgid "" +"The following macros provide locale-independent (unlike the C standard " +"library ``ctype.h``) character classification and conversion. The argument " +"must be a signed or unsigned :c:expr:`char`." +msgstr "" + +#: c-api/conversion.rst:218 +msgid "Return true if the character *c* is an alphanumeric character." +msgstr "" + +#: c-api/conversion.rst:223 +msgid "" +"Return true if the character *c* is an alphabetic character (``a-z`` and ``A-" +"Z``)." +msgstr "" + +#: c-api/conversion.rst:228 +msgid "Return true if the character *c* is a decimal digit (``0-9``)." +msgstr "" + +#: c-api/conversion.rst:233 +msgid "Return true if the character *c* is a lowercase ASCII letter (``a-z``)." +msgstr "" + +#: c-api/conversion.rst:238 +msgid "" +"Return true if the character *c* is an uppercase ASCII letter (``A-Z``)." +msgstr "" + +#: c-api/conversion.rst:243 msgid "" -"Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`!strncmp` except that it ignores the case." +"Return true if the character *c* is a whitespace character (space, tab, " +"carriage return, newline, vertical tab, or form feed)." +msgstr "" + +#: c-api/conversion.rst:249 +msgid "" +"Return true if the character *c* is a hexadecimal digit (``0-9``, ``a-f``, " +"and ``A-F``)." +msgstr "" + +#: c-api/conversion.rst:255 +msgid "Return the lowercase equivalent of the character *c*." +msgstr "" + +#: c-api/conversion.rst:260 +msgid "Return the uppercase equivalent of the character *c*." msgstr "" diff --git a/c-api/curses.po b/c-api/curses.po new file mode 100644 index 000000000..b9931e32f --- /dev/null +++ b/c-api/curses.po @@ -0,0 +1,146 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/curses.rst:4 +msgid "Curses C API" +msgstr "" + +#: c-api/curses.rst:6 +msgid "" +":mod:`curses` exposes a small C interface for extension modules. Consumers " +"must include the header file :file:`py_curses.h` (which is not included by " +"default by :file:`Python.h`) and :c:func:`import_curses` must be invoked, " +"usually as part of the module initialisation function, to " +"populate :c:var:`PyCurses_API`." +msgstr "" + +#: c-api/curses.rst:14 +msgid "" +"Neither the C API nor the pure Python :mod:`curses` module are compatible " +"with subinterpreters." +msgstr "" + +#: c-api/curses.rst:19 +msgid "" +"Import the curses C API. The macro does not need a semi-colon to be called." +msgstr "" + +#: c-api/curses.rst:21 +msgid "On success, populate the :c:var:`PyCurses_API` pointer." +msgstr "" + +#: c-api/curses.rst:23 +msgid "" +"On failure, set :c:var:`PyCurses_API` to NULL and set an exception. The " +"caller must check if an error occurred via :c:func:`PyErr_Occurred`:" +msgstr "" + +#: c-api/curses.rst:34 +msgid "" +"Dynamically allocated object containing the curses C API. This variable is " +"only available once :c:macro:`import_curses` succeeds." +msgstr "" + +#: c-api/curses.rst:37 +msgid "``PyCurses_API[0]`` corresponds to :c:data:`PyCursesWindow_Type`." +msgstr "" + +#: c-api/curses.rst:39 +msgid "" +"``PyCurses_API[1]``, ``PyCurses_API[2]``, and ``PyCurses_API[3]`` are " +"pointers to predicate functions of type ``int (*)(void)``." +msgstr "" + +#: c-api/curses.rst:42 +msgid "" +"When called, these predicates return " +"whether :func:`curses.setupterm`, :func:`curses.initscr`, " +"and :func:`curses.start_color` have been called respectively." +msgstr "" + +#: c-api/curses.rst:46 +msgid "" +"See also the convenience " +"macros :c:macro:`PyCursesSetupTermCalled`, :c:macro:`PyCursesInitialised`, " +"and :c:macro:`PyCursesInitialisedColor`." +msgstr "" + +#: c-api/curses.rst:51 +msgid "" +"The number of entries in this structure is subject to changes. Consider " +"using :c:macro:`PyCurses_API_pointers` to check if new fields are available " +"or not." +msgstr "" + +#: c-api/curses.rst:58 +msgid "" +"The number of accessible fields (``4``) in :c:var:`PyCurses_API`. This " +"number is incremented whenever new fields are added." +msgstr "" + +#: c-api/curses.rst:64 +msgid "" +"The :ref:`heap type ` corresponding to :class:`curses.window`." +msgstr "" + +#: c-api/curses.rst:69 +msgid "" +"Return true if *op* is a :class:`curses.window` instance, false otherwise." +msgstr "" + +#: c-api/curses.rst:72 +msgid "" +"The following macros are convenience macros expanding into C statements. In " +"particular, they can only be used as ``macro;`` or ``macro``, but not " +"``macro()`` or ``macro();``." +msgstr "" + +#: c-api/curses.rst:78 +msgid "Macro checking if :func:`curses.setupterm` has been called." +msgstr "" + +#: c-api/curses.rst:97 c-api/curses.rst:114 +msgid "The macro expansion is roughly equivalent to:" +msgstr "" + +#: c-api/curses.rst:95 +msgid "Macro checking if :func:`curses.initscr` has been called." +msgstr "" + +#: c-api/curses.rst:112 +msgid "Macro checking if :func:`curses.start_color` has been called." +msgstr "" + +#: c-api/curses.rst:128 +msgid "Internal data" +msgstr "" + +#: c-api/curses.rst:130 +msgid "" +"The following objects are exposed by the C API but should be considered " +"internal-only." +msgstr "" + +#: c-api/curses.rst:135 +msgid "Name of the curses capsule to pass to :c:func:`PyCapsule_Import`." +msgstr "" + +#: c-api/curses.rst:137 +msgid "Internal usage only. Use :c:macro:`import_curses` instead." +msgstr "" diff --git a/c-api/datetime.po b/c-api/datetime.po index 9fc2fb0fd..413fcd7f4 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-12-11 11:57+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -25,87 +25,133 @@ msgstr "Objets DateTime" msgid "" "Various date and time objects are supplied by the :mod:`datetime` module. " "Before using any of these functions, the header file :file:`datetime.h` must " -"be included in your source (note that this is not included by :file:`Python." -"h`), and the macro :c:macro:`!PyDateTime_IMPORT` must be invoked, usually as " -"part of the module initialisation function. The macro puts a pointer to a C " -"structure into a static variable, :c:data:`!PyDateTimeAPI`, that is used by " -"the following macros." -msgstr "" -"De nombreux objets *date* et *time* sont exposés par le module :mod:" -"`DateTime`. Avant d'utiliser une de ces fonctions, le fichier d'en-tête :" -"file:`datetime.h` doit être inclus dans vos sources (veuillez noter qu'il " -"n'est pas inclus par le fichier :file:`Python.h`) et la macro :c:macro:" -"`PyDateTime_IMPORT` doit être invoquée, généralement lors de la fonction " -"d'initialisation du module. La macro crée un pointeur vers une structure C " -"et place celui-ci dans une variable statique, :c:data:`PyDateTimeAPI`, qui " -"est utilisée par les macros suivantes." +"be included in your source (note that this is not included " +"by :file:`Python.h`), and the macro :c:macro:`PyDateTime_IMPORT` must be " +"invoked, usually as part of the module initialisation function. The macro " +"puts a pointer to a C structure into a static " +"variable, :c:data:`PyDateTimeAPI`, that is used by the following macros." +msgstr "" +"De nombreux objets *date* et *time* sont exposés par le " +"module :mod:`DateTime`. Avant d'utiliser une de ces fonctions, le fichier " +"d'en-tête :file:`datetime.h` doit être inclus dans vos sources (veuillez " +"noter qu'il n'est pas inclus par le fichier :file:`Python.h`) et la " +"macro :c:macro:`PyDateTime_IMPORT` doit être invoquée, généralement lors de " +"la fonction d'initialisation du module. La macro crée un pointeur vers une " +"structure C et place celui-ci dans une variable " +"statique, :c:data:`PyDateTimeAPI`, qui est utilisée par les macros suivantes." #: c-api/datetime.rst:18 +msgid "Import the datetime C API." +msgstr "" + +#: c-api/datetime.rst:20 +msgid "" +"On success, populate the :c:var:`PyDateTimeAPI` pointer. On failure, " +"set :c:var:`PyDateTimeAPI` to ``NULL`` and set an exception. The caller must " +"check if an error occurred via :c:func:`PyErr_Occurred`:" +msgstr "" + +#: c-api/datetime.rst:31 +msgid "This is not compatible with subinterpreters." +msgstr "" + +#: c-api/datetime.rst:35 +msgid "This macro is now thread safe." +msgstr "" + +#: c-api/datetime.rst:39 +msgid "Structure containing the fields for the datetime C API." +msgstr "" + +#: c-api/datetime.rst:41 +msgid "The fields of this structure are private and subject to change." +msgstr "" + +#: c-api/datetime.rst:43 +msgid "Do not use this directly; prefer ``PyDateTime_*`` APIs instead." +msgstr "" + +#: c-api/datetime.rst:47 +msgid "Dynamically allocated object containing the datetime C API." +msgstr "" + +#: c-api/datetime.rst:49 +msgid "" +"This variable is only available once :c:macro:`PyDateTime_IMPORT` succeeds." +msgstr "" + +#: c-api/datetime.rst:53 +msgid "" +"This variable should not be accessed directly as direct access is not thread-" +"safe. Use :c:func:`PyDateTime_IMPORT` instead." +msgstr "" + +#: c-api/datetime.rst:58 msgid "This subtype of :c:type:`PyObject` represents a Python date object." msgstr "" -#: c-api/datetime.rst:22 +#: c-api/datetime.rst:62 msgid "This subtype of :c:type:`PyObject` represents a Python datetime object." msgstr "" -#: c-api/datetime.rst:26 +#: c-api/datetime.rst:66 msgid "This subtype of :c:type:`PyObject` represents a Python time object." msgstr "" -#: c-api/datetime.rst:30 +#: c-api/datetime.rst:70 msgid "" "This subtype of :c:type:`PyObject` represents the difference between two " "datetime values." msgstr "" -#: c-api/datetime.rst:34 +#: c-api/datetime.rst:74 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python date type; it " "is the same object as :class:`datetime.date` in the Python layer." msgstr "" -#: c-api/datetime.rst:39 +#: c-api/datetime.rst:79 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python datetime type; " "it is the same object as :class:`datetime.datetime` in the Python layer." msgstr "" -#: c-api/datetime.rst:44 +#: c-api/datetime.rst:84 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python time type; it " "is the same object as :class:`datetime.time` in the Python layer." msgstr "" -#: c-api/datetime.rst:49 +#: c-api/datetime.rst:89 msgid "" -"This instance of :c:type:`PyTypeObject` represents Python type for the " -"difference between two datetime values; it is the same object as :class:" -"`datetime.timedelta` in the Python layer." +"This instance of :c:type:`PyTypeObject` represents the Python type for the " +"difference between two datetime values; it is the same object " +"as :class:`datetime.timedelta` in the Python layer." msgstr "" -#: c-api/datetime.rst:55 +#: c-api/datetime.rst:95 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python time zone info " "type; it is the same object as :class:`datetime.tzinfo` in the Python layer." msgstr "" -#: c-api/datetime.rst:59 +#: c-api/datetime.rst:99 msgid "Macro for access to the UTC singleton:" msgstr "Macro pour accéder au singleton UTC :" -#: c-api/datetime.rst:63 +#: c-api/datetime.rst:103 msgid "" -"Returns the time zone singleton representing UTC, the same object as :attr:" -"`datetime.timezone.utc`." +"Returns the time zone singleton representing UTC, the same object " +"as :attr:`datetime.timezone.utc`." msgstr "" -"Renvoie le singleton du fuseau horaire UTC, qui est le même objet que :attr:" -"`datetime.timezone.utc`." +"Renvoie le singleton du fuseau horaire UTC, qui est le même objet " +"que :attr:`datetime.timezone.utc`." -#: c-api/datetime.rst:69 +#: c-api/datetime.rst:109 msgid "Type-check macros:" msgstr "Macros pour vérifier les types :" -#: c-api/datetime.rst:73 +#: c-api/datetime.rst:113 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " @@ -115,7 +161,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType` ou un sous-" "type de :c:data:`PyDateTime_DateType`. *ob* ne doit pas être *NULL*." -#: c-api/datetime.rst:80 +#: c-api/datetime.rst:120 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " @@ -124,7 +170,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType`. *ob* ne doit " "pas être *NULL*." -#: c-api/datetime.rst:86 +#: c-api/datetime.rst:126 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " @@ -134,7 +180,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType` ou un " "sous-type de :c:data:`PyDateTime_DateTimeType`. *ob* ne doit pas être *NULL*." -#: c-api/datetime.rst:93 +#: c-api/datetime.rst:133 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " @@ -143,7 +189,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType`. *ob* ne " "doit pas être *NULL*." -#: c-api/datetime.rst:99 +#: c-api/datetime.rst:139 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " @@ -153,7 +199,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType` ou un sous-" "type de :c:data:`PyDateTime_TimeType`. *ob* ne doit pas être *NULL*." -#: c-api/datetime.rst:106 +#: c-api/datetime.rst:146 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " @@ -162,7 +208,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType`. *ob* ne doit " "pas être *NULL*." -#: c-api/datetime.rst:112 +#: c-api/datetime.rst:152 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " @@ -172,7 +218,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType` ou un sous-" "type de :c:data:`PyDateTime_DeltaType`. *ob* ne doit pas être *NULL*." -#: c-api/datetime.rst:119 +#: c-api/datetime.rst:159 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " @@ -181,7 +227,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType`. *ob* ne " "doit pas être *NULL*." -#: c-api/datetime.rst:125 +#: c-api/datetime.rst:165 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " @@ -191,7 +237,7 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType` ou un sous-" "type de :c:data:`PyDateTime_TZInfoType`. *ob* ne doit pas être *NULL*." -#: c-api/datetime.rst:132 +#: c-api/datetime.rst:172 #, fuzzy msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " @@ -200,11 +246,11 @@ msgstr "" "Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType`. *ob* ne " "doit pas être *NULL*." -#: c-api/datetime.rst:136 +#: c-api/datetime.rst:176 msgid "Macros to create objects:" msgstr "Macros pour créer des objets :" -#: c-api/datetime.rst:140 +#: c-api/datetime.rst:180 msgid "" "Return a :class:`datetime.date` object with the specified year, month and " "day." @@ -212,7 +258,7 @@ msgstr "" "Renvoie un objet :class:`datetime.date` avec l'année, le mois et le jour " "spécifiés." -#: c-api/datetime.rst:145 +#: c-api/datetime.rst:185 msgid "" "Return a :class:`datetime.datetime` object with the specified year, month, " "day, hour, minute, second and microsecond." @@ -220,7 +266,7 @@ msgstr "" "Renvoie un objet :class:`datetime.datetime` avec l'année, le mois, le jour, " "l'heure, la minute, la seconde et la microseconde spécifiés." -#: c-api/datetime.rst:151 +#: c-api/datetime.rst:191 msgid "" "Return a :class:`datetime.datetime` object with the specified year, month, " "day, hour, minute, second, microsecond and fold." @@ -229,7 +275,7 @@ msgstr "" "l'heure, la minute, la seconde, la microseconde et le pli (*fold* en " "anglais) spécifiés." -#: c-api/datetime.rst:159 +#: c-api/datetime.rst:199 msgid "" "Return a :class:`datetime.time` object with the specified hour, minute, " "second and microsecond." @@ -237,7 +283,7 @@ msgstr "" "Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde " "et la microseconde spécifiées." -#: c-api/datetime.rst:165 +#: c-api/datetime.rst:205 msgid "" "Return a :class:`datetime.time` object with the specified hour, minute, " "second, microsecond and fold." @@ -245,7 +291,7 @@ msgstr "" "Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde, " "la microseconde et le pli (*fold* en anglais) spécifiés." -#: c-api/datetime.rst:173 +#: c-api/datetime.rst:213 msgid "" "Return a :class:`datetime.timedelta` object representing the given number of " "days, seconds and microseconds. Normalization is performed so that the " @@ -257,7 +303,7 @@ msgstr "" "normalisé pour que le nombre de microsecondes et de secondes tombe dans la " "plage documentée pour les objets :class:`datetime.timedelta`." -#: c-api/datetime.rst:181 +#: c-api/datetime.rst:221 msgid "" "Return a :class:`datetime.timezone` object with an unnamed fixed offset " "represented by the *offset* argument." @@ -265,7 +311,7 @@ msgstr "" "Renvoie un objet :class:`datetime.timezone` avec un décalage anonyme fixe " "représenté par l'argument *offset*." -#: c-api/datetime.rst:189 +#: c-api/datetime.rst:229 msgid "" "Return a :class:`datetime.timezone` object with a fixed offset represented " "by the *offset* argument and with tzname *name*." @@ -273,32 +319,32 @@ msgstr "" "Renvoie un objet :class:`datetime.timezone` avec un décalage fixe représenté " "par l'argument *offset* et avec le nom de fuseau horaire *name*." -#: c-api/datetime.rst:195 +#: c-api/datetime.rst:235 #, fuzzy msgid "" "Macros to extract fields from date objects. The argument must be an " -"instance of :c:type:`PyDateTime_Date`, including subclasses (such as :c:type:" -"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is " -"not checked:" +"instance of :c:type:`PyDateTime_Date`, including subclasses (such " +"as :c:type:`PyDateTime_DateTime`). The argument must not be ``NULL``, and " +"the type is not checked:" msgstr "" "Macros pour extraire les champs des objets *date*. L'argument doit être une " -"instance de :c:data:`PyDateTime_Date`, ou une sous-classe (telle que :c:data:" -"`PyDateTime_DateTime`). L'argument ne doit pas être *NULL*, et le type n'est " -"pas vérifié :" +"instance de :c:data:`PyDateTime_Date`, ou une sous-classe (telle " +"que :c:data:`PyDateTime_DateTime`). L'argument ne doit pas être *NULL*, et " +"le type n'est pas vérifié :" -#: c-api/datetime.rst:202 +#: c-api/datetime.rst:242 msgid "Return the year, as a positive int." msgstr "Renvoie l'année, sous forme d'entier positif." -#: c-api/datetime.rst:207 +#: c-api/datetime.rst:247 msgid "Return the month, as an int from 1 through 12." msgstr "Renvoie le mois, sous forme d'entier allant de 1 à 12." -#: c-api/datetime.rst:212 +#: c-api/datetime.rst:252 msgid "Return the day, as an int from 1 through 31." msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." -#: c-api/datetime.rst:215 +#: c-api/datetime.rst:255 #, fuzzy msgid "" "Macros to extract fields from datetime objects. The argument must be an " @@ -309,32 +355,32 @@ msgstr "" "une instance de :c:data:`PyDateTime_DateTime` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:259 +#: c-api/datetime.rst:299 msgid "Return the hour, as an int from 0 through 23." msgstr "Renvoie l'heure, sous forme d'entier allant de 0 à 23." -#: c-api/datetime.rst:264 +#: c-api/datetime.rst:304 msgid "Return the minute, as an int from 0 through 59." msgstr "Renvoie la minute, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:269 +#: c-api/datetime.rst:309 msgid "Return the second, as an int from 0 through 59." msgstr "Renvoie la seconde, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:274 +#: c-api/datetime.rst:314 msgid "Return the microsecond, as an int from 0 through 999999." msgstr "Renvoie la microseconde, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:279 +#: c-api/datetime.rst:319 #, fuzzy msgid "Return the fold, as an int from 0 through 1." msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." -#: c-api/datetime.rst:286 +#: c-api/datetime.rst:326 msgid "Return the tzinfo (which may be ``None``)." msgstr "" -#: c-api/datetime.rst:253 +#: c-api/datetime.rst:293 #, fuzzy msgid "" "Macros to extract fields from time objects. The argument must be an " @@ -345,7 +391,7 @@ msgstr "" "instance de :c:data:`PyDateTime_Time` ou une sous-classe de celle-ci. " "L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:291 +#: c-api/datetime.rst:331 #, fuzzy msgid "" "Macros to extract fields from time delta objects. The argument must be an " @@ -356,26 +402,26 @@ msgstr "" "être une instance de :c:data:`PyDateTime_Delta` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:297 +#: c-api/datetime.rst:337 msgid "Return the number of days, as an int from -999999999 to 999999999." msgstr "" "Renvoie le nombre de jours, sous forme d'entier allant de ``-999999999`` à " "``999999999``." -#: c-api/datetime.rst:304 +#: c-api/datetime.rst:344 msgid "Return the number of seconds, as an int from 0 through 86399." msgstr "Renvoie le nombre de secondes sous forme d'entier allant de 0 à 86399." -#: c-api/datetime.rst:311 +#: c-api/datetime.rst:351 msgid "Return the number of microseconds, as an int from 0 through 999999." msgstr "" "Renvoie le nombre de microsecondes, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:316 +#: c-api/datetime.rst:356 msgid "Macros for the convenience of modules implementing the DB API:" msgstr "Macros de confort pour les modules implémentant l'API DB :" -#: c-api/datetime.rst:320 +#: c-api/datetime.rst:360 #, fuzzy msgid "" "Create and return a new :class:`datetime.datetime` object given an argument " @@ -384,7 +430,7 @@ msgstr "" "Crée et renvoie un nouvel objet :class:`datetime.datetime` à partir d'un n-" "uplet qui peut être passé à :meth:`datetime.datetime.fromtimestamp()`." -#: c-api/datetime.rst:326 +#: c-api/datetime.rst:366 #, fuzzy msgid "" "Create and return a new :class:`datetime.date` object given an argument " @@ -392,3 +438,21 @@ msgid "" msgstr "" "Crée et renvoie un nouvel objet :class:`datetime.date` à partir d'un *n*-" "uplet qui peut être passé à :meth:`datetime.date.fromtimestamp()`." + +#: c-api/datetime.rst:371 +msgid "Internal data" +msgstr "" + +#: c-api/datetime.rst:373 +msgid "" +"The following symbols are exposed by the C API but should be considered " +"internal-only." +msgstr "" + +#: c-api/datetime.rst:378 +msgid "Name of the datetime capsule to pass to :c:func:`PyCapsule_Import`." +msgstr "" + +#: c-api/datetime.rst:380 +msgid "Internal usage only. Use :c:macro:`PyDateTime_IMPORT` instead." +msgstr "" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index b9eae213d..841c1e1c5 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-02-15 00:32+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -26,17 +26,232 @@ msgstr "" "Les \"Descripteurs\" sont des objets décrivant des attributs pour un objet. " "Ils se trouvent dans le dictionnaire du type de l'objet." -#: c-api/descriptor.rst:15 -msgid "The type object for the built-in descriptor types." -msgstr "L'objet *type* des descripteurs natifs." +#: c-api/descriptor.rst:13 +msgid "" +"Create a new get-set descriptor for extension type *type* from " +"the :c:type:`PyGetSetDef` structure *getset*." +msgstr "" + +#: c-api/descriptor.rst:16 +msgid "" +"Get-set descriptors expose attributes implemented by C getter and setter " +"functions rather than stored directly in the instance. This is the same kind " +"of descriptor created for entries in :c:member:`~PyTypeObject.tp_getset`, " +"and it appears in Python as a :class:`types.GetSetDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:34 c-api/descriptor.rst:96 c-api/descriptor.rst:118 +msgid "" +"On success, return a :term:`strong reference` to the descriptor. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/descriptor.rst:26 +msgid "" +"Create a new member descriptor for extension type *type* from " +"the :c:type:`PyMemberDef` structure *member*." +msgstr "" + +#: c-api/descriptor.rst:29 +msgid "" +"Member descriptors expose fields in the type's C struct as Python " +"attributes. This is the same kind of descriptor created for entries " +"in :c:member:`~PyTypeObject.tp_members`, and it appears in Python as " +"a :class:`types.MemberDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:39 +msgid "" +"The type object for member descriptor objects created " +"from :c:type:`PyMemberDef` structures. These descriptors expose fields of a " +"C struct as attributes on a type, and correspond " +"to :class:`types.MemberDescriptorType` objects in Python." +msgstr "" + +#: c-api/descriptor.rst:48 +msgid "" +"The type object for get/set descriptor objects created " +"from :c:type:`PyGetSetDef` structures. These descriptors implement " +"attributes whose value is computed by C getter and setter functions, and are " +"used for many built-in type attributes. They correspond " +"to :class:`types.GetSetDescriptorType` objects in Python." +msgstr "" + +#: c-api/descriptor.rst:57 +msgid "" +"Create a new method descriptor for extension type *type* from " +"the :c:type:`PyMethodDef` structure *meth*." +msgstr "" -#: c-api/descriptor.rst:35 +#: c-api/descriptor.rst:60 +msgid "" +"Method descriptors expose C functions as methods on a type. This is the same " +"kind of descriptor created for entries " +"in :c:member:`~PyTypeObject.tp_methods`, and it appears in Python as " +"a :class:`types.MethodDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:70 +msgid "" +"The type object for method descriptor objects created " +"from :c:type:`PyMethodDef` structures. These descriptors expose C functions " +"as methods on a type, and correspond to :class:`types.MethodDescriptorType` " +"objects in Python." +msgstr "" + +#: c-api/descriptor.rst:78 +msgid "Describes a slot wrapper used by :c:func:`PyDescr_NewWrapper`." +msgstr "" + +#: c-api/descriptor.rst:80 +msgid "" +"Each ``wrapperbase`` record stores the Python-visible name and metadata for " +"a special method implemented by a type slot, together with the wrapper " +"function used to adapt that slot to Python's calling convention." +msgstr "" + +#: c-api/descriptor.rst:86 +msgid "" +"Create a new wrapper descriptor for extension type *type* from " +"the :c:struct:`wrapperbase` structure *base* and the wrapped slot function " +"pointer *wrapped*." +msgstr "" + +#: c-api/descriptor.rst:91 +msgid "" +"Wrapper descriptors expose special methods implemented by type slots. This " +"is the same kind of descriptor that CPython creates for slot-based special " +"methods such as ``__repr__`` or ``__add__``, and it appears in Python as " +"a :class:`types.WrapperDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:101 +msgid "" +"The type object for wrapper descriptor objects created " +"by :c:func:`PyDescr_NewWrapper` and :c:func:`PyWrapper_New`. Wrapper " +"descriptors are used internally to expose special methods implemented via " +"wrapper structures, and appear in Python " +"as :class:`types.WrapperDescriptorType` objects." +msgstr "" + +#: c-api/descriptor.rst:110 +msgid "" +"Create a new class method descriptor for extension type *type* from " +"the :c:type:`PyMethodDef` structure *method*." +msgstr "" + +#: c-api/descriptor.rst:113 +msgid "" +"Class method descriptors expose C methods that receive the class rather than " +"an instance when accessed. This is the same kind of descriptor created for " +"``METH_CLASS`` entries in :c:member:`~PyTypeObject.tp_methods`, and it " +"appears in Python as a :class:`types.ClassMethodDescriptorType` object." +msgstr "" + +#: c-api/descriptor.rst:123 #, fuzzy msgid "" -"Return non-zero if the descriptor objects *descr* describes a data " -"attribute, or ``0`` if it describes a method. *descr* must be a descriptor " -"object; there is no error checking." +"Return non-zero if the descriptor object *descr* describes a data attribute, " +"or ``0`` if it describes a method. *descr* must be a descriptor object; " +"there is no error checking." msgstr "" "Renvoie vrai si le descripteur *descr* décrit un attribut de donnée, ou faux " "s'il décrit une méthode. *descr* doit être un objet descripteur. Il n'y a " "pas de vérification d'erreur." + +#: c-api/descriptor.rst:130 +msgid "" +"Create a new bound wrapper object from the wrapper descriptor *d* and the " +"instance *self*." +msgstr "" + +#: c-api/descriptor.rst:133 +msgid "" +"This is the bound form of a wrapper descriptor created " +"by :c:func:`PyDescr_NewWrapper`. CPython creates these objects when a slot " +"wrapper is accessed through an instance, and they appear in Python " +"as :class:`types.MethodWrapperType` objects." +msgstr "" + +#: c-api/descriptor.rst:138 +msgid "" +"On success, return a :term:`strong reference` to the wrapper object. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/descriptor.rst:143 +msgid "This is a macro including the common fields for a descriptor object." +msgstr "" + +#: c-api/descriptor.rst:146 +msgid "" +"This was included in Python's C API by mistake; do not use it in extensions. " +"For creating custom descriptor objects, create a class implementing the " +"descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` " +"and :c:member:`~PyTypeObject.tp_descr_set`)." +msgstr "" + +#: c-api/descriptor.rst:155 +msgid "Built-in descriptors" +msgstr "" + +#: c-api/descriptor.rst:159 +msgid "" +"The type object for property objects. This is the same object " +"as :class:`property` in the Python layer." +msgstr "" + +#: c-api/descriptor.rst:165 +msgid "" +"The type object for super objects. This is the same object as :class:`super` " +"in the Python layer." +msgstr "" + +#: c-api/descriptor.rst:171 +msgid "" +"The type of class method objects. This is the same object " +"as :class:`classmethod` in the Python layer." +msgstr "" + +#: c-api/descriptor.rst:177 +msgid "" +"The type object for C-level class method descriptor objects. This is the " +"type of the descriptors created for :func:`classmethod` defined in C " +"extension types, and corresponds to :class:`types.ClassMethodDescriptorType` " +"objects in Python." +msgstr "" + +#: c-api/descriptor.rst:185 +msgid "" +"Create a new :class:`classmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." +msgstr "" + +#: c-api/descriptor.rst:188 +msgid "" +"On success, this function returns a :term:`strong reference` to a new class " +"method descriptor. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" + +#: c-api/descriptor.rst:195 +msgid "" +"The type of static method objects. This is the same object " +"as :class:`staticmethod` in the Python layer." +msgstr "" + +#: c-api/descriptor.rst:201 +msgid "" +"Create a new :class:`staticmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." +msgstr "" + +#: c-api/descriptor.rst:204 +msgid "" +"On success, this function returns a :term:`strong reference` to a new static " +"method descriptor. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" + +#~ msgid "The type object for the built-in descriptor types." +#~ msgstr "L'objet *type* des descripteurs natifs." diff --git a/c-api/dict.po b/c-api/dict.po index 40f9b15d1..a9b7028e9 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-07-03 11:36+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -15,7 +15,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/dict.rst:6 -msgid "Dictionary Objects" +#, fuzzy +msgid "Dictionary objects" msgstr "Objets dictionnaires" #: c-api/dict.rst:13 @@ -32,8 +33,8 @@ msgid "" "type. This is the same object as :class:`dict` in the Python layer." msgstr "" "Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " -"virgule flottante en Python. C'est le même objet que la classe :class:" -"`float` de la couche Python." +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." #: c-api/dict.rst:24 msgid "" @@ -58,132 +59,188 @@ msgid "" "modification of the dictionary for non-dynamic class types." msgstr "" -#: c-api/dict.rst:48 +#: c-api/dict.rst:45 +msgid "" +"The first argument can be a :class:`dict`, a :class:`frozendict`, or a " +"mapping." +msgstr "" + +#: c-api/dict.rst:98 c-api/dict.rst:196 c-api/dict.rst:239 c-api/dict.rst:337 +#: c-api/dict.rst:358 c-api/dict.rst:379 c-api/dict.rst:453 +msgid "Also accept :class:`frozendict`." +msgstr "" + +#: c-api/dict.rst:54 +msgid "" +"The type object for mapping proxy objects created " +"by :c:func:`PyDictProxy_New` and for the read-only ``__dict__`` attribute of " +"many built-in types. A :c:type:`PyDictProxy_Type` instance provides a " +"dynamic, read-only view of an underlying dictionary: changes to the " +"underlying dictionary are reflected in the proxy, but the proxy itself does " +"not support mutation operations. This corresponds " +"to :class:`types.MappingProxyType` in Python." +msgstr "" + +#: c-api/dict.rst:65 msgid "Empty an existing dictionary of all key-value pairs." msgstr "" -#: c-api/dict.rst:53 +#: c-api/dict.rst:67 msgid "" -"Determine if dictionary *p* contains *key*. If an item in *p* is matches " +"Do nothing if the argument is not a :class:`dict` or a :class:`!dict` " +"subclass." +msgstr "" + +#: c-api/dict.rst:73 +msgid "" +"Determine if dictionary *p* contains *key*. If an item in *p* matches " "*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " "is equivalent to the Python expression ``key in p``." msgstr "" -#: c-api/dict.rst:60 +#: c-api/dict.rst:156 c-api/dict.rst:335 c-api/dict.rst:356 c-api/dict.rst:396 +msgid "The first argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: c-api/dict.rst:135 c-api/dict.rst:294 c-api/dict.rst:316 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` " +"or :class:`bytes`." +msgstr "" + +#: c-api/dict.rst:90 msgid "" -"This is the same as :c:func:`PyDict_Contains`, but *key* is specified as a :" -"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyDict_Contains`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:69 +#: c-api/dict.rst:104 msgid "Return a new dictionary that contains the same key-value pairs as *p*." msgstr "" -#: c-api/dict.rst:74 +#: c-api/dict.rst:108 msgid "" -"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" -"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " -"on success or ``-1`` on failure. This function *does not* steal a reference " -"to *val*." +"Insert *val* into the dictionary *p* with a key of *key*. *key* must " +"be :term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return " +"``0`` on success or ``-1`` on failure. This function *does not* steal a " +"reference to *val*." msgstr "" -#: c-api/dict.rst:82 +#: c-api/dict.rst:121 msgid "" -"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:" -"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:89 +#: c-api/dict.rst:128 msgid "" -"Remove the entry in dictionary *p* with key *key*. *key* must be :term:" -"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " -"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on " -"failure." +"Remove the entry in dictionary *p* with key *key*. *key* must " +"be :term:`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is " +"not in the dictionary, :exc:`KeyError` is raised. Return ``0`` on success or " +"``-1`` on failure." msgstr "" -#: c-api/dict.rst:97 +#: c-api/dict.rst:141 msgid "" -"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:" -"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:104 +#: c-api/dict.rst:148 msgid "" "Return a new :term:`strong reference` to the object from dictionary *p* " "which has a key *key*:" msgstr "" -#: c-api/dict.rst:107 +#: c-api/dict.rst:151 msgid "" "If the key is present, set *\\*result* to a new :term:`strong reference` to " "the value and return ``1``." msgstr "" -#: c-api/dict.rst:109 +#: c-api/dict.rst:153 msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: c-api/dict.rst:207 -msgid "On error, raise an exception and return ``-1``." +#: c-api/dict.rst:154 +msgid "" +"On error, raise an exception, set *\\*result* to ``NULL`` and return ``-1``." msgstr "" -#: c-api/dict.rst:114 +#: c-api/dict.rst:168 msgid "See also the :c:func:`PyObject_GetItem` function." msgstr "" -#: c-api/dict.rst:119 +#: c-api/dict.rst:173 msgid "" "Return a :term:`borrowed reference` to the object from dictionary *p* which " "has a key *key*. Return ``NULL`` if the key *key* is missing *without* " "setting an exception." msgstr "" -#: c-api/dict.rst:125 +#: c-api/dict.rst:181 +msgid "" +"Exceptions that occur while this calls :meth:`~object.__hash__` " +"and :meth:`~object.__eq__` methods are silently ignored. Prefer " +"the :c:func:`PyDict_GetItemWithError` function instead." +msgstr "" + +#: c-api/dict.rst:209 msgid "" -"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" -"`~object.__eq__` methods are silently ignored. Prefer the :c:func:" -"`PyDict_GetItemWithError` function instead." +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemRef`, which returns a :term:`strong reference`." msgstr "" -#: c-api/dict.rst:129 +#: c-api/dict.rst:192 msgid "" -"Calling this API without :term:`GIL` held had been allowed for historical " -"reason. It is no longer allowed." +"Calling this API without an :term:`attached thread state` had been allowed " +"for historical reason. It is no longer allowed." msgstr "" -#: c-api/dict.rst:136 +#: c-api/dict.rst:202 msgid "" "Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " "Return ``NULL`` **with** an exception set if an exception occurred. Return " "``NULL`` **without** an exception set if the key wasn't present." msgstr "" -#: c-api/dict.rst:144 +#: c-api/dict.rst:220 msgid "" -"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" -"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:150 +#: c-api/dict.rst:226 msgid "" -"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" -"`~object.__eq__` methods or while creating the temporary :class:`str` object " -"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` " -"function with your own :c:func:`PyUnicode_FromString` *key* instead." +"Exceptions that occur while this calls :meth:`~object.__hash__` " +"and :meth:`~object.__eq__` methods or while creating the " +"temporary :class:`str` object are silently ignored. Prefer using " +"the :c:func:`PyDict_GetItemWithError` function with your " +"own :c:func:`PyUnicode_FromString` *key* instead." msgstr "" -#: c-api/dict.rst:159 +#: c-api/dict.rst:234 msgid "" -"Similar than :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:" -"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemStringRef`, which returns a :term:`strong " +"reference`." msgstr "" -#: c-api/dict.rst:168 +#: c-api/dict.rst:245 +msgid "" +"Similar to :c:func:`PyDict_GetItemRef`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +#: c-api/dict.rst:257 msgid "" "This is the same as the Python-level :meth:`dict.setdefault`. If present, " "it returns the value corresponding to *key* from the dictionary *p*. If the " @@ -193,7 +250,15 @@ msgid "" "the insertion." msgstr "" -#: c-api/dict.rst:179 +#: c-api/dict.rst:267 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_SetDefaultRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +#: c-api/dict.rst:276 msgid "" "Inserts *default_value* into the dictionary *p* with a key of *key* if the " "key is not already present in the dictionary. If *result* is not ``NULL``, " @@ -205,7 +270,7 @@ msgid "" "exception, and sets ``*result`` to ``NULL``." msgstr "" -#: c-api/dict.rst:189 +#: c-api/dict.rst:286 msgid "" "For clarity: if you have a strong reference to *default_value* before " "calling this function, then after it returns, you hold a strong reference to " @@ -213,91 +278,119 @@ msgid "" "to the same object: in that case you hold two separate references to it." msgstr "" -#: c-api/dict.rst:200 +#: c-api/dict.rst:302 msgid "" "Remove *key* from dictionary *p* and optionally return the removed value. Do " -"not raise :exc:`KeyError` if the key missing." +"not raise :exc:`KeyError` if the key is missing." msgstr "" -#: c-api/dict.rst:203 +#: c-api/dict.rst:305 msgid "" "If the key is present, set *\\*result* to a new reference to the removed " "value if *result* is not ``NULL``, and return ``1``." msgstr "" -#: c-api/dict.rst:205 +#: c-api/dict.rst:307 msgid "" "If the key is missing, set *\\*result* to ``NULL`` if *result* is not " "``NULL``, and return ``0``." msgstr "" -#: c-api/dict.rst:209 +#: c-api/dict.rst:309 +msgid "On error, raise an exception and return ``-1``." +msgstr "" + +#: c-api/dict.rst:311 msgid "" -"This is similar to :meth:`dict.pop`, but without the default value and not " -"raising :exc:`KeyError` if the key missing." +"Similar to :meth:`dict.pop`, but without the default value and not " +"raising :exc:`KeyError` if the key is missing." msgstr "" -#: c-api/dict.rst:217 +#: c-api/dict.rst:324 msgid "" "Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const " "char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "" -#: c-api/dict.rst:226 +#: c-api/dict.rst:333 msgid "" "Return a :c:type:`PyListObject` containing all the items from the dictionary." msgstr "" -#: c-api/dict.rst:231 +#: c-api/dict.rst:343 msgid "" "Return a :c:type:`PyListObject` containing all the keys from the dictionary." msgstr "" -#: c-api/dict.rst:236 +#: c-api/dict.rst:353 msgid "" "Return a :c:type:`PyListObject` containing all the values from the " "dictionary *p*." msgstr "" -#: c-api/dict.rst:244 +#: c-api/dict.rst:366 msgid "" "Return the number of items in the dictionary. This is equivalent to " "``len(p)`` on a dictionary." msgstr "" -#: c-api/dict.rst:250 +#: c-api/dict.rst:369 +msgid "The argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: c-api/dict.rst:377 +msgid "Similar to :c:func:`PyDict_Size`, but without error checking." +msgstr "" + +#: c-api/dict.rst:385 msgid "" -"Iterate over all key-value pairs in the dictionary *p*. The :c:type:" -"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " -"first call to this function to start the iteration; the function returns " -"true for each pair in the dictionary, and false once all pairs have been " -"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:" -"`PyObject*` variables that will be filled in with each key and value, " -"respectively, or may be ``NULL``. Any references returned through them are " -"borrowed. *ppos* should not be altered during iteration. Its value " -"represents offsets within the internal dictionary structure, and since the " -"structure is sparse, the offsets are not consecutive." +"Iterate over all key-value pairs in the dictionary *p*. " +"The :c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` " +"prior to the first call to this function to start the iteration; the " +"function returns true for each pair in the dictionary, and false once all " +"pairs have been reported. The parameters *pkey* and *pvalue* should either " +"point to :c:expr:`PyObject*` variables that will be filled in with each key " +"and value, respectively, or may be ``NULL``. Any references returned " +"through them are borrowed. *ppos* should not be altered during iteration. " +"Its value represents offsets within the internal dictionary structure, and " +"since the structure is sparse, the offsets are not consecutive." msgstr "" -#: c-api/dict.rst:261 +#: c-api/dict.rst:398 msgid "For example::" msgstr "Par exemple ::" -#: c-api/dict.rst:271 +#: c-api/dict.rst:408 msgid "" "The dictionary *p* should not be mutated during iteration. It is safe to " "modify the values of the keys as you iterate over the dictionary, but only " "so long as the set of keys does not change. For example::" msgstr "" -#: c-api/dict.rst:293 +#: c-api/dict.rst:430 msgid "" "The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:" -"`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" +"threading>` build without external synchronization for a " +"mutable :class:`dict`. You can use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to " +"lock the dictionary while iterating over it::" msgstr "" -#: c-api/dict.rst:307 +#: c-api/dict.rst:441 +msgid "The function is thread-safe on a :class:`frozendict`." +msgstr "" + +#: c-api/dict.rst:445 +msgid "" +"On the free-threaded build, this function can be used safely inside a " +"critical section. However, the references returned for *pkey* and *pvalue* " +"are :term:`borrowed ` and are only valid while the " +"critical section is held. If you need to use these objects outside the " +"critical section or when the critical section can be suspended, create " +"a :term:`strong reference ` (for example, " +"using :c:func:`Py_NewRef`)." +msgstr "" + +#: c-api/dict.rst:458 msgid "" "Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " "*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " @@ -307,16 +400,24 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" -#: c-api/dict.rst:317 +#: c-api/dict.rst:483 +msgid "" +"In the :term:`free-threaded build`, when *b* is a :class:`dict` (with the " +"standard iterator), both *a* and *b* are locked for the duration of the " +"operation. When *b* is a non-dict mapping, only *a* is locked; *b* may be " +"concurrently modified by another thread." +msgstr "" + +#: c-api/dict.rst:475 msgid "" -"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." -"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " -"to the iterating over a sequence of key value pairs if the second argument " -"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " +"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to " +"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall " +"back to the iterating over a sequence of key value pairs if the second " +"argument has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " "exception was raised." msgstr "" -#: c-api/dict.rst:326 +#: c-api/dict.rst:491 msgid "" "Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " "*seq2* must be an iterable object producing iterable objects of length 2, " @@ -325,7 +426,14 @@ msgid "" "if an exception was raised. Equivalent Python (except for the return value)::" msgstr "" -#: c-api/dict.rst:340 +#: c-api/dict.rst:505 +msgid "" +"In the :term:`free-threaded ` build, only *a* is locked. The " +"iteration over *seq2* is not synchronized; *seq2* may be concurrently " +"modified by another thread." +msgstr "" + +#: c-api/dict.rst:512 msgid "" "Register *callback* as a dictionary watcher. Return a non-negative integer " "id which must be passed to future calls to :c:func:`PyDict_Watch`. In case " @@ -333,21 +441,29 @@ msgid "" "exception." msgstr "" -#: c-api/dict.rst:349 +#: c-api/dict.rst:534 +msgid "" +"This function is not internally synchronized. In the :term:`free-threaded " +"` build, callers should ensure no concurrent calls " +"to :c:func:`PyDict_AddWatcher` or :c:func:`PyDict_ClearWatcher` are in " +"progress." +msgstr "" + +#: c-api/dict.rst:528 msgid "" -"Clear watcher identified by *watcher_id* previously returned from :c:func:" -"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the " -"given *watcher_id* was never registered.)" +"Clear watcher identified by *watcher_id* previously returned " +"from :c:func:`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error " +"(e.g. if the given *watcher_id* was never registered.)" msgstr "" -#: c-api/dict.rst:357 +#: c-api/dict.rst:543 msgid "" -"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:" -"func:`PyDict_AddWatcher` will be called when *dict* is modified or " +"Mark dictionary *dict* as watched. The callback granted *watcher_id* " +"by :c:func:`PyDict_AddWatcher` will be called when *dict* is modified or " "deallocated. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:365 +#: c-api/dict.rst:551 msgid "" "Mark dictionary *dict* as no longer watched. The callback granted " "*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " @@ -355,7 +471,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" -#: c-api/dict.rst:374 +#: c-api/dict.rst:560 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -363,11 +479,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" -#: c-api/dict.rst:382 +#: c-api/dict.rst:568 msgid "Type of a dict watcher callback function." msgstr "" -#: c-api/dict.rst:384 +#: c-api/dict.rst:570 msgid "" "If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both " "*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` " @@ -376,7 +492,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" -#: c-api/dict.rst:390 +#: c-api/dict.rst:576 msgid "" "``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another " "dict is merged into it. To maintain efficiency of this operation, per-key " @@ -384,14 +500,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" -#: c-api/dict.rst:396 +#: c-api/dict.rst:582 msgid "" "The callback may inspect but must not modify *dict*; doing so could have " "unpredictable effects, including infinite recursion. Do not trigger Python " "code execution in the callback, as it could modify the dict as a side effect." msgstr "" -#: c-api/dict.rst:400 +#: c-api/dict.rst:586 msgid "" "If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the " "callback to the about-to-be-destroyed dictionary will resurrect it and " @@ -400,20 +516,20 @@ msgid "" "again." msgstr "" -#: c-api/dict.rst:406 +#: c-api/dict.rst:592 msgid "" "Callbacks occur before the notified modification to *dict* takes place, so " "the prior state of *dict* can be inspected." msgstr "" -#: c-api/dict.rst:409 +#: c-api/dict.rst:595 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " -"will be printed as an unraisable exception using :c:func:" -"`PyErr_WriteUnraisable`. Otherwise it should return ``0``." +"will be printed as an unraisable exception " +"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: c-api/dict.rst:413 +#: c-api/dict.rst:599 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -422,12 +538,220 @@ msgid "" "it before returning." msgstr "" -#~ msgid "object" -#~ msgstr "objet" +#: c-api/dict.rst:609 +#, fuzzy +msgid "Dictionary view objects" +msgstr "Objets dictionnaires" +#: c-api/dict.rst:613 +msgid "" +"Return true if *op* is a view of a set inside a dictionary. This is " +"currently equivalent to :c:expr:`PyDictKeys_Check(op) || " +"PyDictItems_Check(op)`. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:620 +msgid "" +"Type object for a view of dictionary keys. In Python, this is the type of " +"the object returned by :meth:`dict.keys`." +msgstr "" + +#: c-api/dict.rst:626 +msgid "" +"Return true if *op* is an instance of a dictionary keys view. This function " +"always succeeds." +msgstr "" + +#: c-api/dict.rst:632 +msgid "" +"Type object for a view of dictionary values. In Python, this is the type of " +"the object returned by :meth:`dict.values`." +msgstr "" + +#: c-api/dict.rst:638 +msgid "" +"Return true if *op* is an instance of a dictionary values view. This " +"function always succeeds." +msgstr "" + +#: c-api/dict.rst:644 +msgid "" +"Type object for a view of dictionary items. In Python, this is the type of " +"the object returned by :meth:`dict.items`." +msgstr "" + +#: c-api/dict.rst:650 +msgid "" +"Return true if *op* is an instance of a dictionary items view. This function " +"always succeeds." +msgstr "" + +#: c-api/dict.rst:655 +#, fuzzy +msgid "Frozen dictionary objects" +msgstr "Objets dictionnaires" + +#: c-api/dict.rst:662 #, fuzzy -#~ msgid "dictionary" -#~ msgstr "Objets dictionnaires" +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python frozen " +"dictionary type. This is the same object as :class:`frozendict` in the " +"Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." + +#: c-api/dict.rst:669 +msgid "" +"Return true if *p* is a :class:`dict` object, a :class:`frozendict` object, " +"or an instance of a subtype of the :class:`!dict` or :class:`!frozendict` " +"type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:677 +msgid "" +"Return true if *p* is a :class:`dict` object or a :class:`frozendict` " +"object, but not an instance of a subtype of the :class:`!dict` or :class:`!" +"frozendict` type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:685 +msgid "" +"Return true if *p* is a :class:`frozendict` object or an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:692 +msgid "" +"Return true if *p* is a :class:`frozendict` object, but not an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:699 +msgid "" +"Return a new :class:`frozendict` from an iterable, or ``NULL`` on failure " +"with an exception set." +msgstr "" + +#: c-api/dict.rst:702 +msgid "Create an empty dictionary if *iterable* is ``NULL``." +msgstr "" + +#: c-api/dict.rst:706 +#, fuzzy +msgid "Ordered dictionaries" +msgstr "Objets dictionnaires" + +#: c-api/dict.rst:708 +msgid "" +"Python's C API provides interface for :class:`collections.OrderedDict` from " +"C. Since Python 3.7, dictionaries are ordered by default, so there is " +"usually little need for these functions; prefer ``PyDict*`` where possible." +msgstr "" + +#: c-api/dict.rst:715 +#, fuzzy +msgid "" +"Type object for ordered dictionaries. This is the same object " +"as :class:`collections.OrderedDict` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." + +#: c-api/dict.rst:721 +msgid "" +"Return true if *od* is an ordered dictionary object or an instance of a " +"subtype of the :class:`~collections.OrderedDict` type. This function always " +"succeeds." +msgstr "" + +#: c-api/dict.rst:728 +msgid "" +"Return true if *od* is an ordered dictionary object, but not an instance of " +"a subtype of the :class:`~collections.OrderedDict` type. This function " +"always succeeds." +msgstr "" + +#: c-api/dict.rst:735 +msgid "Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries." +msgstr "" + +#: c-api/dict.rst:740 +msgid "Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries." +msgstr "" + +#: c-api/dict.rst:745 +msgid "Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries." +msgstr "" + +#: c-api/dict.rst:750 +msgid "Return a new empty ordered dictionary, or ``NULL`` on failure." +msgstr "" + +#: c-api/dict.rst:752 +msgid "This is analogous to :c:func:`PyDict_New`." +msgstr "" + +#: c-api/dict.rst:757 +msgid "" +"Insert *value* into the ordered dictionary *od* with a key of *key*. Return " +"``0`` on success or ``-1`` with an exception set on failure." +msgstr "" + +#: c-api/dict.rst:760 +msgid "This is analogous to :c:func:`PyDict_SetItem`." +msgstr "" + +#: c-api/dict.rst:765 +msgid "" +"Remove the entry in the ordered dictionary *od* with key *key*. Return ``0`` " +"on success or ``-1`` with an exception set on failure." +msgstr "" + +#: c-api/dict.rst:768 +msgid "This is analogous to :c:func:`PyDict_DelItem`." +msgstr "" + +#: c-api/dict.rst:771 +msgid "These are :term:`soft deprecated` aliases to ``PyDict`` APIs:" +msgstr "" + +#: c-api/dict.rst:778 +msgid "``PyODict``" +msgstr "" + +#: c-api/dict.rst:779 +msgid "``PyDict``" +msgstr "" + +#: c-api/dict.rst:781 +msgid ":c:func:`PyDict_GetItem`" +msgstr "" + +#: c-api/dict.rst:783 +msgid ":c:func:`PyDict_GetItemWithError`" +msgstr "" + +#: c-api/dict.rst:785 +msgid ":c:func:`PyDict_GetItemString`" +msgstr "" + +#: c-api/dict.rst:787 +msgid ":c:func:`PyDict_Contains`" +msgstr "" + +#: c-api/dict.rst:789 +msgid ":c:func:`PyDict_Size`" +msgstr "" + +#: c-api/dict.rst:791 +msgid ":c:func:`PyDict_GET_SIZE`" +msgstr "" + +#~ msgid "object" +#~ msgstr "objet" #~ msgid "built-in function" #~ msgstr "fonction native" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index bbfa208fd..7f5ffe526 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-10-04 12:24+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -90,9 +90,9 @@ msgstr "" msgid "" "If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is set " "to the printed exception. For backwards compatibility, the deprecated " -"variables :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." -"last_traceback` are also set to the type, value and traceback of this " -"exception, respectively." +"variables :data:`sys.last_type`, :data:`sys.last_value` " +"and :data:`sys.last_traceback` are also set to the type, value and traceback " +"of this exception, respectively." msgstr "" #: c-api/exceptions.rst:69 @@ -182,8 +182,8 @@ msgstr "" msgid "" "This function sets the error indicator and returns ``NULL``. *exception* " "should be a Python exception class. The *format* and subsequent parameters " -"help format the error message; they have the same meaning and values as in :" -"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." +"help format the error message; they have the same meaning and values as " +"in :c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." msgstr "" #: c-api/exceptions.rst:156 @@ -215,13 +215,14 @@ msgid "" "This is a convenience function to raise an exception when a C library " "function has returned an error and set the C variable :c:data:`errno`. It " "constructs a tuple object whose first item is the integer :c:data:`errno` " -"value and whose second item is the corresponding error message (gotten from :" -"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On " -"Unix, when the :c:data:`errno` value is :c:macro:`!EINTR`, indicating an " -"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " -"that set the error indicator, leaves it set to that. The function always " -"returns ``NULL``, so a wrapper function around a system call can write " -"``return PyErr_SetFromErrno(type);`` when the system call returns an error." +"value and whose second item is the corresponding error message (gotten " +"from :c:func:`!strerror`), and then calls ``PyErr_SetObject(type, " +"object)``. On Unix, when the :c:data:`errno` value is :c:macro:`!EINTR`, " +"indicating an interrupted system call, this " +"calls :c:func:`PyErr_CheckSignals`, and if that set the error indicator, " +"leaves it set to that. The function always returns ``NULL``, so a wrapper " +"function around a system call can write ``return PyErr_SetFromErrno(type);`` " +"when the system call returns an error." msgstr "" #: c-api/exceptions.rst:199 @@ -262,7 +263,7 @@ msgstr "" #: c-api/exceptions.rst:242 c-api/exceptions.rst:263 c-api/exceptions.rst:281 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: c-api/exceptions.rst:239 msgid "" @@ -274,9 +275,9 @@ msgstr "" msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " "that if *filename* is not ``NULL``, it is decoded from the filesystem " -"encoding (:func:`os.fsdecode`) and passed to the constructor of :exc:" -"`OSError` as a third parameter to be used to define the :attr:`!filename` " -"attribute of the exception instance." +"encoding (:func:`os.fsdecode`) and passed to the constructor " +"of :exc:`OSError` as a third parameter to be used to define the :attr:`!" +"filename` attribute of the exception instance." msgstr "" #: c-api/exceptions.rst:258 @@ -323,17 +324,23 @@ msgstr "" #: c-api/exceptions.rst:314 msgid "" +"Similar to :c:func:`PyErr_SyntaxLocationObject`, but also sets the " +"*end_lineno* and *end_col_offset* information for the current exception." +msgstr "" + +#: c-api/exceptions.rst:322 +msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:322 +#: c-api/exceptions.rst:330 msgid "" "Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" -#: c-api/exceptions.rst:328 +#: c-api/exceptions.rst:336 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -341,11 +348,30 @@ msgid "" "use." msgstr "" -#: c-api/exceptions.rst:335 +#: c-api/exceptions.rst:344 +msgid "" +"Get the source line in *filename* at line *lineno*. *filename* should be a " +"Python :class:`str` object." +msgstr "" + +#: c-api/exceptions.rst:347 +msgid "" +"On success, this function returns a Python string object with the found " +"line. On failure, this function returns ``NULL`` without an exception set." +msgstr "" + +#: c-api/exceptions.rst:353 +msgid "" +"Similar to :c:func:`PyErr_ProgramTextObject`, but *filename* is " +"a :c:expr:`const char *`, which is decoded with the :term:`filesystem " +"encoding and error handler`, instead of a Python object reference." +msgstr "" + +#: c-api/exceptions.rst:360 msgid "Issuing warnings" msgstr "" -#: c-api/exceptions.rst:337 +#: c-api/exceptions.rst:362 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -361,94 +387,104 @@ msgid "" "return an error value)." msgstr "" -#: c-api/exceptions.rst:352 +#: c-api/exceptions.rst:377 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " "*stack_level* is a positive number giving a number of stack frames; the " "warning will be issued from the currently executing line of code in that " -"stack frame. A *stack_level* of 1 is the function calling :c:func:" -"`PyErr_WarnEx`, 2 is the function above that, and so forth." +"stack frame. A *stack_level* of 1 is the function " +"calling :c:func:`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" -#: c-api/exceptions.rst:359 +#: c-api/exceptions.rst:384 msgid "" -"Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" -"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " -"warning category is :c:data:`PyExc_RuntimeWarning`. The standard Python " -"warning categories are available as global variables whose names are " -"enumerated at :ref:`standardwarningcategories`." +"Warning categories must be subclasses " +"of :c:data:`PyExc_Warning`; :c:data:`PyExc_Warning` is a subclass " +"of :c:data:`PyExc_Exception`; the default warning category " +"is :c:data:`PyExc_RuntimeWarning`. The standard Python warning categories " +"are available as global variables whose names are enumerated " +"at :ref:`standardwarningcategories`." msgstr "" -#: c-api/exceptions.rst:365 +#: c-api/exceptions.rst:390 msgid "" -"For information about warning control, see the documentation for the :mod:" -"`warnings` module and the :option:`-W` option in the command line " +"For information about warning control, see the documentation for " +"the :mod:`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" -#: c-api/exceptions.rst:372 +#: c-api/exceptions.rst:397 msgid "" "Issue a warning message with explicit control over all warning attributes. " -"This is a straightforward wrapper around the Python function :func:`warnings." -"warn_explicit`; see there for more information. The *module* and *registry* " -"arguments may be set to ``NULL`` to get the default effect described there." +"This is a straightforward wrapper around the Python " +"function :func:`warnings.warn_explicit`; see there for more information. " +"The *module* and *registry* arguments may be set to ``NULL`` to get the " +"default effect described there." msgstr "" -#: c-api/exceptions.rst:383 +#: c-api/exceptions.rst:408 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " -"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" -"`filesystem encoding and error handler`." +"*module* are UTF-8 encoded strings, and *filename* is decoded from " +"the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:390 +#: c-api/exceptions.rst:415 +msgid "" +"Function similar to :c:func:`PyErr_WarnEx`, but " +"uses :c:func:`PyUnicode_FromFormat` to format the warning message. *format* " +"is an ASCII-encoded string." +msgstr "" + +#: c-api/exceptions.rst:424 msgid "" -"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" -"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" -"encoded string." +"Similar to :c:func:`PyErr_WarnExplicit`, but " +"uses :c:func:`PyUnicode_FromFormat` to format the warning message. *format* " +"is an ASCII-encoded string." msgstr "" -#: c-api/exceptions.rst:399 +#: c-api/exceptions.rst:433 msgid "" -"Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" -"`ResourceWarning` and it passes *source* to :class:`!warnings." -"WarningMessage`." +"Function similar to :c:func:`PyErr_WarnFormat`, but *category* " +"is :exc:`ResourceWarning` and it passes *source* to :class:`!" +"warnings.WarningMessage`." msgstr "" -#: c-api/exceptions.rst:406 +#: c-api/exceptions.rst:440 msgid "Querying the error indicator" msgstr "" -#: c-api/exceptions.rst:410 +#: c-api/exceptions.rst:444 msgid "" "Test whether the error indicator is set. If set, return the exception " "*type* (the first argument to the last call to one of the ``PyErr_Set*`` " "functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You " -"do not own a reference to the return value, so you do not need to :c:func:" -"`Py_DECREF` it." +"do not own a reference to the return value, so you do not need " +"to :c:func:`Py_DECREF` it." msgstr "" -#: c-api/exceptions.rst:416 -msgid "The caller must hold the GIL." +#: c-api/exceptions.rst:450 +msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: c-api/exceptions.rst:420 +#: c-api/exceptions.rst:454 msgid "" -"Do not compare the return value to a specific exception; use :c:func:" -"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " -"fail since the exception may be an instance instead of a class, in the case " -"of a class exception, or it may be a subclass of the expected exception.)" +"Do not compare the return value to a specific exception; " +"use :c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison " +"could easily fail since the exception may be an instance instead of a class, " +"in the case of a class exception, or it may be a subclass of the expected " +"exception.)" msgstr "" -#: c-api/exceptions.rst:428 +#: c-api/exceptions.rst:462 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" -#: c-api/exceptions.rst:435 +#: c-api/exceptions.rst:469 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -456,43 +492,43 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" -#: c-api/exceptions.rst:443 +#: c-api/exceptions.rst:477 msgid "" "Return the exception currently being raised, clearing the error indicator at " "the same time. Return ``NULL`` if the error indicator is not set." msgstr "" -#: c-api/exceptions.rst:446 +#: c-api/exceptions.rst:480 msgid "" "This function is used by code that needs to catch exceptions, or code that " "needs to save and restore the error indicator temporarily." msgstr "" -#: c-api/exceptions.rst:493 +#: c-api/exceptions.rst:527 msgid "For example::" msgstr "Par exemple ::" -#: c-api/exceptions.rst:459 +#: c-api/exceptions.rst:493 msgid "" ":c:func:`PyErr_GetHandledException`, to save the exception currently being " "handled." msgstr "" -#: c-api/exceptions.rst:467 +#: c-api/exceptions.rst:501 msgid "" "Set *exc* as the exception currently being raised, clearing the existing " "exception if one is set." msgstr "" -#: c-api/exceptions.rst:472 +#: c-api/exceptions.rst:506 msgid "This call steals a reference to *exc*, which must be a valid exception." msgstr "" -#: c-api/exceptions.rst:481 +#: c-api/exceptions.rst:515 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: c-api/exceptions.rst:483 +#: c-api/exceptions.rst:517 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -501,17 +537,17 @@ msgid "" "the type object is not." msgstr "" -#: c-api/exceptions.rst:490 +#: c-api/exceptions.rst:524 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" -#: c-api/exceptions.rst:509 +#: c-api/exceptions.rst:543 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: c-api/exceptions.rst:511 +#: c-api/exceptions.rst:545 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -524,20 +560,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" -#: c-api/exceptions.rst:525 +#: c-api/exceptions.rst:559 msgid "" "This function is normally only used by legacy code that needs to save and " "restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " "the current error indicator." msgstr "" -#: c-api/exceptions.rst:534 +#: c-api/exceptions.rst:568 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" -#: c-api/exceptions.rst:537 +#: c-api/exceptions.rst:571 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -547,22 +583,24 @@ msgid "" "improve performance." msgstr "" -#: c-api/exceptions.rst:545 +#: c-api/exceptions.rst:579 msgid "" -"This function *does not* implicitly set the :attr:`~BaseException." -"__traceback__` attribute on the exception value. If setting the traceback " -"appropriately is desired, the following additional snippet is needed::" +"This function *does not* implicitly set " +"the :attr:`~BaseException.__traceback__` attribute on the exception value. " +"If setting the traceback appropriately is desired, the following additional " +"snippet is needed::" msgstr "" -#: c-api/exceptions.rst:557 +#: c-api/exceptions.rst:591 msgid "" -"Retrieve the active exception instance, as would be returned by :func:`sys." -"exception`. This refers to an exception that was *already caught*, not to an " -"exception that was freshly raised. Returns a new reference to the exception " -"or ``NULL``. Does not modify the interpreter's exception state." +"Retrieve the active exception instance, as would be returned " +"by :func:`sys.exception`. This refers to an exception that was *already " +"caught*, not to an exception that was freshly raised. Returns a new " +"reference to the exception or ``NULL``. Does not modify the interpreter's " +"exception state." msgstr "" -#: c-api/exceptions.rst:564 +#: c-api/exceptions.rst:598 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -570,14 +608,14 @@ msgid "" "clear the exception state." msgstr "" -#: c-api/exceptions.rst:573 +#: c-api/exceptions.rst:607 msgid "" "Set the active exception, as known from ``sys.exception()``. This refers to " "an exception that was *already caught*, not to an exception that was freshly " "raised. To clear the exception state, pass ``NULL``." msgstr "" -#: c-api/exceptions.rst:580 +#: c-api/exceptions.rst:614 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -585,17 +623,17 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:589 +#: c-api/exceptions.rst:623 msgid "" -"Retrieve the old-style representation of the exception info, as known from :" -"func:`sys.exc_info`. This refers to an exception that was *already caught*, " -"not to an exception that was freshly raised. Returns new references for the " -"three objects, any of which may be ``NULL``. Does not modify the exception " -"info state. This function is kept for backwards compatibility. Prefer " -"using :c:func:`PyErr_GetHandledException`." +"Retrieve the old-style representation of the exception info, as known " +"from :func:`sys.exc_info`. This refers to an exception that was *already " +"caught*, not to an exception that was freshly raised. Returns new " +"references for the three objects, any of which may be ``NULL``. Does not " +"modify the exception info state. This function is kept for backwards " +"compatibility. Prefer using :c:func:`PyErr_GetHandledException`." msgstr "" -#: c-api/exceptions.rst:598 +#: c-api/exceptions.rst:632 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -603,17 +641,17 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:608 +#: c-api/exceptions.rst:642 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " "raised. This function steals the references of the arguments. To clear the " "exception state, pass ``NULL`` for all three arguments. This function is " -"kept for backwards compatibility. Prefer using :c:func:" -"`PyErr_SetHandledException`." +"kept for backwards compatibility. Prefer " +"using :c:func:`PyErr_SetHandledException`." msgstr "" -#: c-api/exceptions.rst:617 +#: c-api/exceptions.rst:651 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -621,76 +659,118 @@ msgid "" "state." msgstr "" -#: c-api/exceptions.rst:624 +#: c-api/exceptions.rst:658 msgid "" "The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " "The interpreter now derives them from the exception instance (the ``value`` " "argument). The function still steals references of all three arguments." msgstr "" -#: c-api/exceptions.rst:632 +#: c-api/exceptions.rst:666 msgid "Signal Handling" msgstr "Traitement des signaux" -#: c-api/exceptions.rst:642 -msgid "This function interacts with Python's signal handling." +#: c-api/exceptions.rst:676 +msgid "" +"Handle external interruptions, such as signals or activating a debugger, " +"whose processing has been delayed until it is safe to run Python code and/or " +"raise exceptions." msgstr "" -#: c-api/exceptions.rst:644 +#: c-api/exceptions.rst:680 msgid "" -"If the function is called from the main thread and under the main Python " -"interpreter, it checks whether a signal has been sent to the processes and " -"if so, invokes the corresponding signal handler. If the :mod:`signal` " -"module is supported, this can invoke a signal handler written in Python." +"For example, pressing :kbd:`Ctrl-C` causes a terminal to send " +"the :py:data:`signal.SIGINT` signal. This function executes the " +"corresponding Python signal handler, which, by default, raises " +"the :exc:`KeyboardInterrupt` exception." msgstr "" -#: c-api/exceptions.rst:649 +#: c-api/exceptions.rst:685 msgid "" -"The function attempts to handle all pending signals, and then returns ``0``. " -"However, if a Python signal handler raises an exception, the error indicator " -"is set and the function returns ``-1`` immediately (such that other pending " -"signals may not have been handled yet: they will be on the next :c:func:" -"`PyErr_CheckSignals()` invocation)." +":c:func:`!PyErr_CheckSignals` should be called by long-running C code " +"frequently enough so that the response appears immediate to humans." +msgstr "" + +#: c-api/exceptions.rst:688 +msgid "Handlers invoked by this function currently include:" msgstr "" -#: c-api/exceptions.rst:655 +#: c-api/exceptions.rst:690 msgid "" -"If the function is called from a non-main thread, or under a non-main Python " -"interpreter, it does nothing and returns ``0``." +"Signal handlers, including Python functions registered using " +"the :mod:`signal` module." msgstr "" -#: c-api/exceptions.rst:658 +#: c-api/exceptions.rst:693 +msgid "" +"Signal handlers are only run in the main thread of the main interpreter." +msgstr "" + +#: c-api/exceptions.rst:695 +msgid "" +"(This is where the function got the name: originally, signals were the only " +"way to interrupt the interpreter.)" +msgstr "" + +#: c-api/exceptions.rst:698 +msgid "Running the garbage collector, if necessary." +msgstr "" + +#: c-api/exceptions.rst:700 +msgid "Executing a pending :ref:`remote debugger ` script." +msgstr "" + +#: c-api/exceptions.rst:702 +msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." +msgstr "" + +#: c-api/exceptions.rst:704 +msgid "" +"If any handler raises an exception, immediately return ``-1`` with that " +"exception set. Any remaining interruptions are left to be processed on the " +"next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." +msgstr "" + +#: c-api/exceptions.rst:709 msgid "" -"This function can be called by long-running C code that wants to be " -"interruptible by user requests (such as by pressing Ctrl-C)." +"If all handlers finish successfully, or there are no handlers to run, return " +"``0``." +msgstr "" + +#: c-api/exceptions.rst:712 +msgid "This function may now invoke the garbage collector." msgstr "" -#: c-api/exceptions.rst:662 +#: c-api/exceptions.rst:715 msgid "" -"The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:" -"`KeyboardInterrupt` exception." +"This function may now execute a remote debugger script, if remote debugging " +"is enabled." +msgstr "" + +#: c-api/exceptions.rst:719 +msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." msgstr "" -#: c-api/exceptions.rst:673 +#: c-api/exceptions.rst:730 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: c-api/exceptions.rst:704 +#: c-api/exceptions.rst:761 msgid "" -"This function is async-signal-safe. It can be called without the :term:" -"`GIL` and from a C signal handler." +"This function is async-signal-safe. It can be called without " +"an :term:`attached thread state` and from a C signal handler." msgstr "" -#: c-api/exceptions.rst:687 +#: c-api/exceptions.rst:744 msgid "" -"Simulate the effect of a signal arriving. The next time :c:func:" -"`PyErr_CheckSignals` is called, the Python signal handler for the given " -"signal number will be called." +"Simulate the effect of a signal arriving. The next " +"time :c:func:`PyErr_CheckSignals` is called, the Python signal handler for " +"the given signal number will be called." msgstr "" -#: c-api/exceptions.rst:691 +#: c-api/exceptions.rst:748 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -698,27 +778,28 @@ msgid "" "interrupt an operation)." msgstr "" -#: c-api/exceptions.rst:696 +#: c-api/exceptions.rst:753 msgid "" -"If the given signal isn't handled by Python (it was set to :py:const:`signal." -"SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." +"If the given signal isn't handled by Python (it was set " +"to :py:const:`signal.SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be " +"ignored." msgstr "" -#: c-api/exceptions.rst:699 +#: c-api/exceptions.rst:756 msgid "" "If *signum* is outside of the allowed range of signal numbers, ``-1`` is " "returned. Otherwise, ``0`` is returned. The error indicator is never " "changed by this function." msgstr "" -#: c-api/exceptions.rst:712 +#: c-api/exceptions.rst:769 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" -#: c-api/exceptions.rst:716 +#: c-api/exceptions.rst:773 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -726,15 +807,15 @@ msgid "" "be called from the main thread." msgstr "" -#: c-api/exceptions.rst:721 +#: c-api/exceptions.rst:778 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: c-api/exceptions.rst:726 +#: c-api/exceptions.rst:783 msgid "Exception Classes" msgstr "" -#: c-api/exceptions.rst:730 +#: c-api/exceptions.rst:787 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -743,7 +824,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: c-api/exceptions.rst:736 +#: c-api/exceptions.rst:793 msgid "" "The :attr:`~type.__module__` attribute of the new class is set to the first " "part (up to the last dot) of the *name* argument, and the class name is set " @@ -753,31 +834,63 @@ msgid "" "variables and methods." msgstr "" -#: c-api/exceptions.rst:745 +#: c-api/exceptions.rst:802 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" -#: c-api/exceptions.rst:753 +#: c-api/exceptions.rst:811 +msgid "" +"Return non-zero if *ob* is an exception class, zero otherwise. This function " +"always succeeds." +msgstr "" + +#: c-api/exceptions.rst:816 +msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." +msgstr "" + +#: c-api/exceptions.rst:821 +msgid "This is a macro including the base fields for an exception object." +msgstr "" + +#: c-api/exceptions.rst:824 +msgid "" +"This was included in Python's C API by mistake and is not designed for use " +"in extensions. For creating custom exception objects, " +"use :c:func:`PyErr_NewException` or otherwise create a class inheriting " +"from :c:data:`PyExc_BaseException`." +msgstr "" + +#: c-api/exceptions.rst:833 msgid "Exception Objects" msgstr "Objets exception" -#: c-api/exceptions.rst:757 +#: c-api/exceptions.rst:837 +msgid "" +"Return true if *op* is an instance of :class:`BaseException`, false " +"otherwise. This function always succeeds." +msgstr "" + +#: c-api/exceptions.rst:843 +msgid "Equivalent to :c:func:`Py_TYPE(op) `." +msgstr "" + +#: c-api/exceptions.rst:848 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:765 +#: c-api/exceptions.rst:856 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: c-api/exceptions.rst:771 +#: c-api/exceptions.rst:862 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -785,14 +898,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:779 +#: c-api/exceptions.rst:870 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " "instance. This steals a reference to *ctx*." msgstr "" -#: c-api/exceptions.rst:786 +#: c-api/exceptions.rst:877 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -800,105 +913,133 @@ msgid "" "attribute." msgstr "" -#: c-api/exceptions.rst:794 +#: c-api/exceptions.rst:885 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " "exception instance or ``None``. This steals a reference to *cause*." msgstr "" -#: c-api/exceptions.rst:798 +#: c-api/exceptions.rst:889 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: c-api/exceptions.rst:804 +#: c-api/exceptions.rst:895 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: c-api/exceptions.rst:809 +#: c-api/exceptions.rst:900 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: c-api/exceptions.rst:813 +#: c-api/exceptions.rst:904 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " "the exceptions that need to be raised. This list contains the unhandled part " -"of *orig*, if any, as well as the exceptions that were raised from the :" -"keyword:`!except*` clauses (so they have a different traceback from *orig*) " -"and those that were reraised (and have the same traceback as *orig*). Return " -"the :exc:`ExceptionGroup` that needs to be reraised in the end, or ``None`` " -"if there is nothing to reraise." +"of *orig*, if any, as well as the exceptions that were raised from " +"the :keyword:`!except*` clauses (so they have a different traceback from " +"*orig*) and those that were reraised (and have the same traceback as " +"*orig*). Return the :exc:`ExceptionGroup` that needs to be reraised in the " +"end, or ``None`` if there is nothing to reraise." msgstr "" -#: c-api/exceptions.rst:827 +#: c-api/exceptions.rst:918 msgid "Unicode Exception Objects" msgstr "Objets exception Unicode" -#: c-api/exceptions.rst:829 +#: c-api/exceptions.rst:920 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:833 +#: c-api/exceptions.rst:924 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: c-api/exceptions.rst:840 +#: c-api/exceptions.rst:931 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:846 +#: c-api/exceptions.rst:937 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:852 +#: c-api/exceptions.rst:943 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: c-api/exceptions.rst:860 +#: c-api/exceptions.rst:947 +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting " +"*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." +msgstr "" + +#: c-api/exceptions.rst:950 +#, fuzzy +msgid ":attr:`UnicodeError.start`" +msgstr ":exc:`UnicodeError`" + +#: c-api/exceptions.rst:956 msgid "" -"Set the *start* attribute of the given exception object to *start*. Return " +"Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:867 +#: c-api/exceptions.rst:961 +msgid "" +"While passing a negative *start* does not raise an exception, the " +"corresponding getters will not consider it as a relative offset." +msgstr "" + +#: c-api/exceptions.rst:969 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:973 +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " +"is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." +msgstr "" + +#: c-api/exceptions.rst:980 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:882 +#: c-api/exceptions.rst:983 +#, fuzzy +msgid ":attr:`UnicodeError.end`" +msgstr ":exc:`UnicodeError`" + +#: c-api/exceptions.rst:989 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:888 +#: c-api/exceptions.rst:995 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:1002 msgid "Recursion Control" msgstr "Contrôle de la récursion" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:1004 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -908,721 +1049,804 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:906 +#: c-api/exceptions.rst:1013 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: c-api/exceptions.rst:908 +#: c-api/exceptions.rst:1015 msgid "" -"If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS " -"stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it " -"sets a :exc:`MemoryError` and returns a nonzero value." -msgstr "" - -#: c-api/exceptions.rst:912 -msgid "" -"The function then checks if the recursion limit is reached. If this is the " +"The function then checks if the stack limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: c-api/exceptions.rst:916 +#: c-api/exceptions.rst:1019 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: c-api/exceptions.rst:928 +#: c-api/exceptions.rst:1024 +msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." +msgstr "" + +#: c-api/exceptions.rst:1034 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:1031 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:1037 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " -"requires special recursion handling. In addition to protecting the stack, :" -"c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " -"cycles. The following two functions facilitate this functionality. " +"requires special recursion handling. In addition to protecting the " +"stack, :c:member:`~PyTypeObject.tp_repr` also needs to track objects to " +"prevent cycles. The following two functions facilitate this functionality. " "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:1045 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: c-api/exceptions.rst:942 +#: c-api/exceptions.rst:1048 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " -"should return a string object indicating a cycle. As examples, :class:" -"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." +"should return a string object indicating a cycle. As " +"examples, :class:`dict` objects return ``{...}`` and :class:`list` objects " +"return ``[...]``." msgstr "" -#: c-api/exceptions.rst:948 +#: c-api/exceptions.rst:1054 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: c-api/exceptions.rst:952 +#: c-api/exceptions.rst:1058 msgid "" -"Otherwise, the function returns zero and the :c:member:`~PyTypeObject." -"tp_repr` implementation can continue normally." +"Otherwise, the function returns zero and " +"the :c:member:`~PyTypeObject.tp_repr` implementation can continue normally." msgstr "" -#: c-api/exceptions.rst:957 +#: c-api/exceptions.rst:1063 msgid "" -"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" -"c:func:`Py_ReprEnter` that returns zero." +"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation " +"of :c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: c-api/exceptions.rst:964 -msgid "Standard Exceptions" -msgstr "Exceptions standards" +#: c-api/exceptions.rst:1068 +msgid "" +"Get the recursion limit for the current interpreter. It can be set " +"with :c:func:`Py_SetRecursionLimit`. The recursion limit prevents the Python " +"interpreter stack from growing infinitely." +msgstr "" -#: c-api/exceptions.rst:966 +#: c-api/exceptions.rst:1082 msgid "" -"All standard Python exceptions are available as global variables whose names " -"are ``PyExc_`` followed by the Python exception name. These have the type :" -"c:expr:`PyObject*`; they are all class objects. For completeness, here are " -"all the variables:" +"This function cannot fail, and the caller must hold an :term:`attached " +"thread state`." msgstr "" -#: c-api/exceptions.rst:1163 c-api/exceptions.rst:1208 -msgid "C Name" -msgstr "Nom C" +#: c-api/exceptions.rst:1076 +msgid ":py:func:`sys.getrecursionlimit`" +msgstr "" -#: c-api/exceptions.rst:1208 -msgid "Python Name" -msgstr "Nom Python" +#: c-api/exceptions.rst:1080 +msgid "Set the recursion limit for the current interpreter." +msgstr "" -#: c-api/exceptions.rst:1163 c-api/exceptions.rst:1208 -msgid "Notes" -msgstr "Notes" +#: c-api/exceptions.rst:1086 +msgid ":py:func:`sys.setrecursionlimit`" +msgstr "" -#: c-api/exceptions.rst:1030 -msgid ":c:data:`PyExc_BaseException`" -msgstr ":c:data:`PyExc_BaseException`" +#: c-api/exceptions.rst:1091 +#, fuzzy +msgid "Exception and warning types" +msgstr "Gestion des exceptions" + +#: c-api/exceptions.rst:1093 +msgid "" +"All standard Python exceptions and warning categories are available as " +"global variables whose names are ``PyExc_`` followed by the Python exception " +"name. These have the type :c:expr:`PyObject*`; they are all class objects." +msgstr "" + +#: c-api/exceptions.rst:1097 +msgid "For completeness, here are all the variables:" +msgstr "" + +#: c-api/exceptions.rst:1100 +#, fuzzy +msgid "Exception types" +msgstr "Objets exception" -#: c-api/exceptions.rst:1030 +#: c-api/exceptions.rst:1255 c-api/exceptions.rst:1285 +msgid "C name" +msgstr "" + +#: c-api/exceptions.rst:1256 c-api/exceptions.rst:1286 +#, fuzzy +msgid "Python name" +msgstr "Nom Python" + +#: c-api/exceptions.rst:1110 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:1032 c-api/exceptions.rst:1080 -#: c-api/exceptions.rst:1092 -msgid "[1]_" -msgstr "[1]_" - -#: c-api/exceptions.rst:1032 -msgid ":c:data:`PyExc_Exception`" -msgstr ":c:data:`PyExc_Exception`" +#: c-api/exceptions.rst:1112 +#, fuzzy +msgid ":exc:`BaseExceptionGroup`" +msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:1032 +#: c-api/exceptions.rst:1114 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: c-api/exceptions.rst:1034 -msgid ":c:data:`PyExc_ArithmeticError`" -msgstr ":c:data:`PyExc_ArithmeticError`" - -#: c-api/exceptions.rst:1034 +#: c-api/exceptions.rst:1116 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: c-api/exceptions.rst:1036 -msgid ":c:data:`PyExc_AssertionError`" -msgstr ":c:data:`PyExc_AssertionError`" - -#: c-api/exceptions.rst:1036 +#: c-api/exceptions.rst:1118 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: c-api/exceptions.rst:1038 -msgid ":c:data:`PyExc_AttributeError`" -msgstr ":c:data:`PyExc_AttributeError`" - -#: c-api/exceptions.rst:1038 +#: c-api/exceptions.rst:1120 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: c-api/exceptions.rst:1040 -msgid ":c:data:`PyExc_BlockingIOError`" -msgstr ":c:data:`PyExc_BlockingIOError`" - -#: c-api/exceptions.rst:1040 +#: c-api/exceptions.rst:1122 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: c-api/exceptions.rst:1042 -msgid ":c:data:`PyExc_BrokenPipeError`" -msgstr ":c:data:`PyExc_BrokenPipeError`" - -#: c-api/exceptions.rst:1042 +#: c-api/exceptions.rst:1124 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: c-api/exceptions.rst:1044 -msgid ":c:data:`PyExc_BufferError`" -msgstr ":c:data:`PyExc_BufferError`" - -#: c-api/exceptions.rst:1044 +#: c-api/exceptions.rst:1126 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: c-api/exceptions.rst:1046 -msgid ":c:data:`PyExc_ChildProcessError`" -msgstr ":c:data:`PyExc_ChildProcessError`" - -#: c-api/exceptions.rst:1046 +#: c-api/exceptions.rst:1128 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: c-api/exceptions.rst:1048 -msgid ":c:data:`PyExc_ConnectionAbortedError`" -msgstr ":c:data:`PyExc_ConnectionAbortedError`" - -#: c-api/exceptions.rst:1048 +#: c-api/exceptions.rst:1130 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: c-api/exceptions.rst:1050 -msgid ":c:data:`PyExc_ConnectionError`" -msgstr ":c:data:`PyExc_ConnectionError`" - -#: c-api/exceptions.rst:1050 +#: c-api/exceptions.rst:1132 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:1052 -msgid ":c:data:`PyExc_ConnectionRefusedError`" -msgstr ":c:data:`PyExc_ConnectionRefusedError`" - -#: c-api/exceptions.rst:1052 +#: c-api/exceptions.rst:1134 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: c-api/exceptions.rst:1054 -msgid ":c:data:`PyExc_ConnectionResetError`" -msgstr ":c:data:`PyExc_ConnectionResetError`" - -#: c-api/exceptions.rst:1054 +#: c-api/exceptions.rst:1136 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: c-api/exceptions.rst:1056 -msgid ":c:data:`PyExc_EOFError`" -msgstr ":c:data:`PyExc_EOFError`" - -#: c-api/exceptions.rst:1056 +#: c-api/exceptions.rst:1138 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: c-api/exceptions.rst:1058 -msgid ":c:data:`PyExc_FileExistsError`" -msgstr ":c:data:`PyExc_FileExistsError`" - -#: c-api/exceptions.rst:1058 +#: c-api/exceptions.rst:1140 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: c-api/exceptions.rst:1060 -msgid ":c:data:`PyExc_FileNotFoundError`" -msgstr ":c:data:`PyExc_FloatingPointError`" - -#: c-api/exceptions.rst:1060 +#: c-api/exceptions.rst:1142 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: c-api/exceptions.rst:1062 -msgid ":c:data:`PyExc_FloatingPointError`" -msgstr ":c:data:`PyExc_FloatingPointError`" - -#: c-api/exceptions.rst:1062 +#: c-api/exceptions.rst:1144 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: c-api/exceptions.rst:1064 -msgid ":c:data:`PyExc_GeneratorExit`" -msgstr ":c:data:`PyExc_GeneratorExit`" - -#: c-api/exceptions.rst:1064 +#: c-api/exceptions.rst:1146 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: c-api/exceptions.rst:1066 -msgid ":c:data:`PyExc_ImportError`" -msgstr ":c:data:`PyExc_ImportError`" +#: c-api/exceptions.rst:1148 +#, fuzzy +msgid ":exc:`ImportCycleError`" +msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:1066 +#: c-api/exceptions.rst:1150 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:1068 -msgid ":c:data:`PyExc_IndentationError`" -msgstr ":c:data:`PyExc_IndentationError`" - -#: c-api/exceptions.rst:1068 +#: c-api/exceptions.rst:1152 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: c-api/exceptions.rst:1070 -msgid ":c:data:`PyExc_IndexError`" -msgstr ":c:data:`PyExc_IndexError`" - -#: c-api/exceptions.rst:1070 +#: c-api/exceptions.rst:1154 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: c-api/exceptions.rst:1072 -msgid ":c:data:`PyExc_InterruptedError`" -msgstr ":c:data:`PyExc_InterruptedError`" - -#: c-api/exceptions.rst:1072 +#: c-api/exceptions.rst:1156 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: c-api/exceptions.rst:1074 -msgid ":c:data:`PyExc_IsADirectoryError`" -msgstr ":c:data:`PyExc_IsADirectoryError`" - -#: c-api/exceptions.rst:1074 +#: c-api/exceptions.rst:1158 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: c-api/exceptions.rst:1076 -msgid ":c:data:`PyExc_KeyError`" -msgstr ":c:data:`PyExc_KeyError`" - -#: c-api/exceptions.rst:1076 +#: c-api/exceptions.rst:1160 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: c-api/exceptions.rst:1078 -msgid ":c:data:`PyExc_KeyboardInterrupt`" -msgstr ":c:data:`PyExc_KeyboardInterrupt`" - -#: c-api/exceptions.rst:1078 +#: c-api/exceptions.rst:1162 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: c-api/exceptions.rst:1080 -msgid ":c:data:`PyExc_LookupError`" -msgstr ":c:data:`PyExc_LookupError`" - -#: c-api/exceptions.rst:1080 +#: c-api/exceptions.rst:1164 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: c-api/exceptions.rst:1082 -msgid ":c:data:`PyExc_MemoryError`" -msgstr ":c:data:`PyExc_MemoryError`" - -#: c-api/exceptions.rst:1082 +#: c-api/exceptions.rst:1166 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: c-api/exceptions.rst:1084 -#, fuzzy -msgid ":c:data:`PyExc_ModuleNotFoundError`" -msgstr ":c:data:`PyExc_ModuleNotFoundError`." - -#: c-api/exceptions.rst:1084 +#: c-api/exceptions.rst:1168 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: c-api/exceptions.rst:1086 -msgid ":c:data:`PyExc_NameError`" -msgstr ":c:data:`PyExc_NameError`" - -#: c-api/exceptions.rst:1086 +#: c-api/exceptions.rst:1170 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: c-api/exceptions.rst:1088 -msgid ":c:data:`PyExc_NotADirectoryError`" -msgstr ":c:data:`PyExc_NotADirectoryError`" - -#: c-api/exceptions.rst:1088 +#: c-api/exceptions.rst:1172 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: c-api/exceptions.rst:1090 -msgid ":c:data:`PyExc_NotImplementedError`" -msgstr ":c:data:`PyExc_NotImplementedError`" - -#: c-api/exceptions.rst:1090 +#: c-api/exceptions.rst:1174 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: c-api/exceptions.rst:1092 -msgid ":c:data:`PyExc_OSError`" -msgstr ":c:data:`PyExc_OSError`" - -#: c-api/exceptions.rst:1092 +#: c-api/exceptions.rst:1259 c-api/exceptions.rst:1265 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: c-api/exceptions.rst:1094 -msgid ":c:data:`PyExc_OverflowError`" -msgstr ":c:data:`PyExc_OverflowError`" - -#: c-api/exceptions.rst:1094 +#: c-api/exceptions.rst:1178 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: c-api/exceptions.rst:1096 -msgid ":c:data:`PyExc_PermissionError`" -msgstr ":c:data:`PyExc_PermissionError`" - -#: c-api/exceptions.rst:1096 +#: c-api/exceptions.rst:1180 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: c-api/exceptions.rst:1098 -msgid ":c:data:`PyExc_ProcessLookupError`" -msgstr ":c:data:`PyExc_ProcessLookupError`" - -#: c-api/exceptions.rst:1098 +#: c-api/exceptions.rst:1182 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: c-api/exceptions.rst:1100 -#, fuzzy -msgid ":c:data:`PyExc_PythonFinalizationError`" -msgstr ":c:data:`PyExc_ConnectionError`" - -#: c-api/exceptions.rst:1100 +#: c-api/exceptions.rst:1184 #, fuzzy msgid ":exc:`PythonFinalizationError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:1102 -msgid ":c:data:`PyExc_RecursionError`" -msgstr ":c:data:`PyExc_ReferenceError`" - -#: c-api/exceptions.rst:1102 +#: c-api/exceptions.rst:1186 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: c-api/exceptions.rst:1104 -msgid ":c:data:`PyExc_ReferenceError`" -msgstr ":c:data:`PyExc_ReferenceError`" - -#: c-api/exceptions.rst:1104 +#: c-api/exceptions.rst:1188 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: c-api/exceptions.rst:1106 -msgid ":c:data:`PyExc_RuntimeError`" -msgstr ":c:data:`PyExc_RuntimeError`" - -#: c-api/exceptions.rst:1106 +#: c-api/exceptions.rst:1190 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: c-api/exceptions.rst:1108 -msgid ":c:data:`PyExc_StopAsyncIteration`" -msgstr ":c:data:`PyExc_StopAsyncIteration`" - -#: c-api/exceptions.rst:1108 +#: c-api/exceptions.rst:1192 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: c-api/exceptions.rst:1110 -msgid ":c:data:`PyExc_StopIteration`" -msgstr ":c:data:`PyExc_StopIteration`" - -#: c-api/exceptions.rst:1110 +#: c-api/exceptions.rst:1194 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: c-api/exceptions.rst:1112 -msgid ":c:data:`PyExc_SyntaxError`" -msgstr ":c:data:`PyExc_SyntaxError`" - -#: c-api/exceptions.rst:1112 +#: c-api/exceptions.rst:1196 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: c-api/exceptions.rst:1114 -msgid ":c:data:`PyExc_SystemError`" -msgstr ":c:data:`PyExc_SystemError`" - -#: c-api/exceptions.rst:1114 +#: c-api/exceptions.rst:1198 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: c-api/exceptions.rst:1116 -msgid ":c:data:`PyExc_SystemExit`" -msgstr ":c:data:`PyExc_SystemExit`" - -#: c-api/exceptions.rst:1116 +#: c-api/exceptions.rst:1200 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: c-api/exceptions.rst:1118 -msgid ":c:data:`PyExc_TabError`" -msgstr ":c:data:`PyExc_TabError`" - -#: c-api/exceptions.rst:1118 +#: c-api/exceptions.rst:1202 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: c-api/exceptions.rst:1120 -msgid ":c:data:`PyExc_TimeoutError`" -msgstr ":c:data:`PyExc_ImportError`" - -#: c-api/exceptions.rst:1120 +#: c-api/exceptions.rst:1204 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: c-api/exceptions.rst:1122 -msgid ":c:data:`PyExc_TypeError`" -msgstr ":c:data:`PyExc_TypeError`" - -#: c-api/exceptions.rst:1122 +#: c-api/exceptions.rst:1206 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: c-api/exceptions.rst:1124 -msgid ":c:data:`PyExc_UnboundLocalError`" -msgstr ":c:data:`PyExc_UnboundLocalError`" - -#: c-api/exceptions.rst:1124 +#: c-api/exceptions.rst:1208 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: c-api/exceptions.rst:1126 -msgid ":c:data:`PyExc_UnicodeDecodeError`" -msgstr ":c:data:`PyExc_UnicodeDecodeError`" - -#: c-api/exceptions.rst:1126 +#: c-api/exceptions.rst:1210 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: c-api/exceptions.rst:1128 -msgid ":c:data:`PyExc_UnicodeEncodeError`" -msgstr ":c:data:`PyExc_UnicodeEncodeError`" - -#: c-api/exceptions.rst:1128 +#: c-api/exceptions.rst:1212 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: c-api/exceptions.rst:1130 -msgid ":c:data:`PyExc_UnicodeError`" -msgstr ":c:data:`PyExc_UnicodeError`" - -#: c-api/exceptions.rst:1130 +#: c-api/exceptions.rst:1214 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:1132 -msgid ":c:data:`PyExc_UnicodeTranslateError`" -msgstr ":c:data:`PyExc_UnicodeTranslateError`" - -#: c-api/exceptions.rst:1132 +#: c-api/exceptions.rst:1216 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: c-api/exceptions.rst:1134 -msgid ":c:data:`PyExc_ValueError`" -msgstr ":c:data:`PyExc_ValueError`" - -#: c-api/exceptions.rst:1134 +#: c-api/exceptions.rst:1218 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: c-api/exceptions.rst:1136 -msgid ":c:data:`PyExc_ZeroDivisionError`" -msgstr ":c:data:`PyExc_ZeroDivisionError`" - -#: c-api/exceptions.rst:1136 +#: c-api/exceptions.rst:1220 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: c-api/exceptions.rst:1139 +#: c-api/exceptions.rst:1222 msgid "" -":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" -"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" -"`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:" -"data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:" -"`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:" -"`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:" -"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` and :c:data:" -"`PyExc_TimeoutError` were introduced following :pep:`3151`." +":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` " +"and :c:data:`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: c-api/exceptions.rst:1149 +#: c-api/exceptions.rst:1232 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr ":c:data:`PyExc_StopAsyncIteration` et :c:data:`PyExc_RecursionError`." -#: c-api/exceptions.rst:1152 +#: c-api/exceptions.rst:1235 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:1155 -msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" -msgstr "" - -#: c-api/exceptions.rst:1165 -#, fuzzy -msgid ":c:data:`!PyExc_EnvironmentError`" -msgstr ":c:data:`PyExc_EnvironmentError`" - -#: c-api/exceptions.rst:1167 +#: c-api/exceptions.rst:1238 #, fuzzy -msgid ":c:data:`!PyExc_IOError`" -msgstr ":c:data:`PyExc_IOError`" +msgid ":c:data:`PyExc_BaseExceptionGroup`." +msgstr ":c:data:`PyExc_BaseException`" -#: c-api/exceptions.rst:1169 -#, fuzzy -msgid ":c:data:`!PyExc_WindowsError`" -msgstr ":c:data:`PyExc_WindowsError`" +#: c-api/exceptions.rst:1243 +msgid "OSError aliases" +msgstr "" -#: c-api/exceptions.rst:1169 -msgid "[2]_" +#: c-api/exceptions.rst:1245 +msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: c-api/exceptions.rst:1172 +#: c-api/exceptions.rst:1247 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1236 -msgid "Notes:" -msgstr "Notes :" - -#: c-api/exceptions.rst:1178 -msgid "This is a base class for other standard exceptions." -msgstr "C'est la classe de base pour les autres exceptions standards." +#: c-api/exceptions.rst:1257 +msgid "Notes" +msgstr "Notes" -#: c-api/exceptions.rst:1181 -msgid "" -"Only defined on Windows; protect code that uses this by testing that the " -"preprocessor macro ``MS_WINDOWS`` is defined." +#: c-api/exceptions.rst:1266 +msgid "[win]_" msgstr "" -#: c-api/exceptions.rst:1187 -msgid "Standard Warning Categories" -msgstr "" +#: c-api/exceptions.rst:1268 +msgid "Notes:" +msgstr "Notes :" -#: c-api/exceptions.rst:1189 +#: c-api/exceptions.rst:1271 msgid "" -"All standard Python warning categories are available as global variables " -"whose names are ``PyExc_`` followed by the Python exception name. These have " -"the type :c:expr:`PyObject*`; they are all class objects. For completeness, " -"here are all the variables:" +":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " +"uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: c-api/exceptions.rst:1210 -msgid ":c:data:`PyExc_Warning`" -msgstr ":c:data:`PyExc_Warning`" +#: c-api/exceptions.rst:1278 +msgid "Warning types" +msgstr "" -#: c-api/exceptions.rst:1210 +#: c-api/exceptions.rst:1288 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: c-api/exceptions.rst:1210 -msgid "[3]_" -msgstr "" - -#: c-api/exceptions.rst:1212 -msgid ":c:data:`PyExc_BytesWarning`" -msgstr ":c:data:`PyExc_BytesWarning`" - -#: c-api/exceptions.rst:1212 +#: c-api/exceptions.rst:1290 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: c-api/exceptions.rst:1214 -msgid ":c:data:`PyExc_DeprecationWarning`" -msgstr ":c:data:`PyExc_DeprecationWarning`" - -#: c-api/exceptions.rst:1214 +#: c-api/exceptions.rst:1292 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: c-api/exceptions.rst:1216 -msgid ":c:data:`PyExc_FutureWarning`" -msgstr ":c:data:`PyExc_FutureWarning`" +#: c-api/exceptions.rst:1294 +#, fuzzy +msgid ":exc:`EncodingWarning`" +msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1216 +#: c-api/exceptions.rst:1296 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: c-api/exceptions.rst:1218 -msgid ":c:data:`PyExc_ImportWarning`" -msgstr ":c:data:`PyExc_ImportWarning`" - -#: c-api/exceptions.rst:1218 +#: c-api/exceptions.rst:1298 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: c-api/exceptions.rst:1220 -msgid ":c:data:`PyExc_PendingDeprecationWarning`" -msgstr ":c:data:`PyExc_PendingDeprecationWarning`" - -#: c-api/exceptions.rst:1220 +#: c-api/exceptions.rst:1300 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: c-api/exceptions.rst:1222 -msgid ":c:data:`PyExc_ResourceWarning`" -msgstr ":c:data:`PyExc_ResourceWarning`" - -#: c-api/exceptions.rst:1222 +#: c-api/exceptions.rst:1302 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: c-api/exceptions.rst:1224 -msgid ":c:data:`PyExc_RuntimeWarning`" -msgstr ":c:data:`PyExc_RuntimeWarning`" - -#: c-api/exceptions.rst:1224 +#: c-api/exceptions.rst:1304 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: c-api/exceptions.rst:1226 -msgid ":c:data:`PyExc_SyntaxWarning`" -msgstr ":c:data:`PyExc_SyntaxWarning`" - -#: c-api/exceptions.rst:1226 +#: c-api/exceptions.rst:1306 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: c-api/exceptions.rst:1228 -msgid ":c:data:`PyExc_UnicodeWarning`" -msgstr ":c:data:`PyExc_UnicodeWarning`" - -#: c-api/exceptions.rst:1228 +#: c-api/exceptions.rst:1308 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1230 -msgid ":c:data:`PyExc_UserWarning`" -msgstr ":c:data:`PyExc_UserWarning`" - -#: c-api/exceptions.rst:1230 +#: c-api/exceptions.rst:1310 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: c-api/exceptions.rst:1233 +#: c-api/exceptions.rst:1312 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: c-api/exceptions.rst:1239 -msgid "This is a base class for other standard warning categories." -msgstr "C'est la classe de base pour les autres catégories de *warning*." +#: c-api/exceptions.rst:1315 +#, fuzzy +msgid ":c:data:`PyExc_EncodingWarning`." +msgstr ":c:data:`PyExc_UnicodeWarning`" + +#: c-api/exceptions.rst:1320 +msgid "Tracebacks" +msgstr "" + +#: c-api/exceptions.rst:1324 +msgid "" +"Type object for traceback objects. This is available " +"as :class:`types.TracebackType` in the Python layer." +msgstr "" + +#: c-api/exceptions.rst:1330 +msgid "" +"Return true if *op* is a traceback object, false otherwise. This function " +"does not account for subtypes." +msgstr "" + +#: c-api/exceptions.rst:1336 +msgid "" +"Replace the :attr:`~BaseException.__traceback__` attribute on the current " +"exception with a new traceback prepending *f* to the existing chain." +msgstr "" + +#: c-api/exceptions.rst:1339 +msgid "Calling this function without an exception set is undefined behavior." +msgstr "" + +#: c-api/exceptions.rst:1349 +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +#: c-api/exceptions.rst:1347 +msgid "Write the traceback *tb* into the file *f*." +msgstr "" + +#: c-api/exceptions.rst:1354 +msgid "" +"Write a trace of the Python stack in *tstate* into the file *fd*. The " +"format looks like::" +msgstr "" + +#: c-api/exceptions.rst:1363 +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. The file and function names it outputs are encoded to ASCII " +"with backslashreplace and truncated to 500 characters. It writes only the " +"first 100 frames; further frames are truncated with the line ``...``." +msgstr "" + +#: c-api/exceptions.rst:1393 +msgid "" +"This function will return ``NULL`` on success, or an error message on error." +msgstr "" + +#: c-api/exceptions.rst:1401 +msgid "" +"This function is intended for use in crash scenarios such as signal handlers " +"for SIGSEGV, where the interpreter may be in an inconsistent state. Given " +"that it reads interpreter data structures that may be partially modified, " +"the function might produce incomplete output or it may even crash itself." +msgstr "" + +#: c-api/exceptions.rst:1375 +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*tstate* need to be attached." +msgstr "" + +#: c-api/exceptions.rst:1382 +msgid "Write the traces of all Python threads in *interp* into the file *fd*." +msgstr "" + +#: c-api/exceptions.rst:1384 +msgid "" +"If *interp* is ``NULL`` then this function will try to identify the current " +"interpreter using thread-specific storage. If it cannot, it will return an " +"error." +msgstr "" + +#: c-api/exceptions.rst:1388 +msgid "" +"If *current_tstate* is not ``NULL`` then it will be used to identify what " +"the current thread is in the written output. If it is ``NULL`` then this " +"function will identify the current thread using thread-specific storage. It " +"is not an error if the function is unable to get the current Python thread " +"state." +msgstr "" + +#: c-api/exceptions.rst:1395 +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It " +"only writes the tracebacks of the first *max_threads* threads, further " +"output is truncated with the line ``...``. If *max_threads* is 0, the " +"function will use a default value of 100 for the argument." +msgstr "" + +#: c-api/exceptions.rst:1406 +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*current_tstate* need to be attached." +msgstr "" + +#: c-api/exceptions.rst:1410 +msgid "" +"On the :term:`free-threaded build`, this function is not thread-safe. If " +"another thread deletes its :term:`thread state` while this function is being " +"called, the process will likely crash." +msgstr "" + +#~ msgid "Standard Exceptions" +#~ msgstr "Exceptions standards" + +#~ msgid "C Name" +#~ msgstr "Nom C" + +#~ msgid "[1]_" +#~ msgstr "[1]_" + +#~ msgid ":c:data:`PyExc_Exception`" +#~ msgstr ":c:data:`PyExc_Exception`" + +#~ msgid ":c:data:`PyExc_ArithmeticError`" +#~ msgstr ":c:data:`PyExc_ArithmeticError`" + +#~ msgid ":c:data:`PyExc_AssertionError`" +#~ msgstr ":c:data:`PyExc_AssertionError`" + +#~ msgid ":c:data:`PyExc_AttributeError`" +#~ msgstr ":c:data:`PyExc_AttributeError`" + +#~ msgid ":c:data:`PyExc_BlockingIOError`" +#~ msgstr ":c:data:`PyExc_BlockingIOError`" + +#~ msgid ":c:data:`PyExc_BrokenPipeError`" +#~ msgstr ":c:data:`PyExc_BrokenPipeError`" + +#~ msgid ":c:data:`PyExc_BufferError`" +#~ msgstr ":c:data:`PyExc_BufferError`" + +#~ msgid ":c:data:`PyExc_ChildProcessError`" +#~ msgstr ":c:data:`PyExc_ChildProcessError`" + +#~ msgid ":c:data:`PyExc_ConnectionAbortedError`" +#~ msgstr ":c:data:`PyExc_ConnectionAbortedError`" + +#~ msgid ":c:data:`PyExc_ConnectionError`" +#~ msgstr ":c:data:`PyExc_ConnectionError`" + +#~ msgid ":c:data:`PyExc_ConnectionRefusedError`" +#~ msgstr ":c:data:`PyExc_ConnectionRefusedError`" + +#~ msgid ":c:data:`PyExc_ConnectionResetError`" +#~ msgstr ":c:data:`PyExc_ConnectionResetError`" + +#~ msgid ":c:data:`PyExc_EOFError`" +#~ msgstr ":c:data:`PyExc_EOFError`" + +#~ msgid ":c:data:`PyExc_FileExistsError`" +#~ msgstr ":c:data:`PyExc_FileExistsError`" + +#~ msgid ":c:data:`PyExc_FileNotFoundError`" +#~ msgstr ":c:data:`PyExc_FloatingPointError`" + +#~ msgid ":c:data:`PyExc_FloatingPointError`" +#~ msgstr ":c:data:`PyExc_FloatingPointError`" + +#~ msgid ":c:data:`PyExc_GeneratorExit`" +#~ msgstr ":c:data:`PyExc_GeneratorExit`" + +#~ msgid ":c:data:`PyExc_ImportError`" +#~ msgstr ":c:data:`PyExc_ImportError`" + +#~ msgid ":c:data:`PyExc_IndentationError`" +#~ msgstr ":c:data:`PyExc_IndentationError`" + +#~ msgid ":c:data:`PyExc_IndexError`" +#~ msgstr ":c:data:`PyExc_IndexError`" + +#~ msgid ":c:data:`PyExc_InterruptedError`" +#~ msgstr ":c:data:`PyExc_InterruptedError`" + +#~ msgid ":c:data:`PyExc_IsADirectoryError`" +#~ msgstr ":c:data:`PyExc_IsADirectoryError`" + +#~ msgid ":c:data:`PyExc_KeyError`" +#~ msgstr ":c:data:`PyExc_KeyError`" + +#~ msgid ":c:data:`PyExc_KeyboardInterrupt`" +#~ msgstr ":c:data:`PyExc_KeyboardInterrupt`" + +#~ msgid ":c:data:`PyExc_LookupError`" +#~ msgstr ":c:data:`PyExc_LookupError`" + +#~ msgid ":c:data:`PyExc_MemoryError`" +#~ msgstr ":c:data:`PyExc_MemoryError`" + +#, fuzzy +#~ msgid ":c:data:`PyExc_ModuleNotFoundError`" +#~ msgstr ":c:data:`PyExc_ModuleNotFoundError`." + +#~ msgid ":c:data:`PyExc_NameError`" +#~ msgstr ":c:data:`PyExc_NameError`" + +#~ msgid ":c:data:`PyExc_NotADirectoryError`" +#~ msgstr ":c:data:`PyExc_NotADirectoryError`" + +#~ msgid ":c:data:`PyExc_NotImplementedError`" +#~ msgstr ":c:data:`PyExc_NotImplementedError`" + +#~ msgid ":c:data:`PyExc_OSError`" +#~ msgstr ":c:data:`PyExc_OSError`" + +#~ msgid ":c:data:`PyExc_OverflowError`" +#~ msgstr ":c:data:`PyExc_OverflowError`" + +#~ msgid ":c:data:`PyExc_PermissionError`" +#~ msgstr ":c:data:`PyExc_PermissionError`" + +#~ msgid ":c:data:`PyExc_ProcessLookupError`" +#~ msgstr ":c:data:`PyExc_ProcessLookupError`" + +#, fuzzy +#~ msgid ":c:data:`PyExc_PythonFinalizationError`" +#~ msgstr ":c:data:`PyExc_ConnectionError`" + +#~ msgid ":c:data:`PyExc_RecursionError`" +#~ msgstr ":c:data:`PyExc_ReferenceError`" + +#~ msgid ":c:data:`PyExc_ReferenceError`" +#~ msgstr ":c:data:`PyExc_ReferenceError`" + +#~ msgid ":c:data:`PyExc_RuntimeError`" +#~ msgstr ":c:data:`PyExc_RuntimeError`" + +#~ msgid ":c:data:`PyExc_StopAsyncIteration`" +#~ msgstr ":c:data:`PyExc_StopAsyncIteration`" + +#~ msgid ":c:data:`PyExc_StopIteration`" +#~ msgstr ":c:data:`PyExc_StopIteration`" + +#~ msgid ":c:data:`PyExc_SyntaxError`" +#~ msgstr ":c:data:`PyExc_SyntaxError`" + +#~ msgid ":c:data:`PyExc_SystemError`" +#~ msgstr ":c:data:`PyExc_SystemError`" + +#~ msgid ":c:data:`PyExc_SystemExit`" +#~ msgstr ":c:data:`PyExc_SystemExit`" + +#~ msgid ":c:data:`PyExc_TabError`" +#~ msgstr ":c:data:`PyExc_TabError`" + +#~ msgid ":c:data:`PyExc_TimeoutError`" +#~ msgstr ":c:data:`PyExc_ImportError`" + +#~ msgid ":c:data:`PyExc_TypeError`" +#~ msgstr ":c:data:`PyExc_TypeError`" + +#~ msgid ":c:data:`PyExc_UnboundLocalError`" +#~ msgstr ":c:data:`PyExc_UnboundLocalError`" + +#~ msgid ":c:data:`PyExc_UnicodeDecodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeDecodeError`" + +#~ msgid ":c:data:`PyExc_UnicodeEncodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeEncodeError`" + +#~ msgid ":c:data:`PyExc_UnicodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeError`" + +#~ msgid ":c:data:`PyExc_UnicodeTranslateError`" +#~ msgstr ":c:data:`PyExc_UnicodeTranslateError`" + +#~ msgid ":c:data:`PyExc_ValueError`" +#~ msgstr ":c:data:`PyExc_ValueError`" + +#~ msgid ":c:data:`PyExc_ZeroDivisionError`" +#~ msgstr ":c:data:`PyExc_ZeroDivisionError`" + +#, fuzzy +#~ msgid ":c:data:`!PyExc_EnvironmentError`" +#~ msgstr ":c:data:`PyExc_EnvironmentError`" + +#, fuzzy +#~ msgid ":c:data:`!PyExc_IOError`" +#~ msgstr ":c:data:`PyExc_IOError`" + +#, fuzzy +#~ msgid ":c:data:`!PyExc_WindowsError`" +#~ msgstr ":c:data:`PyExc_WindowsError`" + +#~ msgid "This is a base class for other standard exceptions." +#~ msgstr "C'est la classe de base pour les autres exceptions standards." + +#~ msgid ":c:data:`PyExc_Warning`" +#~ msgstr ":c:data:`PyExc_Warning`" + +#~ msgid ":c:data:`PyExc_BytesWarning`" +#~ msgstr ":c:data:`PyExc_BytesWarning`" + +#~ msgid ":c:data:`PyExc_DeprecationWarning`" +#~ msgstr ":c:data:`PyExc_DeprecationWarning`" + +#~ msgid ":c:data:`PyExc_FutureWarning`" +#~ msgstr ":c:data:`PyExc_FutureWarning`" + +#~ msgid ":c:data:`PyExc_ImportWarning`" +#~ msgstr ":c:data:`PyExc_ImportWarning`" + +#~ msgid ":c:data:`PyExc_PendingDeprecationWarning`" +#~ msgstr ":c:data:`PyExc_PendingDeprecationWarning`" + +#~ msgid ":c:data:`PyExc_ResourceWarning`" +#~ msgstr ":c:data:`PyExc_ResourceWarning`" + +#~ msgid ":c:data:`PyExc_RuntimeWarning`" +#~ msgstr ":c:data:`PyExc_RuntimeWarning`" + +#~ msgid ":c:data:`PyExc_SyntaxWarning`" +#~ msgstr ":c:data:`PyExc_SyntaxWarning`" + +#~ msgid ":c:data:`PyExc_UserWarning`" +#~ msgstr ":c:data:`PyExc_UserWarning`" + +#~ msgid "This is a base class for other standard warning categories." +#~ msgstr "C'est la classe de base pour les autres catégories de *warning*." #~ msgid "module" #~ msgstr "module" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po new file mode 100644 index 000000000..939a2a6ac --- /dev/null +++ b/c-api/extension-modules.po @@ -0,0 +1,423 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/extension-modules.rst:6 +msgid "Defining extension modules" +msgstr "" + +#: c-api/extension-modules.rst:8 +msgid "" +"A C extension for CPython is a shared library (for example, a ``.so`` file " +"on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python " +"process (for example, it is compiled with compatible compiler settings), and " +"which exports an :dfn:`export hook` function (or an old-" +"style :ref:`initialization function `)." +msgstr "" + +#: c-api/extension-modules.rst:14 +msgid "" +"To be importable by default (that is, " +"by :py:class:`importlib.machinery.ExtensionFileLoader`), the shared library " +"must be available on :py:attr:`sys.path`, and must be named after the module " +"name plus an extension listed " +"in :py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." +msgstr "" + +#: c-api/extension-modules.rst:22 +msgid "" +"Building, packaging and distributing extension modules is best done with " +"third-party tools, and is out of scope of this document. One suitable tool " +"is Setuptools, whose documentation can be found at https://" +"setuptools.pypa.io/en/latest/setuptools.html." +msgstr "" + +#: c-api/extension-modules.rst:30 +msgid "Extension export hook" +msgstr "" + +#: c-api/extension-modules.rst:34 +msgid "" +"Support for the :samp:`PyModExport_{}` export hook was added in Python " +"3.15. The older way of defining modules is still available: consult either " +"the :ref:`extension-pyinit` section or earlier versions of this " +"documentation if you plan to support earlier Python versions." +msgstr "" + +#: c-api/extension-modules.rst:39 +msgid "" +"The export hook must be an exported function with the following signature:" +msgstr "" + +#: c-api/extension-modules.rst:43 +msgid "" +"For modules with ASCII-only names, the :ref:`export hook ` must be named :samp:`PyModExport_{}`, with ```` replaced " +"by the module's name." +msgstr "" + +#: c-api/extension-modules.rst:47 +msgid "" +"For non-ASCII module names, the export hook must instead be " +"named :samp:`PyModExportU_{}` (note the ``U``), with ```` " +"encoded using Python's *punycode* encoding with hyphens replaced by " +"underscores. In Python:" +msgstr "" + +#: c-api/extension-modules.rst:60 +msgid "" +"The export hook returns an array of :c:type:`PySlot` entries, terminated by " +"an entry with a slot ID of ``0``. These slots describe how the module should " +"be created and initialized." +msgstr "" + +#: c-api/extension-modules.rst:64 +msgid "" +"This array must remain valid and constant until interpreter shutdown. " +"Typically, it should use ``static`` storage. Prefer using " +"the :c:macro:`Py_mod_create` and :c:macro:`Py_mod_exec` slots for any " +"dynamic behavior." +msgstr "" + +#: c-api/extension-modules.rst:69 +msgid "" +"The export hook may return ``NULL`` with an exception set to signal failure." +msgstr "" + +#: c-api/extension-modules.rst:71 +msgid "" +"It is recommended to define the export hook function using a helper macro:" +msgstr "" + +#: c-api/extension-modules.rst:75 +msgid "Declare an extension module export hook. This macro:" +msgstr "" + +#: c-api/extension-modules.rst:78 +msgid "specifies the :c:expr:`PySlot*` return type," +msgstr "" + +#: c-api/extension-modules.rst:224 +msgid "adds any special linkage declarations required by the platform, and" +msgstr "" + +#: c-api/extension-modules.rst:225 +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "" + +#: c-api/extension-modules.rst:255 +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "" + +#: c-api/extension-modules.rst:100 +msgid "" +"The export hook is typically the only non-\\ ``static`` item defined in the " +"module's C source." +msgstr "" + +#: c-api/extension-modules.rst:103 +msgid "" +"The hook should be kept short -- ideally, one line as above. If you do need " +"to use Python C API in this function, it is recommended to call " +"``PyABIInfo_Check(&abi_info, \"modulename\")`` first to raise an exception, " +"rather than crash, in common cases of ABI mismatch." +msgstr "" + +#: c-api/extension-modules.rst:111 +msgid "" +"It is possible to export multiple modules from a single shared library by " +"defining multiple export hooks. However, importing them requires a custom " +"importer or suitably named copies/links of the extension file, because " +"Python's import machinery only finds the function corresponding to the " +"filename. See the `Multiple modules in one library `__ section in :pep:`489` for " +"details." +msgstr "" + +#: c-api/extension-modules.rst:123 +msgid "Multi-phase initialization" +msgstr "" + +#: c-api/extension-modules.rst:125 +msgid "The process of creating an extension module follows several phases:" +msgstr "" + +#: c-api/extension-modules.rst:127 +msgid "" +"Python finds and calls the export hook to get information on how to create " +"the module." +msgstr "" + +#: c-api/extension-modules.rst:129 +msgid "" +"Before any substantial code is executed, Python can determine which " +"capabilities the module supports, and it can adjust the environment or " +"refuse loading an incompatible extension. Slots " +"like :c:data:`Py_mod_abi`, :c:data:`Py_mod_gil` " +"and :c:data:`Py_mod_multiple_interpreters` influence this step." +msgstr "" + +#: c-api/extension-modules.rst:134 +msgid "" +"By default, Python itself then creates the module object -- that is, it does " +"the equivalent of calling :py:meth:`~object.__new__` when creating an " +"object. This step can be overridden using the :c:data:`Py_mod_create` slot." +msgstr "" + +#: c-api/extension-modules.rst:137 +msgid "" +"Python sets initial module attributes like :attr:`~module.__package__` " +"and :attr:`~module.__loader__`, and inserts the module object " +"into :py:attr:`sys.modules`." +msgstr "" + +#: c-api/extension-modules.rst:140 +msgid "" +"Afterwards, the module object is initialized in an extension-specific way -- " +"the equivalent of :py:meth:`~object.__init__` when creating an object, or of " +"executing top-level code in a Python-language module. The behavior is " +"specified using the :c:data:`Py_mod_exec` slot." +msgstr "" + +#: c-api/extension-modules.rst:145 +msgid "" +"This is called *multi-phase initialization* to distinguish it from the " +"legacy (but still supported) :ref:`single-phase initialization `, where an initialization function returns a fully " +"constructed module." +msgstr "" + +#: c-api/extension-modules.rst:151 +msgid "Added support for multi-phase initialization (:pep:`489`)." +msgstr "" + +#: c-api/extension-modules.rst:155 +msgid "Multiple module instances" +msgstr "" + +#: c-api/extension-modules.rst:157 +msgid "" +"By default, extension modules are not singletons. For example, if " +"the :py:attr:`sys.modules` entry is removed and the module is re-imported, a " +"new module object is created and, typically, populated with fresh method and " +"type objects. The old module is subject to normal garbage collection. This " +"mirrors the behavior of pure-Python modules." +msgstr "" + +#: c-api/extension-modules.rst:164 +msgid "" +"Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization " +"(:c:func:`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing " +"Python objects between module instances would likely cause crashes or " +"undefined behavior." +msgstr "" + +#: c-api/extension-modules.rst:171 +msgid "" +"To avoid such issues, each instance of an extension module should be " +"*isolated*: changes to one instance should not implicitly affect the others, " +"and all state owned by the module, including references to Python objects, " +"should be specific to a particular module instance. See :ref:`isolating-" +"extensions-howto` for more details and a practical guide." +msgstr "" + +#: c-api/extension-modules.rst:177 +msgid "" +"A simpler way to avoid these issues is :ref:`raising an error on repeated " +"initialization `." +msgstr "" + +#: c-api/extension-modules.rst:180 +msgid "" +"All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " +"achieved by isolation or blocking repeated initialization, as above. A " +"module may also be limited to the main interpreter using " +"the :c:data:`Py_mod_multiple_interpreters` slot." +msgstr "" + +#: c-api/extension-modules.rst:192 +msgid "``PyInit`` function" +msgstr "" + +#: c-api/extension-modules.rst:196 +msgid "" +"This functionality will not get new features, but there are no plans to " +"remove it." +msgstr "" + +#: c-api/extension-modules.rst:199 +msgid "" +"Instead of :c:func:`PyModExport_modulename`, an extension module can define " +"an older-style :dfn:`initialization function` with the signature:" +msgstr "" + +#: c-api/extension-modules.rst:204 +msgid "" +"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " +"name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` " +"instead, with ```` encoded in the same way as for the :ref:`export " +"hook ` (that is, using Punycode with underscores)." +msgstr "" + +#: c-api/extension-modules.rst:211 +msgid "" +"If a module exports both :samp:`PyInit_{}` " +"and :samp:`PyModExport_{}`, the :samp:`PyInit_{}` function is " +"ignored." +msgstr "" + +#: c-api/extension-modules.rst:215 +msgid "" +"Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " +"initialization function using a helper macro:" +msgstr "" + +#: c-api/extension-modules.rst:220 +msgid "Declare an extension module initialization function. This macro:" +msgstr "" + +#: c-api/extension-modules.rst:223 +msgid "specifies the :c:expr:`PyObject*` return type," +msgstr "" + +#: c-api/extension-modules.rst:228 +msgid "" +"Normally, the initialization function (``PyInit_modulename``) returns " +"a :c:type:`PyModuleDef` instance with non-" +"``NULL`` :c:member:`~PyModuleDef.m_slots`. This allows Python to " +"use :ref:`multi-phase initialization `." +msgstr "" + +#: c-api/extension-modules.rst:233 +msgid "" +"Before it is returned, the ``PyModuleDef`` instance must be initialized " +"using the following function:" +msgstr "" + +#: c-api/extension-modules.rst:238 +msgid "" +"Ensure a module definition is a properly initialized Python object that " +"correctly reports its type and a reference count." +msgstr "" + +#: c-api/extension-modules.rst:241 +msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "" + +#: c-api/extension-modules.rst:243 +msgid "" +"Calling this function is required before returning a :c:type:`PyModuleDef` " +"from a module initialization function. It should not be used in other " +"contexts." +msgstr "" + +#: c-api/extension-modules.rst:247 +msgid "" +"Note that Python assumes that ``PyModuleDef`` structures are statically " +"allocated. This function may return either a new reference or a borrowed " +"one; this reference must not be released." +msgstr "" + +#: c-api/extension-modules.rst:273 +msgid "Legacy single-phase initialization" +msgstr "" + +#: c-api/extension-modules.rst:277 +msgid "" +"Single-phase initialization is a legacy mechanism to initialize extension " +"modules, with known drawbacks and design flaws. Extension module authors are " +"encouraged to use multi-phase initialization instead." +msgstr "" + +#: c-api/extension-modules.rst:281 +msgid "However, there are no plans to remove support for it." +msgstr "" + +#: c-api/extension-modules.rst:283 +msgid "" +"In single-phase initialization, the old-style :ref:`initialization function " +"` (``PyInit_modulename``) should create, populate and " +"return a module object. This is typically done " +"using :c:func:`PyModule_Create` and functions " +"like :c:func:`PyModule_AddObjectRef`." +msgstr "" + +#: c-api/extension-modules.rst:289 +msgid "" +"Single-phase initialization differs from the :ref:`default ` in the following ways:" +msgstr "" + +#: c-api/extension-modules.rst:292 +msgid "Single-phase modules are, or rather *contain*, “singletons”." +msgstr "" + +#: c-api/extension-modules.rst:294 +msgid "" +"When the module is first initialized, Python saves the contents of the " +"module's ``__dict__`` (that is, typically, the module's functions and types)." +msgstr "" + +#: c-api/extension-modules.rst:298 +msgid "" +"For subsequent imports, Python does not call the initialization function " +"again. Instead, it creates a new module object with a new ``__dict__``, and " +"copies the saved contents to it. For example, given a single-phase module " +"``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and " +"an exception class ``error``:" +msgstr "" + +#: c-api/extension-modules.rst:321 +msgid "" +"The exact behavior should be considered a CPython implementation detail." +msgstr "" + +#: c-api/extension-modules.rst:323 +msgid "" +"To work around the fact that ``PyInit_modulename`` does not take a *spec* " +"argument, some state of the import machinery is saved and applied to the " +"first suitable module created during the ``PyInit_modulename`` call. " +"Specifically, when a sub-module is imported, this mechanism prepends the " +"parent package name to the name of the module." +msgstr "" + +#: c-api/extension-modules.rst:329 +msgid "" +"A single-phase ``PyInit_modulename`` function should create “its” module " +"object as soon as possible, before any other module objects can be created." +msgstr "" + +#: c-api/extension-modules.rst:332 +msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." +msgstr "" + +#: c-api/extension-modules.rst:334 +msgid "" +"Single-phase modules support module lookup functions " +"like :c:func:`PyState_FindModule`." +msgstr "" + +#: c-api/extension-modules.rst:337 +msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." +msgstr "" + +#: c-api/extension-modules.rst:339 +msgid "" +"``_testsinglephase`` is an internal module used in CPython's self-test " +"suite; your installation may or may not include it." +msgstr "" diff --git a/c-api/file.po b/c-api/file.po index 03a7cd063..85de5e2a8 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-12-11 12:00+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 1.8.11\n" #: c-api/file.rst:6 -msgid "File Objects" +#, fuzzy +msgid "File objects" msgstr "Objets fichiers" #: c-api/file.rst:10 @@ -24,12 +25,12 @@ msgstr "Objets fichiers" msgid "" "These APIs are a minimal emulation of the Python 2 C API for built-in file " "objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " -"from the C standard library. In Python 3, files and streams use the new :" -"mod:`io` module, which defines several layers over the low-level unbuffered " -"I/O of the operating system. The functions described below are convenience " -"C wrappers over these new APIs, and meant mostly for internal error " -"reporting in the interpreter; third-party code is advised to access the :mod:" -"`io` APIs instead." +"from the C standard library. In Python 3, files and streams use the " +"new :mod:`io` module, which defines several layers over the low-level " +"unbuffered I/O of the operating system. The functions described below are " +"convenience C wrappers over these new APIs, and meant mostly for internal " +"error reporting in the interpreter; third-party code is advised to access " +"the :mod:`io` APIs instead." msgstr "" "Ces API sont une émulation minimale de l'API C Python 2 pour les objets " "fichier natifs, qui reposaient sur la gestion des entrées-sorties avec " @@ -39,8 +40,8 @@ msgstr "" "système d'exploitation. Les fonctions définies ci-dessous, écrites en C, " "encapsulent ces nouvelles API pour les rendre plus faciles d'utilisation et " "sont majoritairement pensées pour signaler des erreurs internes dans " -"l'interpréteur ; il est conseillé au code tiers d'utiliser les API de :mod:" -"`io` à la place." +"l'interpréteur ; il est conseillé au code tiers d'utiliser les API " +"de :mod:`io` à la place." #: c-api/file.rst:22 #, fuzzy @@ -79,28 +80,28 @@ msgstr "ignore l'attribut *name*" #, fuzzy msgid "" "Return the file descriptor associated with *p* as an :c:expr:`int`. If the " -"object is an integer, its value is returned. If not, the object's :meth:" -"`~io.IOBase.fileno` method is called if it exists; the method must return an " -"integer, which is returned as the file descriptor value. Sets an exception " -"and returns ``-1`` on failure." +"object is an integer, its value is returned. If not, the " +"object's :meth:`~io.IOBase.fileno` method is called if it exists; the method " +"must return an integer, which is returned as the file descriptor value. " +"Sets an exception and returns ``-1`` on failure." msgstr "" "Renvoie un descripteur de fichier associé avec *p* comme un :c:type:`int`. " -"Si l'objet est un entier, sa valeur est renvoyée. Sinon, la méthode :meth:" -"`~io.IOBase.fileno` de l'objet est appelée si elle existe; la méthode doit " -"renvoyer un entier, qui est renvoyé en tant que valeur du descripteur. " -"Affecte une exception et renvoie ``-1`` lors d'un échec." +"Si l'objet est un entier, sa valeur est renvoyée. Sinon, la " +"méthode :meth:`~io.IOBase.fileno` de l'objet est appelée si elle existe; la " +"méthode doit renvoyer un entier, qui est renvoyé en tant que valeur du " +"descripteur. Affecte une exception et renvoie ``-1`` lors d'un échec." #: c-api/file.rst:52 msgid "" "Equivalent to ``p.readline([n])``, this function reads one line from the " -"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." -"readline` method. If *n* is ``0``, exactly one line is read, regardless of " -"the length of the line. If *n* is greater than ``0``, no more than *n* " -"bytes will be read from the file; a partial line can be returned. In both " -"cases, an empty string is returned if the end of the file is reached " -"immediately. If *n* is less than ``0``, however, one line is read " -"regardless of length, but :exc:`EOFError` is raised if the end of the file " -"is reached immediately." +"object *p*. *p* may be a file object or any object with " +"a :meth:`~io.IOBase.readline` method. If *n* is ``0``, exactly one line is " +"read, regardless of the length of the line. If *n* is greater than ``0``, " +"no more than *n* bytes will be read from the file; a partial line can be " +"returned. In both cases, an empty string is returned if the end of the file " +"is reached immediately. If *n* is less than ``0``, however, one line is " +"read regardless of length, but :exc:`EOFError` is raised if the end of the " +"file is reached immediately." msgstr "" "Cette fonction, équivalente à ``p.readline([n])``, lit une ligne de l'objet " "*p*. *p* peut être un objet fichier ou n'importe quel objet qui possède une " @@ -160,20 +161,58 @@ msgid "" "arguments." msgstr "" -#: c-api/file.rst:101 +#: c-api/file.rst:98 +msgid "" +"Open *path* with the mode ``'rb'``. *path* must be a Python :class:`str` " +"object. The behavior of this function may be overridden " +"by :c:func:`PyFile_SetOpenCodeHook` to allow for some preprocessing of the " +"text." +msgstr "" + +#: c-api/file.rst:103 +msgid "This is analogous to :func:`io.open_code` in Python." +msgstr "" + +#: c-api/file.rst:105 +msgid "" +"On success, this function returns a :term:`strong reference` to a Python " +"file object. On failure, this function returns ``NULL`` with an exception " +"set." +msgstr "" + +#: c-api/file.rst:114 +msgid "" +"Similar to :c:func:`PyFile_OpenCodeObject`, but *path* is a UTF-8 " +"encoded :c:expr:`const char*`." +msgstr "" + +#: c-api/file.rst:124 #, fuzzy msgid "" "Write object *obj* to file object *p*. The only supported flag for *flags* " "is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " -"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " -"failure; the appropriate exception will be set." +"written instead of the :func:`repr`." msgstr "" "Écrit l'objet *obj* dans l'objet fichier *p*. La seule option gérée pour " "*flags* est :const:`Py_PRINT_RAW` ; si défini, l'attribut :func:`str` de " "l'objet est écrit à la place de l'attribut :func:`repr`. Retourne ``0`` en " "cas de succès ou ``-1`` en cas échec ; l'exception appropriée sera levée." -#: c-api/file.rst:109 +#: c-api/file.rst:128 +msgid "If *obj* is ``NULL``, write the string ``\"\"``." +msgstr "" + +#: c-api/file.rst:130 +#, fuzzy +msgid "" +"Return ``0`` on success or ``-1`` on failure; the appropriate exception will " +"be set." +msgstr "" +"Écrit la chaîne de caractères *s* dans l'objet fichier *p*. Retourne ``0`` " +"en cas de succès ou ``-1`` en cas d'échec ; l'exception appropriée sera mise " +"en place." + +#: c-api/file.rst:135 msgid "" "Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." @@ -182,6 +221,29 @@ msgstr "" "en cas de succès ou ``-1`` en cas d'échec ; l'exception appropriée sera mise " "en place." +#: c-api/file.rst:140 +msgid "Soft-deprecated API" +msgstr "" + +#: c-api/file.rst:144 +msgid "" +"These are APIs that were included in Python's C API by mistake. They are " +"documented solely for completeness; use other ``PyFile*`` APIs instead." +msgstr "" + +#: c-api/file.rst:150 +msgid "" +"Use :c:func:`PyFile_FromFd` with defaults (``fd, NULL, \"w\", -1, NULL, " +"NULL, NULL, 0``) instead." +msgstr "" + +#: c-api/file.rst:154 +msgid "" +"Type of file-like objects used internally at Python startup " +"when :py:mod:`io` is not yet available. Use Python :py:func:`open` " +"or :c:func:`PyFile_FromFd` to create file objects instead." +msgstr "" + #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/float.po b/c-api/float.po index 2fee033ea..cd3aa21cc 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-01-14 15:30+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -34,14 +34,14 @@ msgid "" "type. This is the same object as :class:`float` in the Python layer." msgstr "" "Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " -"virgule flottante en Python. C'est le même objet que la classe :class:" -"`float` de la couche Python." +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." #: c-api/float.rst:24 #, fuzzy msgid "" -"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" -"type:`PyFloatObject`. This function always succeeds." +"Return true if its argument is a :c:type:`PyFloatObject` or a subtype " +"of :c:type:`PyFloatObject`. This function always succeeds." msgstr "" "Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" "type de :c:type:`PyFloatObject`." @@ -76,18 +76,18 @@ msgstr "" #, fuzzy msgid "" "Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " -"*pyfloat* is not a Python floating-point object but has a :meth:`~object." -"__float__` method, this method will first be called to convert *pyfloat* " -"into a float. If :meth:`!__float__` is not defined then it falls back to :" -"meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one " -"should call :c:func:`PyErr_Occurred` to check for errors." -msgstr "" -"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" -"type:`double` en C. Si le *pyfloat* n'est pas un nombre à virgule flottante " -"mais contient une méthode :meth:`__float__`, elle est d'abord appelée pour " -"convertir le *pyfloat* en nombre à virgule flottante. Cette méthode renvoie " -"``-1.0`` en cas d'échec, il faut appeler :c:func:`PyErr_Occurred` pour " -"vérifier les erreurs." +"*pyfloat* is not a Python floating-point object but has " +"a :meth:`~object.__float__` method, this method will first be called to " +"convert *pyfloat* into a float. If :meth:`!__float__` is not defined then it " +"falls back to :meth:`~object.__index__`. This method returns ``-1.0`` upon " +"failure, so one should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme " +"d'un :c:type:`double` en C. Si le *pyfloat* n'est pas un nombre à virgule " +"flottante mais contient une méthode :meth:`__float__`, elle est d'abord " +"appelée pour convertir le *pyfloat* en nombre à virgule flottante. Cette " +"méthode renvoie ``-1.0`` en cas d'échec, il faut " +"appeler :c:func:`PyErr_Occurred` pour vérifier les erreurs." #: c-api/float.rst:54 msgid "Use :meth:`~object.__index__` if available." @@ -99,8 +99,8 @@ msgid "" "Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " "without error checking." msgstr "" -"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" -"type:`double` en C, sans vérifier les erreurs." +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme " +"d'un :c:type:`double` en C, sans vérifier les erreurs." #: c-api/float.rst:66 msgid "" @@ -115,8 +115,8 @@ msgstr "" #: c-api/float.rst:73 #, fuzzy msgid "" -"Return the maximum representable finite float *DBL_MAX* as C :c:expr:" -"`double`." +"Return the maximum representable finite float *DBL_MAX* as " +"C :c:expr:`double`." msgstr "" "Renvoie le nombre à virgule flottante fini maximal *DBL_MAX* sous la forme " "d'un :c:type:`double` en C." @@ -129,119 +129,224 @@ msgstr "" "Renvoie le nombre à virgule flottante minimal normalisé *DBL_MIN* sous la " "forme :c:type:`double` en C." -#: c-api/float.rst:82 +#: c-api/float.rst:83 +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents the positive infinity." +msgstr "" + +#: c-api/float.rst:86 +msgid "" +"It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard " +"```` header." +msgstr "" + +#: c-api/float.rst:94 +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents a quiet not-a-number (qNaN) value." +msgstr "" + +#: c-api/float.rst:97 +msgid "" +"On most platforms, this is equivalent to the :c:macro:`!NAN` macro from the " +"C11 standard ```` header." +msgstr "" + +#: c-api/float.rst:103 +msgid "Equivalent to :c:macro:`!INFINITY`." +msgstr "" + +#: c-api/float.rst:110 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` " +"constant." +msgstr "" + +#: c-api/float.rst:115 +msgid "High precision (long double) definition of :data:`~math.e` constant." +msgstr "" + +#: c-api/float.rst:122 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.pi` " +"constant." +msgstr "" + +#: c-api/float.rst:127 +msgid "High precision (long double) definition of :data:`~math.pi` constant." +msgstr "" + +#: c-api/float.rst:134 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of " +"the :data:`math.tau` constant." +msgstr "" + +#: c-api/float.rst:141 +msgid "Return :data:`math.nan` from a function." +msgstr "" + +#: c-api/float.rst:143 +msgid "" +"On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``." +msgstr "" + +#: c-api/float.rst:148 +msgid "" +"Return :data:`math.inf` or :data:`-math.inf ` from a function, " +"depending on the sign of *sign*." +msgstr "" + +#: c-api/float.rst:151 +msgid "On most platforms, this is equivalent to the following::" +msgstr "" + +#: c-api/float.rst:158 +msgid "" +"Return ``1`` if the given floating-point number *X* is finite, that is, it " +"is normal, subnormal or zero, but not infinite or NaN. Return ``0`` " +"otherwise." +msgstr "" + +#: c-api/float.rst:162 +msgid "Use :c:macro:`!isfinite` instead." +msgstr "" + +#: c-api/float.rst:168 +msgid "" +"Return ``1`` if the given floating-point number *X* is positive or negative " +"infinity. Return ``0`` otherwise." +msgstr "" + +#: c-api/float.rst:171 +msgid "Use :c:macro:`!isinf` instead." +msgstr "" + +#: c-api/float.rst:177 +msgid "" +"Return ``1`` if the given floating-point number *X* is a not-a-number (NaN) " +"value. Return ``0`` otherwise." +msgstr "" + +#: c-api/float.rst:180 +msgid "Use :c:macro:`!isnan` instead." +msgstr "" + +#: c-api/float.rst:185 msgid "Pack and Unpack functions" msgstr "" -#: c-api/float.rst:84 +#: c-api/float.rst:187 msgid "" "The pack and unpack functions provide an efficient platform-independent way " "to store floating-point values as byte strings. The Pack routines produce a " -"bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :" -"c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies " -"the number of bytes in the bytes string." +"bytes string from a C :c:expr:`double`, and the Unpack routines produce a " +"C :c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) " +"specifies the number of bytes in the bytes string:" msgstr "" -#: c-api/float.rst:90 -msgid "" -"On platforms that appear to use IEEE 754 formats these functions work by " -"copying bits. On other platforms, the 2-byte format is identical to the IEEE " -"754 binary16 half-precision format, the 4-byte format (32-bit) is identical " -"to the IEEE 754 binary32 single precision format, and the 8-byte format to " -"the IEEE 754 binary64 double precision format, although the packing of INFs " -"and NaNs (if such things exist on the platform) isn't handled correctly, and " -"attempting to unpack a bytes string containing an IEEE INF or NaN will raise " -"an exception." +#: c-api/float.rst:193 +msgid "The 2-byte format is the IEEE 754 binary16 half-precision format." msgstr "" -#: c-api/float.rst:99 -msgid "" -"On non-IEEE platforms with more precision, or larger dynamic range, than " -"IEEE 754 supports, not all values can be packed; on non-IEEE platforms with " -"less precision, or smaller dynamic range, not all values can be unpacked. " -"What happens in such cases is partly accidental (alas)." +#: c-api/float.rst:194 +msgid "The 4-byte format is the IEEE 754 binary32 single-precision format." msgstr "" -#: c-api/float.rst:107 -msgid "Pack functions" +#: c-api/float.rst:195 +msgid "The 8-byte format is the IEEE 754 binary64 double-precision format." msgstr "" -#: c-api/float.rst:109 +#: c-api/float.rst:197 msgid "" -"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:" -"`int` argument, non-zero if you want the bytes string in little-endian " -"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you " -"want big-endian format (exponent first, at *p*). The :c:macro:" -"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal " -"to ``1`` on big endian processor, or ``0`` on little endian processor." +"The NaN type may not be preserved on some platforms while unpacking " +"(signaling NaNs become quiet NaNs), for example on x86 systems in 32-bit " +"mode." msgstr "" -#: c-api/float.rst:116 +#: c-api/float.rst:200 msgid "" -"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " -"most likely :exc:`OverflowError`)." +"It's assumed that the :c:expr:`double` type has the IEEE 754 binary64 double " +"precision format. What happens if it's not true is partly accidental " +"(alas). On non-IEEE platforms with more precision, or larger dynamic range, " +"than IEEE 754 supports, not all values can be packed; on non-IEEE platforms " +"with less precision, or smaller dynamic range, not all values can be " +"unpacked. The packing of special numbers like INFs and NaNs (if such things " +"exist on the platform) may not be handled correctly, and attempting to " +"unpack a bytes string containing an IEEE INF or NaN may raise an exception." msgstr "" -#: c-api/float.rst:119 -msgid "There are two problems on non-IEEE platforms:" +#: c-api/float.rst:212 +msgid "Pack functions" msgstr "" -#: c-api/float.rst:121 -msgid "What this does is undefined if *x* is a NaN or infinity." +#: c-api/float.rst:214 +msgid "" +"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is " +"an :c:expr:`int` argument, non-zero if you want the bytes string in little-" +"endian format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), " +"zero if you want big-endian format (exponent first, at *p*). Use " +"the :c:macro:`!PY_LITTLE_ENDIAN` constant to select the native endian: it is " +"equal to ``0`` on big endian processor, or ``1`` on little endian processor." msgstr "" -#: c-api/float.rst:122 -msgid "``-0.0`` and ``+0.0`` produce the same bytes string." +#: c-api/float.rst:221 +msgid "" +"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " +"most likely :exc:`OverflowError`)." msgstr "" -#: c-api/float.rst:126 +#: c-api/float.rst:226 msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "" -#: c-api/float.rst:130 +#: c-api/float.rst:230 msgid "Pack a C double as the IEEE 754 binary32 single precision format." msgstr "" -#: c-api/float.rst:134 +#: c-api/float.rst:234 msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" -#: c-api/float.rst:138 +#: c-api/float.rst:237 +msgid "This function always succeeds in CPython." +msgstr "" + +#: c-api/float.rst:241 msgid "Unpack functions" msgstr "" -#: c-api/float.rst:140 +#: c-api/float.rst:243 msgid "" -"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" -"expr:`int` argument, non-zero if the bytes string is in little-endian format " -"(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" -"endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can " -"be used to use the native endian: it is equal to ``1`` on big endian " -"processor, or ``0`` on little endian processor." +"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is " +"an :c:expr:`int` argument, non-zero if the bytes string is in little-endian " +"format (exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if " +"big-endian (exponent first, at *p*). Use the :c:macro:`!PY_LITTLE_ENDIAN` " +"constant to select the native endian: it is equal to ``0`` on big endian " +"processor, or ``1`` on little endian processor." msgstr "" -#: c-api/float.rst:147 +#: c-api/float.rst:250 msgid "" -"Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:" -"`PyErr_Occurred` is true (and an exception is set, most likely :exc:" -"`OverflowError`)." +"Return value: The unpacked double. On error, this is ``-1.0`` " +"and :c:func:`PyErr_Occurred` is true (and an exception is set, most " +"likely :exc:`OverflowError`)." msgstr "" -#: c-api/float.rst:151 -msgid "" -"Note that on a non-IEEE platform this will refuse to unpack a bytes string " -"that represents a NaN or infinity." +#: c-api/float.rst:255 +msgid "These functions always succeed in CPython." msgstr "" -#: c-api/float.rst:156 +#: c-api/float.rst:259 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" -#: c-api/float.rst:160 +#: c-api/float.rst:263 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" -#: c-api/float.rst:164 +#: c-api/float.rst:267 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" diff --git a/c-api/frame.po b/c-api/frame.po index 0580a21ca..824cf473d 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-19 18:46+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -15,7 +15,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/frame.rst:4 -msgid "Frame Objects" +#, fuzzy +msgid "Frame objects" msgstr "Objets décrivant les *frames*" #: c-api/frame.rst:8 @@ -49,11 +50,11 @@ msgstr "Voir aussi :ref:`reflection`" #: c-api/frame.rst:24 msgid "" -"The type of frame objects. It is the same object as :py:class:`types." -"FrameType` in the Python layer." +"The type of frame objects. It is the same object " +"as :py:class:`types.FrameType` in the Python layer." msgstr "" -"Le type des objets de *frame*. C'est le même objet que :py:class:`types." -"FrameType` dans la couche de Python." +"Le type des objets de *frame*. C'est le même objet " +"que :py:class:`types.FrameType` dans la couche de Python." #: c-api/frame.rst:29 msgid "" @@ -63,51 +64,60 @@ msgstr "" "````." #: c-api/frame.rst:34 +msgid "" +"Create a new frame object. This function returns a :term:`strong reference` " +"to the new frame object on success, and returns ``NULL`` with an exception " +"set on failure." +msgstr "" + +#: c-api/frame.rst:40 msgid "Return non-zero if *obj* is a frame object." msgstr "Renvoie un entier non nul si *obj* est un objet *frame*." -#: c-api/frame.rst:38 +#: c-api/frame.rst:44 msgid "" -"Previously, this function was only available after including ````." +"Previously, this function was only available after including " +"````." msgstr "" "Précédemment, ce type était disponible uniquement après l'inclusion de " "````." -#: c-api/frame.rst:43 +#: c-api/frame.rst:49 msgid "Get the *frame* next outer frame." msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." -#: c-api/frame.rst:45 +#: c-api/frame.rst:51 +#, fuzzy msgid "" -"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer " +"frame. This raises no exceptions." msgstr "" "Renvoie un :term:`strong reference`, ou ``NULL`` si *frame* n'a pas de " "*frame* encadrante." -#: c-api/frame.rst:53 +#: c-api/frame.rst:60 #, fuzzy msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute." msgstr "Obtenir l'attribut ``f_buitins`` de *frame*." -#: c-api/frame.rst:86 +#: c-api/frame.rst:93 msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." msgstr "" "Renvoie un :term:`strong reference`. Le résultat ne peut être ``NULL``." -#: c-api/frame.rst:62 +#: c-api/frame.rst:69 msgid "Get the *frame* code." msgstr "Obtenir le code *frame*." -#: c-api/frame.rst:130 +#: c-api/frame.rst:137 msgid "Return a :term:`strong reference`." msgstr "Renvoie un :term:`strong reference`." -#: c-api/frame.rst:66 +#: c-api/frame.rst:73 msgid "The result (frame code) cannot be ``NULL``." msgstr "Le résultat (code *frame*) ne peut être ``NULL``." -#: c-api/frame.rst:73 +#: c-api/frame.rst:80 msgid "" "Get the generator, coroutine, or async generator that owns this frame, or " "``NULL`` if this frame is not owned by a generator. Does not raise an " @@ -118,94 +128,164 @@ msgstr "" "générateur. Il ne lève pas d'exception, même si la valeur renvoyée est " "``NULL``." -#: c-api/frame.rst:77 +#: c-api/frame.rst:84 msgid "Return a :term:`strong reference`, or ``NULL``." msgstr "Renvoie un :term:`strong reference`, ou ``NULL``." -#: c-api/frame.rst:84 +#: c-api/frame.rst:91 #, fuzzy msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute." msgstr "Obtenir l'attribut ``f_globals`` de *frame*." -#: c-api/frame.rst:93 +#: c-api/frame.rst:100 #, fuzzy msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute." msgstr "Obtenir l'attribut ``f_lasti`` de *frame*." -#: c-api/frame.rst:95 +#: c-api/frame.rst:102 msgid "Returns -1 if ``frame.f_lasti`` is ``None``." msgstr "Renvoie -1 si ``frame.f_lasti`` est ``None``." -#: c-api/frame.rst:102 +#: c-api/frame.rst:109 #, fuzzy msgid "Get the variable *name* of *frame*." msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." -#: c-api/frame.rst:104 +#: c-api/frame.rst:111 #, fuzzy msgid "Return a :term:`strong reference` to the variable value on success." msgstr "" "Renvoie un :term:`strong reference`. Le résultat ne peut être ``NULL``." -#: c-api/frame.rst:105 +#: c-api/frame.rst:112 msgid "" "Raise :exc:`NameError` and return ``NULL`` if the variable does not exist." msgstr "" -#: c-api/frame.rst:106 +#: c-api/frame.rst:113 msgid "Raise an exception and return ``NULL`` on error." msgstr "" -#: c-api/frame.rst:108 +#: c-api/frame.rst:115 msgid "*name* type must be a :class:`str`." msgstr "" -#: c-api/frame.rst:115 +#: c-api/frame.rst:122 msgid "" "Similar to :c:func:`PyFrame_GetVar`, but the variable name is a C string " "encoded in UTF-8." msgstr "" -#: c-api/frame.rst:123 +#: c-api/frame.rst:130 msgid "" "Get the *frame*'s :attr:`~frame.f_locals` attribute. If the frame refers to " "an :term:`optimized scope`, this returns a write-through proxy object that " -"allows modifying the locals. In all other cases (classes, modules, :func:" -"`exec`, :func:`eval`) it returns the mapping representing the frame locals " -"directly (as described for :func:`locals`)." +"allows modifying the locals. In all other cases (classes, " +"modules, :func:`exec`, :func:`eval`) it returns the mapping representing the " +"frame locals directly (as described for :func:`locals`)." msgstr "" -#: c-api/frame.rst:134 -msgid "As part of :pep:`667`, return a proxy object for optimized scopes." +#: c-api/frame.rst:141 +msgid "" +"As part of :pep:`667`, return an instance " +"of :c:var:`PyFrameLocalsProxy_Type`." msgstr "" -#: c-api/frame.rst:140 +#: c-api/frame.rst:147 msgid "Return the line number that *frame* is currently executing." msgstr "Renvoie le numéro de ligne que cette *frame* est en train d'exécuter." -#: c-api/frame.rst:145 -msgid "Internal Frames" +#: c-api/frame.rst:151 +msgid "Frame locals proxies" msgstr "" -#: c-api/frame.rst:147 +#: c-api/frame.rst:155 +msgid "" +"The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object " +"exposes a write-through view of the underlying locals dictionary for the " +"frame. This ensures that the variables exposed by ``f_locals`` are always up " +"to date with the live local variables in the frame itself." +msgstr "" + +#: c-api/frame.rst:161 +msgid "See :pep:`667` for more information." +msgstr "" + +#: c-api/frame.rst:165 +msgid "The type of frame :func:`locals` proxy objects." +msgstr "" + +#: c-api/frame.rst:169 +#, fuzzy +msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." +msgstr "Renvoie un entier non nul si *obj* est un objet *frame*." + +#: c-api/frame.rst:173 +msgid "Legacy local variable APIs" +msgstr "" + +#: c-api/frame.rst:175 +msgid "" +"These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing. " +"They exist solely for backwards compatibility." +msgstr "" + +#: c-api/frame.rst:181 +msgid "" +"Prior to Python 3.13, this function would copy the :attr:`~frame.f_locals` " +"attribute of *f* to the internal \"fast\" array of local variables, allowing " +"changes in frame objects to be visible to the interpreter. If *clear* was " +"true, this function would process variables that were unset in the locals " +"dictionary." +msgstr "" + +#: c-api/frame.rst:198 c-api/frame.rst:208 +msgid "This function now does nothing." +msgstr "" + +#: c-api/frame.rst:193 +msgid "" +"Prior to Python 3.13, this function would copy the internal \"fast\" array " +"of local variables (which is used by the interpreter) to " +"the :attr:`~frame.f_locals` attribute of *f*, allowing changes in local " +"variables to be visible to frame objects." +msgstr "" + +#: c-api/frame.rst:204 +msgid "" +"Prior to Python 3.13, this function was similar " +"to :c:func:`PyFrame_FastToLocals`, but would return ``0`` on success, and " +"``-1`` with an exception set on failure." +msgstr "" + +#: c-api/frame.rst:213 +msgid ":pep:`667`" +msgstr "" + +#: c-api/frame.rst:217 +msgid "Internal frames" +msgstr "" + +#: c-api/frame.rst:219 msgid "Unless using :pep:`523`, you will not need this." msgstr "" -#: c-api/frame.rst:151 +#: c-api/frame.rst:223 msgid "The interpreter's internal frame representation." msgstr "" -#: c-api/frame.rst:157 +#: c-api/frame.rst:229 #, fuzzy msgid "Return a :term:`strong reference` to the code object for the frame." msgstr "" "Renvoie un :term:`strong reference`. Le résultat ne peut être ``NULL``." -#: c-api/frame.rst:164 +#: c-api/frame.rst:236 msgid "Return the byte offset into the last executed instruction." msgstr "" -#: c-api/frame.rst:171 +#: c-api/frame.rst:243 msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" diff --git a/c-api/function.po b/c-api/function.po index ed92423e9..d8cd04b5c 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-02-20 13:11+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -29,21 +29,21 @@ msgstr "La structure C utilisée pour les fonctions." #: c-api/function.rst:22 msgid "" "This is an instance of :c:type:`PyTypeObject` and represents the Python " -"function type. It is exposed to Python programmers as ``types." -"FunctionType``." +"function type. It is exposed to Python programmers as " +"``types.FunctionType``." msgstr "" "C'est une instance de :c:type:`PyTypeObject` et représente le type fonction " "en Python. Il est exposé aux développeurs comme ``types.FunctionType``." #: c-api/function.rst:28 msgid "" -"Return true if *o* is a function object (has type :c:data:" -"`PyFunction_Type`). The parameter must not be ``NULL``. This function " -"always succeeds." +"Return true if *o* is a function object (has " +"type :c:data:`PyFunction_Type`). The parameter must not be ``NULL``. This " +"function always succeeds." msgstr "" -"Renvoie vrai si *o* est un objet de type fonction (a comme type :c:data:" -"`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. Cette fonction " -"réussit toujours." +"Renvoie vrai si *o* est un objet de type fonction (a comme " +"type :c:data:`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. " +"Cette fonction réussit toujours." #: c-api/function.rst:34 msgid "" @@ -57,11 +57,11 @@ msgstr "" #: c-api/function.rst:37 #, fuzzy msgid "" -"The function's docstring and name are retrieved from the code object. :attr:" -"`~function.__module__` is retrieved from *globals*. The argument defaults, " -"annotations and closure are set to ``NULL``. :attr:`~function.__qualname__` " -"is set to the same value as the code object's :attr:`~codeobject." -"co_qualname` field." +"The function's docstring and name are retrieved from the code " +"object. :attr:`~function.__module__` is retrieved from *globals*. The " +"argument defaults, annotations and closure are set to " +"``NULL``. :attr:`~function.__qualname__` is set to the same value as the " +"code object's :attr:`~codeobject.co_qualname` field." msgstr "" "La *docstring* et le nom de la fonction sont récupérés à partir de l'objet " "code. *__module__* est récupéré à partir de *globals*. Les arguments par " @@ -71,10 +71,11 @@ msgstr "" #: c-api/function.rst:46 #, fuzzy msgid "" -"As :c:func:`PyFunction_New`, but also allows setting the function object's :" -"attr:`~function.__qualname__` attribute. *qualname* should be a unicode " -"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set " -"to the same value as the code object's :attr:`~codeobject.co_qualname` field." +"As :c:func:`PyFunction_New`, but also allows setting the function " +"object's :attr:`~function.__qualname__` attribute. *qualname* should be a " +"unicode object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute " +"is set to the same value as the code " +"object's :attr:`~codeobject.co_qualname` field." msgstr "" "Comme :c:func:`PyFunction_New`, mais accepte aussi une valeur à utiliser " "pour l'attribut ``__qualname__`` de l'objet fonction. *qualname* doit être " @@ -126,7 +127,7 @@ msgstr "" "Définir les valeurs par défaut de l'argument pour l'objet de la fonction " "*op*. *defaults* doit être ``Py_None`` ou un tuple." -#: c-api/function.rst:109 c-api/function.rst:123 +#: c-api/function.rst:125 c-api/function.rst:139 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." msgstr "Lève :exc:`SystemError` et renvoie ``-1`` en cas de d'échec." @@ -141,7 +142,31 @@ msgid "" "unaltered (default) vectorcall function!" msgstr "" -#: c-api/function.rst:100 +#: c-api/function.rst:101 +#, fuzzy +msgid "" +"Return the keyword-only argument default values of the function object *op*. " +"This can be a dictionary of arguments or ``NULL``." +msgstr "" +"Renvoie les valeurs par défaut de l'argument de l'objet de la fonction *op*. " +"Cela peut être un tuple d'arguments ou ``NULL``." + +#: c-api/function.rst:107 +#, fuzzy +msgid "" +"Set the keyword-only argument default values of the function object *op*. " +"*defaults* must be a dictionary of keyword-only arguments or ``Py_None``." +msgstr "" +"Renvoie les valeurs par défaut de l'argument de l'objet de la fonction *op*. " +"Cela peut être un tuple d'arguments ou ``NULL``." + +#: c-api/function.rst:110 +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +#: c-api/function.rst:116 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." @@ -149,7 +174,7 @@ msgstr "" "Renvoie la fermeture associée avec l'objet de la fonction *op*. Cela peut " "être ``NULL`` ou un tuple d'objets cellule." -#: c-api/function.rst:106 +#: c-api/function.rst:122 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." @@ -157,7 +182,7 @@ msgstr "" "Définir la fermeture associée avec l'objet de la fonction *op*. *closure* " "doit être ``Py_None`` ou un tuple d'objets cellule." -#: c-api/function.rst:114 +#: c-api/function.rst:130 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." @@ -165,7 +190,7 @@ msgstr "" "Renvoie les annotations de l'objet de la fonction *op*. Cela peut être un " "dictionnaire mutable ou ``NULL``." -#: c-api/function.rst:120 +#: c-api/function.rst:136 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." @@ -173,7 +198,14 @@ msgstr "" "Définir les annotations pour l'objet de la fonction *op*. *annotations* doit " "être un dictionnaire ou ``Py_None``." -#: c-api/function.rst:128 +#: c-api/function.rst:150 +msgid "" +"These functions are similar to their ``PyFunction_Get*`` counterparts, but " +"do not do type checking. Passing anything other than an instance " +"of :c:data:`PyFunction_Type` is undefined behavior." +msgstr "" + +#: c-api/function.rst:157 msgid "" "Register *callback* as a function watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " @@ -181,44 +213,64 @@ msgid "" "exception." msgstr "" -#: c-api/function.rst:138 +#: c-api/function.rst:167 msgid "" -"Clear watcher identified by *watcher_id* previously returned from :c:func:" -"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " -"success, or ``-1`` and set an exception on error (e.g. if the given " -"*watcher_id* was never registered.)" +"Clear watcher identified by *watcher_id* previously returned " +"from :c:func:`PyFunction_AddWatcher` for the current interpreter. Return " +"``0`` on success, or ``-1`` and set an exception on error (e.g. if the " +"given *watcher_id* was never registered.)" msgstr "" -#: c-api/function.rst:148 -msgid "" -"Enumeration of possible function watcher events: - " -"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " -"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " -"``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +#: c-api/function.rst:177 +msgid "Enumeration of possible function watcher events:" +msgstr "" + +#: c-api/function.rst:179 +msgid "``PyFunction_EVENT_CREATE``" +msgstr "" + +#: c-api/function.rst:180 +msgid "``PyFunction_EVENT_DESTROY``" +msgstr "" + +#: c-api/function.rst:181 +msgid "``PyFunction_EVENT_MODIFY_CODE``" msgstr "" -#: c-api/function.rst:160 +#: c-api/function.rst:182 +msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" +msgstr "" + +#: c-api/function.rst:183 +msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +msgstr "" + +#: c-api/function.rst:187 +msgid "``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``" +msgstr "" + +#: c-api/function.rst:193 msgid "Type of a function watcher callback function." msgstr "" -#: c-api/function.rst:162 +#: c-api/function.rst:195 msgid "" "If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " -"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" -"`borrowed reference` to the new value that is about to be stored in *func* " -"for the attribute that is being modified." +"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold " +"a :term:`borrowed reference` to the new value that is about to be stored in " +"*func* for the attribute that is being modified." msgstr "" -#: c-api/function.rst:167 +#: c-api/function.rst:200 msgid "" "The callback may inspect but must not modify *func*; doing so could have " "unpredictable effects, including infinite recursion." msgstr "" -#: c-api/function.rst:170 +#: c-api/function.rst:203 msgid "" "If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked " -"after `func` has been fully initialized. Otherwise, the callback is invoked " +"after *func* has been fully initialized. Otherwise, the callback is invoked " "before the modification to *func* takes place, so the prior state of *func* " "can be inspected. The runtime is permitted to optimize away the creation of " "function objects when possible. In such cases no event will be emitted. " @@ -227,22 +279,22 @@ msgid "" "semantics of the Python code being executed." msgstr "" -#: c-api/function.rst:179 +#: c-api/function.rst:212 msgid "" -"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the " +"If *event* is ``PyFunction_EVENT_DESTROY``, taking a reference in the " "callback to the about-to-be-destroyed function will resurrect it, preventing " "it from being freed at this time. When the resurrected object is destroyed " "later, any watcher callbacks active at that time will be called again." msgstr "" -#: c-api/function.rst:184 +#: c-api/function.rst:217 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " -"will be printed as an unraisable exception using :c:func:" -"`PyErr_WriteUnraisable`. Otherwise it should return ``0``." +"will be printed as an unraisable exception " +"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: c-api/function.rst:188 +#: c-api/function.rst:221 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index d2670fa47..b8e0e91b4 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -72,8 +72,8 @@ msgstr "" #: c-api/gcsupport.rst:37 msgid "" -"Before fields which refer to other containers are invalidated, :c:func:" -"`PyObject_GC_UnTrack` must be called." +"Before fields which refer to other containers are " +"invalidated, :c:func:`PyObject_GC_UnTrack` must be called." msgstr "" #: c-api/gcsupport.rst:40 @@ -83,35 +83,74 @@ msgstr "" #: c-api/gcsupport.rst:43 msgid "" -"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" -"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " -"subclass or subclasses." +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least " +"a :c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from " +"its subclass or subclasses." msgstr "" #: c-api/gcsupport.rst:47 msgid "" "When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " "it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " -"interpreter will automatically populate the :c:member:`~PyTypeObject." -"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" -"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " -"implements the garbage collector protocol and the child class does *not* " -"include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." +"interpreter will automatically populate " +"the :c:member:`~PyTypeObject.tp_flags`, :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields if the type inherits from a " +"class that implements the garbage collector protocol and the child class " +"does *not* include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" #: c-api/gcsupport.rst:57 msgid "" -"Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" -"macro:`Py_TPFLAGS_HAVE_GC` flag set." +"Analogous to :c:macro:`PyObject_New` but for container objects with " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: c-api/gcsupport.rst:62 +#: c-api/gcsupport.rst:84 msgid "" -"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" -"c:macro:`Py_TPFLAGS_HAVE_GC` flag set." +"Do not call this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." msgstr "" -#: c-api/gcsupport.rst:67 +#: c-api/gcsupport.rst:87 +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` " +"slot, :c:func:`PyType_GenericAlloc` is preferred over a custom function that " +"simply calls this macro." +msgstr "" + +#: c-api/gcsupport.rst:91 +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_GC_Del` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: c-api/gcsupport.rst:97 +msgid ":c:func:`PyObject_GC_Del`" +msgstr "" + +#: c-api/gcsupport.rst:74 +msgid ":c:macro:`PyObject_New`" +msgstr "" + +#: c-api/gcsupport.rst:99 c-api/gcsupport.rst:193 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: c-api/gcsupport.rst:100 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: c-api/gcsupport.rst:81 +msgid "" +"Analogous to :c:macro:`PyObject_NewVar` but for container objects with " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +#: c-api/gcsupport.rst:98 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: c-api/gcsupport.rst:105 msgid "" "Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at " "the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). " @@ -119,34 +158,41 @@ msgid "" "object header `." msgstr "" -#: c-api/gcsupport.rst:73 +#: c-api/gcsupport.rst:111 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." msgstr "" -#: c-api/gcsupport.rst:77 +#: c-api/gcsupport.rst:114 +msgid "" +"Memory allocated by this function must be freed " +"with :c:func:`PyObject_GC_Del` (usually called via the " +"object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: c-api/gcsupport.rst:119 msgid "" "The function is marked as unstable because the final mechanism for reserving " "extra data after an instance is not yet decided. For allocating a variable " -"number of fields, prefer using :c:type:`PyVarObject` and :c:member:" -"`~PyTypeObject.tp_itemsize` instead." +"number of fields, prefer using :c:type:`PyVarObject` " +"and :c:member:`~PyTypeObject.tp_itemsize` instead." msgstr "" -#: c-api/gcsupport.rst:88 +#: c-api/gcsupport.rst:130 msgid "" "Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the " "resized object of type ``TYPE*`` (refers to any C type) or ``NULL`` on " "failure." msgstr "" -#: c-api/gcsupport.rst:92 +#: c-api/gcsupport.rst:134 msgid "" "*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the " "collector yet. *newsize* must be of type :c:type:`Py_ssize_t`." msgstr "" -#: c-api/gcsupport.rst:99 +#: c-api/gcsupport.rst:141 msgid "" "Adds the object *op* to the set of container objects tracked by the " "collector. The collector can run at unexpected times so objects must be " @@ -155,199 +201,445 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: c-api/gcsupport.rst:108 +#: c-api/gcsupport.rst:150 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" -#: c-api/gcsupport.rst:111 +#: c-api/gcsupport.rst:153 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" -#: c-api/gcsupport.rst:116 +#: c-api/gcsupport.rst:158 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:119 +#: c-api/gcsupport.rst:161 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: c-api/gcsupport.rst:126 +#: c-api/gcsupport.rst:168 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:129 +#: c-api/gcsupport.rst:171 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: c-api/gcsupport.rst:136 +#: c-api/gcsupport.rst:178 msgid "" -"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" -"c:macro:`PyObject_GC_NewVar`." +"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` " +"or :c:macro:`PyObject_GC_NewVar`." +msgstr "" + +#: c-api/gcsupport.rst:181 +msgid "" +"Do not call this directly to free an object's memory; call the " +"type's :c:member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +#: c-api/gcsupport.rst:184 +msgid "" +"Do not use this for memory allocated " +"by :c:macro:`PyObject_New`, :c:macro:`PyObject_NewVar`, or related " +"allocation functions; use :c:func:`PyObject_Free` instead." +msgstr "" + +#: c-api/gcsupport.rst:190 +msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." +msgstr "" + +#: c-api/gcsupport.rst:191 +msgid ":c:macro:`PyObject_GC_New`" msgstr "" -#: c-api/gcsupport.rst:142 +#: c-api/gcsupport.rst:192 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: c-api/gcsupport.rst:194 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: c-api/gcsupport.rst:199 msgid "" "Remove the object *op* from the set of container objects tracked by the " "collector. Note that :c:func:`PyObject_GC_Track` can be called again on " -"this object to add it back to the set of tracked objects. The deallocator (:" -"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object " -"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` " -"handler become invalid." +"this object to add it back to the set of tracked objects. The deallocator " +"(:c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the " +"object before any of the fields used by " +"the :c:member:`~PyTypeObject.tp_traverse` handler become invalid." msgstr "" -#: c-api/gcsupport.rst:151 +#: c-api/gcsupport.rst:208 msgid "" "The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -#: c-api/gcsupport.rst:154 +#: c-api/gcsupport.rst:211 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" -#: c-api/gcsupport.rst:159 +#: c-api/gcsupport.rst:216 +msgid "" +"Type of the visitor function passed to " +"the :c:member:`~PyTypeObject.tp_traverse` handler. The function should be " +"called with an object to traverse as *object* and the third parameter to " +"the :c:member:`~PyTypeObject.tp_traverse` handler as *arg*. The Python core " +"uses several visitor functions to implement cyclic garbage detection; it's " +"not expected that users will need to write their own visitor functions." +msgstr "" + +#: c-api/gcsupport.rst:223 +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` handler must be of " +"the :c:type:`inquiry` type, or ``NULL`` if the object is immutable." +msgstr "" + +#: c-api/gcsupport.rst:229 msgid "" -"Type of the visitor function passed to the :c:member:`~PyTypeObject." -"tp_traverse` handler. The function should be called with an object to " -"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject." -"tp_traverse` handler as *arg*. The Python core uses several visitor " -"functions to implement cyclic garbage detection; it's not expected that " -"users will need to write their own visitor functions." +"Drop references that may have created reference cycles. Immutable objects " +"do not have to define this method since they can never directly create " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." msgstr "" -#: c-api/gcsupport.rst:166 +#: c-api/gcsupport.rst:240 +msgid "Traversal" +msgstr "" + +#: c-api/gcsupport.rst:242 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" -#: c-api/gcsupport.rst:171 +#: c-api/gcsupport.rst:246 msgid "" -"Traversal function for a container object. Implementations must call the " -"*visit* function for each object directly contained by *self*, with the " -"parameters to *visit* being the contained object and the *arg* value passed " -"to the handler. The *visit* function must not be called with a ``NULL`` " -"object argument. If *visit* returns a non-zero value that value should be " +"Traversal function for a garbage-collected object, used by the garbage " +"collector to detect reference cycles. Implementations must call the *visit* " +"function for each object directly contained by *self*, with the parameters " +"to *visit* being the contained object and the *arg* value passed to the " +"handler. The *visit* function must not be called with a ``NULL`` object " +"argument. If *visit* returns a non-zero value, that value should be " "returned immediately." msgstr "" -#: c-api/gcsupport.rst:178 +#: c-api/gcsupport.rst:255 msgid "" -"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" -"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" -"member:`~PyTypeObject.tp_traverse` implementation must name its arguments " -"exactly *visit* and *arg*:" +"A typical :c:member:`!tp_traverse` function calls the :c:func:`Py_VISIT` " +"convenience macro on each of the instance's members that are Python objects " +"that the instance owns. For example, this is a (slightly outdated) traversal " +"function for the :py:class:`threading.local` class::" msgstr "" -#: c-api/gcsupport.rst:185 +#: c-api/gcsupport.rst:273 msgid "" -"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " -"*arg*. If *visit* returns a non-zero value, then return it. Using this " -"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" +":c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!" +"local_traverse` to have these specific names; don't name them just anything." msgstr "" -#: c-api/gcsupport.rst:198 +#: c-api/gcsupport.rst:277 msgid "" -"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" -"`inquiry` type, or ``NULL`` if the object is immutable." +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore visit the type::" msgstr "" -#: c-api/gcsupport.rst:204 +#: c-api/gcsupport.rst:282 msgid "" -"Drop references that may have created reference cycles. Immutable objects " -"do not have to define this method since they can never directly create " -"reference cycles. Note that the object must still be valid after calling " -"this method (don't just call :c:func:`Py_DECREF` on a reference). The " -"collector will call this method if it detects that this object is involved " -"in a reference cycle." +"Alternately, the type may delegate this responsibility by calling " +"``tp_traverse`` of a heap-allocated superclass (or another heap-allocated " +"type, if applicable). If they do not, the type object may not be garbage-" +"collected." +msgstr "" + +#: c-api/gcsupport.rst:287 +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in " +"the :c:member:`~PyTypeObject.tp_flags` field, the traverse function must " +"call :c:func:`PyObject_VisitManagedDict` like this::" msgstr "" -#: c-api/gcsupport.rst:213 +#: c-api/gcsupport.rst:296 +msgid "" +"Only the members that the instance *owns* (by having :term:`strong " +"references ` to them) must be visited. For instance, if an " +"object supports weak references via " +"the :c:member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting the " +"linked list (what *tp_weaklist* points to) must **not** be visited as the " +"instance does not directly own the weak references to itself." +msgstr "" + +#: c-api/gcsupport.rst:303 +msgid "The traversal function has a limitation:" +msgstr "" + +#: c-api/gcsupport.rst:307 +msgid "" +"The traversal function must not have any side effects. Implementations may " +"not modify the reference counts of any Python objects nor create or destroy " +"any Python objects, directly or indirectly." +msgstr "" + +#: c-api/gcsupport.rst:311 +msgid "" +"This means that *most* Python C API functions may not be used, since they " +"can raise a new exception, return a new reference to a result object, have " +"internal logic that uses side effects. Also, unless documented otherwise, " +"functions that happen to not have side effects may start having them in " +"future versions, without warning." +msgstr "" + +#: c-api/gcsupport.rst:317 +msgid "" +"For a list of safe functions, see a :ref:`separate section ` below." +msgstr "" + +#: c-api/gcsupport.rst:322 +msgid "" +"The :c:func:`Py_VISIT` call may be skipped for those members that provably " +"cannot participate in reference cycles. In the ``local_traverse`` example " +"above, there is also a ``self->key`` member, but it can only be ``NULL`` or " +"a Python string and therefore cannot be part of a reference cycle." +msgstr "" + +#: c-api/gcsupport.rst:328 +msgid "" +"On the other hand, even if you know a member can never be part of a cycle, " +"as a debugging aid you may want to visit it anyway just so the :mod:`gc` " +"module's :func:`~gc.get_referents` function will include it." +msgstr "" + +#: c-api/gcsupport.rst:334 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " +"thread." +msgstr "" + +#: c-api/gcsupport.rst:339 +msgid "" +"Garbage collection is a \"stop-the-world\" operation: even in :term:`free " +"threading` builds, only one thread state is :term:`attached ` when :c:member:`!tp_traverse` handlers run." +msgstr "" + +#: c-api/gcsupport.rst:346 +msgid "" +"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " +"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." +msgstr "" + +#: c-api/gcsupport.rst:351 +msgid "" +"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, " +"a :c:func:`Py_VISIT` macro is provided. In order to use this macro, " +"the :c:member:`~PyTypeObject.tp_traverse` implementation must name its " +"arguments exactly *visit* and *arg*:" +msgstr "" + +#: c-api/gcsupport.rst:358 +msgid "" +"If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, " +"with arguments *o* and *arg*. If *visit* returns a non-zero value, then " +"return it." +msgstr "" + +#: c-api/gcsupport.rst:362 +msgid "This corresponds roughly to::" +msgstr "" + +#: c-api/gcsupport.rst:374 +msgid "Traversal-safe functions" +msgstr "" + +#: c-api/gcsupport.rst:376 +msgid "" +"The following functions and macros are safe to use in " +"a :c:member:`~PyTypeObject.tp_traverse` handler:" +msgstr "" + +#: c-api/gcsupport.rst:379 +msgid "the *visit* function passed to ``tp_traverse``" +msgstr "" + +#: c-api/gcsupport.rst:380 +msgid ":c:func:`Py_VISIT`" +msgstr "" + +#: c-api/gcsupport.rst:381 +msgid ":c:func:`Py_SIZE`" +msgstr "" + +#: c-api/gcsupport.rst:382 +msgid "" +":c:func:`Py_TYPE`: if called from a :c:member:`!tp_traverse` " +"handler, :c:func:`!Py_TYPE`'s result will be valid for the duration of the " +"handler call" +msgstr "" + +#: c-api/gcsupport.rst:384 +msgid ":c:func:`PyObject_VisitManagedDict`" +msgstr "" + +#: c-api/gcsupport.rst:385 +msgid ":c:func:`PyObject_TypeCheck`, :c:func:`PyType_IsSubtype`, :c:func:`PyType_HasFeature`" +msgstr "" + +#: c-api/gcsupport.rst:387 +msgid "" +":samp:`Py{}_Check` and :samp:`Py{}_CheckExact` -- for " +"example, :c:func:`PyTuple_Check`" +msgstr "" + +#: c-api/gcsupport.rst:389 +msgid ":ref:`duringgc-functions`" +msgstr "" + +#: c-api/gcsupport.rst:394 +msgid "\"DuringGC\" functions" +msgstr "" + +#: c-api/gcsupport.rst:396 +msgid "" +"The following functions should *only* be used in " +"a :c:member:`~PyTypeObject.tp_traverse` handler; calling them in other " +"contexts may have unintended consequences." +msgstr "" + +#: c-api/gcsupport.rst:400 +msgid "" +"These functions act like their counterparts without the ``_DuringGC`` " +"suffix, but they are guaranteed to not have side effects, they do not set an " +"exception on failure, and they return/set :term:`borrowed references " +"` as detailed in the individual documentation." +msgstr "" + +#: c-api/gcsupport.rst:405 +msgid "" +"Note that these functions may fail (return ``NULL`` or ``-1``), but as they " +"do not set an exception, no error information is available. In some cases, " +"failure is not distinguishable from a successful ``NULL`` result." +msgstr "" + +#: c-api/gcsupport.rst:430 c-api/gcsupport.rst:443 +msgid "See :ref:`duringgc-functions` for common information." +msgstr "" + +#: c-api/gcsupport.rst:421 +msgid ":c:func:`PyObject_GetTypeData`, :c:func:`PyObject_GetItemData`, :c:func:`PyType_GetModuleState`, :c:func:`PyModule_GetState`, :c:func:`PyModule_GetToken`, :c:func:`PyType_GetBaseByToken`" +msgstr "" + +#: c-api/gcsupport.rst:432 +msgid "" +"Sets *\\*result* to a :term:`borrowed reference` rather than a strong one. " +"The reference is valid for the duration of the :c:member:`!tp_traverse` " +"handler call." +msgstr "" + +#: c-api/gcsupport.rst:438 +msgid ":c:func:`PyType_GetBaseByToken`" +msgstr "" + +#: c-api/gcsupport.rst:445 +msgid "" +"These functions return a :term:`borrowed reference`, which is valid for the " +"duration of the :c:member:`!tp_traverse` handler call." +msgstr "" + +#: c-api/gcsupport.rst:452 +msgid ":c:func:`PyType_GetModule`, :c:func:`PyType_GetModuleByToken`" +msgstr "" + +#: c-api/gcsupport.rst:457 msgid "Controlling the Garbage Collector State" msgstr "" -#: c-api/gcsupport.rst:215 +#: c-api/gcsupport.rst:459 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" -#: c-api/gcsupport.rst:220 +#: c-api/gcsupport.rst:464 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" msgstr "" -#: c-api/gcsupport.rst:223 +#: c-api/gcsupport.rst:467 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " -"returns ``0`` immediately. Errors during garbage collection are passed to :" -"data:`sys.unraisablehook`. This function does not raise exceptions." +"returns ``0`` immediately. Errors during garbage collection are passed " +"to :data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" -#: c-api/gcsupport.rst:233 +#: c-api/gcsupport.rst:477 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:241 +#: c-api/gcsupport.rst:485 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:249 +#: c-api/gcsupport.rst:493 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." msgstr "" -#: c-api/gcsupport.rst:256 +#: c-api/gcsupport.rst:500 msgid "Querying Garbage Collector State" msgstr "" -#: c-api/gcsupport.rst:258 +#: c-api/gcsupport.rst:502 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" -#: c-api/gcsupport.rst:263 +#: c-api/gcsupport.rst:507 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" -#: c-api/gcsupport.rst:267 +#: c-api/gcsupport.rst:511 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" -#: c-api/gcsupport.rst:270 +#: c-api/gcsupport.rst:514 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" -#: c-api/gcsupport.rst:278 +#: c-api/gcsupport.rst:522 msgid "" -"Type of the visitor function to be passed to :c:func:" -"`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " -"``PyUnstable_GC_VisitObjects``. Return ``0`` to continue iteration, return " -"``1`` to stop iteration. Other return values are reserved for now so " -"behavior on returning anything else is undefined." +"Type of the visitor function to be passed " +"to :c:func:`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* " +"passed to ``PyUnstable_GC_VisitObjects``. Return ``1`` to continue " +"iteration, return ``0`` to stop iteration. Other return values are reserved " +"for now so behavior on returning anything else is undefined." msgstr "" diff --git a/c-api/gen.po b/c-api/gen.po index 83df41a5b..7422d82d6 100644 --- a/c-api/gen.po +++ b/c-api/gen.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-10-04 12:24+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -23,13 +23,13 @@ msgstr "Objets générateur" msgid "" "Generator objects are what Python uses to implement generator iterators. " "They are normally created by iterating over a function that yields values, " -"rather than explicitly calling :c:func:`PyGen_New` or :c:func:" -"`PyGen_NewWithQualName`." +"rather than explicitly calling :c:func:`PyGen_New` " +"or :c:func:`PyGen_NewWithQualName`." msgstr "" "Python utilise des objets générateurs pour implémenter les itérations de " "générateurs. Ils sont normalement crées en itérant sur une fonction donnant " -"des valeurs via ``yield``, au lieu d'appeler explicitement :c:func:" -"`PyGen_New` ou :c:func:`PyGen_NewWithQualName`." +"des valeurs via ``yield``, au lieu d'appeler " +"explicitement :c:func:`PyGen_New` ou :c:func:`PyGen_NewWithQualName`." #: c-api/gen.rst:15 msgid "The C structure used for generator objects." @@ -80,3 +80,64 @@ msgstr "" "``__name__`` et ``__qualname__`` valant *name* et *qualname*. Une référence " "à *frame* est volée par cette fonction. L'argument *frame* ne doit pas être " "*NULL*." + +#: c-api/gen.rst:51 +msgid "" +"Return a new :term:`strong reference` to the code object wrapped by *gen*. " +"This function always succeeds." +msgstr "" + +#: c-api/gen.rst:56 +#, fuzzy +msgid "Asynchronous Generator Objects" +msgstr "Objets générateur" + +#: c-api/gen.rst:59 +msgid ":pep:`525`" +msgstr "" + +#: c-api/gen.rst:63 +msgid "" +"The type object corresponding to asynchronous generator objects. This is " +"available as :class:`types.AsyncGeneratorType` in the Python layer." +msgstr "" + +#: c-api/gen.rst:70 +#, fuzzy +msgid "" +"Create a new asynchronous generator wrapping *frame*, with ``__name__`` and " +"``__qualname__`` set to *name* and *qualname*. *frame* is stolen by this " +"function and must not be ``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet générateur basé sur l'objet *frame*, avec " +"``__name__`` et ``__qualname__`` valant *name* et *qualname*. Une référence " +"à *frame* est volée par cette fonction. L'argument *frame* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:74 +msgid "" +"On success, this function returns a :term:`strong reference` to the new " +"asynchronous generator. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" + +#: c-api/gen.rst:82 +#, fuzzy +msgid "" +"Return true if *op* is an asynchronous generator object, false otherwise. " +"This function always succeeds." +msgstr "" +"Renvoie ``True`` si *ob* est un objet générateur. *ob* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:89 +msgid "Deprecated API" +msgstr "" + +#: c-api/gen.rst:93 +msgid "This is an API that was included in Python's C API by mistake." +msgstr "" + +#: c-api/gen.rst:96 +msgid "It is solely here for completeness; do not use this API." +msgstr "" diff --git a/c-api/hash.po b/c-api/hash.po index 47fd6bc40..ef09dc4bd 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -1,13 +1,11 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-10-29 22:25+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -29,72 +27,174 @@ msgstr "" msgid "Hash value type: signed integer." msgstr "" -#: c-api/hash.rst:16 +#: c-api/hash.rst:17 msgid "Hash value type: unsigned integer." msgstr "" -#: c-api/hash.rst:22 +#: c-api/hash.rst:24 +msgid "" +"A numerical value indicating the algorithm for hashing " +"of :class:`str`, :class:`bytes`, and :class:`memoryview`." +msgstr "" + +#: c-api/hash.rst:27 +msgid "The algorithm name is exposed by :data:`sys.hash_info.algorithm`." +msgstr "" + +#: c-api/hash.rst:36 +msgid "" +"Numerical values to compare to :c:macro:`Py_HASH_ALGORITHM` to determine " +"which algorithm is used for hashing. The hash algorithm can be configured " +"via the configure :option:`--with-hash-algorithm` option." +msgstr "" + +#: c-api/hash.rst:40 +msgid "Add :c:macro:`!Py_HASH_FNV` and :c:macro:`!Py_HASH_SIPHASH24`." +msgstr "" + +#: c-api/hash.rst:43 +msgid "Add :c:macro:`!Py_HASH_SIPHASH13`." +msgstr "" + +#: c-api/hash.rst:49 +msgid "" +"Buffers of length in range ``[1, Py_HASH_CUTOFF)`` are hashed using DJBX33A " +"instead of the algorithm described by :c:macro:`Py_HASH_ALGORITHM`." +msgstr "" + +#: c-api/hash.rst:52 +msgid "A :c:macro:`!Py_HASH_CUTOFF` of 0 disables the optimization." +msgstr "" + +#: c-api/hash.rst:53 +msgid "" +":c:macro:`!Py_HASH_CUTOFF` must be non-negative and less or equal than 7." +msgstr "" + +#: c-api/hash.rst:55 +msgid "" +"32-bit platforms should use a cutoff smaller than 64-bit platforms because " +"it is easier to create colliding strings. A cutoff of 7 on 64-bit platforms " +"and 5 on 32-bit platforms should provide a decent safety margin." +msgstr "" + +#: c-api/hash.rst:59 +msgid "This corresponds to the :data:`sys.hash_info.cutoff` constant." +msgstr "" + +#: c-api/hash.rst:66 msgid "" "The `Mersenne prime `_ ``P = " "2**n -1``, used for numeric hash scheme." msgstr "" -#: c-api/hash.rst:28 +#: c-api/hash.rst:69 +msgid "This corresponds to the :data:`sys.hash_info.modulus` constant." +msgstr "" + +#: c-api/hash.rst:76 msgid "The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`." msgstr "" -#: c-api/hash.rst:34 +#: c-api/hash.rst:83 msgid "Prime multiplier used in string and various other hashes." msgstr "" -#: c-api/hash.rst:40 +#: c-api/hash.rst:90 msgid "The hash value returned for a positive infinity." msgstr "" -#: c-api/hash.rst:46 +#: c-api/hash.rst:92 +msgid "This corresponds to the :data:`sys.hash_info.inf` constant." +msgstr "" + +#: c-api/hash.rst:99 msgid "The multiplier used for the imaginary part of a complex number." msgstr "" -#: c-api/hash.rst:52 +#: c-api/hash.rst:101 +msgid "This corresponds to the :data:`sys.hash_info.imag` constant." +msgstr "" + +#: c-api/hash.rst:108 msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`." msgstr "" -#: c-api/hash.rst:60 +#: c-api/hash.rst:112 +msgid "Hash function." +msgstr "" + +#: c-api/hash.rst:116 msgid "Hash function name (UTF-8 encoded string)." msgstr "" -#: c-api/hash.rst:64 +#: c-api/hash.rst:118 +msgid "This corresponds to the :data:`sys.hash_info.algorithm` constant." +msgstr "" + +#: c-api/hash.rst:122 msgid "Internal size of the hash value in bits." msgstr "" -#: c-api/hash.rst:68 +#: c-api/hash.rst:124 +msgid "This corresponds to the :data:`sys.hash_info.hash_bits` constant." +msgstr "" + +#: c-api/hash.rst:128 msgid "Size of seed input in bits." msgstr "" -#: c-api/hash.rst:75 +#: c-api/hash.rst:130 +msgid "This corresponds to the :data:`sys.hash_info.seed_bits` constant." +msgstr "" + +#: c-api/hash.rst:137 msgid "Get the hash function definition." msgstr "" -#: c-api/hash.rst:78 +#: c-api/hash.rst:140 msgid ":pep:`456` \"Secure and interchangeable hash algorithm\"." msgstr "" -#: c-api/hash.rst:85 +#: c-api/hash.rst:147 msgid "" "Hash a pointer value: process the pointer value as an integer (cast it to " "``uintptr_t`` internally). The pointer is not dereferenced." msgstr "" -#: c-api/hash.rst:88 +#: c-api/hash.rst:150 msgid "The function cannot fail: it cannot return ``-1``." msgstr "" -#: c-api/hash.rst:94 +#: c-api/hash.rst:157 +msgid "" +"Compute and return the hash value of a buffer of *len* bytes starting at " +"address *ptr*. The hash is guaranteed to match that " +"of :class:`bytes`, :class:`memoryview`, and other built-in objects that " +"implement the :ref:`buffer protocol `." +msgstr "" + +#: c-api/hash.rst:162 +msgid "" +"Use this function to implement hashing for immutable objects " +"whose :c:member:`~PyTypeObject.tp_richcompare` function compares to another " +"object's buffer." +msgstr "" + +#: c-api/hash.rst:166 +msgid "*len* must be greater than or equal to ``0``." +msgstr "" + +#: c-api/hash.rst:168 +msgid "This function always succeeds." +msgstr "" + +#: c-api/hash.rst:175 msgid "" "Generic hashing function that is meant to be put into a type object's " "``tp_hash`` slot. Its result only depends on the object's identity." msgstr "" -#: c-api/hash.rst:99 +#: c-api/hash.rst:180 msgid "In CPython, it is equivalent to :c:func:`Py_HashPointer`." msgstr "" diff --git a/c-api/import.po b/c-api/import.po index 377c58635..078be5745 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -20,64 +20,49 @@ msgstr "Importer des modules" #: c-api/import.rst:16 msgid "" -"This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:" -"`const char *` as an argument instead of a :c:expr:`PyObject *`." +"This is a wrapper around :c:func:`PyImport_Import()` which takes " +"a :c:expr:`const char *` as an argument instead of a :c:expr:`PyObject *`." msgstr "" -#: c-api/import.rst:21 -msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." -msgstr "" - -#: c-api/import.rst:23 -msgid "" -"This function used to fail immediately when the import lock was held by " -"another thread. In Python 3.3 though, the locking scheme switched to per-" -"module locks for most purposes, so this function's special behaviour isn't " -"needed anymore." -msgstr "" - -#: c-api/import.rst:29 -msgid "Use :c:func:`PyImport_ImportModule` instead." -msgstr "" - -#: c-api/import.rst:37 +#: c-api/import.rst:24 msgid "" "Import a module. This is best described by referring to the built-in Python " "function :func:`__import__`." msgstr "" -#: c-api/import.rst:56 +#: c-api/import.rst:43 msgid "" "The return value is a new reference to the imported module or top-level " -"package, or ``NULL`` with an exception set on failure. Like for :func:" -"`__import__`, the return value when a submodule of a package was requested " -"is normally the top-level package, unless a non-empty *fromlist* was given." +"package, or ``NULL`` with an exception set on failure. Like " +"for :func:`__import__`, the return value when a submodule of a package was " +"requested is normally the top-level package, unless a non-empty *fromlist* " +"was given." msgstr "" -#: c-api/import.rst:46 +#: c-api/import.rst:33 msgid "" -"Failing imports remove incomplete module objects, like with :c:func:" -"`PyImport_ImportModule`." +"Failing imports remove incomplete module objects, like " +"with :c:func:`PyImport_ImportModule`." msgstr "" -#: c-api/import.rst:52 +#: c-api/import.rst:39 msgid "" "Import a module. This is best described by referring to the built-in Python " "function :func:`__import__`, as the standard :func:`__import__` function " "calls this function directly." msgstr "" -#: c-api/import.rst:66 +#: c-api/import.rst:53 msgid "" "Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " "UTF-8 encoded string instead of a Unicode object." msgstr "" -#: c-api/import.rst:69 +#: c-api/import.rst:56 msgid "Negative values for *level* are no longer accepted." msgstr "" -#: c-api/import.rst:74 +#: c-api/import.rst:61 msgid "" "This is a higher-level interface that calls the current \"import hook " "function\" (with an explicit *level* of 0, meaning absolute import). It " @@ -86,73 +71,73 @@ msgid "" "hooks are installed in the current environment." msgstr "" -#: c-api/import.rst:80 +#: c-api/import.rst:67 msgid "This function always uses absolute imports." msgstr "" -#: c-api/import.rst:85 +#: c-api/import.rst:72 msgid "" "Reload a module. Return a new reference to the reloaded module, or ``NULL`` " "with an exception set on failure (the module still exists in this case)." msgstr "" -#: c-api/import.rst:91 +#: c-api/import.rst:78 msgid "Return the module object corresponding to a module name." msgstr "" -#: c-api/import.rst:93 +#: c-api/import.rst:80 msgid "" "The *name* argument may be of the form ``package.module``. First check the " "modules dictionary if there's one there, and if not, create a new one and " "insert it in the modules dictionary." msgstr "" -#: c-api/import.rst:97 +#: c-api/import.rst:84 msgid "" "Return a :term:`strong reference` to the module on success. Return ``NULL`` " "with an exception set on failure." msgstr "" -#: c-api/import.rst:100 +#: c-api/import.rst:87 msgid "The module name *name* is decoded from UTF-8." msgstr "" -#: c-api/import.rst:102 +#: c-api/import.rst:89 msgid "" "This function does not load or import the module; if the module wasn't " -"already loaded, you will get an empty module object. Use :c:func:" -"`PyImport_ImportModule` or one of its variants to import a module. Package " -"structures implied by a dotted name for *name* are not created if not " -"already present." +"already loaded, you will get an empty module object. " +"Use :c:func:`PyImport_ImportModule` or one of its variants to import a " +"module. Package structures implied by a dotted name for *name* are not " +"created if not already present." msgstr "" -#: c-api/import.rst:113 +#: c-api/import.rst:100 msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference` and *name* is a Python :class:`str` object." msgstr "" -#: c-api/import.rst:121 +#: c-api/import.rst:108 msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference`." msgstr "" -#: c-api/import.rst:129 +#: c-api/import.rst:116 msgid "" "Given a module name (possibly of the form ``package.module``) and a code " "object read from a Python bytecode file or obtained from the built-in " "function :func:`compile`, load the module. Return a new reference to the " "module object, or ``NULL`` with an exception set if an error occurred. " "*name* is removed from :data:`sys.modules` in error cases, even if *name* " -"was already in :data:`sys.modules` on entry to :c:func:" -"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" -"data:`sys.modules` is dangerous, as imports of such modules have no way to " -"know that the module object is an unknown (and probably damaged with respect " -"to the module author's intents) state." +"was already in :data:`sys.modules` on entry " +"to :c:func:`PyImport_ExecCodeModule`. Leaving incompletely initialized " +"modules in :data:`sys.modules` is dangerous, as imports of such modules have " +"no way to know that the module object is an unknown (and probably damaged " +"with respect to the module author's intents) state." msgstr "" -#: c-api/import.rst:139 +#: c-api/import.rst:126 msgid "" "The module's :attr:`~module.__spec__` and :attr:`~module.__loader__` will be " "set, if not set already, with the appropriate values. The spec's loader " @@ -160,61 +145,68 @@ msgid "" "of :class:`~importlib.machinery.SourceFileLoader` otherwise." msgstr "" -#: c-api/import.rst:144 +#: c-api/import.rst:131 msgid "" "The module's :attr:`~module.__file__` attribute will be set to the code " -"object's :attr:`~codeobject.co_filename`. If applicable, :attr:`~module." -"__cached__` will also be set." +"object's :attr:`~codeobject.co_filename`." msgstr "" -#: c-api/import.rst:148 +#: c-api/import.rst:134 msgid "" -"This function will reload the module if it was already imported. See :c:" -"func:`PyImport_ReloadModule` for the intended way to reload a module." +"This function will reload the module if it was already imported. " +"See :c:func:`PyImport_ReloadModule` for the intended way to reload a module." msgstr "" -#: c-api/import.rst:151 +#: c-api/import.rst:137 msgid "" "If *name* points to a dotted name of the form ``package.module``, any " "package structures not already created will still not be created." msgstr "" -#: c-api/import.rst:154 +#: c-api/import.rst:140 msgid "" -"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" -"`PyImport_ExecCodeModuleWithPathnames`." +"See also :c:func:`PyImport_ExecCodeModuleEx` " +"and :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "" -#: c-api/import.rst:157 +#: c-api/import.rst:143 msgid "" -"The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__` is " -"deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." +"The setting of ``__cached__`` and :attr:`~module.__loader__` is deprecated. " +"See :class:`~importlib.machinery.ModuleSpec` for alternatives." msgstr "" -#: c-api/import.rst:165 +#: c-api/import.rst:148 +msgid "``__cached__`` is no longer set." +msgstr "" + +#: c-api/import.rst:154 msgid "" "Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`~module.__file__` " "attribute of the module object is set to *pathname* if it is non-``NULL``." msgstr "" -#: c-api/import.rst:168 +#: c-api/import.rst:157 msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "" -#: c-api/import.rst:173 +#: c-api/import.rst:162 msgid "" -"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`~module.__cached__` " -"attribute of the module object is set to *cpathname* if it is non-``NULL``. " -"Of the three functions, this is the preferred one to use." +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the path to any compiled file " +"via *cpathname* is used appropriately when non-``NULL``. Of the three " +"functions, this is the preferred one to use." msgstr "" -#: c-api/import.rst:179 +#: c-api/import.rst:168 msgid "" -"Setting :attr:`~module.__cached__` is deprecated. See :class:`~importlib." -"machinery.ModuleSpec` for alternatives." +"Setting ``__cached__`` is deprecated. " +"See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "" + +#: c-api/import.rst:172 +msgid "``__cached__`` no longer set." msgstr "" -#: c-api/import.rst:186 +#: c-api/import.rst:178 msgid "" "Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " "*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " @@ -222,92 +214,93 @@ msgid "" "set to ``NULL``." msgstr "" -#: c-api/import.rst:192 +#: c-api/import.rst:184 msgid "" "Uses :func:`!imp.source_from_cache` in calculating the source path if only " "the bytecode path is provided." msgstr "" -#: c-api/import.rst:195 +#: c-api/import.rst:187 msgid "No longer uses the removed :mod:`!imp` module." msgstr "" -#: c-api/import.rst:201 +#: c-api/import.rst:193 msgid "" "Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " "file). The magic number should be present in the first four bytes of the " "bytecode file, in little-endian byte order. Returns ``-1`` on error." msgstr "" -#: c-api/import.rst:205 +#: c-api/import.rst:197 msgid "Return value of ``-1`` upon failure." msgstr "" -#: c-api/import.rst:211 +#: c-api/import.rst:203 msgid "" "Return the magic tag string for :pep:`3147` format Python bytecode file " "names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " "authoritative and should be used instead of this function." msgstr "" -#: c-api/import.rst:219 +#: c-api/import.rst:211 msgid "" -"Return the dictionary used for the module administration (a.k.a. ``sys." -"modules``). Note that this is a per-interpreter variable." +"Return the dictionary used for the module administration (a.k.a. " +"``sys.modules``). Note that this is a per-interpreter variable." msgstr "" -#: c-api/import.rst:224 +#: c-api/import.rst:216 msgid "" "Return the already imported module with the given name. If the module has " "not been imported yet then returns ``NULL`` but does not set an error. " "Returns ``NULL`` and sets an error if the lookup failed." msgstr "" -#: c-api/import.rst:232 +#: c-api/import.rst:224 msgid "" "Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item " "*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " "dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " "is found that can handle the path item. Return ``None`` if no hook could; " "this tells our caller that the :term:`path based finder` could not find a " -"finder for this path item. Cache the result in :data:`sys." -"path_importer_cache`. Return a new reference to the finder object." +"finder for this path item. Cache the result " +"in :data:`sys.path_importer_cache`. Return a new reference to the finder " +"object." msgstr "" -#: c-api/import.rst:243 +#: c-api/import.rst:235 msgid "" "Load a frozen module named *name*. Return ``1`` for success, ``0`` if the " "module is not found, and ``-1`` with an exception set if the initialization " -"failed. To access the imported module on a successful load, use :c:func:" -"`PyImport_ImportModule`. (Note the misnomer --- this function would reload " -"the module if it was already imported.)" +"failed. To access the imported module on a successful load, " +"use :c:func:`PyImport_ImportModule`. (Note the misnomer --- this function " +"would reload the module if it was already imported.)" msgstr "" -#: c-api/import.rst:251 +#: c-api/import.rst:243 msgid "The ``__file__`` attribute is no longer set on the module." msgstr "" -#: c-api/import.rst:257 +#: c-api/import.rst:249 msgid "" "Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " "UTF-8 encoded string instead of a Unicode object." msgstr "" -#: c-api/import.rst:265 +#: c-api/import.rst:257 msgid "" "This is the structure type definition for frozen module descriptors, as " "generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " -"Python source distribution). Its definition, found in :file:`Include/import." -"h`, is::" +"Python source distribution). Its definition, found in :file:`Include/" +"import.h`, is::" msgstr "" -#: c-api/import.rst:277 +#: c-api/import.rst:269 msgid "" "The new ``is_package`` field indicates whether the module is a package or " "not. This replaces setting the ``size`` field to a negative value." msgstr "" -#: c-api/import.rst:283 +#: c-api/import.rst:275 #, fuzzy msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " @@ -316,13 +309,13 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" -"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" -"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées " +"de :c:type:`struct _frozen`, dont tous les membres de la dernière valent " "``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: c-api/import.rst:291 +#: c-api/import.rst:283 msgid "" "Add a single module to the existing table of built-in modules. This is a " "convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " @@ -332,7 +325,7 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" -#: c-api/import.rst:301 +#: c-api/import.rst:293 msgid "" "Structure describing a single entry in the list of built-in modules. " "Programs which embed Python may use an array of these structures in " @@ -340,32 +333,136 @@ msgid "" "built-in modules. The structure consists of two members:" msgstr "" -#: c-api/import.rst:309 +#: c-api/import.rst:301 msgid "The module name, as an ASCII encoded string." msgstr "" -#: c-api/import.rst:313 +#: c-api/import.rst:305 msgid "Initialization function for a module built into the interpreter." msgstr "" -#: c-api/import.rst:318 +#: c-api/import.rst:310 msgid "" "Add a collection of modules to the table of built-in modules. The *newtab* " -"array must end with a sentinel entry which contains ``NULL`` for the :c:" -"member:`~_inittab.name` field; failure to provide the sentinel value can " -"result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient " -"memory could be allocated to extend the internal table. In the event of " -"failure, no modules are added to the internal table. This must be called " -"before :c:func:`Py_Initialize`." +"array must end with a sentinel entry which contains ``NULL`` for " +"the :c:member:`~_inittab.name` field; failure to provide the sentinel value " +"can result in a memory fault. Returns ``0`` on success or ``-1`` if " +"insufficient memory could be allocated to extend the internal table. In the " +"event of failure, no modules are added to the internal table. This must be " +"called before :c:func:`Py_Initialize`." msgstr "" -#: c-api/import.rst:325 +#: c-api/import.rst:317 msgid "" "If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " "or :c:func:`PyImport_ExtendInittab` must be called before each Python " "initialization." msgstr "" +#: c-api/import.rst:324 +msgid "" +"The table of built-in modules used by Python initialization. Do not use this " +"directly; use :c:func:`PyImport_AppendInittab` " +"and :c:func:`PyImport_ExtendInittab` instead." +msgstr "" + +#: c-api/import.rst:331 +msgid "Import the module *mod_name* and get its attribute *attr_name*." +msgstr "" + +#: c-api/import.rst:333 +msgid "Names must be Python :class:`str` objects." +msgstr "" + +#: c-api/import.rst:335 +msgid "" +"Helper function combining :c:func:`PyImport_Import` " +"and :c:func:`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` " +"if the module is not found, and :exc:`AttributeError` if the attribute " +"doesn't exist." +msgstr "" + +#: c-api/import.rst:364 +msgid "" +"Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " +"strings instead of Python :class:`str` objects." +msgstr "" + +#: c-api/import.rst:351 +msgid "Gets the current lazy imports mode." +msgstr "" + +#: c-api/import.rst:357 +msgid "" +"Return a :term:`strong reference` to the current lazy imports filter, or " +"``NULL`` if none exists. This function always succeeds." +msgstr "" + +#: c-api/import.rst:367 +msgid "This function always returns ``0``." +msgstr "" + +#: c-api/import.rst:373 +msgid "" +"Sets the current lazy imports filter. The *filter* should be a callable that " +"will receive ``(importing_module_name, imported_module_name, [fromlist])`` " +"when an import can potentially be lazy. The ``imported_module_name`` value " +"is the resolved module name, so ``lazy from .spam import eggs`` passes " +"``package.spam``. The callable must return ``True`` if the import should be " +"lazy and ``False`` otherwise." +msgstr "" + +#: c-api/import.rst:380 +msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." +msgstr "" + +#: c-api/import.rst:386 +msgid "Enumeration of possible lazy import modes." +msgstr "" + +#: c-api/import.rst:390 +msgid "Respect the ``lazy`` keyword in source code. This is the default mode." +msgstr "" + +#: c-api/import.rst:394 +msgid "Make all imports lazy by default." +msgstr "" + +#: c-api/import.rst:398 +msgid "" +"Disable lazy imports entirely. Even explicit ``lazy`` statements become " +"eager imports." +msgstr "" + +#: c-api/import.rst:405 +msgid "" +"This function is a building block that enables embedders to implement " +"the :py:meth:`~importlib.abc.Loader.create_module` step of custom static " +"extension importers (e.g. of statically-linked extensions)." +msgstr "" + +#: c-api/import.rst:409 +msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." +msgstr "" + +#: c-api/import.rst:411 +msgid "" +"*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." +msgstr "" + +#: c-api/import.rst:414 +msgid "" +"On success, create and return a module object. This module will not be " +"initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom " +"importers should do this in " +"their :py:meth:`~importlib.abc.Loader.exec_module` method.)" +msgstr "" + +#: c-api/import.rst:420 +msgid "On error, return NULL with an exception set." +msgstr "" + #~ msgid "built-in function" #~ msgstr "fonction native" diff --git a/c-api/index.po b/c-api/index.po index 53095f582..7ccf83a42 100644 --- a/c-api/index.po +++ b/c-api/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -15,18 +15,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/index.rst:5 -msgid "Python/C API Reference Manual" +#, fuzzy +msgid "Python/C API reference manual" msgstr "Manuel de référence de l'API Python/C" #: c-api/index.rst:7 msgid "" "This manual documents the API used by C and C++ programmers who want to " -"write extension modules or embed Python. It is a companion to :ref:" -"`extending-index`, which describes the general principles of extension " -"writing but does not document the API functions in detail." +"write extension modules or embed Python. It is a companion " +"to :ref:`extending-index`, which describes the general principles of " +"extension writing but does not document the API functions in detail." msgstr "" "C'est la documentation de l'API utilisée par les développeurs C et C++ " -"écrivant des modules d'extension ou intégrant Python. Elle va de pair avec :" -"ref:`extending-index`, qui décrit les principes généraux de l'écriture " +"écrivant des modules d'extension ou intégrant Python. Elle va de pair " +"avec :ref:`extending-index`, qui décrit les principes généraux de l'écriture " "d'extensions, mais ne rentre pas dans les détails de chaque fonction de " "l'API." diff --git a/c-api/init.po b/c-api/init.po index 2cf4748da..086e4b14c 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-11-29 18:22+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -14,2777 +14,178 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: c-api/init.rst:8 -msgid "Initialization, Finalization, and Threads" +#: c-api/init.rst:4 +msgid "Initialization, finalization, and threads" msgstr "" -#: c-api/init.rst:10 -msgid "" -"See :ref:`Python Initialization Configuration ` for details on " -"how to configure the interpreter prior to initialization." +#: c-api/init.rst:6 +msgid "This page has been split up into the following:" msgstr "" -#: c-api/init.rst:16 -msgid "Before Python Initialization" +#: c-api/init.rst:8 +msgid ":ref:`initialization`" msgstr "" -#: c-api/init.rst:18 -msgid "" -"In an application embedding Python, the :c:func:`Py_Initialize` function " -"must be called before using any other Python/C API functions; with the " -"exception of a few functions and the :ref:`global configuration variables " -"`." +#: c-api/init.rst:9 +msgid ":ref:`threads`" msgstr "" -#: c-api/init.rst:23 -msgid "" -"The following functions can be safely called before Python is initialized:" +#: c-api/init.rst:10 +msgid ":ref:`synchronization`" msgstr "" -#: c-api/init.rst:25 -msgid "Functions that initialize the interpreter:" +#: c-api/init.rst:11 +msgid ":ref:`thread-local-storage`" msgstr "" -#: c-api/init.rst:27 -#, fuzzy -msgid ":c:func:`Py_Initialize`" -msgstr ":c:func:`PyMem_RawCalloc`," - -#: c-api/init.rst:28 -#, fuzzy -msgid ":c:func:`Py_InitializeEx`" -msgstr ":c:func:`PyMem_RawCalloc`," +#: c-api/init.rst:12 +msgid ":ref:`sub-interpreter-support`" +msgstr "" -#: c-api/init.rst:29 -msgid ":c:func:`Py_InitializeFromConfig`" +#: c-api/init.rst:13 +msgid ":ref:`profiling`" msgstr "" -#: c-api/init.rst:30 #, fuzzy -msgid ":c:func:`Py_BytesMain`" -msgstr ":c:func:`PyMem_RawCalloc`," +#~ msgid ":c:func:`Py_Initialize`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:31 #, fuzzy -msgid ":c:func:`Py_Main`" -msgstr ":c:func:`PyMem_RawCalloc`," - -#: c-api/init.rst:32 -msgid "the runtime pre-initialization functions covered in :ref:`init-config`" -msgstr "" - -#: c-api/init.rst:34 -msgid "Configuration functions:" -msgstr "" - -#: c-api/init.rst:36 -msgid ":c:func:`PyImport_AppendInittab`" -msgstr "" - -#: c-api/init.rst:37 -msgid ":c:func:`PyImport_ExtendInittab`" -msgstr "" - -#: c-api/init.rst:38 -msgid ":c:func:`!PyInitFrozenExtensions`" -msgstr "" - -#: c-api/init.rst:39 -msgid ":c:func:`PyMem_SetAllocator`" -msgstr "" - -#: c-api/init.rst:40 -msgid ":c:func:`PyMem_SetupDebugHooks`" -msgstr "" - -#: c-api/init.rst:41 -msgid ":c:func:`PyObject_SetArenaAllocator`" -msgstr "" - -#: c-api/init.rst:42 -msgid ":c:func:`Py_SetProgramName`" -msgstr "" - -#: c-api/init.rst:43 -msgid ":c:func:`Py_SetPythonHome`" -msgstr "" - -#: c-api/init.rst:44 -msgid ":c:func:`PySys_ResetWarnOptions`" -msgstr "" - -#: c-api/init.rst:45 -msgid "the configuration functions covered in :ref:`init-config`" -msgstr "" - -#: c-api/init.rst:47 -msgid "Informative functions:" -msgstr "" - -#: c-api/init.rst:57 -msgid ":c:func:`Py_IsInitialized`" -msgstr "" - -#: c-api/init.rst:50 -msgid ":c:func:`PyMem_GetAllocator`" -msgstr "" - -#: c-api/init.rst:51 -msgid ":c:func:`PyObject_GetArenaAllocator`" -msgstr "" - -#: c-api/init.rst:52 -msgid ":c:func:`Py_GetBuildInfo`" -msgstr "" - -#: c-api/init.rst:53 -msgid ":c:func:`Py_GetCompiler`" -msgstr "" - -#: c-api/init.rst:54 -msgid ":c:func:`Py_GetCopyright`" -msgstr "" - -#: c-api/init.rst:55 -msgid ":c:func:`Py_GetPlatform`" -msgstr "" - -#: c-api/init.rst:56 -msgid ":c:func:`Py_GetVersion`" -msgstr "" +#~ msgid ":c:func:`Py_InitializeEx`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:59 #, fuzzy -msgid "Utilities:" -msgstr "Utilitaires :" - -#: c-api/init.rst:61 -msgid ":c:func:`Py_DecodeLocale`" -msgstr "" - -#: c-api/init.rst:62 -msgid "" -"the status reporting and utility functions covered in :ref:`init-config`" -msgstr "" - -#: c-api/init.rst:64 -msgid "Memory allocators:" -msgstr "" +#~ msgid ":c:func:`Py_BytesMain`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:66 #, fuzzy -msgid ":c:func:`PyMem_RawMalloc`" -msgstr ":c:func:`PyMem_RawCalloc`," +#~ msgid ":c:func:`Py_Main`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:67 #, fuzzy -msgid ":c:func:`PyMem_RawRealloc`" -msgstr ":c:func:`PyMem_RawCalloc`," +#~ msgid "Utilities:" +#~ msgstr "Utilitaires :" -#: c-api/init.rst:68 #, fuzzy -msgid ":c:func:`PyMem_RawCalloc`" -msgstr ":c:func:`PyMem_RawCalloc`," - -#: c-api/init.rst:69 -msgid ":c:func:`PyMem_RawFree`" -msgstr "" - -#: c-api/init.rst:71 -msgid "Synchronization:" -msgstr "" +#~ msgid ":c:func:`PyMem_RawMalloc`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:73 #, fuzzy -msgid ":c:func:`PyMutex_Lock`" -msgstr ":c:func:`PyMem_RawCalloc`," +#~ msgid ":c:func:`PyMem_RawRealloc`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:74 #, fuzzy -msgid ":c:func:`PyMutex_Unlock`" -msgstr ":c:func:`PyMem_RawCalloc`," +#~ msgid ":c:func:`PyMem_RawCalloc`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:78 -msgid "" -"Despite their apparent similarity to some of the functions listed above, the " -"following functions **should not be called** before the interpreter has been " -"initialized: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" -"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" -"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" -"`Py_GetProgramName`, :c:func:`PyEval_InitThreads`, and :c:func:`Py_RunMain`." -msgstr "" - -#: c-api/init.rst:90 -msgid "Global configuration variables" -msgstr "" - -#: c-api/init.rst:92 -msgid "" -"Python has variables for the global configuration to control different " -"features and options. By default, these flags are controlled by :ref:" -"`command line options `." -msgstr "" - -#: c-api/init.rst:96 -msgid "" -"When a flag is set by an option, the value of the flag is the number of " -"times that the option was set. For example, ``-b`` sets :c:data:" -"`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to " -"2." -msgstr "" - -#: c-api/init.rst:102 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"bytes_warning` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:106 -msgid "" -"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" -"class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater " -"or equal to ``2``." -msgstr "" - -#: c-api/init.rst:110 -msgid "Set by the :option:`-b` option." -msgstr "" - -#: c-api/init.rst:116 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"parser_debug` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:120 -msgid "" -"Turn on parser debugging output (for expert only, depending on compilation " -"options)." -msgstr "" - -#: c-api/init.rst:123 -msgid "" -"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " -"variable." -msgstr "" - -#: c-api/init.rst:130 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"write_bytecode` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:134 -msgid "" -"If set to non-zero, Python won't try to write ``.pyc`` files on the import " -"of source modules." -msgstr "" - -#: c-api/init.rst:137 -msgid "" -"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " -"environment variable." -msgstr "" - -#: c-api/init.rst:144 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"pathconfig_warnings` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:148 -msgid "" -"Suppress error messages when calculating the module search path in :c:func:" -"`Py_GetPath`." -msgstr "" - -#: c-api/init.rst:151 -msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." -msgstr "" - -#: c-api/init.rst:157 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"hash_seed` and :c:member:`PyConfig.use_hash_seed` should be used instead, " -"see :ref:`Python Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:162 -msgid "" -"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " -"a non-empty string." -msgstr "" - -#: c-api/init.rst:165 -msgid "" -"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " -"variable to initialize the secret hash seed." -msgstr "" - -#: c-api/init.rst:172 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"use_environment` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:176 #, fuzzy -msgid "" -"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" -"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." -msgstr "" -"Ignore toutes les variables d'environnement :envvar:`PYTHON*` qui pourraient " -"être définies. Par exemple, :envvar:`PYTHONPATH` et :envvar:`PYTHONHOME`." - -#: c-api/init.rst:179 -msgid "Set by the :option:`-E` and :option:`-I` options." -msgstr "" - -#: c-api/init.rst:185 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"inspect` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" +#~ msgid ":c:func:`PyMutex_Lock`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:189 -msgid "" -"When a script is passed as first argument or the :option:`-c` option is " -"used, enter interactive mode after executing the script or the command, even " -"when :data:`sys.stdin` does not appear to be a terminal." -msgstr "" - -#: c-api/init.rst:193 -msgid "" -"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " -"variable." -msgstr "" - -#: c-api/init.rst:200 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"interactive` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:204 -msgid "Set by the :option:`-i` option." -msgstr "" - -#: c-api/init.rst:210 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"isolated` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:214 -msgid "" -"Run Python in isolated mode. In isolated mode :data:`sys.path` contains " -"neither the script's directory nor the user's site-packages directory." -msgstr "" - -#: c-api/init.rst:217 -msgid "Set by the :option:`-I` option." -msgstr "" - -#: c-api/init.rst:225 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyPreConfig." -"legacy_windows_fs_encoding` should be used instead, see :ref:`Python " -"Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:229 -msgid "" -"If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error " -"handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, " -"for the :term:`filesystem encoding and error handler`." -msgstr "" - -#: c-api/init.rst:233 -msgid "" -"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " -"variable is set to a non-empty string." -msgstr "" - -#: c-api/init.rst:236 -msgid "See :pep:`529` for more details." -msgstr "Voir la :pep:`529` pour plus d'informations." - -#: c-api/init.rst:256 -msgid "Availability" -msgstr "" - -#: c-api/init.rst:244 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"legacy_windows_stdio` should be used instead, see :ref:`Python " -"Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:248 -msgid "" -"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." -"_WindowsConsoleIO` for :mod:`sys` standard streams." -msgstr "" - -#: c-api/init.rst:251 -msgid "" -"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " -"is set to a non-empty string." -msgstr "" - -#: c-api/init.rst:254 #, fuzzy -msgid "See :pep:`528` for more details." -msgstr "Voir la :pep:`529` pour plus d'informations." - -#: c-api/init.rst:262 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"site_import` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:266 -msgid "" -"Disable the import of the module :mod:`site` and the site-dependent " -"manipulations of :data:`sys.path` that it entails. Also disable these " -"manipulations if :mod:`site` is explicitly imported later (call :func:`site." -"main` if you want them to be triggered)." -msgstr "" -"Désactive l’importation du module :mod:`site` et les modifications locales " -"de :data:`sys.path` qu’il implique. Désactive aussi ces manipulations si :" -"mod:`site` est importé explicitement plus tard (appelez :func:`site.main` si " -"vous voulez les déclencher)." - -#: c-api/init.rst:271 -msgid "Set by the :option:`-S` option." -msgstr "" - -#: c-api/init.rst:277 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"user_site_directory` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:281 -msgid "" -"Don't add the :data:`user site-packages directory ` to :data:" -"`sys.path`." -msgstr "" -"N'ajoute pas le répertoire utilisateur :data:`site-packages ` à :data:`sys.path`." - -#: c-api/init.rst:284 -msgid "" -"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" -"`PYTHONNOUSERSITE` environment variable." -msgstr "" - -#: c-api/init.rst:291 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"optimization_level` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:295 -msgid "" -"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " -"variable." -msgstr "" - -#: c-api/init.rst:302 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"quiet` should be used instead, see :ref:`Python Initialization Configuration " -"`." -msgstr "" - -#: c-api/init.rst:306 -msgid "" -"Don't display the copyright and version messages even in interactive mode." -msgstr "N'affiche pas le copyright et la version, même en mode interactif." +#~ msgid ":c:func:`PyMutex_Unlock`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:308 -msgid "Set by the :option:`-q` option." -msgstr "" - -#: c-api/init.rst:316 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"buffered_stdio` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" +#, fuzzy +#~ msgid "" +#~ "Ignore all :envvar:`!PYTHON*` environment variables, " +#~ "e.g. :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +#~ msgstr "" +#~ "Ignore toutes les variables d'environnement :envvar:`PYTHON*` qui " +#~ "pourraient être définies. Par exemple, :envvar:`PYTHONPATH` " +#~ "et :envvar:`PYTHONHOME`." -#: c-api/init.rst:320 -msgid "Force the stdout and stderr streams to be unbuffered." -msgstr "" +#~ msgid "See :pep:`529` for more details." +#~ msgstr "Voir la :pep:`529` pour plus d'informations." -#: c-api/init.rst:322 -msgid "" -"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " -"environment variable." -msgstr "" +#~ msgid "Availability" +#~ msgstr "Disponibilité" -#: c-api/init.rst:329 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"verbose` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" +#, fuzzy +#~ msgid "See :pep:`528` for more details." +#~ msgstr "Voir la :pep:`529` pour plus d'informations." -#: c-api/init.rst:333 -msgid "" -"Print a message each time a module is initialized, showing the place " -"(filename or built-in module) from which it is loaded. If greater or equal " -"to ``2``, print a message for each file that is checked for when searching " -"for a module. Also provides information on module cleanup at exit." -msgstr "" +#~ msgid "" +#~ "Disable the import of the module :mod:`site` and the site-dependent " +#~ "manipulations of :data:`sys.path` that it entails. Also disable these " +#~ "manipulations if :mod:`site` is explicitly imported later " +#~ "(call :func:`site.main` if you want them to be triggered)." +#~ msgstr "" +#~ "Désactive l’importation du module :mod:`site` et les modifications " +#~ "locales de :data:`sys.path` qu’il implique. Désactive aussi ces " +#~ "manipulations si :mod:`site` est importé explicitement plus tard " +#~ "(appelez :func:`site.main` si vous voulez les déclencher)." -#: c-api/init.rst:338 -msgid "" -"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " -"variable." -msgstr "" +#~ msgid "" +#~ "Don't add the :data:`user site-packages directory ` " +#~ "to :data:`sys.path`." +#~ msgstr "" +#~ "N'ajoute pas le répertoire utilisateur :data:`site-packages " +#~ "` à :data:`sys.path`." -#: c-api/init.rst:345 -msgid "Initializing and finalizing the interpreter" -msgstr "" +#~ msgid "" +#~ "Don't display the copyright and version messages even in interactive mode." +#~ msgstr "N'affiche pas le copyright et la version, même en mode interactif." -#: c-api/init.rst:360 -msgid "" -"Initialize the Python interpreter. In an application embedding Python, " -"this should be called before using any other Python/C API functions; see :" -"ref:`Before Python Initialization ` for the few exceptions." -msgstr "" +#, fuzzy +#~ msgid "High-level API" +#~ msgstr "Bibliothèques de haut-niveau" -#: c-api/init.rst:364 -msgid "" -"This initializes the table of loaded modules (``sys.modules``), and creates " -"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " -"also initializes the module search path (``sys.path``). It does not set " -"``sys.argv``; use the :ref:`Python Initialization Configuration ` API for that. This is a no-op when called for a second time " -"(without calling :c:func:`Py_FinalizeEx` first). There is no return value; " -"it is a fatal error if the initialization fails." -msgstr "" +#, fuzzy +#~ msgid ":c:func:`PyEval_ReleaseThread`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:386 -msgid "" -"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " -"Initialization Configuration `." -msgstr "" +#, fuzzy +#~ msgid ":c:func:`PyThreadState_Get`" +#~ msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/init.rst:376 -msgid "" -"On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which " -"will also affect non-Python uses of the console using the C Runtime." -msgstr "" +#, fuzzy +#~ msgid "Low-level API" +#~ msgstr "Bibliothèques de bas-niveau" -#: c-api/init.rst:382 -msgid "" -"This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If " -"*initsigs* is ``0``, it skips initialization registration of signal " -"handlers, which may be useful when CPython is embedded as part of a larger " -"application." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_CALL`" +#~ msgstr ":const:`PyTrace_CALL`" -#: c-api/init.rst:392 -msgid "" -"Initialize Python from *config* configuration, as described in :ref:`init-" -"from-config`." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_EXCEPTION`" +#~ msgstr ":const:`PyTrace_EXCEPTION`" -#: c-api/init.rst:395 -msgid "" -"See the :ref:`init-config` section for details on pre-initializing the " -"interpreter, populating the runtime configuration structure, and querying " -"the returned status structure." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_LINE`" +#~ msgstr ":const:`PyTrace_LINE`" -#: c-api/init.rst:402 -msgid "" -"Return true (nonzero) when the Python interpreter has been initialized, " -"false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns " -"false until :c:func:`Py_Initialize` is called again." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_RETURN`" +#~ msgstr ":const:`PyTrace_RETURN`" -#: c-api/init.rst:409 -msgid "" -"Return true (non-zero) if the main Python interpreter is :term:`shutting " -"down `. Return false (zero) otherwise." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_C_CALL`" +#~ msgstr ":const:`PyTrace_C_CALL`" -#: c-api/init.rst:417 -msgid "" -"Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " -"of Python/C API functions, and destroy all sub-interpreters (see :c:func:" -"`Py_NewInterpreter` below) that were created and not yet destroyed since the " -"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory " -"allocated by the Python interpreter. This is a no-op when called for a " -"second time (without calling :c:func:`Py_Initialize` again first)." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_C_EXCEPTION`" +#~ msgstr ":const:`PyTrace_C_EXCEPTION`" -#: c-api/init.rst:424 -msgid "" -"Since this is the reverse of :c:func:`Py_Initialize`, it should be called in " -"the same thread with the same interpreter active. That means the main " -"thread and the main interpreter. This should never be called while :c:func:" -"`Py_RunMain` is running." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_C_RETURN`" +#~ msgstr ":const:`PyTrace_C_RETURN`" -#: c-api/init.rst:429 -msgid "" -"Normally the return value is ``0``. If there were errors during finalization " -"(flushing buffered data), ``-1`` is returned." -msgstr "" +#, fuzzy +#~ msgid ":c:data:`PyTrace_OPCODE`" +#~ msgstr ":const:`PyTrace_OPCODE`" -#: c-api/init.rst:433 -msgid "" -"This function is provided for a number of reasons. An embedding application " -"might want to restart Python without having to restart the application " -"itself. An application that has loaded the Python interpreter from a " -"dynamically loadable library (or DLL) might want to free all memory " -"allocated by Python before unloading the DLL. During a hunt for memory leaks " -"in an application a developer might want to free all memory allocated by " -"Python before exiting from the application." -msgstr "" +#~ msgid "Advanced Debugger Support" +#~ msgstr "Support avancé du débogueur" -#: c-api/init.rst:441 -msgid "" -"**Bugs and caveats:** The destruction of modules and objects in modules is " -"done in random order; this may cause destructors (:meth:`~object.__del__` " -"methods) to fail when they depend on other objects (even functions) or " -"modules. Dynamically loaded extension modules loaded by Python are not " -"unloaded. Small amounts of memory allocated by the Python interpreter may " -"not be freed (if you find a leak, please report it). Memory tied up in " -"circular references between objects is not freed. Some memory allocated by " -"extension modules may not be freed. Some extensions may not work properly " -"if their initialization routine is called more than once; this can happen if " -"an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` " -"more than once." -msgstr "" +#~ msgid "Methods" +#~ msgstr "Méthodes" -#: c-api/init.rst:452 -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"_PySys_ClearAuditHooks`` with no arguments." -msgstr "" +#~ msgid "Synchronization Primitives" +#~ msgstr "Primitives de synchronisation" -#: c-api/init.rst:459 -msgid "" -"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " -"disregards the return value." -msgstr "" - -#: c-api/init.rst:465 -msgid "" -"Similar to :c:func:`Py_Main` but *argv* is an array of bytes strings, " -"allowing the calling application to delegate the text decoding step to the " -"CPython runtime." -msgstr "" - -#: c-api/init.rst:474 -msgid "" -"The main program for the standard interpreter, encapsulating a full " -"initialization/finalization cycle, as well as additional behaviour to " -"implement reading configurations settings from the environment and command " -"line, and then executing ``__main__`` in accordance with :ref:`using-on-" -"cmdline`." -msgstr "" - -#: c-api/init.rst:480 -msgid "" -"This is made available for programs which wish to support the full CPython " -"command line interface, rather than just embedding a Python runtime in a " -"larger application." -msgstr "" - -#: c-api/init.rst:484 -msgid "" -"The *argc* and *argv* parameters are similar to those which are passed to a " -"C program's :c:func:`main` function, except that the *argv* entries are " -"first converted to ``wchar_t`` using :c:func:`Py_DecodeLocale`. It is also " -"important to note that the argument list entries may be modified to point to " -"strings other than those passed in (however, the contents of the strings " -"pointed to by the argument list are not modified)." -msgstr "" - -#: c-api/init.rst:491 -msgid "" -"The return value will be ``0`` if the interpreter exits normally (i.e., " -"without an exception), ``1`` if the interpreter exits due to an exception, " -"or ``2`` if the argument list does not represent a valid Python command line." -msgstr "" - -#: c-api/init.rst:496 -msgid "" -"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " -"function will not return ``1``, but exit the process, as long as " -"``Py_InspectFlag`` is not set. If ``Py_InspectFlag`` is set, execution will " -"drop into the interactive Python prompt, at which point a second otherwise " -"unhandled :exc:`SystemExit` will still exit the process, while any other " -"means of exiting will set the return value as described above." -msgstr "" - -#: c-api/init.rst:503 -msgid "" -"In terms of the CPython runtime configuration APIs documented in the :ref:" -"`runtime configuration ` section (and without accounting for " -"error handling), ``Py_Main`` is approximately equivalent to::" -msgstr "" - -#: c-api/init.rst:515 -msgid "" -"In normal usage, an embedding application will call this function *instead* " -"of calling :c:func:`Py_Initialize`, :c:func:`Py_InitializeEx` or :c:func:" -"`Py_InitializeFromConfig` directly, and all settings will be applied as " -"described elsewhere in this documentation. If this function is instead " -"called *after* a preceding runtime initialization API call, then exactly " -"which environmental and command line configuration settings will be updated " -"is version dependent (as it depends on which settings correctly support " -"being modified after they have already been set once when the runtime was " -"first initialized)." -msgstr "" - -#: c-api/init.rst:528 -msgid "Executes the main module in a fully configured CPython runtime." -msgstr "" - -#: c-api/init.rst:530 -msgid "" -"Executes the command (:c:member:`PyConfig.run_command`), the script (:c:" -"member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." -"run_module`) specified on the command line or in the configuration. If none " -"of these values are set, runs the interactive Python prompt (REPL) using the " -"``__main__`` module's global namespace." -msgstr "" - -#: c-api/init.rst:536 -msgid "" -"If :c:member:`PyConfig.inspect` is not set (the default), the return value " -"will be ``0`` if the interpreter exits normally (that is, without raising an " -"exception), or ``1`` if the interpreter exits due to an exception. If an " -"otherwise unhandled :exc:`SystemExit` is raised, the function will " -"immediately exit the process instead of returning ``1``." -msgstr "" - -#: c-api/init.rst:542 -msgid "" -"If :c:member:`PyConfig.inspect` is set (such as when the :option:`-i` option " -"is used), rather than returning when the interpreter exits, execution will " -"instead resume in an interactive Python prompt (REPL) using the ``__main__`` " -"module's global namespace. If the interpreter exited with an exception, it " -"is immediately raised in the REPL session. The function return value is then " -"determined by the way the *REPL session* terminates: returning ``0`` if the " -"session terminates without raising an unhandled exception, exiting " -"immediately for an unhandled :exc:`SystemExit`, and returning ``1`` for any " -"other unhandled exception." -msgstr "" - -#: c-api/init.rst:552 -msgid "" -"This function always finalizes the Python interpreter regardless of whether " -"it returns a value or immediately exits the process due to an unhandled :exc:" -"`SystemExit` exception." -msgstr "" - -#: c-api/init.rst:556 -msgid "" -"See :ref:`Python Configuration ` for an example of a " -"customized Python that always runs in isolated mode using :c:func:" -"`Py_RunMain`." -msgstr "" - -#: c-api/init.rst:562 -msgid "Process-wide parameters" -msgstr "" - -#: c-api/init.rst:572 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"program_name` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -#: c-api/init.rst:576 -msgid "" -"This function should be called before :c:func:`Py_Initialize` is called for " -"the first time, if it is called at all. It tells the interpreter the value " -"of the ``argv[0]`` argument to the :c:func:`main` function of the program " -"(converted to wide characters). This is used by :c:func:`Py_GetPath` and " -"some other functions below to find the Python run-time libraries relative to " -"the interpreter executable. The default value is ``'python'``. The " -"argument should point to a zero-terminated wide character string in static " -"storage whose contents will not change for the duration of the program's " -"execution. No code in the Python interpreter will change the contents of " -"this storage." -msgstr "" - -#: c-api/init.rst:829 c-api/init.rst:891 -msgid "" -"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" -"`wchar_*` string." -msgstr "" - -#: c-api/init.rst:595 -msgid "" -"Return the program name set with :c:member:`PyConfig.program_name`, or the " -"default. The returned string points into static storage; the caller should " -"not modify its value." -msgstr "" - -#: c-api/init.rst:621 c-api/init.rst:689 c-api/init.rst:903 -msgid "" -"This function should not be called before :c:func:`Py_Initialize`, otherwise " -"it returns ``NULL``." -msgstr "" - -#: c-api/init.rst:624 c-api/init.rst:692 c-api/init.rst:906 -msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." -msgstr "" - -#: c-api/init.rst:695 -msgid "Get :data:`sys.executable` instead." -msgstr "" - -#: c-api/init.rst:611 -msgid "" -"Return the *prefix* for installed platform-independent files. This is " -"derived through a number of complicated rules from the program name set " -"with :c:member:`PyConfig.program_name` and some environment variables; for " -"example, if the program name is ``'/usr/local/bin/python'``, the prefix is " -"``'/usr/local'``. The returned string points into static storage; the caller " -"should not modify its value. This corresponds to the :makevar:`prefix` " -"variable in the top-level :file:`Makefile` and the :option:`--prefix` " -"argument to the :program:`configure` script at build time. The value is " -"available to Python code as ``sys.base_prefix``. It is only useful on Unix. " -"See also the next function." -msgstr "" - -#: c-api/init.rst:627 -msgid "" -"Get :data:`sys.base_prefix` instead, or :data:`sys.prefix` if :ref:`virtual " -"environments ` need to be handled." -msgstr "" - -#: c-api/init.rst:634 -msgid "" -"Return the *exec-prefix* for installed platform-*dependent* files. This is " -"derived through a number of complicated rules from the program name set " -"with :c:member:`PyConfig.program_name` and some environment variables; for " -"example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix " -"is ``'/usr/local'``. The returned string points into static storage; the " -"caller should not modify its value. This corresponds to the :makevar:" -"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-" -"prefix`` argument to the :program:`configure` script at build time. The " -"value is available to Python code as ``sys.base_exec_prefix``. It is only " -"useful on Unix." -msgstr "" - -#: c-api/init.rst:645 -msgid "" -"Background: The exec-prefix differs from the prefix when platform dependent " -"files (such as executables and shared libraries) are installed in a " -"different directory tree. In a typical installation, platform dependent " -"files may be installed in the :file:`/usr/local/plat` subtree while platform " -"independent may be installed in :file:`/usr/local`." -msgstr "" - -#: c-api/init.rst:651 -msgid "" -"Generally speaking, a platform is a combination of hardware and software " -"families, e.g. Sparc machines running the Solaris 2.x operating system are " -"considered the same platform, but Intel machines running Solaris 2.x are " -"another platform, and Intel machines running Linux are yet another " -"platform. Different major revisions of the same operating system generally " -"also form different platforms. Non-Unix operating systems are a different " -"story; the installation strategies on those systems are so different that " -"the prefix and exec-prefix are meaningless, and set to the empty string. " -"Note that compiled Python bytecode files are platform independent (but not " -"independent from the Python version by which they were compiled!)." -msgstr "" - -#: c-api/init.rst:662 -msgid "" -"System administrators will know how to configure the :program:`mount` or :" -"program:`automount` programs to share :file:`/usr/local` between platforms " -"while having :file:`/usr/local/plat` be a different filesystem for each " -"platform." -msgstr "" - -#: c-api/init.rst:673 -msgid "" -"Get :data:`sys.base_exec_prefix` instead, or :data:`sys.exec_prefix` if :ref:" -"`virtual environments ` need to be handled." -msgstr "" - -#: c-api/init.rst:683 -msgid "" -"Return the full program name of the Python executable; this is computed as " -"a side-effect of deriving the default module search path from the program " -"name (set by :c:member:`PyConfig.program_name`). The returned string points " -"into static storage; the caller should not modify its value. The value is " -"available to Python code as ``sys.executable``." -msgstr "" - -#: c-api/init.rst:705 -msgid "" -"Return the default module search path; this is computed from the program " -"name (set by :c:member:`PyConfig.program_name`) and some environment " -"variables. The returned string consists of a series of directory names " -"separated by a platform dependent delimiter character. The delimiter " -"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " -"string points into static storage; the caller should not modify its value. " -"The list :data:`sys.path` is initialized with this value on interpreter " -"startup; it can be (and usually is) modified later to change the search path " -"for loading modules." -msgstr "" - -#: c-api/init.rst:723 -msgid "Get :data:`sys.path` instead." -msgstr "" - -#: c-api/init.rst:729 -msgid "" -"Return the version of this Python interpreter. This is a string that looks " -"something like ::" -msgstr "" - -#: c-api/init.rst:736 -msgid "" -"The first word (up to the first space character) is the current Python " -"version; the first characters are the major and minor version separated by a " -"period. The returned string points into static storage; the caller should " -"not modify its value. The value is available to Python code as :data:`sys." -"version`." -msgstr "" - -#: c-api/init.rst:741 -msgid "See also the :c:var:`Py_Version` constant." -msgstr "" - -#: c-api/init.rst:748 -msgid "" -"Return the platform identifier for the current platform. On Unix, this is " -"formed from the \"official\" name of the operating system, converted to " -"lower case, followed by the major revision number; e.g., for Solaris 2.x, " -"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " -"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " -"into static storage; the caller should not modify its value. The value is " -"available to Python code as ``sys.platform``." -msgstr "" - -#: c-api/init.rst:759 -msgid "" -"Return the official copyright string for the current Python version, for " -"example" -msgstr "" - -#: c-api/init.rst:761 -msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" -msgstr "" - -#: c-api/init.rst:765 -msgid "" -"The returned string points into static storage; the caller should not modify " -"its value. The value is available to Python code as ``sys.copyright``." -msgstr "" - -#: c-api/init.rst:771 -msgid "" -"Return an indication of the compiler used to build the current Python " -"version, in square brackets, for example::" -msgstr "" - -#: c-api/init.rst:792 -msgid "" -"The returned string points into static storage; the caller should not modify " -"its value. The value is available to Python code as part of the variable " -"``sys.version``." -msgstr "" - -#: c-api/init.rst:785 -msgid "" -"Return information about the sequence number and build date and time of the " -"current Python interpreter instance, for example ::" -msgstr "" - -#: c-api/init.rst:804 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` " -"should be used instead, see :ref:`Python Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:809 -msgid "" -"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " -"similar to those passed to the program's :c:func:`main` function with the " -"difference that the first entry should refer to the script file to be " -"executed rather than the executable hosting the Python interpreter. If " -"there isn't a script that will be run, the first entry in *argv* can be an " -"empty string. If this function fails to initialize :data:`sys.argv`, a " -"fatal condition is signalled using :c:func:`Py_FatalError`." -msgstr "" - -#: c-api/init.rst:817 -msgid "" -"If *updatepath* is zero, this is all the function does. If *updatepath* is " -"non-zero, the function also modifies :data:`sys.path` according to the " -"following algorithm:" -msgstr "" - -#: c-api/init.rst:821 -msgid "" -"If the name of an existing script is passed in ``argv[0]``, the absolute " -"path of the directory where the script is located is prepended to :data:`sys." -"path`." -msgstr "" - -#: c-api/init.rst:824 -msgid "" -"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " -"existing file name), an empty string is prepended to :data:`sys.path`, which " -"is the same as prepending the current working directory (``\".\"``)." -msgstr "" - -#: c-api/init.rst:868 -msgid "" -"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " -"members of the :ref:`Python Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:836 -msgid "" -"It is recommended that applications embedding the Python interpreter for " -"purposes other than executing a single script pass ``0`` as *updatepath*, " -"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." -msgstr "" - -#: c-api/init.rst:841 -msgid "" -"On versions before 3.1.3, you can achieve the same effect by manually " -"popping the first :data:`sys.path` element after having called :c:func:" -"`PySys_SetArgv`, for example using::" -msgstr "" - -#: c-api/init.rst:857 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:" -"`Python Initialization Configuration `." -msgstr "" - -#: c-api/init.rst:861 -msgid "" -"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " -"``1`` unless the :program:`python` interpreter was started with the :option:" -"`-I`." -msgstr "" - -#: c-api/init.rst:871 -msgid "The *updatepath* value depends on :option:`-I`." -msgstr "" - -#: c-api/init.rst:878 -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"home` should be used instead, see :ref:`Python Initialization Configuration " -"`." -msgstr "" - -#: c-api/init.rst:882 -msgid "" -"Set the default \"home\" directory, that is, the location of the standard " -"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " -"string." -msgstr "" - -#: c-api/init.rst:886 -msgid "" -"The argument should point to a zero-terminated character string in static " -"storage whose contents will not change for the duration of the program's " -"execution. No code in the Python interpreter will change the contents of " -"this storage." -msgstr "" - -#: c-api/init.rst:899 -msgid "" -"Return the default \"home\", that is, the value set by :c:member:`PyConfig." -"home`, or the value of the :envvar:`PYTHONHOME` environment variable if it " -"is set." -msgstr "" - -#: c-api/init.rst:909 -msgid "" -"Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment variable " -"instead." -msgstr "" - -#: c-api/init.rst:917 -msgid "Thread State and the Global Interpreter Lock" -msgstr "" - -#: c-api/init.rst:924 -msgid "" -"The Python interpreter is not fully thread-safe. In order to support multi-" -"threaded Python programs, there's a global lock, called the :term:`global " -"interpreter lock` or :term:`GIL`, that must be held by the current thread " -"before it can safely access Python objects. Without the lock, even the " -"simplest operations could cause problems in a multi-threaded program: for " -"example, when two threads simultaneously increment the reference count of " -"the same object, the reference count could end up being incremented only " -"once instead of twice." -msgstr "" - -#: c-api/init.rst:934 -msgid "" -"Therefore, the rule exists that only the thread that has acquired the :term:" -"`GIL` may operate on Python objects or call Python/C API functions. In order " -"to emulate concurrency of execution, the interpreter regularly tries to " -"switch threads (see :func:`sys.setswitchinterval`). The lock is also " -"released around potentially blocking I/O operations like reading or writing " -"a file, so that other Python threads can run in the meantime." -msgstr "" - -#: c-api/init.rst:944 -msgid "" -"The Python interpreter keeps some thread-specific bookkeeping information " -"inside a data structure called :c:type:`PyThreadState`. There's also one " -"global variable pointing to the current :c:type:`PyThreadState`: it can be " -"retrieved using :c:func:`PyThreadState_Get`." -msgstr "" - -#: c-api/init.rst:950 -msgid "Releasing the GIL from extension code" -msgstr "" - -#: c-api/init.rst:952 -msgid "" -"Most extension code manipulating the :term:`GIL` has the following simple " -"structure::" -msgstr "" - -#: c-api/init.rst:961 -msgid "This is so common that a pair of macros exists to simplify it::" -msgstr "" - -#: c-api/init.rst:971 -msgid "" -"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " -"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " -"block." -msgstr "" - -#: c-api/init.rst:975 -msgid "The block above expands to the following code::" -msgstr "" - -#: c-api/init.rst:987 -msgid "" -"Here is how these functions work: the global interpreter lock is used to " -"protect the pointer to the current thread state. When releasing the lock " -"and saving the thread state, the current thread state pointer must be " -"retrieved before the lock is released (since another thread could " -"immediately acquire the lock and store its own thread state in the global " -"variable). Conversely, when acquiring the lock and restoring the thread " -"state, the lock must be acquired before storing the thread state pointer." -msgstr "" - -#: c-api/init.rst:996 -msgid "" -"Calling system I/O functions is the most common use case for releasing the " -"GIL, but it can also be useful before calling long-running computations " -"which don't need access to Python objects, such as compression or " -"cryptographic functions operating over memory buffers. For example, the " -"standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when " -"compressing or hashing data." -msgstr "" - -#: c-api/init.rst:1007 -msgid "Non-Python created threads" -msgstr "" - -#: c-api/init.rst:1009 -msgid "" -"When threads are created using the dedicated Python APIs (such as the :mod:" -"`threading` module), a thread state is automatically associated to them and " -"the code showed above is therefore correct. However, when threads are " -"created from C (for example by a third-party library with its own thread " -"management), they don't hold the GIL, nor is there a thread state structure " -"for them." -msgstr "" - -#: c-api/init.rst:1016 -msgid "" -"If you need to call Python code from these threads (often this will be part " -"of a callback API provided by the aforementioned third-party library), you " -"must first register these threads with the interpreter by creating a thread " -"state data structure, then acquiring the GIL, and finally storing their " -"thread state pointer, before you can start using the Python/C API. When you " -"are done, you should reset the thread state pointer, release the GIL, and " -"finally free the thread state data structure." -msgstr "" - -#: c-api/init.rst:1024 -msgid "" -"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " -"do all of the above automatically. The typical idiom for calling into " -"Python from a C thread is::" -msgstr "" - -#: c-api/init.rst:1038 -msgid "" -"Note that the ``PyGILState_*`` functions assume there is only one global " -"interpreter (created automatically by :c:func:`Py_Initialize`). Python " -"supports the creation of additional interpreters (using :c:func:" -"`Py_NewInterpreter`), but mixing multiple interpreters and the " -"``PyGILState_*`` API is unsupported." -msgstr "" - -#: c-api/init.rst:1048 -msgid "Cautions about fork()" -msgstr "" - -#: c-api/init.rst:1050 -msgid "" -"Another important thing to note about threads is their behaviour in the face " -"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " -"process forks only the thread that issued the fork will exist. This has a " -"concrete impact both on how locks must be handled and on all stored state in " -"CPython's runtime." -msgstr "" - -#: c-api/init.rst:1056 -msgid "" -"The fact that only the \"current\" thread remains means any locks held by " -"other threads will never be released. Python solves this for :func:`os.fork` " -"by acquiring the locks it uses internally before the fork, and releasing " -"them afterwards. In addition, it resets any :ref:`lock-objects` in the " -"child. When extending or embedding Python, there is no way to inform Python " -"of additional (non-Python) locks that need to be acquired before or reset " -"after a fork. OS facilities such as :c:func:`!pthread_atfork` would need to " -"be used to accomplish the same thing. Additionally, when extending or " -"embedding Python, calling :c:func:`fork` directly rather than through :func:" -"`os.fork` (and returning to or calling into Python) may result in a deadlock " -"by one of Python's internal locks being held by a thread that is defunct " -"after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the necessary " -"locks, but is not always able to." -msgstr "" - -#: c-api/init.rst:1071 -msgid "" -"The fact that all other threads go away also means that CPython's runtime " -"state there must be cleaned up properly, which :func:`os.fork` does. This " -"means finalizing all other :c:type:`PyThreadState` objects belonging to the " -"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " -"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " -"interpreter's \"main\" thread, where the CPython global runtime was " -"originally initialized. The only exception is if :c:func:`exec` will be " -"called immediately after." -msgstr "" - -#: c-api/init.rst:1084 -#, fuzzy -msgid "High-level API" -msgstr "Bibliothèques de haut-niveau" - -#: c-api/init.rst:1086 -msgid "" -"These are the most commonly used types and functions when writing C " -"extension code, or when embedding the Python interpreter:" -msgstr "" - -#: c-api/init.rst:1091 -msgid "" -"This data structure represents the state shared by a number of cooperating " -"threads. Threads belonging to the same interpreter share their module " -"administration and a few other internal items. There are no public members " -"in this structure." -msgstr "" - -#: c-api/init.rst:1096 -msgid "" -"Threads belonging to different interpreters initially share nothing, except " -"process state like available memory, open file descriptors and such. The " -"global interpreter lock is also shared by all threads, regardless of to " -"which interpreter they belong." -msgstr "" - -#: c-api/init.rst:1104 -msgid "" -"This data structure represents the state of a single thread. The only " -"public data member is:" -msgstr "" - -#: c-api/init.rst:1109 -msgid "This thread's interpreter state." -msgstr "" - -#: c-api/init.rst:1120 -msgid "Deprecated function which does nothing." -msgstr "" - -#: c-api/init.rst:1122 -msgid "" -"In Python 3.6 and older, this function created the GIL if it didn't exist." -msgstr "" - -#: c-api/init.rst:1124 -msgid "The function now does nothing." -msgstr "" - -#: c-api/init.rst:1127 -msgid "" -"This function is now called by :c:func:`Py_Initialize()`, so you don't have " -"to call it yourself anymore." -msgstr "" - -#: c-api/init.rst:1131 -msgid "" -"This function cannot be called before :c:func:`Py_Initialize()` anymore." -msgstr "" - -#: c-api/init.rst:1141 -msgid "" -"Release the global interpreter lock (if it has been created) and reset the " -"thread state to ``NULL``, returning the previous thread state (which is not " -"``NULL``). If the lock has been created, the current thread must have " -"acquired it." -msgstr "" - -#: c-api/init.rst:1149 -msgid "" -"Acquire the global interpreter lock (if it has been created) and set the " -"thread state to *tstate*, which must not be ``NULL``. If the lock has been " -"created, the current thread must not have acquired it, otherwise deadlock " -"ensues." -msgstr "" - -#: c-api/init.rst:1214 c-api/init.rst:1496 -msgid "" -"Calling this function from a thread when the runtime is finalizing will " -"terminate the thread, even if the thread was not created by Python. You can " -"use :c:func:`Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " -"interpreter is in process of being finalized before calling this function to " -"avoid unwanted termination." -msgstr "" - -#: c-api/init.rst:1163 -msgid "" -"Return the current thread state. The global interpreter lock must be held. " -"When the current thread state is ``NULL``, this issues a fatal error (so " -"that the caller needn't check for ``NULL``)." -msgstr "" - -#: c-api/init.rst:1167 -msgid "See also :c:func:`PyThreadState_GetUnchecked`." -msgstr "" - -#: c-api/init.rst:1172 -msgid "" -"Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " -"fatal error if it is NULL. The caller is responsible to check if the result " -"is NULL." -msgstr "" - -#: c-api/init.rst:1176 -msgid "" -"In Python 3.5 to 3.12, the function was private and known as " -"``_PyThreadState_UncheckedGet()``." -msgstr "" - -#: c-api/init.rst:1183 -msgid "" -"Swap the current thread state with the thread state given by the argument " -"*tstate*, which may be ``NULL``. The global interpreter lock must be held " -"and is not released." -msgstr "" - -#: c-api/init.rst:1188 -msgid "" -"The following functions use thread-local storage, and are not compatible " -"with sub-interpreters:" -msgstr "" - -#: c-api/init.rst:1193 -msgid "" -"Ensure that the current thread is ready to call the Python C API regardless " -"of the current state of Python, or of the global interpreter lock. This may " -"be called as many times as desired by a thread as long as each call is " -"matched with a call to :c:func:`PyGILState_Release`. In general, other " -"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:" -"func:`PyGILState_Release` calls as long as the thread state is restored to " -"its previous state before the Release(). For example, normal usage of the :" -"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros " -"is acceptable." -msgstr "" - -#: c-api/init.rst:1203 -msgid "" -"The return value is an opaque \"handle\" to the thread state when :c:func:" -"`PyGILState_Ensure` was called, and must be passed to :c:func:" -"`PyGILState_Release` to ensure Python is left in the same state. Even though " -"recursive calls are allowed, these handles *cannot* be shared - each unique " -"call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:" -"func:`PyGILState_Release`." -msgstr "" - -#: c-api/init.rst:1210 -msgid "" -"When the function returns, the current thread will hold the GIL and be able " -"to call arbitrary Python code. Failure is a fatal error." -msgstr "" - -#: c-api/init.rst:1222 -msgid "" -"Release any resources previously acquired. After this call, Python's state " -"will be the same as it was prior to the corresponding :c:func:" -"`PyGILState_Ensure` call (but generally this state will be unknown to the " -"caller, hence the use of the GILState API)." -msgstr "" - -#: c-api/init.rst:1227 -msgid "" -"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" -"func:`PyGILState_Release` on the same thread." -msgstr "" - -#: c-api/init.rst:1233 -msgid "" -"Get the current thread state for this thread. May return ``NULL`` if no " -"GILState API has been used on the current thread. Note that the main thread " -"always has such a thread-state, even if no auto-thread-state call has been " -"made on the main thread. This is mainly a helper/diagnostic function." -msgstr "" - -#: c-api/init.rst:1241 -msgid "" -"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. " -"This function can be called from any thread at any time. Only if it has had " -"its Python thread state initialized and currently is holding the GIL will it " -"return ``1``. This is mainly a helper/diagnostic function. It can be useful " -"for example in callback contexts or memory allocation functions when knowing " -"that the GIL is locked can allow the caller to perform sensitive actions or " -"otherwise behave differently." -msgstr "" - -#: c-api/init.rst:1253 -msgid "" -"The following macros are normally used without a trailing semicolon; look " -"for example usage in the Python source distribution." -msgstr "" - -#: c-api/init.rst:1259 -msgid "" -"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" -"``. Note that it contains an opening brace; it must be matched with a " -"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further " -"discussion of this macro." -msgstr "" - -#: c-api/init.rst:1267 -msgid "" -"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " -"contains a closing brace; it must be matched with an earlier :c:macro:" -"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this " -"macro." -msgstr "" - -#: c-api/init.rst:1275 -msgid "" -"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" -"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." -msgstr "" - -#: c-api/init.rst:1281 -msgid "" -"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" -"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " -"declaration." -msgstr "" - -#: c-api/init.rst:1287 -#, fuzzy -msgid "Low-level API" -msgstr "Bibliothèques de bas-niveau" - -#: c-api/init.rst:1289 -msgid "" -"All of the following functions must be called after :c:func:`Py_Initialize`." -msgstr "" - -#: c-api/init.rst:1291 -msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." -msgstr "" - -#: c-api/init.rst:1297 -msgid "" -"Create a new interpreter state object. The global interpreter lock need not " -"be held, but may be held if it is necessary to serialize calls to this " -"function." -msgstr "" - -#: c-api/init.rst:1301 -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_New`` with no arguments." -msgstr "" - -#: c-api/init.rst:1306 -msgid "" -"Reset all information in an interpreter state object. The global " -"interpreter lock must be held." -msgstr "" - -#: c-api/init.rst:1309 -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_Clear`` with no arguments." -msgstr "" - -#: c-api/init.rst:1314 -msgid "" -"Destroy an interpreter state object. The global interpreter lock need not " -"be held. The interpreter state must have been reset with a previous call " -"to :c:func:`PyInterpreterState_Clear`." -msgstr "" - -#: c-api/init.rst:1321 -msgid "" -"Create a new thread state object belonging to the given interpreter object. " -"The global interpreter lock need not be held, but may be held if it is " -"necessary to serialize calls to this function." -msgstr "" - -#: c-api/init.rst:1328 -msgid "" -"Reset all information in a thread state object. The global interpreter lock " -"must be held." -msgstr "" - -#: c-api/init.rst:1331 -msgid "" -"This function now calls the :c:member:`PyThreadState.on_delete` callback. " -"Previously, that happened in :c:func:`PyThreadState_Delete`." -msgstr "" - -#: c-api/init.rst:1338 -msgid "" -"Destroy a thread state object. The global interpreter lock need not be " -"held. The thread state must have been reset with a previous call to :c:func:" -"`PyThreadState_Clear`." -msgstr "" - -#: c-api/init.rst:1345 -msgid "" -"Destroy the current thread state and release the global interpreter lock. " -"Like :c:func:`PyThreadState_Delete`, the global interpreter lock must be " -"held. The thread state must have been reset with a previous call to :c:func:" -"`PyThreadState_Clear`." -msgstr "" - -#: c-api/init.rst:1353 -msgid "Get the current frame of the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1355 -msgid "" -"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " -"executing." -msgstr "" - -#: c-api/init.rst:1358 -msgid "See also :c:func:`PyEval_GetFrame`." -msgstr "" - -#: c-api/init.rst:1369 c-api/init.rst:1378 -msgid "*tstate* must not be ``NULL``." -msgstr "" - -#: c-api/init.rst:1367 -msgid "" -"Get the unique thread state identifier of the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1376 -msgid "Get the interpreter of the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1385 -msgid "Suspend tracing and profiling in the Python thread state *tstate*." -msgstr "" - -#: c-api/init.rst:1387 -msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." -msgstr "" - -#: c-api/init.rst:1394 -msgid "" -"Resume tracing and profiling in the Python thread state *tstate* suspended " -"by the :c:func:`PyThreadState_EnterTracing` function." -msgstr "" - -#: c-api/init.rst:1397 -msgid "" -"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." -msgstr "" - -#: c-api/init.rst:1405 -msgid "Get the current interpreter." -msgstr "" - -#: c-api/init.rst:1407 -msgid "" -"Issue a fatal error if there no current Python thread state or no current " -"interpreter. It cannot return NULL." -msgstr "" - -#: c-api/init.rst:1420 -msgid "The caller must hold the GIL." -msgstr "" - -#: c-api/init.rst:1417 -msgid "" -"Return the interpreter's unique ID. If there was any error in doing so then " -"``-1`` is returned and an error is set." -msgstr "" - -#: c-api/init.rst:1427 -msgid "" -"Return a dictionary in which interpreter-specific data may be stored. If " -"this function returns ``NULL`` then no exception has been raised and the " -"caller should assume no interpreter-specific dict is available." -msgstr "" - -#: c-api/init.rst:1431 -msgid "" -"This is not a replacement for :c:func:`PyModule_GetState()`, which " -"extensions should use to store interpreter-specific state information." -msgstr "" - -#: c-api/init.rst:1438 -msgid "Type of a frame evaluation function." -msgstr "" - -#: c-api/init.rst:1440 -msgid "" -"The *throwflag* parameter is used by the ``throw()`` method of generators: " -"if non-zero, handle the current exception." -msgstr "" - -#: c-api/init.rst:1443 -msgid "The function now takes a *tstate* parameter." -msgstr "" - -#: c-api/init.rst:1446 -msgid "" -"The *frame* parameter changed from ``PyFrameObject*`` to " -"``_PyInterpreterFrame*``." -msgstr "" - -#: c-api/init.rst:1451 -msgid "Get the frame evaluation function." -msgstr "" - -#: c-api/init.rst:1461 -msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." -msgstr "" - -#: c-api/init.rst:1459 -msgid "Set the frame evaluation function." -msgstr "" - -#: c-api/init.rst:1468 -msgid "" -"Return a dictionary in which extensions can store thread-specific state " -"information. Each extension should use a unique key to use to store state " -"in the dictionary. It is okay to call this function when no current thread " -"state is available. If this function returns ``NULL``, no exception has been " -"raised and the caller should assume no current thread state is available." -msgstr "" - -#: c-api/init.rst:1477 -msgid "" -"Asynchronously raise an exception in a thread. The *id* argument is the " -"thread id of the target thread; *exc* is the exception object to be raised. " -"This function does not steal any references to *exc*. To prevent naive " -"misuse, you must write your own C extension to call this. Must be called " -"with the GIL held. Returns the number of thread states modified; this is " -"normally one, but will be zero if the thread id isn't found. If *exc* is " -"``NULL``, the pending exception (if any) for the thread is cleared. This " -"raises no exceptions." -msgstr "" - -#: c-api/init.rst:1485 -msgid "" -"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" -"`unsigned long`." -msgstr "" - -#: c-api/init.rst:1491 -msgid "" -"Acquire the global interpreter lock and set the current thread state to " -"*tstate*, which must not be ``NULL``. The lock must have been created " -"earlier. If this thread already has the lock, deadlock ensues." -msgstr "" - -#: c-api/init.rst:1502 -msgid "" -"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" -"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " -"current thread if called while the interpreter is finalizing." -msgstr "" - -#: c-api/init.rst:1507 -msgid "" -":c:func:`PyEval_RestoreThread` is a higher-level function which is always " -"available (even when threads have not been initialized)." -msgstr "" - -#: c-api/init.rst:1513 -msgid "" -"Reset the current thread state to ``NULL`` and release the global " -"interpreter lock. The lock must have been created earlier and must be held " -"by the current thread. The *tstate* argument, which must not be ``NULL``, " -"is only used to check that it represents the current thread state --- if it " -"isn't, a fatal error is reported." -msgstr "" - -#: c-api/init.rst:1519 -msgid "" -":c:func:`PyEval_SaveThread` is a higher-level function which is always " -"available (even when threads have not been initialized)." -msgstr "" - -#: c-api/init.rst:1526 -msgid "Sub-interpreter support" -msgstr "" - -#: c-api/init.rst:1528 -msgid "" -"While in most uses, you will only embed a single Python interpreter, there " -"are cases where you need to create several independent interpreters in the " -"same process and perhaps even in the same thread. Sub-interpreters allow you " -"to do that." -msgstr "" - -#: c-api/init.rst:1533 -msgid "" -"The \"main\" interpreter is the first one created when the runtime " -"initializes. It is usually the only Python interpreter in a process. Unlike " -"sub-interpreters, the main interpreter has unique process-global " -"responsibilities like signal handling. It is also responsible for execution " -"during runtime initialization and is usually the active interpreter during " -"runtime finalization. The :c:func:`PyInterpreterState_Main` function " -"returns a pointer to its state." -msgstr "" - -#: c-api/init.rst:1540 -msgid "" -"You can switch between sub-interpreters using the :c:func:" -"`PyThreadState_Swap` function. You can create and destroy them using the " -"following functions:" -msgstr "" - -#: c-api/init.rst:1546 -msgid "" -"Structure containing most parameters to configure a sub-interpreter. Its " -"values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " -"modified by the runtime." -msgstr "" - -#: c-api/init.rst:1552 -msgid "Structure fields:" -msgstr "" - -#: c-api/init.rst:1556 -msgid "" -"If this is ``0`` then the sub-interpreter will use its own \"object\" " -"allocator state. Otherwise it will use (share) the main interpreter's." -msgstr "" - -#: c-api/init.rst:1560 -msgid "" -"If this is ``0`` then :c:member:`~PyInterpreterConfig." -"check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` " -"then :c:member:`~PyInterpreterConfig.gil` must not be :c:macro:" -"`PyInterpreterConfig_OWN_GIL`." -msgstr "" - -#: c-api/init.rst:1568 -msgid "" -"If this is ``0`` then the runtime will not support forking the process in " -"any thread where the sub-interpreter is currently active. Otherwise fork is " -"unrestricted." -msgstr "" - -#: c-api/init.rst:1572 -msgid "" -"Note that the :mod:`subprocess` module still works when fork is disallowed." -msgstr "" - -#: c-api/init.rst:1577 -msgid "" -"If this is ``0`` then the runtime will not support replacing the current " -"process via exec (e.g. :func:`os.execv`) in any thread where the sub-" -"interpreter is currently active. Otherwise exec is unrestricted." -msgstr "" - -#: c-api/init.rst:1582 -msgid "" -"Note that the :mod:`subprocess` module still works when exec is disallowed." -msgstr "" - -#: c-api/init.rst:1587 -msgid "" -"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " -"create threads. Otherwise threads are allowed." -msgstr "" - -#: c-api/init.rst:1593 -msgid "" -"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " -"create daemon threads. Otherwise daemon threads are allowed (as long as :c:" -"member:`~PyInterpreterConfig.allow_threads` is non-zero)." -msgstr "" - -#: c-api/init.rst:1600 -msgid "" -"If this is ``0`` then all extension modules may be imported, including " -"legacy (single-phase init) modules, in any thread where the sub-interpreter " -"is currently active. Otherwise only multi-phase init extension modules (see :" -"pep:`489`) may be imported. (Also see :c:macro:" -"`Py_mod_multiple_interpreters`.)" -msgstr "" - -#: c-api/init.rst:1607 -msgid "" -"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." -"use_main_obmalloc` is ``0``." -msgstr "" - -#: c-api/init.rst:1612 -msgid "" -"This determines the operation of the GIL for the sub-interpreter. It may be " -"one of the following:" -msgstr "" - -#: c-api/init.rst:1619 -msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." -msgstr "" - -#: c-api/init.rst:1623 -msgid "Use (share) the main interpreter's GIL." -msgstr "" - -#: c-api/init.rst:1627 -msgid "Use the sub-interpreter's own GIL." -msgstr "" - -#: c-api/init.rst:1629 -msgid "" -"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" -"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." -msgstr "" - -#: c-api/init.rst:1643 -msgid "" -"Create a new sub-interpreter. This is an (almost) totally separate " -"environment for the execution of Python code. In particular, the new " -"interpreter has separate, independent versions of all imported modules, " -"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:" -"`sys`. The table of loaded modules (``sys.modules``) and the module search " -"path (``sys.path``) are also separate. The new environment has no ``sys." -"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, " -"``sys.stdout`` and ``sys.stderr`` (however these refer to the same " -"underlying file descriptors)." -msgstr "" - -#: c-api/init.rst:1653 -msgid "" -"The given *config* controls the options with which the interpreter is " -"initialized." -msgstr "" - -#: c-api/init.rst:1656 -msgid "" -"Upon success, *tstate_p* will be set to the first thread state created in " -"the new sub-interpreter. This thread state is made in the current thread " -"state. Note that no actual thread is created; see the discussion of thread " -"states below. If creation of the new interpreter is unsuccessful, " -"*tstate_p* is set to ``NULL``; no exception is set since the exception state " -"is stored in the current thread state and there may not be a current thread " -"state." -msgstr "" - -#: c-api/init.rst:1665 -msgid "" -"Like all other Python/C API functions, the global interpreter lock must be " -"held before calling this function and is still held when it returns. " -"Likewise a current thread state must be set on entry. On success, the " -"returned thread state will be set as current. If the sub-interpreter is " -"created with its own GIL then the GIL of the calling interpreter will be " -"released. When the function returns, the new interpreter's GIL will be held " -"by the current thread and the previously interpreter's GIL will remain " -"released here." -msgstr "" - -#: c-api/init.rst:1676 -msgid "" -"Sub-interpreters are most effective when isolated from each other, with " -"certain functionality restricted::" -msgstr "" - -#: c-api/init.rst:1690 -msgid "" -"Note that the config is used only briefly and does not get modified. During " -"initialization the config's values are converted into various :c:type:" -"`PyInterpreterState` values. A read-only copy of the config may be stored " -"internally on the :c:type:`PyInterpreterState`." -msgstr "" - -#: c-api/init.rst:1699 -msgid "Extension modules are shared between (sub-)interpreters as follows:" -msgstr "" - -#: c-api/init.rst:1701 -msgid "" -"For modules using multi-phase initialization, e.g. :c:func:" -"`PyModule_FromDefAndSpec`, a separate module object is created and " -"initialized for each interpreter. Only C-level static and global variables " -"are shared between these module objects." -msgstr "" - -#: c-api/init.rst:1707 -msgid "" -"For modules using single-phase initialization, e.g. :c:func:" -"`PyModule_Create`, the first time a particular extension is imported, it is " -"initialized normally, and a (shallow) copy of its module's dictionary is " -"squirreled away. When the same extension is imported by another " -"(sub-)interpreter, a new module is initialized and filled with the contents " -"of this copy; the extension's ``init`` function is not called. Objects in " -"the module's dictionary thus end up shared across (sub-)interpreters, which " -"might cause unwanted behavior (see `Bugs and caveats`_ below)." -msgstr "" - -#: c-api/init.rst:1718 -msgid "" -"Note that this is different from what happens when an extension is imported " -"after the interpreter has been completely re-initialized by calling :c:func:" -"`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's " -"``initmodule`` function *is* called again. As with multi-phase " -"initialization, this means that only C-level static and global variables are " -"shared between these modules." -msgstr "" - -#: c-api/init.rst:1738 -msgid "" -"Create a new sub-interpreter. This is essentially just a wrapper around :c:" -"func:`Py_NewInterpreterFromConfig` with a config that preserves the existing " -"behavior. The result is an unisolated sub-interpreter that shares the main " -"interpreter's GIL, allows fork/exec, allows daemon threads, and allows " -"single-phase init modules." -msgstr "" - -#: c-api/init.rst:1750 -msgid "" -"Destroy the (sub-)interpreter represented by the given thread state. The " -"given thread state must be the current thread state. See the discussion of " -"thread states below. When the call returns, the current thread state is " -"``NULL``. All thread states associated with this interpreter are " -"destroyed. The global interpreter lock used by the target interpreter must " -"be held before calling this function. No GIL is held when it returns." -msgstr "" - -#: c-api/init.rst:1758 -msgid "" -":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " -"explicitly destroyed at that point." -msgstr "" - -#: c-api/init.rst:1763 -msgid "A Per-Interpreter GIL" -msgstr "" - -#: c-api/init.rst:1765 -msgid "" -"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " -"that is completely isolated from other interpreters, including having its " -"own GIL. The most important benefit of this isolation is that such an " -"interpreter can execute Python code without being blocked by other " -"interpreters or blocking any others. Thus a single Python process can truly " -"take advantage of multiple CPU cores when running Python code. The " -"isolation also encourages a different approach to concurrency than that of " -"just using threads. (See :pep:`554`.)" -msgstr "" - -#: c-api/init.rst:1775 -msgid "" -"Using an isolated interpreter requires vigilance in preserving that " -"isolation. That especially means not sharing any objects or mutable state " -"without guarantees about thread-safety. Even objects that are otherwise " -"immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of " -"the refcount. One simple but less-efficient approach around this is to use " -"a global lock around all use of some state (or object). Alternately, " -"effectively immutable objects (like integers or strings) can be made safe in " -"spite of their refcounts by making them :term:`immortal`. In fact, this has " -"been done for the builtin singletons, small integers, and a number of other " -"builtin objects." -msgstr "" - -#: c-api/init.rst:1786 -msgid "" -"If you preserve isolation then you will have access to proper multi-core " -"computing without the complications that come with free-threading. Failure " -"to preserve isolation will expose you to the full consequences of free-" -"threading, including races and hard-to-debug crashes." -msgstr "" - -#: c-api/init.rst:1791 -msgid "" -"Aside from that, one of the main challenges of using multiple isolated " -"interpreters is how to communicate between them safely (not break isolation) " -"and efficiently. The runtime and stdlib do not provide any standard " -"approach to this yet. A future stdlib module would help mitigate the effort " -"of preserving isolation and expose effective tools for communicating (and " -"sharing) data between interpreters." -msgstr "" - -#: c-api/init.rst:1802 -msgid "Bugs and caveats" -msgstr "" - -#: c-api/init.rst:1804 -msgid "" -"Because sub-interpreters (and the main interpreter) are part of the same " -"process, the insulation between them isn't perfect --- for example, using " -"low-level file operations like :func:`os.close` they can (accidentally or " -"maliciously) affect each other's open files. Because of the way extensions " -"are shared between (sub-)interpreters, some extensions may not work " -"properly; this is especially likely when using single-phase initialization " -"or (static) global variables. It is possible to insert objects created in " -"one sub-interpreter into a namespace of another (sub-)interpreter; this " -"should be avoided if possible." -msgstr "" - -#: c-api/init.rst:1814 -msgid "" -"Special care should be taken to avoid sharing user-defined functions, " -"methods, instances or classes between sub-interpreters, since import " -"operations executed by such objects may affect the wrong (sub-)interpreter's " -"dictionary of loaded modules. It is equally important to avoid sharing " -"objects from which the above are reachable." -msgstr "" - -#: c-api/init.rst:1820 -msgid "" -"Also note that combining this functionality with ``PyGILState_*`` APIs is " -"delicate, because these APIs assume a bijection between Python thread states " -"and OS-level threads, an assumption broken by the presence of sub-" -"interpreters. It is highly recommended that you don't switch sub-" -"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:" -"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:" -"`ctypes`) using these APIs to allow calling of Python code from non-Python " -"created threads will probably be broken when using sub-interpreters." -msgstr "" - -#: c-api/init.rst:1831 -msgid "Asynchronous Notifications" -msgstr "" - -#: c-api/init.rst:1833 -msgid "" -"A mechanism is provided to make asynchronous notifications to the main " -"interpreter thread. These notifications take the form of a function pointer " -"and a void pointer argument." -msgstr "" - -#: c-api/init.rst:1840 -msgid "" -"Schedule a function to be called from the main interpreter thread. On " -"success, ``0`` is returned and *func* is queued for being called in the main " -"thread. On failure, ``-1`` is returned without setting any exception." -msgstr "" - -#: c-api/init.rst:1844 -msgid "" -"When successfully queued, *func* will be *eventually* called from the main " -"interpreter thread with the argument *arg*. It will be called " -"asynchronously with respect to normally running Python code, but with both " -"these conditions met:" -msgstr "" - -#: c-api/init.rst:1849 -msgid "on a :term:`bytecode` boundary;" -msgstr "" - -#: c-api/init.rst:1850 -msgid "" -"with the main thread holding the :term:`global interpreter lock` (*func* can " -"therefore use the full C API)." -msgstr "" - -#: c-api/init.rst:1853 -msgid "" -"*func* must return ``0`` on success, or ``-1`` on failure with an exception " -"set. *func* won't be interrupted to perform another asynchronous " -"notification recursively, but it can still be interrupted to switch threads " -"if the global interpreter lock is released." -msgstr "" - -#: c-api/init.rst:1858 -msgid "" -"This function doesn't need a current thread state to run, and it doesn't " -"need the global interpreter lock." -msgstr "" - -#: c-api/init.rst:1861 -msgid "" -"To call this function in a subinterpreter, the caller must hold the GIL. " -"Otherwise, the function *func* can be scheduled to be called from the wrong " -"interpreter." -msgstr "" - -#: c-api/init.rst:1866 -msgid "" -"This is a low-level function, only useful for very special cases. There is " -"no guarantee that *func* will be called as quick as possible. If the main " -"thread is busy executing a system call, *func* won't be called before the " -"system call returns. This function is generally **not** suitable for " -"calling Python code from arbitrary C threads. Instead, use the :ref:" -"`PyGILState API`." -msgstr "" - -#: c-api/init.rst:1875 -msgid "" -"If this function is called in a subinterpreter, the function *func* is now " -"scheduled to be called from the subinterpreter, rather than being called " -"from the main interpreter. Each subinterpreter now has its own list of " -"scheduled calls." -msgstr "" - -#: c-api/init.rst:1884 -msgid "Profiling and Tracing" -msgstr "" - -#: c-api/init.rst:1889 -msgid "" -"The Python interpreter provides some low-level support for attaching " -"profiling and execution tracing facilities. These are used for profiling, " -"debugging, and coverage analysis tools." -msgstr "" - -#: c-api/init.rst:1893 -msgid "" -"This C interface allows the profiling or tracing code to avoid the overhead " -"of calling through Python-level callable objects, making a direct C function " -"call instead. The essential attributes of the facility have not changed; " -"the interface allows trace functions to be installed per-thread, and the " -"basic events reported to the trace function are the same as had been " -"reported to the Python-level trace functions in previous versions." -msgstr "" - -#: c-api/init.rst:1903 -msgid "" -"The type of the trace function registered using :c:func:`PyEval_SetProfile` " -"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " -"the registration function as *obj*, *frame* is the frame object to which the " -"event pertains, *what* is one of the constants :c:data:`PyTrace_CALL`, :c:" -"data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :" -"c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:" -"`PyTrace_C_RETURN`, or :c:data:`PyTrace_OPCODE`, and *arg* depends on the " -"value of *what*:" -msgstr "" - -#: c-api/init.rst:1912 -msgid "Value of *what*" -msgstr "" - -#: c-api/init.rst:1912 -msgid "Meaning of *arg*" -msgstr "" - -#: c-api/init.rst:1914 -#, fuzzy -msgid ":c:data:`PyTrace_CALL`" -msgstr ":const:`PyTrace_CALL`" - -#: c-api/init.rst:1919 c-api/init.rst:1930 -msgid "Always :c:data:`Py_None`." -msgstr "" - -#: c-api/init.rst:1916 -#, fuzzy -msgid ":c:data:`PyTrace_EXCEPTION`" -msgstr ":const:`PyTrace_EXCEPTION`" - -#: c-api/init.rst:1916 -msgid "Exception information as returned by :func:`sys.exc_info`." -msgstr "" - -#: c-api/init.rst:1919 -#, fuzzy -msgid ":c:data:`PyTrace_LINE`" -msgstr ":const:`PyTrace_LINE`" - -#: c-api/init.rst:1921 -#, fuzzy -msgid ":c:data:`PyTrace_RETURN`" -msgstr ":const:`PyTrace_RETURN`" - -#: c-api/init.rst:1921 -msgid "" -"Value being returned to the caller, or ``NULL`` if caused by an exception." -msgstr "" - -#: c-api/init.rst:1924 -#, fuzzy -msgid ":c:data:`PyTrace_C_CALL`" -msgstr ":const:`PyTrace_C_CALL`" - -#: c-api/init.rst:1926 c-api/init.rst:1928 -msgid "Function object being called." -msgstr "" - -#: c-api/init.rst:1926 -#, fuzzy -msgid ":c:data:`PyTrace_C_EXCEPTION`" -msgstr ":const:`PyTrace_C_EXCEPTION`" - -#: c-api/init.rst:1928 -#, fuzzy -msgid ":c:data:`PyTrace_C_RETURN`" -msgstr ":const:`PyTrace_C_RETURN`" - -#: c-api/init.rst:1930 -#, fuzzy -msgid ":c:data:`PyTrace_OPCODE`" -msgstr ":const:`PyTrace_OPCODE`" - -#: c-api/init.rst:1935 -msgid "" -"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " -"a new call to a function or method is being reported, or a new entry into a " -"generator. Note that the creation of the iterator for a generator function " -"is not reported as there is no control transfer to the Python bytecode in " -"the corresponding frame." -msgstr "" - -#: c-api/init.rst:1944 -msgid "" -"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " -"an exception has been raised. The callback function is called with this " -"value for *what* when after any bytecode is processed after which the " -"exception becomes set within the frame being executed. The effect of this " -"is that as exception propagation causes the Python stack to unwind, the " -"callback is called upon return to each frame as the exception propagates. " -"Only trace functions receives these events; they are not needed by the " -"profiler." -msgstr "" - -#: c-api/init.rst:1955 -msgid "" -"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " -"function (but not a profiling function) when a line-number event is being " -"reported. It may be disabled for a frame by setting :attr:`~frame." -"f_trace_lines` to *0* on that frame." -msgstr "" - -#: c-api/init.rst:1963 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a call is about to return." -msgstr "" - -#: c-api/init.rst:1969 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function is about to be called." -msgstr "" - -#: c-api/init.rst:1975 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function has raised an exception." -msgstr "" - -#: c-api/init.rst:1981 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function has returned." -msgstr "" - -#: c-api/init.rst:1987 -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " -"not profiling functions) when a new opcode is about to be executed. This " -"event is not emitted by default: it must be explicitly requested by setting :" -"attr:`~frame.f_trace_opcodes` to *1* on the frame." -msgstr "" - -#: c-api/init.rst:1995 -msgid "" -"Set the profiler function to *func*. The *obj* parameter is passed to the " -"function as its first parameter, and may be any Python object, or ``NULL``. " -"If the profile function needs to maintain state, using a different value for " -"*obj* for each thread provides a convenient and thread-safe place to store " -"it. The profile function is called for all monitored events except :c:data:" -"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." -msgstr "" - -#: c-api/init.rst:2002 -msgid "See also the :func:`sys.setprofile` function." -msgstr "" - -#: c-api/init.rst:2011 c-api/init.rst:2037 -msgid "The caller must hold the :term:`GIL`." -msgstr "" - -#: c-api/init.rst:2008 -msgid "" -"Like :c:func:`PyEval_SetProfile` but sets the profile function in all " -"running threads belonging to the current interpreter instead of the setting " -"it only on the current thread." -msgstr "" - -#: c-api/init.rst:2013 -msgid "" -"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " -"while setting the profile functions in all threads." -msgstr "" - -#: c-api/init.rst:2021 -msgid "" -"Set the tracing function to *func*. This is similar to :c:func:" -"`PyEval_SetProfile`, except the tracing function does receive line-number " -"events and per-opcode events, but does not receive any event related to C " -"function objects being called. Any trace function registered using :c:func:" -"`PyEval_SetTrace` will not receive :c:data:`PyTrace_C_CALL`, :c:data:" -"`PyTrace_C_EXCEPTION` or :c:data:`PyTrace_C_RETURN` as a value for the " -"*what* parameter." -msgstr "" - -#: c-api/init.rst:2028 -msgid "See also the :func:`sys.settrace` function." -msgstr "" - -#: c-api/init.rst:2034 -msgid "" -"Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running " -"threads belonging to the current interpreter instead of the setting it only " -"on the current thread." -msgstr "" - -#: c-api/init.rst:2039 -msgid "" -"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " -"while setting the trace functions in all threads." -msgstr "" - -#: c-api/init.rst:2045 -msgid "Reference tracing" -msgstr "" - -#: c-api/init.rst:2051 -msgid "" -"The type of the trace function registered using :c:func:" -"`PyRefTracer_SetTracer`. The first parameter is a Python object that has " -"been just created (when **event** is set to :c:data:`PyRefTracer_CREATE`) or " -"about to be destroyed (when **event** is set to :c:data:" -"`PyRefTracer_DESTROY`). The **data** argument is the opaque pointer that was " -"provided when :c:func:`PyRefTracer_SetTracer` was called." -msgstr "" - -#: c-api/init.rst:2061 -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been created." -msgstr "" - -#: c-api/init.rst:2066 -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been destroyed." -msgstr "" - -#: c-api/init.rst:2071 -msgid "" -"Register a reference tracer function. The function will be called when a new " -"Python has been created or when an object is going to be destroyed. If " -"**data** is provided it must be an opaque pointer that will be provided when " -"the tracer function is called. Return ``0`` on success. Set an exception and " -"return ``-1`` on error." -msgstr "" - -#: c-api/init.rst:2077 -msgid "" -"Not that tracer functions **must not** create Python objects inside or " -"otherwise the call will be re-entrant. The tracer also **must not** clear " -"any existing exception or set an exception. The GIL will be held every time " -"the tracer function is called." -msgstr "" - -#: c-api/init.rst:2093 -msgid "The GIL must be held when calling this function." -msgstr "" - -#: c-api/init.rst:2088 -msgid "" -"Get the registered reference tracer function and the value of the opaque " -"data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " -"called. If no tracer was registered this function will return NULL and will " -"set the **data** pointer to NULL." -msgstr "" - -#: c-api/init.rst:2100 -msgid "Advanced Debugger Support" -msgstr "Support avancé du débogueur" - -#: c-api/init.rst:2105 -msgid "" -"These functions are only intended to be used by advanced debugging tools." -msgstr "" - -#: c-api/init.rst:2110 -msgid "" -"Return the interpreter state object at the head of the list of all such " -"objects." -msgstr "" - -#: c-api/init.rst:2115 -msgid "Return the main interpreter state object." -msgstr "" - -#: c-api/init.rst:2120 -msgid "" -"Return the next interpreter state object after *interp* from the list of all " -"such objects." -msgstr "" - -#: c-api/init.rst:2126 -msgid "" -"Return the pointer to the first :c:type:`PyThreadState` object in the list " -"of threads associated with the interpreter *interp*." -msgstr "" - -#: c-api/init.rst:2132 -msgid "" -"Return the next thread state object after *tstate* from the list of all such " -"objects belonging to the same :c:type:`PyInterpreterState` object." -msgstr "" - -#: c-api/init.rst:2139 -msgid "Thread Local Storage Support" -msgstr "" - -#: c-api/init.rst:2143 -msgid "" -"The Python interpreter provides low-level support for thread-local storage " -"(TLS) which wraps the underlying native TLS implementation to support the " -"Python-level thread local storage API (:class:`threading.local`). The " -"CPython C level APIs are similar to those offered by pthreads and Windows: " -"use a thread key and functions to associate a :c:expr:`void*` value per " -"thread." -msgstr "" - -#: c-api/init.rst:2150 -msgid "" -"The GIL does *not* need to be held when calling these functions; they supply " -"their own locking." -msgstr "" - -#: c-api/init.rst:2153 -msgid "" -"Note that :file:`Python.h` does not include the declaration of the TLS APIs, " -"you need to include :file:`pythread.h` to use thread-local storage." -msgstr "" - -#: c-api/init.rst:2157 -msgid "" -"None of these API functions handle memory management on behalf of the :c:" -"expr:`void*` values. You need to allocate and deallocate them yourself. If " -"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions " -"don't do refcount operations on them either." -msgstr "" - -#: c-api/init.rst:2165 -msgid "Thread Specific Storage (TSS) API" -msgstr "" - -#: c-api/init.rst:2167 -msgid "" -"TSS API is introduced to supersede the use of the existing TLS API within " -"the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " -"instead of :c:expr:`int` to represent thread keys." -msgstr "" - -#: c-api/init.rst:2173 -msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" -msgstr "" - -#: c-api/init.rst:2178 -msgid "" -"This data structure represents the state of a thread key, the definition of " -"which may depend on the underlying TLS implementation, and it has an " -"internal field representing the key's initialization state. There are no " -"public members in this structure." -msgstr "" - -#: c-api/init.rst:2183 -msgid "" -"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " -"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." -msgstr "" - -#: c-api/init.rst:2189 -msgid "" -"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " -"that this macro won't be defined with :ref:`Py_LIMITED_API `." -msgstr "" - -#: c-api/init.rst:2194 -msgid "Dynamic Allocation" -msgstr "" - -#: c-api/init.rst:2196 -msgid "" -"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " -"built with :ref:`Py_LIMITED_API `, where static allocation of this " -"type is not possible due to its implementation being opaque at build time." -msgstr "" - -#: c-api/init.rst:2203 -msgid "" -"Return a value which is the same state as a value initialized with :c:macro:" -"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." -msgstr "" - -#: c-api/init.rst:2210 -msgid "" -"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " -"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " -"have been unassigned. This is a no-op if the *key* argument is ``NULL``." -msgstr "" - -#: c-api/init.rst:2216 -msgid "" -"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." -msgstr "" - -#: c-api/init.rst:2221 -msgid "Methods" -msgstr "Méthodes" - -#: c-api/init.rst:2223 -msgid "" -"The parameter *key* of these functions must not be ``NULL``. Moreover, the " -"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " -"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:" -"func:`PyThread_tss_create`." -msgstr "" - -#: c-api/init.rst:2231 -msgid "" -"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " -"by :c:func:`PyThread_tss_create`." -msgstr "" - -#: c-api/init.rst:2237 -msgid "" -"Return a zero value on successful initialization of a TSS key. The behavior " -"is undefined if the value pointed to by the *key* argument is not " -"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " -"repeatedly on the same key -- calling it on an already initialized key is a " -"no-op and immediately returns success." -msgstr "" - -#: c-api/init.rst:2246 -msgid "" -"Destroy a TSS key to forget the values associated with the key across all " -"threads, and change the key's initialization state to uninitialized. A " -"destroyed key is able to be initialized again by :c:func:" -"`PyThread_tss_create`. This function can be called repeatedly on the same " -"key -- calling it on an already destroyed key is a no-op." -msgstr "" - -#: c-api/init.rst:2255 -msgid "" -"Return a zero value to indicate successfully associating a :c:expr:`void*` " -"value with a TSS key in the current thread. Each thread has a distinct " -"mapping of the key to a :c:expr:`void*` value." -msgstr "" - -#: c-api/init.rst:2262 -msgid "" -"Return the :c:expr:`void*` value associated with a TSS key in the current " -"thread. This returns ``NULL`` if no value is associated with the key in the " -"current thread." -msgstr "" - -#: c-api/init.rst:2270 -msgid "Thread Local Storage (TLS) API" -msgstr "" - -#: c-api/init.rst:2272 -msgid "" -"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." -msgstr "" - -#: c-api/init.rst:2277 -msgid "" -"This version of the API does not support platforms where the native TLS key " -"is defined in a way that cannot be safely cast to ``int``. On such " -"platforms, :c:func:`PyThread_create_key` will return immediately with a " -"failure status, and the other TLS functions will all be no-ops on such " -"platforms." -msgstr "" - -#: c-api/init.rst:2282 -msgid "" -"Due to the compatibility problem noted above, this version of the API should " -"not be used in new code." -msgstr "" - -#: c-api/init.rst:2293 -msgid "Synchronization Primitives" -msgstr "Primitives de synchronisation" - -#: c-api/init.rst:2295 -msgid "The C-API provides a basic mutual exclusion lock." -msgstr "" - -#: c-api/init.rst:2299 -msgid "" -"A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " -"zero to represent the unlocked state. For example::" -msgstr "" - -#: c-api/init.rst:2304 -msgid "" -"Instances of :c:type:`!PyMutex` should not be copied or moved. Both the " -"contents and address of a :c:type:`!PyMutex` are meaningful, and it must " -"remain at a fixed, writable location in memory." -msgstr "" - -#: c-api/init.rst:2310 -msgid "" -"A :c:type:`!PyMutex` currently occupies one byte, but the size should be " -"considered unstable. The size may change in future Python releases without " -"a deprecation period." -msgstr "" - -#: c-api/init.rst:2318 -msgid "" -"Lock mutex *m*. If another thread has already locked it, the calling thread " -"will block until the mutex is unlocked. While blocked, the thread will " -"temporarily release the :term:`GIL` if it is held." -msgstr "" - -#: c-api/init.rst:2326 -msgid "" -"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " -"issue a fatal error." -msgstr "" - -#: c-api/init.rst:2334 -msgid "Python Critical Section API" -msgstr "" - -#: c-api/init.rst:2336 -msgid "" -"The critical section API provides a deadlock avoidance layer on top of per-" -"object locks for :term:`free-threaded ` CPython. They are " -"intended to replace reliance on the :term:`global interpreter lock`, and are " -"no-ops in versions of Python with the global interpreter lock." -msgstr "" - -#: c-api/init.rst:2341 -msgid "" -"Critical sections avoid deadlocks by implicitly suspending active critical " -"sections and releasing the locks during calls to :c:func:" -"`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the most " -"recent critical section is resumed, and its locks reacquired. This means " -"the critical section API provides weaker guarantees than traditional locks " -"-- they are useful because their behavior is similar to the :term:`GIL`." -msgstr "" - -#: c-api/init.rst:2348 -msgid "" -"The functions and structs used by the macros are exposed for cases where C " -"macros are not available. They should only be used as in the given macro " -"expansions. Note that the sizes and contents of the structures may change in " -"future Python versions." -msgstr "" - -#: c-api/init.rst:2355 -msgid "" -"Operations that need to lock two objects at once must use :c:macro:" -"`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to " -"lock more than one object at once, because the inner critical section may " -"suspend the outer critical sections. This API does not provide a way to " -"lock more than two objects at once." -msgstr "" - -#: c-api/init.rst:2361 -msgid "Example usage::" -msgstr "Exemple d'utilisation ::" - -#: c-api/init.rst:2372 -msgid "" -"In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which " -"can call arbitrary code through an object's deallocation function. The " -"critical section API avoids potential deadlocks due to reentrancy and lock " -"ordering by allowing the runtime to temporarily suspend the critical section " -"if the code triggered by the finalizer blocks and calls :c:func:" -"`PyEval_SaveThread`." -msgstr "" - -#: c-api/init.rst:2380 -msgid "" -"Acquires the per-object lock for the object *op* and begins a critical " -"section." -msgstr "" - -#: c-api/init.rst:2397 c-api/init.rst:2426 -msgid "In the free-threaded build, this macro expands to::" -msgstr "" - -#: c-api/init.rst:2418 -msgid "In the default build, this macro expands to ``{``." -msgstr "" - -#: c-api/init.rst:2395 -msgid "Ends the critical section and releases the per-object lock." -msgstr "" - -#: c-api/init.rst:2431 -msgid "In the default build, this macro expands to ``}``." -msgstr "" - -#: c-api/init.rst:2408 -msgid "" -"Acquires the per-objects locks for the objects *a* and *b* and begins a " -"critical section. The locks are acquired in a consistent order (lowest " -"address first) to avoid lock ordering deadlocks." -msgstr "" - -#: c-api/init.rst:2424 -msgid "Ends the critical section and releases the per-object locks." -msgstr "" +#~ msgid "Example usage::" +#~ msgstr "Exemple d'utilisation ::" #~ msgid "module" #~ msgstr "module" diff --git a/c-api/init_config.po b/c-api/init_config.po index ac331e25c..19c82af8c 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-09-04 11:42+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,18 +18,1010 @@ msgstr "" msgid "Python Initialization Configuration" msgstr "" -#: c-api/init_config.rst:11 +#: c-api/init_config.rst:13 +msgid "PyInitConfig C API" +msgstr "" + +#: c-api/init_config.rst:17 +msgid "Python can be initialized with :c:func:`Py_InitializeFromInitConfig`." +msgstr "" + +#: c-api/init_config.rst:650 +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" + +#: c-api/init_config.rst:653 +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" + +#: c-api/init_config.rst:25 +msgid ":pep:`741` \"Python Configuration C API\"." +msgstr "" + +#: c-api/init_config.rst:660 +#, fuzzy +msgid "Example" +msgstr "Exemple ::" + +#: c-api/init_config.rst:31 +msgid "" +"Example of customized Python always running with the :ref:`Python " +"Development Mode ` enabled; return ``-1`` on error:" +msgstr "" + +#: c-api/init_config.rst:71 +msgid "Create Config" +msgstr "" + +#: c-api/init_config.rst:75 +msgid "Opaque structure to configure the Python initialization." +msgstr "" + +#: c-api/init_config.rst:80 +msgid "" +"Create a new initialization configuration using :ref:`Isolated Configuration " +"` default values." +msgstr "" + +#: c-api/init_config.rst:83 +msgid "It must be freed by :c:func:`PyInitConfig_Free`." +msgstr "" + +#: c-api/init_config.rst:85 +msgid "Return ``NULL`` on memory allocation failure." +msgstr "" + +#: c-api/init_config.rst:90 +msgid "Free memory of the initialization configuration *config*." +msgstr "" + +#: c-api/init_config.rst:92 +msgid "If *config* is ``NULL``, no operation is performed." +msgstr "" + +#: c-api/init_config.rst:96 +msgid "Error Handling" +msgstr "Gestion des erreurs" + +#: c-api/init_config.rst:100 +msgid "Get the *config* error message." +msgstr "" + +#: c-api/init_config.rst:102 +msgid "Set *\\*err_msg* and return ``1`` if an error is set." +msgstr "" + +#: c-api/init_config.rst:103 +msgid "Set *\\*err_msg* to ``NULL`` and return ``0`` otherwise." +msgstr "" + +#: c-api/init_config.rst:105 +msgid "An error message is a UTF-8 encoded string." +msgstr "" + +#: c-api/init_config.rst:107 +msgid "If *config* has an exit code, format the exit code as an error message." +msgstr "" + +#: c-api/init_config.rst:110 +msgid "" +"The error message remains valid until another ``PyInitConfig`` function is " +"called with *config*. The caller doesn't have to free the error message." +msgstr "" + +#: c-api/init_config.rst:117 +msgid "Get the *config* exit code." +msgstr "" + +#: c-api/init_config.rst:119 +msgid "Set *\\*exitcode* and return ``1`` if *config* has an exit code set." +msgstr "" + +#: c-api/init_config.rst:120 +msgid "Return ``0`` if *config* has no exit code set." +msgstr "" + +#: c-api/init_config.rst:122 +msgid "" +"Only the ``Py_InitializeFromInitConfig()`` function can set an exit code if " +"the ``parse_argv`` option is non-zero." +msgstr "" + +#: c-api/init_config.rst:125 +msgid "" +"An exit code can be set when parsing the command line failed (exit code " +"``2``) or when a command line option asks to display the command line help " +"(exit code ``0``)." +msgstr "" + +#: c-api/init_config.rst:131 +msgid "Get Options" +msgstr "" + +#: c-api/init_config.rst:187 c-api/init_config.rst:559 +msgid "" +"The configuration option *name* parameter must be a non-NULL null-terminated " +"UTF-8 encoded string. See :ref:`Configuration Options `." +msgstr "" + +#: c-api/init_config.rst:138 +msgid "Test if the configuration has an option called *name*." +msgstr "" + +#: c-api/init_config.rst:140 +msgid "Return ``1`` if the option exists, or return ``0`` otherwise." +msgstr "" + +#: c-api/init_config.rst:145 +msgid "Get an integer configuration option." +msgstr "" + +#: c-api/init_config.rst:156 +msgid "Set *\\*value*, and return ``0`` on success." +msgstr "" + +#: c-api/init_config.rst:157 c-api/init_config.rst:200 +#: c-api/init_config.rst:218 c-api/init_config.rst:249 +msgid "Set an error in *config* and return ``-1`` on error." +msgstr "" + +#: c-api/init_config.rst:153 +msgid "" +"Get a string configuration option as a null-terminated UTF-8 encoded string." +msgstr "" + +#: c-api/init_config.rst:159 +msgid "" +"*\\*value* can be set to ``NULL`` if the option is an optional string and " +"the option is unset." +msgstr "" + +#: c-api/init_config.rst:162 +msgid "" +"On success, the string must be released with ``free(value)`` if it's not " +"``NULL``." +msgstr "" + +#: c-api/init_config.rst:168 +msgid "" +"Get a string list configuration option as an array of null-terminated UTF-8 " +"encoded strings." +msgstr "" + +#: c-api/init_config.rst:171 +msgid "Set *\\*length* and *\\*value*, and return ``0`` on success." +msgstr "" + +#: c-api/init_config.rst:174 +msgid "" +"On success, the string list must be released with " +"``PyInitConfig_FreeStrList(length, items)``." +msgstr "" + +#: c-api/init_config.rst:180 +msgid "Free memory of a string list created by ``PyInitConfig_GetStrList()``." +msgstr "" + +#: c-api/init_config.rst:185 +msgid "Set Options" +msgstr "" + +#: c-api/init_config.rst:190 +msgid "" +"Some configuration options have side effects on other options. This logic is " +"only implemented when ``Py_InitializeFromInitConfig()`` is called, not by " +"the \"Set\" functions below. For example, setting ``dev_mode`` to ``1`` does " +"not set ``faulthandler`` to ``1``." +msgstr "" + +#: c-api/init_config.rst:197 +msgid "Set an integer configuration option." +msgstr "" + +#: c-api/init_config.rst:208 c-api/init_config.rst:232 +#: c-api/init_config.rst:591 +msgid "Return ``0`` on success." +msgstr "" + +#: c-api/init_config.rst:205 +msgid "" +"Set a string configuration option from a null-terminated UTF-8 encoded " +"string. The string is copied." +msgstr "" + +#: c-api/init_config.rst:214 +msgid "" +"Set a string list configuration option from an array of null-terminated " +"UTF-8 encoded strings. The string list is copied." +msgstr "" + +#: c-api/init_config.rst:222 +msgid "Module" +msgstr "" + +#: c-api/init_config.rst:226 +msgid "Add a built-in extension module to the table of built-in modules." +msgstr "" + +#: c-api/init_config.rst:228 +msgid "" +"The new module can be imported by the name *name*, and uses the function " +"*initfunc* as the initialization function called on the first attempted " +"import." +msgstr "" + +#: c-api/init_config.rst:235 +msgid "" +"If Python is initialized multiple times, ``PyInitConfig_AddModule()`` must " +"be called at each Python initialization." +msgstr "" + +#: c-api/init_config.rst:238 +msgid "Similar to the :c:func:`PyImport_AppendInittab` function." +msgstr "" + +#: c-api/init_config.rst:242 +msgid "Initialize Python" +msgstr "" + +#: c-api/init_config.rst:246 +msgid "Initialize Python from the initialization configuration." +msgstr "" + +#: c-api/init_config.rst:250 +msgid "Set an exit code in *config* and return ``-1`` if Python wants to exit." +msgstr "" + +#: c-api/init_config.rst:253 +msgid "See ``PyInitConfig_GetExitcode()`` for the exit code case." +msgstr "" + +#: c-api/init_config.rst:259 +msgid "Configuration Options" +msgstr "" + +#: c-api/init_config.rst:264 +msgid "Option" +msgstr "Option" + +#: c-api/init_config.rst:265 +msgid "PyConfig/PyPreConfig member" +msgstr "" + +#: c-api/init_config.rst:266 +msgid "Type" +msgstr "Type" + +#: c-api/init_config.rst:267 +msgid "Visibility" +msgstr "Visibilité" + +#: c-api/init_config.rst:268 +msgid "``\"allocator\"``" +msgstr "" + +#: c-api/init_config.rst:269 +msgid ":c:member:`allocator `" +msgstr "" + +#: c-api/init_config.rst:294 c-api/init_config.rst:358 +#: c-api/init_config.rst:378 c-api/init_config.rst:494 +#: c-api/init_config.rst:576 +msgid "``int``" +msgstr "``int``" + +#: c-api/init_config.rst:291 c-api/init_config.rst:303 +#: c-api/init_config.rst:311 c-api/init_config.rst:319 +#: c-api/init_config.rst:331 c-api/init_config.rst:347 +#: c-api/init_config.rst:355 c-api/init_config.rst:363 +#: c-api/init_config.rst:375 c-api/init_config.rst:391 +#: c-api/init_config.rst:399 c-api/init_config.rst:415 +#: c-api/init_config.rst:427 c-api/init_config.rst:451 +#: c-api/init_config.rst:459 c-api/init_config.rst:467 +#: c-api/init_config.rst:475 c-api/init_config.rst:483 +#: c-api/init_config.rst:495 c-api/init_config.rst:507 +#: c-api/init_config.rst:515 c-api/init_config.rst:527 +#: c-api/init_config.rst:543 +msgid "Read-only" +msgstr "Accessible en lecture seule" + +#: c-api/init_config.rst:272 +msgid "``\"argv\"``" +msgstr "" + +#: c-api/init_config.rst:273 +msgid ":c:member:`argv `" +msgstr "" + +#: c-api/init_config.rst:402 c-api/init_config.rst:530 +#: c-api/init_config.rst:578 +msgid "``list[str]``" +msgstr "" + +#: c-api/init_config.rst:279 c-api/init_config.rst:287 +#: c-api/init_config.rst:323 c-api/init_config.rst:343 +#: c-api/init_config.rst:379 c-api/init_config.rst:403 +#: c-api/init_config.rst:419 c-api/init_config.rst:435 +#: c-api/init_config.rst:447 c-api/init_config.rst:499 +#: c-api/init_config.rst:531 c-api/init_config.rst:539 +msgid "Public" +msgstr "" + +#: c-api/init_config.rst:276 +msgid "``\"base_exec_prefix\"``" +msgstr "" + +#: c-api/init_config.rst:277 +msgid ":c:member:`base_exec_prefix `" +msgstr "" + +#: c-api/init_config.rst:282 c-api/init_config.rst:298 +#: c-api/init_config.rst:338 c-api/init_config.rst:350 +#: c-api/init_config.rst:362 c-api/init_config.rst:434 +#: c-api/init_config.rst:442 c-api/init_config.rst:454 +#: c-api/init_config.rst:462 c-api/init_config.rst:486 +#: c-api/init_config.rst:577 +msgid "``str``" +msgstr "``str``" + +#: c-api/init_config.rst:280 +msgid "``\"base_executable\"``" +msgstr "" + +#: c-api/init_config.rst:281 +msgid ":c:member:`base_executable `" +msgstr "" + +#: c-api/init_config.rst:284 +msgid "``\"base_prefix\"``" +msgstr "" + +#: c-api/init_config.rst:285 +msgid ":c:member:`base_prefix `" +msgstr "" + +#: c-api/init_config.rst:288 +msgid "``\"buffered_stdio\"``" +msgstr "" + +#: c-api/init_config.rst:289 +msgid ":c:member:`buffered_stdio `" +msgstr "" + +#: c-api/init_config.rst:302 c-api/init_config.rst:310 +#: c-api/init_config.rst:318 c-api/init_config.rst:330 +#: c-api/init_config.rst:370 c-api/init_config.rst:382 +#: c-api/init_config.rst:390 c-api/init_config.rst:398 +#: c-api/init_config.rst:418 c-api/init_config.rst:426 +#: c-api/init_config.rst:466 c-api/init_config.rst:474 +#: c-api/init_config.rst:498 c-api/init_config.rst:506 +#: c-api/init_config.rst:514 c-api/init_config.rst:526 +#: c-api/init_config.rst:542 c-api/init_config.rst:575 +msgid "``bool``" +msgstr "``bool``" + +#: c-api/init_config.rst:292 +msgid "``\"bytes_warning\"``" +msgstr "" + +#: c-api/init_config.rst:293 +msgid ":c:member:`bytes_warning `" +msgstr "" + +#: c-api/init_config.rst:296 +msgid "``\"check_hash_pycs_mode\"``" +msgstr "" + +#: c-api/init_config.rst:297 +msgid ":c:member:`check_hash_pycs_mode `" +msgstr "" + +#: c-api/init_config.rst:300 +msgid "``\"code_debug_ranges\"``" +msgstr "" + +#: c-api/init_config.rst:301 +msgid ":c:member:`code_debug_ranges `" +msgstr "" + +#: c-api/init_config.rst:304 +msgid "``\"coerce_c_locale\"``" +msgstr "" + +#: c-api/init_config.rst:305 +msgid ":c:member:`coerce_c_locale `" +msgstr "" + +#: c-api/init_config.rst:308 +msgid "``\"coerce_c_locale_warn\"``" +msgstr "" + +#: c-api/init_config.rst:309 +msgid ":c:member:`coerce_c_locale_warn `" +msgstr "" + +#: c-api/init_config.rst:312 +msgid "``\"configure_c_stdio\"``" +msgstr "" + +#: c-api/init_config.rst:313 +msgid ":c:member:`configure_c_stdio `" +msgstr "" + +#: c-api/init_config.rst:316 +msgid "``\"configure_locale\"``" +msgstr "" + +#: c-api/init_config.rst:317 +msgid ":c:member:`configure_locale `" +msgstr "" + +#: c-api/init_config.rst:320 +msgid "``\"cpu_count\"``" +msgstr "" + +#: c-api/init_config.rst:321 +msgid ":c:member:`cpu_count `" +msgstr "" + +#: c-api/init_config.rst:324 +msgid "``\"dev_mode\"``" +msgstr "" + +#: c-api/init_config.rst:325 +msgid ":c:member:`dev_mode `" +msgstr "" + +#: c-api/init_config.rst:328 +msgid "``\"dump_refs\"``" +msgstr "" + +#: c-api/init_config.rst:329 +msgid ":c:member:`dump_refs `" +msgstr "" + +#: c-api/init_config.rst:332 +msgid "``\"dump_refs_file\"``" +msgstr "" + +#: c-api/init_config.rst:333 +msgid ":c:member:`dump_refs_file `" +msgstr "" + +#: c-api/init_config.rst:336 +msgid "``\"exec_prefix\"``" +msgstr "" + +#: c-api/init_config.rst:337 +msgid ":c:member:`exec_prefix `" +msgstr "" + +#: c-api/init_config.rst:340 +msgid "``\"executable\"``" +msgstr "" + +#: c-api/init_config.rst:341 +msgid ":c:member:`executable `" +msgstr "" + +#: c-api/init_config.rst:344 +msgid "``\"faulthandler\"``" +msgstr "" + +#: c-api/init_config.rst:345 +msgid ":c:member:`faulthandler `" +msgstr "" + +#: c-api/init_config.rst:348 +msgid "``\"filesystem_encoding\"``" +msgstr "" + +#: c-api/init_config.rst:349 +msgid ":c:member:`filesystem_encoding `" +msgstr "" + +#: c-api/init_config.rst:352 +msgid "``\"filesystem_errors\"``" +msgstr "" + +#: c-api/init_config.rst:353 +msgid ":c:member:`filesystem_errors `" +msgstr "" + +#: c-api/init_config.rst:356 +msgid "``\"hash_seed\"``" +msgstr "" + +#: c-api/init_config.rst:357 +msgid ":c:member:`hash_seed `" +msgstr "" + +#: c-api/init_config.rst:360 +msgid "``\"home\"``" +msgstr "" + +#: c-api/init_config.rst:361 +msgid ":c:member:`home `" +msgstr "" + +#: c-api/init_config.rst:364 +msgid "``\"import_time\"``" +msgstr "" + +#: c-api/init_config.rst:365 +msgid ":c:member:`import_time `" +msgstr "" + +#: c-api/init_config.rst:368 +msgid "``\"inspect\"``" +msgstr "" + +#: c-api/init_config.rst:369 +msgid ":c:member:`inspect `" +msgstr "" + +#: c-api/init_config.rst:372 +msgid "``\"install_signal_handlers\"``" +msgstr "" + +#: c-api/init_config.rst:373 +msgid ":c:member:`install_signal_handlers `" +msgstr "" + +#: c-api/init_config.rst:376 +msgid "``\"int_max_str_digits\"``" +msgstr "" + +#: c-api/init_config.rst:377 +msgid ":c:member:`int_max_str_digits `" +msgstr "" + +#: c-api/init_config.rst:380 +msgid "``\"interactive\"``" +msgstr "" + +#: c-api/init_config.rst:381 +msgid ":c:member:`interactive `" +msgstr "" + +#: c-api/init_config.rst:384 +msgid "``\"isolated\"``" +msgstr "" + +#: c-api/init_config.rst:385 +msgid ":c:member:`isolated `" +msgstr "" + +#: c-api/init_config.rst:388 +msgid "``\"legacy_windows_fs_encoding\"``" +msgstr "" + +#: c-api/init_config.rst:389 +msgid "" +":c:member:`legacy_windows_fs_encoding " +"`" +msgstr "" + +#: c-api/init_config.rst:392 +msgid "``\"legacy_windows_stdio\"``" +msgstr "" + +#: c-api/init_config.rst:393 +msgid ":c:member:`legacy_windows_stdio `" +msgstr "" + +#: c-api/init_config.rst:396 +msgid "``\"malloc_stats\"``" +msgstr "" + +#: c-api/init_config.rst:397 +msgid ":c:member:`malloc_stats `" +msgstr "" + +#: c-api/init_config.rst:400 +msgid "``\"module_search_paths\"``" +msgstr "" + +#: c-api/init_config.rst:401 +msgid ":c:member:`module_search_paths `" +msgstr "" + +#: c-api/init_config.rst:404 +msgid "``\"optimization_level\"``" +msgstr "" + +#: c-api/init_config.rst:405 +msgid ":c:member:`optimization_level `" +msgstr "" + +#: c-api/init_config.rst:408 +msgid "``\"orig_argv\"``" +msgstr "" + +#: c-api/init_config.rst:409 +msgid ":c:member:`orig_argv `" +msgstr "" + +#: c-api/init_config.rst:412 +msgid "``\"parse_argv\"``" +msgstr "" + +#: c-api/init_config.rst:413 +msgid ":c:member:`parse_argv `" +msgstr "" + +#: c-api/init_config.rst:416 +msgid "``\"parser_debug\"``" +msgstr "" + +#: c-api/init_config.rst:417 +msgid ":c:member:`parser_debug `" +msgstr "" + +#: c-api/init_config.rst:420 +msgid "``\"pathconfig_warnings\"``" +msgstr "" + +#: c-api/init_config.rst:421 +msgid ":c:member:`pathconfig_warnings `" +msgstr "" + +#: c-api/init_config.rst:424 +msgid "``\"perf_profiling\"``" +msgstr "" + +#: c-api/init_config.rst:425 +msgid ":c:member:`perf_profiling `" +msgstr "" + +#: c-api/init_config.rst:428 +msgid "``\"platlibdir\"``" +msgstr "" + +#: c-api/init_config.rst:429 +msgid ":c:member:`platlibdir `" +msgstr "" + +#: c-api/init_config.rst:432 +msgid "``\"prefix\"``" +msgstr "" + +#: c-api/init_config.rst:433 +msgid ":c:member:`prefix `" +msgstr "" + +#: c-api/init_config.rst:436 +msgid "``\"program_name\"``" +msgstr "" + +#: c-api/init_config.rst:437 +msgid ":c:member:`program_name `" +msgstr "" + +#: c-api/init_config.rst:440 +msgid "``\"pycache_prefix\"``" +msgstr "" + +#: c-api/init_config.rst:441 +msgid ":c:member:`pycache_prefix `" +msgstr "" + +#: c-api/init_config.rst:444 +msgid "``\"quiet\"``" +msgstr "" + +#: c-api/init_config.rst:445 +msgid ":c:member:`quiet `" +msgstr "" + +#: c-api/init_config.rst:448 +msgid "``\"run_command\"``" +msgstr "" + +#: c-api/init_config.rst:449 +msgid ":c:member:`run_command `" +msgstr "" + +#: c-api/init_config.rst:452 +msgid "``\"run_filename\"``" +msgstr "" + +#: c-api/init_config.rst:453 +msgid ":c:member:`run_filename `" +msgstr "" + +#: c-api/init_config.rst:456 +msgid "``\"run_module\"``" +msgstr "" + +#: c-api/init_config.rst:457 +msgid ":c:member:`run_module `" +msgstr "" + +#: c-api/init_config.rst:460 +msgid "``\"run_presite\"``" +msgstr "" + +#: c-api/init_config.rst:461 +msgid ":c:member:`run_presite `" +msgstr "" + +#: c-api/init_config.rst:464 +msgid "``\"safe_path\"``" +msgstr "" + +#: c-api/init_config.rst:465 +msgid ":c:member:`safe_path `" +msgstr "" + +#: c-api/init_config.rst:468 +msgid "``\"show_ref_count\"``" +msgstr "" + +#: c-api/init_config.rst:469 +msgid ":c:member:`show_ref_count `" +msgstr "" + +#: c-api/init_config.rst:472 +msgid "``\"site_import\"``" +msgstr "" + +#: c-api/init_config.rst:473 +msgid ":c:member:`site_import `" +msgstr "" + +#: c-api/init_config.rst:476 +msgid "``\"skip_source_first_line\"``" +msgstr "" + +#: c-api/init_config.rst:477 +msgid ":c:member:`skip_source_first_line `" +msgstr "" + +#: c-api/init_config.rst:480 +msgid "``\"stdio_encoding\"``" +msgstr "" + +#: c-api/init_config.rst:481 +msgid ":c:member:`stdio_encoding `" +msgstr "" + +#: c-api/init_config.rst:484 +msgid "``\"stdio_errors\"``" +msgstr "" + +#: c-api/init_config.rst:485 +msgid ":c:member:`stdio_errors `" +msgstr "" + +#: c-api/init_config.rst:488 +msgid "``\"stdlib_dir\"``" +msgstr "" + +#: c-api/init_config.rst:489 +msgid ":c:member:`stdlib_dir `" +msgstr "" + +#: c-api/init_config.rst:492 +msgid "``\"tracemalloc\"``" +msgstr "" + +#: c-api/init_config.rst:493 +msgid ":c:member:`tracemalloc `" +msgstr "" + +#: c-api/init_config.rst:496 +msgid "``\"use_environment\"``" +msgstr "" + +#: c-api/init_config.rst:497 +msgid ":c:member:`use_environment `" +msgstr "" + +#: c-api/init_config.rst:500 +msgid "``\"use_frozen_modules\"``" +msgstr "" + +#: c-api/init_config.rst:501 +msgid ":c:member:`use_frozen_modules `" +msgstr "" + +#: c-api/init_config.rst:504 +msgid "``\"use_hash_seed\"``" +msgstr "" + +#: c-api/init_config.rst:505 +msgid ":c:member:`use_hash_seed `" +msgstr "" + +#: c-api/init_config.rst:508 +msgid "``\"use_system_logger\"``" +msgstr "" + +#: c-api/init_config.rst:509 +msgid ":c:member:`use_system_logger `" +msgstr "" + +#: c-api/init_config.rst:512 +msgid "``\"user_site_directory\"``" +msgstr "" + +#: c-api/init_config.rst:513 +msgid ":c:member:`user_site_directory `" +msgstr "" + +#: c-api/init_config.rst:516 +msgid "``\"utf8_mode\"``" +msgstr "" + +#: c-api/init_config.rst:517 +msgid ":c:member:`utf8_mode `" +msgstr "" + +#: c-api/init_config.rst:520 +msgid "``\"verbose\"``" +msgstr "" + +#: c-api/init_config.rst:521 +msgid ":c:member:`verbose `" +msgstr "" + +#: c-api/init_config.rst:524 +msgid "``\"warn_default_encoding\"``" +msgstr "" + +#: c-api/init_config.rst:525 +msgid ":c:member:`warn_default_encoding `" +msgstr "" + +#: c-api/init_config.rst:528 +msgid "``\"warnoptions\"``" +msgstr "" + +#: c-api/init_config.rst:529 +msgid ":c:member:`warnoptions `" +msgstr "" + +#: c-api/init_config.rst:532 +msgid "``\"write_bytecode\"``" +msgstr "" + +#: c-api/init_config.rst:533 +msgid ":c:member:`write_bytecode `" +msgstr "" + +#: c-api/init_config.rst:536 +msgid "``\"xoptions\"``" +msgstr "" + +#: c-api/init_config.rst:537 +msgid ":c:member:`xoptions `" +msgstr "" + +#: c-api/init_config.rst:579 +msgid "``dict[str, str]``" +msgstr "" + +#: c-api/init_config.rst:540 +msgid "``\"_pystats\"``" +msgstr "" + +#: c-api/init_config.rst:541 +msgid ":c:member:`_pystats `" +msgstr "" + +#: c-api/init_config.rst:545 +msgid "Visibility:" +msgstr "" + +#: c-api/init_config.rst:547 +msgid "" +"Public: Can be retrieved by :c:func:`PyConfig_Get` and set " +"by :c:func:`PyConfig_Set`." +msgstr "" + +#: c-api/init_config.rst:549 +msgid "" +"Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set " +"by :c:func:`PyConfig_Set`." +msgstr "" + +#: c-api/init_config.rst:554 +msgid "Runtime Python configuration API" +msgstr "" + +#: c-api/init_config.rst:556 +msgid "" +"At runtime, it's possible to get and set configuration options " +"using :c:func:`PyConfig_Get` and :c:func:`PyConfig_Set` functions." +msgstr "" + +#: c-api/init_config.rst:562 +msgid "" +"Some options are read from the :mod:`sys` attributes. For example, the " +"option ``\"argv\"`` is read from :data:`sys.argv`." +msgstr "" + +#: c-api/init_config.rst:568 +msgid "" +"Get the current runtime value of a configuration option as a Python object." +msgstr "" + +#: c-api/init_config.rst:601 +msgid "Return a new reference on success." +msgstr "" + +#: c-api/init_config.rst:602 +msgid "Set an exception and return ``NULL`` on error." +msgstr "" + +#: c-api/init_config.rst:573 +msgid "The object type depends on the configuration option. It can be:" +msgstr "" + +#: c-api/init_config.rst:604 c-api/init_config.rst:619 +msgid "" +"The caller must have an :term:`attached thread state`. The function cannot " +"be called before Python initialization nor after Python finalization." +msgstr "" + +#: c-api/init_config.rst:589 +msgid "Similar to :c:func:`PyConfig_Get`, but get the value as a C int." +msgstr "" + +#: c-api/init_config.rst:592 +msgid "Set an exception and return ``-1`` on error." +msgstr "" + +#: c-api/init_config.rst:599 +msgid "Get all configuration option names as a ``frozenset``." +msgstr "" + +#: c-api/init_config.rst:612 +msgid "Set the current runtime value of a configuration option." +msgstr "" + +#: c-api/init_config.rst:614 +msgid "Raise a :exc:`ValueError` if there is no option *name*." +msgstr "" + +#: c-api/init_config.rst:615 +msgid "Raise a :exc:`ValueError` if *value* is an invalid value." +msgstr "" + +#: c-api/init_config.rst:616 +msgid "Raise a :exc:`ValueError` if the option is read-only (cannot be set)." +msgstr "" + +#: c-api/init_config.rst:617 +msgid "Raise a :exc:`TypeError` if *value* has not the proper type." +msgstr "" + +#: c-api/init_config.rst:622 +msgid "" +"Raises an :ref:`auditing event ` ``cpython.PyConfig_Set`` with " +"arguments ``name``, ``value``." +msgstr "" + +#: c-api/init_config.rst:630 +msgid "PyConfig C API" +msgstr "" + +#: c-api/init_config.rst:634 msgid "" -"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" -"type:`PyConfig` structure. It can be preinitialized with :c:func:" -"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." +"Python can be initialized with :c:func:`Py_InitializeFromConfig` and " +"the :c:type:`PyConfig` structure. It can be preinitialized " +"with :c:func:`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." msgstr "" -#: c-api/init_config.rst:15 +#: c-api/init_config.rst:638 msgid "There are two kinds of configuration:" msgstr "" -#: c-api/init_config.rst:17 +#: c-api/init_config.rst:640 msgid "" "The :ref:`Python Configuration ` can be used to build a " "customized Python which behaves as the regular Python. For example, " @@ -37,7 +1029,7 @@ msgid "" "Python." msgstr "" -#: c-api/init_config.rst:22 +#: c-api/init_config.rst:645 msgid "" "The :ref:`Isolated Configuration ` can be used to embed " "Python into an application. It isolates Python from the system. For example, " @@ -45,470 +1037,451 @@ msgid "" "no signal handler is registered." msgstr "" -#: c-api/init_config.rst:27 -msgid "" -"The :c:func:`Py_RunMain` function can be used to write a customized Python " -"program." -msgstr "" - -#: c-api/init_config.rst:30 -msgid "" -"See also :ref:`Initialization, Finalization, and Threads `." -msgstr "" - -#: c-api/init_config.rst:33 +#: c-api/init_config.rst:656 msgid ":pep:`587` \"Python Initialization Configuration\"." msgstr "" -#: c-api/init_config.rst:37 -#, fuzzy -msgid "Example" -msgstr "Exemple ::" - -#: c-api/init_config.rst:39 +#: c-api/init_config.rst:662 msgid "Example of customized Python always running in isolated mode::" msgstr "" -#: c-api/init_config.rst:76 +#: c-api/init_config.rst:699 msgid "PyWideStringList" msgstr "" -#: c-api/init_config.rst:80 +#: c-api/init_config.rst:703 msgid "List of ``wchar_t*`` strings." msgstr "" -#: c-api/init_config.rst:82 +#: c-api/init_config.rst:705 msgid "" "If *length* is non-zero, *items* must be non-``NULL`` and all strings must " "be non-``NULL``." msgstr "" -#: c-api/init_config.rst:87 +#: c-api/init_config.rst:710 #, fuzzy msgid "Methods:" msgstr "Méthodes :" -#: c-api/init_config.rst:91 +#: c-api/init_config.rst:714 msgid "Append *item* to *list*." msgstr "" -#: c-api/init_config.rst:104 +#: c-api/init_config.rst:727 msgid "Python must be preinitialized to call this function." msgstr "" -#: c-api/init_config.rst:97 +#: c-api/init_config.rst:720 msgid "Insert *item* into *list* at *index*." msgstr "" -#: c-api/init_config.rst:99 +#: c-api/init_config.rst:722 msgid "" "If *index* is greater than or equal to *list* length, append *item* to " "*list*." msgstr "" -#: c-api/init_config.rst:102 +#: c-api/init_config.rst:725 msgid "*index* must be greater than or equal to ``0``." msgstr "" -#: c-api/init_config.rst:128 c-api/init_config.rst:554 +#: c-api/init_config.rst:751 c-api/init_config.rst:1175 msgid "Structure fields:" msgstr "" -#: c-api/init_config.rst:112 +#: c-api/init_config.rst:735 msgid "List length." msgstr "" -#: c-api/init_config.rst:116 +#: c-api/init_config.rst:739 msgid "List items." msgstr "" -#: c-api/init_config.rst:119 +#: c-api/init_config.rst:742 msgid "PyStatus" msgstr "" -#: c-api/init_config.rst:123 +#: c-api/init_config.rst:746 msgid "" "Structure to store an initialization function status: success, error or exit." msgstr "" -#: c-api/init_config.rst:126 +#: c-api/init_config.rst:749 msgid "For an error, it can store the C function name which created the error." msgstr "" -#: c-api/init_config.rst:132 +#: c-api/init_config.rst:755 msgid "Exit code. Argument passed to ``exit()``." msgstr "" -#: c-api/init_config.rst:136 +#: c-api/init_config.rst:759 msgid "Error message." msgstr "" -#: c-api/init_config.rst:140 +#: c-api/init_config.rst:763 msgid "Name of the function which created an error, can be ``NULL``." msgstr "" -#: c-api/init_config.rst:144 +#: c-api/init_config.rst:767 msgid "Functions to create a status:" msgstr "" -#: c-api/init_config.rst:148 +#: c-api/init_config.rst:771 msgid "Success." msgstr "" -#: c-api/init_config.rst:152 +#: c-api/init_config.rst:775 msgid "Initialization error with a message." msgstr "" -#: c-api/init_config.rst:154 +#: c-api/init_config.rst:777 msgid "*err_msg* must not be ``NULL``." msgstr "" -#: c-api/init_config.rst:158 +#: c-api/init_config.rst:781 msgid "Memory allocation failure (out of memory)." msgstr "" -#: c-api/init_config.rst:162 +#: c-api/init_config.rst:785 msgid "Exit Python with the specified exit code." msgstr "" -#: c-api/init_config.rst:164 +#: c-api/init_config.rst:787 msgid "Functions to handle a status:" msgstr "" -#: c-api/init_config.rst:168 +#: c-api/init_config.rst:791 msgid "" "Is the status an error or an exit? If true, the exception must be handled; " "by calling :c:func:`Py_ExitStatusException` for example." msgstr "" -#: c-api/init_config.rst:173 +#: c-api/init_config.rst:796 msgid "Is the result an error?" msgstr "" -#: c-api/init_config.rst:177 +#: c-api/init_config.rst:800 msgid "Is the result an exit?" msgstr "" -#: c-api/init_config.rst:181 +#: c-api/init_config.rst:804 msgid "" "Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " "exit with a non-zero exit code if *status* is an error. Must only be called " "if ``PyStatus_Exception(status)`` is non-zero." msgstr "" -#: c-api/init_config.rst:186 +#: c-api/init_config.rst:809 msgid "" "Internally, Python uses macros which set ``PyStatus.func``, whereas " "functions to create a status set ``func`` to ``NULL``." msgstr "" -#: c-api/init_config.rst:189 +#: c-api/init_config.rst:812 msgid "Example::" msgstr "Exemple ::" -#: c-api/init_config.rst:213 +#: c-api/init_config.rst:836 msgid "PyPreConfig" msgstr "" -#: c-api/init_config.rst:217 +#: c-api/init_config.rst:840 msgid "Structure used to preinitialize Python." msgstr "" -#: c-api/init_config.rst:221 +#: c-api/init_config.rst:844 msgid "Function to initialize a preconfiguration:" msgstr "" -#: c-api/init_config.rst:225 +#: c-api/init_config.rst:848 msgid "" "Initialize the preconfiguration with :ref:`Python Configuration `." msgstr "" -#: c-api/init_config.rst:230 +#: c-api/init_config.rst:853 msgid "" "Initialize the preconfiguration with :ref:`Isolated Configuration `." msgstr "" -#: c-api/init_config.rst:239 +#: c-api/init_config.rst:862 msgid "Name of the Python memory allocators:" msgstr "" -#: c-api/init_config.rst:241 +#: c-api/init_config.rst:864 msgid "" "``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " "defaults)." msgstr "" -#: c-api/init_config.rst:243 +#: c-api/init_config.rst:866 msgid "" "``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " "`." msgstr "" -#: c-api/init_config.rst:245 +#: c-api/init_config.rst:868 msgid "" "``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." msgstr "" -#: c-api/init_config.rst:248 +#: c-api/init_config.rst:871 msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." msgstr "" -#: c-api/init_config.rst:249 +#: c-api/init_config.rst:872 msgid "" -"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" -"ref:`debug hooks `." +"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` " +"with :ref:`debug hooks `." msgstr "" -#: c-api/init_config.rst:251 +#: c-api/init_config.rst:874 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " "`." msgstr "" -#: c-api/init_config.rst:253 +#: c-api/init_config.rst:876 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " "allocator ` with :ref:`debug hooks `." msgstr "" -#: c-api/init_config.rst:256 +#: c-api/init_config.rst:879 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC`` (``6``): use ``mimalloc``, a fast malloc " "replacement." msgstr "" -#: c-api/init_config.rst:258 +#: c-api/init_config.rst:881 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``7``): use ``mimalloc``, a fast malloc " "replacement with :ref:`debug hooks `." msgstr "" -#: c-api/init_config.rst:262 +#: c-api/init_config.rst:885 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " "supported if Python is :option:`configured using --without-pymalloc <--" "without-pymalloc>`." msgstr "" -#: c-api/init_config.rst:266 +#: c-api/init_config.rst:889 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are not " "supported if Python is :option:`configured using --without-mimalloc <--" "without-mimalloc>` or if the underlying atomic support isn't available." msgstr "" -#: c-api/init_config.rst:271 +#: c-api/init_config.rst:894 msgid "See :ref:`Memory Management `." msgstr "" -#: c-api/init_config.rst:273 +#: c-api/init_config.rst:896 msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" -#: c-api/init_config.rst:277 +#: c-api/init_config.rst:900 msgid "Set the LC_CTYPE locale to the user preferred locale." msgstr "" -#: c-api/init_config.rst:279 +#: c-api/init_config.rst:902 msgid "" -"If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:" -"member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." +"If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` " +"and :c:member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." msgstr "" -#: c-api/init_config.rst:293 +#: c-api/init_config.rst:916 msgid "See the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:339 c-api/init_config.rst:710 +#: c-api/init_config.rst:962 c-api/init_config.rst:1336 msgid "Default: ``1`` in Python config, ``0`` in isolated config." msgstr "" -#: c-api/init_config.rst:288 +#: c-api/init_config.rst:911 msgid "If equals to ``2``, coerce the C locale." msgstr "" -#: c-api/init_config.rst:290 +#: c-api/init_config.rst:913 msgid "" "If equals to ``1``, read the LC_CTYPE locale to decide if it should be " "coerced." msgstr "" -#: c-api/init_config.rst:301 +#: c-api/init_config.rst:924 msgid "Default: ``-1`` in Python config, ``0`` in isolated config." msgstr "" -#: c-api/init_config.rst:299 +#: c-api/init_config.rst:922 msgid "If non-zero, emit a warning if the C locale is coerced." msgstr "" -#: c-api/init_config.rst:305 +#: c-api/init_config.rst:928 msgid "" ":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." msgstr "" -#: c-api/init_config.rst:719 c-api/init_config.rst:1244 +#: c-api/init_config.rst:1345 c-api/init_config.rst:1895 msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:312 +#: c-api/init_config.rst:935 msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" -#: c-api/init_config.rst:921 +#: c-api/init_config.rst:1572 msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" -#: c-api/init_config.rst:318 +#: c-api/init_config.rst:941 msgid "If non-zero:" msgstr "" -#: c-api/init_config.rst:320 +#: c-api/init_config.rst:943 msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," msgstr "" -#: c-api/init_config.rst:321 +#: c-api/init_config.rst:944 msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," msgstr "" -#: c-api/init_config.rst:322 +#: c-api/init_config.rst:945 msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." msgstr "" -#: c-api/init_config.rst:324 +#: c-api/init_config.rst:947 msgid "" "Initialized from the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " "variable value." msgstr "" -#: c-api/init_config.rst:935 +#: c-api/init_config.rst:1586 msgid "" "Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " "Windows specific code." msgstr "" -#: c-api/init_config.rst:658 c-api/init_config.rst:732 -#: c-api/init_config.rst:857 c-api/init_config.rst:938 -#: c-api/init_config.rst:1012 c-api/init_config.rst:1126 -#: c-api/init_config.rst:1209 c-api/init_config.rst:1298 +#: c-api/init_config.rst:1279 c-api/init_config.rst:1358 +#: c-api/init_config.rst:1508 c-api/init_config.rst:1589 +#: c-api/init_config.rst:1663 c-api/init_config.rst:1777 +#: c-api/init_config.rst:1860 c-api/init_config.rst:2021 msgid "Default: ``0``." msgstr "" -#: c-api/init_config.rst:334 +#: c-api/init_config.rst:957 msgid "" -"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" -"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " -"the regular Python parses command line arguments: see :ref:`Command Line " -"Arguments `." +"If non-zero, :c:func:`Py_PreInitializeFromArgs` " +"and :c:func:`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument " +"the same way the regular Python parses command line arguments: " +"see :ref:`Command Line Arguments `." msgstr "" -#: c-api/init_config.rst:343 +#: c-api/init_config.rst:966 msgid "" -"Use :ref:`environment variables `? See :c:member:`PyConfig." -"use_environment`." +"Use :ref:`environment variables `? " +"See :c:member:`PyConfig.use_environment`." msgstr "" -#: c-api/init_config.rst:1272 +#: c-api/init_config.rst:1936 msgid "Default: ``1`` in Python config and ``0`` in isolated config." msgstr "" -#: c-api/init_config.rst:350 +#: c-api/init_config.rst:973 msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/init_config.rst:352 +#: c-api/init_config.rst:975 msgid "" "Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " "the :envvar:`PYTHONUTF8` environment variable." msgstr "" -#: c-api/init_config.rst:355 -msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." -msgstr "" - -#: c-api/init_config.rst:357 -msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +#: c-api/init_config.rst:1266 c-api/init_config.rst:1848 +#: c-api/init_config.rst:2006 +msgid "Default: ``1``." msgstr "" -#: c-api/init_config.rst:363 +#: c-api/init_config.rst:984 msgid "Preinitialize Python with PyPreConfig" msgstr "" -#: c-api/init_config.rst:365 +#: c-api/init_config.rst:986 msgid "The preinitialization of Python:" msgstr "" -#: c-api/init_config.rst:367 +#: c-api/init_config.rst:988 msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" msgstr "" -#: c-api/init_config.rst:368 +#: c-api/init_config.rst:989 msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" msgstr "" -#: c-api/init_config.rst:369 +#: c-api/init_config.rst:990 msgid "" -"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." -"utf8_mode`)" +"Set the :ref:`Python UTF-8 Mode ` " +"(:c:member:`PyPreConfig.utf8_mode`)" msgstr "" -#: c-api/init_config.rst:372 +#: c-api/init_config.rst:993 msgid "" "The current preconfiguration (``PyPreConfig`` type) is stored in " "``_PyRuntime.preconfig``." msgstr "" -#: c-api/init_config.rst:375 +#: c-api/init_config.rst:996 msgid "Functions to preinitialize Python:" msgstr "" -#: c-api/init_config.rst:385 c-api/init_config.rst:394 +#: c-api/init_config.rst:1006 c-api/init_config.rst:1015 msgid "Preinitialize Python from *preconfig* preconfiguration." msgstr "" -#: c-api/init_config.rst:390 c-api/init_config.rst:399 +#: c-api/init_config.rst:1011 c-api/init_config.rst:1020 msgid "*preconfig* must not be ``NULL``." msgstr "" -#: c-api/init_config.rst:387 +#: c-api/init_config.rst:1008 msgid "" -"Parse *argv* command line arguments (bytes strings) if :c:member:" -"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +"Parse *argv* command line arguments (bytes strings) " +"if :c:member:`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: c-api/init_config.rst:396 +#: c-api/init_config.rst:1017 msgid "" -"Parse *argv* command line arguments (wide strings) if :c:member:" -"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +"Parse *argv* command line arguments (wide strings) " +"if :c:member:`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: c-api/init_config.rst:1359 +#: c-api/init_config.rst:2044 msgid "" -"The caller is responsible to handle exceptions (error or exit) using :c:func:" -"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +"The caller is responsible to handle exceptions (error or exit) " +"using :c:func:`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." msgstr "" -#: c-api/init_config.rst:404 +#: c-api/init_config.rst:1025 msgid "" -"For :ref:`Python Configuration ` (:c:func:" -"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " -"arguments, the command line arguments must also be passed to preinitialize " -"Python, since they have an effect on the pre-configuration like encodings. " -"For example, the :option:`-X utf8 <-X>` command line option enables the :ref:" -"`Python UTF-8 Mode `." +"For :ref:`Python Configuration ` " +"(:c:func:`PyPreConfig_InitPythonConfig`), if Python is initialized with " +"command line arguments, the command line arguments must also be passed to " +"preinitialize Python, since they have an effect on the pre-configuration " +"like encodings. For example, the :option:`-X utf8 <-X>` command line option " +"enables the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/init_config.rst:411 +#: c-api/init_config.rst:1032 msgid "" "``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " "before :c:func:`Py_InitializeFromConfig` to install a custom memory " -"allocator. It can be called before :c:func:`Py_PreInitialize` if :c:member:" -"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." +"allocator. It can be called before :c:func:`Py_PreInitialize` " +"if :c:member:`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" -#: c-api/init_config.rst:416 +#: c-api/init_config.rst:1037 msgid "" "Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " "be used before the Python preinitialization, whereas calling directly " @@ -516,569 +1489,604 @@ msgid "" "not be called before the Python preinitialization." msgstr "" -#: c-api/init_config.rst:421 +#: c-api/init_config.rst:1042 msgid "" "Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " "`::" msgstr "" -#: c-api/init_config.rst:443 +#: c-api/init_config.rst:1064 msgid "PyConfig" msgstr "" -#: c-api/init_config.rst:447 +#: c-api/init_config.rst:1068 msgid "Structure containing most parameters to configure Python." msgstr "" -#: c-api/init_config.rst:449 +#: c-api/init_config.rst:1070 msgid "" "When done, the :c:func:`PyConfig_Clear` function must be used to release the " "configuration memory." msgstr "" -#: c-api/init_config.rst:454 +#: c-api/init_config.rst:1075 msgid "Structure methods:" msgstr "" -#: c-api/init_config.rst:458 +#: c-api/init_config.rst:1079 msgid "" "Initialize configuration with the :ref:`Python Configuration `." msgstr "" -#: c-api/init_config.rst:463 +#: c-api/init_config.rst:1084 msgid "" "Initialize configuration with the :ref:`Isolated Configuration `." msgstr "" -#: c-api/init_config.rst:468 +#: c-api/init_config.rst:1089 msgid "Copy the wide character string *str* into ``*config_str``." msgstr "" -#: c-api/init_config.rst:477 c-api/init_config.rst:492 -#: c-api/init_config.rst:515 +#: c-api/init_config.rst:1098 c-api/init_config.rst:1113 +#: c-api/init_config.rst:1136 msgid ":ref:`Preinitialize Python ` if needed." msgstr "" -#: c-api/init_config.rst:474 +#: c-api/init_config.rst:1095 msgid "" "Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " "``*config_str``." msgstr "" -#: c-api/init_config.rst:481 +#: c-api/init_config.rst:1102 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " "from the *argv* list of wide character strings." msgstr "" -#: c-api/init_config.rst:488 +#: c-api/init_config.rst:1109 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " -"from the *argv* list of bytes strings. Decode bytes using :c:func:" -"`Py_DecodeLocale`." +"from the *argv* list of bytes strings. Decode bytes " +"using :c:func:`Py_DecodeLocale`." msgstr "" -#: c-api/init_config.rst:496 +#: c-api/init_config.rst:1117 msgid "Set the list of wide strings *list* to *length* and *items*." msgstr "" -#: c-api/init_config.rst:502 +#: c-api/init_config.rst:1123 msgid "Read all Python configuration." msgstr "" -#: c-api/init_config.rst:504 +#: c-api/init_config.rst:1125 msgid "Fields which are already initialized are left unchanged." msgstr "" -#: c-api/init_config.rst:506 +#: c-api/init_config.rst:1127 msgid "" "Fields for :ref:`path configuration ` are no longer " "calculated or modified when calling this function, as of Python 3.11." msgstr "" -#: c-api/init_config.rst:1041 +#: c-api/init_config.rst:1692 msgid "" "The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " "arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " -"arguments are parsed. Since Python arguments are stripped from :c:member:" -"`PyConfig.argv`, parsing arguments twice would parse the application options " -"as Python options." +"arguments are parsed. Since Python arguments are stripped " +"from :c:member:`PyConfig.argv`, parsing arguments twice would parse the " +"application options as Python options." msgstr "" -#: c-api/init_config.rst:517 +#: c-api/init_config.rst:1138 msgid "" -"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" -"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " -"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." +"The :c:member:`PyConfig.argv` arguments are now only parsed " +"once, :c:member:`PyConfig.parse_argv` is set to ``2`` after arguments are " +"parsed, and arguments are only parsed if :c:member:`PyConfig.parse_argv` " +"equals ``1``." msgstr "" -#: c-api/init_config.rst:523 +#: c-api/init_config.rst:1144 msgid "" ":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " "under :ref:`Python Path Configuration ` may no longer be " "updated until :c:func:`Py_InitializeFromConfig` is called." msgstr "" -#: c-api/init_config.rst:531 +#: c-api/init_config.rst:1152 msgid "Release configuration memory." msgstr "" -#: c-api/init_config.rst:533 +#: c-api/init_config.rst:1154 msgid "" "Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " -"In that case, the Python preinitialization configuration (:c:type:" -"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " -"which are in common with :c:type:`PyPreConfig` are tuned, they must be set " -"before calling a :c:type:`PyConfig` method:" +"In that case, the Python preinitialization configuration " +"(:c:type:`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration " +"fields which are in common with :c:type:`PyPreConfig` are tuned, they must " +"be set before calling a :c:type:`PyConfig` method:" msgstr "" -#: c-api/init_config.rst:539 +#: c-api/init_config.rst:1160 msgid ":c:member:`PyConfig.dev_mode`" msgstr "" -#: c-api/init_config.rst:540 +#: c-api/init_config.rst:1161 msgid ":c:member:`PyConfig.isolated`" msgstr "" -#: c-api/init_config.rst:541 +#: c-api/init_config.rst:1162 msgid ":c:member:`PyConfig.parse_argv`" msgstr "" -#: c-api/init_config.rst:542 +#: c-api/init_config.rst:1163 msgid ":c:member:`PyConfig.use_environment`" msgstr "" -#: c-api/init_config.rst:544 +#: c-api/init_config.rst:1165 msgid "" "Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " "is used, this method must be called before other methods, since the " -"preinitialization configuration depends on command line arguments (if :c:" -"member:`~PyConfig.parse_argv` is non-zero)." +"preinitialization configuration depends on command line arguments " +"(if :c:member:`~PyConfig.parse_argv` is non-zero)." msgstr "" -#: c-api/init_config.rst:549 +#: c-api/init_config.rst:1170 msgid "" "The caller of these methods is responsible to handle exceptions (error or " "exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." msgstr "" -#: c-api/init_config.rst:562 +#: c-api/init_config.rst:1183 msgid "" -"Set :data:`sys.argv` command line arguments based on :c:member:`~PyConfig." -"argv`. These parameters are similar to those passed to the program's :c:" -"func:`main` function with the difference that the first entry should refer " -"to the script file to be executed rather than the executable hosting the " -"Python interpreter. If there isn't a script that will be run, the first " -"entry in :c:member:`~PyConfig.argv` can be an empty string." +"Set :data:`sys.argv` command line arguments based " +"on :c:member:`~PyConfig.argv`. These parameters are similar to those passed " +"to the program's :c:func:`main` function with the difference that the first " +"entry should refer to the script file to be executed rather than the " +"executable hosting the Python interpreter. If there isn't a script that " +"will be run, the first entry in :c:member:`~PyConfig.argv` can be an empty " +"string." msgstr "" -#: c-api/init_config.rst:570 +#: c-api/init_config.rst:1191 msgid "" -"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." -"argv` the same way the regular Python parses Python command line arguments " -"and then to strip Python arguments from :c:member:`~PyConfig.argv`." +"Set :c:member:`~PyConfig.parse_argv` to ``1`` to " +"parse :c:member:`~PyConfig.argv` the same way the regular Python parses " +"Python command line arguments and then to strip Python arguments " +"from :c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:575 +#: c-api/init_config.rst:1196 msgid "" "If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " "that :data:`sys.argv` always exists and is never empty." msgstr "" -#: c-api/init_config.rst:605 c-api/init_config.rst:629 -#: c-api/init_config.rst:750 c-api/init_config.rst:982 -#: c-api/init_config.rst:1102 c-api/init_config.rst:1134 -#: c-api/init_config.rst:1155 c-api/init_config.rst:1169 +#: c-api/init_config.rst:1226 c-api/init_config.rst:1250 +#: c-api/init_config.rst:1375 c-api/init_config.rst:1477 +#: c-api/init_config.rst:1734 c-api/init_config.rst:1768 +#: c-api/init_config.rst:1798 c-api/init_config.rst:1820 +#: c-api/init_config.rst:1923 msgid "Default: ``NULL``." msgstr "" -#: c-api/init_config.rst:580 +#: c-api/init_config.rst:1201 msgid "See also the :c:member:`~PyConfig.orig_argv` member." msgstr "" -#: c-api/init_config.rst:584 +#: c-api/init_config.rst:1205 msgid "" -"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" -"data:`sys.path` at startup:" +"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path " +"to :data:`sys.path` at startup:" msgstr "" -#: c-api/init_config.rst:587 +#: c-api/init_config.rst:1208 msgid "" "If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " "module``), prepend the current working directory." msgstr "" -#: c-api/init_config.rst:589 +#: c-api/init_config.rst:1210 msgid "" "If running a script (``python script.py``), prepend the script's directory. " "If it's a symbolic link, resolve symbolic links." msgstr "" -#: c-api/init_config.rst:591 +#: c-api/init_config.rst:1212 msgid "" "Otherwise (``python -c code`` and ``python``), prepend an empty string, " "which means the current working directory." msgstr "" -#: c-api/init_config.rst:594 +#: c-api/init_config.rst:1215 msgid "" -"Set to ``1`` by the :option:`-P` command line option and the :envvar:" -"`PYTHONSAFEPATH` environment variable." +"Set to ``1`` by the :option:`-P` command line option and " +"the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" -#: c-api/init_config.rst:597 +#: c-api/init_config.rst:1218 msgid "Default: ``0`` in Python config, ``1`` in isolated config." msgstr "" -#: c-api/init_config.rst:603 +#: c-api/init_config.rst:1224 msgid ":data:`sys.base_exec_prefix`." msgstr "" -#: c-api/init_config.rst:621 c-api/init_config.rst:741 -#: c-api/init_config.rst:999 c-api/init_config.rst:1085 +#: c-api/init_config.rst:1242 c-api/init_config.rst:1377 +#: c-api/init_config.rst:1650 c-api/init_config.rst:1736 msgid "Part of the :ref:`Python Path Configuration ` output." msgstr "" -#: c-api/init_config.rst:609 +#: c-api/init_config.rst:1230 msgid "See also :c:member:`PyConfig.exec_prefix`." msgstr "" -#: c-api/init_config.rst:613 +#: c-api/init_config.rst:1234 msgid "Python base executable: :data:`sys._base_executable`." msgstr "" -#: c-api/init_config.rst:615 +#: c-api/init_config.rst:1236 msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." msgstr "" -#: c-api/init_config.rst:617 +#: c-api/init_config.rst:1238 msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." msgstr "" -#: c-api/init_config.rst:623 +#: c-api/init_config.rst:1244 msgid "See also :c:member:`PyConfig.executable`." msgstr "" -#: c-api/init_config.rst:627 +#: c-api/init_config.rst:1248 msgid ":data:`sys.base_prefix`." msgstr "" -#: c-api/init_config.rst:633 +#: c-api/init_config.rst:1254 msgid "See also :c:member:`PyConfig.prefix`." msgstr "" -#: c-api/init_config.rst:637 +#: c-api/init_config.rst:1258 msgid "" "If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " "disable buffering on the C streams stdout and stderr." msgstr "" -#: c-api/init_config.rst:640 +#: c-api/init_config.rst:1261 msgid "" -"Set to ``0`` by the :option:`-u` command line option and the :envvar:" -"`PYTHONUNBUFFERED` environment variable." +"Set to ``0`` by the :option:`-u` command line option and " +"the :envvar:`PYTHONUNBUFFERED` environment variable." msgstr "" -#: c-api/init_config.rst:643 +#: c-api/init_config.rst:1264 msgid "stdin is always opened in buffered mode." msgstr "" -#: c-api/init_config.rst:678 c-api/init_config.rst:1330 -msgid "Default: ``1``." -msgstr "" - -#: c-api/init_config.rst:649 +#: c-api/init_config.rst:1270 msgid "" -"If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:" -"`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." +"If equals to ``1``, issue a warning when comparing :class:`bytes` " +"or :class:`bytearray` with :class:`str`, or comparing :class:`bytes` " +"with :class:`int`." msgstr "" -#: c-api/init_config.rst:653 +#: c-api/init_config.rst:1274 msgid "" "If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " "cases." msgstr "" -#: c-api/init_config.rst:656 +#: c-api/init_config.rst:1277 msgid "Incremented by the :option:`-b` command line option." msgstr "" -#: c-api/init_config.rst:662 +#: c-api/init_config.rst:1283 +msgid "" +"The :option:`-b` and :option:`!-bb` options will become no-op in " +"3.17. :c:member:`~PyConfig.bytes_warning` member will be removed in 3.17." +msgstr "" + +#: c-api/init_config.rst:1288 msgid "" -"If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." -"TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " -"details." +"If non-zero, emit a :exc:`EncodingWarning` warning " +"when :class:`io.TextIOWrapper` uses its default encoding. See :ref:`io-" +"encoding-warning` for details." msgstr "" -#: c-api/init_config.rst:671 +#: c-api/init_config.rst:1297 msgid "" "If equals to ``0``, disables the inclusion of the end line and column " "mappings in code objects. Also disables traceback printing carets to " "specific error locations." msgstr "" -#: c-api/init_config.rst:675 +#: c-api/init_config.rst:1301 msgid "" "Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " "by the :option:`-X no_debug_ranges <-X>` command line option." msgstr "" -#: c-api/init_config.rst:684 +#: c-api/init_config.rst:1310 msgid "" -"Control the validation behavior of hash-based ``.pyc`` files: value of the :" -"option:`--check-hash-based-pycs` command line option." +"Control the validation behavior of hash-based ``.pyc`` files: value of " +"the :option:`--check-hash-based-pycs` command line option." msgstr "" -#: c-api/init_config.rst:687 +#: c-api/init_config.rst:1313 msgid "Valid values:" msgstr "" -#: c-api/init_config.rst:689 +#: c-api/init_config.rst:1315 msgid "" "``L\"always\"``: Hash the source file for invalidation regardless of value " "of the 'check_source' flag." msgstr "" -#: c-api/init_config.rst:691 +#: c-api/init_config.rst:1317 msgid "``L\"never\"``: Assume that hash-based pycs always are valid." msgstr "" -#: c-api/init_config.rst:692 +#: c-api/init_config.rst:1318 msgid "" "``L\"default\"``: The 'check_source' flag in hash-based pycs determines " "invalidation." msgstr "" -#: c-api/init_config.rst:695 +#: c-api/init_config.rst:1321 msgid "Default: ``L\"default\"``." msgstr "" -#: c-api/init_config.rst:697 +#: c-api/init_config.rst:1323 msgid "See also :pep:`552` \"Deterministic pycs\"." msgstr "" -#: c-api/init_config.rst:701 +#: c-api/init_config.rst:1327 msgid "If non-zero, configure C standard streams:" msgstr "" -#: c-api/init_config.rst:703 +#: c-api/init_config.rst:1329 msgid "" "On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." msgstr "" -#: c-api/init_config.rst:705 +#: c-api/init_config.rst:1331 msgid "" "If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " "stdin, stdout and stderr streams." msgstr "" -#: c-api/init_config.rst:707 +#: c-api/init_config.rst:1333 msgid "" "If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " "stdin and stdout (only stdout on Windows)." msgstr "" -#: c-api/init_config.rst:714 +#: c-api/init_config.rst:1340 msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" -#: c-api/init_config.rst:716 +#: c-api/init_config.rst:1342 msgid "" -"Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" -"`PYTHONDEVMODE` environment variable." +"Set to ``1`` by the :option:`-X dev <-X>` option and " +"the :envvar:`PYTHONDEVMODE` environment variable." msgstr "" -#: c-api/init_config.rst:723 +#: c-api/init_config.rst:1349 msgid "Dump Python references?" msgstr "" -#: c-api/init_config.rst:725 +#: c-api/init_config.rst:1351 msgid "If non-zero, dump all objects which are still alive at exit." msgstr "" -#: c-api/init_config.rst:727 +#: c-api/init_config.rst:1353 msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: c-api/init_config.rst:729 +#: c-api/init_config.rst:1355 msgid "" "Needs a special build of Python with the ``Py_TRACE_REFS`` macro defined: " "see the :option:`configure --with-trace-refs option <--with-trace-refs>`." msgstr "" -#: c-api/init_config.rst:736 +#: c-api/init_config.rst:1362 +msgid "Filename where to dump Python references." +msgstr "" + +#: c-api/init_config.rst:1364 +msgid "Set by the :envvar:`PYTHONDUMPREFSFILE` environment variable." +msgstr "" + +#: c-api/init_config.rst:1372 msgid "" "The site-specific directory prefix where the platform-dependent Python files " "are installed: :data:`sys.exec_prefix`." msgstr "" -#: c-api/init_config.rst:743 +#: c-api/init_config.rst:1379 msgid "See also :c:member:`PyConfig.base_exec_prefix`." msgstr "" -#: c-api/init_config.rst:747 +#: c-api/init_config.rst:1383 msgid "" -"The absolute path of the executable binary for the Python interpreter: :data:" -"`sys.executable`." +"The absolute path of the executable binary for the Python " +"interpreter: :data:`sys.executable`." msgstr "" -#: c-api/init_config.rst:754 +#: c-api/init_config.rst:1390 msgid "See also :c:member:`PyConfig.base_executable`." msgstr "" -#: c-api/init_config.rst:758 +#: c-api/init_config.rst:1394 msgid "Enable faulthandler?" msgstr "" -#: c-api/init_config.rst:760 +#: c-api/init_config.rst:1396 msgid "If non-zero, call :func:`faulthandler.enable` at startup." msgstr "" -#: c-api/init_config.rst:762 +#: c-api/init_config.rst:1398 msgid "" -"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" -"`PYTHONFAULTHANDLER` environment variable." +"Set to ``1`` by :option:`-X faulthandler <-X>` and " +"the :envvar:`PYTHONFAULTHANDLER` environment variable." msgstr "" -#: c-api/init_config.rst:769 +#: c-api/init_config.rst:1405 msgid "" -":term:`Filesystem encoding `: :func:" -"`sys.getfilesystemencoding`." +":term:`Filesystem encoding `: :func:`sys.getfilesystemencoding`." msgstr "" -#: c-api/init_config.rst:772 +#: c-api/init_config.rst:1408 msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." msgstr "" -#: c-api/init_config.rst:774 +#: c-api/init_config.rst:1410 msgid "" -"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" -"`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" -"zero." +"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` " +"if :c:member:`~PyPreConfig.legacy_windows_fs_encoding` " +"of :c:type:`PyPreConfig` is non-zero." msgstr "" -#: c-api/init_config.rst:778 +#: c-api/init_config.rst:1414 msgid "Default encoding on other platforms:" msgstr "" -#: c-api/init_config.rst:780 +#: c-api/init_config.rst:1416 msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:781 +#: c-api/init_config.rst:1417 msgid "" "``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " "ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " "encoding (usually Latin1)." msgstr "" -#: c-api/init_config.rst:784 +#: c-api/init_config.rst:1420 msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" -#: c-api/init_config.rst:785 +#: c-api/init_config.rst:1421 msgid "" "Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" -#: c-api/init_config.rst:788 +#: c-api/init_config.rst:1424 msgid "" "At Python startup, the encoding name is normalized to the Python codec name. " "For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." msgstr "" -#: c-api/init_config.rst:791 +#: c-api/init_config.rst:1427 msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" -#: c-api/init_config.rst:795 +#: c-api/init_config.rst:1431 msgid "" -":term:`Filesystem error handler `: :" -"func:`sys.getfilesystemencodeerrors`." +":term:`Filesystem error handler `: :func:`sys.getfilesystemencodeerrors`." msgstr "" -#: c-api/init_config.rst:798 +#: c-api/init_config.rst:1434 msgid "" -"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" -"member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " -"non-zero." +"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` " +"if :c:member:`~PyPreConfig.legacy_windows_fs_encoding` " +"of :c:type:`PyPreConfig` is non-zero." msgstr "" -#: c-api/init_config.rst:802 +#: c-api/init_config.rst:1438 msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" -#: c-api/init_config.rst:804 +#: c-api/init_config.rst:1440 msgid "Supported error handlers:" msgstr "" -#: c-api/init_config.rst:806 +#: c-api/init_config.rst:1442 msgid "``\"strict\"``" msgstr "" -#: c-api/init_config.rst:807 +#: c-api/init_config.rst:1443 msgid "``\"surrogateescape\"``" msgstr "" -#: c-api/init_config.rst:808 +#: c-api/init_config.rst:1444 msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" -#: c-api/init_config.rst:810 +#: c-api/init_config.rst:1446 msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" -#: c-api/init_config.rst:815 +#: c-api/init_config.rst:1450 +msgid "If non-zero, use frozen modules." +msgstr "" + +#: c-api/init_config.rst:1452 +msgid "Set by the :envvar:`PYTHON_FROZEN_MODULES` environment variable." +msgstr "" + +#: c-api/init_config.rst:1454 +msgid "" +"Default: ``1`` in a release build, or ``0`` in a :ref:`debug build `." +msgstr "" + +#: c-api/init_config.rst:1460 msgid "Randomized hash function seed." msgstr "" -#: c-api/init_config.rst:817 +#: c-api/init_config.rst:1462 msgid "" "If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " "Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." msgstr "" -#: c-api/init_config.rst:820 +#: c-api/init_config.rst:1465 msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" -#: c-api/init_config.rst:822 +#: c-api/init_config.rst:1467 msgid "" "Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:827 +#: c-api/init_config.rst:1472 msgid "" "Set the default Python \"home\" directory, that is, the location of the " "standard Python libraries (see :envvar:`PYTHONHOME`)." msgstr "" -#: c-api/init_config.rst:830 +#: c-api/init_config.rst:1475 msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" -#: c-api/init_config.rst:964 c-api/init_config.rst:1073 -#: c-api/init_config.rst:1104 +#: c-api/init_config.rst:1615 c-api/init_config.rst:1724 +#: c-api/init_config.rst:1755 msgid "Part of the :ref:`Python Path Configuration ` input." msgstr "" -#: c-api/init_config.rst:838 -msgid "If non-zero, profile import time." +#: c-api/init_config.rst:1483 +msgid "" +"If ``1``, profile import time. If ``2``, include additional output that " +"indicates when an imported module has already been loaded." msgstr "" -#: c-api/init_config.rst:840 +#: c-api/init_config.rst:1487 msgid "" -"Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:" -"`PYTHONPROFILEIMPORTTIME` environment variable." +"Set by the :option:`-X importtime <-X>` option and " +"the :envvar:`PYTHONPROFILEIMPORTTIME` environment variable." +msgstr "" + +#: c-api/init_config.rst:1494 +msgid "Added support for ``import_time = 2``" msgstr "" -#: c-api/init_config.rst:847 +#: c-api/init_config.rst:1498 msgid "Enter interactive mode after executing a script or a command." msgstr "" -#: c-api/init_config.rst:849 +#: c-api/init_config.rst:1500 msgid "" "If greater than ``0``, enable inspect: when a script is passed as first " "argument or the -c option is used, enter interactive mode after executing " @@ -1086,155 +2094,157 @@ msgid "" "a terminal." msgstr "" -#: c-api/init_config.rst:854 +#: c-api/init_config.rst:1505 msgid "" -"Incremented by the :option:`-i` command line option. Set to ``1`` if the :" -"envvar:`PYTHONINSPECT` environment variable is non-empty." +"Incremented by the :option:`-i` command line option. Set to ``1`` if " +"the :envvar:`PYTHONINSPECT` environment variable is non-empty." msgstr "" -#: c-api/init_config.rst:861 +#: c-api/init_config.rst:1512 msgid "Install Python signal handlers?" msgstr "" -#: c-api/init_config.rst:1047 c-api/init_config.rst:1282 +#: c-api/init_config.rst:1698 c-api/init_config.rst:1958 msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:867 +#: c-api/init_config.rst:1518 msgid "If greater than ``0``, enable the interactive mode (REPL)." msgstr "" -#: c-api/init_config.rst:869 +#: c-api/init_config.rst:1520 msgid "Incremented by the :option:`-i` command line option." msgstr "" -#: c-api/init_config.rst:875 +#: c-api/init_config.rst:1526 msgid "" "Configures the :ref:`integer string conversion length limitation " "`. An initial value of ``-1`` means the value will be " -"taken from the command line or environment or otherwise default to 4300 (:" -"data:`sys.int_info.default_max_str_digits`). A value of ``0`` disables the " -"limitation. Values greater than zero but less than 640 (:data:`sys.int_info." -"str_digits_check_threshold`) are unsupported and will produce an error." +"taken from the command line or environment or otherwise default to 4300 " +"(:data:`sys.int_info.default_max_str_digits`). A value of ``0`` disables " +"the limitation. Values greater than zero but less than 640 " +"(:data:`sys.int_info.str_digits_check_threshold`) are unsupported and will " +"produce an error." msgstr "" -#: c-api/init_config.rst:883 +#: c-api/init_config.rst:1534 msgid "" "Configured by the :option:`-X int_max_str_digits <-X>` command line flag or " "the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable." msgstr "" -#: c-api/init_config.rst:886 +#: c-api/init_config.rst:1537 msgid "" -"Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info." -"default_max_str_digits`) in isolated mode." +"Default: ``-1`` in Python mode. 4300 " +"(:data:`sys.int_info.default_max_str_digits`) in isolated mode." msgstr "" -#: c-api/init_config.rst:893 +#: c-api/init_config.rst:1544 msgid "" "If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will " -"override the return values of :func:`os.cpu_count`, :func:`os." -"process_cpu_count`, and :func:`multiprocessing.cpu_count`." +"override the return values " +"of :func:`os.cpu_count`, :func:`os.process_cpu_count`, " +"and :func:`multiprocessing.cpu_count`." msgstr "" -#: c-api/init_config.rst:897 +#: c-api/init_config.rst:1548 msgid "" -"Configured by the :samp:`-X cpu_count={n|default}` command line flag or the :" -"envvar:`PYTHON_CPU_COUNT` environment variable." +"Configured by the :samp:`-X cpu_count={n|default}` command line flag or " +"the :envvar:`PYTHON_CPU_COUNT` environment variable." msgstr "" -#: c-api/init_config.rst:1259 +#: c-api/init_config.rst:1912 msgid "Default: ``-1``." msgstr "" -#: c-api/init_config.rst:906 +#: c-api/init_config.rst:1557 msgid "If greater than ``0``, enable isolated mode:" msgstr "" -#: c-api/init_config.rst:908 +#: c-api/init_config.rst:1559 msgid "" "Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " "unsafe path to :data:`sys.path` at Python startup, such as the current " "directory, the script's directory or an empty string." msgstr "" -#: c-api/init_config.rst:912 +#: c-api/init_config.rst:1563 msgid "" "Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` " "environment variables." msgstr "" -#: c-api/init_config.rst:914 +#: c-api/init_config.rst:1565 msgid "" "Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " "site directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:916 +#: c-api/init_config.rst:1567 msgid "" "Python REPL doesn't import :mod:`readline` nor enable default readline " "configuration on interactive prompts." msgstr "" -#: c-api/init_config.rst:919 +#: c-api/init_config.rst:1570 msgid "Set to ``1`` by the :option:`-I` command line option." msgstr "" -#: c-api/init_config.rst:923 +#: c-api/init_config.rst:1574 msgid "" -"See also the :ref:`Isolated Configuration ` and :c:" -"member:`PyPreConfig.isolated`." +"See also the :ref:`Isolated Configuration ` " +"and :c:member:`PyPreConfig.isolated`." msgstr "" -#: c-api/init_config.rst:928 +#: c-api/init_config.rst:1579 msgid "" -"If non-zero, use :class:`io.FileIO` instead of :class:`!io." -"_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys." -"stderr`." +"If non-zero, use :class:`io.FileIO` instead of :class:`!" +"io._WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` " +"and :data:`sys.stderr`." msgstr "" -#: c-api/init_config.rst:932 +#: c-api/init_config.rst:1583 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " "is set to a non-empty string." msgstr "" -#: c-api/init_config.rst:940 +#: c-api/init_config.rst:1591 msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." msgstr "" -#: c-api/init_config.rst:944 +#: c-api/init_config.rst:1595 msgid "" "If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " "` at exit." msgstr "" -#: c-api/init_config.rst:947 +#: c-api/init_config.rst:1598 msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" -#: c-api/init_config.rst:949 +#: c-api/init_config.rst:1600 msgid "" "The option is ignored if Python is :option:`configured using the --without-" "pymalloc option <--without-pymalloc>`." msgstr "" -#: c-api/init_config.rst:956 +#: c-api/init_config.rst:1607 msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" -#: c-api/init_config.rst:958 +#: c-api/init_config.rst:1609 msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" -#: c-api/init_config.rst:960 +#: c-api/init_config.rst:1611 msgid "" -"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" -"`configure --with-platlibdir option <--with-platlibdir>` (default: " -"``\"lib\"``, or ``\"DLLs\"`` on Windows)." +"Default: value of the ``PLATLIBDIR`` macro which is set by " +"the :option:`configure --with-platlibdir option <--with-platlibdir>` " +"(default: ``\"lib\"``, or ``\"DLLs\"`` on Windows)." msgstr "" -#: c-api/init_config.rst:968 +#: c-api/init_config.rst:1619 msgid "" "This macro is now used on Windows to locate the standard library extension " "modules, typically under ``DLLs``. However, for compatibility, note that " @@ -1242,511 +2252,554 @@ msgid "" "and virtual environments." msgstr "" -#: c-api/init_config.rst:977 +#: c-api/init_config.rst:1628 msgid "" -"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" -"data:`os.pathsep`)." +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` " +"(:data:`os.pathsep`)." msgstr "" -#: c-api/init_config.rst:980 +#: c-api/init_config.rst:1631 msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" -#: c-api/init_config.rst:989 +#: c-api/init_config.rst:1640 msgid "Module search paths: :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:991 +#: c-api/init_config.rst:1642 msgid "" -"If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" -"`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." -"module_search_paths` and sets :c:member:`~PyConfig.module_search_paths_set` " -"to ``1``." +"If :c:member:`~PyConfig.module_search_paths_set` is equal to " +"``0``, :c:func:`Py_InitializeFromConfig` will " +"replace :c:member:`~PyConfig.module_search_paths` and " +"sets :c:member:`~PyConfig.module_search_paths_set` to ``1``." msgstr "" -#: c-api/init_config.rst:996 +#: c-api/init_config.rst:1647 msgid "" "Default: empty list (``module_search_paths``) and ``0`` " "(``module_search_paths_set``)." msgstr "" -#: c-api/init_config.rst:1003 +#: c-api/init_config.rst:1654 msgid "Compilation optimization level:" msgstr "" -#: c-api/init_config.rst:1005 +#: c-api/init_config.rst:1656 msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" -#: c-api/init_config.rst:1006 +#: c-api/init_config.rst:1657 msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" -#: c-api/init_config.rst:1007 +#: c-api/init_config.rst:1658 msgid "``2``: Level 1, strip docstrings." msgstr "" -#: c-api/init_config.rst:1009 +#: c-api/init_config.rst:1660 msgid "" -"Incremented by the :option:`-O` command line option. Set to the :envvar:" -"`PYTHONOPTIMIZE` environment variable value." +"Incremented by the :option:`-O` command line option. Set to " +"the :envvar:`PYTHONOPTIMIZE` environment variable value." msgstr "" -#: c-api/init_config.rst:1016 +#: c-api/init_config.rst:1667 msgid "" "The list of the original command line arguments passed to the Python " "executable: :data:`sys.orig_argv`." msgstr "" -#: c-api/init_config.rst:1019 +#: c-api/init_config.rst:1670 msgid "" -"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." -"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " -"copies :c:member:`~PyConfig.argv` into :c:member:`~PyConfig.orig_argv` " -"before modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig." -"parse_argv` is non-zero)." +"If :c:member:`~PyConfig.orig_argv` list is empty " +"and :c:member:`~PyConfig.argv` is not a list only containing an empty " +"string, :c:func:`PyConfig_Read` copies :c:member:`~PyConfig.argv` " +"into :c:member:`~PyConfig.orig_argv` before " +"modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig.parse_argv` is " +"non-zero)." msgstr "" -#: c-api/init_config.rst:1026 +#: c-api/init_config.rst:1677 msgid "" -"See also the :c:member:`~PyConfig.argv` member and the :c:func:" -"`Py_GetArgcArgv` function." +"See also the :c:member:`~PyConfig.argv` member and " +"the :c:func:`Py_GetArgcArgv` function." msgstr "" -#: c-api/init_config.rst:1317 c-api/init_config.rst:1336 +#: c-api/init_config.rst:1993 c-api/init_config.rst:2012 msgid "Default: empty list." msgstr "" -#: c-api/init_config.rst:1035 +#: c-api/init_config.rst:1686 msgid "Parse command line arguments?" msgstr "" -#: c-api/init_config.rst:1037 +#: c-api/init_config.rst:1688 msgid "" "If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " "regular Python parses :ref:`command line arguments `, and " "strip Python arguments from :c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:1049 +#: c-api/init_config.rst:1700 msgid "" -"The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" -"`PyConfig.parse_argv` equals to ``1``." +"The :c:member:`PyConfig.argv` arguments are now only parsed " +"if :c:member:`PyConfig.parse_argv` equals to ``1``." msgstr "" -#: c-api/init_config.rst:1055 +#: c-api/init_config.rst:1706 msgid "" "Parser debug mode. If greater than ``0``, turn on parser debugging output " "(for expert only, depending on compilation options)." msgstr "" -#: c-api/init_config.rst:1058 +#: c-api/init_config.rst:1709 msgid "" -"Incremented by the :option:`-d` command line option. Set to the :envvar:" -"`PYTHONDEBUG` environment variable value." +"Incremented by the :option:`-d` command line option. Set to " +"the :envvar:`PYTHONDEBUG` environment variable value." msgstr "" -#: c-api/init_config.rst:1166 +#: c-api/init_config.rst:1817 msgid "" "Needs a :ref:`debug build of Python ` (the ``Py_DEBUG`` macro " "must be defined)." msgstr "" -#: c-api/init_config.rst:1068 +#: c-api/init_config.rst:1719 msgid "" "If non-zero, calculation of path configuration is allowed to log warnings " "into ``stderr``. If equals to ``0``, suppress these warnings." msgstr "" -#: c-api/init_config.rst:1075 +#: c-api/init_config.rst:1726 msgid "Now also applies on Windows." msgstr "" -#: c-api/init_config.rst:1080 +#: c-api/init_config.rst:1731 msgid "" "The site-specific directory prefix where the platform independent Python " "files are installed: :data:`sys.prefix`." msgstr "" -#: c-api/init_config.rst:1087 +#: c-api/init_config.rst:1738 msgid "See also :c:member:`PyConfig.base_prefix`." msgstr "" -#: c-api/init_config.rst:1091 +#: c-api/init_config.rst:1742 msgid "" "Program name used to initialize :c:member:`~PyConfig.executable` and in " "early error messages during Python initialization." msgstr "" -#: c-api/init_config.rst:1094 +#: c-api/init_config.rst:1745 msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" -#: c-api/init_config.rst:1095 +#: c-api/init_config.rst:1746 msgid "" -"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" -"`__PYVENV_LAUNCHER__` environment variable if set." +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, " +"use :envvar:`__PYVENV_LAUNCHER__` environment variable if set." msgstr "" -#: c-api/init_config.rst:1097 +#: c-api/init_config.rst:1748 msgid "" "Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." msgstr "" -#: c-api/init_config.rst:1099 +#: c-api/init_config.rst:1750 msgid "" "Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " "platforms." msgstr "" -#: c-api/init_config.rst:1108 +#: c-api/init_config.rst:1759 msgid "" -"Directory where cached ``.pyc`` files are written: :data:`sys." -"pycache_prefix`." +"Directory where cached ``.pyc`` files are " +"written: :data:`sys.pycache_prefix`." msgstr "" -#: c-api/init_config.rst:1111 +#: c-api/init_config.rst:1762 msgid "" "Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " "the :envvar:`PYTHONPYCACHEPREFIX` environment variable. The command-line " "option takes precedence." msgstr "" -#: c-api/init_config.rst:1115 +#: c-api/init_config.rst:1766 msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" -#: c-api/init_config.rst:1121 +#: c-api/init_config.rst:1772 msgid "" "Quiet mode. If greater than ``0``, don't display the copyright and version " "at Python startup in interactive mode." msgstr "" -#: c-api/init_config.rst:1124 +#: c-api/init_config.rst:1775 msgid "Incremented by the :option:`-q` command line option." msgstr "" -#: c-api/init_config.rst:1130 +#: c-api/init_config.rst:1781 msgid "Value of the :option:`-c` command line option." msgstr "" -#: c-api/init_config.rst:1153 +#: c-api/init_config.rst:1804 msgid "Used by :c:func:`Py_RunMain`." msgstr "" -#: c-api/init_config.rst:1138 +#: c-api/init_config.rst:1789 msgid "" -"Filename passed on the command line: trailing command line argument without :" -"option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` function." +"Filename passed on the command line: trailing command line argument " +"without :option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` " +"function." msgstr "" -#: c-api/init_config.rst:1142 +#: c-api/init_config.rst:1793 msgid "" "For example, it is set to ``script.py`` by the ``python3 script.py arg`` " "command line." msgstr "" -#: c-api/init_config.rst:1145 +#: c-api/init_config.rst:1796 msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." msgstr "" -#: c-api/init_config.rst:1151 +#: c-api/init_config.rst:1802 msgid "Value of the :option:`-m` command line option." msgstr "" -#: c-api/init_config.rst:1159 +#: c-api/init_config.rst:1810 msgid "" -"``package.module`` path to module that should be imported before ``site.py`` " -"is run." +"``module`` or ``module:func`` entry point that should be executed before " +"the :mod:`site` module is imported." msgstr "" -#: c-api/init_config.rst:1162 +#: c-api/init_config.rst:1813 msgid "" -"Set by the :option:`-X presite=package.module <-X>` command-line option and " +"Set by the :option:`-X presite=module:func <-X>` command-line option and " "the :envvar:`PYTHON_PRESITE` environment variable. The command-line option " "takes precedence." msgstr "" -#: c-api/init_config.rst:1173 +#: c-api/init_config.rst:1824 msgid "" "Show total reference count at exit (excluding :term:`immortal` objects)?" msgstr "" -#: c-api/init_config.rst:1175 +#: c-api/init_config.rst:1826 msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." msgstr "" -#: c-api/init_config.rst:1177 +#: c-api/init_config.rst:1828 msgid "" "Needs a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " "macro must be defined)." msgstr "" -#: c-api/init_config.rst:1184 +#: c-api/init_config.rst:1835 msgid "Import the :mod:`site` module at startup?" msgstr "" -#: c-api/init_config.rst:1186 +#: c-api/init_config.rst:1837 msgid "" "If equal to zero, disable the import of the module site and the site-" "dependent manipulations of :data:`sys.path` that it entails." msgstr "" -#: c-api/init_config.rst:1189 +#: c-api/init_config.rst:1840 msgid "" "Also disable these manipulations if the :mod:`site` module is explicitly " "imported later (call :func:`site.main` if you want them to be triggered)." msgstr "" -#: c-api/init_config.rst:1192 +#: c-api/init_config.rst:1843 msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" -#: c-api/init_config.rst:1194 +#: c-api/init_config.rst:1845 msgid "" -":data:`sys.flags.no_site ` is set to the inverted value of :c:" -"member:`~PyConfig.site_import`." +":data:`sys.flags.no_site ` is set to the inverted value " +"of :c:member:`~PyConfig.site_import`." msgstr "" -#: c-api/init_config.rst:1201 +#: c-api/init_config.rst:1852 msgid "" "If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " "source." msgstr "" -#: c-api/init_config.rst:1204 +#: c-api/init_config.rst:1855 msgid "" "It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " "DOS specific hack only." msgstr "" -#: c-api/init_config.rst:1207 +#: c-api/init_config.rst:1858 msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" -#: c-api/init_config.rst:1214 +#: c-api/init_config.rst:1865 msgid "" -"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" -"data:`sys.stderr` (but :data:`sys.stderr` always uses " +"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` " +"and :data:`sys.stderr` (but :data:`sys.stderr` always uses " "``\"backslashreplace\"`` error handler)." msgstr "" -#: c-api/init_config.rst:1218 +#: c-api/init_config.rst:1869 msgid "" "Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" -#: c-api/init_config.rst:1221 +#: c-api/init_config.rst:1872 msgid "Default encoding:" msgstr "" -#: c-api/init_config.rst:1223 +#: c-api/init_config.rst:1874 msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:1224 +#: c-api/init_config.rst:1875 msgid "Otherwise, use the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:1226 +#: c-api/init_config.rst:1877 msgid "Default error handler:" msgstr "" -#: c-api/init_config.rst:1228 +#: c-api/init_config.rst:1879 msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" -#: c-api/init_config.rst:1229 +#: c-api/init_config.rst:1880 msgid "" "``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " "if the LC_CTYPE locale is \"C\" or \"POSIX\"." msgstr "" -#: c-api/init_config.rst:1231 +#: c-api/init_config.rst:1882 msgid "``\"strict\"`` otherwise." msgstr "" -#: c-api/init_config.rst:1233 +#: c-api/init_config.rst:1884 msgid "See also :c:member:`PyConfig.legacy_windows_stdio`." msgstr "" -#: c-api/init_config.rst:1237 +#: c-api/init_config.rst:1888 msgid "Enable tracemalloc?" msgstr "" -#: c-api/init_config.rst:1239 +#: c-api/init_config.rst:1890 msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" -#: c-api/init_config.rst:1241 +#: c-api/init_config.rst:1892 msgid "" -"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" -"envvar:`PYTHONTRACEMALLOC` environment variable." +"Set by :option:`-X tracemalloc=N <-X>` command line option and by " +"the :envvar:`PYTHONTRACEMALLOC` environment variable." msgstr "" -#: c-api/init_config.rst:1248 -msgid "Enable compatibility mode with the perf profiler?" +#: c-api/init_config.rst:1899 +msgid "Enable the Linux ``perf`` profiler support?" +msgstr "" + +#: c-api/init_config.rst:1901 +msgid "If equals to ``1``, enable support for the Linux ``perf`` profiler." msgstr "" -#: c-api/init_config.rst:1250 +#: c-api/init_config.rst:1903 msgid "" -"If non-zero, initialize the perf trampoline. See :ref:`perf_profiling` for " -"more information." +"If equals to ``2``, enable support for the Linux ``perf`` profiler with " +"DWARF JIT support." msgstr "" -#: c-api/init_config.rst:1253 +#: c-api/init_config.rst:1906 msgid "" -"Set by :option:`-X perf <-X>` command-line option and by the :envvar:" -"`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support with stack " -"pointers and :option:`-X perf_jit <-X>` command-line option and by the :" -"envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable for perf support with " -"DWARF JIT information." +"Set to ``1`` by :option:`-X perf <-X>` command-line option and " +"the :envvar:`PYTHONPERFSUPPORT` environment variable." +msgstr "" + +#: c-api/init_config.rst:1909 +msgid "" +"Set to ``2`` by the :option:`-X perf_jit <-X>` command-line option and " +"the :envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable." +msgstr "" + +#: c-api/init_config.rst:1915 +msgid "See :ref:`perf_profiling` for more information." +msgstr "" + +#: c-api/init_config.rst:1921 +msgid "Directory of the Python standard library." msgstr "" -#: c-api/init_config.rst:1265 +#: c-api/init_config.rst:1929 msgid "Use :ref:`environment variables `?" msgstr "" -#: c-api/init_config.rst:1267 +#: c-api/init_config.rst:1931 msgid "" "If equals to zero, ignore the :ref:`environment variables `." msgstr "" -#: c-api/init_config.rst:1270 +#: c-api/init_config.rst:1934 msgid "Set to ``0`` by the :option:`-E` environment variable." msgstr "" -#: c-api/init_config.rst:1276 +#: c-api/init_config.rst:1940 +msgid "" +"If non-zero, ``stdout`` and ``stderr`` will be redirected to the system log." +msgstr "" + +#: c-api/init_config.rst:1943 +msgid "Only available on macOS 10.12 and later, and on iOS." +msgstr "" + +#: c-api/init_config.rst:1945 +msgid "" +"Default: ``0`` (don't use the system log) on macOS; ``1`` on iOS (use the " +"system log)." +msgstr "" + +#: c-api/init_config.rst:1952 msgid "If non-zero, add the user site directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1278 +#: c-api/init_config.rst:1954 msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." msgstr "" -#: c-api/init_config.rst:1280 +#: c-api/init_config.rst:1956 msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" -#: c-api/init_config.rst:1286 +#: c-api/init_config.rst:1962 msgid "" "Verbose mode. If greater than ``0``, print a message each time a module is " "imported, showing the place (filename or built-in module) from which it is " "loaded." msgstr "" -#: c-api/init_config.rst:1290 +#: c-api/init_config.rst:1966 msgid "" "If greater than or equal to ``2``, print a message for each file that is " "checked for when searching for a module. Also provides information on module " "cleanup at exit." msgstr "" -#: c-api/init_config.rst:1294 +#: c-api/init_config.rst:1970 msgid "Incremented by the :option:`-v` command line option." msgstr "" -#: c-api/init_config.rst:1296 +#: c-api/init_config.rst:1972 msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" -#: c-api/init_config.rst:1302 +#: c-api/init_config.rst:1978 msgid "" "Options of the :mod:`warnings` module to build warnings filters, lowest to " "highest priority: :data:`sys.warnoptions`." msgstr "" -#: c-api/init_config.rst:1305 +#: c-api/init_config.rst:1981 msgid "" "The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " "order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " "of :data:`warnings.filters` which is checked first (highest priority)." msgstr "" -#: c-api/init_config.rst:1310 +#: c-api/init_config.rst:1986 msgid "" -"The :option:`-W` command line options adds its value to :c:member:`~PyConfig." -"warnoptions`, it can be used multiple times." +"The :option:`-W` command line options adds its value " +"to :c:member:`~PyConfig.warnoptions`, it can be used multiple times." msgstr "" -#: c-api/init_config.rst:1313 +#: c-api/init_config.rst:1989 msgid "" "The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " -"warning options. Multiple options can be specified, separated by commas (``," -"``)." +"warning options. Multiple options can be specified, separated by commas " +"(``,``)." msgstr "" -#: c-api/init_config.rst:1321 +#: c-api/init_config.rst:1997 msgid "" "If equal to ``0``, Python won't try to write ``.pyc`` files on the import of " "source modules." msgstr "" -#: c-api/init_config.rst:1324 +#: c-api/init_config.rst:2000 msgid "" -"Set to ``0`` by the :option:`-B` command line option and the :envvar:" -"`PYTHONDONTWRITEBYTECODE` environment variable." +"Set to ``0`` by the :option:`-B` command line option and " +"the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" -#: c-api/init_config.rst:1327 +#: c-api/init_config.rst:2003 msgid "" -":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" -"member:`~PyConfig.write_bytecode`." +":data:`sys.dont_write_bytecode` is initialized to the inverted value " +"of :c:member:`~PyConfig.write_bytecode`." msgstr "" -#: c-api/init_config.rst:1334 +#: c-api/init_config.rst:2010 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: c-api/init_config.rst:1338 +#: c-api/init_config.rst:2016 +msgid "If non-zero, write performance statistics at Python exit." +msgstr "" + +#: c-api/init_config.rst:2018 +msgid "" +"Need a special build with the ``Py_STATS`` macro: see :option:`--enable-" +"pystats`." +msgstr "" + +#: c-api/init_config.rst:2023 msgid "" "If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " "arguments are parsed the same way the regular Python parses :ref:`command " -"line arguments `, and Python arguments are stripped from :" -"c:member:`~PyConfig.argv`." +"line arguments `, and Python arguments are stripped " +"from :c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:1343 +#: c-api/init_config.rst:2028 msgid "" "The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " "see the :option:`-X` command line option." msgstr "" -#: c-api/init_config.rst:1348 +#: c-api/init_config.rst:2033 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: c-api/init_config.rst:1354 +#: c-api/init_config.rst:2039 msgid "Initialization with PyConfig" msgstr "" -#: c-api/init_config.rst:1356 +#: c-api/init_config.rst:2041 msgid "" "Initializing the interpreter from a populated configuration struct is " "handled by calling :c:func:`Py_InitializeFromConfig`." msgstr "" -#: c-api/init_config.rst:1362 +#: c-api/init_config.rst:2047 msgid "" -"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" -"func:`PyImport_ExtendInittab` are used, they must be set or called after " -"Python preinitialization and before the Python initialization. If Python is " -"initialized multiple times, :c:func:`PyImport_AppendInittab` or :c:func:" -"`PyImport_ExtendInittab` must be called before each Python initialization." +"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` are used, they must be set or called " +"after Python preinitialization and before the Python initialization. If " +"Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." msgstr "" -#: c-api/init_config.rst:1369 +#: c-api/init_config.rst:2054 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" -#: c-api/init_config.rst:1372 +#: c-api/init_config.rst:2057 msgid "Example setting the program name::" msgstr "" -#: c-api/init_config.rst:1400 +#: c-api/init_config.rst:2085 msgid "" "More complete example modifying the default configuration, read the " "configuration, and then override some parameters. Note that since 3.11, many " @@ -1755,18 +2808,19 @@ msgid "" "called will be left unchanged by initialization::" msgstr "" -#: c-api/init_config.rst:1463 +#: c-api/init_config.rst:2148 msgid "Isolated Configuration" msgstr "" -#: c-api/init_config.rst:1465 +#: c-api/init_config.rst:2150 msgid "" -":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" -"`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " -"Python from the system. For example, to embed Python into an application." +":c:func:`PyPreConfig_InitIsolatedConfig` " +"and :c:func:`PyConfig_InitIsolatedConfig` functions create a configuration " +"to isolate Python from the system. For example, to embed Python into an " +"application." msgstr "" -#: c-api/init_config.rst:1470 +#: c-api/init_config.rst:2155 msgid "" "This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " @@ -1774,134 +2828,133 @@ msgid "" "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: c-api/init_config.rst:1475 +#: c-api/init_config.rst:2160 msgid "" "Configuration files are still used with this configuration to determine " "paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " "avoid computing the default path configuration." msgstr "" -#: c-api/init_config.rst:1483 +#: c-api/init_config.rst:2168 msgid "Python Configuration" msgstr "" -#: c-api/init_config.rst:1485 +#: c-api/init_config.rst:2170 msgid "" -":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" -"`PyConfig_InitPythonConfig` functions create a configuration to build a " -"customized Python which behaves as the regular Python." +":c:func:`PyPreConfig_InitPythonConfig` " +"and :c:func:`PyConfig_InitPythonConfig` functions create a configuration to " +"build a customized Python which behaves as the regular Python." msgstr "" -#: c-api/init_config.rst:1489 +#: c-api/init_config.rst:2174 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" -#: c-api/init_config.rst:1492 +#: c-api/init_config.rst:2177 msgid "" "This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " -"Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" -"`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." +"Mode ` (:pep:`540`) depending on the LC_CTYPE " +"locale, :envvar:`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment " +"variables." msgstr "" -#: c-api/init_config.rst:1501 +#: c-api/init_config.rst:2186 msgid "Python Path Configuration" msgstr "" -#: c-api/init_config.rst:1503 +#: c-api/init_config.rst:2188 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: c-api/init_config.rst:1505 +#: c-api/init_config.rst:2190 msgid "Path configuration inputs:" msgstr "" -#: c-api/init_config.rst:1507 +#: c-api/init_config.rst:2192 msgid ":c:member:`PyConfig.home`" msgstr "" -#: c-api/init_config.rst:1508 +#: c-api/init_config.rst:2193 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" -#: c-api/init_config.rst:1509 +#: c-api/init_config.rst:2194 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: c-api/init_config.rst:1510 +#: c-api/init_config.rst:2195 msgid ":c:member:`PyConfig.program_name`" msgstr "" -#: c-api/init_config.rst:1511 +#: c-api/init_config.rst:2196 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" -#: c-api/init_config.rst:1512 +#: c-api/init_config.rst:2197 msgid "current working directory: to get absolute paths" msgstr "" -#: c-api/init_config.rst:1513 +#: c-api/init_config.rst:2198 msgid "" -"``PATH`` environment variable to get the program full path (from :c:member:" -"`PyConfig.program_name`)" +"``PATH`` environment variable to get the program full path " +"(from :c:member:`PyConfig.program_name`)" msgstr "" -#: c-api/init_config.rst:1515 +#: c-api/init_config.rst:2200 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: c-api/init_config.rst:1516 +#: c-api/init_config.rst:2201 msgid "" "(Windows only) Application paths in the registry under " "\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " "HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" -#: c-api/init_config.rst:1520 +#: c-api/init_config.rst:2205 msgid "Path configuration output fields:" msgstr "" -#: c-api/init_config.rst:1522 +#: c-api/init_config.rst:2207 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" -#: c-api/init_config.rst:1523 +#: c-api/init_config.rst:2208 msgid ":c:member:`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:1524 +#: c-api/init_config.rst:2209 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" -#: c-api/init_config.rst:1525 +#: c-api/init_config.rst:2210 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" -#: c-api/init_config.rst:1526 +#: c-api/init_config.rst:2211 msgid ":c:member:`PyConfig.executable`" msgstr "" -#: c-api/init_config.rst:1527 -msgid "" -":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." -"module_search_paths`" +#: c-api/init_config.rst:2212 +msgid ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig.module_search_paths`" msgstr "" -#: c-api/init_config.rst:1529 +#: c-api/init_config.rst:2214 msgid ":c:member:`PyConfig.prefix`" msgstr "" -#: c-api/init_config.rst:1531 +#: c-api/init_config.rst:2216 msgid "" "If at least one \"output field\" is not set, Python calculates the path " -"configuration to fill unset fields. If :c:member:`~PyConfig." -"module_search_paths_set` is equal to ``0``, :c:member:`~PyConfig." -"module_search_paths` is overridden and :c:member:`~PyConfig." -"module_search_paths_set` is set to ``1``." +"configuration to fill unset fields. " +"If :c:member:`~PyConfig.module_search_paths_set` is equal to " +"``0``, :c:member:`~PyConfig.module_search_paths` is overridden " +"and :c:member:`~PyConfig.module_search_paths_set` is set to ``1``." msgstr "" -#: c-api/init_config.rst:1537 +#: c-api/init_config.rst:2222 msgid "" "It is possible to completely ignore the function calculating the default " "path configuration by setting explicitly all path configuration output " @@ -1911,197 +2964,226 @@ msgid "" "modification." msgstr "" -#: c-api/init_config.rst:1544 +#: c-api/init_config.rst:2229 msgid "" "Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " "when calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" -#: c-api/init_config.rst:1547 +#: c-api/init_config.rst:2232 msgid "" -"If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." -"base_exec_prefix` fields are not set, they inherit their value from :c:" -"member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." +"If :c:member:`~PyConfig.base_prefix` " +"or :c:member:`~PyConfig.base_exec_prefix` fields are not set, they inherit " +"their value from :c:member:`~PyConfig.prefix` " +"and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: c-api/init_config.rst:1551 +#: c-api/init_config.rst:2236 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" -#: c-api/init_config.rst:1553 +#: c-api/init_config.rst:2238 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " -"contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." -"run_filename` to :data:`sys.path`." +"contains a ``__main__.py`` script, " +"prepend :c:member:`~PyConfig.run_filename` to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1556 +#: c-api/init_config.rst:2241 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: c-api/init_config.rst:1558 +#: c-api/init_config.rst:2243 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" -#: c-api/init_config.rst:1560 +#: c-api/init_config.rst:2245 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1562 +#: c-api/init_config.rst:2247 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1564 +#: c-api/init_config.rst:2249 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " -"modified by the :mod:`site` module. If :c:member:`~PyConfig." -"user_site_directory` is non-zero and the user's site-package directory " -"exists, the :mod:`site` module appends the user's site-package directory to :" -"data:`sys.path`." +"modified by the :mod:`site` module. " +"If :c:member:`~PyConfig.user_site_directory` is non-zero and the user's site-" +"package directory exists, the :mod:`site` module appends the user's site-" +"package directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1570 +#: c-api/init_config.rst:2255 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: c-api/init_config.rst:1572 +#: c-api/init_config.rst:2257 msgid "``pyvenv.cfg``" msgstr "" -#: c-api/init_config.rst:1573 +#: c-api/init_config.rst:2258 msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" -#: c-api/init_config.rst:1574 +#: c-api/init_config.rst:2259 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: c-api/init_config.rst:1576 +#: c-api/init_config.rst:2261 msgid "If a ``._pth`` file is present:" msgstr "" -#: c-api/init_config.rst:1578 +#: c-api/init_config.rst:2263 msgid "Set :c:member:`~PyConfig.isolated` to ``1``." msgstr "" -#: c-api/init_config.rst:1579 +#: c-api/init_config.rst:2264 msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." msgstr "" -#: c-api/init_config.rst:1580 +#: c-api/init_config.rst:2265 msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "" -#: c-api/init_config.rst:1581 +#: c-api/init_config.rst:2266 +msgid "Set :c:member:`~PyConfig.user_site_directory` to ``0`` (since 3.15)." +msgstr "" + +#: c-api/init_config.rst:2267 msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." msgstr "" -#: c-api/init_config.rst:1583 +#: c-api/init_config.rst:2269 msgid "" -"The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" -"`PyConfig.base_executable`." +"If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is " +"present in the same directory as :c:member:`~PyConfig.executable`, or its " +"parent, :c:member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` " +"are set that location. When this happens, :c:member:`~PyConfig.base_prefix` " +"and :c:member:`~PyConfig.base_exec_prefix` still keep their value, pointing " +"to the base installation. See :ref:`sys-path-init-virtual-environments` for " +"more information." +msgstr "" + +#: c-api/init_config.rst:2277 +msgid "" +"The ``__PYVENV_LAUNCHER__`` environment variable is used to " +"set :c:member:`PyConfig.base_executable`." +msgstr "" + +#: c-api/init_config.rst:2282 +msgid "" +":c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now " +"set to the ``pyvenv.cfg`` directory. This was previously done " +"by :mod:`site`, therefore affected by :option:`-S`." +msgstr "" + +#: c-api/init_config.rst:2289 +msgid "" +":c:member:`~PyConfig.user_site_directory` is now set to ``0`` when a " +"``._pth`` file is present." msgstr "" -#: c-api/init_config.rst:1588 +#: c-api/init_config.rst:2294 msgid "Py_GetArgcArgv()" msgstr "" -#: c-api/init_config.rst:1592 +#: c-api/init_config.rst:2298 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: c-api/init_config.rst:1594 +#: c-api/init_config.rst:2300 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: c-api/init_config.rst:1598 +#: c-api/init_config.rst:2304 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: c-api/init_config.rst:1600 +#: c-api/init_config.rst:2306 msgid "" "This section is a private provisional API introducing multi-phase " "initialization, the core feature of :pep:`432`:" msgstr "" -#: c-api/init_config.rst:1603 +#: c-api/init_config.rst:2309 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: c-api/init_config.rst:1605 +#: c-api/init_config.rst:2311 msgid "Builtin types;" msgstr "" -#: c-api/init_config.rst:1606 +#: c-api/init_config.rst:2312 msgid "Builtin exceptions;" msgstr "" -#: c-api/init_config.rst:1607 +#: c-api/init_config.rst:2313 msgid "Builtin and frozen modules;" msgstr "" -#: c-api/init_config.rst:1608 +#: c-api/init_config.rst:2314 msgid "" "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " "doesn't exist yet)." msgstr "" -#: c-api/init_config.rst:1611 +#: c-api/init_config.rst:2317 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: c-api/init_config.rst:1613 +#: c-api/init_config.rst:2319 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: c-api/init_config.rst:1614 +#: c-api/init_config.rst:2320 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: c-api/init_config.rst:1615 +#: c-api/init_config.rst:2321 msgid "Install signal handlers;" msgstr "" -#: c-api/init_config.rst:1616 +#: c-api/init_config.rst:2322 msgid "" -"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" -"data:`sys.path`);" +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` " +"and :data:`sys.path`);" msgstr "" -#: c-api/init_config.rst:1618 +#: c-api/init_config.rst:2324 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: c-api/init_config.rst:1619 +#: c-api/init_config.rst:2325 msgid "Import the :mod:`site` module;" msgstr "" -#: c-api/init_config.rst:1620 +#: c-api/init_config.rst:2326 msgid "etc." msgstr "" -#: c-api/init_config.rst:1622 +#: c-api/init_config.rst:2328 msgid "Private provisional API:" msgstr "" -#: c-api/init_config.rst:1624 +#: c-api/init_config.rst:2332 msgid "" -":c:member:`PyConfig._init_main`: if set to ``0``, :c:func:" -"`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." +"If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" " +"initialization phase." msgstr "" -#: c-api/init_config.rst:1629 +#: c-api/init_config.rst:2337 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: c-api/init_config.rst:1631 +#: c-api/init_config.rst:2339 msgid "" "No module is imported during the \"Core\" phase and the ``importlib`` module " "is not configured: the :ref:`Path Configuration ` is only " @@ -2110,14 +3192,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: c-api/init_config.rst:1637 +#: c-api/init_config.rst:2345 msgid "" "It may become possible to calculate the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " "one of the :pep:`432` motivation." msgstr "" -#: c-api/init_config.rst:1641 +#: c-api/init_config.rst:2349 msgid "" "The \"Core\" phase is not properly defined: what should be and what should " "not be available at this phase is not specified yet. The API is marked as " @@ -2125,7 +3207,7 @@ msgid "" "until a proper public API is designed." msgstr "" -#: c-api/init_config.rst:1646 +#: c-api/init_config.rst:2354 msgid "" "Example running Python code between \"Core\" and \"Main\" initialization " "phases::" diff --git a/c-api/interp-lifecycle.po b/c-api/interp-lifecycle.po new file mode 100644 index 000000000..54a95e3a3 --- /dev/null +++ b/c-api/interp-lifecycle.po @@ -0,0 +1,1208 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/interp-lifecycle.rst:6 +msgid "Interpreter initialization and finalization" +msgstr "" + +#: c-api/interp-lifecycle.rst:8 +msgid "" +"See :ref:`Python Initialization Configuration ` for details on " +"how to configure the interpreter prior to initialization." +msgstr "" + +#: c-api/interp-lifecycle.rst:14 +msgid "Before Python initialization" +msgstr "" + +#: c-api/interp-lifecycle.rst:16 +msgid "" +"In an application embedding Python, the :c:func:`Py_Initialize` function " +"must be called before using any other Python/C API functions; with the " +"exception of a few functions and the :ref:`global configuration variables " +"`." +msgstr "" + +#: c-api/interp-lifecycle.rst:21 +msgid "" +"The following functions can be safely called before Python is initialized:" +msgstr "" + +#: c-api/interp-lifecycle.rst:23 +msgid "Functions that initialize the interpreter:" +msgstr "" + +#: c-api/interp-lifecycle.rst:25 +msgid ":c:func:`Py_Initialize`" +msgstr "" + +#: c-api/interp-lifecycle.rst:26 +msgid ":c:func:`Py_InitializeEx`" +msgstr "" + +#: c-api/interp-lifecycle.rst:27 +msgid ":c:func:`Py_InitializeFromConfig`" +msgstr "" + +#: c-api/interp-lifecycle.rst:28 +msgid ":c:func:`Py_BytesMain`" +msgstr "" + +#: c-api/interp-lifecycle.rst:29 +msgid ":c:func:`Py_Main`" +msgstr "" + +#: c-api/interp-lifecycle.rst:30 +msgid "the runtime pre-initialization functions covered in :ref:`init-config`" +msgstr "" + +#: c-api/interp-lifecycle.rst:32 +msgid "Configuration functions:" +msgstr "" + +#: c-api/interp-lifecycle.rst:34 +msgid ":c:func:`PyImport_AppendInittab`" +msgstr "" + +#: c-api/interp-lifecycle.rst:35 +msgid ":c:func:`PyImport_ExtendInittab`" +msgstr "" + +#: c-api/interp-lifecycle.rst:36 +msgid ":c:func:`!PyInitFrozenExtensions`" +msgstr "" + +#: c-api/interp-lifecycle.rst:37 +msgid ":c:func:`PyMem_SetAllocator`" +msgstr "" + +#: c-api/interp-lifecycle.rst:38 +msgid ":c:func:`PyMem_SetupDebugHooks`" +msgstr "" + +#: c-api/interp-lifecycle.rst:39 +msgid ":c:func:`PyObject_SetArenaAllocator`" +msgstr "" + +#: c-api/interp-lifecycle.rst:40 +msgid ":c:func:`Py_SetProgramName`" +msgstr "" + +#: c-api/interp-lifecycle.rst:41 +msgid ":c:func:`Py_SetPythonHome`" +msgstr "" + +#: c-api/interp-lifecycle.rst:42 +msgid "the configuration functions covered in :ref:`init-config`" +msgstr "" + +#: c-api/interp-lifecycle.rst:44 +msgid "Informative functions:" +msgstr "" + +#: c-api/interp-lifecycle.rst:54 +msgid ":c:func:`Py_IsInitialized`" +msgstr "" + +#: c-api/interp-lifecycle.rst:47 +msgid ":c:func:`PyMem_GetAllocator`" +msgstr "" + +#: c-api/interp-lifecycle.rst:48 +msgid ":c:func:`PyObject_GetArenaAllocator`" +msgstr "" + +#: c-api/interp-lifecycle.rst:49 +msgid ":c:func:`Py_GetBuildInfo`" +msgstr "" + +#: c-api/interp-lifecycle.rst:50 +msgid ":c:func:`Py_GetCompiler`" +msgstr "" + +#: c-api/interp-lifecycle.rst:51 +msgid ":c:func:`Py_GetCopyright`" +msgstr "" + +#: c-api/interp-lifecycle.rst:52 +msgid ":c:func:`Py_GetPlatform`" +msgstr "" + +#: c-api/interp-lifecycle.rst:53 +msgid ":c:func:`Py_GetVersion`" +msgstr "" + +#: c-api/interp-lifecycle.rst:56 +msgid "Utilities:" +msgstr "" + +#: c-api/interp-lifecycle.rst:58 +msgid ":c:func:`Py_DecodeLocale`" +msgstr "" + +#: c-api/interp-lifecycle.rst:59 +msgid "" +"the status reporting and utility functions covered in :ref:`init-config`" +msgstr "" + +#: c-api/interp-lifecycle.rst:61 +msgid "Memory allocators:" +msgstr "" + +#: c-api/interp-lifecycle.rst:63 +msgid ":c:func:`PyMem_RawMalloc`" +msgstr "" + +#: c-api/interp-lifecycle.rst:64 +msgid ":c:func:`PyMem_RawRealloc`" +msgstr "" + +#: c-api/interp-lifecycle.rst:65 +msgid ":c:func:`PyMem_RawCalloc`" +msgstr "" + +#: c-api/interp-lifecycle.rst:66 +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +#: c-api/interp-lifecycle.rst:68 +msgid "Synchronization:" +msgstr "" + +#: c-api/interp-lifecycle.rst:70 +msgid ":c:func:`PyMutex_Lock`" +msgstr "" + +#: c-api/interp-lifecycle.rst:71 +msgid ":c:func:`PyMutex_Unlock`" +msgstr "" + +#: c-api/interp-lifecycle.rst:75 +msgid "" +"Despite their apparent similarity to some of the functions listed above, the " +"following functions **should not be called** before the interpreter has been " +"initialized: :c:func:`Py_EncodeLocale`, :c:func:`PyEval_InitThreads`, " +"and :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/interp-lifecycle.rst:84 +msgid "Global configuration variables" +msgstr "" + +#: c-api/interp-lifecycle.rst:86 +msgid "" +"Python has variables for the global configuration to control different " +"features and options. By default, these flags are controlled " +"by :ref:`command line options `." +msgstr "" + +#: c-api/interp-lifecycle.rst:90 +msgid "" +"When a flag is set by an option, the value of the flag is the number of " +"times that the option was set. For example, ``-b`` " +"sets :c:data:`Py_BytesWarningFlag` to 1 and ``-bb`` " +"sets :c:data:`Py_BytesWarningFlag` to 2." +msgstr "" + +#: c-api/interp-lifecycle.rst:97 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.bytes_warning` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:101 +msgid "" +"Issue a warning when comparing :class:`bytes` or :class:`bytearray` " +"with :class:`str` or :class:`bytes` with :class:`int`. Issue an error if " +"greater or equal to ``2``." +msgstr "" + +#: c-api/interp-lifecycle.rst:105 +msgid "Set by the :option:`-b` option." +msgstr "" + +#: c-api/interp-lifecycle.rst:112 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.parser_debug` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:116 +msgid "" +"Turn on parser debugging output (for expert only, depending on compilation " +"options)." +msgstr "" + +#: c-api/interp-lifecycle.rst:119 +msgid "" +"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " +"variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:127 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.write_bytecode` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:131 +msgid "" +"If set to non-zero, Python won't try to write ``.pyc`` files on the import " +"of source modules." +msgstr "" + +#: c-api/interp-lifecycle.rst:134 +msgid "" +"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " +"environment variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:142 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.pathconfig_warnings` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:146 +msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." +msgstr "" + +#: c-api/interp-lifecycle.rst:153 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.hash_seed` " +"and :c:member:`PyConfig.use_hash_seed` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:158 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " +"a non-empty string." +msgstr "" + +#: c-api/interp-lifecycle.rst:161 +msgid "" +"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " +"variable to initialize the secret hash seed." +msgstr "" + +#: c-api/interp-lifecycle.rst:169 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.use_environment` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:173 +msgid "" +"Ignore all :envvar:`!PYTHON*` environment variables, " +"e.g. :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +msgstr "" + +#: c-api/interp-lifecycle.rst:176 +msgid "Set by the :option:`-E` and :option:`-I` options." +msgstr "" + +#: c-api/interp-lifecycle.rst:183 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.inspect` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:187 +msgid "" +"When a script is passed as first argument or the :option:`-c` option is " +"used, enter interactive mode after executing the script or the command, even " +"when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +#: c-api/interp-lifecycle.rst:191 +msgid "" +"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " +"variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:199 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.interactive` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:203 +msgid "Set by the :option:`-i` option." +msgstr "" + +#: c-api/interp-lifecycle.rst:210 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.isolated` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:214 +msgid "" +"Run Python in isolated mode. In isolated mode :data:`sys.path` contains " +"neither the script's directory nor the user's site-packages directory." +msgstr "" + +#: c-api/interp-lifecycle.rst:217 +msgid "Set by the :option:`-I` option." +msgstr "" + +#: c-api/interp-lifecycle.rst:226 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyPreConfig.legacy_windows_fs_encoding` should be used " +"instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:230 +msgid "" +"If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error " +"handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, " +"for the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/interp-lifecycle.rst:234 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable is set to a non-empty string." +msgstr "" + +#: c-api/interp-lifecycle.rst:237 +msgid "See :pep:`529` for more details." +msgstr "" + +#: c-api/interp-lifecycle.rst:258 +msgid "Availability" +msgstr "" + +#: c-api/interp-lifecycle.rst:246 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.legacy_windows_stdio` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:250 +msgid "" +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!" +"io._WindowsConsoleIO` for :mod:`sys` standard streams." +msgstr "" + +#: c-api/interp-lifecycle.rst:253 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +#: c-api/interp-lifecycle.rst:256 +msgid "See :pep:`528` for more details." +msgstr "" + +#: c-api/interp-lifecycle.rst:265 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.site_import` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:269 +msgid "" +"Disable the import of the module :mod:`site` and the site-dependent " +"manipulations of :data:`sys.path` that it entails. Also disable these " +"manipulations if :mod:`site` is explicitly imported later " +"(call :func:`site.main` if you want them to be triggered)." +msgstr "" + +#: c-api/interp-lifecycle.rst:274 +msgid "Set by the :option:`-S` option." +msgstr "" + +#: c-api/interp-lifecycle.rst:281 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.user_site_directory` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:285 +msgid "" +"Don't add the :data:`user site-packages directory ` " +"to :data:`sys.path`." +msgstr "" + +#: c-api/interp-lifecycle.rst:288 +msgid "" +"Set by the :option:`-s` and :option:`-I` options, and " +"the :envvar:`PYTHONNOUSERSITE` environment variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:296 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.optimization_level` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:300 +msgid "" +"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " +"variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:308 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.quiet` should be used instead, see :ref:`Python " +"Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:312 +msgid "" +"Don't display the copyright and version messages even in interactive mode." +msgstr "" + +#: c-api/interp-lifecycle.rst:314 +msgid "Set by the :option:`-q` option." +msgstr "" + +#: c-api/interp-lifecycle.rst:323 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.buffered_stdio` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:327 +msgid "Force the stdout and stderr streams to be unbuffered." +msgstr "" + +#: c-api/interp-lifecycle.rst:329 +msgid "" +"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " +"environment variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:337 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.verbose` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:341 +msgid "" +"Print a message each time a module is initialized, showing the place " +"(filename or built-in module) from which it is loaded. If greater or equal " +"to ``2``, print a message for each file that is checked for when searching " +"for a module. Also provides information on module cleanup at exit." +msgstr "" + +#: c-api/interp-lifecycle.rst:346 +msgid "" +"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " +"variable." +msgstr "" + +#: c-api/interp-lifecycle.rst:353 +msgid "Initializing and finalizing the interpreter" +msgstr "" + +#: c-api/interp-lifecycle.rst:367 +msgid "" +"Initialize the Python interpreter. In an application embedding Python, this " +"should be called before using any other Python/C API functions; " +"see :ref:`Before Python Initialization ` for the few " +"exceptions." +msgstr "" + +#: c-api/interp-lifecycle.rst:371 +msgid "" +"This initializes the table of loaded modules (``sys.modules``), and creates " +"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " +"also initializes the module search path (``sys.path``). It does not set " +"``sys.argv``; use the :ref:`Python Initialization Configuration ` API for that. This is a no-op when called for a second time " +"(without calling :c:func:`Py_FinalizeEx` first). There is no return value; " +"it is a fatal error if the initialization fails." +msgstr "" + +#: c-api/interp-lifecycle.rst:393 +msgid "" +"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " +"Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:383 +msgid "" +"On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which " +"will also affect non-Python uses of the console using the C Runtime." +msgstr "" + +#: c-api/interp-lifecycle.rst:389 +msgid "" +"This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If " +"*initsigs* is ``0``, it skips initialization registration of signal " +"handlers, which may be useful when CPython is embedded as part of a larger " +"application." +msgstr "" + +#: c-api/interp-lifecycle.rst:399 +msgid "" +"Initialize Python from *config* configuration, as described in :ref:`init-" +"from-config`." +msgstr "" + +#: c-api/interp-lifecycle.rst:402 +msgid "" +"See the :ref:`init-config` section for details on pre-initializing the " +"interpreter, populating the runtime configuration structure, and querying " +"the returned status structure." +msgstr "" + +#: c-api/interp-lifecycle.rst:409 +msgid "" +"Return true (nonzero) when the Python interpreter has been initialized, " +"false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns " +"false until :c:func:`Py_Initialize` is called again." +msgstr "" + +#: c-api/interp-lifecycle.rst:413 +msgid "" +"This function no longer returns true until initialization has fully " +"completed, including import of the :mod:`site` module. Previously it could " +"return true while :c:func:`Py_Initialize` was still running." +msgstr "" + +#: c-api/interp-lifecycle.rst:421 +msgid "" +"Return true (non-zero) if the main Python interpreter is :term:`shutting " +"down `. Return false (zero) otherwise." +msgstr "" + +#: c-api/interp-lifecycle.rst:429 +msgid "" +"Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " +"of Python/C API functions, and destroy all sub-interpreters " +"(see :c:func:`Py_NewInterpreter` below) that were created and not yet " +"destroyed since the last call to :c:func:`Py_Initialize`. This is a no-op " +"when called for a second time (without calling :c:func:`Py_Initialize` again " +"first)." +msgstr "" + +#: c-api/interp-lifecycle.rst:435 +msgid "" +"Since this is the reverse of :c:func:`Py_Initialize`, it should be called in " +"the same thread with the same interpreter active. That means the main " +"thread and the main interpreter. This should never be called " +"while :c:func:`Py_RunMain` is running." +msgstr "" + +#: c-api/interp-lifecycle.rst:440 +msgid "" +"Normally the return value is ``0``. If there were errors during finalization " +"(flushing buffered data), ``-1`` is returned." +msgstr "" + +#: c-api/interp-lifecycle.rst:444 +msgid "" +"Note that Python will do a best effort at freeing all memory allocated by " +"the Python interpreter. Therefore, any C-Extension should make sure to " +"correctly clean up all of the previously allocated PyObjects before using " +"them in subsequent calls to :c:func:`Py_Initialize`. Otherwise it could " +"introduce vulnerabilities and incorrect behavior." +msgstr "" + +#: c-api/interp-lifecycle.rst:450 +msgid "" +"This function is provided for a number of reasons. An embedding application " +"might want to restart Python without having to restart the application " +"itself. An application that has loaded the Python interpreter from a " +"dynamically loadable library (or DLL) might want to free all memory " +"allocated by Python before unloading the DLL. During a hunt for memory leaks " +"in an application a developer might want to free all memory allocated by " +"Python before exiting from the application." +msgstr "" + +#: c-api/interp-lifecycle.rst:458 +msgid "" +"**Bugs and caveats:** The destruction of modules and objects in modules is " +"done in random order; this may cause destructors (:meth:`~object.__del__` " +"methods) to fail when they depend on other objects (even functions) or " +"modules. Dynamically loaded extension modules loaded by Python are not " +"unloaded. Small amounts of memory allocated by the Python interpreter may " +"not be freed (if you find a leak, please report it). Memory tied up in " +"circular references between objects is not freed. Interned strings will all " +"be deallocated regardless of their reference count. Some memory allocated by " +"extension modules may not be freed. Some extensions may not work properly " +"if their initialization routine is called more than once; this can happen if " +"an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` " +"more than once. :c:func:`Py_FinalizeEx` must not be called recursively from " +"within itself. Therefore, it must not be called by any code that may be run " +"as part of the interpreter shutdown process, such as :py:mod:`atexit` " +"handlers, object finalizers, or any code that may be run while flushing the " +"stdout and stderr files." +msgstr "" + +#: c-api/interp-lifecycle.rst:474 +msgid "" +"Raises an :ref:`auditing event ` " +"``cpython._PySys_ClearAuditHooks`` with no arguments." +msgstr "" + +#: c-api/interp-lifecycle.rst:481 +msgid "" +"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " +"disregards the return value." +msgstr "" + +#: c-api/interp-lifecycle.rst:487 +msgid "" +"Similar to :c:func:`Py_Main` but *argv* is an array of bytes strings, " +"allowing the calling application to delegate the text decoding step to the " +"CPython runtime." +msgstr "" + +#: c-api/interp-lifecycle.rst:496 +msgid "" +"The main program for the standard interpreter, encapsulating a full " +"initialization/finalization cycle, as well as additional behaviour to " +"implement reading configurations settings from the environment and command " +"line, and then executing ``__main__`` in accordance with :ref:`using-on-" +"cmdline`." +msgstr "" + +#: c-api/interp-lifecycle.rst:502 +msgid "" +"This is made available for programs which wish to support the full CPython " +"command line interface, rather than just embedding a Python runtime in a " +"larger application." +msgstr "" + +#: c-api/interp-lifecycle.rst:506 +msgid "" +"The *argc* and *argv* parameters are similar to those which are passed to a " +"C program's :c:func:`main` function, except that the *argv* entries are " +"first converted to ``wchar_t`` using :c:func:`Py_DecodeLocale`. It is also " +"important to note that the argument list entries may be modified to point to " +"strings other than those passed in (however, the contents of the strings " +"pointed to by the argument list are not modified)." +msgstr "" + +#: c-api/interp-lifecycle.rst:513 +msgid "" +"The return value is ``2`` if the argument list does not represent a valid " +"Python command line, and otherwise the same as :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/interp-lifecycle.rst:516 +msgid "" +"In terms of the CPython runtime configuration APIs documented in " +"the :ref:`runtime configuration ` section (and without " +"accounting for error handling), ``Py_Main`` is approximately equivalent to::" +msgstr "" + +#: c-api/interp-lifecycle.rst:528 +msgid "" +"In normal usage, an embedding application will call this function *instead* " +"of calling :c:func:`Py_Initialize`, :c:func:`Py_InitializeEx` " +"or :c:func:`Py_InitializeFromConfig` directly, and all settings will be " +"applied as described elsewhere in this documentation. If this function is " +"instead called *after* a preceding runtime initialization API call, then " +"exactly which environmental and command line configuration settings will be " +"updated is version dependent (as it depends on which settings correctly " +"support being modified after they have already been set once when the " +"runtime was first initialized)." +msgstr "" + +#: c-api/interp-lifecycle.rst:541 +msgid "Executes the main module in a fully configured CPython runtime." +msgstr "" + +#: c-api/interp-lifecycle.rst:543 +msgid "" +"Executes the command (:c:member:`PyConfig.run_command`), the script " +"(:c:member:`PyConfig.run_filename`) or the module " +"(:c:member:`PyConfig.run_module`) specified on the command line or in the " +"configuration. If none of these values are set, runs the interactive Python " +"prompt (REPL) using the ``__main__`` module's global namespace." +msgstr "" + +#: c-api/interp-lifecycle.rst:549 +msgid "" +"If :c:member:`PyConfig.inspect` is not set (the default), the return value " +"will be ``0`` if the interpreter exits normally (that is, without raising an " +"exception), the exit status of an unhandled :exc:`SystemExit`, or ``1`` for " +"any other unhandled exception." +msgstr "" + +#: c-api/interp-lifecycle.rst:554 +msgid "" +"If :c:member:`PyConfig.inspect` is set (such as when the :option:`-i` option " +"is used), rather than returning when the interpreter exits, execution will " +"instead resume in an interactive Python prompt (REPL) using the ``__main__`` " +"module's global namespace. If the interpreter exited with an exception, it " +"is immediately raised in the REPL session. The function return value is then " +"determined by the way the *REPL session* terminates: ``0``, ``1``, or the " +"status of a :exc:`SystemExit`, as specified above." +msgstr "" + +#: c-api/interp-lifecycle.rst:562 +msgid "" +"This function always finalizes the Python interpreter before it returns." +msgstr "" + +#: c-api/interp-lifecycle.rst:564 +msgid "" +"See :ref:`Python Configuration ` for an example of a " +"customized Python that always runs in isolated mode " +"using :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/interp-lifecycle.rst:570 +msgid "" +"Register an :mod:`atexit` callback for the target interpreter *interp*. This " +"is similar to :c:func:`Py_AtExit`, but takes an explicit interpreter and " +"data pointer for the callback." +msgstr "" + +#: c-api/interp-lifecycle.rst:574 +msgid "There must be an :term:`attached thread state` for *interp*." +msgstr "" + +#: c-api/interp-lifecycle.rst:582 +msgid "Cautions regarding interpreter finalization" +msgstr "" + +#: c-api/interp-lifecycle.rst:584 +msgid "" +"In the late stage of :term:`interpreter shutdown`, after attempting to wait " +"for non-daemon threads to exit (though this can be interrupted " +"by :class:`KeyboardInterrupt`) and running the :mod:`atexit` functions, the " +"runtime is marked as finalizing, meaning that :c:func:`Py_IsFinalizing` " +"and :func:`sys.is_finalizing` return true. At this point, only the " +"finalization thread (the thread that initiated finalization; this is " +"typically the main thread) is allowed to :term:`attach ` a thread state." +msgstr "" + +#: c-api/interp-lifecycle.rst:592 +msgid "" +"Other threads that attempt to attach during finalization, either explicitly " +"(such as via :c:func:`PyThreadState_Ensure` " +"or :c:macro:`Py_END_ALLOW_THREADS`) or implicitly (such as in-between " +"bytecode instructions), will enter a **permanently blocked state**. " +"Generally, this is harmless, but this can result in deadlocks. For example, " +"a thread may be permanently blocked while holding a lock, meaning that the " +"finalization thread can never acquire that lock." +msgstr "" + +#: c-api/interp-lifecycle.rst:600 +msgid "" +"Prior to CPython 3.13, the thread would exit instead of hanging, which led " +"to other issues (see the warning note at :c:func:`PyThread_exit_thread`)." +msgstr "" + +#: c-api/interp-lifecycle.rst:604 +msgid "" +"Gross? Yes. Starting in Python 3.15, there are a number of C APIs that make " +"it possible to avoid these issues by temporarily preventing finalization:" +msgstr "" + +#: c-api/interp-lifecycle.rst:611 +msgid "" +":pep:`788` explains the design, motivation and rationale for these APIs." +msgstr "" + +#: c-api/interp-lifecycle.rst:616 +msgid "An opaque interpreter guard structure." +msgstr "" + +#: c-api/interp-lifecycle.rst:618 +msgid "" +"By holding an interpreter guard, the caller can ensure that the interpreter " +"will not finalize until the guard is closed " +"(through :c:func:`PyInterpreterGuard_Close`)." +msgstr "" + +#: c-api/interp-lifecycle.rst:622 +msgid "" +"When a guard is held, a thread attempting to finalize the interpreter will " +"block until the guard is closed before starting finalization. After " +"finalization has started, threads are forever unable to acquire guards for " +"that interpreter. This means that if you forget to close an interpreter " +"guard, the process will **permanently hang** during finalization!" +msgstr "" + +#: c-api/interp-lifecycle.rst:629 +msgid "" +"Holding a guard for an interpreter is similar to holding a :term:`strong " +"reference` to a Python object, except finalization does not happen " +"automatically after all guards are released: it requires an " +"explicit :c:func:`Py_EndInterpreter` call." +msgstr "" + +#: c-api/interp-lifecycle.rst:639 +msgid "" +"Create a finalization guard for the current interpreter. This will prevent " +"finalization until the guard is closed." +msgstr "" + +#: c-api/interp-lifecycle.rst:642 +msgid "For example:" +msgstr "" + +#: c-api/interp-lifecycle.rst:662 +msgid "" +"On success, this function returns a guard for the current interpreter; on " +"failure, it returns ``NULL`` with an exception set." +msgstr "" + +#: c-api/interp-lifecycle.rst:665 +msgid "" +"This function will fail only if the current interpreter has already started " +"finalizing, or if the process is out of memory." +msgstr "" + +#: c-api/interp-lifecycle.rst:668 +msgid "" +"The guard pointer returned by this function must be eventually closed " +"with :c:func:`PyInterpreterGuard_Close`; failing to do so will result in the " +"Python process infinitely hanging." +msgstr "" + +#: c-api/interp-lifecycle.rst:739 +msgid "The caller must hold an :term:`attached thread state`." +msgstr "" + +#: c-api/interp-lifecycle.rst:679 +msgid "Create a finalization guard for an interpreter through a view." +msgstr "" + +#: c-api/interp-lifecycle.rst:681 +msgid "" +"On success, this function returns a guard to the interpreter represented by " +"*view*. The view is still valid after calling this function. The guard must " +"eventually be closed with :c:func:`PyInterpreterGuard_Close`." +msgstr "" + +#: c-api/interp-lifecycle.rst:686 +msgid "" +"If the interpreter no longer exists, is already finalizing, or out of " +"memory, then this function returns ``NULL`` without setting an exception." +msgstr "" + +#: c-api/interp-lifecycle.rst:775 +msgid "The caller does not need to hold an :term:`attached thread state`." +msgstr "" + +#: c-api/interp-lifecycle.rst:696 +msgid "" +"Close an interpreter guard, allowing the interpreter to start finalization " +"if no other guards remain. If an interpreter guard is never closed, the " +"interpreter will infinitely wait when trying to enter finalization!" +msgstr "" + +#: c-api/interp-lifecycle.rst:701 +msgid "" +"After an interpreter guard is closed, it may not be used " +"in :c:func:`PyThreadState_Ensure`. Doing so will result in undefined " +"behavior." +msgstr "" + +#: c-api/interp-lifecycle.rst:752 +msgid "" +"This function cannot fail, and the caller doesn't need to hold " +"an :term:`attached thread state`." +msgstr "" + +#: c-api/interp-lifecycle.rst:714 +msgid "Interpreter views" +msgstr "" + +#: c-api/interp-lifecycle.rst:716 +msgid "" +"In some cases, it may be necessary to access an interpreter that may have " +"been deleted. This can be done using interpreter views." +msgstr "" + +#: c-api/interp-lifecycle.rst:721 +msgid "An opaque view of an interpreter." +msgstr "" + +#: c-api/interp-lifecycle.rst:723 +msgid "" +"This is a thread-safe way to access an interpreter that may have be " +"finalizing or already destroyed." +msgstr "" + +#: c-api/interp-lifecycle.rst:731 +msgid "Create a view to the current interpreter." +msgstr "" + +#: c-api/interp-lifecycle.rst:733 +msgid "" +"This function is generally meant to be used " +"alongside :c:func:`PyInterpreterGuard_FromView` " +"or :c:func:`PyThreadState_EnsureFromView`." +msgstr "" + +#: c-api/interp-lifecycle.rst:736 +msgid "" +"On success, this function returns a view to the current interpreter; on " +"failure, it returns ``NULL`` with an exception set." +msgstr "" + +#: c-api/interp-lifecycle.rst:746 +msgid "Close an interpreter view." +msgstr "" + +#: c-api/interp-lifecycle.rst:748 +msgid "" +"If an interpreter view is never closed, the view's memory will never be " +"freed, but there are no other consequences. (In contrast, forgetting to " +"close a guard will infinitely hang the main thread during finalization.)" +msgstr "" + +#: c-api/interp-lifecycle.rst:760 +msgid "" +"Create a view for the main interpreter (the first and default interpreter in " +"a Python process; see :c:func:`PyInterpreterState_Main`)." +msgstr "" + +#: c-api/interp-lifecycle.rst:764 +msgid "" +"On success, this function returns a view to the main interpreter; on " +"failure, it returns ``NULL`` without an exception set. Failure indicates " +"that the process is out of memory." +msgstr "" + +#: c-api/interp-lifecycle.rst:768 +msgid "" +"Use this function when an interpreter pointer or view cannot be supplied by " +"the caller, such as when a native threading library does not provide a " +"``void *arg`` parameter that could carry a :c:type:`PyInterpreterGuard` " +"or :c:type:`PyInterpreterView`. In code that supports subinterpreters, " +"prefer :c:func:`PyInterpreterView_FromCurrent` so the guard tracks the " +"calling interpreter rather than the main one." +msgstr "" + +#: c-api/interp-lifecycle.rst:781 +msgid "Process-wide parameters" +msgstr "" + +#: c-api/interp-lifecycle.rst:789 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.program_name` should be used instead, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:793 +msgid "" +"This function should be called before :c:func:`Py_Initialize` is called for " +"the first time, if it is called at all. It tells the interpreter the value " +"of the ``argv[0]`` argument to the :c:func:`main` function of the program " +"(converted to wide characters). This is used by some other functions below " +"to find the Python run-time libraries relative to the interpreter " +"executable. The default value is ``'python'``. The argument should point " +"to a zero-terminated wide character string in static storage whose contents " +"will not change for the duration of the program's execution. No code in the " +"Python interpreter will change the contents of this storage." +msgstr "" + +#: c-api/interp-lifecycle.rst:912 c-api/interp-lifecycle.rst:971 +msgid "" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get " +"a :c:expr:`wchar_t*` string." +msgstr "" + +#: c-api/interp-lifecycle.rst:812 +msgid "" +"Return the version of this Python interpreter. This is a string that looks " +"something like ::" +msgstr "" + +#: c-api/interp-lifecycle.rst:819 +msgid "" +"The first word (up to the first space character) is the current Python " +"version; the first characters are the major and minor version separated by a " +"period. The returned string points into static storage; the caller should " +"not modify its value. The value is available to Python code " +"as :data:`sys.version`." +msgstr "" + +#: c-api/interp-lifecycle.rst:824 +msgid "See also the :c:var:`Py_Version` constant." +msgstr "" + +#: c-api/interp-lifecycle.rst:831 +msgid "" +"Return the platform identifier for the current platform. On Unix, this is " +"formed from the \"official\" name of the operating system, converted to " +"lower case, followed by the major revision number; e.g., for Solaris 2.x, " +"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " +"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.platform``." +msgstr "" + +#: c-api/interp-lifecycle.rst:842 +msgid "" +"Return the official copyright string for the current Python version, for " +"example" +msgstr "" + +#: c-api/interp-lifecycle.rst:844 +msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" +msgstr "" + +#: c-api/interp-lifecycle.rst:848 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as ``sys.copyright``." +msgstr "" + +#: c-api/interp-lifecycle.rst:854 +msgid "" +"Return an indication of the compiler used to build the current Python " +"version, in square brackets, for example::" +msgstr "" + +#: c-api/interp-lifecycle.rst:875 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as part of the variable " +"``sys.version``." +msgstr "" + +#: c-api/interp-lifecycle.rst:868 +msgid "" +"Return information about the sequence number and build date and time of the " +"current Python interpreter instance, for example ::" +msgstr "" + +#: c-api/interp-lifecycle.rst:887 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` " +"and :c:member:`PyConfig.safe_path` should be used instead, see :ref:`Python " +"Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:892 +msgid "" +"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " +"similar to those passed to the program's :c:func:`main` function with the " +"difference that the first entry should refer to the script file to be " +"executed rather than the executable hosting the Python interpreter. If " +"there isn't a script that will be run, the first entry in *argv* can be an " +"empty string. If this function fails to initialize :data:`sys.argv`, a " +"fatal condition is signalled using :c:func:`Py_FatalError`." +msgstr "" + +#: c-api/interp-lifecycle.rst:900 +msgid "" +"If *updatepath* is zero, this is all the function does. If *updatepath* is " +"non-zero, the function also modifies :data:`sys.path` according to the " +"following algorithm:" +msgstr "" + +#: c-api/interp-lifecycle.rst:904 +msgid "" +"If the name of an existing script is passed in ``argv[0]``, the absolute " +"path of the directory where the script is located is prepended " +"to :data:`sys.path`." +msgstr "" + +#: c-api/interp-lifecycle.rst:907 +msgid "" +"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " +"existing file name), an empty string is prepended to :data:`sys.path`, which " +"is the same as prepending the current working directory (``\".\"``)." +msgstr "" + +#: c-api/interp-lifecycle.rst:948 +msgid "" +"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " +"members of the :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:919 +msgid "" +"It is recommended that applications embedding the Python interpreter for " +"purposes other than executing a single script pass ``0`` as *updatepath*, " +"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." +msgstr "" + +#: c-api/interp-lifecycle.rst:924 +msgid "" +"On versions before 3.1.3, you can achieve the same effect by manually " +"popping the first :data:`sys.path` element after having " +"called :c:func:`PySys_SetArgv`, for example using::" +msgstr "" + +#: c-api/interp-lifecycle.rst:937 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` should " +"be used instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:941 +msgid "" +"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " +"``1`` unless the :program:`python` interpreter was started with " +"the :option:`-I`." +msgstr "" + +#: c-api/interp-lifecycle.rst:951 +msgid "The *updatepath* value depends on :option:`-I`." +msgstr "" + +#: c-api/interp-lifecycle.rst:958 +msgid "" +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.home` should be used instead, see :ref:`Python " +"Initialization Configuration `." +msgstr "" + +#: c-api/interp-lifecycle.rst:962 +msgid "" +"Set the default \"home\" directory, that is, the location of the standard " +"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " +"string." +msgstr "" + +#: c-api/interp-lifecycle.rst:966 +msgid "" +"The argument should point to a zero-terminated character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" diff --git a/c-api/intro.po b/c-api/intro.po index e88f2e448..b34e22310 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -27,8 +27,8 @@ msgid "" "API. The first reason is to write *extension modules* for specific purposes; " "these are C modules that extend the Python interpreter. This is probably " "the most common use. The second reason is to use Python as a component in a " -"larger application; this technique is generally referred to as :dfn:" -"`embedding` Python in an application." +"larger application; this technique is generally referred to " +"as :dfn:`embedding` Python in an application." msgstr "" #: c-api/intro.rst:20 @@ -50,10 +50,24 @@ msgid "" msgstr "" #: c-api/intro.rst:34 -msgid "Coding standards" +msgid "Language version compatibility" msgstr "" #: c-api/intro.rst:36 +msgid "Python's C API is compatible with C11 and C++11 versions of C and C++." +msgstr "" + +#: c-api/intro.rst:38 +msgid "" +"This is a lower limit: the C API does not require features from later C/C++ " +"versions. You do *not* need to enable your compiler's \"c11 mode\"." +msgstr "" + +#: c-api/intro.rst:44 +msgid "Coding standards" +msgstr "" + +#: c-api/intro.rst:46 msgid "" "If you're writing C code for inclusion in CPython, you **must** follow the " "guidelines and standards defined in :PEP:`7`. These guidelines apply " @@ -62,34 +76,34 @@ msgid "" "modules, unless you eventually expect to contribute them to Python." msgstr "" -#: c-api/intro.rst:46 +#: c-api/intro.rst:56 msgid "Include Files" msgstr "" -#: c-api/intro.rst:48 +#: c-api/intro.rst:58 msgid "" "All function, type and macro definitions needed to use the Python/C API are " "included in your code by the following line::" msgstr "" -#: c-api/intro.rst:54 +#: c-api/intro.rst:64 msgid "" "This implies inclusion of the following standard headers: ````, " -"````, ````, ````, ```` and ```` (if available)." +"````, ````, ````, ```` and " +"```` (if available)." msgstr "" -#: c-api/intro.rst:60 +#: c-api/intro.rst:145 msgid "" "Since Python may define some pre-processor definitions which affect the " "standard headers on some systems, you *must* include :file:`Python.h` before " "any standard headers are included." msgstr "" "Python pouvant définir certaines définitions pré-processeur qui affectent " -"les têtes standard sur certains systèmes, vous *devez* inclure :file:`Python." -"h` avant les en-têtes standards." +"les têtes standard sur certains systèmes, vous *devez* " +"inclure :file:`Python.h` avant les en-têtes standards." -#: c-api/intro.rst:64 +#: c-api/intro.rst:74 #, fuzzy msgid "" "It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " @@ -99,7 +113,7 @@ msgstr "" "``Python.h``. Lisez :ref:`parsetuple` pour avoir une description de cette " "macro." -#: c-api/intro.rst:67 +#: c-api/intro.rst:77 msgid "" "All user visible names defined by Python.h (except those defined by the " "included standard headers) have one of the prefixes ``Py`` or ``_Py``. " @@ -108,7 +122,7 @@ msgid "" "names do not have a reserved prefix." msgstr "" -#: c-api/intro.rst:74 +#: c-api/intro.rst:84 msgid "" "User code should never define names that begin with ``Py`` or ``_Py``. This " "confuses the reader, and jeopardizes the portability of the user code to " @@ -116,153 +130,291 @@ msgid "" "of these prefixes." msgstr "" -#: c-api/intro.rst:79 +#: c-api/intro.rst:89 msgid "" "The header files are typically installed with Python. On Unix, these are " -"located in the directories :file:`{prefix}/include/pythonversion/` and :file:" -"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` " -"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding " -"parameters to Python's :program:`configure` script and *version* is ``'%d." -"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :" -"file:`{prefix}/include`, where ``prefix`` is the installation directory " -"specified to the installer." +"located in the directories :file:`{prefix}/include/pythonversion/` " +"and :file:`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--" +"prefix>` and :option:`exec_prefix <--exec-prefix>` are defined by the " +"corresponding parameters to Python's :program:`configure` script and " +"*version* is ``'%d.%d' % sys.version_info[:2]``. On Windows, the headers " +"are installed in :file:`{prefix}/include`, where ``prefix`` is the " +"installation directory specified to the installer." msgstr "" -#: c-api/intro.rst:88 +#: c-api/intro.rst:98 msgid "" "To include the headers, place both directories (if different) on your " "compiler's search path for includes. Do *not* place the parent directories " "on the search path and then use ``#include ``; this will " -"break on multi-platform builds since the platform independent headers under :" -"option:`prefix <--prefix>` include the platform specific headers from :" -"option:`exec_prefix <--exec-prefix>`." +"break on multi-platform builds since the platform independent headers " +"under :option:`prefix <--prefix>` include the platform specific headers " +"from :option:`exec_prefix <--exec-prefix>`." msgstr "" -#: c-api/intro.rst:95 +#: c-api/intro.rst:105 msgid "" "C++ users should note that although the API is defined entirely using C, the " "header files properly declare the entry points to be ``extern \"C\"``. As a " "result, there is no need to do anything special to use the API from C++." msgstr "" -#: c-api/intro.rst:101 -msgid "Useful macros" +#: c-api/intro.rst:113 +msgid "System includes" msgstr "" -#: c-api/intro.rst:103 +#: c-api/intro.rst:115 msgid "" -"Several useful macros are defined in the Python header files. Many are " -"defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). " -"Others of a more general utility are defined here. This is not necessarily " -"a complete listing." +":file:`Python.h` includes several standard header files. C extensions should " +"include the standard headers that they use, and should not rely on these " +"implicit includes. The implicit includes are:" msgstr "" -#: c-api/intro.rst:110 -msgid "" -"Declare an extension module ``PyInit`` initialization function. The function " -"return type is :c:expr:`PyObject*`. The macro declares any special linkage " -"declarations required by the platform, and for C++ declares the function as " -"``extern \"C\"``." +#: c-api/intro.rst:120 +msgid "````" msgstr "" -#: c-api/intro.rst:115 +#: c-api/intro.rst:121 +msgid "```` (on Windows)" +msgstr "" + +#: c-api/intro.rst:122 +msgid "````" +msgstr "" + +#: c-api/intro.rst:123 +msgid "````" +msgstr "" + +#: c-api/intro.rst:124 +msgid "````" +msgstr "" + +#: c-api/intro.rst:125 +msgid "````" +msgstr "" + +#: c-api/intro.rst:126 +msgid "````" +msgstr "" + +#: c-api/intro.rst:127 +msgid "````" +msgstr "" + +#: c-api/intro.rst:128 +msgid "```` (if present)" +msgstr "" + +#: c-api/intro.rst:130 msgid "" -"The initialization function must be named :samp:`PyInit_{name}`, where " -"*name* is the name of the module, and should be the only non-\\ ``static`` " -"item defined in the module file. Example::" +"The following are included for backwards compatibility, unless " +"using :ref:`Limited API ` 3.13 or newer:" +msgstr "" + +#: c-api/intro.rst:133 +msgid "````" msgstr "" #: c-api/intro.rst:134 -#, fuzzy -msgid "Return the absolute value of ``x``." -msgstr "Renvoie la valeur absolue de *x*." +msgid "```` (on POSIX)" +msgstr "" + +#: c-api/intro.rst:136 +msgid "" +"The following are included for backwards compatibility, unless " +"using :ref:`Limited API ` 3.11 or newer:" +msgstr "" + +#: c-api/intro.rst:139 +msgid "````" +msgstr "" #: c-api/intro.rst:140 +msgid "````" +msgstr "" + +#: c-api/intro.rst:141 +msgid "````" +msgstr "" + +#: c-api/intro.rst:151 +msgid "Useful macros" +msgstr "" + +#: c-api/intro.rst:153 msgid "" -"Ask the compiler to always inline a static inline function. The compiler can " -"ignore it and decides to not inline the function." +"Several useful macros are defined in the Python header files. Many are " +"defined closer to where they are useful (for " +"example, :c:macro:`Py_RETURN_NONE`, :c:macro:`PyMODINIT_FUNC`). Others of a " +"more general utility are defined here. This is not necessarily a complete " +"listing." msgstr "" -#: c-api/intro.rst:143 +#: c-api/intro.rst:161 msgid "" -"It can be used to inline performance critical static inline functions when " -"building Python in debug mode with function inlining disabled. For example, " -"MSC disables function inlining when building in debug mode." +"If this macro is defined, then the current system is able to start threads." msgstr "" -#: c-api/intro.rst:147 +#: c-api/intro.rst:163 msgid "" -"Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " -"worse performances (due to increased code size for example). The compiler is " -"usually smarter than the developer for the cost/benefit analysis." +"Currently, all systems supported by CPython (per :pep:`11`), with the " +"exception of some WebAssembly platforms, support starting threads." msgstr "" -#: c-api/intro.rst:151 +#: c-api/intro.rst:170 msgid "" -"If Python is :ref:`built in debug mode ` (if the :c:macro:" -"`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does " -"nothing." +"Like :samp:`getenv({s})`, but returns ``NULL`` if :option:`-E` was passed on " +"the command line (see :c:member:`PyConfig.use_environment`)." msgstr "" -#: c-api/intro.rst:154 -msgid "It must be specified before the function return type. Usage::" +#: c-api/intro.rst:175 +msgid "Docstring macros" msgstr "" -#: c-api/intro.rst:162 +#: c-api/intro.rst:179 msgid "" -"Argument must be a character or an integer in the range [-128, 127] or [0, " -"255]. This macro returns ``c`` cast to an ``unsigned char``." +"Creates a variable with name *name* that can be used in docstrings. If " +"Python is built without docstrings (:option:`--without-doc-strings`), the " +"value will be an empty string." +msgstr "" + +#: c-api/intro.rst:200 c-api/intro.rst:468 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/intro.rst:193 +msgid "Expands to :samp:`PyDoc_VAR({name}) = PyDoc_STR({str})`." msgstr "" -#: c-api/intro.rst:167 +#: c-api/intro.rst:197 msgid "" -"Use this for deprecated declarations. The macro must be placed before the " -"symbol name." +"Expands to the given input string, or an empty string if docstrings are " +"disabled (:option:`--without-doc-strings`)." msgstr "" -#: c-api/intro.rst:256 c-api/intro.rst:274 -msgid "Example::" +#: c-api/intro.rst:210 +msgid "" +"Declares a static character array variable with the given *name*. Expands " +"to :samp:`static const char {name}[]`" +msgstr "" + +#: c-api/intro.rst:354 c-api/intro.rst:365 +#, fuzzy +msgid "For example::" msgstr "Exemple ::" -#: c-api/intro.rst:174 -msgid "MSVC support was added." +#: c-api/intro.rst:221 +msgid "General utility macros" msgstr "" -#: c-api/intro.rst:179 +#: c-api/intro.rst:223 +msgid "The following macros are for common tasks not specific to Python." +msgstr "" + +#: c-api/intro.rst:227 msgid "" -"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " -"command line (see :c:member:`PyConfig.use_environment`)." +"Use this for unused arguments in a function definition to silence compiler " +"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." msgstr "" -#: c-api/intro.rst:184 -msgid "Return the maximum value between ``x`` and ``y``." +#: c-api/intro.rst:234 +msgid "" +"Use a GCC attribute *name*, hiding it from compilers that don't support GCC " +"attributes (such as MSVC)." msgstr "" -#: c-api/intro.rst:190 -msgid "Return the size of a structure (``type``) ``member`` in bytes." +#: c-api/intro.rst:237 +msgid "" +"This expands to :samp:`__attribute__(({name)})` on a GCC compiler, and " +"expands to nothing on compilers that don't support GCC attributes." msgstr "" -#: c-api/intro.rst:196 -msgid "Return the minimum value between ``x`` and ``y``." +#: c-api/intro.rst:242 +msgid "Numeric utilities" msgstr "" -#: c-api/intro.rst:202 +#: c-api/intro.rst:246 +#, fuzzy +msgid "Return the absolute value of ``x``." +msgstr "Renvoie la valeur absolue de *x*." + +#: c-api/intro.rst:248 msgid "" -"Disable inlining on a function. For example, it reduces the C stack " -"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" -"`33720`)." +"The argument may be evaluated more than once. Consequently, do not pass an " +"expression with side-effects directly to this macro." msgstr "" -#: c-api/intro.rst:206 -msgid "Usage::" -msgstr "Utilisation ::" +#: c-api/intro.rst:252 +msgid "" +"If the result cannot be represented (for example, if ``x`` has :c:macro:`!" +"INT_MIN` value for :c:expr:`int` type), the behavior is undefined." +msgstr "" + +#: c-api/intro.rst:256 +msgid "Corresponds roughly to :samp:`(({x}) < 0 ? -({x}) : ({x}))`" +msgstr "" + +#: c-api/intro.rst:263 +msgid "Return the larger or smaller of the arguments, respectively." +msgstr "" -#: c-api/intro.rst:214 +#: c-api/intro.rst:265 msgid "" -"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +"Any arguments may be evaluated more than once. Consequently, do not pass an " +"expression with side-effects directly to this macro." msgstr "" -#: c-api/intro.rst:221 +#: c-api/intro.rst:269 +msgid "" +":c:macro:`!Py_MAX` corresponds roughly to :samp:`((({x}) > ({y})) ? ({x}) : " +"({y}))`." +msgstr "" + +#: c-api/intro.rst:276 +msgid "" +"Similar to :samp:`{integer} >> {positions}`, but forces sign extension, as " +"the C standard does not define whether a right-shift of a signed integer " +"will perform sign extension or a zero-fill." +msgstr "" + +#: c-api/intro.rst:280 +msgid "" +"*integer* should be any signed integer type. *positions* is the number of " +"positions to shift to the right." +msgstr "" + +#: c-api/intro.rst:283 +msgid "" +"Both *integer* and *positions* can be evaluated more than once; " +"consequently, avoid directly passing a function call or some other operation " +"with side-effects to this macro. Instead, store the result as a variable and " +"then pass it." +msgstr "" + +#: c-api/intro.rst:288 +msgid "" +"*type* is unused and only kept for backwards compatibility. Historically, " +"*type* was used to cast *integer*." +msgstr "" + +#: c-api/intro.rst:293 +msgid "" +"This macro is now valid for all signed integer types, not just those for " +"which ``unsigned type`` is legal. As a result, *type* is no longer used." +msgstr "" + +#: c-api/intro.rst:299 +msgid "" +"Argument must be a character or an integer in the range [-128, 127] or [0, " +"255]. This macro returns ``c`` cast to an ``unsigned char``." +msgstr "" + +#: c-api/intro.rst:304 +msgid "Assertion utilities" +msgstr "" + +#: c-api/intro.rst:308 msgid "" "Use this when you have a code path that cannot be reached by design. For " "example, in the ``default:`` clause in a ``switch`` statement for which all " @@ -270,20 +422,26 @@ msgid "" "where you might be tempted to put an ``assert(0)`` or ``abort()`` call." msgstr "" -#: c-api/intro.rst:226 +#: c-api/intro.rst:313 msgid "" "In release mode, the macro helps the compiler to optimize the code, and " "avoids a warning about unreachable code. For example, the macro is " "implemented with ``__builtin_unreachable()`` on GCC in release mode." msgstr "" -#: c-api/intro.rst:230 +#: c-api/intro.rst:317 +msgid "" +"In debug mode, and on unsupported compilers, the macro expands to a call " +"to :c:func:`Py_FatalError`." +msgstr "" + +#: c-api/intro.rst:320 msgid "" -"A use for ``Py_UNREACHABLE()`` is following a call a function that never " -"returns but that is not declared :c:macro:`_Py_NO_RETURN`." +"A use for ``Py_UNREACHABLE()`` is following a call to a function that never " +"returns but that is not declared ``_Noreturn``." msgstr "" -#: c-api/intro.rst:233 +#: c-api/intro.rst:323 msgid "" "If a code path is very unlikely code but can be reached under exceptional " "case, this macro must not be used. For example, under low memory condition " @@ -292,41 +450,332 @@ msgid "" "reported to caller, :c:func:`Py_FatalError` can be used." msgstr "" -#: c-api/intro.rst:243 +#: c-api/intro.rst:333 msgid "" -"Use this for unused arguments in a function definition to silence compiler " -"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +"Cast *value* to type *smaller* from type *larger*, validating that no " +"information was lost." +msgstr "" + +#: c-api/intro.rst:336 +msgid "" +"On release builds of Python, this is roughly equivalent " +"to :samp:`(({smaller}) {value})` (in C++, :samp:`static_cast<{smaller}" +">({value})` will be used instead)." +msgstr "" + +#: c-api/intro.rst:340 +msgid "" +"On debug builds (implying that :c:macro:`Py_DEBUG` is defined), this asserts " +"that no information was lost with the cast from *larger* to *smaller*." +msgstr "" + +#: c-api/intro.rst:343 +msgid "" +"*value*, *larger*, and *smaller* may all be evaluated more than once in the " +"expression; consequently, do not pass an expression with side-effects " +"directly to this macro." +msgstr "" + +#: c-api/intro.rst:349 +msgid "" +"Asserts a compile-time condition *cond*, as a statement. The build will fail " +"if the condition is false or cannot be evaluated at compile time." +msgstr "" + +#: c-api/intro.rst:352 +msgid "Corresponds roughly to :samp:`static_assert({cond})` on C23 and above." +msgstr "" + +#: c-api/intro.rst:362 +msgid "" +"Asserts a compile-time condition *cond*, as an expression that evaluates to " +"``0``. The build will fail if the condition is false or cannot be evaluated " +"at compile time." +msgstr "" + +#: c-api/intro.rst:374 +msgid "Type size utilities" +msgstr "" + +#: c-api/intro.rst:378 +msgid "Compute the length of a statically allocated C array at compile time." msgstr "" -#: c-api/intro.rst:250 +#: c-api/intro.rst:380 msgid "" -"Creates a variable with name ``name`` that can be used in docstrings. If " -"Python is built without docstrings, the value will be empty." +"The *array* argument must be a C array with a size known at compile time. " +"Passing an array with an unknown size, such as a heap-allocated array, will " +"result in a compilation error on some compilers, or otherwise produce " +"incorrect results." msgstr "" -#: c-api/intro.rst:253 +#: c-api/intro.rst:385 +msgid "This is roughly equivalent to::" +msgstr "" + +#: c-api/intro.rst:391 +msgid "Return the size of a structure (*type*) *member* in bytes." +msgstr "" + +#: c-api/intro.rst:393 +msgid "Corresponds roughly to :samp:`sizeof((({type} *)NULL)->{member})`." +msgstr "" + +#: c-api/intro.rst:399 +msgid "Macro definition utilities" +msgstr "" + +#: c-api/intro.rst:403 msgid "" -"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"This is equivalent to :samp:`{X}`, which is useful for token-pasting in " +"macros, as macro expansions in *X* are forcefully evaluated by the " +"preprocessor." msgstr "" -#: c-api/intro.rst:268 +#: c-api/intro.rst:409 msgid "" -"Creates a docstring for the given input string or an empty string if " -"docstrings are disabled." +"Convert ``x`` to a C string. For example, ``Py_STRINGIFY(123)`` returns " +"``\"123\"``." +msgstr "" + +#: c-api/intro.rst:416 +msgid "Declaration utilities" msgstr "" -#: c-api/intro.rst:271 +#: c-api/intro.rst:418 msgid "" -"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"The following macros can be used in declarations. They are most useful for " +"defining the C API itself, and have limited use for extension authors. Most " +"of them expand to compiler-specific spellings of common extensions to the C " +"language." msgstr "" -#: c-api/intro.rst:286 +#: c-api/intro.rst:426 +msgid "" +"Ask the compiler to always inline a static inline function. The compiler can " +"ignore it and decide to not inline the function." +msgstr "" + +#: c-api/intro.rst:429 +msgid "" +"Corresponds to ``always_inline`` attribute in GCC and ``__forceinline`` in " +"MSVC." +msgstr "" + +#: c-api/intro.rst:432 +msgid "" +"It can be used to inline performance critical static inline functions when " +"building Python in debug mode with function inlining disabled. For example, " +"MSC disables function inlining when building in debug mode." +msgstr "" + +#: c-api/intro.rst:436 +msgid "" +"Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " +"worse performances (due to increased code size for example). The compiler is " +"usually smarter than the developer for the cost/benefit analysis." +msgstr "" + +#: c-api/intro.rst:440 +msgid "" +"If Python is :ref:`built in debug mode ` (if " +"the :c:macro:`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` " +"macro does nothing." +msgstr "" + +#: c-api/intro.rst:443 +msgid "It must be specified before the function return type. Usage::" +msgstr "" + +#: c-api/intro.rst:451 +msgid "" +"Disable inlining on a function. For example, it reduces the C stack " +"consumption: useful on LTO+PGO builds which heavily inline code " +"(see :issue:`33720`)." +msgstr "" + +#: c-api/intro.rst:455 +msgid "" +"Corresponds to the ``noinline`` attribute/specification on GCC and MSVC." +msgstr "" + +#: c-api/intro.rst:457 +msgid "Usage::" +msgstr "Utilisation ::" + +#: c-api/intro.rst:465 +msgid "" +"Use this to declare APIs that were deprecated in a specific CPython version. " +"The macro must be placed before the symbol name." +msgstr "" + +#: c-api/intro.rst:472 +msgid "MSVC support was added." +msgstr "" + +#: c-api/intro.rst:477 +msgid "" +"Declare a function returning the specified *type* using a fast-calling " +"qualifier for functions that are local to the current file. Semantically, " +"this is equivalent to :samp:`static {type}`." +msgstr "" + +#: c-api/intro.rst:483 +msgid "" +"Equivalent to :c:macro:`Py_LOCAL` but additionally requests the function be " +"inlined." +msgstr "" + +#: c-api/intro.rst:488 +msgid "" +"Macro used to declare a symbol as local to the shared library (hidden). On " +"supported platforms, it ensures the symbol is not exported." +msgstr "" + +#: c-api/intro.rst:491 +msgid "" +"On compatible versions of GCC/Clang, it expands to " +"``__attribute__((visibility(\"hidden\")))``." +msgstr "" + +#: c-api/intro.rst:496 +msgid "" +"Macro used to declare a symbol (function or data) as exported. On Windows, " +"this expands to ``__declspec(dllexport)``. On compatible versions of GCC/" +"Clang, it expands to ``__attribute__((visibility(\"default\")))``. This " +"macro is for defining the C API itself; extension modules should not use it." +msgstr "" + +#: c-api/intro.rst:505 +msgid "" +"Macro used to declare a symbol as imported. On Windows, this expands to " +"``__declspec(dllimport)``. This macro is for defining the C API itself; " +"extension modules should not use it." +msgstr "" + +#: c-api/intro.rst:512 +msgid "" +"Macro used by CPython to declare a function as part of the C API. Its " +"expansion depends on the platform and build configuration. This macro is " +"intended for defining CPython's C API itself; extension modules should not " +"use it for their own symbols." +msgstr "" + +#: c-api/intro.rst:520 +msgid "" +"Macro used by CPython to declare a public global variable as part of the C " +"API. Its expansion depends on the platform and build configuration. This " +"macro is intended for defining CPython's C API itself; extension modules " +"should not use it for their own symbols." +msgstr "" + +#: c-api/intro.rst:527 +msgid "Outdated macros" +msgstr "" + +#: c-api/intro.rst:529 +msgid "" +"The following :term:`soft deprecated` macros have been used to features that " +"have been standardized in C11 (or previous standards)." +msgstr "" + +#: c-api/intro.rst:534 +msgid "" +"On some GCC-like compilers, specify alignment to *num* bytes. This does " +"nothing on other compilers." +msgstr "" + +#: c-api/intro.rst:537 +msgid "Use the standard ``alignas`` specifier rather than this macro." +msgstr "" + +#: c-api/intro.rst:543 +msgid "" +"The :c:func:`printf` formatting modifier for :c:type:`size_t`. Use ``\"z\"`` " +"directly instead." +msgstr "" + +#: c-api/intro.rst:551 +msgid "" +"Use *number* as a ``long long`` or ``unsigned long long`` integer literal, " +"respectively." +msgstr "" + +#: c-api/intro.rst:554 +msgid "" +"Expands to *number* followed by ``LL`` or ``LLU``, respectively, but will " +"expand to some compiler-specific suffixes on some older compilers." +msgstr "" + +#: c-api/intro.rst:557 +msgid "Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly." +msgstr "" + +#: c-api/intro.rst:567 +msgid "" +"Aliases for the types :c:type:`!long long`, :c:type:`!int32_t`, :c:type:`!" +"uint32_t`. :c:type:`!int64_t` and :c:type:`!uint64_t`, respectively. " +"Historically, these types needed compiler-specific extensions." +msgstr "" + +#: c-api/intro.rst:579 +msgid "" +"Aliases for the values :c:macro:`!LLONG_MIN`, :c:macro:`!" +"LLONG_MAX`, :c:macro:`!ULLONG_MAX`, and :c:macro:`!SIZE_MAX`, respectively. " +"Use these standard names instead." +msgstr "" + +#: c-api/intro.rst:583 +msgid "" +"The required header, ````, :ref:`is included ` in ``Python.h``." +msgstr "" + +#: c-api/intro.rst:590 +msgid "This is an alias to :c:func:`!memcpy`." +msgstr "" + +#: c-api/intro.rst:592 +msgid "Use :c:func:`!memcpy` directly instead." +msgstr "" + +#: c-api/intro.rst:597 +msgid "" +"Size of the :c:type:`!wchar_t` type. Use ``sizeof(wchar_t)`` or " +"``WCHAR_WIDTH/8`` instead." +msgstr "" + +#: c-api/intro.rst:600 +msgid "" +"The required header for the latter, ````, :ref:`is included ` in ``Python.h``." +msgstr "" + +#: c-api/intro.rst:607 +msgid "" +"Defined if ``wchar_t`` can hold a Unicode character (UCS-4). Use " +"``sizeof(wchar_t) >= 4`` instead" +msgstr "" + +#: c-api/intro.rst:614 +msgid "This is an alias to the C99-standard ``va_copy`` function." +msgstr "" + +#: c-api/intro.rst:616 +msgid "" +"Historically, this would use a compiler-specific method to copy a " +"``va_list``." +msgstr "" + +#: c-api/intro.rst:618 +msgid "This is now an alias to ``va_copy``." +msgstr "" + +#: c-api/intro.rst:627 msgid "Objects, Types and Reference Counts" msgstr "" -#: c-api/intro.rst:290 +#: c-api/intro.rst:631 msgid "" "Most Python/C API functions have one or more arguments as well as a return " "value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " @@ -334,29 +783,29 @@ msgid "" "are treated the same way by the Python language in most situations (e.g., " "assignments, scope rules, and argument passing), it is only fitting that " "they should be represented by a single C type. Almost all Python objects " -"live on the heap: you never declare an automatic or static variable of type :" -"c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can " -"be declared. The sole exception are the type objects; since these must " +"live on the heap: you never declare an automatic or static variable of " +"type :c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` " +"can be declared. The sole exception are the type objects; since these must " "never be deallocated, they are typically static :c:type:`PyTypeObject` " "objects." msgstr "" -#: c-api/intro.rst:301 +#: c-api/intro.rst:642 msgid "" -"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" -"`reference count`. An object's type determines what kind of object it is (e." -"g., an integer, a list, or a user-defined function; there are many more as " -"explained in :ref:`types`). For each of the well-known types there is a " -"macro to check whether an object is of that type; for instance, " +"All Python objects (even Python integers) have a :dfn:`type` and " +"a :dfn:`reference count`. An object's type determines what kind of object " +"it is (e.g., an integer, a list, or a user-defined function; there are many " +"more as explained in :ref:`types`). For each of the well-known types there " +"is a macro to check whether an object is of that type; for instance, " "``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is " "a Python list." msgstr "" -#: c-api/intro.rst:312 +#: c-api/intro.rst:653 msgid "Reference Counts" msgstr "Compteurs de références" -#: c-api/intro.rst:314 +#: c-api/intro.rst:655 msgid "" "The reference count is important because today's computers have a finite " "(and often severely limited) memory size; it counts how many different " @@ -371,26 +820,26 @@ msgid "" "that.\")" msgstr "" -#: c-api/intro.rst:331 +#: c-api/intro.rst:672 msgid "" "Reference counts are always manipulated explicitly. The normal way is to " "use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. " "increment its reference count by one), and :c:func:`Py_DECREF` to release " -"that reference (i.e. decrement the reference count by one). The :c:func:" -"`Py_DECREF` macro is considerably more complex than the incref one, since it " -"must check whether the reference count becomes zero and then cause the " -"object's deallocator to be called. The deallocator is a function pointer " -"contained in the object's type structure. The type-specific deallocator " -"takes care of releasing references for other objects contained in the object " -"if this is a compound object type, such as a list, as well as performing any " -"additional finalization that's needed. There's no chance that the reference " -"count can overflow; at least as many bits are used to hold the reference " -"count as there are distinct memory locations in virtual memory (assuming " -"``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the reference count " -"increment is a simple operation." -msgstr "" - -#: c-api/intro.rst:347 +"that reference (i.e. decrement the reference count by one). " +"The :c:func:`Py_DECREF` macro is considerably more complex than the incref " +"one, since it must check whether the reference count becomes zero and then " +"cause the object's deallocator to be called. The deallocator is a function " +"pointer contained in the object's type structure. The type-specific " +"deallocator takes care of releasing references for other objects contained " +"in the object if this is a compound object type, such as a list, as well as " +"performing any additional finalization that's needed. There's no chance " +"that the reference count can overflow; at least as many bits are used to " +"hold the reference count as there are distinct memory locations in virtual " +"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the " +"reference count increment is a simple operation." +msgstr "" + +#: c-api/intro.rst:688 msgid "" "It is not necessary to hold a :term:`strong reference` (i.e. increment the " "reference count) for every local variable that contains a pointer to an " @@ -408,18 +857,18 @@ msgid "" "reference to every argument for the duration of the call." msgstr "" -#: c-api/intro.rst:363 +#: c-api/intro.rst:704 msgid "" "However, a common pitfall is to extract an object from a list and hold on to " "it for a while without taking a new reference. Some other operation might " "conceivably remove the object from the list, releasing that reference, and " "possibly deallocating it. The real danger is that innocent-looking " "operations may invoke arbitrary Python code which could do this; there is a " -"code path which allows control to flow back to the user from a :c:func:" -"`Py_DECREF`, so almost any operation is potentially dangerous." +"code path which allows control to flow back to the user from " +"a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" -#: c-api/intro.rst:371 +#: c-api/intro.rst:712 msgid "" "A safe approach is to always use the generic operations (functions whose " "name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " @@ -429,11 +878,11 @@ msgid "" "when they are done with the result; this soon becomes second nature." msgstr "" -#: c-api/intro.rst:382 +#: c-api/intro.rst:723 msgid "Reference Count Details" msgstr "" -#: c-api/intro.rst:384 +#: c-api/intro.rst:725 msgid "" "The reference count behavior of functions in the Python/C API is best " "explained in terms of *ownership of references*. Ownership pertains to " @@ -441,16 +890,16 @@ msgid "" "shared). \"Owning a reference\" means being responsible for calling " "Py_DECREF on it when the reference is no longer needed. Ownership can also " "be transferred, meaning that the code that receives ownership of the " -"reference then becomes responsible for eventually releasing it by calling :c:" -"func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or " -"passing on this responsibility (usually to its caller). When a function " -"passes ownership of a reference on to its caller, the caller is said to " -"receive a *new* reference. When no ownership is transferred, the caller is " -"said to *borrow* the reference. Nothing needs to be done for a :term:" -"`borrowed reference`." +"reference then becomes responsible for eventually releasing it by " +"calling :c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer " +"needed---or passing on this responsibility (usually to its caller). When a " +"function passes ownership of a reference on to its caller, the caller is " +"said to receive a *new* reference. When no ownership is transferred, the " +"caller is said to *borrow* the reference. Nothing needs to be done for " +"a :term:`borrowed reference`." msgstr "" -#: c-api/intro.rst:397 +#: c-api/intro.rst:738 msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " @@ -459,19 +908,19 @@ msgid "" "reference, and you are not responsible for it any longer." msgstr "" -#: c-api/intro.rst:407 +#: c-api/intro.rst:748 msgid "" -"Few functions steal references; the two notable exceptions are :c:func:" -"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " -"the item (but not to the tuple or list into which the item is put!). These " -"functions were designed to steal a reference because of a common idiom for " -"populating a tuple or list with newly created objects; for example, the code " -"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting " -"about error handling for the moment; a better way to code this is shown " -"below)::" +"Few functions steal references; the two notable exceptions " +"are :c:func:`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a " +"reference to the item (but not to the tuple or list into which the item is " +"put!). These functions were designed to steal a reference because of a " +"common idiom for populating a tuple or list with newly created objects; for " +"example, the code to create the tuple ``(1, 2, \"three\")`` could look like " +"this (forgetting about error handling for the moment; a better way to code " +"this is shown below)::" msgstr "" -#: c-api/intro.rst:422 +#: c-api/intro.rst:763 msgid "" "Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " "stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " @@ -479,30 +928,31 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: c-api/intro.rst:427 +#: c-api/intro.rst:768 msgid "" "Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " "items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " -"do this since tuples are an immutable data type. You should only use :c:" -"func:`PyTuple_SetItem` for tuples that you are creating yourself." +"do this since tuples are an immutable data type. You should only " +"use :c:func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: c-api/intro.rst:432 +#: c-api/intro.rst:773 msgid "" -"Equivalent code for populating a list can be written using :c:func:" -"`PyList_New` and :c:func:`PyList_SetItem`." +"Equivalent code for populating a list can be written " +"using :c:func:`PyList_New` and :c:func:`PyList_SetItem`." msgstr "" -#: c-api/intro.rst:435 +#: c-api/intro.rst:776 msgid "" "However, in practice, you will rarely use these ways of creating and " -"populating a tuple or list. There's a generic function, :c:func:" -"`Py_BuildValue`, that can create most common objects from C values, directed " -"by a :dfn:`format string`. For example, the above two blocks of code could " -"be replaced by the following (which also takes care of the error checking)::" +"populating a tuple or list. There's a generic " +"function, :c:func:`Py_BuildValue`, that can create most common objects from " +"C values, directed by a :dfn:`format string`. For example, the above two " +"blocks of code could be replaced by the following (which also takes care of " +"the error checking)::" msgstr "" -#: c-api/intro.rst:446 +#: c-api/intro.rst:787 msgid "" "It is much more common to use :c:func:`PyObject_SetItem` and friends with " "items whose references you are only borrowing, like arguments that were " @@ -513,7 +963,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: c-api/intro.rst:476 +#: c-api/intro.rst:817 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -526,7 +976,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: c-api/intro.rst:485 +#: c-api/intro.rst:826 msgid "" "It is important to realize that whether you own a reference returned by a " "function depends on which function you call only --- *the plumage* (the type " @@ -537,29 +987,29 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: c-api/intro.rst:497 +#: c-api/intro.rst:838 msgid "" "Here is an example of how you could write a function that computes the sum " "of the items in a list of integers; once using :c:func:`PyList_GetItem`, " "and once using :c:func:`PySequence_GetItem`. ::" msgstr "" -#: c-api/intro.rst:561 +#: c-api/intro.rst:902 msgid "Types" msgstr "" -#: c-api/intro.rst:563 +#: c-api/intro.rst:904 msgid "" "There are few other data types that play a significant role in the Python/C " -"API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" -"`double` and :c:expr:`char*`. A few structure types are used to describe " -"static tables used to list the functions exported by a module or the data " -"attributes of a new object type, and another is used to describe the value " -"of a complex number. These will be discussed together with the functions " -"that use them." +"API; most are simple C types such " +"as :c:expr:`int`, :c:expr:`long`, :c:expr:`double` and :c:expr:`char*`. A " +"few structure types are used to describe static tables used to list the " +"functions exported by a module or the data attributes of a new object type, " +"and another is used to describe the value of a complex number. These will " +"be discussed together with the functions that use them." msgstr "" -#: c-api/intro.rst:573 +#: c-api/intro.rst:914 msgid "" "A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " "C99 doesn't define such a thing directly (size_t is an unsigned integral " @@ -567,11 +1017,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: c-api/intro.rst:582 +#: c-api/intro.rst:923 msgid "Exceptions" msgstr "Exceptions" -#: c-api/intro.rst:584 +#: c-api/intro.rst:925 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -580,7 +1030,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:592 +#: c-api/intro.rst:933 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -595,47 +1045,47 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:607 +#: c-api/intro.rst:948 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " -"of two states: an exception has occurred, or not. The function :c:func:" -"`PyErr_Occurred` can be used to check for this: it returns a borrowed " -"reference to the exception type object when an exception has occurred, and " -"``NULL`` otherwise. There are a number of functions to set the exception " -"state: :c:func:`PyErr_SetString` is the most common (though not the most " -"general) function to set the exception state, and :c:func:`PyErr_Clear` " -"clears the exception state." +"of two states: an exception has occurred, or not. The " +"function :c:func:`PyErr_Occurred` can be used to check for this: it returns " +"a borrowed reference to the exception type object when an exception has " +"occurred, and ``NULL`` otherwise. There are a number of functions to set " +"the exception state: :c:func:`PyErr_SetString` is the most common (though " +"not the most general) function to set the exception state, " +"and :c:func:`PyErr_Clear` clears the exception state." msgstr "" -#: c-api/intro.rst:617 +#: c-api/intro.rst:958 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " -"traceback. These have the same meanings as the Python result of ``sys." -"exc_info()``; however, they are not the same: the Python objects represent " -"the last exception being handled by a Python :keyword:`try` ... :keyword:" -"`except` statement, while the C level exception state only exists while an " -"exception is being passed on between C functions until it reaches the Python " -"bytecode interpreter's main loop, which takes care of transferring it to " -"``sys.exc_info()`` and friends." +"traceback. These have the same meanings as the Python result of " +"``sys.exc_info()``; however, they are not the same: the Python objects " +"represent the last exception being handled by a " +"Python :keyword:`try` ... :keyword:`except` statement, while the C level " +"exception state only exists while an exception is being passed on between C " +"functions until it reaches the Python bytecode interpreter's main loop, " +"which takes care of transferring it to ``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:629 +#: c-api/intro.rst:970 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " -"the exception state from Python code is to call the function :func:`sys." -"exc_info`, which returns the per-thread exception state for Python code. " -"Also, the semantics of both ways to access the exception state have changed " -"so that a function which catches an exception will save and restore its " -"thread's exception state so as to preserve the exception state of its " -"caller. This prevents common bugs in exception handling code caused by an " -"innocent-looking function overwriting the exception being handled; it also " -"reduces the often unwanted lifetime extension for objects that are " -"referenced by the stack frames in the traceback." +"the exception state from Python code is to call the " +"function :func:`sys.exc_info`, which returns the per-thread exception state " +"for Python code. Also, the semantics of both ways to access the exception " +"state have changed so that a function which catches an exception will save " +"and restore its thread's exception state so as to preserve the exception " +"state of its caller. This prevents common bugs in exception handling code " +"caused by an innocent-looking function overwriting the exception being " +"handled; it also reduces the often unwanted lifetime extension for objects " +"that are referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:640 +#: c-api/intro.rst:981 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -646,7 +1096,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:649 +#: c-api/intro.rst:990 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`!sum_sequence` example above. It so happens that this example " @@ -655,28 +1105,28 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:664 +#: c-api/intro.rst:1005 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:716 +#: c-api/intro.rst:1057 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " -"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" -"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:" -"`Py_XDECREF` to dispose of owned references that may be ``NULL`` (note the " -"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a " -"``NULL`` reference). It is important that the variables used to hold owned " -"references are initialized to ``NULL`` for this to work; likewise, the " -"proposed return value is initialized to ``-1`` (failure) and only set to " -"success after the final call made is successful." +"illustrates the use of :c:func:`PyErr_ExceptionMatches` " +"and :c:func:`PyErr_Clear` to handle specific exceptions, and the use " +"of :c:func:`Py_XDECREF` to dispose of owned references that may be ``NULL`` " +"(note the ``'X'`` in the name; :c:func:`Py_DECREF` would crash when " +"confronted with a ``NULL`` reference). It is important that the variables " +"used to hold owned references are initialized to ``NULL`` for this to work; " +"likewise, the proposed return value is initialized to ``-1`` (failure) and " +"only set to success after the final call made is successful." msgstr "" -#: c-api/intro.rst:730 +#: c-api/intro.rst:1071 msgid "Embedding Python" msgstr "Embarquer Python" -#: c-api/intro.rst:732 +#: c-api/intro.rst:1073 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -684,7 +1134,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:745 +#: c-api/intro.rst:1086 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -692,15 +1142,16 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:750 +#: c-api/intro.rst:1091 msgid "" -":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." -"argv``). If this variable is needed by Python code that will be executed " -"later, setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` " -"must be set: see :ref:`Python Initialization Configuration `." +":c:func:`Py_Initialize` does not set the \"script argument list\" " +"(``sys.argv``). If this variable is needed by Python code that will be " +"executed later, setting :c:member:`PyConfig.argv` " +"and :c:member:`PyConfig.parse_argv` must be set: see :ref:`Python " +"Initialization Configuration `." msgstr "" -#: c-api/intro.rst:755 +#: c-api/intro.rst:1096 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -712,96 +1163,186 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:764 +#: c-api/intro.rst:1105 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" "python{X.Y}`. (In fact, this particular path is also the \"fallback\" " -"location, used when no executable file named :file:`python` is found along :" -"envvar:`PATH`.) The user can override this behavior by setting the " +"location, used when no executable file named :file:`python` is found " +"along :envvar:`PATH`.) The user can override this behavior by setting the " "environment variable :envvar:`PYTHONHOME`, or insert additional directories " "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:778 +#: c-api/intro.rst:1113 msgid "" -"The embedding application can steer the search by setting :c:member:" -"`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " -"Note that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` " -"is still inserted in front of the standard path. An application that " -"requires total control has to provide its own implementation of :c:func:" -"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:" -"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." +"The embedding application can steer the search by " +"setting :c:member:`PyConfig.program_name` *before* " +"calling :c:func:`Py_InitializeFromConfig`. Note that :envvar:`PYTHONHOME` " +"still overrides this and :envvar:`PYTHONPATH` is still inserted in front of " +"the standard path." msgstr "" -#: c-api/intro.rst:789 +#: c-api/intro.rst:1121 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " -"application may want to start over (make another call to :c:func:" -"`Py_Initialize`) or the application is simply done with its use of Python " -"and wants to free memory allocated by Python. This can be accomplished by " -"calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` " -"returns true if Python is currently in the initialized state. More " -"information about these functions is given in a later chapter. Notice that :" -"c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python " -"interpreter, e.g. memory allocated by extension modules currently cannot be " -"released." -msgstr "" - -#: c-api/intro.rst:803 +"application may want to start over (make another call " +"to :c:func:`Py_Initialize`) or the application is simply done with its use " +"of Python and wants to free memory allocated by Python. This can be " +"accomplished by calling :c:func:`Py_FinalizeEx`. The " +"function :c:func:`Py_IsInitialized` returns true if Python is currently in " +"the initialized state. More information about these functions is given in a " +"later chapter. Notice that :c:func:`Py_FinalizeEx` does *not* free all " +"memory allocated by the Python interpreter, e.g. memory allocated by " +"extension modules currently cannot be released." +msgstr "" + +#: c-api/intro.rst:1135 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:805 +#: c-api/intro.rst:1137 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: c-api/intro.rst:809 +#: c-api/intro.rst:1141 msgid "" -"A full list of the various types of debugging builds is in the file :file:" -"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " -"available that support tracing of reference counts, debugging the memory " -"allocator, or low-level profiling of the main interpreter loop. Only the " -"most frequently used builds will be described in the remainder of this " +"A full list of the various types of debugging builds is in the " +"file :file:`Misc/SpecialBuilds.txt` in the Python source distribution. " +"Builds are available that support tracing of reference counts, debugging the " +"memory allocator, or low-level profiling of the main interpreter loop. Only " +"the most frequently used builds will be described in the remainder of this " "section." msgstr "" -#: c-api/intro.rst:817 +#: c-api/intro.rst:1149 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`!Py_DEBUG` is enabled in the Unix build by adding :option:" -"`--with-pydebug` to the :file:`./configure` command. It is also implied by " -"the presence of the not-Python-specific :c:macro:`!_DEBUG` macro. When :c:" -"macro:`!Py_DEBUG` is enabled in the Unix build, compiler optimization is " -"disabled." +"build>`." +msgstr "" + +#: c-api/intro.rst:1152 +msgid "" +"On Unix, :c:macro:`!Py_DEBUG` can be enabled by adding :option:`--with-" +"pydebug` to the :file:`./configure` command. This will also disable compiler " +"optimization." msgstr "" -#: c-api/intro.rst:825 +#: c-api/intro.rst:1155 +msgid "" +"On Windows, selecting a debug build (e.g., by passing the :option:`-d` " +"option to :file:`PCbuild/build.bat`) automatically enables :c:macro:`!" +"Py_DEBUG`. Additionally, the presence of the not-Python-specific :c:macro:`!" +"_DEBUG` macro, when defined by the compiler, will also implicitly " +"enable :c:macro:`!Py_DEBUG`." +msgstr "" + +#: c-api/intro.rst:1160 msgid "" "In addition to the reference count debugging described below, extra checks " -"are performed, see :ref:`Python Debug Build `." +"are performed. See :ref:`Python Debug Build ` for more details." msgstr "" -#: c-api/intro.rst:828 +#: c-api/intro.rst:1163 msgid "" -"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" -"`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " -"circular doubly linked list of active objects is maintained by adding two " -"extra fields to every :c:type:`PyObject`. Total allocations are tracked as " -"well. Upon exit, all existing references are printed. (In interactive mode " -"this happens after every statement run by the interpreter.)" +"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see " +"the :option:`configure --with-trace-refs option <--with-trace-refs>`). When " +"defined, a circular doubly linked list of active objects is maintained by " +"adding two extra fields to every :c:type:`PyObject`. Total allocations are " +"tracked as well. Upon exit, all existing references are printed. (In " +"interactive mode this happens after every statement run by the interpreter.)" msgstr "" -#: c-api/intro.rst:835 +#: c-api/intro.rst:1170 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." msgstr "" +#: c-api/intro.rst:1177 +msgid "Recommended third party tools" +msgstr "Les outils tiers recommandés" + +#: c-api/intro.rst:1179 +msgid "" +"The following third party tools offer both simpler and more sophisticated " +"approaches to creating C, C++ and Rust extensions for Python:" +msgstr "" + +#: c-api/intro.rst:1182 +msgid "`Cython `_" +msgstr "" + +#: c-api/intro.rst:1183 +msgid "`cffi `_" +msgstr "" + +#: c-api/intro.rst:1184 +msgid "`HPy `_" +msgstr "" + +#: c-api/intro.rst:1185 +msgid "`nanobind `_ (C++)" +msgstr "" + +#: c-api/intro.rst:1186 +msgid "`Numba `_" +msgstr "" + +#: c-api/intro.rst:1187 +msgid "`pybind11 `_ (C++)" +msgstr "" + +#: c-api/intro.rst:1188 +msgid "`PyO3 `_ (Rust)" +msgstr "" + +#: c-api/intro.rst:1189 +msgid "`SWIG `_" +msgstr "" + +#: c-api/intro.rst:1191 +msgid "" +"Using tools such as these can help avoid writing code that is tightly bound " +"to a particular version of CPython, avoid reference counting errors, and " +"focus more on your own code than on using the CPython API. In general, new " +"versions of Python can be supported by updating the tool, and your code will " +"often use newer and more efficient APIs automatically. Some tools also " +"support compiling for other implementations of Python from a single set of " +"sources." +msgstr "" + +#: c-api/intro.rst:1198 +msgid "" +"These projects are not supported by the same people who maintain Python, and " +"issues need to be raised with the projects directly. Remember to check that " +"the project is still maintained and supported, as the list above may become " +"outdated." +msgstr "" + +#: c-api/intro.rst:1205 +msgid "" +"`Python Packaging User Guide: Binary Extensions `_" +msgstr "" +"`Guide d'utilisation de l'empaquetage Python : Extensions binaires `_" + +#: c-api/intro.rst:1206 +msgid "" +"The Python Packaging User Guide not only covers several available tools that " +"simplify the creation of binary extensions, but also discusses the various " +"reasons why creating an extension module may be desirable in the first place." +msgstr "" +"Le guide d'utilisation de l'empaquetage Python ne couvre pas uniquement " +"quelques outils disponibles qui simplifient la création d'extensions " +"binaires, mais aborde aussi les différentes raisons pour lesquelles créer un " +"module d'extension peut être souhaitable d'entrée." + #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/iter.po b/c-api/iter.po index 97256a3ff..2dc924aa0 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -25,18 +25,33 @@ msgstr "Il existe deux fonctions dédiées à l'interaction avec les itérateurs #: c-api/iter.rst:12 #, fuzzy msgid "" -"Return non-zero if the object *o* can be safely passed to :c:func:" -"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." +"Return non-zero if the object *o* can be safely passed " +"to :c:func:`PyIter_NextItem` and ``0`` otherwise. This function always " +"succeeds." msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." -#: c-api/iter.rst:17 +#: c-api/iter.rst:18 #, fuzzy msgid "" "Return non-zero if the object *o* provides the :class:`AsyncIterator` " "protocol, and ``0`` otherwise. This function always succeeds." msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." -#: c-api/iter.rst:24 +#: c-api/iter.rst:25 +msgid "" +"Return ``1`` and set *item* to a :term:`strong reference` of the next value " +"of the iterator *iter* on success. Return ``0`` and set *item* to ``NULL`` " +"if there are no remaining values. Return ``-1``, set *item* to ``NULL`` and " +"set an exception on error." +msgstr "" + +#: c-api/iter.rst:34 +msgid "" +"This is an older version of :c:func:`!PyIter_NextItem`, which is retained " +"for backwards compatibility. Prefer :c:func:`PyIter_NextItem`." +msgstr "" + +#: c-api/iter.rst:38 #, fuzzy msgid "" "Return the next value from the iterator *o*. The object must be an iterator " @@ -51,35 +66,34 @@ msgstr "" "déclarant une exception si une erreur survient lors de la récupération d'un " "élément." -#: c-api/iter.rst:30 -msgid "" -"To write a loop which iterates over an iterator, the C code should look " -"something like this::" -msgstr "" -"Pour écrire une boucle itérant un itérateur, le code C devrait ressembler " -"à ::" - -#: c-api/iter.rst:59 +#: c-api/iter.rst:46 msgid "" "The enum value used to represent different results of :c:func:`PyIter_Send`." msgstr "" -#: c-api/iter.rst:66 +#: c-api/iter.rst:53 msgid "Sends the *arg* value into the iterator *iter*. Returns:" msgstr "" -#: c-api/iter.rst:68 +#: c-api/iter.rst:55 msgid "" "``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." msgstr "" -#: c-api/iter.rst:69 +#: c-api/iter.rst:56 msgid "" "``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." msgstr "" -#: c-api/iter.rst:70 +#: c-api/iter.rst:57 msgid "" -"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " +"``PYGEN_ERROR`` if iterator has raised an exception. *presult* is set to " "``NULL``." msgstr "" + +#~ msgid "" +#~ "To write a loop which iterates over an iterator, the C code should look " +#~ "something like this::" +#~ msgstr "" +#~ "Pour écrire une boucle itérant un itérateur, le code C devrait ressembler " +#~ "à ::" diff --git a/c-api/iterator.po b/c-api/iterator.po index dfe6e2b0d..839b932ca 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 14:38+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-03-26 17:16+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -22,10 +22,10 @@ msgstr "Itérateurs" #, fuzzy msgid "" "Python provides two general-purpose iterator objects. The first, a sequence " -"iterator, works with an arbitrary sequence supporting the :meth:`~object." -"__getitem__` method. The second works with a callable object and a sentinel " -"value, calling the callable for each item in the sequence, and ending the " -"iteration when the sentinel value is returned." +"iterator, works with an arbitrary sequence supporting " +"the :meth:`~object.__getitem__` method. The second works with a callable " +"object and a sentinel value, calling the callable for each item in the " +"sequence, and ending the iteration when the sentinel value is returned." msgstr "" "Python fournit deux itérateurs d'usage générique. Le premier est un " "itérateur de séquence, il fonctionne avec n'importe quelle séquence " @@ -65,8 +65,8 @@ msgid "" "Type object for iterator objects returned by :c:func:`PyCallIter_New` and " "the two-argument form of the :func:`iter` built-in function." msgstr "" -"Type de l'itérateur renvoyé par les fonctions :c:func:`PyCallIter_New` et :" -"func:`iter` à deux arguments." +"Type de l'itérateur renvoyé par les fonctions :c:func:`PyCallIter_New` " +"et :func:`iter` à deux arguments." #: c-api/iterator.rst:43 #, fuzzy @@ -86,3 +86,80 @@ msgstr "" "n'importe quel objet Python appelable sans aucun paramètre ; chaque appel " "doit renvoyer l'élément suivant de l'itération. Lorsque *callable* renvoie " "une valeur égale à *sentinel*, l'itération prend fin." + +#: c-api/iterator.rst:56 +#, fuzzy +msgid "Range Objects" +msgstr "Itérateurs" + +#: c-api/iterator.rst:60 +msgid "The type object for :class:`range` objects." +msgstr "" + +#: c-api/iterator.rst:65 +#, fuzzy +msgid "" +"Return true if the object *o* is an instance of a :class:`range` object. " +"This function always succeeds." +msgstr "Renvoie vrai si *op* est de type :c:data:`PySeqIter_Type`." + +#: c-api/iterator.rst:70 +msgid "Builtin Iterator Types" +msgstr "" + +#: c-api/iterator.rst:72 +msgid "" +"These are built-in iteration types that are included in Python's C API, but " +"provide no additional functions. They are here for completeness." +msgstr "" + +#: c-api/iterator.rst:80 +msgid "C type" +msgstr "" + +#: c-api/iterator.rst:81 +msgid "Python type" +msgstr "" + +#: c-api/iterator.rst:83 +msgid ":py:class:`enumerate`" +msgstr "" + +#: c-api/iterator.rst:85 +msgid ":py:class:`filter`" +msgstr "" + +#: c-api/iterator.rst:87 +msgid ":py:class:`map`" +msgstr "" + +#: c-api/iterator.rst:89 +msgid ":py:class:`reversed`" +msgstr "" + +#: c-api/iterator.rst:91 +msgid ":py:class:`zip`" +msgstr "" + +#: c-api/iterator.rst:95 +#, fuzzy +msgid "Other Iterator Objects" +msgstr "Itérateurs" + +#: c-api/iterator.rst:113 +msgid "Type objects for iterators of various built-in objects." +msgstr "" + +#: c-api/iterator.rst:115 +msgid "" +"Do not create instances of these directly; prefer " +"calling :c:func:`PyObject_GetIter` instead." +msgstr "" + +#: c-api/iterator.rst:118 +msgid "" +"Note that there is no guarantee that a given built-in type uses a given " +"iterator type. For example, iterating over :class:`range` will use one of " +"two iterator types depending on the size of the range. Other types may start " +"using a similar scheme in the future, without warning." +msgstr "" diff --git a/c-api/lifecycle.po b/c-api/lifecycle.po new file mode 100644 index 000000000..67b4967eb --- /dev/null +++ b/c-api/lifecycle.po @@ -0,0 +1,363 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/lifecycle.rst:6 +msgid "Object Life Cycle" +msgstr "" + +#: c-api/lifecycle.rst:8 +msgid "" +"This section explains how a type's slots relate to each other throughout the " +"life of an object. It is not intended to be a complete canonical reference " +"for the slots; instead, refer to the slot-specific documentation " +"in :ref:`type-structs` for details about a particular slot." +msgstr "" + +#: c-api/lifecycle.rst:15 +msgid "Life Events" +msgstr "" + +#: c-api/lifecycle.rst:17 +msgid "" +"The figure below illustrates the order of events that can occur throughout " +"an object's life. An arrow from *A* to *B* indicates that event *B* can " +"occur after event *A* has occurred, with the arrow's label indicating the " +"condition that must be true for *B* to occur after *A*." +msgstr "" + +#: c-api/lifecycle.rst:62 +msgid "Diagram showing events in an object's life. Explained in detail below." +msgstr "" + +#: c-api/lifecycle.rst:70 +msgid "Explanation:" +msgstr "" + +#: c-api/lifecycle.rst:72 +msgid "When a new object is constructed by calling its type:" +msgstr "" + +#: c-api/lifecycle.rst:74 +msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." +msgstr "" + +#: c-api/lifecycle.rst:75 +msgid "" +":c:member:`~PyTypeObject.tp_alloc` is directly called " +"by :c:member:`~PyTypeObject.tp_new` to allocate the memory for the new " +"object." +msgstr "" + +#: c-api/lifecycle.rst:78 +msgid "" +":c:member:`~PyTypeObject.tp_init` initializes the newly created " +"object. :c:member:`!tp_init` can be called again to re-initialize an object, " +"if desired. The :c:member:`!tp_init` call can also be skipped entirely, for " +"example by Python code calling :py:meth:`~object.__new__`." +msgstr "" + +#: c-api/lifecycle.rst:83 +msgid "After :c:member:`!tp_init` completes, the object is ready to use." +msgstr "" + +#: c-api/lifecycle.rst:84 +msgid "Some time after the last reference to an object is removed:" +msgstr "" + +#: c-api/lifecycle.rst:86 +msgid "" +"If an object is not marked as *finalized*, it might be finalized by marking " +"it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` " +"function. Python does *not* finalize an object when the last reference to " +"it is deleted; use :c:func:`PyObject_CallFinalizerFromDealloc` to ensure " +"that :c:member:`~PyTypeObject.tp_finalize` is always called." +msgstr "" + +#: c-api/lifecycle.rst:92 +msgid "" +"If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` " +"might be called by the garbage collector to clear references held by the " +"object. It is *not* called when the object's reference count reaches zero." +msgstr "" + +#: c-api/lifecycle.rst:96 +msgid "" +":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To " +"avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls " +"into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." +msgstr "" + +#: c-api/lifecycle.rst:100 +msgid "" +"When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it " +"directly calls :c:member:`~PyTypeObject.tp_free` (usually set " +"to :c:func:`PyObject_Free` or :c:func:`PyObject_GC_Del` automatically as " +"appropriate for the type) to deallocate the memory." +msgstr "" + +#: c-api/lifecycle.rst:105 +msgid "" +"The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a " +"reference to the object if desired. If it does, the object is " +"*resurrected*, preventing its pending destruction. (Only :c:member:`!" +"tp_finalize` is allowed to resurrect an " +"object; :c:member:`~PyTypeObject.tp_clear` " +"and :c:member:`~PyTypeObject.tp_dealloc` cannot without calling " +"into :c:member:`!tp_finalize`.) Resurrecting an object may or may not cause " +"the object's *finalized* mark to be removed. Currently, Python does not " +"remove the *finalized* mark from a resurrected object if it supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set) but does " +"remove the mark if the object does not support garbage collection; either or " +"both of these behaviors may change in the future." +msgstr "" + +#: c-api/lifecycle.rst:118 +msgid "" +":c:member:`~PyTypeObject.tp_dealloc` can optionally " +"call :c:member:`~PyTypeObject.tp_finalize` " +"via :c:func:`PyObject_CallFinalizerFromDealloc` if it wishes to reuse that " +"code to help with object destruction. This is recommended because it " +"guarantees that :c:member:`!tp_finalize` is always called before " +"destruction. See the :c:member:`~PyTypeObject.tp_dealloc` documentation for " +"example code." +msgstr "" + +#: c-api/lifecycle.rst:125 +msgid "" +"If the object is a member of a :term:`cyclic isolate` and " +"either :c:member:`~PyTypeObject.tp_clear` fails to break the reference cycle " +"or the cyclic isolate is not detected (perhaps :func:`gc.disable` was " +"called, or the :c:macro:`Py_TPFLAGS_HAVE_GC` flag was erroneously omitted in " +"one of the involved types), the objects remain indefinitely uncollectable " +"(they \"leak\"). See :data:`gc.garbage`." +msgstr "" + +#: c-api/lifecycle.rst:132 +msgid "" +"If the object is marked as supporting garbage collection " +"(the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set " +"in :c:member:`~PyTypeObject.tp_flags`), the following events are also " +"possible:" +msgstr "" + +#: c-api/lifecycle.rst:136 +msgid "" +"The garbage collector occasionally " +"calls :c:member:`~PyTypeObject.tp_traverse` to identify :term:`cyclic " +"isolates `." +msgstr "" + +#: c-api/lifecycle.rst:139 +msgid "" +"When the garbage collector discovers a :term:`cyclic isolate`, it finalizes " +"one of the objects in the group by marking it as *finalized* and calling " +"its :c:member:`~PyTypeObject.tp_finalize` function, if it has one. This " +"repeats until the cyclic isolate doesn't exist or all of the objects have " +"been finalized." +msgstr "" + +#: c-api/lifecycle.rst:144 +msgid "" +":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object " +"by adding a reference from outside the :term:`cyclic isolate`. The new " +"reference causes the group of objects to no longer form a cyclic isolate " +"(the reference cycle may still exist, but if it does the objects are no " +"longer isolated)." +msgstr "" + +#: c-api/lifecycle.rst:149 +msgid "" +"When the garbage collector discovers a :term:`cyclic isolate` and all of the " +"objects in the group have already been marked as *finalized*, the garbage " +"collector clears one or more of the uncleared objects in the group (possibly " +"concurrently) by calling each's :c:member:`~PyTypeObject.tp_clear` " +"function. This repeats as long as the cyclic isolate still exists and not " +"all of the objects have been cleared." +msgstr "" + +#: c-api/lifecycle.rst:158 +msgid "Cyclic Isolate Destruction" +msgstr "" + +#: c-api/lifecycle.rst:160 +msgid "" +"Listed below are the stages of life of a hypothetical :term:`cyclic isolate` " +"that continues to exist after each member object is finalized or cleared. " +"It is a memory leak if a cyclic isolate progresses through all of these " +"stages; it should vanish once all objects are cleared, if not sooner. A " +"cyclic isolate can vanish either because the reference cycle is broken or " +"because the objects are no longer isolated due to finalizer resurrection " +"(see :c:member:`~PyTypeObject.tp_finalize`)." +msgstr "" + +#: c-api/lifecycle.rst:168 +msgid "" +"**Reachable** (not yet a cyclic isolate): All objects are in their normal, " +"reachable state. A reference cycle could exist, but an external reference " +"means the objects are not yet isolated." +msgstr "" + +#: c-api/lifecycle.rst:171 +msgid "" +"**Unreachable but consistent:** The final reference from outside the cyclic " +"group of objects has been removed, causing the objects to become isolated " +"(thus a cyclic isolate is born). None of the group's objects have been " +"finalized or cleared yet. The cyclic isolate remains at this stage until " +"some future run of the garbage collector (not necessarily the next run " +"because the next run might not scan every object)." +msgstr "" + +#: c-api/lifecycle.rst:177 +msgid "" +"**Mix of finalized and not finalized:** Objects in a cyclic isolate are " +"finalized one at a time, which means that there is a period of time when the " +"cyclic isolate is composed of a mix of finalized and non-finalized objects. " +"Finalization order is unspecified, so it can appear random. A finalized " +"object must behave in a sane manner when non-finalized objects interact with " +"it, and a non-finalized object must be able to tolerate the finalization of " +"an arbitrary subset of its referents." +msgstr "" + +#: c-api/lifecycle.rst:184 +msgid "" +"**All finalized:** All objects in a cyclic isolate are finalized before any " +"of them are cleared." +msgstr "" + +#: c-api/lifecycle.rst:186 +msgid "" +"**Mix of finalized and cleared:** The objects can be cleared serially or " +"concurrently (but with the :term:`GIL` held); either way, some will finish " +"before others. A finalized object must be able to tolerate the clearing of " +"a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." +msgstr "" + +#: c-api/lifecycle.rst:190 +msgid "" +"**Leaked:** If a cyclic isolate still exists after all objects in the group " +"have been finalized and cleared, then the objects remain indefinitely " +"uncollectable (see :data:`gc.garbage`). It is a bug if a cyclic isolate " +"reaches this stage---it means the :c:member:`~PyTypeObject.tp_clear` methods " +"of the participating objects have failed to break the reference cycle as " +"required." +msgstr "" + +#: c-api/lifecycle.rst:197 +msgid "" +"If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have " +"no way to safely break a reference cycle. Simply destroying an object in a " +"cyclic isolate would result in a dangling pointer, triggering undefined " +"behavior when an object referencing the destroyed object is itself " +"destroyed. The clearing step makes object destruction a two-phase process: " +"first :c:member:`~PyTypeObject.tp_clear` is called to partially destroy the " +"objects enough to detangle them from each other, " +"then :c:member:`~PyTypeObject.tp_dealloc` is called to complete the " +"destruction." +msgstr "" + +#: c-api/lifecycle.rst:206 +msgid "" +"Unlike clearing, finalization is not a phase of destruction. A finalized " +"object must still behave properly by continuing to fulfill its design " +"contracts. An object's finalizer is allowed to execute arbitrary Python " +"code, and is even allowed to prevent the impending destruction by adding a " +"reference. The finalizer is only related to destruction by call order---if " +"it runs, it runs before destruction, which starts " +"with :c:member:`~PyTypeObject.tp_clear` (if called) and concludes " +"with :c:member:`~PyTypeObject.tp_dealloc`." +msgstr "" + +#: c-api/lifecycle.rst:214 +msgid "" +"The finalization step is not necessary to safely reclaim the objects in a " +"cyclic isolate, but its existence makes it easier to design types that " +"behave in a sane manner when objects are cleared. Clearing an object might " +"necessarily leave it in a broken, partially destroyed state---it might be " +"unsafe to call any of the cleared object's methods or access any of its " +"attributes. With finalization, only finalized objects can possibly interact " +"with cleared objects; non-finalized objects are guaranteed to interact with " +"only non-cleared (but potentially finalized) objects." +msgstr "" + +#: c-api/lifecycle.rst:223 +msgid "To summarize the possible interactions:" +msgstr "" + +#: c-api/lifecycle.rst:225 +msgid "" +"A non-finalized object might have references to or from non-finalized and " +"finalized objects, but not to or from cleared objects." +msgstr "" + +#: c-api/lifecycle.rst:227 +msgid "" +"A finalized object might have references to or from non-finalized, " +"finalized, and cleared objects." +msgstr "" + +#: c-api/lifecycle.rst:229 +msgid "" +"A cleared object might have references to or from finalized and cleared " +"objects, but not to or from non-finalized objects." +msgstr "" + +#: c-api/lifecycle.rst:232 +msgid "" +"Without any reference cycles, an object can be simply destroyed once its " +"last reference is deleted; the finalization and clearing steps are not " +"necessary to safely reclaim unused objects. However, it can be useful to " +"automatically call :c:member:`~PyTypeObject.tp_finalize` " +"and :c:member:`~PyTypeObject.tp_clear` before destruction anyway because " +"type design is simplified when all objects always experience the same series " +"of events regardless of whether they participated in a cyclic isolate. " +"Python currently only calls :c:member:`~PyTypeObject.tp_finalize` " +"and :c:member:`~PyTypeObject.tp_clear` as needed to destroy a cyclic " +"isolate; this may change in a future version." +msgstr "" + +#: c-api/lifecycle.rst:244 +msgid "Functions" +msgstr "Fonctions" + +#: c-api/lifecycle.rst:246 +msgid "To allocate and free memory, see :ref:`allocating-objects`." +msgstr "" + +#: c-api/lifecycle.rst:251 +msgid "" +"Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. " +"Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead " +"of calling :c:member:`~PyTypeObject.tp_finalize` directly because this " +"function may deduplicate multiple calls to :c:member:`!tp_finalize`. " +"Currently, calls are only deduplicated if the type supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set); this may " +"change in the future." +msgstr "" + +#: c-api/lifecycle.rst:264 +msgid "" +"Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the " +"beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). " +"There must not be any references to the object. If the object's finalizer " +"resurrects the object, this function returns -1; no further destruction " +"should happen. Otherwise, this function returns 0 and destruction can " +"continue normally." +msgstr "" + +#: c-api/lifecycle.rst:275 +msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." +msgstr "" diff --git a/c-api/list.po b/c-api/list.po index 981833fa3..57a678ac7 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -31,8 +31,8 @@ msgid "" "This is the same object as :class:`list` in the Python layer." msgstr "" "Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " -"virgule flottante en Python. C'est le même objet que la classe :class:" -"`float` de la couche Python." +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." #: c-api/list.rst:24 msgid "" @@ -53,12 +53,12 @@ msgstr "" #: c-api/list.rst:40 msgid "" "If *len* is greater than zero, the returned list object's items are set to " -"``NULL``. Thus you cannot use abstract API functions such as :c:func:" -"`PySequence_SetItem` or expose the object to Python code before setting all " -"items to a real object with :c:func:`PyList_SetItem` or :c:func:" -"`PyList_SET_ITEM()`. The following APIs are safe APIs before the list is " -"fully initialized: :c:func:`PyList_SetItem()` and :c:func:" -"`PyList_SET_ITEM()`." +"``NULL``. Thus you cannot use abstract API functions such " +"as :c:func:`PySequence_SetItem` or expose the object to Python code before " +"setting all items to a real object with :c:func:`PyList_SetItem` " +"or :c:func:`PyList_SET_ITEM()`. The following APIs are safe APIs before the " +"list is fully initialized: :c:func:`PyList_SetItem()` " +"and :c:func:`PyList_SET_ITEM()`." msgstr "" #: c-api/list.rst:53 @@ -85,57 +85,74 @@ msgid "" "instead of a :term:`strong reference`." msgstr "" -#: c-api/list.rst:80 +#: c-api/list.rst:91 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the list concurrently. " +"Prefer :c:func:`PyList_GetItemRef`, which returns a :term:`strong reference`." +msgstr "" + +#: c-api/list.rst:87 msgid "Similar to :c:func:`PyList_GetItem`, but without error checking." msgstr "" -#: c-api/list.rst:85 +#: c-api/list.rst:99 msgid "" "Set the item at index *index* in list to *item*. Return ``0`` on success. " "If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` " "exception." msgstr "" -#: c-api/list.rst:91 +#: c-api/list.rst:105 msgid "" "This function \"steals\" a reference to *item* and discards a reference to " "an item already in the list at the affected position." msgstr "" -#: c-api/list.rst:97 +#: c-api/list.rst:111 msgid "" "Macro form of :c:func:`PyList_SetItem` without error checking. This is " "normally only used to fill in new lists where there is no previous content." msgstr "" -#: c-api/list.rst:100 +#: c-api/list.rst:114 msgid "" -"Bounds checking is performed as an assertion if Python is built in :ref:" -"`debug mode ` or :option:`with assertions <--with-assertions>`." +"Bounds checking is performed as an assertion if Python is built " +"in :ref:`debug mode ` or :option:`with assertions <--with-" +"assertions>`." msgstr "" -#: c-api/list.rst:106 +#: c-api/list.rst:120 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \"steals\" a reference to *item*, and, " +"unlike :c:func:`PyList_SetItem`, does *not* discard a reference to any item " +"that is being replaced; any reference in *list* at position *i* will be " +"leaked." msgstr "" -#: c-api/list.rst:114 +#: c-api/list.rst:127 +msgid "" +"In the :term:`free-threaded build`, this macro has no internal " +"synchronization. It is normally only used to fill in new lists where no " +"other thread has a reference to the list. If the list may be shared, " +"use :c:func:`PyList_SetItem` instead, which uses a :term:`per-object lock`." +msgstr "" + +#: c-api/list.rst:136 msgid "" "Insert the item *item* into list *list* in front of index *index*. Return " "``0`` if successful; return ``-1`` and set an exception if unsuccessful. " "Analogous to ``list.insert(index, item)``." msgstr "" -#: c-api/list.rst:121 +#: c-api/list.rst:143 msgid "" "Append the object *item* at the end of list *list*. Return ``0`` if " "successful; return ``-1`` and set an exception if unsuccessful. Analogous " "to ``list.append(item)``." msgstr "" -#: c-api/list.rst:128 +#: c-api/list.rst:150 msgid "" "Return a list of the objects in *list* containing the objects *between* " "*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " @@ -143,7 +160,7 @@ msgid "" "supported." msgstr "" -#: c-api/list.rst:135 +#: c-api/list.rst:157 msgid "" "Set the slice of *list* between *low* and *high* to the contents of " "*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " @@ -152,45 +169,70 @@ msgid "" "list is not supported." msgstr "" -#: c-api/list.rst:144 +#: c-api/list.rst:165 +msgid "" +"In the :term:`free-threaded build`, when *itemlist* is a :class:`list`, both " +"*list* and *itemlist* are locked for the duration of the operation. For " +"other iterables (or ``NULL``), only *list* is locked." +msgstr "" + +#: c-api/list.rst:172 msgid "" "Extend *list* with the contents of *iterable*. This is the same as " "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" -#: c-api/list.rst:148 +#: c-api/list.rst:176 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: c-api/list.rst:156 +#: c-api/list.rst:183 +msgid "" +"In the :term:`free-threaded build`, when *iterable* is " +"a :class:`list`, :class:`set`, :class:`dict`, or dict view, both *list* and " +"*iterable* (or its underlying dict) are locked for the duration of the " +"operation. For other iterables, only *list* is locked; *iterable* may be " +"concurrently modified by another thread." +msgstr "" + +#: c-api/list.rst:192 msgid "" "Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" -#: c-api/list.rst:160 +#: c-api/list.rst:196 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: c-api/list.rst:168 +#: c-api/list.rst:204 msgid "" "Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is equivalent to ``list.sort()``." msgstr "" -#: c-api/list.rst:174 +#: c-api/list.rst:209 +msgid "" +"In the :term:`free-threaded build`, element comparison " +"via :meth:`~object.__lt__` can execute arbitrary Python code, during which " +"the :term:`per-object lock` may be temporarily released. For built-in types " +"(:class:`str`, :class:`int`, :class:`float`), the lock is not released " +"during comparison." +msgstr "" + +#: c-api/list.rst:218 msgid "" "Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is the equivalent of ``list.reverse()``." msgstr "" -#: c-api/list.rst:182 +#: c-api/list.rst:226 msgid "" "Return a new tuple object containing the contents of *list*; equivalent to " "``tuple(list)``." diff --git a/c-api/long.po b/c-api/long.po index 43a56037d..100fac7ef 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -43,14 +43,14 @@ msgid "" "This is the same object as :class:`int` in the Python layer." msgstr "" "Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " -"virgule flottante en Python. C'est le même objet que la classe :class:" -"`float` de la couche Python." +"virgule flottante en Python. C'est le même objet que la " +"classe :class:`float` de la couche Python." #: c-api/long.rst:29 #, fuzzy msgid "" -"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:" -"type:`PyLongObject`. This function always succeeds." +"Return true if its argument is a :c:type:`PyLongObject` or a subtype " +"of :c:type:`PyLongObject`. This function always succeeds." msgstr "" "Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" "type de :c:type:`PyFloatObject`." @@ -69,50 +69,63 @@ msgid "" "Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." msgstr "" -#: c-api/long.rst:43 +#: c-api/long.rst:45 msgid "" -"The current implementation keeps an array of integer objects for all " -"integers between ``-5`` and ``256``. When you create an int in that range " -"you actually just get back a reference to the existing object." +"CPython keeps an array of integer objects for all integers between ``-5`` " +"and ``1024``. When you create an int in that range you actually just get " +"back a reference to the existing object." msgstr "" -#: c-api/long.rst:50 +#: c-api/long.rst:52 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " "or ``NULL`` on failure." msgstr "" -#: c-api/long.rst:56 +#: c-api/long.rst:58 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or " "``NULL`` on failure." msgstr "" -#: c-api/long.rst:62 +#: c-api/long.rst:64 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or " "``NULL`` on failure." msgstr "" -#: c-api/long.rst:68 +#: c-api/long.rst:70 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " "``NULL`` on failure." msgstr "" -#: c-api/long.rst:74 +#: c-api/long.rst:76 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " "long`, or ``NULL`` on failure." msgstr "" -#: c-api/long.rst:80 +#: c-api/long.rst:83 +msgid "" +"Return a new :c:type:`PyLongObject` object from a signed C :c:expr:`int32_t` " +"or :c:expr:`int64_t`, or ``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/long.rst:93 +msgid "" +"Return a new :c:type:`PyLongObject` object from an unsigned " +"C :c:expr:`uint32_t` or :c:expr:`uint64_t`, or ``NULL`` with an exception " +"set on failure." +msgstr "" + +#: c-api/long.rst:102 msgid "" "Return a new :c:type:`PyLongObject` object from the integer part of *v*, or " "``NULL`` on failure." msgstr "" -#: c-api/long.rst:86 +#: c-api/long.rst:108 msgid "" "Return a new :c:type:`PyLongObject` based on the string value in *str*, " "which is interpreted according to the radix in *base*, or ``NULL`` on " @@ -127,32 +140,32 @@ msgid "" "whitespace, :exc:`ValueError` will be raised." msgstr "" -#: c-api/long.rst:97 +#: c-api/long.rst:119 msgid "" -"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :" -"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " -"call those from C using :c:func:`PyObject_CallMethod`." +":c:func:`PyLong_AsNativeBytes()` and :c:func:`PyLong_FromNativeBytes()` " +"functions can be used to convert a :c:type:`PyLongObject` to/from an array " +"of bytes in base ``256``." msgstr "" -#: c-api/long.rst:104 +#: c-api/long.rst:126 msgid "" "Convert a sequence of Unicode digits in the string *u* to a Python integer " "value." msgstr "" -#: c-api/long.rst:112 +#: c-api/long.rst:134 msgid "" "Create a Python integer from the pointer *p*. The pointer value can be " "retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." msgstr "" -#: c-api/long.rst:118 +#: c-api/long.rst:140 msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as a two's-complement signed number." msgstr "" -#: c-api/long.rst:121 +#: c-api/long.rst:143 msgid "" "*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " "select the native endian that CPython was compiled with and assume that the " @@ -161,358 +174,406 @@ msgid "" "calling :c:func:`PyLong_FromUnsignedNativeBytes`. Other flags are ignored." msgstr "" -#: c-api/long.rst:132 +#: c-api/long.rst:154 msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as an unsigned number." msgstr "" -#: c-api/long.rst:135 +#: c-api/long.rst:157 msgid "" "*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " "select the native endian that CPython was compiled with and assume that the " "most-significant bit is not a sign bit. Flags other than endian are ignored." msgstr "" -#: c-api/long.rst:184 +#: c-api/long.rst:166 +msgid "Macro for creating a Python integer from a process identifier." +msgstr "" + +#: c-api/long.rst:168 +msgid "" +"This can be defined as an alias to :c:func:`PyLong_FromLong` " +"or :c:func:`PyLong_FromLongLong`, depending on the size of the system's PID " +"type." +msgstr "" + +#: c-api/long.rst:215 msgid "" "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:152 +#: c-api/long.rst:185 msgid "" -"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" -"expr:`long`." +"Raise :exc:`OverflowError` if the value of *obj* is out of range for " +"a :c:expr:`long`." msgstr "" -#: c-api/long.rst:193 c-api/long.rst:234 c-api/long.rst:257 +#: c-api/long.rst:224 c-api/long.rst:265 c-api/long.rst:288 msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:195 c-api/long.rst:238 c-api/long.rst:342 +#: c-api/long.rst:226 c-api/long.rst:269 c-api/long.rst:373 msgid "Use :meth:`~object.__index__` if available." msgstr "" -#: c-api/long.rst:198 c-api/long.rst:241 c-api/long.rst:345 +#: c-api/long.rst:229 c-api/long.rst:272 c-api/long.rst:376 msgid "This function will no longer use :meth:`~object.__int__`." msgstr "" -#: c-api/long.rst:167 +#: c-api/long.rst:200 msgid "" -"A :term:`soft deprecated` alias. Exactly equivalent to the preferred " -"``PyLong_AsLong``. In particular, it can fail with :exc:`OverflowError` or " -"another exception." +"Exactly equivalent to the preferred ``PyLong_AsLong``. In particular, it can " +"fail with :exc:`OverflowError` or another exception." msgstr "" -#: c-api/long.rst:171 -msgid "The function is soft deprecated." -msgstr "" - -#: c-api/long.rst:176 +#: c-api/long.rst:207 msgid "" -"Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:" -"`int` instead of a C :c:expr:`long`." +"Similar to :c:func:`PyLong_AsLong`, but store the result in a " +"C :c:expr:`int` instead of a C :c:expr:`long`." msgstr "" -#: c-api/long.rst:188 +#: c-api/long.rst:219 msgid "" -"If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" -"macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " -"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " -"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +"If the value of *obj* is greater than :c:macro:`LONG_MAX` or less " +"than :c:macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, " +"respectively, and return ``-1``; otherwise, set *\\*overflow* to ``0``. If " +"any other exception occurs set *\\*overflow* to ``0`` and return ``-1`` as " +"usual." msgstr "" -#: c-api/long.rst:225 +#: c-api/long.rst:256 msgid "" "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:211 +#: c-api/long.rst:242 msgid "" -"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" -"expr:`long long`." +"Raise :exc:`OverflowError` if the value of *obj* is out of range for " +"a :c:expr:`long long`." msgstr "" -#: c-api/long.rst:229 +#: c-api/long.rst:260 msgid "" -"If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" -"macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " -"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " -"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +"If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less " +"than :c:macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, " +"respectively, and return ``-1``; otherwise, set *\\*overflow* to ``0``. If " +"any other exception occurs set *\\*overflow* to ``0`` and return ``-1`` as " +"usual." msgstr "" -#: c-api/long.rst:251 +#: c-api/long.rst:282 msgid "" "Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " "be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:254 +#: c-api/long.rst:285 msgid "" -"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"type:`Py_ssize_t`." +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for " +"a :c:type:`Py_ssize_t`." msgstr "" -#: c-api/long.rst:266 +#: c-api/long.rst:297 msgid "" "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:269 +#: c-api/long.rst:300 msgid "" -"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"expr:`unsigned long`." +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for " +"a :c:expr:`unsigned long`." msgstr "" -#: c-api/long.rst:272 +#: c-api/long.rst:303 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:282 +#: c-api/long.rst:313 msgid "" "Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:285 +#: c-api/long.rst:316 msgid "" -"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"type:`size_t`." +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for " +"a :c:type:`size_t`." msgstr "" -#: c-api/long.rst:288 +#: c-api/long.rst:319 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:297 +#: c-api/long.rst:328 msgid "" "Return a C :c:expr:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:300 +#: c-api/long.rst:331 msgid "" -"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" -"c:expr:`unsigned long long`." +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for " +"an :c:expr:`unsigned long long`." msgstr "" -#: c-api/long.rst:303 +#: c-api/long.rst:334 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:306 +#: c-api/long.rst:337 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: c-api/long.rst:312 +#: c-api/long.rst:343 msgid "" "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " -"an instance of :c:type:`PyLongObject`, first call its :meth:`~object." -"__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +"an instance of :c:type:`PyLongObject`, first call " +"its :meth:`~object.__index__` method (if present) to convert it to " +"a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:316 +#: c-api/long.rst:347 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" -#: c-api/long.rst:319 +#: c-api/long.rst:350 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:331 +#: c-api/long.rst:362 msgid "" "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " -"is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object." -"__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +"is not an instance of :c:type:`PyLongObject`, first call " +"its :meth:`~object.__index__` method (if present) to convert it to " +"a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:336 +#: c-api/long.rst:367 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" -#: c-api/long.rst:339 +#: c-api/long.rst:370 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " "to disambiguate." msgstr "" -#: c-api/long.rst:351 +#: c-api/long.rst:383 +msgid "" +"Set *\\*value* to a signed C :c:expr:`int32_t` or :c:expr:`int64_t` " +"representation of *obj*." +msgstr "" + +#: c-api/long.rst:406 +msgid "" +"If *obj* is not an instance of :c:type:`PyLongObject`, first call " +"its :meth:`~object.__index__` method (if present) to convert it to " +"a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:411 +msgid "If the *obj* value is out of range, raise an :exc:`OverflowError`." +msgstr "" + +#: c-api/long.rst:413 +msgid "" +"Set *\\*value* and return ``0`` on success. Set an exception and return " +"``-1`` on error." +msgstr "" + +#: c-api/long.rst:416 +msgid "*value* must not be ``NULL``." +msgstr "" + +#: c-api/long.rst:403 +msgid "" +"Set *\\*value* to an unsigned C :c:expr:`uint32_t` or :c:expr:`uint64_t` " +"representation of *obj*." +msgstr "" + +#: c-api/long.rst:410 +msgid "If *obj* is negative, raise a :exc:`ValueError`." +msgstr "" + +#: c-api/long.rst:423 msgid "" "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:354 +#: c-api/long.rst:426 msgid "" -"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"expr:`double`." +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for " +"a :c:expr:`double`." msgstr "" -#: c-api/long.rst:357 +#: c-api/long.rst:429 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:362 +#: c-api/long.rst:434 msgid "" "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " -"assured to produce a usable :c:expr:`void` pointer for values created with :" -"c:func:`PyLong_FromVoidPtr`." +"assured to produce a usable :c:expr:`void` pointer for values created " +"with :c:func:`PyLong_FromVoidPtr`." msgstr "" -#: c-api/long.rst:367 +#: c-api/long.rst:439 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:372 +#: c-api/long.rst:444 msgid "" "Copy the Python integer value *pylong* to a native *buffer* of size " "*n_bytes*. The *flags* can be set to ``-1`` to behave similarly to a C cast, " "or to values documented below to control the behavior." msgstr "" -#: c-api/long.rst:376 +#: c-api/long.rst:448 msgid "" "Returns ``-1`` with an exception raised on error. This may happen if " "*pylong* cannot be interpreted as an integer, or if *pylong* was negative " "and the ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` flag was set." msgstr "" -#: c-api/long.rst:380 +#: c-api/long.rst:452 msgid "" "Otherwise, returns the number of bytes required to store the value. If this " "is equal to or less than *n_bytes*, the entire value was copied. All " -"*n_bytes* of the buffer are written: large buffers are padded with zeroes." +"*n_bytes* of the buffer are written: remaining bytes filled by copies of the " +"sign bit." msgstr "" -#: c-api/long.rst:385 +#: c-api/long.rst:457 msgid "" -"If the returned value is greater than than *n_bytes*, the value was " -"truncated: as many of the lowest bits of the value as could fit are written, " -"and the higher bits are ignored. This matches the typical behavior of a C-" -"style downcast." +"If the returned value is greater than *n_bytes*, the value was truncated: as " +"many of the lowest bits of the value as could fit are written, and the " +"higher bits are ignored. This matches the typical behavior of a C-style " +"downcast." msgstr "" -#: c-api/long.rst:392 +#: c-api/long.rst:464 msgid "" "Overflow is not considered an error. If the returned value is larger than " "*n_bytes*, most significant bits were discarded." msgstr "" -#: c-api/long.rst:395 +#: c-api/long.rst:467 msgid "``0`` will never be returned." msgstr "" -#: c-api/long.rst:397 +#: c-api/long.rst:469 msgid "Values are always copied as two's-complement." msgstr "" -#: c-api/long.rst:399 +#: c-api/long.rst:471 msgid "Usage example::" msgstr "" -#: c-api/long.rst:415 +#: c-api/long.rst:487 msgid "" "Passing zero to *n_bytes* will return the size of a buffer that would be " "large enough to hold the value. This may be larger than technically " "necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be ``NULL``." msgstr "" -#: c-api/long.rst:422 +#: c-api/long.rst:494 msgid "" "Passing *n_bytes=0* to this function is not an accurate way to determine the " "bit length of the value." msgstr "" -#: c-api/long.rst:425 +#: c-api/long.rst:497 msgid "" "To get at the entire Python value of an unknown size, the function can be " "called twice: first to determine the buffer size, then to fill it::" msgstr "" -#: c-api/long.rst:456 +#: c-api/long.rst:528 msgid "" "*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults " "that behave most like a C cast, or a combination of the other flags in the " "table below. Note that ``-1`` cannot be combined with other flags." msgstr "" -#: c-api/long.rst:461 +#: c-api/long.rst:533 msgid "" "Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" -#: c-api/long.rst:467 +#: c-api/long.rst:539 msgid "Flag" msgstr "Option" -#: c-api/long.rst:467 +#: c-api/long.rst:539 msgid "Value" msgstr "Valeur" -#: c-api/long.rst:469 +#: c-api/long.rst:541 msgid "``-1``" msgstr "" -#: c-api/long.rst:470 +#: c-api/long.rst:542 msgid "``0``" msgstr "``0``" -#: c-api/long.rst:471 +#: c-api/long.rst:543 msgid "``1``" msgstr "``1``" -#: c-api/long.rst:472 +#: c-api/long.rst:544 msgid "``3``" msgstr "``3``" -#: c-api/long.rst:473 +#: c-api/long.rst:545 msgid "``4``" msgstr "``4``" -#: c-api/long.rst:474 +#: c-api/long.rst:546 msgid "``8``" msgstr "``8``" -#: c-api/long.rst:475 +#: c-api/long.rst:547 msgid "``16``" msgstr "" -#: c-api/long.rst:478 +#: c-api/long.rst:550 msgid "" "Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " "flags. Passing ``2`` is reserved." msgstr "" -#: c-api/long.rst:481 +#: c-api/long.rst:553 msgid "" "By default, sufficient buffer will be requested to include a sign bit. For " "example, when converting 128 with *n_bytes=1*, the function will return 2 " "(or more) in order to store a zero sign bit." msgstr "" -#: c-api/long.rst:485 +#: c-api/long.rst:557 msgid "" "If ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` is specified, a zero sign bit will " "be omitted from size calculations. This allows, for example, 128 to fit in a " @@ -522,7 +583,7 @@ msgid "" "requested." msgstr "" -#: c-api/long.rst:492 +#: c-api/long.rst:564 msgid "" "Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be " "set if *pylong* is negative. Without this flag, negative values will be " @@ -530,17 +591,17 @@ msgid "" "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" -#: c-api/long.rst:497 +#: c-api/long.rst:569 msgid "" "If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is " "passed, its :meth:`~object.__index__` method will be called first. This may " "result in Python code executing and other threads being allowed to run, " "which could cause changes to other objects or values in use. When *flags* is " -"``-1``, this option is not set, and non-integer values will raise :exc:" -"`TypeError`." +"``-1``, this option is not set, and non-integer values will " +"raise :exc:`TypeError`." msgstr "" -#: c-api/long.rst:506 +#: c-api/long.rst:578 msgid "" "With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without " "*REJECT_NEGATIVE*), multiple Python integers can map to a single value " @@ -548,49 +609,389 @@ msgid "" "buffer and set all its bits. This matches typical C cast behavior." msgstr "" -#: c-api/long.rst:517 +#: c-api/long.rst:589 +msgid "Macro for converting a Python integer into a process identifier." +msgstr "" + +#: c-api/long.rst:591 +msgid "" +"This can be defined as an alias " +"to :c:func:`PyLong_AsLong`, :c:func:`PyLong_FromLongLong`, " +"or :c:func:`PyLong_AsInt`, depending on the size of the system's PID type." +msgstr "" + +#: c-api/long.rst:600 +msgid "Get the sign of the integer object *obj*." +msgstr "" + +#: c-api/long.rst:602 +msgid "" +"On success, set *\\*sign* to the integer sign (0, -1 or +1 for zero, " +"negative or positive integer, respectively) and return 0." +msgstr "" + +#: c-api/long.rst:605 +msgid "" +"On failure, return -1 with an exception set. This function always succeeds " +"if *obj* is a :c:type:`PyLongObject` or its subtype." +msgstr "" + +#: c-api/long.rst:613 +msgid "Check if the integer object *obj* is positive (``obj > 0``)." +msgstr "" + +#: c-api/long.rst:615 +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's positive and ``0`` otherwise. Else set an exception and " +"return ``-1``." +msgstr "" + +#: c-api/long.rst:624 +msgid "Check if the integer object *obj* is negative (``obj < 0``)." +msgstr "" + +#: c-api/long.rst:626 +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's negative and ``0`` otherwise. Else set an exception and " +"return ``-1``." +msgstr "" + +#: c-api/long.rst:635 +msgid "Check if the integer object *obj* is zero." +msgstr "" + +#: c-api/long.rst:637 +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's zero and ``0`` otherwise. Else set an exception and return " +"``-1``." +msgstr "" + +#: c-api/long.rst:646 msgid "" "On success, return a read only :term:`named tuple`, that holds information " "about Python's internal representation of integers. See :data:`sys.int_info` " "for description of individual fields." msgstr "" -#: c-api/long.rst:521 +#: c-api/long.rst:650 msgid "On failure, return ``NULL`` with an exception set." msgstr "" -#: c-api/long.rst:528 +#: c-api/long.rst:657 msgid "Return 1 if *op* is compact, 0 otherwise." msgstr "" -#: c-api/long.rst:530 +#: c-api/long.rst:659 msgid "" "This function makes it possible for performance-critical code to implement a " -"“fast path” for small integers. For compact values use :c:func:" -"`PyUnstable_Long_CompactValue`; for others fall back to a :c:func:" -"`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." +"“fast path” for small integers. For compact values " +"use :c:func:`PyUnstable_Long_CompactValue`; for others fall back to " +"a :c:func:`PyLong_As* ` function " +"or :c:func:`PyLong_AsNativeBytes`." msgstr "" -#: c-api/long.rst:536 +#: c-api/long.rst:665 msgid "The speedup is expected to be negligible for most users." msgstr "" -#: c-api/long.rst:538 +#: c-api/long.rst:667 msgid "" "Exactly what values are considered compact is an implementation detail and " "is subject to change." msgstr "" -#: c-api/long.rst:546 +#: c-api/long.rst:675 msgid "" "If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " "return its value." msgstr "" -#: c-api/long.rst:549 +#: c-api/long.rst:678 msgid "Otherwise, the return value is undefined." msgstr "" +#: c-api/long.rst:684 +msgid "Export API" +msgstr "" + +#: c-api/long.rst:690 +msgid "" +"Layout of an array of \"digits\" (\"limbs\" in the GMP terminology), used to " +"represent absolute value for arbitrary precision integers." +msgstr "" + +#: c-api/long.rst:693 +msgid "" +"Use :c:func:`PyLong_GetNativeLayout` to get the native layout of " +"Python :class:`int` objects, used internally for integers with \"big " +"enough\" absolute value." +msgstr "" + +#: c-api/long.rst:697 +msgid "" +"See also :data:`sys.int_info` which exposes similar information in Python." +msgstr "" + +#: c-api/long.rst:701 +msgid "" +"Bits per digit. For example, a 15 bit digit means that bits 0-14 contain " +"meaningful information." +msgstr "" + +#: c-api/long.rst:706 +msgid "" +"Digit size in bytes. For example, a 15 bit digit will require at least 2 " +"bytes." +msgstr "" + +#: c-api/long.rst:711 +msgid "Digits order:" +msgstr "" + +#: c-api/long.rst:713 +msgid "``1`` for most significant digit first" +msgstr "" + +#: c-api/long.rst:714 +msgid "``-1`` for least significant digit first" +msgstr "" + +#: c-api/long.rst:718 +msgid "Digit endianness:" +msgstr "" + +#: c-api/long.rst:720 +msgid "``1`` for most significant byte first (big endian)" +msgstr "" + +#: c-api/long.rst:721 +msgid "``-1`` for least significant byte first (little endian)" +msgstr "" + +#: c-api/long.rst:726 +msgid "Get the native layout of Python :class:`int` objects." +msgstr "" + +#: c-api/long.rst:728 +msgid "See the :c:type:`PyLongLayout` structure." +msgstr "" + +#: c-api/long.rst:730 +msgid "" +"The function must not be called before Python initialization nor after " +"Python finalization. The returned layout is valid until Python is finalized. " +"The layout is the same for all Python sub-interpreters in a process, and so " +"it can be cached." +msgstr "" + +#: c-api/long.rst:738 +msgid "Export of a Python :class:`int` object." +msgstr "" + +#: c-api/long.rst:740 +msgid "There are two cases:" +msgstr "" + +#: c-api/long.rst:742 +msgid "" +"If :c:member:`digits` is ``NULL``, only use the :c:member:`value` member." +msgstr "" + +#: c-api/long.rst:743 +msgid "" +"If :c:member:`digits` is not ``NULL``, " +"use :c:member:`negative`, :c:member:`ndigits` and :c:member:`digits` members." +msgstr "" + +#: c-api/long.rst:748 +msgid "" +"The native integer value of the exported :class:`int` object. Only valid " +"if :c:member:`digits` is ``NULL``." +msgstr "" + +#: c-api/long.rst:753 +msgid "" +"``1`` if the number is negative, ``0`` otherwise. Only valid " +"if :c:member:`digits` is not ``NULL``." +msgstr "" + +#: c-api/long.rst:758 +msgid "" +"Number of digits in :c:member:`digits` array. Only valid " +"if :c:member:`digits` is not ``NULL``." +msgstr "" + +#: c-api/long.rst:763 +msgid "Read-only array of unsigned digits. Can be ``NULL``." +msgstr "" + +#: c-api/long.rst:768 +msgid "Export a Python :class:`int` object." +msgstr "" + +#: c-api/long.rst:770 +msgid "" +"*export_long* must point to a :c:type:`PyLongExport` structure allocated by " +"the caller. It must not be ``NULL``." +msgstr "" + +#: c-api/long.rst:773 +msgid "" +"On success, fill in *\\*export_long* and return ``0``. On error, set an " +"exception and return ``-1``." +msgstr "" + +#: c-api/long.rst:776 +msgid "" +":c:func:`PyLong_FreeExport` must be called when the export is no longer " +"needed." +msgstr "" + +#: c-api/long.rst:780 +msgid "" +"This function always succeeds if *obj* is a Python :class:`int` object or a " +"subclass." +msgstr "" + +#: c-api/long.rst:786 +msgid "Release the export *export_long* created by :c:func:`PyLong_Export`." +msgstr "" + +#: c-api/long.rst:789 +msgid "" +"Calling :c:func:`PyLong_FreeExport` is optional if *export_long->digits* is " +"``NULL``." +msgstr "" + +#: c-api/long.rst:794 +msgid "PyLongWriter API" +msgstr "" + +#: c-api/long.rst:796 +msgid "The :c:type:`PyLongWriter` API can be used to import an integer." +msgstr "" + +#: c-api/long.rst:802 +msgid "A Python :class:`int` writer instance." +msgstr "" + +#: c-api/long.rst:804 +msgid "" +"The instance must be destroyed by :c:func:`PyLongWriter_Finish` " +"or :c:func:`PyLongWriter_Discard`." +msgstr "" + +#: c-api/long.rst:810 +msgid "Create a :c:type:`PyLongWriter`." +msgstr "" + +#: c-api/long.rst:812 +msgid "" +"On success, allocate *\\*digits* and return a writer. On error, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/long.rst:815 +msgid "*negative* is ``1`` if the number is negative, or ``0`` otherwise." +msgstr "" + +#: c-api/long.rst:817 +msgid "" +"*ndigits* is the number of digits in the *digits* array. It must be greater " +"than 0." +msgstr "" + +#: c-api/long.rst:820 +msgid "*digits* must not be NULL." +msgstr "" + +#: c-api/long.rst:822 +msgid "" +"After a successful call to this function, the caller should fill in the " +"array of digits *digits* and then call :c:func:`PyLongWriter_Finish` to get " +"a Python :class:`int`. The layout of *digits* is described " +"by :c:func:`PyLong_GetNativeLayout`." +msgstr "" + +#: c-api/long.rst:827 +msgid "" +"Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where " +"the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits per digit). " +"Any unused most significant digits must be set to ``0``." +msgstr "" + +#: c-api/long.rst:832 +msgid "" +"Alternately, call :c:func:`PyLongWriter_Discard` to destroy the writer " +"instance without creating an :class:`~int` object." +msgstr "" + +#: c-api/long.rst:838 +msgid "" +"Finish a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." +msgstr "" + +#: c-api/long.rst:840 +msgid "" +"On success, return a Python :class:`int` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/long.rst:843 +msgid "" +"The function takes care of normalizing the digits and converts the object to " +"a compact integer if needed." +msgstr "" + +#: c-api/long.rst:855 +msgid "The writer instance and the *digits* array are invalid after the call." +msgstr "" + +#: c-api/long.rst:851 +msgid "" +"Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." +msgstr "" + +#: c-api/long.rst:853 +msgid "If *writer* is ``NULL``, no operation is performed." +msgstr "" + +#: c-api/long.rst:859 +msgid "Deprecated API" +msgstr "" + +#: c-api/long.rst:861 +msgid "" +"These macros are :term:`soft deprecated`. They describe parameters of the " +"internal representation of :c:type:`PyLongObject` instances." +msgstr "" + +#: c-api/long.rst:864 +msgid "" +"Use :c:func:`PyLong_GetNativeLayout` instead, along " +"with :c:func:`PyLong_Export` to read integer data or :c:type:`PyLongWriter` " +"to write it. These currently use the same layout, but are designed to " +"continue working correctly even if CPython's internal integer representation " +"changes." +msgstr "" + +#: c-api/long.rst:872 +msgid "" +"This is equivalent to :c:member:`~PyLongLayout.bits_per_digit` in the output " +"of :c:func:`PyLong_GetNativeLayout`." +msgstr "" + +#: c-api/long.rst:878 +msgid "This is currently equivalent to :c:expr:`1 << PyLong_SHIFT`." +msgstr "" + +#: c-api/long.rst:883 +msgid "This is currently equivalent to :c:expr:`(1 << PyLong_SHIFT) - 1`" +msgstr "" + #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/mapping.po b/c-api/mapping.po index d54c52b6e..d923ada9f 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-01-28 14:58+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -21,11 +21,11 @@ msgstr "Protocole de correspondance" #: c-api/mapping.rst:8 msgid "" -"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:" -"`PyObject_DelItem`." +"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` " +"and :c:func:`PyObject_DelItem`." msgstr "" -"Voir aussi :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` et :c:func:" -"`PyObject_DelItem`." +"Voir aussi :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` " +"et :c:func:`PyObject_DelItem`." # - " in general case it is impossible to determine what the type of keys it # supports." @@ -56,9 +56,9 @@ msgstr "" #: c-api/mapping.rst:31 msgid "" -"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :" -"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" #: c-api/mapping.rst:38 @@ -85,9 +85,9 @@ msgstr "" #: c-api/mapping.rst:62 msgid "" -"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :" -"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" #: c-api/mapping.rst:69 @@ -96,9 +96,9 @@ msgstr "" #: c-api/mapping.rst:74 msgid "" -"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" -"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" #: c-api/mapping.rst:81 @@ -132,35 +132,35 @@ msgstr "" #: c-api/mapping.rst:105 #, fuzzy msgid "" -"Exceptions which occur when this calls :meth:`~object.__getitem__` method " -"are silently ignored. For proper error handling, use :c:func:" -"`PyMapping_HasKeyWithError`, :c:func:`PyMapping_GetOptionalItem` or :c:func:" -"`PyObject_GetItem()` instead." +"Exceptions which occur when this calls the :meth:`~object.__getitem__` " +"method are silently ignored. For proper error handling, " +"use :c:func:`PyMapping_HasKeyWithError`, :c:func:`PyMapping_GetOptionalItem` " +"or :c:func:`PyObject_GetItem()` instead." msgstr "" -"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" -"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " -"plutôt :c:func:`PyObject_GetItem()`." +"Notez que les exceptions qui surviennent pendant l'appel de la " +"méthode :meth:`__getitem__` seront supprimées. Pour obtenir le rapport " +"d'erreur, utilisez plutôt :c:func:`PyObject_GetItem()`." #: c-api/mapping.rst:113 msgid "" -"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :" -"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" #: c-api/mapping.rst:119 #, fuzzy msgid "" -"Exceptions that occur when this calls :meth:`~object.__getitem__` method or " -"while creating the temporary :class:`str` object are silently ignored. For " -"proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`, :c:" -"func:`PyMapping_GetOptionalItemString` or :c:func:`PyMapping_GetItemString` " -"instead." +"Exceptions that occur when this calls the :meth:`~object.__getitem__` method " +"or while creating the temporary :class:`str` object are silently ignored. " +"For proper error handling, " +"use :c:func:`PyMapping_HasKeyStringWithError`, :c:func:`PyMapping_GetOptionalItemString` " +"or :c:func:`PyMapping_GetItemString` instead." msgstr "" "Notez que les exceptions qui surviennent en créant une chaîne de caractères " "temporaire pendant l'appel de la méthode :meth:`__getitem__` seront " -"supprimées. Pour obtenir le rapport d'erreur, utilisez plutôt :c:func:" -"`PyMapping_GetItemString()`." +"supprimées. Pour obtenir le rapport d'erreur, utilisez " +"plutôt :c:func:`PyMapping_GetItemString()`." #: c-api/mapping.rst:129 msgid "" diff --git a/c-api/marshal.po b/c-api/marshal.po index 3ec097de8..2569a040e 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -33,85 +33,87 @@ msgstr "" #: c-api/marshal.rst:16 msgid "" -"The module supports two versions of the data format: version 0 is the " -"historical version, version 1 shares interned strings in the file, and upon " -"unmarshalling. Version 2 uses a binary format for floating-point numbers. " -"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)." +"The module supports several versions of the data format; see " +"the :py:mod:`Python module documentation ` for details." msgstr "" -#: c-api/marshal.rst:24 +#: c-api/marshal.rst:21 +msgid "The current format version. See :py:data:`marshal.version`." +msgstr "" + +#: c-api/marshal.rst:25 msgid "" "Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " "the least-significant 32 bits of *value*; regardless of the size of the " "native :c:expr:`long` type. *version* indicates the file format." msgstr "" -#: c-api/marshal.rst:36 +#: c-api/marshal.rst:37 msgid "" -"This function can fail, in which case it sets the error indicator. Use :c:" -"func:`PyErr_Occurred` to check for that." +"This function can fail, in which case it sets the error indicator. " +"Use :c:func:`PyErr_Occurred` to check for that." msgstr "" -#: c-api/marshal.rst:33 +#: c-api/marshal.rst:34 msgid "" "Marshal a Python object, *value*, to *file*. *version* indicates the file " "format." msgstr "" -#: c-api/marshal.rst:41 +#: c-api/marshal.rst:42 msgid "" "Return a bytes object containing the marshalled representation of *value*. " "*version* indicates the file format." msgstr "" -#: c-api/marshal.rst:45 +#: c-api/marshal.rst:46 msgid "The following functions allow marshalled values to be read back in." msgstr "" -#: c-api/marshal.rst:50 +#: c-api/marshal.rst:51 msgid "" "Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 32-bit value can be read in using this function, " "regardless of the native size of :c:expr:`long`." msgstr "" -#: c-api/marshal.rst:64 +#: c-api/marshal.rst:65 msgid "" "On error, sets the appropriate exception (:exc:`EOFError`) and returns " "``-1``." msgstr "" -#: c-api/marshal.rst:60 +#: c-api/marshal.rst:61 msgid "" "Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 16-bit value can be read in using this function, " "regardless of the native size of :c:expr:`short`." msgstr "" -#: c-api/marshal.rst:70 +#: c-api/marshal.rst:71 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading." msgstr "" -#: c-api/marshal.rst:87 c-api/marshal.rst:96 +#: c-api/marshal.rst:88 c-api/marshal.rst:97 msgid "" "On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " "or :exc:`TypeError`) and returns ``NULL``." msgstr "" -#: c-api/marshal.rst:79 +#: c-api/marshal.rst:80 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " "assumes that no further objects will be read from the file, allowing it to " "aggressively load file data into memory so that the de-serialization can " "operate from data in memory rather than reading a byte at a time from the " -"file. Only use these variant if you are certain that you won't be reading " +"file. Only use this variant if you are certain that you won't be reading " "anything else from the file." msgstr "" -#: c-api/marshal.rst:93 +#: c-api/marshal.rst:94 msgid "" "Return a Python object from the data stream in a byte buffer containing " "*len* bytes pointed to by *data*." diff --git a/c-api/memory.po b/c-api/memory.po index 63e20d7ff..dde4029d2 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,11 +18,11 @@ msgstr "" msgid "Memory Management" msgstr "" -#: c-api/memory.rst:17 +#: c-api/memory.rst:13 msgid "Overview" msgstr "Aperçu" -#: c-api/memory.rst:19 +#: c-api/memory.rst:15 msgid "" "Memory management in Python involves a private heap containing all Python " "objects and data structures. The management of this private heap is ensured " @@ -31,7 +31,7 @@ msgid "" "aspects, like sharing, segmentation, preallocation or caching." msgstr "" -#: c-api/memory.rst:25 +#: c-api/memory.rst:21 msgid "" "At the lowest level, a raw memory allocator ensures that there is enough " "room in the private heap for storing all Python-related data by interacting " @@ -45,7 +45,7 @@ msgid "" "but ensures that the latter operate within the bounds of the private heap." msgstr "" -#: c-api/memory.rst:36 +#: c-api/memory.rst:32 msgid "" "It is important to understand that the management of the Python heap is " "performed by the interpreter itself and that the user has no control over " @@ -55,26 +55,27 @@ msgid "" "the Python/C API functions listed in this document." msgstr "" -#: c-api/memory.rst:49 +#: c-api/memory.rst:45 msgid "" "To avoid memory corruption, extension writers should never try to operate on " -"Python objects with the functions exported by the C library: :c:func:" -"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will " -"result in mixed calls between the C allocator and the Python memory manager " -"with fatal consequences, because they implement different algorithms and " -"operate on different heaps. However, one may safely allocate and release " -"memory blocks with the C library allocator for individual purposes, as shown " -"in the following example::" +"Python objects with the functions exported by the C " +"library: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " +"and :c:func:`free`. This will result in mixed calls between the C " +"allocator and the Python memory manager with fatal consequences, because " +"they implement different algorithms and operate on different heaps. " +"However, one may safely allocate and release memory blocks with the C " +"library allocator for individual purposes, as shown in the following " +"example::" msgstr "" -#: c-api/memory.rst:68 +#: c-api/memory.rst:64 msgid "" "In this example, the memory request for the I/O buffer is handled by the C " "library allocator. The Python memory manager is involved only in the " "allocation of the bytes object returned as a result." msgstr "" -#: c-api/memory.rst:72 +#: c-api/memory.rst:68 msgid "" "In most situations, however, it is recommended to allocate memory from the " "Python heap specifically because the latter is under control of the Python " @@ -92,65 +93,65 @@ msgid "" "completely the Python memory manager." msgstr "" -#: c-api/memory.rst:88 +#: c-api/memory.rst:84 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to configure the " "memory allocators used by Python." msgstr "" -#: c-api/memory.rst:91 +#: c-api/memory.rst:87 msgid "" "The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print " "statistics of the :ref:`pymalloc memory allocator ` every time a " "new pymalloc object arena is created, and on shutdown." msgstr "" -#: c-api/memory.rst:96 +#: c-api/memory.rst:92 msgid "Allocator Domains" msgstr "" -#: c-api/memory.rst:100 +#: c-api/memory.rst:96 msgid "" "All allocating functions belong to one of three different \"domains\" (see " "also :c:type:`PyMemAllocatorDomain`). These domains represent different " "allocation strategies and are optimized for different purposes. The specific " "details on how every domain allocates memory or what internal functions each " "domain calls is considered an implementation detail, but for debugging " -"purposes a simplified table can be found at :ref:`here `. The APIs used to allocate and free a block of memory must be " +"purposes a simplified table can be found at :ref:`default-memory-" +"allocators`. The APIs used to allocate and free a block of memory must be " "from the same domain. For example, :c:func:`PyMem_Free` must be used to free " "memory allocated using :c:func:`PyMem_Malloc`." msgstr "" -#: c-api/memory.rst:109 +#: c-api/memory.rst:105 msgid "The three allocation domains are:" msgstr "" -#: c-api/memory.rst:111 +#: c-api/memory.rst:107 msgid "" "Raw domain: intended for allocating memory for general-purpose memory " "buffers where the allocation *must* go to the system allocator or where the " -"allocator can operate without the :term:`GIL`. The memory is requested " -"directly from the system. See :ref:`Raw Memory Interface `." msgstr "" -#: c-api/memory.rst:116 +#: c-api/memory.rst:112 msgid "" "\"Mem\" domain: intended for allocating memory for Python buffers and " "general-purpose memory buffers where the allocation must be performed with " -"the :term:`GIL` held. The memory is taken from the Python private heap. See :" -"ref:`Memory Interface `." +"an :term:`attached thread state`. The memory is taken from the Python " +"private heap. See :ref:`Memory Interface `." msgstr "" -#: c-api/memory.rst:121 +#: c-api/memory.rst:117 msgid "" "Object domain: intended for allocating memory for Python objects. The memory " "is taken from the Python private heap. See :ref:`Object allocators " "`." msgstr "" -#: c-api/memory.rst:126 +#: c-api/memory.rst:122 msgid "" "The :term:`free-threaded ` build requires that only Python " "objects are allocated using the \"object\" domain and that all Python " @@ -158,29 +159,29 @@ msgid "" "versions, where this was only a best practice and not a hard requirement." msgstr "" -#: c-api/memory.rst:130 +#: c-api/memory.rst:126 msgid "" -"For example, buffers (non-Python objects) should be allocated using :c:func:" -"`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:" -"func:`PyObject_Malloc`." +"For example, buffers (non-Python objects) should be allocated " +"using :c:func:`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, " +"or :c:func:`malloc`, but not :c:func:`PyObject_Malloc`." msgstr "" -#: c-api/memory.rst:133 +#: c-api/memory.rst:129 msgid "See :ref:`Memory Allocation APIs `." msgstr "" -#: c-api/memory.rst:139 +#: c-api/memory.rst:135 msgid "Raw Memory Interface" msgstr "" -#: c-api/memory.rst:141 +#: c-api/memory.rst:137 msgid "" "The following function sets are wrappers to the system allocator. These " -"functions are thread-safe, the :term:`GIL ` does " -"not need to be held." +"functions are thread-safe, so a :term:`thread state` does not need to " +"be :term:`attached `." msgstr "" -#: c-api/memory.rst:145 +#: c-api/memory.rst:141 msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " @@ -188,154 +189,161 @@ msgid "" "requesting zero bytes." msgstr "" -#: c-api/memory.rst:225 c-api/memory.rst:335 +#: c-api/memory.rst:228 c-api/memory.rst:361 msgid "" "Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " "allocated memory, or ``NULL`` if the request fails." msgstr "" -#: c-api/memory.rst:157 +#: c-api/memory.rst:153 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" -#: c-api/memory.rst:235 c-api/memory.rst:345 +#: c-api/memory.rst:238 c-api/memory.rst:371 msgid "" "Allocates *nelem* elements each whose size in bytes is *elsize* and returns " "a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " "the request fails. The memory is initialized to zeros." msgstr "" -#: c-api/memory.rst:168 +#: c-api/memory.rst:164 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " "called instead." msgstr "" -#: c-api/memory.rst:248 c-api/memory.rst:358 +#: c-api/memory.rst:251 c-api/memory.rst:384 msgid "" "Resizes the memory block pointed to by *p* to *n* bytes. The contents will " "be unchanged to the minimum of the old and the new sizes." msgstr "" -#: c-api/memory.rst:180 +#: c-api/memory.rst:176 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" -#: c-api/memory.rst:184 +#: c-api/memory.rst:180 msgid "" -"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" -"func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" -"`PyMem_RawCalloc`." +"Unless *p* is ``NULL``, it must have been returned by a previous call " +"to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` " +"or :c:func:`PyMem_RawCalloc`." msgstr "" -#: c-api/memory.rst:188 +#: c-api/memory.rst:184 msgid "" "If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: c-api/memory.rst:194 +#: c-api/memory.rst:190 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " -"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" -"func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been " -"called before, undefined behavior occurs." +"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` " +"or :c:func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has " +"been called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:269 c-api/memory.rst:379 +#: c-api/memory.rst:272 c-api/memory.rst:405 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" -#: c-api/memory.rst:205 +#: c-api/memory.rst:201 msgid "Memory Interface" msgstr "" -#: c-api/memory.rst:315 +#: c-api/memory.rst:340 msgid "" "The following function sets, modeled after the ANSI C standard, but " "specifying behavior when requesting zero bytes, are available for allocating " "and releasing memory from the Python heap." msgstr "" -#: c-api/memory.rst:211 +#: c-api/memory.rst:207 msgid "" -"The :ref:`default memory allocator ` uses the :" -"ref:`pymalloc memory allocator `." +"In the GIL-enabled build (default build) the :ref:`default memory allocator " +"` uses the :ref:`pymalloc memory allocator " +"`, whereas in the :term:`free-threaded build`, the default is " +"the :ref:`mimalloc memory allocator ` instead." msgstr "" -#: c-api/memory.rst:330 +#: c-api/memory.rst:357 msgid "" -"The :term:`GIL ` must be held when using these " -"functions." +"There must be an :term:`attached thread state` when using these functions." msgstr "" -#: c-api/memory.rst:221 +#: c-api/memory.rst:219 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" -#: c-api/memory.rst:228 +#: c-api/memory.rst:223 +msgid "" +"In the :term:`free-threaded ` build, the default allocator " +"is now :ref:`mimalloc `." +msgstr "" + +#: c-api/memory.rst:231 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " "been initialized in any way." msgstr "" -#: c-api/memory.rst:239 +#: c-api/memory.rst:242 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " "called instead." msgstr "" -#: c-api/memory.rst:251 +#: c-api/memory.rst:254 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " "*n* is equal to zero, the memory block is resized but is not freed, and the " "returned pointer is non-``NULL``." msgstr "" -#: c-api/memory.rst:255 +#: c-api/memory.rst:258 msgid "" -"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" -"func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." +"Unless *p* is ``NULL``, it must have been returned by a previous call " +"to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." msgstr "" -#: c-api/memory.rst:258 +#: c-api/memory.rst:261 msgid "" "If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: c-api/memory.rst:264 +#: c-api/memory.rst:267 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " -"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" -"`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called before, " -"undefined behavior occurs." +"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` " +"or :c:func:`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been " +"called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:271 +#: c-api/memory.rst:274 msgid "" "The following type-oriented macros are provided for convenience. Note that " "*TYPE* refers to any C type." msgstr "" -#: c-api/memory.rst:277 +#: c-api/memory.rst:280 msgid "" "Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " "of memory. Returns a pointer cast to ``TYPE*``. The memory will not have " "been initialized in any way." msgstr "" -#: c-api/memory.rst:284 +#: c-api/memory.rst:287 msgid "" "Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " "sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* " @@ -343,53 +351,70 @@ msgid "" "failure." msgstr "" -#: c-api/memory.rst:289 +#: c-api/memory.rst:292 msgid "" "This is a C preprocessor macro; *p* is always reassigned. Save the original " "value of *p* to avoid losing memory when handling errors." msgstr "" -#: c-api/memory.rst:295 +#: c-api/memory.rst:298 msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: c-api/memory.rst:297 -msgid "" -"In addition, the following macro sets are provided for calling the Python " -"memory allocator directly, without involving the C API functions listed " -"above. However, note that their use does not preserve binary compatibility " -"across Python versions and is therefore deprecated in extension modules." -msgstr "" - #: c-api/memory.rst:302 -msgid "``PyMem_MALLOC(size)``" +msgid "Deprecated aliases" msgstr "" -#: c-api/memory.rst:303 -msgid "``PyMem_NEW(type, size)``" +#: c-api/memory.rst:304 +msgid "" +"These are :term:`soft deprecated` aliases to existing functions and macros. " +"They exist solely for backwards compatibility." msgstr "" -#: c-api/memory.rst:304 -msgid "``PyMem_REALLOC(ptr, size)``" +#: c-api/memory.rst:311 +msgid "Deprecated alias" msgstr "" -#: c-api/memory.rst:305 -msgid "``PyMem_RESIZE(ptr, type, size)``" +#: c-api/memory.rst:312 +msgid "Corresponding function or macro" msgstr "" -#: c-api/memory.rst:306 -msgid "``PyMem_FREE(ptr)``" +#: c-api/memory.rst:314 +#, fuzzy +msgid ":c:func:`PyMem_Malloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:316 +#, fuzzy +msgid ":c:macro:`PyMem_New`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:507 +#, fuzzy +msgid ":c:func:`PyMem_Realloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:320 +#, fuzzy +msgid ":c:macro:`PyMem_Resize`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:324 c-api/memory.rst:509 +msgid ":c:func:`PyMem_Free`" msgstr "" -#: c-api/memory.rst:307 -msgid "``PyMem_DEL(ptr)``" +#: c-api/memory.rst:328 +msgid "" +"The macros are now aliases of the corresponding functions and macros. " +"Previously, their behavior was the same, but their use did not necessarily " +"preserve binary compatibility across Python versions." msgstr "" -#: c-api/memory.rst:313 +#: c-api/memory.rst:338 msgid "Object allocators" msgstr "" -#: c-api/memory.rst:320 +#: c-api/memory.rst:345 msgid "" "There is no guarantee that the memory returned by these allocators can be " "successfully cast to a Python object when intercepting the allocating " @@ -397,389 +422,441 @@ msgid "" "Memory Allocators ` section." msgstr "" -#: c-api/memory.rst:325 +#: c-api/memory.rst:350 msgid "" -"The :ref:`default object allocator ` uses the :" -"ref:`pymalloc memory allocator `." +"The :ref:`default object allocator ` uses " +"the :ref:`pymalloc memory allocator `. In the :term:`free-" +"threaded ` build, the default is the :ref:`mimalloc memory " +"allocator ` instead." msgstr "" -#: c-api/memory.rst:338 +#: c-api/memory.rst:364 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" -#: c-api/memory.rst:349 +#: c-api/memory.rst:375 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " "called instead." msgstr "" -#: c-api/memory.rst:361 +#: c-api/memory.rst:387 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" -#: c-api/memory.rst:365 +#: c-api/memory.rst:391 msgid "" -"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" -"func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" -"`PyObject_Calloc`." +"Unless *p* is ``NULL``, it must have been returned by a previous call " +"to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` " +"or :c:func:`PyObject_Calloc`." msgstr "" -#: c-api/memory.rst:368 +#: c-api/memory.rst:394 msgid "" "If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" -#: c-api/memory.rst:374 +#: c-api/memory.rst:400 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " -"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" -"func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been " -"called before, undefined behavior occurs." +"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` " +"or :c:func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has " +"been called before, undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:407 +msgid "" +"Do not call this directly to free an object's memory; call the " +"type's :c:member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +#: c-api/memory.rst:410 +msgid "" +"Do not use this for memory allocated by :c:macro:`PyObject_GC_New` " +"or :c:macro:`PyObject_GC_NewVar`; use :c:func:`PyObject_GC_Del` instead." +msgstr "" + +#: c-api/memory.rst:415 +msgid "" +":c:func:`PyObject_GC_Del` is the equivalent of this function for memory " +"allocated by types that support garbage collection." +msgstr "" + +#: c-api/memory.rst:515 +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +#: c-api/memory.rst:516 +msgid ":c:func:`PyObject_Realloc`" +msgstr "" + +#: c-api/memory.rst:517 +msgid ":c:func:`PyObject_Calloc`" +msgstr "" + +#: c-api/memory.rst:420 +msgid ":c:macro:`PyObject_New`" msgstr "" -#: c-api/memory.rst:385 +#: c-api/memory.rst:421 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: c-api/memory.rst:422 +#, fuzzy +msgid ":c:func:`PyType_GenericAlloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:423 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: c-api/memory.rst:429 msgid "Default Memory Allocators" msgstr "" -#: c-api/memory.rst:387 +#: c-api/memory.rst:431 msgid "Default memory allocators:" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:434 msgid "Configuration" msgstr "Configuration" -#: c-api/memory.rst:390 +#: c-api/memory.rst:434 msgid "Name" msgstr "Nom" -#: c-api/memory.rst:390 +#: c-api/memory.rst:434 msgid "PyMem_RawMalloc" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:434 msgid "PyMem_Malloc" msgstr "" -#: c-api/memory.rst:390 +#: c-api/memory.rst:434 msgid "PyObject_Malloc" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:436 msgid "Release build" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:436 msgid "``\"pymalloc\"``" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:438 msgid "``malloc``" msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:436 msgid "``pymalloc``" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:437 msgid "Debug build" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:437 msgid "``\"pymalloc_debug\"``" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:439 msgid "``malloc`` + debug" msgstr "" -#: c-api/memory.rst:393 +#: c-api/memory.rst:437 msgid "``pymalloc`` + debug" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:438 msgid "Release build, without pymalloc" msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:438 msgid "``\"malloc\"``" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:439 msgid "Debug build, without pymalloc" msgstr "" -#: c-api/memory.rst:395 +#: c-api/memory.rst:439 msgid "``\"malloc_debug\"``" msgstr "" -#: c-api/memory.rst:398 +#: c-api/memory.rst:440 +msgid "Free-threaded build" +msgstr "" + +#: c-api/memory.rst:440 +msgid "``\"mimalloc\"``" +msgstr "" + +#: c-api/memory.rst:440 +msgid "``mimalloc``" +msgstr "" + +#: c-api/memory.rst:441 +msgid "Free-threaded debug build" +msgstr "" + +#: c-api/memory.rst:441 +msgid "``\"mimalloc_debug\"``" +msgstr "" + +#: c-api/memory.rst:441 +msgid "``mimalloc`` + debug" +msgstr "" + +#: c-api/memory.rst:444 msgid "Legend:" msgstr "" -#: c-api/memory.rst:400 +#: c-api/memory.rst:446 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: c-api/memory.rst:401 +#: c-api/memory.rst:447 msgid "" -"``malloc``: system allocators from the standard C library, C functions: :c:" -"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." +"``malloc``: system allocators from the standard C library, C " +"functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " +"and :c:func:`free`." msgstr "" -#: c-api/memory.rst:403 +#: c-api/memory.rst:449 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:404 -msgid "" -"``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " -"allocator will be used if mimalloc support isn't available." +#: c-api/memory.rst:450 +msgid "``mimalloc``: :ref:`mimalloc memory allocator `." msgstr "" -#: c-api/memory.rst:406 +#: c-api/memory.rst:451 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: c-api/memory.rst:408 +#: c-api/memory.rst:453 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: c-api/memory.rst:413 +#: c-api/memory.rst:458 msgid "Customize Memory Allocators" msgstr "" -#: c-api/memory.rst:419 +#: c-api/memory.rst:464 msgid "" "Structure used to describe a memory block allocator. The structure has the " "following fields:" msgstr "" -#: c-api/memory.rst:670 +#: c-api/memory.rst:723 msgid "Field" msgstr "Champ" -#: c-api/memory.rst:670 +#: c-api/memory.rst:723 msgid "Meaning" msgstr "Signification" -#: c-api/memory.rst:672 +#: c-api/memory.rst:725 msgid "``void *ctx``" msgstr "``void *ctx``" -#: c-api/memory.rst:672 +#: c-api/memory.rst:725 msgid "user context passed as first argument" msgstr "" -#: c-api/memory.rst:427 +#: c-api/memory.rst:472 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "``void* malloc(void *ctx, size_t size)``" -#: c-api/memory.rst:427 +#: c-api/memory.rst:472 msgid "allocate a memory block" msgstr "" -#: c-api/memory.rst:429 +#: c-api/memory.rst:474 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: c-api/memory.rst:429 +#: c-api/memory.rst:474 msgid "allocate a memory block initialized with zeros" msgstr "" -#: c-api/memory.rst:432 +#: c-api/memory.rst:477 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: c-api/memory.rst:432 +#: c-api/memory.rst:477 msgid "allocate or resize a memory block" msgstr "" -#: c-api/memory.rst:434 +#: c-api/memory.rst:479 msgid "``void free(void *ctx, void *ptr)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:434 +#: c-api/memory.rst:479 msgid "free a memory block" msgstr "" -#: c-api/memory.rst:437 +#: c-api/memory.rst:482 msgid "" -"The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" -"`PyMemAllocatorEx` and a new ``calloc`` field was added." +"The :c:type:`!PyMemAllocator` structure was renamed " +"to :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: c-api/memory.rst:444 +#: c-api/memory.rst:489 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: c-api/memory.rst:459 c-api/memory.rst:468 +#: c-api/memory.rst:504 c-api/memory.rst:513 #, fuzzy msgid "Functions:" msgstr "Fonctions :" -#: c-api/memory.rst:452 +#: c-api/memory.rst:497 #, fuzzy msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:453 +#: c-api/memory.rst:498 #, fuzzy msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:454 +#: c-api/memory.rst:499 #, fuzzy msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:455 +#: c-api/memory.rst:500 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: c-api/memory.rst:461 +#: c-api/memory.rst:506 #, fuzzy msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:462 -#, fuzzy -msgid ":c:func:`PyMem_Realloc`" -msgstr ":c:func:`PyMem_Calloc`," - -#: c-api/memory.rst:463 +#: c-api/memory.rst:508 #, fuzzy msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:464 -msgid ":c:func:`PyMem_Free`" -msgstr "" - -#: c-api/memory.rst:470 -msgid ":c:func:`PyObject_Malloc`" -msgstr "" - -#: c-api/memory.rst:471 -msgid ":c:func:`PyObject_Realloc`" -msgstr "" - -#: c-api/memory.rst:472 -msgid ":c:func:`PyObject_Calloc`" -msgstr "" - -#: c-api/memory.rst:473 +#: c-api/memory.rst:518 msgid ":c:func:`PyObject_Free`" msgstr "" -#: c-api/memory.rst:477 +#: c-api/memory.rst:522 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:482 +#: c-api/memory.rst:527 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:484 +#: c-api/memory.rst:529 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: c-api/memory.rst:487 +#: c-api/memory.rst:532 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" -"safe: the :term:`GIL ` is not held when the " -"allocator is called." +"safe: a :term:`thread state` is not :term:`attached ` " +"when the allocator is called." msgstr "" -#: c-api/memory.rst:491 +#: c-api/memory.rst:536 msgid "" "For the remaining domains, the allocator must also be thread-safe: the " -"allocator may be called in different interpreters that do not share a " -"``GIL``." +"allocator may be called in different interpreters that do not share " +"a :term:`GIL`." msgstr "" -#: c-api/memory.rst:495 +#: c-api/memory.rst:540 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" -#: c-api/memory.rst:499 +#: c-api/memory.rst:544 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: c-api/memory.rst:504 +#: c-api/memory.rst:549 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: c-api/memory.rst:506 +#: c-api/memory.rst:551 msgid "" -"It can be called after :c:func:`Py_PreInitialize` and before :c:func:" -"`Py_InitializeFromConfig` to install a custom memory allocator. There are no " -"restrictions over the installed allocator other than the ones imposed by the " -"domain (for instance, the Raw Domain allows the allocator to be called " -"without the GIL held). See :ref:`the section on allocator domains ` for more information." +"It can be called after :c:func:`Py_PreInitialize` and " +"before :c:func:`Py_InitializeFromConfig` to install a custom memory " +"allocator. There are no restrictions over the installed allocator other than " +"the ones imposed by the domain (for instance, the Raw Domain allows the " +"allocator to be called without an :term:`attached thread state`). " +"See :ref:`the section on allocator domains ` for more " +"information." msgstr "" -#: c-api/memory.rst:514 +#: c-api/memory.rst:559 msgid "" -"If called after Python has finish initializing (after :c:func:" -"`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " -"existing allocator. Substituting the current allocator for some other " -"arbitrary one is **not supported**." +"If called after Python has finish initializing " +"(after :c:func:`Py_InitializeFromConfig` has been called) the allocator " +"**must** wrap the existing allocator. Substituting the current allocator for " +"some other arbitrary one is **not supported**." msgstr "" -#: c-api/memory.rst:519 +#: c-api/memory.rst:564 msgid "All allocators must be thread-safe." msgstr "" -#: c-api/memory.rst:525 +#: c-api/memory.rst:570 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: c-api/memory.rst:532 +#: c-api/memory.rst:577 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: c-api/memory.rst:534 +#: c-api/memory.rst:579 msgid "" -"When :ref:`Python is built in debug mode `, the :c:func:" -"`PyMem_SetupDebugHooks` function is called at the :ref:`Python " +"When :ref:`Python is built in debug mode `, " +"the :c:func:`PyMem_SetupDebugHooks` function is called at the :ref:`Python " "preinitialization ` to setup debug hooks on Python memory " "allocators to detect memory errors." msgstr "" -#: c-api/memory.rst:539 +#: c-api/memory.rst:584 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" -#: c-api/memory.rst:542 +#: c-api/memory.rst:587 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" -#: c-api/memory.rst:545 +#: c-api/memory.rst:590 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -789,33 +866,33 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: c-api/memory.rst:552 +#: c-api/memory.rst:597 msgid "Runtime checks:" msgstr "" -#: c-api/memory.rst:554 +#: c-api/memory.rst:599 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: c-api/memory.rst:556 +#: c-api/memory.rst:601 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: c-api/memory.rst:557 +#: c-api/memory.rst:602 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: c-api/memory.rst:558 +#: c-api/memory.rst:603 msgid "" -"Check that the :term:`GIL ` is held when allocator " +"Check that there is an :term:`attached thread state` when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " "and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are " "called." msgstr "" -#: c-api/memory.rst:563 +#: c-api/memory.rst:608 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -823,7 +900,7 @@ msgid "" "memory block was traced." msgstr "" -#: c-api/memory.rst:568 +#: c-api/memory.rst:613 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -833,49 +910,49 @@ msgid "" "from a Python slice):" msgstr "" -#: c-api/memory.rst:574 +#: c-api/memory.rst:619 msgid "``p[-2*S:-S]``" msgstr "" -#: c-api/memory.rst:575 +#: c-api/memory.rst:620 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" -#: c-api/memory.rst:577 +#: c-api/memory.rst:622 msgid "``p[-S]``" msgstr "" -#: c-api/memory.rst:578 +#: c-api/memory.rst:623 msgid "API identifier (ASCII character):" msgstr "" -#: c-api/memory.rst:580 +#: c-api/memory.rst:625 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: c-api/memory.rst:581 +#: c-api/memory.rst:626 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: c-api/memory.rst:582 +#: c-api/memory.rst:627 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: c-api/memory.rst:584 +#: c-api/memory.rst:629 msgid "``p[-S+1:0]``" msgstr "" -#: c-api/memory.rst:585 +#: c-api/memory.rst:630 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: c-api/memory.rst:587 +#: c-api/memory.rst:632 msgid "``p[0:N]``" msgstr "" -#: c-api/memory.rst:588 +#: c-api/memory.rst:633 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -886,25 +963,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: c-api/memory.rst:596 +#: c-api/memory.rst:641 msgid "``p[N:N+S]``" msgstr "" -#: c-api/memory.rst:597 +#: c-api/memory.rst:642 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: c-api/memory.rst:599 +#: c-api/memory.rst:644 msgid "``p[N+S:N+2*S]``" msgstr "" -#: c-api/memory.rst:600 +#: c-api/memory.rst:645 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" -#: c-api/memory.rst:603 +#: c-api/memory.rst:648 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -914,7 +991,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: c-api/memory.rst:610 +#: c-api/memory.rst:655 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -927,16 +1004,17 @@ msgid "" "getting used)." msgstr "" -#: c-api/memory.rst:619 +#: c-api/memory.rst:664 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " -"compiled in release mode. On error, the debug hooks now use :mod:" -"`tracemalloc` to get the traceback where a memory block was allocated. The " -"debug hooks now also check if the GIL is held when functions of :c:macro:" -"`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." +"compiled in release mode. On error, the debug hooks now " +"use :mod:`tracemalloc` to get the traceback where a memory block was " +"allocated. The debug hooks now also check if there is an :term:`attached " +"thread state` when functions of :c:macro:`PYMEM_DOMAIN_OBJ` " +"and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: c-api/memory.rst:627 +#: c-api/memory.rst:672 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -944,140 +1022,180 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: c-api/memory.rst:637 +#: c-api/memory.rst:682 msgid "The pymalloc allocator" msgstr "" -#: c-api/memory.rst:639 +#: c-api/memory.rst:684 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " "\"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB " -"on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and :c:func:" -"`PyMem_RawRealloc` for allocations larger than 512 bytes." +"on 64-bit platforms. When Python is configured with :option:`--with-pymalloc-" +"hugepages`, the arena size on 64-bit platforms is increased to 2 MiB to " +"match the huge page size, and arena allocation will attempt to use huge " +"pages (``MAP_HUGETLB`` on Linux, ``MEM_LARGE_PAGES`` on Windows) with " +"automatic fallback to regular pages. It falls back " +"to :c:func:`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations " +"larger than 512 bytes." msgstr "" -#: c-api/memory.rst:645 +#: c-api/memory.rst:694 msgid "" "*pymalloc* is the :ref:`default allocator ` of " -"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" -"`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." +"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) " +"and :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: c-api/memory.rst:649 +#: c-api/memory.rst:698 msgid "The arena allocator uses the following functions:" msgstr "" -#: c-api/memory.rst:651 +#: c-api/memory.rst:700 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: c-api/memory.rst:652 +#: c-api/memory.rst:701 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: c-api/memory.rst:653 +#: c-api/memory.rst:702 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: c-api/memory.rst:655 +#: c-api/memory.rst:704 msgid "" "This allocator is disabled if Python is configured with the :option:`--" -"without-pymalloc` option. It can also be disabled at runtime using the :" -"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." +"without-pymalloc` option. It can also be disabled at runtime using " +"the :envvar:`PYTHONMALLOC` environment variable (ex: " +"``PYTHONMALLOC=malloc``)." msgstr "" -#: c-api/memory.rst:660 +#: c-api/memory.rst:708 +msgid "" +"Typically, it makes sense to disable the pymalloc allocator when building " +"Python with AddressSanitizer (:option:`--with-address-sanitizer`) which " +"helps uncover low level bugs within the C code." +msgstr "" + +#: c-api/memory.rst:713 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: c-api/memory.rst:666 +#: c-api/memory.rst:719 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: c-api/memory.rst:674 +#: c-api/memory.rst:727 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "``void* alloc(void *ctx, size_t size)``" -#: c-api/memory.rst:674 +#: c-api/memory.rst:727 msgid "allocate an arena of size bytes" msgstr "" -#: c-api/memory.rst:676 +#: c-api/memory.rst:729 #, fuzzy msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:676 +#: c-api/memory.rst:729 msgid "free an arena" msgstr "" -#: c-api/memory.rst:681 +#: c-api/memory.rst:734 msgid "Get the arena allocator." msgstr "" -#: c-api/memory.rst:685 +#: c-api/memory.rst:738 msgid "Set the arena allocator." msgstr "" -#: c-api/memory.rst:690 +#: c-api/memory.rst:743 msgid "The mimalloc allocator" msgstr "" -#: c-api/memory.rst:694 +#: c-api/memory.rst:747 msgid "" -"Python supports the mimalloc allocator when the underlying platform support " -"is available. mimalloc \"is a general purpose allocator with excellent " -"performance characteristics. Initially developed by Daan Leijen for the " -"runtime systems of the Koka and Lean languages.\"" +"Python supports the `mimalloc `__ " +"allocator when the underlying platform support is available. mimalloc is a " +"general purpose allocator with excellent performance characteristics, " +"initially developed by Daan Leijen for the runtime systems of the Koka and " +"Lean languages." msgstr "" -#: c-api/memory.rst:699 +#: c-api/memory.rst:753 +msgid "" +"Unlike :ref:`pymalloc `, which is optimized for small objects (512 " +"bytes or fewer), mimalloc handles allocations of any size." +msgstr "" + +#: c-api/memory.rst:756 +msgid "" +"In the :term:`free-threaded ` build, mimalloc is the default " +"and **required** allocator for the :c:macro:`PYMEM_DOMAIN_MEM` " +"and :c:macro:`PYMEM_DOMAIN_OBJ` domains. It cannot be disabled in free-" +"threaded builds. The free-threaded build uses per-thread mimalloc heaps, " +"which allows allocation and deallocation to proceed without locking in most " +"cases." +msgstr "" + +#: c-api/memory.rst:762 +msgid "" +"In the default (non-free-threaded) build, mimalloc is available but not the " +"default allocator. It can be selected at runtime " +"using :envvar:`PYTHONMALLOC`\\ ``=mimalloc`` (or ``mimalloc_debug`` to " +"include :ref:`debug hooks `). It can be disabled at " +"build time using the :option:`--without-mimalloc` configure option, but this " +"option cannot be combined with :option:`--disable-gil`." +msgstr "" + +#: c-api/memory.rst:770 msgid "tracemalloc C API" msgstr "" -#: c-api/memory.rst:705 +#: c-api/memory.rst:776 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: c-api/memory.rst:707 +#: c-api/memory.rst:778 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: c-api/memory.rst:710 +#: c-api/memory.rst:781 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: c-api/memory.rst:714 +#: c-api/memory.rst:785 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: c-api/memory.rst:717 +#: c-api/memory.rst:788 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: c-api/memory.rst:723 +#: c-api/memory.rst:794 msgid "Examples" msgstr "Exemples" -#: c-api/memory.rst:725 +#: c-api/memory.rst:796 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: c-api/memory.rst:738 +#: c-api/memory.rst:809 msgid "The same code using the type-oriented function set::" msgstr "" -#: c-api/memory.rst:750 +#: c-api/memory.rst:821 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -1087,14 +1205,15 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: c-api/memory.rst:765 +#: c-api/memory.rst:836 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " -"Python heap, objects in Python are allocated and released with :c:macro:" -"`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`." +"Python heap, objects in Python are allocated and released " +"with :c:macro:`PyObject_New`, :c:macro:`PyObject_NewVar` " +"and :c:func:`PyObject_Free`." msgstr "" -#: c-api/memory.rst:769 +#: c-api/memory.rst:840 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/memoryview.po b/c-api/memoryview.po index 56d78cf1d..6c5e84004 100644 --- a/c-api/memoryview.po +++ b/c-api/memoryview.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2020-09-30 11:10+0200\n" "Last-Translator: Andy Kwok \n" "Language-Team: FRENCH \n" @@ -31,6 +31,12 @@ msgstr "" #: c-api/memoryview.rst:18 msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python memoryview " +"type. This is the same object as :class:`memoryview` in the Python layer." +msgstr "" + +#: c-api/memoryview.rst:24 +msgid "" "Create a memoryview object from an object that provides the buffer " "interface. If *obj* supports writable buffer exports, the memoryview object " "will be read/write, otherwise it may be either read-only or read/write at " @@ -41,15 +47,15 @@ msgstr "" "*memoryview* crée acceptera la lecture et écriture, sinon l'objet crée est " "soit en lecture seule ou lecture/écriture, à la discrétion de l'*exporteur*." -#: c-api/memoryview.rst:26 +#: c-api/memoryview.rst:32 msgid "Flag to request a readonly buffer." msgstr "" -#: c-api/memoryview.rst:31 +#: c-api/memoryview.rst:37 msgid "Flag to request a writable buffer." msgstr "" -#: c-api/memoryview.rst:36 +#: c-api/memoryview.rst:42 msgid "" "Create a memoryview object using *mem* as the underlying buffer. *flags* can " "be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." @@ -57,7 +63,7 @@ msgstr "" "Crée un objet *memoryview* utilisant *mem* comme un tampon sous-jacent. " "*flags* peut être :c:macro:`PyBUF_READ` ou :c:macro:`PyBUF_WRITE`." -#: c-api/memoryview.rst:43 +#: c-api/memoryview.rst:49 msgid "" "Create a memoryview object wrapping the given buffer structure *view*. For " "simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred " @@ -66,7 +72,7 @@ msgstr "" "Crée un objet *memoryview* à partir de la structure tampon *view*. Pour de " "simples tampons d'octets, :c:func:`PyMemoryView_FromMemory` est préférée." -#: c-api/memoryview.rst:49 +#: c-api/memoryview.rst:55 msgid "" "Create a memoryview object to a :term:`contiguous` chunk of memory (in " "either 'C' or 'F'ortran *order*) from an object that defines the buffer " @@ -80,7 +86,7 @@ msgstr "" "*memoryview* pointe vers la mémoire d'origine. Sinon une copie est faite et " "la *memoryview* pointe vers un nouvel objet *bytes*." -#: c-api/memoryview.rst:55 +#: c-api/memoryview.rst:61 #, fuzzy msgid "" "*buffertype* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." @@ -88,7 +94,7 @@ msgstr "" "Crée un objet *memoryview* utilisant *mem* comme un tampon sous-jacent. " "*flags* peut être :c:macro:`PyBUF_READ` ou :c:macro:`PyBUF_WRITE`." -#: c-api/memoryview.rst:60 +#: c-api/memoryview.rst:66 #, fuzzy msgid "" "Return true if the object *obj* is a memoryview object. It is not currently " @@ -98,7 +104,7 @@ msgstr "" "Renvoie vrai si l'objet *obj* est un objet *memoryview*. Il n'est pas permis " "de créer une sous-classe de :class:`memoryview`." -#: c-api/memoryview.rst:67 +#: c-api/memoryview.rst:73 msgid "" "Return a pointer to the memoryview's private copy of the exporter's buffer. " "*mview* **must** be a memoryview instance; this macro doesn't check its " @@ -109,17 +115,18 @@ msgstr "" "macro ne vérifie pas le type, vous devez le faire vous-même sinon vous " "pourriez subir un crash." -#: c-api/memoryview.rst:73 +#: c-api/memoryview.rst:79 msgid "" "Return either a pointer to the exporting object that the memoryview is based " -"on or ``NULL`` if the memoryview has been created by one of the functions :c:" -"func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`. *mview* " -"**must** be a memoryview instance." +"on or ``NULL`` if the memoryview has been created by one of the " +"functions :c:func:`PyMemoryView_FromMemory` " +"or :c:func:`PyMemoryView_FromBuffer`. *mview* **must** be a memoryview " +"instance." msgstr "" "Renvoie soit un pointeur vers l'objet exporté sur lequel est basé la " -"*memoryview* ou ``NULL`` si la *memoryview* a été crée par :c:func:" -"`PyMemoryView_FromMemory` ou :c:func:`PyMemoryView_FromBuffer`. *mview* " -"**doit** être une instance de *memoryview*." +"*memoryview* ou ``NULL`` si la *memoryview* a été crée " +"par :c:func:`PyMemoryView_FromMemory` ou :c:func:`PyMemoryView_FromBuffer`. " +"*mview* **doit** être une instance de *memoryview*." #~ msgid "object" #~ msgstr "objet" diff --git a/c-api/method.po b/c-api/method.po index 447089144..f045a427a 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -33,9 +33,9 @@ msgstr "" #: c-api/method.rst:23 msgid "" -"Return true if *o* is an instance method object (has type :c:data:" -"`PyInstanceMethod_Type`). The parameter must not be ``NULL``. This function " -"always succeeds." +"Return true if *o* is an instance method object (has " +"type :c:data:`PyInstanceMethod_Type`). The parameter must not be ``NULL``. " +"This function always succeeds." msgstr "" #: c-api/method.rst:30 diff --git a/c-api/module.po b/c-api/module.po index 08301fc1e..2305d9b95 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,50 +18,51 @@ msgstr "" msgid "Module Objects" msgstr "" -#: c-api/module.rst:15 +#: c-api/module.rst:14 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python module type. " -"This is exposed to Python programs as ``types.ModuleType``." +"This is exposed to Python programs as :py:class:`types.ModuleType`." msgstr "" -#: c-api/module.rst:21 +#: c-api/module.rst:20 msgid "" "Return true if *p* is a module object, or a subtype of a module object. This " "function always succeeds." msgstr "" -#: c-api/module.rst:27 +#: c-api/module.rst:26 msgid "" -"Return true if *p* is a module object, but not a subtype of :c:data:" -"`PyModule_Type`. This function always succeeds." +"Return true if *p* is a module object, but not a subtype " +"of :c:data:`PyModule_Type`. This function always succeeds." msgstr "" -#: c-api/module.rst:40 +#: c-api/module.rst:39 msgid "" "Return a new module object with :attr:`module.__name__` set to *name*. The " -"module's :attr:`!__name__`, :attr:`~module.__doc__`, :attr:`~module." -"__package__` and :attr:`~module.__loader__` attributes are filled in (all " -"but :attr:`!__name__` are set to ``None``). The caller is responsible for " -"setting a :attr:`~module.__file__` attribute." +"module's :attr:`!" +"__name__`, :attr:`~module.__doc__`, :attr:`~module.__package__` " +"and :attr:`~module.__loader__` attributes are filled in (all but :attr:`!" +"__name__` are set to ``None``). The caller is responsible for setting " +"a :attr:`~module.__file__` attribute." msgstr "" -#: c-api/module.rst:272 c-api/module.rst:474 +#: c-api/module.rst:819 c-api/module.rst:850 msgid "Return ``NULL`` with an exception set on error." msgstr "" -#: c-api/module.rst:50 +#: c-api/module.rst:49 msgid "" ":attr:`~module.__package__` and :attr:`~module.__loader__` are now set to " "``None``." msgstr "" -#: c-api/module.rst:57 +#: c-api/module.rst:56 msgid "" "Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded " "string instead of a Unicode object." msgstr "" -#: c-api/module.rst:65 +#: c-api/module.rst:64 msgid "" "Return the dictionary object that implements *module*'s namespace; this " "object is the same as the :attr:`~object.__dict__` attribute of the module " @@ -69,21 +70,27 @@ msgid "" "object), :exc:`SystemError` is raised and ``NULL`` is returned." msgstr "" -#: c-api/module.rst:70 +#: c-api/module.rst:69 msgid "" "It is recommended extensions use other ``PyModule_*`` and ``PyObject_*`` " -"functions rather than directly manipulate a module's :attr:`~object." -"__dict__`." +"functions rather than directly manipulate a " +"module's :attr:`~object.__dict__`." msgstr "" -#: c-api/module.rst:81 +#: c-api/module.rst:73 +msgid "" +"The returned reference is borrowed from the module; it is valid until the " +"module is destroyed." +msgstr "" + +#: c-api/module.rst:83 msgid "" "Return *module*'s :attr:`~module.__name__` value. If the module does not " "provide one, or if it is not a string, :exc:`SystemError` is raised and " "``NULL`` is returned." msgstr "" -#: c-api/module.rst:90 +#: c-api/module.rst:92 msgid "" "Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to " "``'utf-8'``." @@ -91,431 +98,871 @@ msgstr "" #: c-api/module.rst:95 msgid "" -"Return the \"state\" of the module, that is, a pointer to the block of " -"memory allocated at module creation time, or ``NULL``. See :c:member:" -"`PyModuleDef.m_size`." +"The returned buffer is only valid until the module is renamed or destroyed. " +"Note that Python code may rename a module by setting " +"its :py:attr:`~module.__name__` attribute." msgstr "" -#: c-api/module.rst:102 +#: c-api/module.rst:101 msgid "" "Return a pointer to the :c:type:`PyModuleDef` struct from which the module " "was created, or ``NULL`` if the module wasn't created from a definition." msgstr "" -#: c-api/module.rst:112 +#: c-api/module.rst:104 +msgid "" +"On error, return ``NULL`` with an exception set. " +"Use :c:func:`PyErr_Occurred` to tell this case apart from a " +"missing :c:type:`!PyModuleDef`." +msgstr "" + +#: c-api/module.rst:115 msgid "" -"Return the name of the file from which *module* was loaded using *module*'s :" -"attr:`~module.__file__` attribute. If this is not defined, or if it is not " -"a string, raise :exc:`SystemError` and return ``NULL``; otherwise return a " -"reference to a Unicode object." +"Return the name of the file from which *module* was loaded using " +"*module*'s :attr:`~module.__file__` attribute. If this is not defined, or " +"if it is not a string, raise :exc:`SystemError` and return ``NULL``; " +"otherwise return a reference to a Unicode object." msgstr "" -#: c-api/module.rst:122 +#: c-api/module.rst:125 msgid "" "Similar to :c:func:`PyModule_GetFilenameObject` but return the filename " "encoded to 'utf-8'." msgstr "" -#: c-api/module.rst:125 +#: c-api/module.rst:128 +msgid "" +"The returned buffer is only valid until the " +"module's :py:attr:`~module.__file__` attribute is reassigned or the module " +"is destroyed." +msgstr "" + +#: c-api/module.rst:131 msgid "" ":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on " "unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." msgstr "" -#: c-api/module.rst:133 -msgid "Initializing C modules" +#: c-api/module.rst:140 +msgid "Module definition" msgstr "" -#: c-api/module.rst:135 +#: c-api/module.rst:142 msgid "" -"Modules objects are usually created from extension modules (shared libraries " -"which export an initialization function), or compiled-in modules (where the " -"initialization function is added using :c:func:`PyImport_AppendInittab`). " -"See :ref:`building` or :ref:`extending-with-embedding` for details." +"Modules created using the C API are typically defined using an array " +"of :c:type:`PySlot` structs, which provides a \"description\" of how a " +"module should be created. See :ref:`capi-slots` for more information on " +"slots in general." msgstr "" -#: c-api/module.rst:140 +#: c-api/module.rst:149 +msgid "" +"Previously, a :c:type:`PyModuleDef` struct was necessary to define modules. " +"The older way of defining modules is still available: consult either " +"the :ref:`pymoduledef` section or earlier versions of this documentation if " +"you plan to support earlier Python versions." +msgstr "" + +#: c-api/module.rst:154 +msgid "" +"The slots array is usually used to define an extension module's “main” " +"module object (see :ref:`extension-modules` for details). It can also be " +"used to :ref:`create extension modules dynamically `." +msgstr "" + +#: c-api/module.rst:159 +msgid "" +"Unless specified otherwise, the same slot ID may not be repeated in an array " +"of slots." +msgstr "" + +#: c-api/module.rst:164 +msgid "Metadata slots" +msgstr "" + +#: c-api/module.rst:168 +msgid "" +":c:member:`Slot ID ` for the name of the new module, as a NUL-" +"terminated UTF8-encoded ``const char *``." +msgstr "" + +#: c-api/module.rst:171 +msgid "" +"Note that modules are typically created using " +"a :py:class:`~importlib.machinery.ModuleSpec`, and when they are, the name " +"from the spec will be used instead of :c:data:`!Py_mod_name`. However, it is " +"still recommended to include this slot for introspection and debugging " +"purposes." +msgstr "" + +#: c-api/module.rst:179 +msgid "" +"Use :c:member:`PyModuleDef.m_name` instead to support previous versions." +msgstr "" + +#: c-api/module.rst:183 +msgid "" +":c:type:`Slot ID ` for the docstring of the new module, as a " +"NUL-terminated UTF8-encoded ``const char *``." +msgstr "" + +#: c-api/module.rst:186 +msgid "Usually it is set to a variable created with :c:macro:`PyDoc_STRVAR`." +msgstr "" + +#: c-api/module.rst:190 +msgid "Use :c:member:`PyModuleDef.m_doc` instead to support previous versions." +msgstr "" + +#: c-api/module.rst:194 +msgid "Feature slots" +msgstr "" + +#: c-api/module.rst:198 +msgid "" +":c:member:`Slot ID ` whose value points to " +"a :c:struct:`PyABIInfo` structure describing the ABI that the extension is " +"using." +msgstr "" + +#: c-api/module.rst:202 +msgid "" +"A suitable :c:struct:`!PyABIInfo` variable can be defined using " +"the :c:macro:`PyABIInfo_VAR` macro, as in:" +msgstr "" + +#: c-api/module.rst:214 +msgid "" +"When creating a module, Python checks the value of this slot " +"using :c:func:`PyABIInfo_Check`." +msgstr "" + +#: c-api/module.rst:217 +msgid "" +"This slot is required, except for modules created " +"from :c:struct:`PyModuleDef`." +msgstr "" + +#: c-api/module.rst:254 +msgid ":c:member:`Slot ID ` whose value is one of:" +msgstr "" + +#: c-api/module.rst:230 +msgid "The module does not support being imported in subinterpreters." +msgstr "" + +#: c-api/module.rst:234 +msgid "" +"The module supports being imported in subinterpreters, but only when they " +"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "" + +#: c-api/module.rst:240 +msgid "" +"The module supports being imported in subinterpreters, even when they have " +"their own GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "" + +#: c-api/module.rst:244 +msgid "" +"This slot determines whether or not importing this module in a " +"subinterpreter will fail." +msgstr "" + +#: c-api/module.rst:247 +msgid "" +"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " +"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." +msgstr "" + +#: c-api/module.rst:260 +msgid "" +"The module depends on the presence of the global interpreter lock (GIL), and " +"may access global state without synchronization." +msgstr "" + +#: c-api/module.rst:265 +msgid "The module is safe to run without an active GIL." +msgstr "" + +#: c-api/module.rst:267 +msgid "" +"This slot is ignored by Python builds not configured with :option:`--disable-" +"gil`. Otherwise, it determines whether or not importing this module will " +"cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-" +"threaded-cpython` for more detail." +msgstr "" + +#: c-api/module.rst:272 +msgid "" +"If ``Py_mod_gil`` is not specified, the import machinery defaults to " +"``Py_MOD_GIL_USED``." +msgstr "" + +#: c-api/module.rst:279 +msgid "Creation and initialization slots" +msgstr "" + +#: c-api/module.rst:283 +msgid "" +":c:member:`Slot ID ` for a function that creates the module " +"object itself. The function must have the signature:" +msgstr "" + +#: c-api/module.rst:291 +msgid "The function will be called with:" +msgstr "" + +#: c-api/module.rst:293 +msgid "" +"*spec*: a ``ModuleSpec``-like object, meaning that any attributes defined " +"for :py:class:`importlib.machinery.ModuleSpec` have matching semantics. " +"However, any of the attributes may be missing." +msgstr "" + +#: c-api/module.rst:296 +msgid "" +"*def*: ``NULL``, or the module definition if the module is created from one." +msgstr "" + +#: c-api/module.rst:298 +msgid "" +"The function should return a new module object, or set an error and return " +"``NULL``." +msgstr "" + +#: c-api/module.rst:301 +msgid "" +"This function should be kept minimal. In particular, it should not call " +"arbitrary Python code, as trying to import the same module again may result " +"in an infinite loop." +msgstr "" + +#: c-api/module.rst:305 +msgid "" +"If ``Py_mod_create`` is not specified, the import machinery will create a " +"normal module object using :c:func:`PyModule_New`. The name is taken from " +"*spec*, not the definition, to allow extension modules to dynamically adjust " +"to their place in the module hierarchy and be imported under different names " +"through symlinks, all while sharing a single module definition." +msgstr "" + +#: c-api/module.rst:311 +msgid "" +"There is no requirement for the returned object to be an instance " +"of :c:type:`PyModule_Type`. However, some slots may only be used " +"with :c:type:`!PyModule_Type` instances; in particular:" +msgstr "" + +#: c-api/module.rst:316 +msgid ":c:macro:`Py_mod_exec`," +msgstr "" + +#: c-api/module.rst:317 +msgid "" +":ref:`module state slots ` (``Py_mod_state_*``)," +msgstr "" + +#: c-api/module.rst:318 +msgid ":c:macro:`Py_mod_token`." +msgstr "" + +#: c-api/module.rst:324 +msgid "" +"The *slots* argument may be a ``ModuleSpec``-like object, rather than a " +"true :py:class:`~importlib.machinery.ModuleSpec` instance. Note that " +"previous versions of CPython did not enforce this." +msgstr "" + +#: c-api/module.rst:328 +msgid "" +"The *def* argument may now be ``NULL``, since modules are not necessarily " +"made from definitions." +msgstr "" + +#: c-api/module.rst:333 +msgid "" +":c:member:`Slot ID ` for a function that will :dfn:`execute`, " +"or initialize, the module. This function does the equivalent to executing " +"the code of a Python module: typically, it adds classes and constants to the " +"module. The signature of the function is:" +msgstr "" + +#: c-api/module.rst:343 +msgid "" +"See the :ref:`capi-module-support-functions` section for some useful " +"functions to call." +msgstr "" + +#: c-api/module.rst:346 +msgid "" +"For backwards compatibility, the :c:type:`PyModuleDef.m_slots` array may " +"contain multiple :c:macro:`!Py_mod_exec` slots; these are processed in the " +"order they appear in the array. Elsewhere (that is, in arguments " +"to :c:func:`PyModule_FromSlotsAndSpec` and in return values " +"of :samp:`PyModExport_{}`), repeating the slot is not allowed." +msgstr "" + +#: c-api/module.rst:357 +msgid "" +"Repeated ``Py_mod_exec`` slots are disallowed, except " +"in :c:type:`PyModuleDef.m_slots`." +msgstr "" + +#: c-api/module.rst:362 +msgid "" +":c:member:`Slot ID ` for a table of module-level functions, as " +"an array of :c:type:`PyMethodDef` values suitable as the *functions* " +"argument to :c:func:`PyModule_AddFunctions`." +msgstr "" + +#: c-api/module.rst:366 +msgid "" +"Like other slot IDs, a slots array may only contain one :c:macro:`!" +"Py_mod_methods` entry. To add functions from multiple :c:type:`PyMethodDef` " +"arrays, call :c:func:`PyModule_AddFunctions` in the :c:macro:`Py_mod_exec` " +"function." +msgstr "" + +#: c-api/module.rst:371 +msgid "" +"The table must be statically allocated (or otherwise guaranteed to outlive " +"the module object)." +msgstr "" + +#: c-api/module.rst:376 +msgid "" +"Use :c:member:`PyModuleDef.m_methods` instead to support previous versions." +msgstr "" + +#: c-api/module.rst:381 +msgid "Module state" +msgstr "" + +#: c-api/module.rst:383 +msgid "" +"Extension modules can have *module state* -- a piece of memory that is " +"allocated on module creation, and freed when the module object is " +"deallocated. The module state is specified using :ref:`dedicated slots `." +msgstr "" + +#: c-api/module.rst:388 +msgid "" +"A typical use of module state is storing an exception type -- or indeed " +"*any* type object defined by the module --" +msgstr "" + +#: c-api/module.rst:391 msgid "" -"The initialization function can either pass a module definition instance to :" -"c:func:`PyModule_Create`, and return the resulting module object, or request " -"\"multi-phase initialization\" by returning the definition struct itself." +"Unlike the module's Python attributes, Python code cannot replace or delete " +"data stored in module state." msgstr "" -#: c-api/module.rst:146 +#: c-api/module.rst:394 msgid "" -"The module definition struct, which holds all information needed to create a " -"module object. There is usually only one statically initialized variable of " -"this type for each module." +"Keeping per-module information in attributes and module state, rather than " +"in static globals, makes module objects *isolated* and safer for use in " +"multiple sub-interpreters. It also helps Python do an orderly clean-up when " +"it shuts down." msgstr "" -#: c-api/module.rst:152 -msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." +#: c-api/module.rst:399 +msgid "" +"Extensions that keep references to Python objects as part of module state " +"must implement :c:macro:`Py_mod_state_traverse` " +"and :c:macro:`Py_mod_state_clear` functions to avoid reference leaks." +msgstr "" + +#: c-api/module.rst:403 +msgid "To retrieve the state from a given module, use the following functions:" msgstr "" -#: c-api/module.rst:156 -msgid "Name for the new module." +#: c-api/module.rst:407 +msgid "" +"Return the \"state\" of the module, that is, a pointer to the block of " +"memory allocated at module creation time, or ``NULL``. " +"See :c:macro:`Py_mod_state_size`." msgstr "" -#: c-api/module.rst:160 +#: c-api/module.rst:411 msgid "" -"Docstring for the module; usually a docstring variable created with :c:macro:" -"`PyDoc_STRVAR` is used." +"On error, return ``NULL`` with an exception set. " +"Use :c:func:`PyErr_Occurred` to tell this case apart from missing module " +"state." msgstr "" -#: c-api/module.rst:165 +#: c-api/module.rst:418 msgid "" -"Module state may be kept in a per-module memory area that can be retrieved " -"with :c:func:`PyModule_GetState`, rather than in static globals. This makes " -"modules safe for use in multiple sub-interpreters." +"Set *\\*result* to the size of *module*'s state, as specified " +"using :c:macro:`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`), and " +"return 0." +msgstr "" + +#: c-api/module.rst:422 +msgid "On error, set *\\*result* to -1, and return -1 with an exception set." msgstr "" -#: c-api/module.rst:169 +#: c-api/module.rst:431 +msgid "Slots for defining module state" +msgstr "" + +#: c-api/module.rst:433 msgid "" -"This memory area is allocated based on *m_size* on module creation, and " -"freed when the module object is deallocated, after the :c:member:" -"`~PyModuleDef.m_free` function has been called, if present." +"The following :c:member:`slot IDs ` are available for " +"defining the module state." msgstr "" -#: c-api/module.rst:173 +#: c-api/module.rst:438 msgid "" -"Setting ``m_size`` to ``-1`` means that the module does not support sub-" -"interpreters, because it has global state." +":c:member:`Slot ID ` for the size of the module state, in " +"bytes." msgstr "" -#: c-api/module.rst:176 +#: c-api/module.rst:441 msgid "" -"Setting it to a non-negative value means that the module can be re-" +"Setting the value to a non-negative value means that the module can be re-" "initialized and specifies the additional amount of memory it requires for " -"its state. Non-negative ``m_size`` is required for multi-phase " -"initialization." +"its state." msgstr "" -#: c-api/module.rst:181 +#: c-api/module.rst:445 msgid "See :PEP:`3121` for more details." msgstr "" -#: c-api/module.rst:185 +#: c-api/module.rst:447 msgid "" -"A pointer to a table of module-level functions, described by :c:type:" -"`PyMethodDef` values. Can be ``NULL`` if no functions are present." +"Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." msgstr "" -#: c-api/module.rst:190 +#: c-api/module.rst:474 msgid "" -"An array of slot definitions for multi-phase initialization, terminated by a " -"``{0, NULL}`` entry. When using single-phase initialization, *m_slots* must " -"be ``NULL``." +"Use :c:member:`PyModuleDef.m_size` instead to support previous versions." msgstr "" -#: c-api/module.rst:196 +#: c-api/module.rst:455 msgid "" -"Prior to version 3.5, this member was always set to ``NULL``, and was " -"defined as:" +":c:member:`Slot ID ` for a traversal function to call during " +"GC traversal of the module object." msgstr "" -#: c-api/module.rst:203 +#: c-api/module.rst:458 msgid "" -"A traversal function to call during GC traversal of the module object, or " -"``NULL`` if not needed." +"The signature of the function, and meanings of the arguments, is similar as " +"for :c:member:`PyTypeObject.tp_traverse`:" msgstr "" -#: c-api/module.rst:221 c-api/module.rst:242 +#: c-api/module.rst:487 c-api/module.rst:515 msgid "" "This function is not called if the module state was requested but is not " "allocated yet. This is the case immediately after the module is created and " "before the module is executed (:c:data:`Py_mod_exec` function). More " -"precisely, this function is not called if :c:member:`~PyModuleDef.m_size` is " -"greater than 0 and the module state (as returned by :c:func:" -"`PyModule_GetState`) is ``NULL``." +"precisely, this function is not called if the state size " +"(:c:data:`Py_mod_state_size`) is greater than 0 and the module state (as " +"returned by :c:func:`PyModule_GetState`) is ``NULL``." msgstr "" -#: c-api/module.rst:234 c-api/module.rst:249 -msgid "No longer called before the module state is allocated." +#: c-api/module.rst:478 +msgid "" +":c:member:`Slot ID ` for a clear function to call during GC " +"clearing of the module object." msgstr "" -#: c-api/module.rst:218 -msgid "" -"A clear function to call during GC clearing of the module object, or " -"``NULL`` if not needed." +#: c-api/module.rst:509 +msgid "The signature of the function is:" msgstr "" -#: c-api/module.rst:228 +#: c-api/module.rst:494 msgid "" "Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " "before a module is deallocated. For example, when reference counting is " "enough to determine that an object is no longer used, the cyclic garbage " -"collector is not involved and :c:member:`~PyModuleDef.m_free` is called " -"directly." +"collector is not involved and the :c:macro:`Py_mod_state_free` function is " +"called directly." msgstr "" -#: c-api/module.rst:239 +#: c-api/module.rst:502 msgid "" -"A function to call during deallocation of the module object, or ``NULL`` if " -"not needed." +"Use :c:member:`PyModuleDef.m_clear` instead to support previous versions." msgstr "" -#: c-api/module.rst:253 -msgid "Single-phase initialization" +#: c-api/module.rst:506 +msgid "" +":c:member:`Slot ID ` for a function to call during " +"deallocation of the module object." msgstr "" -#: c-api/module.rst:255 +#: c-api/module.rst:524 msgid "" -"The module initialization function may create and return the module object " -"directly. This is referred to as \"single-phase initialization\", and uses " -"one of the following two module creation functions:" +"Use :c:member:`PyModuleDef.m_free` instead to support previous versions." +msgstr "" + +#: c-api/module.rst:530 +msgid "Module token" msgstr "" -#: c-api/module.rst:261 +#: c-api/module.rst:532 msgid "" -"Create a new module object, given the definition in *def*. This behaves " -"like :c:func:`PyModule_Create2` with *module_api_version* set to :c:macro:" -"`PYTHON_API_VERSION`." +"Each module may have an associated *token*: a pointer-sized value intended " +"to identify of the module state's memory layout. This means that if you have " +"a module object, but you are not sure if it “belongs” to your extension, you " +"can check using code like this:" msgstr "" -#: c-api/module.rst:268 +#: c-api/module.rst:553 msgid "" -"Create a new module object, given the definition in *def*, assuming the API " -"version *module_api_version*. If that version does not match the version of " -"the running interpreter, a :exc:`RuntimeWarning` is emitted." +"A module's token -- and the *your_token* value to use in the above code -- " +"is:" msgstr "" -#: c-api/module.rst:276 +#: c-api/module.rst:555 msgid "" -"Most uses of this function should be using :c:func:`PyModule_Create` " -"instead; only use this if you are sure you need it." +"For modules created with :c:type:`PyModuleDef`: the address of " +"that :c:type:`PyModuleDef`;" msgstr "" -#: c-api/module.rst:279 +#: c-api/module.rst:557 +msgid "" +"For modules defined with the :c:macro:`Py_mod_token` slot: the value of that " +"slot;" +msgstr "" + +#: c-api/module.rst:559 msgid "" -"Before it is returned from in the initialization function, the resulting " -"module object is typically populated using functions like :c:func:" -"`PyModule_AddObjectRef`." +"For modules created from an ``PyModExport_*`` :ref:`export hook `: the slots array that the export hook returned (unless " +"overridden with :c:macro:`Py_mod_token`)." msgstr "" -#: c-api/module.rst:285 -msgid "Multi-phase initialization" +#: c-api/module.rst:565 +msgid ":c:member:`Slot ID ` for the module token." msgstr "" -#: c-api/module.rst:287 +#: c-api/module.rst:567 msgid "" -"An alternate way to specify extensions is to request \"multi-phase " -"initialization\". Extension modules created this way behave more like Python " -"modules: the initialization is split between the *creation phase*, when the " -"module object is created, and the *execution phase*, when it is populated. " -"The distinction is similar to the :py:meth:`!__new__` and :py:meth:`!" -"__init__` methods of classes." +"If you use this slot to set the module token (rather than rely on the " +"default), you must ensure that:" msgstr "" -#: c-api/module.rst:294 +#: c-api/module.rst:570 msgid "" -"Unlike modules created using single-phase initialization, these modules are " -"not singletons: if the *sys.modules* entry is removed and the module is re-" -"imported, a new module object is created, and the old module is subject to " -"normal garbage collection -- as with Python modules. By default, multiple " -"modules created from the same definition should be independent: changes to " -"one should not affect the others. This means that all state should be " -"specific to the module object (using e.g. using :c:func:" -"`PyModule_GetState`), or its contents (such as the module's :attr:`~object." -"__dict__` or individual classes created with :c:func:`PyType_FromSpec`)." +"The pointer outlives the class, so it's not reused for something else while " +"the class exists." msgstr "" -#: c-api/module.rst:304 +#: c-api/module.rst:572 msgid "" -"All modules created using multi-phase initialization are expected to " -"support :ref:`sub-interpreters `. Making sure " -"multiple modules are independent is typically enough to achieve this." +"It \"belongs\" to the extension module where the class lives, so it will not " +"clash with other extensions." msgstr "" -#: c-api/module.rst:308 +#: c-api/module.rst:574 msgid "" -"To request multi-phase initialization, the initialization function " -"(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" -"c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` " -"instance must be initialized with the following function:" +"If the token points to a :c:type:`PyModuleDef` struct, the module should " +"behave as if it was created from that :c:type:`PyModuleDef`. In particular, " +"the module state must have matching layout and semantics." msgstr "" -#: c-api/module.rst:315 +#: c-api/module.rst:578 msgid "" -"Ensures a module definition is a properly initialized Python object that " -"correctly reports its type and reference count." +"Modules created from :c:type:`PyModuleDef` always use the address of " +"the :c:type:`PyModuleDef` as the token. This means that :c:macro:`!" +"Py_mod_token` cannot be used in :c:member:`PyModuleDef.m_slots`." msgstr "" -#: c-api/module.rst:318 -msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +#: c-api/module.rst:587 +msgid "Set *\\*result* to the module token for *module* and return 0." +msgstr "" + +#: c-api/module.rst:589 +msgid "On error, set *\\*result* to NULL, and return -1 with an exception set." msgstr "" -#: c-api/module.rst:322 +#: c-api/module.rst:593 +msgid "See also :c:func:`PyType_GetModuleByToken`." +msgstr "" + +#: c-api/module.rst:599 +msgid "Creating extension modules dynamically" +msgstr "" + +#: c-api/module.rst:601 msgid "" -"The *m_slots* member of the module definition must point to an array of " -"``PyModuleDef_Slot`` structures:" +"The following functions may be used to create an extension module " +"dynamically, rather than from an extension's :ref:`export hook `." msgstr "" -#: c-api/module.rst:329 -msgid "A slot ID, chosen from the available values explained below." +#: c-api/module.rst:606 +msgid "" +"Create a new module object, given an array of :ref:`slots " +"` and the :py:class:`~importlib.machinery.ModuleSpec` " +"*spec*." msgstr "" -#: c-api/module.rst:333 -msgid "Value of the slot, whose meaning depends on the slot ID." +#: c-api/module.rst:609 +msgid "" +"The *slots* argument must point to an array of :c:type:`PySlot` structures, " +"terminated by an entry with slot ID of 0 (typically written " +"as :c:macro:`PySlot_END`). The array must include a :c:data:`Py_mod_abi` " +"entry." msgstr "" -#: c-api/module.rst:337 -msgid "The *m_slots* array must be terminated by a slot with id 0." +#: c-api/module.rst:614 +msgid "" +"The *spec* argument may be any ``ModuleSpec``-like object, as described " +"in :c:macro:`Py_mod_create` documentation. Currently, the *spec* must have a " +"``name`` attribute." msgstr "" -#: c-api/module.rst:339 -msgid "The available slot types are:" +#: c-api/module.rst:618 +msgid "" +"On success, return the new module. On error, return ``NULL`` with an " +"exception set." msgstr "" -#: c-api/module.rst:343 +#: c-api/module.rst:621 msgid "" -"Specifies a function that is called to create the module object itself. The " -"*value* pointer of this slot must point to a function of the signature:" +"Note that this does not process the module's execution slot " +"(:c:data:`Py_mod_exec`). Both :c:func:`!PyModule_FromSlotsAndSpec` " +"and :c:func:`PyModule_Exec` must be called to fully initialize a module. " +"(See also :ref:`multi-phase-initialization`.)" msgstr "" -#: c-api/module.rst:350 +#: c-api/module.rst:631 +msgid "Execute the :c:data:`Py_mod_exec` slot(s) of *module*." +msgstr "" + +#: c-api/module.rst:633 +msgid "On success, return 0. On error, return -1 with an exception set." +msgstr "" + +#: c-api/module.rst:636 msgid "" -"The function receives a :py:class:`~importlib.machinery.ModuleSpec` " -"instance, as defined in :PEP:`451`, and the module definition. It should " -"return a new module object, or set an error and return ``NULL``." +"For clarity: If *module* has no slots, for example if it uses :ref:`legacy " +"single-phase initialization `, this function " +"does nothing and returns 0." +msgstr "" + +#: c-api/module.rst:647 +msgid "Module definition struct" msgstr "" -#: c-api/module.rst:355 +#: c-api/module.rst:649 msgid "" -"This function should be kept minimal. In particular, it should not call " -"arbitrary Python code, as trying to import the same module again may result " -"in an infinite loop." +"Traditionally, extension modules were defined using a *module definition* as " +"the “description\" of how a module should be created. Rather than using an " +"array of :ref:`slots ` directly, the definition has " +"dedicated members for most common functionality, and allows additional slots " +"as an extension mechanism." msgstr "" -#: c-api/module.rst:359 +#: c-api/module.rst:655 msgid "" -"Multiple ``Py_mod_create`` slots may not be specified in one module " -"definition." +"This way of defining modules is still available and there are no plans to " +"remove it." msgstr "" -#: c-api/module.rst:362 +#: c-api/module.rst:660 msgid "" -"If ``Py_mod_create`` is not specified, the import machinery will create a " -"normal module object using :c:func:`PyModule_New`. The name is taken from " -"*spec*, not the definition, to allow extension modules to dynamically adjust " -"to their place in the module hierarchy and be imported under different names " -"through symlinks, all while sharing a single module definition." +"The module definition struct, which holds information needed to create a " +"module object." msgstr "" -#: c-api/module.rst:368 +#: c-api/module.rst:663 msgid "" -"There is no requirement for the returned object to be an instance of :c:type:" -"`PyModule_Type`. Any type can be used, as long as it supports setting and " -"getting import-related attributes. However, only ``PyModule_Type`` instances " -"may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, " -"``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than " -"``Py_mod_create``." +"This structure must be statically allocated (or be otherwise guaranteed to " +"be valid while any modules created from it exist). Usually, there is only " +"one variable of this type for each extension module defined this way." msgstr "" -#: c-api/module.rst:377 +#: c-api/module.rst:668 msgid "" -"Specifies a function that is called to *execute* the module. This is " -"equivalent to executing the code of a Python module: typically, this " -"function adds classes and constants to the module. The signature of the " -"function is:" +"The struct, including all members, is part of the :ref:`Stable ABI ` for non-free-threaded builds (``abi3``). In the Stable ABI for free-" +"threaded builds (``abi3t``), this struct is opaque, and unusable in " +"practice; see :ref:`pymoduledef_slot` for a replacement." msgstr "" -#: c-api/module.rst:386 +#: c-api/module.rst:676 +msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`:" +msgstr "" + +#: c-api/module.rst:682 +msgid "The type of :c:member:`!PyModuleDef.m_base`." +msgstr "" + +#: c-api/module.rst:684 msgid "" -"If multiple ``Py_mod_exec`` slots are specified, they are processed in the " -"order they appear in the *m_slots* array." +"The struct is part of the :ref:`Stable ABI ` for non-free-" +"threaded builds (``abi3``). In the Stable ABI for Free-Threaded Builds " +"(``abi3t``), this struct is opaque, and unusable in practice." +msgstr "" + +#: c-api/module.rst:691 +msgid "The required initial value for :c:member:`!PyModuleDef.m_base`." msgstr "" -#: c-api/module.rst:424 -msgid "Specifies one of the following values:" +#: c-api/module.rst:695 +msgid "Corresponds to the :c:macro:`Py_mod_name` slot." msgstr "" -#: c-api/module.rst:397 -msgid "The module does not support being imported in subinterpreters." +#: c-api/module.rst:699 +msgid "" +"These members correspond to the :c:macro:`Py_mod_doc` slot. Setting this to " +"NULL is equivalent to omitting the slot." msgstr "" -#: c-api/module.rst:401 +#: c-api/module.rst:704 msgid "" -"The module supports being imported in subinterpreters, but only when they " -"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +"Corresponds to the :c:macro:`Py_mod_state_size` slot. Setting this to zero " +"is equivalent to omitting the slot." msgstr "" -#: c-api/module.rst:407 +#: c-api/module.rst:707 msgid "" -"The module supports being imported in subinterpreters, even when they have " -"their own GIL. (See :ref:`isolating-extensions-howto`.)" +"When using :ref:`legacy single-phase initialization ` or when creating modules dynamically " +"using :c:func:`PyModule_Create` or :c:func:`PyModule_Create2`, :c:member:`!" +"m_size` may be set to -1. This indicates that the module does not support " +"sub-interpreters, because it has global state." msgstr "" -#: c-api/module.rst:411 +#: c-api/module.rst:715 msgid "" -"This slot determines whether or not importing this module in a " -"subinterpreter will fail." +"Corresponds to the :c:macro:`Py_mod_methods` slot. Setting this to NULL is " +"equivalent to omitting the slot." msgstr "" -#: c-api/module.rst:414 +#: c-api/module.rst:720 msgid "" -"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " -"module definition." +"An array of additional slots, terminated by a ``{0, NULL}`` entry. Note that " +"the entries use the older :c:type:`PyModuleDef_Slot` structure, rather " +"than :c:type:`PySlot`." msgstr "" -#: c-api/module.rst:417 +#: c-api/module.rst:724 msgid "" -"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " -"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``." +"If the array contains slots corresponding to :c:type:`PyModuleDef` members, " +"the values must match. For example, if you use :c:macro:`Py_mod_name` " +"in :c:member:`!m_slots`, :c:member:`PyModuleDef.m_name` must be set to the " +"same pointer (not just an equal string)." msgstr "" -#: c-api/module.rst:430 +#: c-api/module.rst:732 msgid "" -"The module depends on the presence of the global interpreter lock (GIL), and " -"may access global state without synchronization." +"Prior to version 3.5, this member was always set to ``NULL``, and was " +"defined as:" msgstr "" -#: c-api/module.rst:435 -msgid "The module is safe to run without an active GIL." +#: c-api/module.rst:741 +msgid "Older structure defining additional slots of a module." msgstr "" -#: c-api/module.rst:437 +#: c-api/module.rst:743 msgid "" -"This slot is ignored by Python builds not configured with :option:`--disable-" -"gil`. Otherwise, it determines whether or not importing this module will " -"cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-" -"threaded-cpython` for more detail." +"Note that a :c:type:`!PyModuleDef_Slot` array may be included in a :c:type:`!" +"PySlot` array using :c:macro:`Py_mod_slots`, and vice versa " +"using :c:macro:`Py_slot_subslots`." msgstr "" -#: c-api/module.rst:442 +#: c-api/module.rst:747 msgid "" -"Multiple ``Py_mod_gil`` slots may not be specified in one module definition." +"Each :c:type:`!PyModuleDef_Slot` structure ``modslot`` is interpreted as the " +"following :c:type:`PySlot` structure::" msgstr "" -#: c-api/module.rst:444 +#: c-api/module.rst:756 msgid "" -"If ``Py_mod_gil`` is not specified, the import machinery defaults to " -"``Py_MOD_GIL_USED``." +"where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag " +"(such as for :c:macro:`Py_mod_methods`), or if this flag is present on the " +"\"parent\" :c:macro:`!Py_mod_slots` slot (if any)." msgstr "" -#: c-api/module.rst:449 -msgid "See :PEP:`489` for more details on multi-phase initialization." +#: c-api/module.rst:762 +msgid "Corresponds to :c:member:`PySlot.sl_id`." msgstr "" -#: c-api/module.rst:452 -msgid "Low-level module creation functions" +#: c-api/module.rst:766 +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." msgstr "" -#: c-api/module.rst:454 +#: c-api/module.rst:774 msgid "" -"The following functions are called under the hood when using multi-phase " -"initialization. They can be used directly, for example when creating module " -"objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and " -"``PyModule_ExecDef`` must be called to fully initialize a module." +"These members correspond to " +"the :c:macro:`Py_mod_state_traverse`, :c:macro:`Py_mod_state_clear`, " +"and :c:macro:`Py_mod_state_free` slots, respectively." msgstr "" -#: c-api/module.rst:461 +#: c-api/module.rst:778 msgid "" -"Create a new module object, given the definition in *def* and the ModuleSpec " -"*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with " -"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`." +"Setting these members to NULL is equivalent to omitting the corresponding " +"slots." +msgstr "" + +#: c-api/module.rst:783 +msgid "" +":c:member:`m_traverse`, :c:member:`m_clear` and :c:member:`m_free` functions " +"are no longer called before the module state is allocated." +msgstr "" + +#: c-api/module.rst:789 +msgid "The type of ``PyModuleDef`` objects." +msgstr "" + +#: c-api/module.rst:794 +msgid "" +":c:member:`Slot ID ` that works " +"like :c:macro:`Py_slot_subslots`, except it specifies an array " +"of :c:type:`PyModuleDef_Slot` structures." +msgstr "" + +#: c-api/module.rst:802 +msgid "" +"The following API can be used to create modules from a :c:type:`!" +"PyModuleDef` struct:" +msgstr "" + +#: c-api/module.rst:807 +msgid "" +"Create a new module object, given the definition in *def*. This is a macro " +"that calls :c:func:`PyModule_Create2` with *module_api_version* set " +"to :c:macro:`PYTHON_API_VERSION`, or to :c:macro:`PYTHON_ABI_VERSION` if " +"using the :ref:`limited API `." +msgstr "" + +#: c-api/module.rst:815 +msgid "" +"Create a new module object, given the definition in *def*, assuming the API " +"version *module_api_version*. If that version does not match the version of " +"the running interpreter, a :exc:`RuntimeWarning` is emitted." +msgstr "" + +#: c-api/module.rst:821 +msgid "" +"This function does not support slots. The :c:member:`~PyModuleDef.m_slots` " +"member of *def* must be ``NULL``." +msgstr "" + +#: c-api/module.rst:827 +msgid "" +"Most uses of this function should be using :c:func:`PyModule_Create` " +"instead; only use this if you are sure you need it." +msgstr "" + +#: c-api/module.rst:832 +msgid "" +"This macro calls :c:func:`PyModule_FromDefAndSpec2` with " +"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`, or " +"to :c:macro:`PYTHON_ABI_VERSION` if using the :ref:`limited API `." +msgstr "" + +#: c-api/module.rst:865 +msgid "Prefer :c:func:`PyModule_FromSlotsAndSpec` in new code." msgstr "" -#: c-api/module.rst:469 +#: c-api/module.rst:845 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*, assuming the API version *module_api_version*. If that version does " @@ -523,91 +970,104 @@ msgid "" "emitted." msgstr "" -#: c-api/module.rst:478 +#: c-api/module.rst:852 +msgid "" +"Note that this does not process execution slots (:c:data:`Py_mod_exec`). " +"Both ``PyModule_FromDefAndSpec`` and ``PyModule_ExecDef`` must be called to " +"fully initialize a module." +msgstr "" + +#: c-api/module.rst:858 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:485 +#: c-api/module.rst:869 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: c-api/module.rst:491 +#: c-api/module.rst:875 msgid "" -"Set the docstring for *module* to *docstring*. This function is called " -"automatically when creating a module from ``PyModuleDef``, using either " -"``PyModule_Create`` or ``PyModule_FromDefAndSpec``." +"To run a module's own execution slots, prefer :c:func:`PyModule_Exec`, which " +"works on modules that were not created from a :c:type:`PyModuleDef` " +"structure." msgstr "" -#: c-api/module.rst:500 +#: c-api/module.rst:882 msgid "" -"Add the functions from the ``NULL`` terminated *functions* array to " -"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " -"individual entries (due to the lack of a shared module namespace, module " -"level \"functions\" implemented in C typically receive the module as their " -"first parameter, making them similar to instance methods on Python classes). " -"This function is called automatically when creating a module from " -"``PyModuleDef``, using either ``PyModule_Create`` or " -"``PyModule_FromDefAndSpec``." +"The C API version, as an integer (``1013``) and string (``\"1013\"``), " +"respectively. Defined for backwards compatibility." msgstr "" -#: c-api/module.rst:512 +#: c-api/module.rst:893 +msgid "" +"Currently, this constant is not updated in new Python versions, and is not " +"useful for versioning. This may change in the future." +msgstr "" + +#: c-api/module.rst:891 +msgid "" +"Defined as ``3`` and ``\"3\"``, respectively, for backwards compatibility." +msgstr "" + +#: c-api/module.rst:900 msgid "Support functions" msgstr "" -#: c-api/module.rst:514 +#: c-api/module.rst:902 msgid "" -"The module initialization function (if using single phase initialization) or " -"a function called from a module execution slot (if using multi-phase " -"initialization), can use the following functions to help initialize the " -"module state:" +"The following functions are provided to help initialize a module object. " +"They are intended for a module's execution slot (:c:data:`Py_mod_exec`), the " +"initialization function for legacy :ref:`single-phase initialization `, or code that creates modules dynamically." msgstr "" -#: c-api/module.rst:521 +#: c-api/module.rst:909 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function." msgstr "" -#: c-api/module.rst:524 +#: c-api/module.rst:912 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" -#: c-api/module.rst:526 -msgid "" -"Return ``-1`` if *value* is ``NULL``. It must be called with an exception " -"raised in this case." -msgstr "" - -#: c-api/module.rst:576 c-api/module.rst:603 +#: c-api/module.rst:965 c-api/module.rst:992 msgid "Example usage::" msgstr "Exemple d'utilisation ::" -#: c-api/module.rst:543 +#: c-api/module.rst:928 +msgid "" +"To be convenient, the function accepts ``NULL`` *value* with an exception " +"set. In this case, return ``-1`` and just leave the raised exception " +"unchanged." +msgstr "" + +#: c-api/module.rst:932 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" -#: c-api/module.rst:555 +#: c-api/module.rst:944 msgid "" "Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " "case, since *obj* can be ``NULL``." msgstr "" -#: c-api/module.rst:558 +#: c-api/module.rst:947 msgid "" "The number of different *name* strings passed to this function should be " "kept small, usually by only using statically allocated strings as *name*. " -"For names that aren't known at compile time, prefer calling :c:func:" -"`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` directly. For more " -"details, see :c:func:`PyUnicode_InternFromString`, which may be used " -"internally to create a key object." +"For names that aren't known at compile time, prefer " +"calling :c:func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` " +"directly. For more details, see :c:func:`PyUnicode_InternFromString`, which " +"may be used internally to create a key object." msgstr "" -#: c-api/module.rst:571 +#: c-api/module.rst:960 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " "*value*. It can be called with a result of function that returns a new " @@ -615,49 +1075,45 @@ msgid "" "variable." msgstr "" -#: c-api/module.rst:587 +#: c-api/module.rst:976 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " "*value* on success (if it returns ``0``)." msgstr "" -#: c-api/module.rst:590 +#: c-api/module.rst:979 msgid "" "The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " "are recommended, since it is easy to introduce reference leaks by misusing " "the :c:func:`PyModule_AddObject` function." msgstr "" -#: c-api/module.rst:597 +#: c-api/module.rst:986 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "releases the reference to *value* **on success**." msgstr "" -#: c-api/module.rst:600 +#: c-api/module.rst:989 msgid "" -"This means that its return value must be checked, and calling code must :c:" -"func:`Py_XDECREF` *value* manually on error." -msgstr "" - -#: c-api/module.rst:618 -msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." +"This means that its return value must be checked, and calling code " +"must :c:func:`Py_XDECREF` *value* manually on error." msgstr "" -#: c-api/module.rst:623 +#: c-api/module.rst:1010 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` with an " "exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:627 +#: c-api/module.rst:1014 msgid "" -"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" -"func:`PyModule_AddObjectRef`; see their documentation for details." +"This is a convenience function that calls :c:func:`PyLong_FromLong` " +"and :c:func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" -#: c-api/module.rst:633 +#: c-api/module.rst:1020 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " @@ -665,14 +1121,14 @@ msgid "" "on success." msgstr "" -#: c-api/module.rst:638 +#: c-api/module.rst:1025 msgid "" -"This is a convenience function that calls :c:func:" -"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " -"documentation for details." +"This is a convenience function that " +"calls :c:func:`PyUnicode_InternFromString` " +"and :c:func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" -#: c-api/module.rst:645 +#: c-api/module.rst:1032 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -680,11 +1136,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:653 +#: c-api/module.rst:1040 msgid "Add a string constant to *module*." msgstr "" -#: c-api/module.rst:657 +#: c-api/module.rst:1044 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -692,36 +1148,74 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:667 +#: c-api/module.rst:1054 +msgid "" +"Add the functions from the ``NULL`` terminated *functions* array to " +"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " +"individual entries (due to the lack of a shared module namespace, module " +"level \"functions\" implemented in C typically receive the module as their " +"first parameter, making them similar to instance methods on Python classes)." +msgstr "" + +#: c-api/module.rst:1060 +msgid "" +"This function is called automatically when creating a module from " +"``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`, " +"``PyModule_Create``, or ``PyModule_FromDefAndSpec``). Some module authors " +"may prefer defining functions in multiple :c:type:`PyMethodDef` arrays; in " +"that case they should call this function directly." +msgstr "" + +#: c-api/module.rst:1067 +msgid "" +"The *functions* array must be statically allocated (or otherwise guaranteed " +"to outlive the module object)." +msgstr "" + +#: c-api/module.rst:1074 +msgid "" +"Set the docstring for *module* to *docstring*. This function is called " +"automatically when creating a module from ``PyModuleDef`` (such as when " +"using :ref:`multi-phase-initialization`, ``PyModule_Create``, or " +"``PyModule_FromDefAndSpec``)." +msgstr "" + +#: c-api/module.rst:1079 +msgid "Return ``0`` on success. Return ``-1`` with an exception set on error." +msgstr "" + +#: c-api/module.rst:1086 msgid "" "Indicate that *module* does or does not support running without the global " "interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " -"It must be called during *module*'s initialization function. If this " -"function is not called during module initialization, the import machinery " -"assumes the module does not support running without the GIL. This function " -"is only available in Python builds configured with :option:`--disable-gil`. " -"Return ``-1`` with an exception set on error, ``0`` on success." +"It must be called during *module*'s initialization function when " +"using :ref:`single-phase-initialization`. If this function is not called " +"during module initialization, the import machinery assumes the module does " +"not support running without the GIL. This function is only available in " +"Python builds configured with :option:`--disable-gil`. Return ``-1`` with an " +"exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:680 -msgid "Module lookup" +#: c-api/module.rst:1100 +msgid "Module lookup (single-phase initialization)" msgstr "" -#: c-api/module.rst:682 +#: c-api/module.rst:1102 msgid "" -"Single-phase initialization creates singleton modules that can be looked up " -"in the context of the current interpreter. This allows the module object to " -"be retrieved later with only a reference to the module definition." +"The legacy :ref:`single-phase initialization ` " +"initialization scheme creates singleton modules that can be looked up in the " +"context of the current interpreter. This allows the module object to be " +"retrieved later with only a reference to the module definition." msgstr "" -#: c-api/module.rst:686 +#: c-api/module.rst:1107 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: c-api/module.rst:691 +#: c-api/module.rst:1112 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -730,20 +1224,21 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: c-api/module.rst:698 +#: c-api/module.rst:1119 msgid "" "Attaches the module object passed to the function to the interpreter state. " -"This allows the module object to be accessible via :c:func:" -"`PyState_FindModule`." +"This allows the module object to be accessible " +"via :c:func:`PyState_FindModule`." msgstr "" -#: c-api/module.rst:701 +#: c-api/module.rst:1122 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: c-api/module.rst:703 +#: c-api/module.rst:1124 msgid "" -"Python calls ``PyState_AddModule`` automatically after importing a module, " +"Python calls ``PyState_AddModule`` automatically after importing a module " +"that uses :ref:`single-phase initialization `, " "so it is unnecessary (but harmless) to call it from module initialization " "code. An explicit call is needed only if the module's own init code " "subsequently calls ``PyState_FindModule``. The function is mainly intended " @@ -752,15 +1247,21 @@ msgid "" "state updates)." msgstr "" -#: c-api/module.rst:722 -msgid "The caller must hold the GIL." +#: c-api/module.rst:1133 +msgid "" +"If a module was attached previously using the same *def*, it is replaced by " +"the new *module*." +msgstr "" + +#: c-api/module.rst:1147 +msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: c-api/module.rst:713 +#: c-api/module.rst:1138 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: c-api/module.rst:719 +#: c-api/module.rst:1144 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return ``-1`` with an exception set on error, ``0`` on success." diff --git a/c-api/monitoring.po b/c-api/monitoring.po index 87cd118e0..f937d9df0 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,170 +15,174 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/c-api/monitoring.rst:6 +#: c-api/monitoring.rst:6 msgid "Monitoring C API" msgstr "" -#: ../Doc/c-api/monitoring.rst:8 +#: c-api/monitoring.rst:8 msgid "Added in version 3.13." msgstr "" -#: ../Doc/c-api/monitoring.rst:10 +#: c-api/monitoring.rst:10 msgid "" "An extension may need to interact with the event monitoring system. " "Subscribing to events and registering callbacks can be done via the Python " "API exposed in :mod:`sys.monitoring`." msgstr "" -#: ../Doc/c-api/monitoring.rst:15 +#: c-api/monitoring.rst:15 msgid "Generating Execution Events" msgstr "" -#: ../Doc/c-api/monitoring.rst:17 +#: c-api/monitoring.rst:17 msgid "" "The functions below make it possible for an extension to fire monitoring " "events as it emulates the execution of Python code. Each of these functions " "accepts a ``PyMonitoringState`` struct which contains concise information " "about the activation state of events, as well as the event arguments, which " "include a ``PyObject*`` representing the code object, the instruction offset " -"and sometimes additional, event-specific arguments (see :mod:`sys." -"monitoring` for details about the signatures of the different event " -"callbacks). The ``codelike`` argument should be an instance of :class:`types." -"CodeType` or of a type that emulates it." +"and sometimes additional, event-specific arguments " +"(see :mod:`sys.monitoring` for details about the signatures of the different " +"event callbacks). The ``codelike`` argument should be an instance " +"of :class:`types.CodeType` or of a type that emulates it." msgstr "" -#: ../Doc/c-api/monitoring.rst:27 +#: c-api/monitoring.rst:27 msgid "" "The VM disables tracing when firing an event, so there is no need for user " "code to do that." msgstr "" -#: ../Doc/c-api/monitoring.rst:30 +#: c-api/monitoring.rst:30 msgid "" "Monitoring functions should not be called with an exception set, except " "those listed below as working with the current exception." msgstr "" -#: ../Doc/c-api/monitoring.rst:35 +#: c-api/monitoring.rst:35 msgid "" "Representation of the state of an event type. It is allocated by the user " "while its contents are maintained by the monitoring API functions described " "below." msgstr "" -#: ../Doc/c-api/monitoring.rst:39 +#: c-api/monitoring.rst:39 msgid "" "All of the functions below return 0 on success and -1 (with an exception " "set) on error." msgstr "" -#: ../Doc/c-api/monitoring.rst:41 +#: c-api/monitoring.rst:41 msgid "See :mod:`sys.monitoring` for descriptions of the events." msgstr "" -#: ../Doc/c-api/monitoring.rst:45 +#: c-api/monitoring.rst:45 msgid "Fire a ``PY_START`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:50 +#: c-api/monitoring.rst:50 msgid "Fire a ``PY_RESUME`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:55 +#: c-api/monitoring.rst:55 msgid "Fire a ``PY_RETURN`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:60 +#: c-api/monitoring.rst:60 msgid "Fire a ``PY_YIELD`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:65 +#: c-api/monitoring.rst:65 msgid "Fire a ``CALL`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:70 +#: c-api/monitoring.rst:70 msgid "Fire a ``LINE`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:75 +#: c-api/monitoring.rst:75 msgid "Fire a ``JUMP`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:80 -msgid "Fire a ``BRANCH`` event." +#: c-api/monitoring.rst:80 +msgid "Fire a ``BRANCH_LEFT`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:85 +#: c-api/monitoring.rst:85 +msgid "Fire a ``BRANCH_RIGHT`` event." +msgstr "" + +#: c-api/monitoring.rst:90 msgid "Fire a ``C_RETURN`` event." msgstr "" -#: ../Doc/c-api/monitoring.rst:90 +#: c-api/monitoring.rst:95 msgid "" -"Fire a ``PY_THROW`` event with the current exception (as returned by :c:func:" -"`PyErr_GetRaisedException`)." +"Fire a ``PY_THROW`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:96 +#: c-api/monitoring.rst:101 msgid "" -"Fire a ``RAISE`` event with the current exception (as returned by :c:func:" -"`PyErr_GetRaisedException`)." +"Fire a ``RAISE`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:102 +#: c-api/monitoring.rst:107 msgid "" -"Fire a ``C_RAISE`` event with the current exception (as returned by :c:func:" -"`PyErr_GetRaisedException`)." +"Fire a ``C_RAISE`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:108 +#: c-api/monitoring.rst:113 msgid "" -"Fire a ``RERAISE`` event with the current exception (as returned by :c:func:" -"`PyErr_GetRaisedException`)." +"Fire a ``RERAISE`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:114 +#: c-api/monitoring.rst:119 msgid "" "Fire an ``EXCEPTION_HANDLED`` event with the current exception (as returned " "by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:120 +#: c-api/monitoring.rst:125 msgid "" -"Fire a ``PY_UNWIND`` event with the current exception (as returned by :c:" -"func:`PyErr_GetRaisedException`)." +"Fire a ``PY_UNWIND`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." msgstr "" -#: ../Doc/c-api/monitoring.rst:126 +#: c-api/monitoring.rst:131 msgid "" -"Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:" -"`StopIteration`, it is used. Otherwise, a new :exc:`StopIteration` instance " -"is created with ``value`` as its argument." +"Fire a ``STOP_ITERATION`` event. If ``value`` is an instance " +"of :exc:`StopIteration`, it is used. Otherwise, a new :exc:`StopIteration` " +"instance is created with ``value`` as its argument." msgstr "" -#: ../Doc/c-api/monitoring.rst:131 +#: c-api/monitoring.rst:136 msgid "Managing the Monitoring State" msgstr "" -#: ../Doc/c-api/monitoring.rst:133 +#: c-api/monitoring.rst:138 msgid "" "Monitoring states can be managed with the help of monitoring scopes. A scope " -"would typically correspond to a python function." +"would typically correspond to a Python function." msgstr "" -#: ../Doc/c-api/monitoring.rst:138 +#: c-api/monitoring.rst:143 msgid "" "Enter a monitored scope. ``event_types`` is an array of the event IDs for " "events that may be fired from the scope. For example, the ID of a " "``PY_START`` event is the value ``PY_MONITORING_EVENT_PY_START``, which is " -"numerically equal to the base-2 logarithm of ``sys.monitoring.events." -"PY_START``. ``state_array`` is an array with a monitoring state entry for " -"each event in ``event_types``, it is allocated by the user but populated by :" -"c:func:`!PyMonitoring_EnterScope` with information about the activation " -"state of the event. The size of ``event_types`` (and hence also of " -"``state_array``) is given in ``length``." +"numerically equal to the base-2 logarithm of " +"``sys.monitoring.events.PY_START``. ``state_array`` is an array with a " +"monitoring state entry for each event in ``event_types``, it is allocated by " +"the user but populated by :c:func:`!PyMonitoring_EnterScope` with " +"information about the activation state of the event. The size of " +"``event_types`` (and hence also of ``state_array``) is given in ``length``." msgstr "" -#: ../Doc/c-api/monitoring.rst:148 +#: c-api/monitoring.rst:153 msgid "" "The ``version`` argument is a pointer to a value which should be allocated " "by the user together with ``state_array`` and initialized to 0, and then set " @@ -189,7 +191,7 @@ msgid "" "to return quickly if they have not." msgstr "" -#: ../Doc/c-api/monitoring.rst:154 +#: c-api/monitoring.rst:159 msgid "" "The scopes referred to here are lexical scopes: a function, class or " "method. :c:func:`!PyMonitoring_EnterScope` should be called whenever the " @@ -199,87 +201,97 @@ msgid "" "emulating a generator, the scope needs to be exited and re-entered." msgstr "" -#: ../Doc/c-api/monitoring.rst:161 +#: c-api/monitoring.rst:166 msgid "The macros for *event_types* are:" msgstr "" -#: ../Doc/c-api/monitoring.rst:169 +#: c-api/monitoring.rst:174 msgid "Macro" msgstr "" -#: ../Doc/c-api/monitoring.rst:169 +#: c-api/monitoring.rst:174 msgid "Event" msgstr "Événement" -#: ../Doc/c-api/monitoring.rst:171 -msgid ":monitoring-event:`BRANCH`" +#: c-api/monitoring.rst:176 +msgid ":monitoring-event:`BRANCH_LEFT`" +msgstr "" + +#: c-api/monitoring.rst:177 +msgid ":monitoring-event:`BRANCH_RIGHT`" msgstr "" -#: ../Doc/c-api/monitoring.rst:172 +#: c-api/monitoring.rst:178 msgid ":monitoring-event:`CALL`" msgstr "" -#: ../Doc/c-api/monitoring.rst:173 +#: c-api/monitoring.rst:179 msgid ":monitoring-event:`C_RAISE`" msgstr "" -#: ../Doc/c-api/monitoring.rst:174 +#: c-api/monitoring.rst:180 msgid ":monitoring-event:`C_RETURN`" msgstr "" -#: ../Doc/c-api/monitoring.rst:175 +#: c-api/monitoring.rst:181 msgid ":monitoring-event:`EXCEPTION_HANDLED`" msgstr "" -#: ../Doc/c-api/monitoring.rst:176 +#: c-api/monitoring.rst:182 msgid ":monitoring-event:`INSTRUCTION`" msgstr "" -#: ../Doc/c-api/monitoring.rst:177 +#: c-api/monitoring.rst:183 msgid ":monitoring-event:`JUMP`" msgstr "" -#: ../Doc/c-api/monitoring.rst:178 +#: c-api/monitoring.rst:184 msgid ":monitoring-event:`LINE`" msgstr "" -#: ../Doc/c-api/monitoring.rst:179 +#: c-api/monitoring.rst:185 msgid ":monitoring-event:`PY_RESUME`" msgstr "" -#: ../Doc/c-api/monitoring.rst:180 +#: c-api/monitoring.rst:186 msgid ":monitoring-event:`PY_RETURN`" msgstr "" -#: ../Doc/c-api/monitoring.rst:181 +#: c-api/monitoring.rst:187 msgid ":monitoring-event:`PY_START`" msgstr "" -#: ../Doc/c-api/monitoring.rst:182 +#: c-api/monitoring.rst:188 msgid ":monitoring-event:`PY_THROW`" msgstr "" -#: ../Doc/c-api/monitoring.rst:183 +#: c-api/monitoring.rst:189 msgid ":monitoring-event:`PY_UNWIND`" msgstr "" -#: ../Doc/c-api/monitoring.rst:184 +#: c-api/monitoring.rst:190 msgid ":monitoring-event:`PY_YIELD`" msgstr "" -#: ../Doc/c-api/monitoring.rst:185 +#: c-api/monitoring.rst:191 msgid ":monitoring-event:`RAISE`" msgstr "" -#: ../Doc/c-api/monitoring.rst:186 +#: c-api/monitoring.rst:192 msgid ":monitoring-event:`RERAISE`" msgstr "" -#: ../Doc/c-api/monitoring.rst:187 +#: c-api/monitoring.rst:193 msgid ":monitoring-event:`STOP_ITERATION`" msgstr "" -#: ../Doc/c-api/monitoring.rst:192 +#: c-api/monitoring.rst:198 msgid "" "Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`." msgstr "" + +#: c-api/monitoring.rst:203 +msgid "" +"Return true if the event corresponding to the event ID *ev* is a :ref:`local " +"event `." +msgstr "" diff --git a/c-api/none.po b/c-api/none.po index 11c5e9f16..4ab6b05d6 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2017-11-05 11:18+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -28,8 +28,8 @@ msgid "" msgstr "" "Notez que le :c:type:`PyTypeObject` de ``None`` n'est pas directement exposé " "via l'API Python/C. Puisque ``None`` est un singleton, tester son identité " -"(en utilisant ``==`` en C) est suffisant. Il n'existe pas de fonction :c:" -"func:`PyNone_Check` pour la même raison." +"(en utilisant ``==`` en C) est suffisant. Il n'existe pas de " +"fonction :c:func:`PyNone_Check` pour la même raison." #: c-api/none.rst:18 #, fuzzy diff --git a/c-api/number.po b/c-api/number.po index e45206b7c..8146a235c 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -254,8 +254,8 @@ msgstr "" #: c-api/number.rst:257 msgid "" -"Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" -"`TypeError` exception raised on failure." +"Returns the *o* converted to a Python int on success or ``NULL`` with " +"a :exc:`TypeError` exception raised on failure." msgstr "" #: c-api/number.rst:260 @@ -263,14 +263,16 @@ msgid "" "The result always has exact type :class:`int`. Previously, the result could " "have been an instance of a subclass of ``int``." msgstr "" +"Le résultat a toujours le type :class:`int`. Précédemment, le résultat " +"aurait pu être une instance d'une sous-classe de ``int``." #: c-api/number.rst:267 msgid "" "Returns the integer *n* converted to base *base* as a string. The *base* " "argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " "string is prefixed with a base marker of ``'0b'``, ``'0o'``, or ``'0x'``, " -"respectively. If *n* is not a Python int, it is converted with :c:func:" -"`PyNumber_Index` first." +"respectively. If *n* is not a Python int, it is converted " +"with :c:func:`PyNumber_Index` first." msgstr "" #: c-api/number.rst:276 @@ -282,12 +284,12 @@ msgstr "" #: c-api/number.rst:279 msgid "" -"If *o* can be converted to a Python int but the attempt to convert to a :c:" -"type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " -"argument is the type of exception that will be raised (usually :exc:" -"`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the " -"exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a " -"negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." +"If *o* can be converted to a Python int but the attempt to convert to " +"a :c:type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the " +"*exc* argument is the type of exception that will be raised " +"(usually :exc:`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, " +"then the exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` " +"for a negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" #: c-api/number.rst:289 diff --git a/c-api/object.po b/c-api/object.po index b689565cd..51d4dbccb 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-08-16 22:56+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -135,8 +135,8 @@ msgstr "" #: c-api/object.rst:50 msgid "" -"This function is primarily intended for backwards compatibility: using :c:" -"func:`Py_GetConstant` is recommended for new code." +"This function is primarily intended for backwards compatibility: " +"using :c:func:`Py_GetConstant` is recommended for new code." msgstr "" #: c-api/object.rst:53 @@ -157,8 +157,8 @@ msgstr "" #, fuzzy msgid "" "Properly handle returning :c:data:`Py_NotImplemented` from within a C " -"function (that is, create a new :term:`strong reference` to :const:" -"`NotImplemented` and return it)." +"function (that is, create a new :term:`strong reference` " +"to :const:`NotImplemented` and return it)." msgstr "" "Traite proprement le renvoi de :c:data:`Py_NotImplemented` depuis " "l'intérieur d'une fonction C (c'est-à-dire, incrémente le compteur de " @@ -166,9 +166,10 @@ msgstr "" #: c-api/object.rst:74 msgid "" -"Flag to be used with multiple functions that print the object (like :c:func:" -"`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, these " -"function would use the :func:`str` of the object instead of the :func:`repr`." +"Flag to be used with multiple functions that print the object " +"(like :c:func:`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, " +"these functions use the :func:`str` of the object instead of " +"the :func:`repr`." msgstr "" #: c-api/object.rst:82 @@ -186,6 +187,48 @@ msgstr "" "de :func:`repr`." #: c-api/object.rst:90 +msgid "" +"Dump an object *op* to ``stderr``. This should only be used for debugging." +msgstr "" + +#: c-api/object.rst:92 +msgid "" +"The output is intended to try dumping objects even after memory corruption:" +msgstr "" + +#: c-api/object.rst:94 +msgid "" +"Information is written starting with fields that are the least likely to " +"crash when accessed." +msgstr "" + +#: c-api/object.rst:96 +msgid "" +"This function can be called without an :term:`attached thread state`, but " +"it's not recommended to do so: it can cause deadlocks." +msgstr "" + +#: c-api/object.rst:98 +msgid "" +"An object that does not belong to the current interpreter may be dumped, but " +"this may also cause crashes or unintended behavior." +msgstr "" + +#: c-api/object.rst:100 +msgid "" +"Implement a heuristic to detect if the object memory has been freed. Don't " +"display the object contents in this case, only its memory address." +msgstr "" + +#: c-api/object.rst:102 +msgid "The output format may change at any time." +msgstr "" + +#: c-api/object.rst:104 +msgid "Example of output:" +msgstr "" + +#: c-api/object.rst:119 #, fuzzy msgid "" "Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " @@ -196,14 +239,14 @@ msgstr "" "équivalent à l'expression Python ``hasattr(o, attr_name)``. Cette fonction " "réussit toujours." -#: c-api/object.rst:99 +#: c-api/object.rst:128 msgid "" "This is the same as :c:func:`PyObject_HasAttrWithError`, but *attr_name* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:108 +#: c-api/object.rst:137 #, fuzzy msgid "" "Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " @@ -213,39 +256,41 @@ msgstr "" "équivalent à l'expression Python ``hasattr(o, attr_name)``. Cette fonction " "réussit toujours." -#: c-api/object.rst:113 +#: c-api/object.rst:142 #, fuzzy msgid "" -"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" -"`~object.__getattribute__` methods are silently ignored. For proper error " -"handling, use :c:func:`PyObject_HasAttrWithError`, :c:func:" -"`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead." +"Exceptions that occur when this calls :meth:`~object.__getattr__` " +"and :meth:`~object.__getattribute__` methods aren't propagated, but instead " +"given to :func:`sys.unraisablehook`. For proper error handling, " +"use :c:func:`PyObject_HasAttrWithError`, :c:func:`PyObject_GetOptionalAttr` " +"or :c:func:`PyObject_GetAttr` instead." msgstr "" -"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" -"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " -"plutôt :c:func:`PyObject_GetItem()`." +"Notez que les exceptions qui surviennent pendant l'appel de la " +"méthode :meth:`__getitem__` seront supprimées. Pour obtenir le rapport " +"d'erreur, utilisez plutôt :c:func:`PyObject_GetItem()`." -#: c-api/object.rst:121 +#: c-api/object.rst:151 msgid "" "This is the same as :c:func:`PyObject_HasAttr`, but *attr_name* is specified " -"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:127 +#: c-api/object.rst:157 #, fuzzy msgid "" -"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" -"`~object.__getattribute__` methods or while creating the temporary :class:" -"`str` object are silently ignored. For proper error handling, use :c:func:" -"`PyObject_HasAttrStringWithError`, :c:func:`PyObject_GetOptionalAttrString` " +"Exceptions that occur when this calls :meth:`~object.__getattr__` " +"and :meth:`~object.__getattribute__` methods or while creating the " +"temporary :class:`str` object are silently ignored. For proper error " +"handling, " +"use :c:func:`PyObject_HasAttrStringWithError`, :c:func:`PyObject_GetOptionalAttrString` " "or :c:func:`PyObject_GetAttrString` instead." msgstr "" -"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" -"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " -"plutôt :c:func:`PyObject_GetItem()`." +"Notez que les exceptions qui surviennent pendant l'appel de la " +"méthode :meth:`__getitem__` seront supprimées. Pour obtenir le rapport " +"d'erreur, utilisez plutôt :c:func:`PyObject_GetItem()`." -#: c-api/object.rst:137 +#: c-api/object.rst:167 #, fuzzy msgid "" "Retrieve an attribute named *attr_name* from object *o*. Returns the " @@ -256,65 +301,67 @@ msgstr "" "l'attribut en cas de succès, ou *NULL* en cas d'échec. Ceci est équivalent à " "l'expression Python ``o.attr_name``." -#: c-api/object.rst:141 +#: c-api/object.rst:171 msgid "" -"If the missing attribute should not be treated as a failure, you can use :c:" -"func:`PyObject_GetOptionalAttr` instead." +"If the missing attribute should not be treated as a failure, you can " +"use :c:func:`PyObject_GetOptionalAttr` instead." msgstr "" -#: c-api/object.rst:147 +#: c-api/object.rst:177 msgid "" "This is the same as :c:func:`PyObject_GetAttr`, but *attr_name* is specified " -"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:151 +#: c-api/object.rst:181 msgid "" -"If the missing attribute should not be treated as a failure, you can use :c:" -"func:`PyObject_GetOptionalAttrString` instead." +"If the missing attribute should not be treated as a failure, you can " +"use :c:func:`PyObject_GetOptionalAttrString` instead." msgstr "" -#: c-api/object.rst:157 +#: c-api/object.rst:187 msgid "" -"Variant of :c:func:`PyObject_GetAttr` which doesn't raise :exc:" -"`AttributeError` if the attribute is not found." +"Variant of :c:func:`PyObject_GetAttr` which doesn't " +"raise :exc:`AttributeError` if the attribute is not found." msgstr "" -#: c-api/object.rst:160 +#: c-api/object.rst:190 msgid "" -"If the attribute is found, return ``1`` and set *\\*result* to a new :term:" -"`strong reference` to the attribute. If the attribute is not found, return " -"``0`` and set *\\*result* to ``NULL``; the :exc:`AttributeError` is " -"silenced. If an error other than :exc:`AttributeError` is raised, return " -"``-1`` and set *\\*result* to ``NULL``." +"If the attribute is found, return ``1`` and set *\\*result* to a " +"new :term:`strong reference` to the attribute. If the attribute is not " +"found, return ``0`` and set *\\*result* to ``NULL``; " +"the :exc:`AttributeError` is silenced. If an error other " +"than :exc:`AttributeError` is raised, return ``-1`` and set *\\*result* to " +"``NULL``." msgstr "" -#: c-api/object.rst:172 +#: c-api/object.rst:202 msgid "" "This is the same as :c:func:`PyObject_GetOptionalAttr`, but *attr_name* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:180 +#: c-api/object.rst:210 msgid "" "Generic attribute getter function that is meant to be put into a type " "object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary " -"of classes in the object's MRO as well as an attribute in the object's :attr:" -"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data " -"descriptors take preference over instance attributes, while non-data " -"descriptors don't. Otherwise, an :exc:`AttributeError` is raised." +"of classes in the object's MRO as well as an attribute in the " +"object's :attr:`~object.__dict__` (if present). As outlined " +"in :ref:`descriptors`, data descriptors take preference over instance " +"attributes, while non-data descriptors don't. Otherwise, " +"an :exc:`AttributeError` is raised." msgstr "" "Accesseur d'attribut générique destiné à être mis dans le *slot* " "``tp_getattro`` d'un objet type. Recherche un descripteur dans le " -"dictionnaire de classes du MRO de l'objet ainsi qu'un attribut dans le :attr:" -"`~object.__dict__` de l'objet (si présent). Comme défini dans :ref:" -"`descriptors`, les descripteurs de données sont prioritaires sur les " -"attributs d'instance, contrairement aux autres descripteurs. Sinon, une :exc:" -"`AttributeError` est levée." +"dictionnaire de classes du MRO de l'objet ainsi qu'un attribut dans " +"le :attr:`~object.__dict__` de l'objet (si présent). Comme défini " +"dans :ref:`descriptors`, les descripteurs de données sont prioritaires sur " +"les attributs d'instance, contrairement aux autres descripteurs. Sinon, " +"une :exc:`AttributeError` est levée." -#: c-api/object.rst:190 +#: c-api/object.rst:220 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " @@ -322,10 +369,10 @@ msgid "" msgstr "" "Définit la valeur de l'attribut nommé *attr_name*, pour l'objet *o*, à la " "valeur *v*. Lève une exception et renvoie ``-1`` en cas d'échec ; renvoie " -"``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." -"attr_name = v``." +"``0`` en cas de succès. Ceci est équivalent à l'instruction Python " +"``o.attr_name = v``." -#: c-api/object.rst:195 +#: c-api/object.rst:225 #, fuzzy msgid "" "If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " @@ -335,14 +382,25 @@ msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète,nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:202 +#: c-api/object.rst:246 +msgid "" +"The function must not be called with a ``NULL`` *v* and an exception set. " +"This case can arise from forgetting ``NULL`` checks and would delete the " +"attribute." +msgstr "" + +#: c-api/object.rst:258 +msgid "Must not be called with NULL value if an exception is set." +msgstr "" + +#: c-api/object.rst:239 msgid "" "This is the same as :c:func:`PyObject_SetAttr`, but *attr_name* is specified " -"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:206 +#: c-api/object.rst:243 #, fuzzy msgid "" "If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " @@ -351,17 +409,17 @@ msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète, nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:209 +#: c-api/object.rst:250 msgid "" "The number of different attribute names passed to this function should be " "kept small, usually by using a statically allocated string as *attr_name*. " -"For attribute names that aren't known at compile time, prefer calling :c:" -"func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` directly. For " -"more details, see :c:func:`PyUnicode_InternFromString`, which may be used " -"internally to create a key object." +"For attribute names that aren't known at compile time, prefer " +"calling :c:func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` " +"directly. For more details, see :c:func:`PyUnicode_InternFromString`, which " +"may be used internally to create a key object." msgstr "" -#: c-api/object.rst:219 +#: c-api/object.rst:264 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -377,37 +435,38 @@ msgstr "" "descripteur de données dans le dictionnaire de classes dans le MRO de " "l'objet et, si ce descripteur est trouvé, c'est lui qui est utilisé de " "préférence pour la suppression et la définition de l'attribut dans le " -"dictionnaire d'instance. Sinon, l'attribut est défini ou supprimé dans le :" -"attr:`~object.__dict__` de l'objet (si présent). En cas de succès, ``0`` est " -"renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est renvoyé." +"dictionnaire d'instance. Sinon, l'attribut est défini ou supprimé dans " +"le :attr:`~object.__dict__` de l'objet (si présent). En cas de succès, " +"``0`` est renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est " +"renvoyé." -#: c-api/object.rst:231 +#: c-api/object.rst:276 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." msgstr "" "Supprime l'attribut nommé *attr_name*, pour l'objet *o*. Renvoie ``-1`` en " -"cas d'échec. Ceci est l'équivalent de l'expression Python ``del o." -"attr_name``." +"cas d'échec. Ceci est l'équivalent de l'expression Python ``del " +"o.attr_name``." -#: c-api/object.rst:237 +#: c-api/object.rst:282 msgid "" "This is the same as :c:func:`PyObject_DelAttr`, but *attr_name* is specified " -"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/object.rst:241 +#: c-api/object.rst:286 msgid "" "The number of different attribute names passed to this function should be " "kept small, usually by using a statically allocated string as *attr_name*. " -"For attribute names that aren't known at compile time, prefer calling :c:" -"func:`PyUnicode_FromString` and :c:func:`PyObject_DelAttr` directly. For " -"more details, see :c:func:`PyUnicode_InternFromString`, which may be used " -"internally to create a key object for lookup." +"For attribute names that aren't known at compile time, prefer " +"calling :c:func:`PyUnicode_FromString` and :c:func:`PyObject_DelAttr` " +"directly. For more details, see :c:func:`PyUnicode_InternFromString`, which " +"may be used internally to create a key object for lookup." msgstr "" -#: c-api/object.rst:252 +#: c-api/object.rst:297 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." @@ -415,7 +474,7 @@ msgstr "" "Une implémentation générique de l'accesseur d'un descripteur d'un " "``__dict__``. Crée le dictionnaire si nécessaire." -#: c-api/object.rst:255 +#: c-api/object.rst:300 msgid "" "This function may also be called to get the :py:attr:`~object.__dict__` of " "the object *o*. Pass ``NULL`` for *context* when calling it. Since this " @@ -424,11 +483,11 @@ msgid "" "the object." msgstr "" -#: c-api/object.rst:261 +#: c-api/object.rst:306 msgid "On failure, returns ``NULL`` with an exception set." msgstr "" -#: c-api/object.rst:268 +#: c-api/object.rst:313 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." @@ -436,46 +495,46 @@ msgstr "" "Une implémentation générique du mutateur d'un descripteur de ``__dict__``. " "Cette implémentation n'autorise pas la suppression du dictionnaire." -#: c-api/object.rst:276 +#: c-api/object.rst:321 msgid "" "Return a pointer to :py:attr:`~object.__dict__` of the object *obj*. If " "there is no ``__dict__``, return ``NULL`` without setting an exception." msgstr "" -#: c-api/object.rst:279 +#: c-api/object.rst:324 msgid "" "This function may need to allocate memory for the dictionary, so it may be " "more efficient to call :c:func:`PyObject_GetAttr` when accessing an " "attribute on the object." msgstr "" -#: c-api/object.rst:286 +#: c-api/object.rst:331 #, fuzzy msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " -"which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :" -"c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to " -"``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. This is the " -"equivalent of the Python expression ``o1 op o2``, where ``op`` is the " -"operator corresponding to *opid*. Returns the value of the comparison on " -"success, or ``NULL`` on failure." +"which must be one " +"of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_GT`, " +"or :c:macro:`Py_GE`, corresponding to ``<``, ``<=``, ``==``, ``!=``, ``>``, " +"or ``>=`` respectively. This is the equivalent of the Python expression ``o1 " +"op o2``, where ``op`` is the operator corresponding to *opid*. Returns the " +"value of the comparison on success, or ``NULL`` on failure." msgstr "" "Compare les valeurs de *o1* et *o2* en utilisant l'opération spécifiée par " -"*opid*, qui doit être :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" -"`Py_NE`, :const:`Py_GT`, ou :const:`Py_GE`, correspondant à ``<``, ``<=``, " -"``==``, ``!=``, ``>``, ou ``>=`` respectivement. Ceci est l'équivalent de " -"l'expression Python ``o1 op o2``, où ``op`` est l'opérateur correspondant à " -"*opid*. Renvoie la valeur de la comparaison en cas de succès, ou *NULL* en " -"cas d'échec." +"*opid*, qui doit " +"être :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:`Py_NE`, :const:`Py_GT`, " +"ou :const:`Py_GE`, correspondant à ``<``, ``<=``, ``==``, ``!=``, ``>``, ou " +"``>=`` respectivement. Ceci est l'équivalent de l'expression Python ``o1 op " +"o2``, où ``op`` est l'opérateur correspondant à *opid*. Renvoie la valeur de " +"la comparaison en cas de succès, ou *NULL* en cas d'échec." -#: c-api/object.rst:296 +#: c-api/object.rst:341 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if " "the result is false, ``1`` otherwise." msgstr "" -#: c-api/object.rst:301 +#: c-api/object.rst:346 #, fuzzy msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " @@ -484,21 +543,21 @@ msgstr "" "Si *o1* et *o2* sont le même objet, :c:func:`PyObject_RichCompareBool` " "renvoie toujours ``1`` pour :const:`Py_EQ` et ``0`` pour :const:`Py_NE`." -#: c-api/object.rst:306 +#: c-api/object.rst:351 #, fuzzy msgid "" "Format *obj* using *format_spec*. This is equivalent to the Python " "expression ``format(obj, format_spec)``." msgstr "Ceci est l'équivalent de l'expression Python : ``callable(*args)``." -#: c-api/object.rst:309 +#: c-api/object.rst:354 msgid "" "*format_spec* may be ``NULL``. In this case the call is equivalent to " "``format(obj)``. Returns the formatted string on success, ``NULL`` on " "failure." msgstr "" -#: c-api/object.rst:317 +#: c-api/object.rst:362 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -511,7 +570,11 @@ msgstr "" "d'échec. Ceci est l'équivalent de l'expression Python ``repr(o)``. Appelé " "par la fonction native :func:`repr`." -#: c-api/object.rst:345 +#: c-api/object.rst:382 c-api/object.rst:394 +msgid "If argument is ``NULL``, return the string ``''``." +msgstr "" + +#: c-api/object.rst:396 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -519,13 +582,13 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/object.rst:329 +#: c-api/object.rst:376 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " -"but escape the non-ASCII characters in the string returned by :c:func:" -"`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a " -"string similar to that returned by :c:func:`PyObject_Repr` in Python 2. " -"Called by the :func:`ascii` built-in function." +"but escape the non-ASCII characters in the string returned " +"by :c:func:`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This " +"generates a string similar to that returned by :c:func:`PyObject_Repr` in " +"Python 2. Called by the :func:`ascii` built-in function." msgstr "" "Comme :c:Func:`PyObject_Repr`, calcule une représentation en chaîne de " "caractères de l'objet *o*, mais échappe les caractères non ASCII dans la " @@ -534,7 +597,7 @@ msgstr "" "renvoyée par :c:func:`PyObject_Repr` en Python 2. Appelée par la fonction " "native :func:`ascii`." -#: c-api/object.rst:340 +#: c-api/object.rst:389 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -545,10 +608,10 @@ msgstr "" "Calcule une représentation en chaîne de caractères de l'objet *o*. Renvoie " "la représentation en chaîne de caractères en cas de succès, *NULL* en cas " "d'échec. Ceci est l'équivalent de l'expression Python ``str(o)``. Appelée " -"par la fonction native :func:`str`, et, par conséquent, par la fonction :" -"func:`print`." +"par la fonction native :func:`str`, et, par conséquent, par la " +"fonction :func:`print`." -#: c-api/object.rst:354 +#: c-api/object.rst:405 #, fuzzy msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " @@ -563,7 +626,12 @@ msgstr "" "entier. Contrairement à ``bytes(o)``, une exception *TypeError* est levée " "lorsque *o* est un entier au lieu d'un objet octet initialisé avec des zéros." -#: c-api/object.rst:363 +#: c-api/object.rst:411 +msgid "" +"If argument is ``NULL``, return the :class:`bytes` object ``b''``." +msgstr "" + +#: c-api/object.rst:416 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." @@ -571,7 +639,7 @@ msgstr "" "Renvoie ``1`` si la classe *derived* est identique à ou dérivée de la classe " "*cls*, renvoie ``0`` sinon. En cas d'erreur, renvoie ``-1``." -#: c-api/object.rst:385 +#: c-api/object.rst:438 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " @@ -581,32 +649,32 @@ msgstr "" "*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " "``1``, sinon ce sera ``0``." -#: c-api/object.rst:370 +#: c-api/object.rst:423 #, fuzzy msgid "" "If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " -"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i." -"e. contained in :attr:`cls.__mro__ `." +"*derived* is a subclass of *cls* if it is a direct or indirect subclass, " +"i.e. contained in :attr:`cls.__mro__ `." msgstr "" "Si *cls* a une méthode :meth:`~class.__subclasscheck__`, elle est appelée " "pour déterminer le statut de la sous-classe comme décrit dans :pep:`3119`. " "Sinon, *derived* est une sous-classe de *cls* si c'est une sous-classe " "directe ou indirecte, c'est-à-dire contenue dans ``cls.__mro__``." -#: c-api/object.rst:375 +#: c-api/object.rst:428 #, fuzzy msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " "a :attr:`~type.__bases__` attribute (which must be a tuple of base classes)." msgstr "" -"Normalement seulement les classes objets, c'est-à-dire les instances de :" -"class:`type` ou d'une classe dérivée, sont considérées classes. Cependant, " -"les objets peuvent surcharger cela en ayant un attribut :attr:`__bases__` " -"(qui doit être un *n*-uplet de classes de bases)." +"Normalement seulement les classes objets, c'est-à-dire les instances " +"de :class:`type` ou d'une classe dérivée, sont considérées classes. " +"Cependant, les objets peuvent surcharger cela en ayant un " +"attribut :attr:`__bases__` (qui doit être un *n*-uplet de classes de bases)." -#: c-api/object.rst:382 +#: c-api/object.rst:435 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." @@ -615,7 +683,7 @@ msgstr "" "classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " "initialise une exception." -#: c-api/object.rst:389 +#: c-api/object.rst:442 #, fuzzy msgid "" "If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to " @@ -627,16 +695,16 @@ msgstr "" "Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " "*cls*." -#: c-api/object.rst:393 +#: c-api/object.rst:446 #, fuzzy msgid "" -"An instance *inst* can override what is considered its class by having a :" -"attr:`~object.__class__` attribute." +"An instance *inst* can override what is considered its class by having " +"a :attr:`~object.__class__` attribute." msgstr "" "Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " "ayant un attribut :attr:`__class__`." -#: c-api/object.rst:396 +#: c-api/object.rst:449 #, fuzzy msgid "" "An object *cls* can override if it is considered a class, and what its base " @@ -647,19 +715,19 @@ msgstr "" "que ses classes de bases sont, en ayant un attribut :attr:`__bases__` (qui " "doit être un *n*-uplet des classes de base)." -#: c-api/object.rst:405 +#: c-api/object.rst:458 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" -#: c-api/object.rst:408 +#: c-api/object.rst:461 msgid "" "The return type is now Py_hash_t. This is a signed integer the same size " "as :c:type:`Py_ssize_t`." msgstr "" -#: c-api/object.rst:415 +#: c-api/object.rst:468 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` " "and return ``-1``. This function receives special treatment when stored in a " @@ -667,21 +735,21 @@ msgid "" "that it is not hashable." msgstr "" -#: c-api/object.rst:423 +#: c-api/object.rst:476 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:430 +#: c-api/object.rst:483 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:439 +#: c-api/object.rst:492 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " @@ -692,13 +760,13 @@ msgid "" "when a new :term:`strong reference` is needed." msgstr "" -#: c-api/object.rst:451 +#: c-api/object.rst:504 msgid "" "Return non-zero if the object *o* is of type *type* or a subtype of *type*, " "and ``0`` otherwise. Both parameters must be non-``NULL``." msgstr "" -#: c-api/object.rst:460 +#: c-api/object.rst:513 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -706,7 +774,7 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:467 +#: c-api/object.rst:520 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " @@ -715,7 +783,7 @@ msgid "" "defaultvalue)``." msgstr "" -#: c-api/object.rst:477 +#: c-api/object.rst:530 #, fuzzy msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " @@ -725,7 +793,7 @@ msgstr "" "l'attribut en cas de succès, ou *NULL* en cas d'échec. Ceci est équivalent à " "l'expression Python ``o.attr_name``." -#: c-api/object.rst:483 +#: c-api/object.rst:536 #, fuzzy msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " @@ -734,10 +802,10 @@ msgid "" msgstr "" "Définit la valeur de l'attribut nommé *attr_name*, pour l'objet *o*, à la " "valeur *v*. Lève une exception et renvoie ``-1`` en cas d'échec ; renvoie " -"``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." -"attr_name = v``." +"``0`` en cas de succès. Ceci est équivalent à l'instruction Python " +"``o.attr_name = v``." -#: c-api/object.rst:491 +#: c-api/object.rst:544 #, fuzzy msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " @@ -747,17 +815,24 @@ msgstr "" "Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " "``del o[key]``." -#: c-api/object.rst:497 +#: c-api/object.rst:550 +msgid "" +"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +#: c-api/object.rst:557 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " "``NULL`` if there was an error. If the argument is ``NULL``, this is like " "the Python ``dir()``, returning the names of the current locals; in this " -"case, if no execution frame is active then ``NULL`` is returned but :c:func:" -"`PyErr_Occurred` will return false." +"case, if no execution frame is active then ``NULL`` is returned " +"but :c:func:`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:506 +#: c-api/object.rst:566 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " @@ -765,82 +840,267 @@ msgid "" "object cannot be iterated." msgstr "" -#: c-api/object.rst:514 +#: c-api/object.rst:574 msgid "" -"This is the equivalent to the Python expression ``aiter(o)``. Takes an :" -"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " -"This is typically a new iterator but if the argument is an :class:" -"`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and returns " -"``NULL`` if the object cannot be iterated." +"This is equivalent to the Python ``__iter__(self): return self`` method. It " +"is intended for :term:`iterator` types, to be used in " +"the :c:member:`PyTypeObject.tp_iter` slot." msgstr "" -#: c-api/object.rst:524 +#: c-api/object.rst:580 +msgid "" +"This is the equivalent to the Python expression ``aiter(o)``. Takes " +"an :class:`AsyncIterable` object and returns an :class:`AsyncIterator` for " +"it. This is typically a new iterator but if the argument is " +"an :class:`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and " +"returns ``NULL`` if the object cannot be iterated." +msgstr "" + +#: c-api/object.rst:590 msgid "Get a pointer to subclass-specific data reserved for *cls*." msgstr "" -#: c-api/object.rst:526 +#: c-api/object.rst:592 msgid "" "The object *o* must be an instance of *cls*, and *cls* must have been " "created using negative :c:member:`PyType_Spec.basicsize`. Python does not " "check this." msgstr "" -#: c-api/object.rst:530 +#: c-api/object.rst:596 #, fuzzy msgid "On error, set an exception and return ``NULL``." msgstr "" "Renvoie le résultat de l'appel en cas de succès, ou lève une exception et " "renvoie *NULL* en cas d'échec." -#: c-api/object.rst:536 +#: c-api/object.rst:602 msgid "" "Return the size of the instance memory space reserved for *cls*, i.e. the " "size of the memory :c:func:`PyObject_GetTypeData` returns." msgstr "" -#: c-api/object.rst:539 +#: c-api/object.rst:605 msgid "" "This may be larger than requested using :c:member:`-PyType_Spec.basicsize " -"`; it is safe to use this larger size (e.g. with :c:" -"func:`!memset`)." +"`; it is safe to use this larger size (e.g. " +"with :c:func:`!memset`)." msgstr "" -#: c-api/object.rst:542 +#: c-api/object.rst:608 msgid "" -"The type *cls* **must** have been created using negative :c:member:" -"`PyType_Spec.basicsize`. Python does not check this." +"The type *cls* **must** have been created using " +"negative :c:member:`PyType_Spec.basicsize`. Python does not check this." msgstr "" -#: c-api/object.rst:546 +#: c-api/object.rst:612 msgid "On error, set an exception and return a negative value." msgstr "" -#: c-api/object.rst:552 +#: c-api/object.rst:618 msgid "" -"Get a pointer to per-item data for a class with :c:macro:" -"`Py_TPFLAGS_ITEMS_AT_END`." +"Get a pointer to per-item data for a class " +"with :c:macro:`Py_TPFLAGS_ITEMS_AT_END`." msgstr "" -#: c-api/object.rst:555 +#: c-api/object.rst:621 msgid "" "On error, set an exception and return ``NULL``. :py:exc:`TypeError` is " "raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set." msgstr "" -#: c-api/object.rst:563 +#: c-api/object.rst:629 msgid "Visit the managed dictionary of *obj*." msgstr "" -#: c-api/object.rst:574 +#: c-api/object.rst:631 msgid "" "This function must only be called in a traverse function of the type which " "has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." msgstr "" -#: c-api/object.rst:572 +#: c-api/object.rst:638 msgid "Clear the managed dictionary of *obj*." msgstr "" +#: c-api/object.rst:640 +msgid "" +"This function must only be called in a clear function of the type which has " +"the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." +msgstr "" + +#: c-api/object.rst:647 +msgid "" +"Enable `deferred reference counting `_ on *obj*, if supported by the runtime. In " +"the :term:`free-threaded ` build, this allows the " +"interpreter to avoid reference count adjustments to *obj*, which may improve " +"multi-threaded performance. The tradeoff is that *obj* will only be " +"deallocated by the tracing garbage collector, and not when the interpreter " +"no longer has any references to it." +msgstr "" + +#: c-api/object.rst:654 +msgid "" +"This function returns ``1`` if deferred reference counting is enabled on " +"*obj*, and ``0`` if deferred reference counting is not supported or if the " +"hint was ignored by the interpreter, such as when deferred reference " +"counting is already enabled on *obj*. This function is thread-safe, and " +"cannot fail." +msgstr "" + +#: c-api/object.rst:659 +msgid "" +"This function does nothing on builds with the :term:`GIL` enabled, which do " +"not support deferred reference counting. This also does nothing if *obj* is " +"not an object tracked by the garbage collector (see :func:`gc.is_tracked` " +"and :c:func:`PyObject_GC_IsTracked`)." +msgstr "" + +#: c-api/object.rst:664 +msgid "" +"This function is intended to be used soon after *obj* is created, by the " +"code that creates it, such as in the " +"object's :c:member:`~PyTypeObject.tp_new` slot." +msgstr "" + +#: c-api/object.rst:672 +msgid "" +"Check if *obj* is a unique temporary object. Returns ``1`` if *obj* is known " +"to be a unique temporary object, and ``0`` otherwise. This function cannot " +"fail, but the check is conservative, and may return ``0`` in some cases even " +"if *obj* is a unique temporary object." +msgstr "" + +#: c-api/object.rst:678 +msgid "" +"If an object is a unique temporary, it is guaranteed that the current code " +"has the only reference to the object. For arguments to C functions, this " +"should be used instead of checking if the reference count is ``1``. Starting " +"with Python 3.14, the interpreter internally avoids some reference count " +"modifications when loading objects onto the operands stack " +"by :term:`borrowing ` references when possible, which " +"means that a reference count of ``1`` by itself does not guarantee that a " +"function argument uniquely referenced." +msgstr "" + +#: c-api/object.rst:687 +msgid "" +"In the example below, ``my_func`` is called with a unique temporary object " +"as its argument::" +msgstr "" + +#: c-api/object.rst:692 +msgid "" +"In the example below, ``my_func`` is **not** called with a unique temporary " +"object as its argument, even if its refcount is ``1``::" +msgstr "" + +#: c-api/object.rst:698 +msgid "See also the function :c:func:`Py_REFCNT`." +msgstr "" + +#: c-api/object.rst:704 +msgid "" +"This function returns non-zero if *obj* is :term:`immortal`, and zero " +"otherwise. This function cannot fail." +msgstr "" + +#: c-api/object.rst:709 +msgid "" +"Objects that are immortal in one CPython version are not guaranteed to be " +"immortal in another." +msgstr "" + +#: c-api/object.rst:716 +msgid "" +"Increments the reference count of *obj* if it is not zero. Returns ``1`` if " +"the object's reference count was successfully incremented. Otherwise, this " +"function returns ``0``." +msgstr "" + +#: c-api/object.rst:720 +msgid "" +":c:func:`PyUnstable_EnableTryIncRef` must have been called earlier on *obj* " +"or this function may spuriously return ``0`` in the :term:`free-threaded " +"build`." +msgstr "" + +#: c-api/object.rst:724 +msgid "" +"This function is logically equivalent to the following C code, except that " +"it behaves atomically in the :term:`free-threaded build`::" +msgstr "" + +#: c-api/object.rst:733 +msgid "" +"This is intended as a building block for managing weak references without " +"the overhead of a Python :ref:`weak reference object `." +msgstr "" + +#: c-api/object.rst:736 +msgid "" +"Typically, correct use of this function requires support from *obj*'s " +"deallocator (:c:member:`~PyTypeObject.tp_dealloc`). For example, the " +"following sketch could be adapted to implement a \"weakmap\" that works like " +"a :py:class:`~weakref.WeakValueDictionary` for a specific type:" +msgstr "" + +#: c-api/object.rst:790 +msgid "" +"Enables subsequent uses of :c:func:`PyUnstable_TryIncRef` on *obj*. The " +"caller must hold a :term:`strong reference` to *obj* when calling this." +msgstr "" + +#: c-api/object.rst:797 +msgid "Determine if *op* only has one reference." +msgstr "" + +#: c-api/object.rst:799 +msgid "" +"On GIL-enabled builds, this function is equivalent to :c:expr:`Py_REFCNT(op) " +"== 1`." +msgstr "" + +#: c-api/object.rst:802 +msgid "" +"On a :term:`free-threaded build`, this checks if *op*'s :term:`reference " +"count` is equal to one and additionally checks if *op* is only used by this " +"thread. :c:expr:`Py_REFCNT(op) == 1` is **not** thread-safe on free-threaded " +"builds; prefer this function." +msgstr "" + +#: c-api/object.rst:807 +msgid "" +"The caller must hold an :term:`attached thread state`, despite the fact that " +"this function doesn't call into the Python interpreter. This function cannot " +"fail." +msgstr "" + +#: c-api/object.rst:815 +msgid "" +"Marks the object *op* :term:`immortal`. The argument should be uniquely " +"referenced by the calling thread. This is intended to be used for reducing " +"reference counting contention in the :term:`free-threaded build` for objects " +"which are shared across threads." +msgstr "" + +#: c-api/object.rst:819 +msgid "" +"This is a one-way process: objects can only be made immortal; they cannot be " +"made mortal once again. Immortal objects do not participate in reference " +"counting and will never be garbage collected. If the object is GC-tracked, " +"it is untracked." +msgstr "" + +#: c-api/object.rst:823 +msgid "" +"This function is intended to be used soon after *op* is created, by the code " +"that creates it, such as in the object's :c:member:`~PyTypeObject.tp_new` " +"slot. Returns 1 if the object was made immortal and returns 0 if it was not. " +"This function cannot fail." +msgstr "" + #~ msgid "built-in function" #~ msgstr "fonction native" @@ -872,20 +1132,21 @@ msgstr "" #, fuzzy #~ msgid "" #~ "Compare the values of *o1* and *o2* using the operation specified by " -#~ "*opid*, which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:" -#~ "`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, " -#~ "corresponding to ``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` " -#~ "respectively. Returns ``-1`` on error, ``0`` if the result is false, " -#~ "``1`` otherwise. This is the equivalent of the Python expression ``o1 op " -#~ "o2``, where ``op`` is the operator corresponding to *opid*." +#~ "*opid*, which must be one " +#~ "of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_GT`, " +#~ "or :c:macro:`Py_GE`, corresponding to ``<``, ``<=``, ``==``, ``!=``, " +#~ "``>``, or ``>=`` respectively. Returns ``-1`` on error, ``0`` if the " +#~ "result is false, ``1`` otherwise. This is the equivalent of the Python " +#~ "expression ``o1 op o2``, where ``op`` is the operator corresponding to " +#~ "*opid*." #~ msgstr "" #~ "Compare les valeurs de *o1* et *o2* en utilisant l'opération spécifiée " -#~ "par *opid*, qui doit être :const:`Py_LT`, :const:`Py_LE`, :const:" -#~ "`Py_EQ`, :const:`Py_NE`, :const:`Py_GT`, ou :const:`Py_GE`, correspondant " -#~ "à ``<``, ``<=``, ``==``, ``!=``, ``>``, ou ``>=`` respectivement. Renvoie " -#~ "``-1`` en cas d'erreur, ``0`` si le résultat est faux, et ``1`` sinon. " -#~ "Ceci est l'équivalent de l'expression Python ``o1 op o2``, où ``op`` est " -#~ "l'opérateur correspondant à *opid*." +#~ "par *opid*, qui doit " +#~ "être :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:`Py_NE`, :const:`Py_GT`, " +#~ "ou :const:`Py_GE`, correspondant à ``<``, ``<=``, ``==``, ``!=``, ``>``, " +#~ "ou ``>=`` respectivement. Renvoie ``-1`` en cas d'erreur, ``0`` si le " +#~ "résultat est faux, et ``1`` sinon. Ceci est l'équivalent de l'expression " +#~ "Python ``o1 op o2``, où ``op`` est l'opérateur correspondant à *opid*." #~ msgid "" #~ "Determine if the object *o* is callable. Return ``1`` if the object is " @@ -941,9 +1202,9 @@ msgstr "" #, fuzzy #~ msgid "" -#~ "Call a callable Python object *callable*, with a variable number of :c:" -#~ "type:`PyObject\\*` arguments. The arguments are provided as a variable " -#~ "number of parameters followed by ``NULL``." +#~ "Call a callable Python object *callable*, with a variable number " +#~ "of :c:type:`PyObject\\*` arguments. The arguments are provided as a " +#~ "variable number of parameters followed by ``NULL``." #~ msgstr "" #~ "Appelle un objet Python appelable, avec un nombre variable d'arguments C. " #~ "Les arguments C sont décrits par une chaîne de caractères de format de " diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 25f455492..9ae79d12c 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -1,13 +1,11 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-10-29 22:25+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -22,62 +20,132 @@ msgstr "" #: c-api/perfmaps.rst:8 msgid "" -"On supported platforms (as of this writing, only Linux), the runtime can " -"take advantage of *perf map files* to make Python functions visible to an " -"external profiling tool (such as `perf `_). A running process may create a file in the ``/tmp`` " -"directory, which contains entries that can map a section of executable code " -"to a name. This interface is described in the `documentation of the Linux " -"Perf tool `_." +"On supported platforms (Linux and macOS), the runtime can take advantage of " +"*perf map files* to make Python functions visible to an external profiling " +"tool (such as `perf `_ or " +"`samply `_). A running process may " +"create a file in the ``/tmp`` directory, which contains entries that can map " +"a section of executable code to a name. This interface is described in the " +"`documentation of the Linux Perf tool `_." msgstr "" -#: c-api/perfmaps.rst:16 +#: c-api/perfmaps.rst:17 msgid "" "In Python, these helper APIs can be used by libraries and features that rely " "on generating machine code on the fly." msgstr "" -#: c-api/perfmaps.rst:19 +#: c-api/perfmaps.rst:20 msgid "" -"Note that holding the Global Interpreter Lock (GIL) is not required for " -"these APIs." +"Note that holding an :term:`attached thread state` is not required for these " +"APIs." msgstr "" -#: c-api/perfmaps.rst:23 +#: c-api/perfmaps.rst:24 msgid "" "Open the ``/tmp/perf-$pid.map`` file, unless it's already opened, and create " "a lock to ensure thread-safe writes to the file (provided the writes are " "done through :c:func:`PyUnstable_WritePerfMapEntry`). Normally, there's no " -"need to call this explicitly; just use :c:func:" -"`PyUnstable_WritePerfMapEntry` and it will initialize the state on first " -"call." +"need to call this explicitly; just " +"use :c:func:`PyUnstable_WritePerfMapEntry` and it will initialize the state " +"on first call." msgstr "" -#: c-api/perfmaps.rst:29 +#: c-api/perfmaps.rst:30 msgid "" "Returns ``0`` on success, ``-1`` on failure to create/open the perf map " "file, or ``-2`` on failure to create a lock. Check ``errno`` for more " "information about the cause of a failure." msgstr "" -#: c-api/perfmaps.rst:35 +#: c-api/perfmaps.rst:36 msgid "" "Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is " "thread safe. Here is what an example entry looks like::" msgstr "" -#: c-api/perfmaps.rst:41 +#: c-api/perfmaps.rst:42 msgid "" "Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, " "if the perf map file is not already opened. Returns ``0`` on success, or the " "same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure." msgstr "" -#: c-api/perfmaps.rst:47 +#: c-api/perfmaps.rst:48 msgid "" "Close the perf map file opened by :c:func:`PyUnstable_PerfMapState_Init`. " "This is called by the runtime itself during interpreter shut-down. In " "general, there shouldn't be a reason to explicitly call this, except to " "handle specific scenarios such as forking." msgstr "" + +#: c-api/perfmaps.rst:55 +msgid "" +"Open the ``/tmp/perf-$pid.map`` file and append the content of " +"*parent_filename* to it." +msgstr "" + +#: c-api/perfmaps.rst:58 +msgid "" +"This function is available on all platforms but only generates output on " +"platforms that support perf maps (currently only Linux). On other platforms, " +"it does nothing." +msgstr "" + +#: c-api/perfmaps.rst:65 +msgid "Compile the given code object using the current perf trampoline." +msgstr "" + +#: c-api/perfmaps.rst:67 +msgid "" +"The \"current\" trampoline is the one set by the runtime or the most " +"recent :c:func:`PyUnstable_PerfTrampoline_SetPersistAfterFork` call." +msgstr "" + +#: c-api/perfmaps.rst:70 +msgid "" +"If no trampoline is set, falls back to normal compilation (no perf map " +"entry)." +msgstr "" + +#: c-api/perfmaps.rst:0 +msgid "Parameters" +msgstr "" + +#: c-api/perfmaps.rst:72 +msgid "The code object to compile." +msgstr "" + +#: c-api/perfmaps.rst:0 +msgid "Returns" +msgstr "" + +#: c-api/perfmaps.rst:89 +msgid "0 on success, -1 on failure." +msgstr "" + +#: c-api/perfmaps.rst:79 +msgid "Set whether the perf trampoline should persist after a fork." +msgstr "" + +#: c-api/perfmaps.rst:81 +msgid "" +"If ``enable`` is true (non-zero): perf map file remains open/valid post-" +"fork. Child process inherits all existing perf map entries." +msgstr "" + +#: c-api/perfmaps.rst:83 +msgid "" +"If ``enable`` is false (zero): perf map closes post-fork. Child process gets " +"empty perf map." +msgstr "" + +#: c-api/perfmaps.rst:86 +msgid "Default: false (clears on fork)." +msgstr "" + +#: c-api/perfmaps.rst:88 +msgid "1 to enable, 0 to disable." +msgstr "" diff --git a/c-api/picklebuffer.po b/c-api/picklebuffer.po new file mode 100644 index 000000000..f6f9efc71 --- /dev/null +++ b/c-api/picklebuffer.po @@ -0,0 +1,94 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/picklebuffer.rst:9 +msgid "Pickle buffer objects" +msgstr "" + +#: c-api/picklebuffer.rst:13 +msgid "" +"A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object " +"` for out-of-band data transfer with the :mod:`pickle` module." +msgstr "" + +#: c-api/picklebuffer.rst:19 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python pickle buffer " +"type. This is the same object as :class:`pickle.PickleBuffer` in the Python " +"layer." +msgstr "" + +#: c-api/picklebuffer.rst:25 +msgid "" +"Return true if *op* is a pickle buffer instance. This function always " +"succeeds." +msgstr "" + +#: c-api/picklebuffer.rst:31 +msgid "Create a pickle buffer from the object *obj*." +msgstr "" + +#: c-api/picklebuffer.rst:33 +msgid "" +"This function will fail if *obj* doesn't support the :ref:`buffer protocol " +"`." +msgstr "" + +#: c-api/picklebuffer.rst:35 +msgid "" +"On success, return a new pickle buffer instance. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/picklebuffer.rst:38 +msgid "Analogous to calling :class:`pickle.PickleBuffer` with *obj* in Python." +msgstr "" + +#: c-api/picklebuffer.rst:43 +msgid "" +"Get a pointer to the underlying :c:type:`Py_buffer` that the pickle buffer " +"wraps." +msgstr "" + +#: c-api/picklebuffer.rst:45 +msgid "" +"The returned pointer is valid as long as *picklebuf* is alive and has not " +"been released. The caller must not modify or free the " +"returned :c:type:`Py_buffer`. If the pickle buffer has been released, " +"raise :exc:`ValueError`." +msgstr "" + +#: c-api/picklebuffer.rst:49 +msgid "" +"On success, return a pointer to the buffer view. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/picklebuffer.rst:55 +msgid "Release the underlying buffer held by the pickle buffer." +msgstr "" + +#: c-api/picklebuffer.rst:57 +msgid "" +"Return ``0`` on success. On failure, set an exception and return ``-1``." +msgstr "" + +#: c-api/picklebuffer.rst:59 +msgid "Analogous to calling :meth:`pickle.PickleBuffer.release` in Python." +msgstr "" diff --git a/c-api/profiling.po b/c-api/profiling.po new file mode 100644 index 000000000..f691e037f --- /dev/null +++ b/c-api/profiling.po @@ -0,0 +1,304 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/profiling.rst:6 +msgid "Profiling and tracing" +msgstr "" + +#: c-api/profiling.rst:8 +msgid "" +"The Python interpreter provides some low-level support for attaching " +"profiling and execution tracing facilities. These are used for profiling, " +"debugging, and coverage analysis tools." +msgstr "" + +#: c-api/profiling.rst:12 +msgid "" +"This C interface allows the profiling or tracing code to avoid the overhead " +"of calling through Python-level callable objects, making a direct C function " +"call instead. The essential attributes of the facility have not changed; " +"the interface allows trace functions to be installed per-thread, and the " +"basic events reported to the trace function are the same as had been " +"reported to the Python-level trace functions in previous versions." +msgstr "" + +#: c-api/profiling.rst:22 +msgid "" +"The type of the trace function registered using :c:func:`PyEval_SetProfile` " +"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " +"the registration function as *obj*, *frame* is the frame object to which the " +"event pertains, *what* is one of the " +"constants :c:data:`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN`, " +"or :c:data:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" +msgstr "" + +#: c-api/profiling.rst:31 +msgid "Value of *what*" +msgstr "" + +#: c-api/profiling.rst:31 +msgid "Meaning of *arg*" +msgstr "" + +#: c-api/profiling.rst:33 +msgid ":c:data:`PyTrace_CALL`" +msgstr "" + +#: c-api/profiling.rst:38 c-api/profiling.rst:49 +msgid "Always :c:data:`Py_None`." +msgstr "" + +#: c-api/profiling.rst:35 +msgid ":c:data:`PyTrace_EXCEPTION`" +msgstr "" + +#: c-api/profiling.rst:35 +msgid "Exception information as returned by :func:`sys.exc_info`." +msgstr "" + +#: c-api/profiling.rst:38 +msgid ":c:data:`PyTrace_LINE`" +msgstr "" + +#: c-api/profiling.rst:40 +msgid ":c:data:`PyTrace_RETURN`" +msgstr "" + +#: c-api/profiling.rst:40 +msgid "" +"Value being returned to the caller, or ``NULL`` if caused by an exception." +msgstr "" + +#: c-api/profiling.rst:43 +msgid ":c:data:`PyTrace_C_CALL`" +msgstr "" + +#: c-api/profiling.rst:45 c-api/profiling.rst:47 +msgid "Function object being called." +msgstr "" + +#: c-api/profiling.rst:45 +msgid ":c:data:`PyTrace_C_EXCEPTION`" +msgstr "" + +#: c-api/profiling.rst:47 +msgid ":c:data:`PyTrace_C_RETURN`" +msgstr "" + +#: c-api/profiling.rst:49 +msgid ":c:data:`PyTrace_OPCODE`" +msgstr "" + +#: c-api/profiling.rst:54 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"a new call to a function or method is being reported, or a new entry into a " +"generator. Note that the creation of the iterator for a generator function " +"is not reported as there is no control transfer to the Python bytecode in " +"the corresponding frame." +msgstr "" + +#: c-api/profiling.rst:63 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"an exception has been raised. The callback function is called with this " +"value for *what* when after any bytecode is processed after which the " +"exception becomes set within the frame being executed. The effect of this " +"is that as exception propagation causes the Python stack to unwind, the " +"callback is called upon return to each frame as the exception propagates. " +"Only trace functions receive these events; they are not needed by the " +"profiler." +msgstr "" + +#: c-api/profiling.rst:74 +msgid "" +"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " +"function (but not a profiling function) when a line-number event is being " +"reported. It may be disabled for a frame by " +"setting :attr:`~frame.f_trace_lines` to *0* on that frame." +msgstr "" + +#: c-api/profiling.rst:82 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a call is about to return." +msgstr "" + +#: c-api/profiling.rst:88 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function is about to be called." +msgstr "" + +#: c-api/profiling.rst:94 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has raised an exception." +msgstr "" + +#: c-api/profiling.rst:100 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has returned." +msgstr "" + +#: c-api/profiling.rst:106 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " +"not profiling functions) when a new opcode is about to be executed. This " +"event is not emitted by default: it must be explicitly requested by " +"setting :attr:`~frame.f_trace_opcodes` to *1* on the frame." +msgstr "" + +#: c-api/profiling.rst:114 +msgid "" +"Set the profiler function to *func*. The *obj* parameter is passed to the " +"function as its first parameter, and may be any Python object, or ``NULL``. " +"If the profile function needs to maintain state, using a different value for " +"*obj* for each thread provides a convenient and thread-safe place to store " +"it. The profile function is called for all monitored events " +"except :c:data:`PyTrace_LINE` :c:data:`PyTrace_OPCODE` " +"and :c:data:`PyTrace_EXCEPTION`." +msgstr "" + +#: c-api/profiling.rst:121 +msgid "See also the :func:`sys.setprofile` function." +msgstr "" + +#: c-api/profiling.rst:131 c-api/profiling.rst:158 +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +#: c-api/profiling.rst:128 +msgid "" +"Like :c:func:`PyEval_SetProfile` but sets the profile function in all " +"running threads belonging to the current interpreter instead of the setting " +"it only on the current thread." +msgstr "" + +#: c-api/profiling.rst:133 +msgid "" +"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " +"while setting the profile functions in all threads." +msgstr "" + +#: c-api/profiling.rst:141 +msgid "" +"Set the tracing function to *func*. This is similar " +"to :c:func:`PyEval_SetProfile`, except the tracing function does receive " +"line-number events and per-opcode events, but does not receive any event " +"related to C function objects being called. Any trace function registered " +"using :c:func:`PyEval_SetTrace` will not " +"receive :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` " +"or :c:data:`PyTrace_C_RETURN` as a value for the *what* parameter." +msgstr "" + +#: c-api/profiling.rst:148 +msgid "See also the :func:`sys.settrace` function." +msgstr "" + +#: c-api/profiling.rst:155 +msgid "" +"Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running " +"threads belonging to the current interpreter instead of the setting it only " +"on the current thread." +msgstr "" + +#: c-api/profiling.rst:160 +msgid "" +"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " +"while setting the trace functions in all threads." +msgstr "" + +#: c-api/profiling.rst:167 +msgid "Reference tracing" +msgstr "" + +#: c-api/profiling.rst:174 +msgid "" +"The type of the trace function registered " +"using :c:func:`PyRefTracer_SetTracer`. The first parameter is a Python " +"object that has been just created (when **event** is set " +"to :c:data:`PyRefTracer_CREATE`) or about to be destroyed (when **event** is " +"set to :c:data:`PyRefTracer_DESTROY`). The **data** argument is the opaque " +"pointer that was provided when :c:func:`PyRefTracer_SetTracer` was called." +msgstr "" + +#: c-api/profiling.rst:180 +msgid "" +"If a new tracing function is registered replacing the current one, a call to " +"the trace function will be made with the object set to **NULL** and " +"**event** set to :c:data:`PyRefTracer_TRACKER_REMOVED`. This will happen " +"just before the new function is registered." +msgstr "" + +#: c-api/profiling.rst:190 +msgid "" +"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " +"a Python object has been created." +msgstr "" + +#: c-api/profiling.rst:196 +msgid "" +"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " +"a Python object has been destroyed." +msgstr "" + +#: c-api/profiling.rst:202 +msgid "" +"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " +"the current tracer is about to be replaced by a new one." +msgstr "" + +#: c-api/profiling.rst:210 +msgid "" +"Register a reference tracer function. The function will be called when a new " +"Python object has been created or when an object is going to be destroyed. " +"If **data** is provided it must be an opaque pointer that will be provided " +"when the tracer function is called. Return ``0`` on success. Set an " +"exception and return ``-1`` on error." +msgstr "" + +#: c-api/profiling.rst:216 +msgid "" +"Note that tracer functions **must not** create Python objects inside or " +"otherwise the call will be re-entrant. The tracer also **must not** clear " +"any existing exception or set an exception. A :term:`thread state` will be " +"active every time the tracer function is called." +msgstr "" + +#: c-api/profiling.rst:237 +msgid "" +"There must be an :term:`attached thread state` when calling this function." +msgstr "" + +#: c-api/profiling.rst:223 +msgid "" +"If another tracer function was already registered, the old function will be " +"called with **event** set to :c:data:`PyRefTracer_TRACKER_REMOVED` just " +"before the new function is registered." +msgstr "" + +#: c-api/profiling.rst:232 +msgid "" +"Get the registered reference tracer function and the value of the opaque " +"data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " +"called. If no tracer was registered this function will return NULL and will " +"set the **data** pointer to NULL." +msgstr "" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index b2004720b..68b3c8b6e 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-05 22:34+0100\n" "Last-Translator: Rémi Lapeyre \n" "Language-Team: FRENCH \n" @@ -36,10 +36,10 @@ msgstr "Incrémente le compteur de références de l'objet *o*." #: c-api/refcounting.rst:18 msgid "" "Note that the returned value may not actually reflect how many references to " -"the object are actually held. For example, some objects are :term:" -"`immortal` and have a very high refcount that does not reflect the actual " -"number of references. Consequently, do not rely on the returned value to be " -"accurate, other than a value of 0 or 1." +"the object are actually held. For example, some objects " +"are :term:`immortal` and have a very high refcount that does not reflect the " +"actual number of references. Consequently, do not rely on the returned " +"value to be accurate, other than a value of 0 or 1." msgstr "" #: c-api/refcounting.rst:24 @@ -47,55 +47,69 @@ msgid "" "Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count." msgstr "" -#: c-api/refcounting.rst:26 +#: c-api/refcounting.rst:28 +msgid "" +"On :term:`free-threaded builds ` of Python, returning 1 " +"isn't sufficient to determine if it's safe to treat *o* as having no access " +"by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced` for " +"that instead." +msgstr "" + +#: c-api/refcounting.rst:33 +msgid "" +"See also the " +"function :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary()`." +msgstr "" + +#: c-api/refcounting.rst:35 msgid ":c:func:`Py_REFCNT()` is changed to the inline static function." msgstr "" -#: c-api/refcounting.rst:29 +#: c-api/refcounting.rst:38 msgid "The parameter type is no longer :c:expr:`const PyObject*`." msgstr "" -#: c-api/refcounting.rst:35 +#: c-api/refcounting.rst:44 #, fuzzy msgid "Set the object *o* reference counter to *refcnt*." msgstr "Incrémente le compteur de références de l'objet *o*." -#: c-api/refcounting.rst:37 +#: c-api/refcounting.rst:46 msgid "" "On :ref:`Python build with Free Threading `, if " "*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`." msgstr "" -#: c-api/refcounting.rst:53 c-api/refcounting.rst:119 +#: c-api/refcounting.rst:62 c-api/refcounting.rst:128 msgid "This function has no effect on :term:`immortal` objects." msgstr "" -#: c-api/refcounting.rst:68 c-api/refcounting.rst:147 +#: c-api/refcounting.rst:77 c-api/refcounting.rst:156 msgid "Immortal objects are not modified." msgstr "" -#: c-api/refcounting.rst:50 +#: c-api/refcounting.rst:59 msgid "" "Indicate taking a new :term:`strong reference` to object *o*, indicating it " "is in use and should not be destroyed." msgstr "" -#: c-api/refcounting.rst:55 +#: c-api/refcounting.rst:64 msgid "" -"This function is usually used to convert a :term:`borrowed reference` to a :" -"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " +"This function is usually used to convert a :term:`borrowed reference` to " +"a :term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " "used to create a new :term:`strong reference`." msgstr "" "Cette fonction est souvent utilisée pour convertir une :term:`référence " -"empruntée` en une :term:`référence forte` *sur place*. La fonction :c:func:" -"`Py_NewRef` peut être utilisée pour créer une nouvelle :term:`référence " -"forte`." +"empruntée` en une :term:`référence forte` *sur place*. La " +"fonction :c:func:`Py_NewRef` peut être utilisée pour créer une " +"nouvelle :term:`référence forte`." -#: c-api/refcounting.rst:59 +#: c-api/refcounting.rst:68 msgid "When done using the object, release is by calling :c:func:`Py_DECREF`." msgstr "" -#: c-api/refcounting.rst:61 +#: c-api/refcounting.rst:70 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XINCREF`." @@ -103,24 +117,24 @@ msgstr "" "L'objet ne doit pas être ``NULL``, la fonction :c:func:`Py_XINCREF` doit " "être utilisée s'il est possible qu'il soit ``NULL``." -#: c-api/refcounting.rst:64 +#: c-api/refcounting.rst:73 msgid "" -"Do not expect this function to actually modify *o* in any way. For at least :" -"pep:`some objects <0683>`, this function has no effect." +"Do not expect this function to actually modify *o* in any way. For at " +"least :pep:`some objects <0683>`, this function has no effect." msgstr "" -#: c-api/refcounting.rst:74 +#: c-api/refcounting.rst:83 #, fuzzy msgid "" "Similar to :c:func:`Py_INCREF`, but the object *o* can be ``NULL``, in which " "case this has no effect." msgstr "Semblable à :c:func:`Py_NewRef` mais l'objet *o* peut être ``NULL``." -#: c-api/refcounting.rst:77 +#: c-api/refcounting.rst:86 msgid "See also :c:func:`Py_XNewRef`." msgstr "Voir aussi :c:func:`Py_XNewRef`." -#: c-api/refcounting.rst:82 +#: c-api/refcounting.rst:91 #, fuzzy msgid "" "Create a new :term:`strong reference` to an object: call :c:func:`Py_INCREF` " @@ -129,7 +143,7 @@ msgstr "" "Créer une nouvelle :term:`référence forte` d'un objet : incrémente le " "compteur de référence de l'objet *o* et renvoie l'objet *o*." -#: c-api/refcounting.rst:85 +#: c-api/refcounting.rst:94 #, fuzzy msgid "" "When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " @@ -138,7 +152,7 @@ msgstr "" ":c:func:`Py_DECREF` doit être appelée quand la :term:`référence forte` n'est " "plus utilisée pour décrémenter le compteur de références de l'objet." -#: c-api/refcounting.rst:88 +#: c-api/refcounting.rst:97 msgid "" "The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " "``NULL``." @@ -146,27 +160,27 @@ msgstr "" "L'objet *o* ne doit pas être ``NULL`` et la fonction :c:func:`Py_XNewRef` " "doit être utilisée si *o* peut être ``NULL``." -#: c-api/refcounting.rst:91 +#: c-api/refcounting.rst:100 msgid "For example::" msgstr "Par exemple ::" -#: c-api/refcounting.rst:96 +#: c-api/refcounting.rst:105 msgid "can be written as::" msgstr "peut s'écrire ::" -#: c-api/refcounting.rst:100 +#: c-api/refcounting.rst:109 msgid "See also :c:func:`Py_INCREF`." msgstr "Voir aussi :c:func:`Py_INCREF`." -#: c-api/refcounting.rst:107 +#: c-api/refcounting.rst:116 msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." msgstr "Semblable à :c:func:`Py_NewRef` mais l'objet *o* peut être ``NULL``." -#: c-api/refcounting.rst:109 +#: c-api/refcounting.rst:118 msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." msgstr "Cette fonction renvoie ``NULL`` si l'objet *o* est ``NULL``." -#: c-api/refcounting.rst:116 +#: c-api/refcounting.rst:125 #, fuzzy msgid "" "Release a :term:`strong reference` to object *o*, indicating the reference " @@ -175,7 +189,7 @@ msgstr "" "Créer une nouvelle :term:`référence forte` d'un objet : incrémente le " "compteur de référence de l'objet *o* et renvoie l'objet *o*." -#: c-api/refcounting.rst:121 +#: c-api/refcounting.rst:130 #, fuzzy msgid "" "Once the last :term:`strong reference` is released (i.e. the object's " @@ -185,7 +199,7 @@ msgstr "" "Si le compteur de références atteint zéro, la fonction de dés-allocation du " "type de l'objet (qui ne doit pas être ``NULL``) est invoquée." -#: c-api/refcounting.rst:126 +#: c-api/refcounting.rst:135 msgid "" "This function is usually used to delete a :term:`strong reference` before " "exiting its scope." @@ -193,7 +207,7 @@ msgstr "" "Cette fonction est généralement utilisée pour supprimer une :term:`référence " "forte` avant qu'elle ne soit plus accessible." -#: c-api/refcounting.rst:129 +#: c-api/refcounting.rst:138 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XDECREF`." @@ -201,17 +215,17 @@ msgstr "" "L'objet en argument ne doit pas être ``NULL``. :c:func:`Py_XDECREF` doit " "être utilisée si l'objet peut être ``NULL``." -#: c-api/refcounting.rst:132 +#: c-api/refcounting.rst:141 msgid "" -"Do not expect this function to actually modify *o* in any way. For at least :" -"pep:`some objects <683>`, this function has no effect." +"Do not expect this function to actually modify *o* in any way. For at " +"least :pep:`some objects <683>`, this function has no effect." msgstr "" -#: c-api/refcounting.rst:138 +#: c-api/refcounting.rst:147 #, fuzzy msgid "" -"The deallocation function can cause arbitrary Python code to be invoked (e." -"g. when a class instance with a :meth:`~object.__del__` method is " +"The deallocation function can cause arbitrary Python code to be invoked " +"(e.g. when a class instance with a :meth:`~object.__del__` method is " "deallocated). While exceptions in such code are not propagated, the " "executed code has free access to all Python global variables. This means " "that any object that is reachable from a global variable should be in a " @@ -230,7 +244,7 @@ msgstr "" "référence à l'objet dans une variable temporaire, mettre à jour la liste, et " "enfin appeler :c:func:`Py_DECREF` avec la variable temporaire." -#: c-api/refcounting.rst:153 +#: c-api/refcounting.rst:162 #, fuzzy msgid "" "Similar to :c:func:`Py_DECREF`, but the object *o* can be ``NULL``, in which " @@ -242,7 +256,7 @@ msgstr "" "comportement est identique à :c:func:`Py_DECREF` et les mêmes avertissements " "sont de rigueur." -#: c-api/refcounting.rst:160 +#: c-api/refcounting.rst:169 #, fuzzy msgid "" "Release a :term:`strong reference` for object *o*. The object may be " @@ -255,11 +269,12 @@ msgstr "" "Décrémente le compteur de références de l'objet *o*. L'objet peut être " "``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " "comportement est identique à :c:func:`Py_DECREF`, puis l'argument est mis à " -"``NULL``. L'avertissement au sujet de l'objet passé en argument à :c:func:" -"`Py_DECREF` ne s'applique pas car la macro utilise une variable temporaire " -"et met l'objet à ``NULL`` avant de décrémenter le compteur de références." +"``NULL``. L'avertissement au sujet de l'objet passé en argument " +"à :c:func:`Py_DECREF` ne s'applique pas car la macro utilise une variable " +"temporaire et met l'objet à ``NULL`` avant de décrémenter le compteur de " +"références." -#: c-api/refcounting.rst:168 +#: c-api/refcounting.rst:177 #, fuzzy msgid "" "It is a good idea to use this macro whenever releasing a reference to an " @@ -268,13 +283,13 @@ msgstr "" "Il est recommandé d'utiliser cette macro lorsqu'on décrémente le compteur de " "référence d'un objet qui peut être parcouru par le ramasse-miette." -#: c-api/refcounting.rst:171 +#: c-api/refcounting.rst:180 msgid "" "The macro argument is now only evaluated once. If the argument has side " "effects, these are no longer duplicated." msgstr "" -#: c-api/refcounting.rst:178 +#: c-api/refcounting.rst:187 #, fuzzy msgid "" "Indicate taking a new :term:`strong reference` to object *o*. A function " @@ -285,44 +300,45 @@ msgstr "" "fonctionnelle de :c:func:`Py_XINCREF`. Elle peut être utilisée lorsque " "Python est embarqué dynamiquement dans une application." -#: c-api/refcounting.rst:185 +#: c-api/refcounting.rst:194 #, fuzzy msgid "" -"Release a :term:`strong reference` to object *o*. A function version of :c:" -"func:`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." +"Release a :term:`strong reference` to object *o*. A function version " +"of :c:func:`Py_XDECREF`. It can be used for runtime dynamic embedding of " +"Python." msgstr "" "Décrémente le compteur de références de l'objet *o*. C'est la version " "fonctionnelle de :c:func:`Py_XDECREF`. Elle peut être utilisée lorsque " "Python est embarqué dynamiquement dans une application." -#: c-api/refcounting.rst:192 +#: c-api/refcounting.rst:201 msgid "" "Macro safely releasing a :term:`strong reference` to object *dst* and " "setting *dst* to *src*." msgstr "" -#: c-api/refcounting.rst:195 +#: c-api/refcounting.rst:204 msgid "As in case of :c:func:`Py_CLEAR`, \"the obvious\" code can be deadly::" msgstr "" -#: c-api/refcounting.rst:200 +#: c-api/refcounting.rst:209 msgid "The safe way is::" msgstr "" -#: c-api/refcounting.rst:204 +#: c-api/refcounting.rst:213 msgid "" -"That arranges to set *dst* to *src* _before_ releasing the reference to the " +"That arranges to set *dst* to *src* *before* releasing the reference to the " "old value of *dst*, so that any code triggered as a side-effect of *dst* " "getting torn down no longer believes *dst* points to a valid object." msgstr "" -#: c-api/refcounting.rst:223 +#: c-api/refcounting.rst:232 msgid "" "The macro arguments are now only evaluated once. If an argument has side " "effects, these are no longer duplicated." msgstr "" -#: c-api/refcounting.rst:218 +#: c-api/refcounting.rst:227 msgid "" "Variant of :c:macro:`Py_SETREF` macro that uses :c:func:`Py_XDECREF` instead " "of :c:func:`Py_DECREF`." @@ -343,10 +359,10 @@ msgstr "" #~ msgid "" #~ "The following functions or macros are only for use within the interpreter " -#~ "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:" -#~ "`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`." +#~ "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, " +#~ "as well as the global variable :c:data:`_Py_RefTotal`." #~ msgstr "" #~ "Les fonctions ou macros suivantes doivent être uniquement utilisées au " -#~ "sein de l'interpréteur et ne font pas partie de l'API publique : :c:func:" -#~ "`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, " +#~ "sein de l'interpréteur et ne font pas partie de l'API " +#~ "publique : :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, " #~ "ainsi que la variable globale :c:data:`_Py_RefTotal`." diff --git a/c-api/reflection.po b/c-api/reflection.po index c16e93bee..23770a0f5 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2019-02-26 12:01+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -34,9 +34,10 @@ msgstr "" #: c-api/reflection.rst:22 msgid "" "Use either :c:func:`PyEval_GetFrameLocals` to obtain the same behaviour as " -"calling :func:`locals` in Python code, or else call :c:func:" -"`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame` to access " -"the :attr:`~frame.f_locals` attribute of the currently executing frame." +"calling :func:`locals` in Python code, or else " +"call :c:func:`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame` " +"to access the :attr:`~frame.f_locals` attribute of the currently executing " +"frame." msgstr "" #: c-api/reflection.rst:27 @@ -58,19 +59,19 @@ msgstr "" msgid "" "As this function returns a :term:`borrowed reference`, the dictionary " "returned for :term:`optimized scopes ` is cached on the " -"frame object and will remain alive as long as the frame object does. Unlike :" -"c:func:`PyEval_GetFrameLocals` and :func:`locals`, subsequent calls to this " -"function in the same frame will update the contents of the cached dictionary " -"to reflect changes in the state of the local variables rather than returning " -"a new snapshot." +"frame object and will remain alive as long as the frame object does. " +"Unlike :c:func:`PyEval_GetFrameLocals` and :func:`locals`, subsequent calls " +"to this function in the same frame will update the contents of the cached " +"dictionary to reflect changes in the state of the local variables rather " +"than returning a new snapshot." msgstr "" #: c-api/reflection.rst:39 msgid "" -"As part of :pep:`667`, :c:func:`PyFrame_GetLocals`, :func:`locals`, and :" -"attr:`FrameType.f_locals ` no longer make use of the shared " -"cache dictionary. Refer to the :ref:`What's New entry ` for additional details." +"As part of :pep:`667`, :c:func:`PyFrame_GetLocals`, :func:`locals`, " +"and :attr:`FrameType.f_locals ` no longer make use of the " +"shared cache dictionary. Refer to the :ref:`What's New entry ` for additional details." msgstr "" #: c-api/reflection.rst:50 @@ -89,8 +90,8 @@ msgstr "" #: c-api/reflection.rst:58 #, fuzzy msgid "" -"Return the current thread state's frame, which is ``NULL`` if no frame is " -"currently executing." +"Return the :term:`attached thread state`'s frame, which is ``NULL`` if no " +"frame is currently executing." msgstr "" "Renvoie la *frame* actuelle selon le *thread state*, qui est *NULL* si " "aucune *frame* n'est en cours d'exécution." @@ -103,8 +104,8 @@ msgstr "" #, fuzzy msgid "" "Return a dictionary of the local variables in the current execution frame, " -"or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" -"`locals` in Python code." +"or ``NULL`` if no frame is currently executing. Equivalent to " +"calling :func:`locals` in Python code." msgstr "" "Renvoie un dictionnaire des variables locales de la *frame* en cours " "d'exécution, ou *NULL* si aucune *frame* n'est en cours d'exécution." @@ -112,16 +113,16 @@ msgstr "" #: c-api/reflection.rst:78 msgid "" "To access :attr:`~frame.f_locals` on the current frame without making an " -"independent snapshot in :term:`optimized scopes `, call :c:" -"func:`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame`." +"independent snapshot in :term:`optimized scopes `, " +"call :c:func:`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame`." msgstr "" #: c-api/reflection.rst:87 #, fuzzy msgid "" "Return a dictionary of the global variables in the current execution frame, " -"or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" -"`globals` in Python code." +"or ``NULL`` if no frame is currently executing. Equivalent to " +"calling :func:`globals` in Python code." msgstr "" "Renvoie un dictionnaire des variables globales de la *frame* en cours " "d'exécution ou *NULL* si aucune *frame* n'est en cours d'exécution." @@ -138,8 +139,8 @@ msgstr "" msgid "" "Return a description string, depending on the type of *func*. Return values " "include \"()\" for functions and methods, \" constructor\", \" instance\", " -"and \" object\". Concatenated with the result of :c:func:" -"`PyEval_GetFuncName`, the result will be a description of *func*." +"and \" object\". Concatenated with the result " +"of :c:func:`PyEval_GetFuncName`, the result will be a description of *func*." msgstr "" "Renvoie une description en chaîne de caractères, en fonction du type de " "*func*. Les valeurs renvoyées peuvent être ``\"()\"`` pour les fonction et " diff --git a/c-api/sentinel.po b/c-api/sentinel.po new file mode 100644 index 000000000..91e53cb3b --- /dev/null +++ b/c-api/sentinel.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/sentinel.rst:6 +msgid "Sentinel objects" +msgstr "" + +#: c-api/sentinel.rst:10 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the " +"Python :class:`sentinel` type. This is the same object as :class:`sentinel`." +msgstr "" + +#: c-api/sentinel.rst:17 +msgid "" +"Return true if *o* is a :class:`sentinel` object or a subtype. " +"The :class:`sentinel` type does not currently allow subclasses, so this " +"check is exact. Future Python versions may choose to allow subtyping. This " +"function always succeeds." +msgstr "" + +#: c-api/sentinel.rst:27 +msgid "" +"Return true if *o* is a :class:`sentinel` object, but not a subtype. " +"The :class:`sentinel` type does not currently allow subclasses. Future " +"Python versions may choose to allow subtyping. This function always succeeds." +msgstr "" + +#: c-api/sentinel.rst:36 +msgid "" +"Return a new :class:`sentinel` object with :attr:`~sentinel.__name__` set to " +"*name* and :attr:`~sentinel.__module__` set to *module_name*. *name* must " +"not be ``NULL``. If *module_name* is ``NULL``, :attr:`~sentinel.__module__` " +"is set to ``None``. If *repr* is ``NULL``, ``repr()`` " +"returns :attr:`~sentinel.__name__`. Return ``NULL`` with an exception set on " +"failure." +msgstr "" + +#: c-api/sentinel.rst:42 +msgid "" +"For pickling to work, *module_name* must be the name of an importable " +"module, and the sentinel must be accessible from that module under a path " +"matching *name*. Pickle treats *name* as a global variable name in " +"*module_name* (see :meth:`object.__reduce__`)." +msgstr "" diff --git a/c-api/sequence.po b/c-api/sequence.po index 2c0af8bd5..5b0c24f06 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,10 +21,10 @@ msgstr "" #: c-api/sequence.rst:11 msgid "" "Return ``1`` if the object provides the sequence protocol, and ``0`` " -"otherwise. Note that it returns ``1`` for Python classes with a :meth:" -"`~object.__getitem__` method, unless they are :class:`dict` subclasses, " -"since in general it is impossible to determine what type of keys the class " -"supports. This function always succeeds." +"otherwise. Note that it returns ``1`` for Python classes with " +"a :meth:`~object.__getitem__` method, unless they are :class:`dict` " +"subclasses, since in general it is impossible to determine what type of keys " +"the class supports. This function always succeeds." msgstr "" #: c-api/sequence.rst:23 @@ -122,19 +122,27 @@ msgid "" msgstr "" #: c-api/sequence.rst:110 +msgid "Alias for :c:func:`PySequence_Contains`." +msgstr "" + +#: c-api/sequence.rst:112 +msgid "The function should no longer be used to write new code." +msgstr "" + +#: c-api/sequence.rst:118 msgid "" "Return the first index *i* for which ``o[i] == value``. On error, return " "``-1``. This is equivalent to the Python expression ``o.index(value)``." msgstr "" -#: c-api/sequence.rst:116 +#: c-api/sequence.rst:124 msgid "" "Return a list object with the same contents as the sequence or iterable *o*, " "or ``NULL`` on failure. The returned list is guaranteed to be new. This is " "equivalent to the Python expression ``list(o)``." msgstr "" -#: c-api/sequence.rst:125 +#: c-api/sequence.rst:133 msgid "" "Return a tuple object with the same contents as the sequence or iterable " "*o*, or ``NULL`` on failure. If *o* is a tuple, a new reference will be " @@ -142,7 +150,7 @@ msgid "" "contents. This is equivalent to the Python expression ``tuple(o)``." msgstr "" -#: c-api/sequence.rst:133 +#: c-api/sequence.rst:141 msgid "" "Return the sequence or iterable *o* as an object usable by the other " "``PySequence_Fast*`` family of functions. If the object is not a sequence or " @@ -150,53 +158,54 @@ msgid "" "``NULL`` on failure." msgstr "" -#: c-api/sequence.rst:138 +#: c-api/sequence.rst:146 msgid "" "The ``PySequence_Fast*`` functions are thus named because they assume *o* is " "a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access the data " "fields of *o* directly." msgstr "" -#: c-api/sequence.rst:142 +#: c-api/sequence.rst:150 msgid "" "As a CPython implementation detail, if *o* is already a sequence or list, it " "will be returned." msgstr "" -#: c-api/sequence.rst:148 +#: c-api/sequence.rst:156 msgid "" -"Returns the length of *o*, assuming that *o* was returned by :c:func:" -"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " -"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" -"`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " -"tuple." +"Returns the length of *o*, assuming that *o* was returned " +"by :c:func:`PySequence_Fast` and that *o* is not ``NULL``. The size can " +"also be retrieved by calling :c:func:`PySequence_Size` on *o*, " +"but :c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* " +"is a list or tuple." msgstr "" -#: c-api/sequence.rst:157 +#: c-api/sequence.rst:165 msgid "" -"Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:" -"func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within bounds." +"Return the *i*\\ th element of *o*, assuming that *o* was returned " +"by :c:func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within " +"bounds." msgstr "" -#: c-api/sequence.rst:163 +#: c-api/sequence.rst:171 msgid "" "Return the underlying array of PyObject pointers. Assumes that *o* was " "returned by :c:func:`PySequence_Fast` and *o* is not ``NULL``." msgstr "" -#: c-api/sequence.rst:166 +#: c-api/sequence.rst:174 msgid "" "Note, if a list gets resized, the reallocation may relocate the items array. " "So, only use the underlying array pointer in contexts where the sequence " "cannot change." msgstr "" -#: c-api/sequence.rst:173 +#: c-api/sequence.rst:181 msgid "" -"Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form of :c:" -"func:`PySequence_GetItem` but without checking that :c:func:" -"`PySequence_Check` on *o* is true and without adjustment for negative " -"indices." +"Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form " +"of :c:func:`PySequence_GetItem` but without checking " +"that :c:func:`PySequence_Check` on *o* is true and without adjustment for " +"negative indices." msgstr "" #~ msgid "built-in function" diff --git a/c-api/set.po b/c-api/set.po index 8b9064075..c1bf0c7c5 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,93 +18,90 @@ msgstr "" msgid "Set Objects" msgstr "" -#: c-api/set.rst:15 +#: c-api/set.rst:12 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " "objects. Any functionality not listed below is best accessed using either " -"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" -"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" -"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" -"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" -"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" -"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" -"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" -"`PyNumber_InPlaceXor`)." +"the abstract object protocol " +"(including :c:func:`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, " +"and :c:func:`PyObject_GetIter`) or the abstract number protocol " +"(including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, " +"and :c:func:`PyNumber_InPlaceXor`)." msgstr "" -#: c-api/set.rst:29 +#: c-api/set.rst:26 msgid "" "This subtype of :c:type:`PyObject` is used to hold the internal data for " -"both :class:`set` and :class:`frozenset` objects. It is like a :c:type:" -"`PyDictObject` in that it is a fixed size for small sets (much like tuple " -"storage) and will point to a separate, variable sized block of memory for " -"medium and large sized sets (much like list storage). None of the fields of " -"this structure should be considered public and all are subject to change. " -"All access should be done through the documented API rather than by " +"both :class:`set` and :class:`frozenset` objects. It is like " +"a :c:type:`PyDictObject` in that it is a fixed size for small sets (much " +"like tuple storage) and will point to a separate, variable sized block of " +"memory for medium and large sized sets (much like list storage). None of the " +"fields of this structure should be considered public and all are subject to " +"change. All access should be done through the documented API rather than by " "manipulating the values in the structure." msgstr "" -#: c-api/set.rst:40 +#: c-api/set.rst:37 #, fuzzy msgid "" -"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" -"`set` type." +"This is an instance of :c:type:`PyTypeObject` representing the " +"Python :class:`set` type." msgstr "" -"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" -"class:`code`." +"C'est une instance de :c:type:`PyTypeObject` représentant le type " +"Python :class:`code`." -#: c-api/set.rst:46 +#: c-api/set.rst:43 #, fuzzy msgid "" -"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" -"`frozenset` type." +"This is an instance of :c:type:`PyTypeObject` representing the " +"Python :class:`frozenset` type." msgstr "" -"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" -"class:`code`." +"C'est une instance de :c:type:`PyTypeObject` représentant le type " +"Python :class:`code`." -#: c-api/set.rst:49 +#: c-api/set.rst:46 msgid "" "The following type check macros work on pointers to any Python object. " "Likewise, the constructor functions work with any iterable Python object." msgstr "" -#: c-api/set.rst:55 +#: c-api/set.rst:52 msgid "" "Return true if *p* is a :class:`set` object or an instance of a subtype. " "This function always succeeds." msgstr "" -#: c-api/set.rst:60 +#: c-api/set.rst:57 msgid "" "Return true if *p* is a :class:`frozenset` object or an instance of a " "subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:65 +#: c-api/set.rst:62 msgid "" "Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or " "an instance of a subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:70 +#: c-api/set.rst:67 msgid "" "Return true if *p* is a :class:`set` object but not an instance of a " "subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:77 +#: c-api/set.rst:74 msgid "" "Return true if *p* is a :class:`set` object or a :class:`frozenset` object " "but not an instance of a subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:83 +#: c-api/set.rst:80 msgid "" "Return true if *p* is a :class:`frozenset` object but not an instance of a " "subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:89 +#: c-api/set.rst:86 msgid "" "Return a new :class:`set` containing objects returned by the *iterable*. " "The *iterable* may be ``NULL`` to create a new empty set. Return the new " @@ -113,69 +110,83 @@ msgid "" "(``c=set(s)``)." msgstr "" -#: c-api/set.rst:98 +#: c-api/set.rst:107 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*iterable* is a :class:`set`, :class:`frozenset`, :class:`dict` " +"or :class:`frozendict`." +msgstr "" + +#: c-api/set.rst:100 msgid "" "Return a new :class:`frozenset` containing objects returned by the " "*iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. " -"Return the new set on success or ``NULL`` on failure. Raise :exc:" -"`TypeError` if *iterable* is not actually iterable." +"Return the new set on success or ``NULL`` on failure. " +"Raise :exc:`TypeError` if *iterable* is not actually iterable." msgstr "" -#: c-api/set.rst:104 +#: c-api/set.rst:111 msgid "" -"The following functions and macros are available for instances of :class:" -"`set` or :class:`frozenset` or instances of their subtypes." +"The following functions and macros are available for instances " +"of :class:`set` or :class:`frozenset` or instances of their subtypes." msgstr "" -#: c-api/set.rst:112 +#: c-api/set.rst:119 msgid "" "Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " -"to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not a :class:" -"`set`, :class:`frozenset`, or an instance of a subtype." +"to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not " +"a :class:`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" -#: c-api/set.rst:119 +#: c-api/set.rst:126 msgid "Macro form of :c:func:`PySet_Size` without error checking." msgstr "" -#: c-api/set.rst:124 +#: c-api/set.rst:131 msgid "" "Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " "encountered. Unlike the Python :meth:`~object.__contains__` method, this " "function does not automatically convert unhashable sets into temporary " -"frozensets. Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:" -"`SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, or an " -"instance of a subtype." +"frozensets. Raise a :exc:`TypeError` if the *key* is unhashable. " +"Raise :exc:`SystemError` if *anyset* is not " +"a :class:`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" -#: c-api/set.rst:133 +#: c-api/set.rst:174 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` " +"or :class:`bytes`." +msgstr "" + +#: c-api/set.rst:144 msgid "" "Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " "instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " "values of brand new frozensets before they are exposed to other code). " "Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " "the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " -"grow. Raise a :exc:`SystemError` if *set* is not an instance of :class:" -"`set` or its subtype." +"grow. Raise a :exc:`SystemError` if *set* is not an instance " +"of :class:`set` or its subtype." msgstr "" -#: c-api/set.rst:142 +#: c-api/set.rst:159 msgid "" "The following functions are available for instances of :class:`set` or its " "subtypes but not for instances of :class:`frozenset` or its subtypes." msgstr "" -#: c-api/set.rst:148 +#: c-api/set.rst:165 msgid "" "Return ``1`` if found and removed, ``0`` if not found (no action taken), and " "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " "missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " -"the Python :meth:`~frozenset.discard` method, this function does not " -"automatically convert unhashable sets into temporary frozensets. Raise :exc:" -"`SystemError` if *set* is not an instance of :class:`set` or its subtype." +"the Python :meth:`~set.discard` method, this function does not automatically " +"convert unhashable sets into temporary frozensets. Raise :exc:`SystemError` " +"if *set* is not an instance of :class:`set` or its subtype." msgstr "" -#: c-api/set.rst:158 +#: c-api/set.rst:180 msgid "" "Return a new reference to an arbitrary object in the *set*, and removes the " "object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` " @@ -183,11 +194,40 @@ msgid "" "of :class:`set` or its subtype." msgstr "" -#: c-api/set.rst:166 +#: c-api/set.rst:188 msgid "" "Empty an existing set of all elements. Return ``0`` on success. Return " -"``-1`` and raise :exc:`SystemError` if *set* is not an instance of :class:" -"`set` or its subtype." +"``-1`` and raise :exc:`SystemError` if *set* is not an instance " +"of :class:`set` or its subtype." +msgstr "" + +#: c-api/set.rst:194 +msgid "" +"In the :term:`free-threaded build`, the set is emptied before its entries " +"are cleared, so other threads will observe an empty set rather than " +"intermediate states." +msgstr "" + +#: c-api/set.rst:200 +msgid "Deprecated API" +msgstr "" + +#: c-api/set.rst:204 +msgid "" +"A constant representing the size of an internal preallocated table " +"inside :c:type:`PySetObject` instances." +msgstr "" + +#: c-api/set.rst:207 +msgid "" +"This is documented solely for completeness, as there are no guarantees that " +"a given version of CPython uses preallocated tables with a fixed size. In " +"code that does not deal with unstable set internals, :c:macro:`!" +"PySet_MINSIZE` can be replaced with a small constant like ``8``." +msgstr "" + +#: c-api/set.rst:213 +msgid "If looking for the size of a set, use :c:func:`PySet_Size` instead." msgstr "" #~ msgid "object" diff --git a/c-api/slice.po b/c-api/slice.po index 647a2c977..06546b1a8 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -84,8 +84,8 @@ msgstr "" #: c-api/slice.rst:60 msgid "" "This function is considered not safe for resizable sequences. Its invocation " -"should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:" -"`PySlice_AdjustIndices` where ::" +"should be replaced by a combination of :c:func:`PySlice_Unpack` " +"and :c:func:`PySlice_AdjustIndices` where ::" msgstr "" #: c-api/slice.rst:68 @@ -140,10 +140,16 @@ msgstr "" #: c-api/slice.rst:123 msgid "" -"The Python ``Ellipsis`` object. This object has no methods. Like :c:data:" -"`Py_None`, it is an :term:`immortal` singleton object." +"The type of Python :const:`Ellipsis` object. Same " +"as :class:`types.EllipsisType` in the Python layer." msgstr "" -#: c-api/slice.rst:126 +#: c-api/slice.rst:129 +msgid "" +"The Python ``Ellipsis`` object. This object has no methods. " +"Like :c:data:`Py_None`, it is an :term:`immortal` singleton object." +msgstr "" + +#: c-api/slice.rst:132 msgid ":c:data:`Py_Ellipsis` is immortal." msgstr "" diff --git a/c-api/slots.po b/c-api/slots.po new file mode 100644 index 000000000..c0a9658e4 --- /dev/null +++ b/c-api/slots.po @@ -0,0 +1,251 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/slots.rst:6 +msgid "Definition slots" +msgstr "" + +#: c-api/slots.rst:8 +msgid "" +"To define :ref:`module objects ` and :ref:`classes ` using the C API, you may use an array of *slots* -- " +"essentially, key-value pairs that describe features of the object to create. " +"This decouples the data from the structures used at runtime, allowing " +"CPython -- and other Python C API implementations -- to update the " +"structures without breaking backwards compatibility." +msgstr "" + +#: c-api/slots.rst:16 +msgid "" +"This section documents slots in general. For object-specific behavior and " +"slot values, see documentation for functions that apply slots:" +msgstr "" + +#: c-api/slots.rst:20 +msgid ":c:func:`PyType_FromSlots` for types;" +msgstr "" + +#: c-api/slots.rst:21 +msgid "" +":c:func:`PyModule_FromSlotsAndSpec` and :ref:`extension-export-hook` for " +"modules." +msgstr "" + +#: c-api/slots.rst:24 +msgid "" +"When slots are passed to a function that applies them, the function will not " +"modify the slot array, nor any data it points to (recursively). After the " +"function is done, the caller is allowed to modify or deallocate the array " +"and any data it points to (recursively), except data explicitly marked " +"with :c:macro:`PySlot_STATIC`." +msgstr "" + +#: c-api/slots.rst:30 +msgid "" +"Except when documented otherwise, multiple slots with the same ID " +"(:c:member:`~PySlot.sl_id`) may not occur in a single slots array." +msgstr "" + +#: c-api/slots.rst:35 +msgid "" +"Slot arrays generalize an earlier way of defining objects: " +"using :c:type:`PyType_Spec` with :c:type:`PyType_Slot` for types, " +"and :c:type:`PyModuleDef` with :c:type:`PyModuleDef_Slot` for modules. The " +"earlier API is :term:`soft deprecated`; there are no plans to remove it." +msgstr "" + +#: c-api/slots.rst:40 +msgid "Entries of the slots array use the following structure:" +msgstr "" + +#: c-api/slots.rst:44 +msgid "An entry in a slots array. Defined as:" +msgstr "" + +#: c-api/slots.rst:63 +msgid "A slot ID, chosen from:" +msgstr "" + +#: c-api/slots.rst:65 +msgid "``Py_slot_*`` values documented in :ref:`pyslot-common-ids` below;" +msgstr "" + +#: c-api/slots.rst:66 +msgid "" +"``Py_mod_*`` values for modules, as documented in :ref:`c_module_slots`;" +msgstr "" + +#: c-api/slots.rst:67 +msgid "Values for types, as documented in :ref:`pyslot_type_slot_ids`." +msgstr "" + +#: c-api/slots.rst:69 +msgid "" +"A :c:member:`!sl_id` of zero (:c:macro:`Py_slot_end`) marks the end of a " +"slots array." +msgstr "" + +#: c-api/slots.rst:78 +msgid "" +"The data for the slot. These members are part of an anonymous union; the " +"member to use depends on which data type is required by the slot ID: data " +"pointer, function pointer, size, signed or unsigned integer, respectively." +msgstr "" + +#: c-api/slots.rst:84 +msgid "" +"Except when documented otherwise for a specific slot ID, pointers (that " +"is :c:member:`!sl_ptr` and :c:member:`!sl_func`) may not be NULL." +msgstr "" + +#: c-api/slots.rst:89 +msgid "Zero or more of the following flags, OR-ed together:" +msgstr "" + +#: c-api/slots.rst:95 +msgid "" +"All data the slot points to is statically allocated and constant. Thus, the " +"interpreter does not need to copy the information." +msgstr "" + +#: c-api/slots.rst:98 +msgid "This flag is implied for function pointers." +msgstr "" + +#: c-api/slots.rst:100 +msgid "" +"The flag applies even to data the slot points to “indirectly”, except for " +"slots nested via :c:macro:`Py_slot_subslots` which may have their " +"own :c:macro:`!PySlot_STATIC` flags. For example, if applied to " +"a :c:macro:`Py_tp_members` slot that points to an array " +"of :c:type:`PyMemberDef` structures, then the entire array, as well as the " +"name and doc strings in its elements, must be static and constant." +msgstr "" + +#: c-api/slots.rst:110 +msgid "" +"The data is stored in ``sl_ptr``; CPython will cast it to the appropriate " +"type." +msgstr "" + +#: c-api/slots.rst:113 +msgid "" +"This flag can simplify porting from the older :c:type:`PyType_Slot` " +"and :c:type:`PyModuleDef_Slot` structures." +msgstr "" + +#: c-api/slots.rst:118 +msgid "" +"If the slot ID is unknown, the interpreter should ignore the slot, rather " +"than fail." +msgstr "" + +#: c-api/slots.rst:121 +msgid "" +"For example, if Python 3.16 adds a new feature with a new slot ID,attr the " +"corresponding slot may be marked :c:macro:`!PySlot_OPTIONAL` so that Python " +"3.15 ignores it." +msgstr "" + +#: c-api/slots.rst:125 +msgid "" +"Note that the \"optionality\" only applies to unknown slot IDs. This flag " +"does not make Python skip invalid values of known slots." +msgstr "" + +#: c-api/slots.rst:132 +msgid "Convenience macros" +msgstr "" + +#: c-api/slots.rst:141 +msgid "" +"Convenience macros to define :c:type:`!PySlot` structures " +"with :c:member:`~PySlot.sl_id` and a particular union member set." +msgstr "" + +#: c-api/slots.rst:144 +msgid "" +":c:macro:`!PySlot_STATIC_DATA` sets the :c:macro:`PySlot_STATIC` flag; " +"others set no flags." +msgstr "" + +#: c-api/slots.rst:147 +msgid "" +"Note that these macros use *designated initializers*, a C language feature " +"that C++ added in the 2020 version of the standard. If your code needs to be " +"compatible with C++11 or older, use :c:macro:`PySlot_PTR` instead." +msgstr "" + +#: c-api/slots.rst:178 c-api/slots.rst:192 +msgid "Defined as::" +msgstr "" + +#: c-api/slots.rst:176 +msgid "Convenience macro to mark the end of a :c:type:`!PySlot` array." +msgstr "" + +#: c-api/slots.rst:187 +msgid "" +"Convenience macros for use in C++11-compatible code. This version of C++ " +"does not allow setting arbitrary union members in literals; instead, these " +"macros set the :c:macro:`PySlot_INTPTR` flag and cast the value to " +"``(void*)``." +msgstr "" + +#: c-api/slots.rst:205 +msgid "Common slot IDs" +msgstr "" + +#: c-api/slots.rst:207 +msgid "The following slot IDs may be used in both type and module definitions." +msgstr "" + +#: c-api/slots.rst:211 +msgid "Marks the end of a slots array. Defined as zero." +msgstr "" + +#: c-api/slots.rst:218 +msgid "Nested slots array." +msgstr "" + +#: c-api/slots.rst:220 +msgid "" +"The value (:c:member:`~PySlot.sl_ptr`) should point to an array " +"of :c:type:`PySlot` structures. The slots in the array (up to but not " +"including the zero-ID terminator) will be treated as if they were inserted " +"if the current slot array, at the point :c:macro:`!Py_slot_subslots` appears." +msgstr "" + +#: c-api/slots.rst:226 +msgid "" +"Slot nesting depth is limited to 5 levels. This restriction may be lifted in " +"the future." +msgstr "" + +#: c-api/slots.rst:233 +msgid "" +"Reserved; will always be treated as an unknown slot ID. Defined as " +"``UINT16_MAX`` (``0xFFFF``)." +msgstr "" + +#: c-api/slots.rst:236 +msgid "" +"When used with the :c:macro:`PySlot_OPTIONAL` flag, defines a slot with no " +"effect. Without the flag, processing a slot with this ID will fail." +msgstr "" diff --git a/c-api/stable.po b/c-api/stable.po index 6d0b9cf71..96886e6ac 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-05 22:38+0100\n" "Last-Translator: Rémi Lapeyre \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 3.2.1\n" #: c-api/stable.rst:7 -msgid "C API Stability" +#, fuzzy +msgid "C API and ABI Stability" msgstr "Stabilité de l’API C" #: c-api/stable.rst:9 @@ -38,10 +39,10 @@ msgstr "" #, fuzzy msgid "" "CPython's Application Binary Interface (ABI) is forward- and backwards-" -"compatible across a minor release (if these are compiled the same way; see :" -"ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will " -"work on 3.10.8 and vice versa, but will need to be compiled separately for " -"3.9.x and 3.11.x." +"compatible across a minor release (if these are compiled the same way; " +"see :ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 " +"will work on 3.10.8 and vice versa, but will need to be compiled separately " +"for 3.9.x and 3.11.x." msgstr "" "L’interface binaire de CPython (ABI) est entièrement compatible au sein " "d’une version mineure (à condition que la compilation soit toujours faite de " @@ -75,9 +76,9 @@ msgstr "" msgid "" "Names prefixed by an underscore, such as ``_Py_InternalState``, are private " "API that can change without notice even in patch releases. If you need to " -"use this API, consider reaching out to `CPython developers `_ to discuss adding public API for your use " -"case." +"use this API, consider reaching out to `CPython developers `_ to discuss adding public API for " +"your use case." msgstr "" "Les noms commençant par un caractère souligné, comme ``_Py_InternalState``, " "font partie de l’API privée et peuvent changer sans préavis même dans une " @@ -106,172 +107,262 @@ msgid "" "spend extra effort adjusting to changes." msgstr "" -#: c-api/stable.rst:56 -msgid "Stable Application Binary Interface" -msgstr "ABI stable" - #: c-api/stable.rst:58 #, fuzzy +msgid "Stable Application Binary Interfaces" +msgstr "ABI stable" + +#: c-api/stable.rst:60 msgid "" -"For simplicity, this document talks about *extensions*, but the Limited API " -"and Stable ABI work the same way for all uses of the API – for example, " -"embedding Python." +"Python's :dfn:`Stable ABI` allows extensions to be compatible with multiple " +"versions of Python, without recompilation." msgstr "" -"(Par simplicité ce document parle *d’extensions*, mais l’API restreinte et " -"l’ABI stable fonctionnent de la même manière pour tous les cas d’usages de " -"l’API — par exemple pour embarquer Python.)" #: c-api/stable.rst:65 #, fuzzy -msgid "Limited C API" -msgstr "Inconvénients de l’API restreinte" - -#: c-api/stable.rst:67 -#, fuzzy msgid "" -"Python 3.2 introduced the *Limited API*, a subset of Python's C API. " -"Extensions that only use the Limited API can be compiled once and work with " -"multiple versions of Python. Contents of the Limited API are :ref:`listed " -"below `." +"For simplicity, this document talks about *extensions*, but Stable ABI works " +"the same way for all uses of the API – for example, embedding Python." msgstr "" -"Le concept d’*API restreinte*, un sous-ensemble de l’API C de Python, existe " -"depuis Python 3.2. Les extensions qui utilisent uniquement l’API restreinte " -"peuvent être compilées une seule fois et fonctionner avec plusieurs versions " -"de Python. Les objets faisant partie de l’API restreinte sont :ref:" -"`documentés ci-dessous `." +"(Par simplicité ce document parle *d’extensions*, mais l’API restreinte et " +"l’ABI stable fonctionnent de la même manière pour tous les cas d’usages de " +"l’API — par exemple pour embarquer Python.)" -#: c-api/stable.rst:74 -msgid "" -"Define this macro before including ``Python.h`` to opt in to only use the " -"Limited API, and to select the Limited API version." +#: c-api/stable.rst:68 +msgid "There are two Stable ABIs:" msgstr "" -"Définissez cette macro avant d’inclure ``Python.h`` pour n’inclure que l’API " -"restreinte et indiquer sa version." -#: c-api/stable.rst:77 -#, fuzzy +#: c-api/stable.rst:70 msgid "" -"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " -"corresponding to the lowest Python version your extension supports. The " -"extension will work without recompilation with all Python 3 releases from " -"the specified one onward, and can use Limited API introduced up to that " -"version." +"``abi3``, introduced in Python 3.2, is compatible with **non**-:term:`free-" +"threaded ` builds of CPython." msgstr "" -"Définissez ``Py_LIMITED_API`` à la valeur de :c:data:`PY_VERSION_HEX` " -"correspond à la version minimale de Python que votre extension supporte. " -"Cette extension fonctionnera sans re-compilation avec toutes les versions " -"futures de Python 3, et peut utiliser l’ensemble des éléments de l’API " -"restreinte présent dans cette version." -#: c-api/stable.rst:83 +#: c-api/stable.rst:73 msgid "" -"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " -"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " -"compiling with future Python versions." +"``abi3t``, introduced in Python 3.15, is compatible with :term:`free-" +"threaded ` builds of CPython. It has stricter API " +"limitations than ``abi3``." msgstr "" -"Il est recommandé de renseigner une version mineure minimale (par exemple " -"``0x030A0000`` pour Python 3.10) plutôt que d’utiliser directement la macro " -"``PY_VERSION_HEX`` pour ne pas dépendre de la version de Python utilisée " -"lors de la compilation." -#: c-api/stable.rst:87 -msgid "" -"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " -"``0x03020000`` (Python 3.2, the version that introduced Limited API)." +#: c-api/stable.rst:79 +msgid "``abi3t`` was added in :pep:`803`" msgstr "" -"Vous pouvez aussi définir ``Py_LIMITED_API`` à ``3``. Cette valeur est " -"équivalente à ``0x03020000`` correspondant à Python 3.2, la première version " -"à supporter l’API restreinte." -#: c-api/stable.rst:94 -msgid "Stable ABI" +#: c-api/stable.rst:81 +msgid "" +"It is possible for an extension to be compiled for *both* ``abi3`` and " +"``abi3t`` at the same time; the result will be compatible with both free-" +"threaded and non-free-threaded builds of Python. Currently, this has no " +"downsides compared to compiling for ``abi3t`` only." msgstr "" -#: c-api/stable.rst:96 +#: c-api/stable.rst:86 msgid "" -"To enable this, Python provides a *Stable ABI*: a set of symbols that will " -"remain compatible across Python 3.x versions." +"Each Stable ABI is versioned using the first two numbers of the Python " +"version. For example, Stable ABI 3.14 corresponds to Python 3.14. An " +"extension compiled for Stable ABI 3.x is ABI-compatible with Python 3.x and " +"above." msgstr "" -#: c-api/stable.rst:99 -#, fuzzy +#: c-api/stable.rst:91 msgid "" -"The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support " -"older versions of the Limited API." +"Extensions that target a stable ABI must only use a limited subset of the C " +"API. This subset is known as the :dfn:`Limited API`; its contents " +"are :ref:`listed below `." msgstr "" -"Python a aussi une *ABI stable* : un ensemble de symboles qui sont " -"compatibles avec l’ensemble des versions Python 3.x. L’ABI stable contient " -"les symboles utilisés par l’API restreinte, mais pas seulement — par exemple " -"les fonctions nécessaires pour supporter les versions précédentes de l’API " -"restreinte en font aussi partie." -#: c-api/stable.rst:103 +#: c-api/stable.rst:95 +#, fuzzy msgid "" -"On Windows, extensions that use the Stable ABI should be linked against " -"``python3.dll`` rather than a version-specific library such as ``python39." -"dll``." +"On Windows, extensions that use a Stable ABI should be linked against " +"``python3.dll`` rather than a version-specific library such as " +"``python39.dll``. This library only exposes the relevant symbols." msgstr "" "Sur Windows les extensions qui utilisent l’ABI stable doivent être liées " "avec ``python3.dll`` et non pas avec une bibliothèque spécifique à une " "version comme ``python39.dll``." -#: c-api/stable.rst:107 +#: c-api/stable.rst:100 msgid "" "On some platforms, Python will look for and load shared library files named " -"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " -"extensions conform to a Stable ABI. The user (or their packaging tools) need " -"to ensure that, for example, extensions built with the 3.10+ Limited API are " -"not installed for lower versions of Python." +"with the ``abi3`` or ``abi3t`` tag (for example, " +"``mymodule.abi3.so``). :term:`Free-threaded ` " +"interpreters only recognize the ``abi3t`` tag, while non-free-threaded ones " +"will prefer ``abi3`` but fall back to ``abi3t``. Thus, extensions compatible " +"with both ABIs should use the ``abi3t`` tag." msgstr "" -"Sur certaines plateformes Python essaiera de charger une bibliothèque " -"partagée dont le nom contient ``abi3`` (par exemple ``mymodule.abi3.so``). " -"Il ne vérifie pas si ces extensions respectent l’ABI stable. L’utilisateur " -"(ou ses outils d’administration) doit s’assurer que les extensions compilées " -"avec une version donnée de l’API restreinte, par exemple 3.10+, ne sont pas " -"utilisées avec des versions plus anciennes de Python." -#: c-api/stable.rst:114 +#: c-api/stable.rst:107 msgid "" -"All functions in the Stable ABI are present as functions in Python's shared " -"library, not solely as macros. This makes them usable from languages that " -"don't use the C preprocessor." +"Python does not necessarily check that extensions it loads have compatible " +"ABI. Extension authors are encouraged to add a check using " +"the :c:macro:`Py_mod_abi` slot or the :c:func:`PyABIInfo_Check` function, " +"but the user (or their packaging tool) is ultimately responsible for " +"ensuring that, for example, extensions built for Stable ABI 3.10 are not " +"installed for lower versions of Python." +msgstr "" + +#: c-api/stable.rst:115 +#, fuzzy +msgid "" +"All functions in Stable ABI are present as functions in Python's shared " +"library, not solely as macros. This makes them usable in languages that " +"don't use the C preprocessor, including Python's :py:mod:`ctypes`." msgstr "" "Toutes les fonctions de l’ABI stable sont présentes dans la bibliothèque " "dynamique de Python en tant que fonction, et pas uniquement comme macro. " "Elles peuvent donc être utilisées avec des langages qui n’utilisent pas le " "pré-processeur C." -#: c-api/stable.rst:120 -msgid "Limited API Scope and Performance" +#: c-api/stable.rst:124 +msgid "Compiling for Stable ABI" +msgstr "" + +#: c-api/stable.rst:128 +msgid "" +"Build tools (such as, for example, meson-python, scikit-build-core, or " +"Setuptools) often have a mechanism for setting macros and synchronizing them " +"with extension filenames and other metadata. Prefer using such a mechanism, " +"if it exists, over defining the macros manually." +msgstr "" + +#: c-api/stable.rst:134 +msgid "" +"The rest of this section is mainly relevant for tool authors, and for people " +"who compile extensions manually." +msgstr "" + +#: c-api/stable.rst:137 +msgid "`list of recommended tools`_ in the Python Packaging User Guide" +msgstr "" + +#: c-api/stable.rst:141 +msgid "" +"To compile for a Stable ABI, define one or both of the following macros to " +"the lowest Python version your extension should support, " +"in :c:macro:`Py_PACK_VERSION` format. Typically, you should choose a " +"specific value rather than the version of the Python headers you are " +"compiling against." +msgstr "" + +#: c-api/stable.rst:147 +msgid "" +"The macros must be defined before including ``Python.h``. " +"Since :c:macro:`Py_PACK_VERSION` is not available at this point, you will " +"need to use the numeric value directly. For reference, the values for a few " +"recent Python versions are:" +msgstr "" + +#: c-api/stable.rst:154 +msgid "" +"When one of the macros is defined, ``Python.h`` will only expose API that is " +"compatible with the given Stable ABI -- that is, the :ref:`Limited API " +"` plus some definitions that need to be visible to the " +"compiler but should not be used directly. When both are defined, " +"``Python.h`` will only expose API compatible with both Stable ABIs." +msgstr "" + +#: c-api/stable.rst:163 +msgid "" +"Target ``abi3``, that is, non-:term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." +msgstr "" + +#: c-api/stable.rst:169 +msgid "" +"Target ``abi3t``, that is, :term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." +msgstr "" + +#: c-api/stable.rst:175 +msgid "" +"Both macros specify a target ABI; the different naming style is due to " +"backwards compatibility." +msgstr "" + +#: c-api/stable.rst:178 +msgid "Historical note" +msgstr "" + +#: c-api/stable.rst:180 +#, fuzzy +msgid "" +"You can also define ``Py_LIMITED_API`` as ``3``. This works the same as " +"``0x03020000`` (Python 3.2, the version that introduced Stable ABI)." +msgstr "" +"Vous pouvez aussi définir ``Py_LIMITED_API`` à ``3``. Cette valeur est " +"équivalente à ``0x03020000`` correspondant à Python 3.2, la première version " +"à supporter l’API restreinte." + +#: c-api/stable.rst:183 +msgid "" +"When both are defined, ``Python.h`` may, or may not, redefine :c:macro:`!" +"Py_LIMITED_API` to match :c:macro:`!Py_TARGET_ABI3T`." +msgstr "" + +#: c-api/stable.rst:186 +msgid "" +"On a :term:`free-threaded build` -- that is, when :c:macro:`Py_GIL_DISABLED` " +"is defined -- :c:macro:`!Py_TARGET_ABI3T` defaults to the value " +"of :c:macro:`!Py_LIMITED_API`. This means that there are two ways to build " +"for both ``abi3`` and ``abi3t``:" +msgstr "" + +#: c-api/stable.rst:191 +msgid "" +"define both :c:macro:`!Py_LIMITED_API` and :c:macro:`!Py_TARGET_ABI3T`, or" +msgstr "" + +#: c-api/stable.rst:192 +msgid "define only :c:macro:`!Py_LIMITED_API` and:" +msgstr "" + +#: c-api/stable.rst:194 +msgid "on Windows, define :c:macro:`!Py_GIL_DISABLED`;" +msgstr "" + +#: c-api/stable.rst:195 +msgid "on other systems, use the headers of free-threaded build of Python." +msgstr "" + +#: c-api/stable.rst:201 +#, fuzzy +msgid "Stable ABI Scope and Performance" msgstr "Porté de l’API restreinte et performance" -#: c-api/stable.rst:122 +#: c-api/stable.rst:203 +#, fuzzy msgid "" -"The goal for the Limited API is to allow everything that is possible with " -"the full C API, but possibly with a performance penalty." +"The goal for Stable ABI is to allow everything that is possible with the " +"full C API, but possibly with a performance penalty. Generally, " +"compatibility with Stable ABI will require some changes to an extension's " +"source code." msgstr "" "L’objectif de l’API restreinte est de permettre l’ensemble des opérations " "possibles avec l’API C étendue, mais peut avoir un impact sur les " "performances." -#: c-api/stable.rst:125 +#: c-api/stable.rst:208 +#, fuzzy msgid "" -"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " -"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " -"can rely on version-specific implementation details of the list object." +"For example, while :c:func:`PyList_GetItem` is available, its \"unsafe\" " +"macro variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster " +"because it can rely on version-specific implementation details of the list " +"object." msgstr "" "Par exemple la fonction :c:func:`PyList_GetItem` est disponible, mais la " "macro « dangereuse » :c:func:`PyList_GET_ITEM` ne l’est pas. Cette macro " "peut être plus rapide car elle dépend de détails d’implémentation spécifique " "à l’objet ``list``." -#: c-api/stable.rst:130 +#: c-api/stable.rst:213 +#, fuzzy msgid "" -"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " -"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " -"allowing stability as Python's data structures are improved, but possibly " -"reducing performance." +"For another example, when *not* compiling for Stable ABI, some C API " +"functions are inlined or replaced by macros. Compiling for Stable ABI " +"disables this inlining, allowing stability as Python's data structures are " +"improved, but possibly reducing performance." msgstr "" "Si ``Py_LIMITED_API`` n’est pas défini certaines fonctions de l’API C seront " "remplacées par des macros ou une version en-ligne. Définir " @@ -279,48 +370,39 @@ msgstr "" "contre les évolutions des structures de données utilisées par Python, et " "peut réduire les performances." -#: c-api/stable.rst:135 +#: c-api/stable.rst:218 msgid "" -"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " -"a Limited API extension with a version-specific ABI. This can improve " -"performance for that Python version, but will limit compatibility. Compiling " -"with ``Py_LIMITED_API`` will then yield an extension that can be distributed " -"where a version-specific one is not available – for example, for prereleases " -"of an upcoming Python version." +"By leaving out the :c:macro:`!Py_LIMITED_API` or :c:macro:`!Py_TARGET_ABI3T` " +"definition, it is possible to compile Stable-ABI-compatible source for a " +"version-specific ABI. A potentially faster version-specific extension can " +"then be distributed alongside a version compiled for Stable ABI -- a slower " +"but more compatible fallback." msgstr "" -"En omettant la définition de ``Py_LIMITED_API`` il est possible de compiler " -"une extension utilisant l’API restreinte avec une version spécifique de " -"l’ABI. Les performances seront meilleures pour cette version de Python, mais " -"la compatibilité sera réduite. Compiler en définissant ``Py_LIMITED_API`` " -"produira une extension qui peut être utilisée quand une variante spécifique " -"à une version n’est pas disponible — par exemple pour une version alpha de " -"Python." - -#: c-api/stable.rst:144 -msgid "Limited API Caveats" -msgstr "Inconvénients de l’API restreinte" -#: c-api/stable.rst:146 +#: c-api/stable.rst:229 #, fuzzy +msgid "Stable ABI Caveats" +msgstr "ABI stable" + +#: c-api/stable.rst:231 msgid "" -"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " -"that code conforms to the :ref:`Limited API ` or the :ref:" -"`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but " -"an API also includes other issues, such as expected semantics." +"Note that compiling for Stable ABI is *not* a complete guarantee that code " +"will be compatible with the expected Python versions. Stable ABI prevents " +"*ABI* issues, like linker errors due to missing symbols or data corruption " +"due to changes in structure layouts or function signatures. However, other " +"changes in Python can change the *behavior* of extensions." msgstr "" -"Compiler avec ``Py_LIMITED_API`` *n’est pas* une garantie absolue que le " -"code est conforme à l’API restreinte ou à l’ABI stable. ``Py_LIMITED_API`` " -"ne concerne que la définition des objets, mais une API inclut aussi d’autres " -"spécificités comme le comportement attendu." -#: c-api/stable.rst:151 +#: c-api/stable.rst:238 +#, fuzzy msgid "" -"One issue that ``Py_LIMITED_API`` does not guard against is calling a " -"function with arguments that are invalid in a lower Python version. For " -"example, consider a function that starts accepting ``NULL`` for an argument. " -"In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " -"the argument will be used directly, causing a ``NULL`` dereference and " -"crash. A similar argument works for fields of structs." +"One issue that the :c:macro:`Py_TARGET_ABI3T` and :c:macro:`Py_LIMITED_API` " +"macros do not guard against is calling a function with arguments that are " +"invalid in a lower Python version. For example, consider a function that " +"starts accepting ``NULL`` for an argument. In Python 3.9, ``NULL`` now " +"selects a default behavior, but in Python 3.8, the argument will be used " +"directly, causing a ``NULL`` dereference and crash. A similar argument works " +"for fields of structs." msgstr "" "Une des limitations est que ``Py_LIMITED_API`` ne protège pas contre l’appel " "d’une fonction avec des arguments qui sont invalides pour une version de " @@ -330,25 +412,17 @@ msgstr "" "l’objet pointé et dé-référencera ``NULL``, causant un crash. Des problèmes " "similaires peuvent se produire avec les attributs des structures." -#: c-api/stable.rst:158 -msgid "" -"Another issue is that some struct fields are currently not hidden when " -"``Py_LIMITED_API`` is defined, even though they're part of the Limited API." -msgstr "" -"Un autre problème est que certains attributs ne sont pas encore cachés " -"lorsque ``Py_LIMITED_API`` est défini, même s’ils ne font pas partie de " -"l’API restreinte." - -#: c-api/stable.rst:161 +#: c-api/stable.rst:246 +#, fuzzy msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " -"versions it supports, and preferably to build with the *lowest* such version." +"versions it supports." msgstr "" "Pour ces raisons il est recommandé de tester une extension avec *l’ensemble " "des versions mineures* supportées de Python, et généralement de la compiler " "avec la plus *ancienne* de ces versions." -#: c-api/stable.rst:164 +#: c-api/stable.rst:249 msgid "" "We also recommend reviewing documentation of all used API to check if it is " "explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " @@ -361,13 +435,14 @@ msgstr "" "peuvent être exposées aux utilisateurs pour des raisons techniques, ou par " "erreur." -#: c-api/stable.rst:169 +#: c-api/stable.rst:254 +#, fuzzy msgid "" -"Also note that the Limited API is not necessarily stable: compiling with " -"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " -"Python 3.12, but it will not necessarily *compile* with Python 3.12. In " -"particular, parts of the Limited API may be deprecated and removed, provided " -"that the Stable ABI stays stable." +"Also note that while compiling with ``Py_LIMITED_API`` 3.8 means that the " +"extension should *load* on Python 3.12, and *compile* with Python 3.12, the " +"same source will not necessarily compile with ``Py_LIMITED_API`` set to " +"3.12. In general, parts of the Limited API may be deprecated and removed, " +"provided that Stable ABI stays stable." msgstr "" "Notez aussi que l’API restreinte n’est pas forcément stable : compiler avec " "Python 3.8 en définissant ``Py_LIMITED_API`` garanti que l’extension " @@ -375,17 +450,17 @@ msgstr "" "Python 3.12. En particulier certaines parties de l’API restreinte peuvent " "être dépréciées et retirées tant que l’ABI stable n’est pas modifiée." -#: c-api/stable.rst:179 +#: c-api/stable.rst:265 msgid "Platform Considerations" msgstr "Considérations relatives aux plateformes" -#: c-api/stable.rst:181 +#: c-api/stable.rst:267 #, fuzzy msgid "" "ABI stability depends not only on Python, but also on the compiler used, " -"lower-level libraries and compiler options. For the purposes of the :ref:" -"`Stable ABI `, these details define a “platform”. They usually " -"depend on the OS type and processor architecture" +"lower-level libraries and compiler options. For the purposes of " +"the :ref:`Stable ABIs `, these details define a “platform”. They " +"usually depend on the OS type and processor architecture" msgstr "" "La stabilité de l’ABI ne dépend pas que de Python mais aussi du compilateur " "utilisé, des bibliothèques systèmes et des options du compilateur. " @@ -393,12 +468,14 @@ msgstr "" "« plateforme ». Ils dépendent généralement du système d’exploitation et de " "l’architecture du processeur." -#: c-api/stable.rst:186 +#: c-api/stable.rst:272 +#, fuzzy msgid "" "It is the responsibility of each particular distributor of Python to ensure " "that all Python versions on a particular platform are built in a way that " -"does not break the Stable ABI. This is the case with Windows and macOS " -"releases from ``python.org`` and many third-party distributors." +"does not break the Stable ABIs, or the version-specific ABIs. This is the " +"case with Windows and macOS releases from ``python.org`` and many third-" +"party distributors." msgstr "" "Les distributeurs de Python doivent s’assurer que toutes les versions de " "Python pour une plateforme donnée sont compilées de manière à ne pas rompre " @@ -406,13 +483,309 @@ msgstr "" "Windows et macOS de ``python.org`` et de la plupart des distributions " "tierces." -#: c-api/stable.rst:196 +#: c-api/stable.rst:280 +msgid "ABI Checking" +msgstr "" + +#: c-api/stable.rst:284 +msgid "Python includes a rudimentary check for ABI compatibility." +msgstr "" + +#: c-api/stable.rst:286 +msgid "" +"This check is not comprehensive. It only guards against common cases of " +"incompatible modules being installed for the wrong interpreter. It also does " +"not take :ref:`platform incompatibilities ` into " +"account. It can only be done after an extension is successfully loaded." +msgstr "" + +#: c-api/stable.rst:293 +msgid "" +"Despite these limitations, it is recommended that extension modules use this " +"mechanism, so that detectable incompatibilities raise exceptions rather than " +"crash." +msgstr "" + +#: c-api/stable.rst:297 +msgid "" +"Most modules can use this check via the :c:data:`Py_mod_abi` slot and " +"the :c:macro:`PyABIInfo_VAR` macro, for example like this:" +msgstr "" + +#: c-api/stable.rst:310 +msgid "The full API is described below for advanced use cases." +msgstr "" + +#: c-api/stable.rst:314 +msgid "" +"Verify that the given *info* is compatible with the currently running " +"interpreter." +msgstr "" + +#: c-api/stable.rst:317 +msgid "Return 0 on success. On failure, raise an exception and return -1." +msgstr "" + +#: c-api/stable.rst:319 +msgid "" +"If the ABI is incompatible, the raised exception will " +"be :py:exc:`ImportError`." +msgstr "" + +#: c-api/stable.rst:321 +msgid "" +"The *module_name* argument can be ``NULL``, or point to a NUL-terminated " +"UTF-8-encoded string used for error messages." +msgstr "" + +#: c-api/stable.rst:324 +msgid "" +"Note that if *info* describes the ABI that the current code uses (as defined " +"by :c:macro:`PyABIInfo_VAR`, for example), using any other Python C API may " +"lead to crashes. In particular, it is not safe to examine the raised " +"exception." +msgstr "" + +#: c-api/stable.rst:333 +msgid "" +"Define a static :c:struct:`PyABIInfo` variable with the given *NAME* that " +"describes the ABI that the current code will use. This macro expands to:" +msgstr "" + +#: c-api/stable.rst:352 +msgid "The major version of :c:struct:`PyABIInfo`. Can be set to:" +msgstr "" + +#: c-api/stable.rst:354 +msgid "``0`` to skip all checking, or" +msgstr "" + +#: c-api/stable.rst:355 +msgid "``1`` to specify this version of :c:struct:`!PyABIInfo`." +msgstr "" + +#: c-api/stable.rst:359 +msgid "" +"The minor version of :c:struct:`PyABIInfo`. Must be set to ``0``; larger " +"values are reserved for backwards-compatible future versions of :c:struct:`!" +"PyABIInfo`." +msgstr "" + +#: c-api/stable.rst:367 +msgid "This field is usually set to the following macro:" +msgstr "" + +#: c-api/stable.rst:371 +msgid "" +"Default flags, based on current values of macros such " +"as :c:macro:`Py_LIMITED_API` and :c:macro:`Py_GIL_DISABLED`." +msgstr "" + +#: c-api/stable.rst:374 +msgid "" +"Alternately, the field can be set to the following flags, combined by " +"bitwise OR. Unused bits must be set to zero." +msgstr "" + +#: c-api/stable.rst:378 +msgid "ABI variant -- one of:" +msgstr "" + +#: c-api/stable.rst:382 +msgid "Specifies that Stable ABI is used." +msgstr "" + +#: c-api/stable.rst:386 +msgid "" +"Specifies ABI specific to a particular build of CPython. Internal use only." +msgstr "" + +#: c-api/stable.rst:389 +msgid "Free-threading compatibility -- one of:" +msgstr "" + +#: c-api/stable.rst:393 +msgid "" +"Specifies ABI compatible with :term:`free-threaded builds ` of CPython. (That is, ones compiled with :option:`--disable-gil`; " +"with ``t`` in :py:data:`sys.abiflags`)" +msgstr "" + +#: c-api/stable.rst:400 +msgid "" +"Specifies ABI compatible with non-free-threaded builds of CPython (ones " +"compiled *without* :option:`--disable-gil`)." +msgstr "" + +#: c-api/stable.rst:405 +msgid "" +"Specifies ABI compatible with both free-threaded and non-free-threaded " +"builds of CPython, that is, both ``abi3`` and ``abi3t``." +msgstr "" + +#: c-api/stable.rst:411 +msgid "" +"The version of the Python headers used to build the code, in the format used " +"by :c:macro:`PY_VERSION_HEX`." +msgstr "" + +#: c-api/stable.rst:414 +msgid "" +"This can be set to ``0`` to skip any checks related to this field. This " +"option is meant mainly for projects that do not use the CPython headers " +"directly, and do not emulate a specific version of them." +msgstr "" + +#: c-api/stable.rst:420 +msgid "The ABI version." +msgstr "" + +#: c-api/stable.rst:422 +msgid "" +"For Stable ABI, this field should be the value of :c:macro:`Py_LIMITED_API` " +"or :c:macro:`Py_TARGET_ABI3T`. If both are defined, use the smaller value. " +"(If :c:macro:`Py_LIMITED_API` is ``3``; use :c:expr:`Py_PACK_VERSION(3, 2)` " +"instead of ``3``.)" +msgstr "" + +#: c-api/stable.rst:428 +msgid "Otherwise, it should be set to :c:macro:`PY_VERSION_HEX`." +msgstr "" + +#: c-api/stable.rst:430 +msgid "It can also be set to ``0`` to skip any checks related to this field." +msgstr "" + +#: c-api/stable.rst:436 +msgid "" +"The value that should be used for this field, based on current values of " +"macros such as :c:macro:`Py_LIMITED_API`, :c:macro:`PY_VERSION_HEX` " +"and :c:macro:`Py_GIL_DISABLED`." +msgstr "" + +#: c-api/stable.rst:447 msgid "Contents of Limited API" msgstr "Contenu de l’API restreinte" -#: c-api/stable.rst:199 +#: c-api/stable.rst:449 #, fuzzy msgid "" -"Currently, the :ref:`Limited API ` includes the following " -"items:" +"This is the definitive list of :ref:`Limited API ` for Python " +"|version|:" msgstr "Pour le moment l’API restreinte inclut les éléments suivants :" + +#, fuzzy +#~ msgid "Limited C API" +#~ msgstr "Inconvénients de l’API restreinte" + +#, fuzzy +#~ msgid "" +#~ "Python 3.2 introduced the *Limited API*, a subset of Python's C API. " +#~ "Extensions that only use the Limited API can be compiled once and be " +#~ "loaded on multiple versions of Python. Contents of the Limited API " +#~ "are :ref:`listed below `." +#~ msgstr "" +#~ "Le concept d’*API restreinte*, un sous-ensemble de l’API C de Python, " +#~ "existe depuis Python 3.2. Les extensions qui utilisent uniquement l’API " +#~ "restreinte peuvent être compilées une seule fois et fonctionner avec " +#~ "plusieurs versions de Python. Les objets faisant partie de l’API " +#~ "restreinte sont :ref:`documentés ci-dessous `." + +#~ msgid "" +#~ "Define this macro before including ``Python.h`` to opt in to only use the " +#~ "Limited API, and to select the Limited API version." +#~ msgstr "" +#~ "Définissez cette macro avant d’inclure ``Python.h`` pour n’inclure que " +#~ "l’API restreinte et indiquer sa version." + +#, fuzzy +#~ msgid "" +#~ "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " +#~ "corresponding to the lowest Python version your extension supports. The " +#~ "extension will be ABI-compatible with all Python 3 releases from the " +#~ "specified one onward, and can use Limited API introduced up to that " +#~ "version." +#~ msgstr "" +#~ "Définissez ``Py_LIMITED_API`` à la valeur de :c:data:`PY_VERSION_HEX` " +#~ "correspond à la version minimale de Python que votre extension supporte. " +#~ "Cette extension fonctionnera sans re-compilation avec toutes les versions " +#~ "futures de Python 3, et peut utiliser l’ensemble des éléments de l’API " +#~ "restreinte présent dans cette version." + +#~ msgid "" +#~ "Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a " +#~ "minimum minor version (e.g. ``0x030A0000`` for Python 3.10) for stability " +#~ "when compiling with future Python versions." +#~ msgstr "" +#~ "Il est recommandé de renseigner une version mineure minimale (par exemple " +#~ "``0x030A0000`` pour Python 3.10) plutôt que d’utiliser directement la " +#~ "macro ``PY_VERSION_HEX`` pour ne pas dépendre de la version de Python " +#~ "utilisée lors de la compilation." + +#, fuzzy +#~ msgid "" +#~ "The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to " +#~ "support older versions of the Limited API." +#~ msgstr "" +#~ "Python a aussi une *ABI stable* : un ensemble de symboles qui sont " +#~ "compatibles avec l’ensemble des versions Python 3.x. L’ABI stable " +#~ "contient les symboles utilisés par l’API restreinte, mais pas seulement — " +#~ "par exemple les fonctions nécessaires pour supporter les versions " +#~ "précédentes de l’API restreinte en font aussi partie." + +#~ msgid "" +#~ "On some platforms, Python will look for and load shared library files " +#~ "named with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not " +#~ "check if such extensions conform to a Stable ABI. The user (or their " +#~ "packaging tools) need to ensure that, for example, extensions built with " +#~ "the 3.10+ Limited API are not installed for lower versions of Python." +#~ msgstr "" +#~ "Sur certaines plateformes Python essaiera de charger une bibliothèque " +#~ "partagée dont le nom contient ``abi3`` (par exemple " +#~ "``mymodule.abi3.so``). Il ne vérifie pas si ces extensions respectent " +#~ "l’ABI stable. L’utilisateur (ou ses outils d’administration) doit " +#~ "s’assurer que les extensions compilées avec une version donnée de l’API " +#~ "restreinte, par exemple 3.10+, ne sont pas utilisées avec des versions " +#~ "plus anciennes de Python." + +#~ msgid "" +#~ "By leaving out the ``Py_LIMITED_API`` definition, it is possible to " +#~ "compile a Limited API extension with a version-specific ABI. This can " +#~ "improve performance for that Python version, but will limit " +#~ "compatibility. Compiling with ``Py_LIMITED_API`` will then yield an " +#~ "extension that can be distributed where a version-specific one is not " +#~ "available – for example, for prereleases of an upcoming Python version." +#~ msgstr "" +#~ "En omettant la définition de ``Py_LIMITED_API`` il est possible de " +#~ "compiler une extension utilisant l’API restreinte avec une version " +#~ "spécifique de l’ABI. Les performances seront meilleures pour cette " +#~ "version de Python, mais la compatibilité sera réduite. Compiler en " +#~ "définissant ``Py_LIMITED_API`` produira une extension qui peut être " +#~ "utilisée quand une variante spécifique à une version n’est pas disponible " +#~ "— par exemple pour une version alpha de Python." + +#~ msgid "Limited API Caveats" +#~ msgstr "Inconvénients de l’API restreinte" + +#, fuzzy +#~ msgid "" +#~ "Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " +#~ "that code conforms to the :ref:`Limited API ` or " +#~ "the :ref:`Stable ABI `. ``Py_LIMITED_API`` only covers " +#~ "definitions, but an API also includes other issues, such as expected " +#~ "semantics." +#~ msgstr "" +#~ "Compiler avec ``Py_LIMITED_API`` *n’est pas* une garantie absolue que le " +#~ "code est conforme à l’API restreinte ou à l’ABI stable. " +#~ "``Py_LIMITED_API`` ne concerne que la définition des objets, mais une API " +#~ "inclut aussi d’autres spécificités comme le comportement attendu." + +#~ msgid "" +#~ "Another issue is that some struct fields are currently not hidden when " +#~ "``Py_LIMITED_API`` is defined, even though they're part of the Limited " +#~ "API." +#~ msgstr "" +#~ "Un autre problème est que certains attributs ne sont pas encore cachés " +#~ "lorsque ``Py_LIMITED_API`` est défini, même s’ils ne font pas partie de " +#~ "l’API restreinte." diff --git a/c-api/structures.po b/c-api/structures.po index a65adec02..27829a13f 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -47,127 +47,240 @@ msgid "" "In a normal \"release\" build, it contains only the object's reference count " "and a pointer to the corresponding type object. Nothing is actually declared " "to be a :c:type:`PyObject`, but every pointer to a Python object can be cast " -"to a :c:expr:`PyObject*`. Access to the members must be done by using the " -"macros :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." +"to a :c:expr:`PyObject*`." msgstr "" -#: c-api/structures.rst:38 +#: c-api/structures.rst:33 msgid "" -"This is an extension of :c:type:`PyObject` that adds the :c:member:" -"`~PyVarObject.ob_size` field. This is only used for objects that have some " -"notion of *length*. This type does not often appear in the Python/C API. " -"Access to the members must be done by using the macros :c:macro:" -"`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`." +"The members must not be accessed directly; instead use macros such " +"as :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." msgstr "" -#: c-api/structures.rst:47 +#: c-api/structures.rst:36 +msgid "" +"In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), " +"this struct is opaque; its size and layout may change between Python " +"versions. In Stable ABI for non-free-threaded builds (``abi3``), " +"the :c:member:`!ob_refcnt` and :c:member:`!ob_type` fields are available, " +"but using them directly is discouraged." +msgstr "" + +#: c-api/structures.rst:45 +msgid "" +"The object's reference count, as returned by :c:macro:`Py_REFCNT`. Do not " +"use this field directly; instead use functions and macros such as :c:macro:`!" +"Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`." +msgstr "" + +#: c-api/structures.rst:49 +msgid "" +"The field type may be different from ``Py_ssize_t``, depending on build " +"configuration and platform." +msgstr "" + +#: c-api/structures.rst:54 +msgid "" +"The object's type. Do not use this field directly; use :c:macro:`Py_TYPE` " +"and :c:func:`Py_SET_TYPE` instead." +msgstr "" + +#: c-api/structures.rst:60 +msgid "" +"A :ref:`per-object lock `, present only in the :term:`free-" +"threaded ` build (when :c:macro:`Py_GIL_DISABLED` is " +"defined)." +msgstr "" + +#: c-api/structures.rst:63 +msgid "" +"This field is **reserved for use by the critical section API** " +"(:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`). " +"Do **not** lock it directly with ``PyMutex_Lock``; doing so can cause " +"deadlocks. If you need your own lock, add a separate :c:type:`PyMutex` " +"field to your object struct." +msgstr "" + +#: c-api/structures.rst:74 +msgid "" +"An extension of :c:type:`PyObject` that adds " +"the :c:member:`~PyVarObject.ob_size` field. This is intended for objects " +"that have some notion of *length*." +msgstr "" + +#: c-api/structures.rst:78 +msgid "" +"As with :c:type:`!PyObject`, the members must not be accessed directly; " +"instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` " +"and :c:macro:`Py_TYPE`." +msgstr "" + +#: c-api/structures.rst:82 +msgid "" +"In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), " +"this struct is opaque; its size and layout may change between Python " +"versions. In Stable ABI for non-free-threaded builds (``abi3``), " +"the :c:member:`!ob_base` and :c:member:`!ob_size` fields are available, but " +"using them directly is discouraged." +msgstr "" + +#: c-api/structures.rst:91 +msgid "" +"Common object header. Typically, this field is not accessed directly; " +"instead :c:type:`!PyVarObject` can be cast to :c:type:`PyObject`." +msgstr "" + +#: c-api/structures.rst:97 +msgid "" +"A size field, whose contents should be considered an object's internal " +"implementation detail." +msgstr "" + +#: c-api/structures.rst:100 +msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." +msgstr "" + +#: c-api/structures.rst:102 +msgid "" +"Object creation functions such as :c:func:`PyObject_NewVar` will generally " +"set this field to the requested size (number of items). After creation, " +"arbitrary values can be stored in :c:member:`!ob_size` " +"using :c:macro:`Py_SET_SIZE`." +msgstr "" + +#: c-api/structures.rst:107 +msgid "" +"To get an object's publicly exposed length, as returned by the Python " +"function :py:func:`len`, use :c:func:`PyObject_Length` instead." +msgstr "" + +#: c-api/structures.rst:114 msgid "" "This is a macro used when declaring new types which represent objects " "without a varying length. The PyObject_HEAD macro expands to::" msgstr "" -#: c-api/structures.rst:52 +#: c-api/structures.rst:119 msgid "See documentation of :c:type:`PyObject` above." msgstr "" -#: c-api/structures.rst:57 +#: c-api/structures.rst:124 msgid "" "This is a macro used when declaring new types which represent objects with a " "length that varies from instance to instance. The PyObject_VAR_HEAD macro " "expands to::" msgstr "" -#: c-api/structures.rst:63 +#: c-api/structures.rst:130 msgid "See documentation of :c:type:`PyVarObject` above." msgstr "" -#: c-api/structures.rst:68 +#: c-api/structures.rst:135 +msgid "" +"The base class of all other objects, the same as :class:`object` in Python." +msgstr "" + +#: c-api/structures.rst:140 msgid "" "Test if the *x* object is the *y* object, the same as ``x is y`` in Python." msgstr "" -#: c-api/structures.rst:75 +#: c-api/structures.rst:147 msgid "" "Test if an object is the ``None`` singleton, the same as ``x is None`` in " "Python." msgstr "" -#: c-api/structures.rst:83 +#: c-api/structures.rst:155 msgid "" "Test if an object is the ``True`` singleton, the same as ``x is True`` in " "Python." msgstr "" -#: c-api/structures.rst:91 +#: c-api/structures.rst:163 msgid "" "Test if an object is the ``False`` singleton, the same as ``x is False`` in " "Python." msgstr "" -#: c-api/structures.rst:99 +#: c-api/structures.rst:171 msgid "Get the type of the Python object *o*." msgstr "" -#: c-api/structures.rst:101 -msgid "Return a :term:`borrowed reference`." -msgstr "" - -#: c-api/structures.rst:103 -msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type." +#: c-api/structures.rst:173 +msgid "" +"The returned reference is :term:`borrowed ` from *o*. Do " +"not release it with :c:func:`Py_DECREF` or similar." msgstr "" -#: c-api/structures.rst:105 +#: c-api/structures.rst:176 msgid "" ":c:func:`Py_TYPE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyObject*`." msgstr "" -#: c-api/structures.rst:112 +#: c-api/structures.rst:183 msgid "" "Return non-zero if the object *o* type is *type*. Return zero otherwise. " "Equivalent to: ``Py_TYPE(o) == type``." msgstr "" -#: c-api/structures.rst:120 -msgid "Set the object *o* type to *type*." +#: c-api/structures.rst:191 +msgid "" +"Set the type of object *o* to *type*, without any checking or reference " +"counting." +msgstr "" + +#: c-api/structures.rst:194 +msgid "" +"This is a very low-level operation. Consider instead setting the Python " +"attribute :attr:`~object.__class__` using :c:func:`PyObject_SetAttrString` " +"or similar." msgstr "" -#: c-api/structures.rst:127 -msgid "Get the size of the Python object *o*." +#: c-api/structures.rst:198 +msgid "" +"Note that assigning an incompatible type can lead to undefined behavior." +msgstr "" + +#: c-api/structures.rst:200 +msgid "" +"If *type* is a :ref:`heap type `, the caller must create a new " +"reference to it. Similarly, if the old type of *o* is a heap type, the " +"caller must release a reference to that type." msgstr "" -#: c-api/structures.rst:129 -msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size." +#: c-api/structures.rst:210 +msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." msgstr "" -#: c-api/structures.rst:131 +#: c-api/structures.rst:212 msgid "" ":c:func:`Py_SIZE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyVarObject*`." msgstr "" -#: c-api/structures.rst:138 -msgid "Set the object *o* size to *size*." +#: c-api/structures.rst:219 +msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." msgstr "" -#: c-api/structures.rst:145 +#: c-api/structures.rst:226 msgid "" -"This is a macro which expands to initialization values for a new :c:type:" -"`PyObject` type. This macro expands to::" +"This is a macro which expands to initialization values for a " +"new :c:type:`PyObject` type. This macro expands to::" msgstr "" -#: c-api/structures.rst:154 +#: c-api/structures.rst:235 msgid "" -"This is a macro which expands to initialization values for a new :c:type:" -"`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. " -"This macro expands to::" +"This is a macro which expands to initialization values for a " +"new :c:type:`PyVarObject` type, including " +"the :c:member:`~PyVarObject.ob_size` field. This macro expands to::" msgstr "" -#: c-api/structures.rst:163 +#: c-api/structures.rst:244 msgid "Implementing functions and methods" msgstr "" -#: c-api/structures.rst:167 +#: c-api/structures.rst:248 msgid "" "Type of the functions used to implement most Python callables in C. " "Functions of this type take two :c:expr:`PyObject*` parameters and return " @@ -177,60 +290,64 @@ msgid "" "reference." msgstr "" -#: c-api/structures.rst:174 +#: c-api/structures.rst:255 msgid "The function signature is::" msgstr "" -#: c-api/structures.rst:181 +#: c-api/structures.rst:262 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_VARARGS | METH_KEYWORDS `. " "The function signature is::" msgstr "" -#: c-api/structures.rst:192 +#: c-api/structures.rst:273 msgid "" "Type of the functions used to implement Python callables in C with " "signature :c:macro:`METH_FASTCALL`. The function signature is::" msgstr "" -#: c-api/structures.rst:202 +#: c-api/structures.rst:283 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" -#: c-api/structures.rst:213 +#: c-api/structures.rst:294 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" -#: c-api/structures.rst:228 +#: c-api/structures.rst:309 msgid "" "Structure used to describe a method of an extension type. This structure " "has four fields:" msgstr "" -#: c-api/structures.rst:233 +#: c-api/structures.rst:314 msgid "Name of the method." msgstr "" -#: c-api/structures.rst:237 +#: c-api/structures.rst:316 +msgid "A ``NULL`` *ml_name* marks the end of a :c:type:`!PyMethodDef` array." +msgstr "" + +#: c-api/structures.rst:320 msgid "Pointer to the C implementation." msgstr "" -#: c-api/structures.rst:241 +#: c-api/structures.rst:324 msgid "Flags bits indicating how the call should be constructed." msgstr "" -#: c-api/structures.rst:245 +#: c-api/structures.rst:328 msgid "Points to the contents of the docstring." msgstr "" -#: c-api/structures.rst:247 +#: c-api/structures.rst:330 msgid "" "The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions " "may be of different types, but they always return :c:expr:`PyObject*`. If " @@ -240,41 +357,42 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" -#: c-api/structures.rst:255 +#: c-api/structures.rst:338 msgid "" "The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include " "the following flags. The individual flags indicate either a calling " "convention or a binding convention." msgstr "" -#: c-api/structures.rst:260 +#: c-api/structures.rst:343 msgid "There are these calling conventions:" msgstr "" -#: c-api/structures.rst:264 +#: c-api/structures.rst:347 msgid "" -"This is the typical calling convention, where the methods have the type :c:" -"type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " -"first one is the *self* object for methods; for module functions, it is the " -"module object. The second parameter (often called *args*) is a tuple object " -"representing all arguments. This parameter is typically processed using :c:" -"func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." +"This is the typical calling convention, where the methods have the " +"type :c:type:`PyCFunction`. The function expects two :c:expr:`PyObject*` " +"values. The first one is the *self* object for methods; for module " +"functions, it is the module object. The second parameter (often called " +"*args*) is a tuple object representing all arguments. This parameter is " +"typically processed using :c:func:`PyArg_ParseTuple` " +"or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: c-api/structures.rst:274 +#: c-api/structures.rst:357 msgid "" -"Can only be used in certain combinations with other flags: :ref:" -"`METH_VARARGS | METH_KEYWORDS `, :ref:" -"`METH_FASTCALL | METH_KEYWORDS ` and :ref:" -"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `." +"Can only be used in certain combinations with other " +"flags: :ref:`METH_VARARGS | METH_KEYWORDS `, :ref:`METH_FASTCALL | METH_KEYWORDS ` and :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS " +"`." msgstr "" -#: c-api/structures.rst:282 +#: c-api/structures.rst:365 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:283 +#: c-api/structures.rst:366 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -283,7 +401,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: c-api/structures.rst:292 +#: c-api/structures.rst:375 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the " @@ -292,15 +410,15 @@ msgid "" "the array)." msgstr "" -#: c-api/structures.rst:302 +#: c-api/structures.rst:385 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: c-api/structures.rst:307 +#: c-api/structures.rst:390 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:308 +#: c-api/structures.rst:391 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " @@ -312,17 +430,17 @@ msgid "" "the positional arguments." msgstr "" -#: c-api/structures.rst:323 +#: c-api/structures.rst:406 msgid "" "Can only be used in the combination with other flags: :ref:`METH_METHOD | " "METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: c-api/structures.rst:329 +#: c-api/structures.rst:412 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: c-api/structures.rst:330 +#: c-api/structures.rst:413 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -330,14 +448,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" -#: c-api/structures.rst:335 +#: c-api/structures.rst:418 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" -#: c-api/structures.rst:344 +#: c-api/structures.rst:427 msgid "" "Methods without parameters don't need to check whether arguments are given " "if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " @@ -346,76 +464,94 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: c-api/structures.rst:350 +#: c-api/structures.rst:433 msgid "" -"The function must have 2 parameters. Since the second parameter is unused, :" -"c:macro:`Py_UNUSED` can be used to prevent a compiler warning." +"The function must have 2 parameters. Since the second parameter is " +"unused, :c:macro:`Py_UNUSED` can be used to prevent a compiler warning." msgstr "" -#: c-api/structures.rst:356 +#: c-api/structures.rst:439 msgid "" -"Methods with a single object argument can be listed with the :c:macro:" -"`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " -"``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with the " -"*self* parameter, and a :c:expr:`PyObject*` parameter representing the " +"Methods with a single object argument can be listed with " +"the :c:macro:`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` " +"with a ``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with " +"the *self* parameter, and a :c:expr:`PyObject*` parameter representing the " "single argument." msgstr "" -#: c-api/structures.rst:362 +#: c-api/structures.rst:445 msgid "" "These two constants are not used to indicate the calling convention but the " -"binding when use with methods of classes. These may not be used for " +"binding when used with methods of classes. These may not be used for " "functions defined for modules. At most one of these flags may be set for " "any given method." msgstr "" -#: c-api/structures.rst:372 +#: c-api/structures.rst:455 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " "what is created when using the :func:`classmethod` built-in function." msgstr "" -#: c-api/structures.rst:382 +#: c-api/structures.rst:465 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " "what is created when using the :func:`staticmethod` built-in function." msgstr "" -#: c-api/structures.rst:386 +#: c-api/structures.rst:469 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" -#: c-api/structures.rst:392 +#: c-api/structures.rst:475 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " "wrappers are loaded before the method table, the existence of a " -"*sq_contains* slot, for example, would generate a wrapped method named :meth:" -"`~object.__contains__` and preclude the loading of a corresponding " -"PyCFunction with the same name. With the flag defined, the PyCFunction will " -"be loaded in place of the wrapper object and will co-exist with the slot. " -"This is helpful because calls to PyCFunctions are optimized more than " -"wrapper object calls." +"*sq_contains* slot, for example, would generate a wrapped method " +"named :meth:`~object.__contains__` and preclude the loading of a " +"corresponding PyCFunction with the same name. With the flag defined, the " +"PyCFunction will be loaded in place of the wrapper object and will co-exist " +"with the slot. This is helpful because calls to PyCFunctions are optimized " +"more than wrapper object calls." +msgstr "" + +#: c-api/structures.rst:488 +msgid "" +"The type object corresponding to Python C method objects. This is available " +"as :class:`types.BuiltinMethodType` in the Python layer." msgstr "" -#: c-api/structures.rst:404 +#: c-api/structures.rst:494 +msgid "" +"Return true if *op* is an instance of the :c:type:`PyCMethod_Type` type or a " +"subtype of it. This function always succeeds." +msgstr "" + +#: c-api/structures.rst:500 +msgid "" +"This is the same as :c:func:`PyCMethod_Check`, but does not account for " +"subtypes." +msgstr "" + +#: c-api/structures.rst:506 msgid "" "Turn *ml* into a Python :term:`callable` object. The caller must ensure that " "*ml* outlives the :term:`callable`. Typically, *ml* is defined as a static " "variable." msgstr "" -#: c-api/structures.rst:408 +#: c-api/structures.rst:510 msgid "" "The *self* parameter will be passed as the *self* argument to the C function " "in ``ml->ml_meth`` when invoked. *self* can be ``NULL``." msgstr "" -#: c-api/structures.rst:412 +#: c-api/structures.rst:514 msgid "" "The :term:`callable` object's ``__module__`` attribute can be set from the " "given *module* argument. *module* should be a Python string, which will be " @@ -423,172 +559,256 @@ msgid "" "can be set to :const:`None` or ``NULL``." msgstr "" -#: c-api/structures.rst:418 +#: c-api/structures.rst:520 msgid ":attr:`function.__module__`" msgstr "" -#: c-api/structures.rst:420 +#: c-api/structures.rst:522 msgid "" "The *cls* parameter will be passed as the *defining_class* argument to the C " "function. Must be set if :c:macro:`METH_METHOD` is set on ``ml->ml_flags``." msgstr "" -#: c-api/structures.rst:429 +#: c-api/structures.rst:531 +msgid "" +"The type object corresponding to Python C function objects. This is " +"available as :class:`types.BuiltinFunctionType` in the Python layer." +msgstr "" + +#: c-api/structures.rst:537 +msgid "" +"Return true if *op* is an instance of the :c:type:`PyCFunction_Type` type or " +"a subtype of it. This function always succeeds." +msgstr "" + +#: c-api/structures.rst:543 +msgid "" +"This is the same as :c:func:`PyCFunction_Check`, but does not account for " +"subtypes." +msgstr "" + +#: c-api/structures.rst:549 msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``." msgstr "" -#: c-api/structures.rst:434 +#: c-api/structures.rst:554 msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." msgstr "" -#: c-api/structures.rst:438 +#: c-api/structures.rst:559 +msgid "" +"Get the function's flags on *func* as they were passed " +"to :c:member:`~PyMethodDef.ml_flags`." +msgstr "" + +#: c-api/structures.rst:580 c-api/structures.rst:600 +msgid "" +"If *func* is not a C function object, this fails with an exception. *func* " +"must not be ``NULL``." +msgstr "" + +#: c-api/structures.rst:565 +msgid "" +"This function returns the function's flags on success, and ``-1`` with an " +"exception set on failure." +msgstr "" + +#: c-api/structures.rst:571 +msgid "" +"This is the same as :c:func:`PyCFunction_GetFlags`, but without error or " +"type checking." +msgstr "" + +#: c-api/structures.rst:577 +msgid "" +"Get the function pointer on *func* as it was passed " +"to :c:member:`~PyMethodDef.ml_meth`." +msgstr "" + +#: c-api/structures.rst:583 +msgid "" +"This function returns the function pointer on success, and ``NULL`` with an " +"exception set on failure." +msgstr "" + +#: c-api/structures.rst:589 +msgid "" +"This is the same as :c:func:`PyCFunction_GetFunction`, but without error or " +"type checking." +msgstr "" + +#: c-api/structures.rst:595 +msgid "" +"Get the \"self\" object on *func*. This is the object that would be passed " +"to the first argument of a :c:type:`PyCFunction`. For C function objects " +"created through a :c:type:`PyMethodDef` on a :c:type:`PyModuleDef`, this is " +"the resulting module object." +msgstr "" + +#: c-api/structures.rst:603 +msgid "" +"This function returns a :term:`borrowed reference` to the \"self\" object on " +"success, and ``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/structures.rst:609 +msgid "" +"This is the same as :c:func:`PyCFunction_GetSelf`, but without error or type " +"checking." +msgstr "" + +#: c-api/structures.rst:614 msgid "Accessing attributes of extension types" msgstr "" -#: c-api/structures.rst:442 +#: c-api/structures.rst:618 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. When defining a class, put a NULL-terminated array of these " "structures in the :c:member:`~PyTypeObject.tp_members` slot." msgstr "" -#: c-api/structures.rst:447 +#: c-api/structures.rst:623 msgid "Its fields are, in order:" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:627 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" -#: c-api/structures.rst:454 +#: c-api/structures.rst:630 msgid "The string should be static, no copy is made of it." msgstr "" -#: c-api/structures.rst:458 +#: c-api/structures.rst:634 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" -#: c-api/structures.rst:463 +#: c-api/structures.rst:639 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" -#: c-api/structures.rst:467 +#: c-api/structures.rst:643 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: c-api/structures.rst:471 +#: c-api/structures.rst:647 msgid "" "The docstring, or NULL. The string should be static, no copy is made of it. " "Typically, it is defined using :c:macro:`PyDoc_STR`." msgstr "" -#: c-api/structures.rst:475 +#: c-api/structures.rst:651 msgid "" "By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow " "both read and write access. Use the :c:macro:`Py_READONLY` flag for read-" -"only access. Certain types, like :c:macro:`Py_T_STRING`, imply :c:macro:" -"`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and legacy :c:macro:" -"`T_OBJECT`) members can be deleted." +"only access. Certain types, like :c:macro:`Py_T_STRING`, " +"imply :c:macro:`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and " +"legacy :c:macro:`T_OBJECT`) members can be deleted." msgstr "" -#: c-api/structures.rst:484 +#: c-api/structures.rst:660 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " -"``\"__vectorcalloffset__\"``, corresponding to :c:member:`~PyTypeObject." -"tp_vectorcall_offset` in type objects. These must be defined with " -"``Py_T_PYSSIZET`` and ``Py_READONLY``, for example::" +"``\"__vectorcalloffset__\"``, corresponding " +"to :c:member:`~PyTypeObject.tp_vectorcall_offset` in type objects. This " +"member must be defined with ``Py_T_PYSSIZET``, and either ``Py_READONLY`` or " +"``Py_READONLY | Py_RELATIVE_OFFSET``. For example::" msgstr "" -#: c-api/structures.rst:496 +#: c-api/structures.rst:673 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: c-api/structures.rst:498 +#: c-api/structures.rst:675 msgid "" -"The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" -"`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " -"``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but " +"The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` " +"and :c:member:`~PyTypeObject.tp_weaklistoffset` can be defined similarly " +"using ``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but " "extensions are strongly encouraged to use :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: c-api/structures.rst:506 +#: c-api/structures.rst:683 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:511 +#: c-api/structures.rst:688 +msgid "" +":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " +"``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " +"``\"__weaklistoffset__\"``." +msgstr "" + +#: c-api/structures.rst:694 msgid "" "Get an attribute belonging to the object at address *obj_addr*. The " "attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." msgstr "" -#: c-api/structures.rst:517 +#: c-api/structures.rst:700 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:522 +#: c-api/structures.rst:705 msgid "" "Set an attribute belonging to the object at address *obj_addr* to object " "*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " "``0`` if successful and a negative value on failure." msgstr "" -#: c-api/structures.rst:528 +#: c-api/structures.rst:711 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: c-api/structures.rst:534 +#: c-api/structures.rst:717 msgid "Member flags" msgstr "" -#: c-api/structures.rst:536 +#: c-api/structures.rst:719 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: c-api/structures.rst:540 +#: c-api/structures.rst:723 msgid "Not writable." msgstr "" -#: c-api/structures.rst:544 +#: c-api/structures.rst:727 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: c-api/structures.rst:549 +#: c-api/structures.rst:732 msgid "" "Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " "entry indicates an offset from the subclass-specific data, rather than from " "``PyObject``." msgstr "" -#: c-api/structures.rst:553 -msgid "" -"Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " -"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case." -msgstr "" - -#: c-api/structures.rst:558 +#: c-api/structures.rst:736 msgid "" -"This flag is only used in :c:type:`PyType_Slot`. When setting :c:member:" -"`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" -"c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." +"Can only be used as part of the :c:data:`Py_tp_members` :c:type:`slot " +"` when creating a class using " +"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case. " +"When setting :c:member:`~PyTypeObject.tp_members` from the slot during class " +"creation, Python clears the flag and sets :c:member:`PyMemberDef.offset` to " +"the offset from the ``PyObject`` struct." msgstr "" -#: c-api/structures.rst:570 +#: c-api/structures.rst:751 msgid "" "The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " @@ -597,20 +817,20 @@ msgid "" "nothing." msgstr "" -#: c-api/structures.rst:581 +#: c-api/structures.rst:762 msgid "" -"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" -"macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " -"names are now always available. Previously, these required ``#include " +"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. " +"The :c:macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The " +"new names are now always available. Previously, these required ``#include " "\"structmember.h\"``. The header is still available and it provides the old " "names." msgstr "" -#: c-api/structures.rst:590 +#: c-api/structures.rst:771 msgid "Member types" msgstr "" -#: c-api/structures.rst:592 +#: c-api/structures.rst:773 msgid "" ":c:member:`PyMemberDef.type` can be one of the following macros " "corresponding to various C types. When the member is accessed in Python, it " @@ -619,149 +839,149 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: c-api/structures.rst:600 +#: c-api/structures.rst:781 msgid "" -"Unless marked (D), attributes defined this way cannot be deleted using e.g. :" -"keyword:`del` or :py:func:`delattr`." +"Unless marked (D), attributes defined this way cannot be deleted using " +"e.g. :keyword:`del` or :py:func:`delattr`." msgstr "" -#: c-api/structures.rst:604 +#: c-api/structures.rst:785 msgid "Macro name" msgstr "" -#: c-api/structures.rst:604 +#: c-api/structures.rst:785 msgid "C type" msgstr "Type C" -#: c-api/structures.rst:604 +#: c-api/structures.rst:785 msgid "Python type" msgstr "Type Python" -#: c-api/structures.rst:606 +#: c-api/structures.rst:787 msgid ":c:expr:`char`" msgstr "" -#: c-api/structures.rst:607 c-api/structures.rst:609 c-api/structures.rst:611 -#: c-api/structures.rst:613 c-api/structures.rst:615 c-api/structures.rst:616 +#: c-api/structures.rst:788 c-api/structures.rst:790 c-api/structures.rst:792 +#: c-api/structures.rst:794 c-api/structures.rst:796 c-api/structures.rst:797 msgid ":py:class:`int`" msgstr "" -#: c-api/structures.rst:607 +#: c-api/structures.rst:788 msgid ":c:expr:`short`" msgstr "" -#: c-api/structures.rst:608 +#: c-api/structures.rst:789 msgid ":c:expr:`int`" msgstr "" -#: c-api/structures.rst:609 +#: c-api/structures.rst:790 msgid ":c:expr:`long`" msgstr "" -#: c-api/structures.rst:610 +#: c-api/structures.rst:791 msgid ":c:expr:`long long`" msgstr "" -#: c-api/structures.rst:611 +#: c-api/structures.rst:792 #, fuzzy msgid ":c:expr:`unsigned char`" msgstr "``unsigned char``" -#: c-api/structures.rst:612 +#: c-api/structures.rst:793 #, fuzzy msgid ":c:expr:`unsigned int`" msgstr "``unsigned int``" -#: c-api/structures.rst:613 +#: c-api/structures.rst:794 #, fuzzy msgid ":c:expr:`unsigned short`" msgstr "``unsigned short``" -#: c-api/structures.rst:614 +#: c-api/structures.rst:795 #, fuzzy msgid ":c:expr:`unsigned long`" msgstr "``unsigned long``" -#: c-api/structures.rst:615 +#: c-api/structures.rst:796 #, fuzzy msgid ":c:expr:`unsigned long long`" msgstr "``unsigned long long``" -#: c-api/structures.rst:616 +#: c-api/structures.rst:797 msgid ":c:expr:`Py_ssize_t`" msgstr "" -#: c-api/structures.rst:617 +#: c-api/structures.rst:798 msgid ":c:expr:`float`" msgstr "" -#: c-api/structures.rst:618 +#: c-api/structures.rst:799 msgid ":py:class:`float`" msgstr "" -#: c-api/structures.rst:618 +#: c-api/structures.rst:799 msgid ":c:expr:`double`" msgstr "" -#: c-api/structures.rst:619 +#: c-api/structures.rst:800 msgid ":c:expr:`char` (written as 0 or 1)" msgstr "" -#: c-api/structures.rst:619 +#: c-api/structures.rst:800 msgid ":py:class:`bool`" msgstr "" -#: c-api/structures.rst:621 +#: c-api/structures.rst:802 msgid ":c:expr:`const char *` (*)" msgstr "" -#: c-api/structures.rst:622 +#: c-api/structures.rst:803 msgid ":py:class:`str` (RO)" msgstr "" -#: c-api/structures.rst:622 +#: c-api/structures.rst:803 msgid ":c:expr:`const char[]` (*)" msgstr "" -#: c-api/structures.rst:623 +#: c-api/structures.rst:804 msgid ":c:expr:`char` (0-127)" msgstr "" -#: c-api/structures.rst:623 +#: c-api/structures.rst:804 msgid ":py:class:`str` (**)" msgstr "" -#: c-api/structures.rst:624 +#: c-api/structures.rst:805 #, fuzzy msgid ":c:expr:`PyObject *`" msgstr "PyObject \\*" -#: c-api/structures.rst:624 +#: c-api/structures.rst:805 msgid ":py:class:`object` (D)" msgstr "" -#: c-api/structures.rst:627 +#: c-api/structures.rst:808 msgid "" "(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " "the C representation is a pointer; with :c:macro:`!Py_T_STRING_INPLACE` the " "string is stored directly in the structure." msgstr "" -#: c-api/structures.rst:632 +#: c-api/structures.rst:813 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: c-api/structures.rst:634 +#: c-api/structures.rst:815 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: c-api/structures.rst:636 +#: c-api/structures.rst:817 msgid "" "(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " "``NULL`` pointer raises :py:exc:`AttributeError`." msgstr "" -#: c-api/structures.rst:662 +#: c-api/structures.rst:843 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -769,69 +989,69 @@ msgid "" "with the following deprecated types:" msgstr "" -#: c-api/structures.rst:670 +#: c-api/structures.rst:851 msgid "" "Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " "in surprising behavior in Python: deleting the attribute effectively sets it " "to ``None``." msgstr "" -#: c-api/structures.rst:676 +#: c-api/structures.rst:857 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: c-api/structures.rst:679 +#: c-api/structures.rst:860 msgid "Defining Getters and Setters" msgstr "" -#: c-api/structures.rst:683 +#: c-api/structures.rst:864 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: c-api/structures.rst:688 +#: c-api/structures.rst:869 msgid "attribute name" msgstr "" -#: c-api/structures.rst:692 +#: c-api/structures.rst:873 msgid "C function to get the attribute." msgstr "" -#: c-api/structures.rst:696 +#: c-api/structures.rst:877 msgid "" "Optional C function to set or delete the attribute. If ``NULL``, the " "attribute is read-only." msgstr "" -#: c-api/structures.rst:701 +#: c-api/structures.rst:882 msgid "optional docstring" msgstr "" -#: c-api/structures.rst:705 +#: c-api/structures.rst:886 msgid "" "Optional user data pointer, providing additional data for getter and setter." msgstr "" -#: c-api/structures.rst:709 +#: c-api/structures.rst:890 msgid "" "The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a user data pointer (the associated ``closure``):" msgstr "" -#: c-api/structures.rst:712 +#: c-api/structures.rst:893 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: c-api/structures.rst:717 +#: c-api/structures.rst:898 msgid "" "``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " "the value to be set) and a user data pointer (the associated ``closure``):" msgstr "" -#: c-api/structures.rst:720 +#: c-api/structures.rst:901 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." diff --git a/c-api/subinterpreters.po b/c-api/subinterpreters.po new file mode 100644 index 000000000..b87cdb96a --- /dev/null +++ b/c-api/subinterpreters.po @@ -0,0 +1,554 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/subinterpreters.rst:6 +msgid "Multiple interpreters in a Python process" +msgstr "" + +#: c-api/subinterpreters.rst:8 +msgid "" +"While in most uses, you will only embed a single Python interpreter, there " +"are cases where you need to create several independent interpreters in the " +"same process and perhaps even in the same thread. Sub-interpreters allow you " +"to do that." +msgstr "" + +#: c-api/subinterpreters.rst:13 +msgid "" +"The \"main\" interpreter is the first one created when the runtime " +"initializes. It is usually the only Python interpreter in a process. Unlike " +"sub-interpreters, the main interpreter has unique process-global " +"responsibilities like signal handling. It is also responsible for execution " +"during runtime initialization and is usually the active interpreter during " +"runtime finalization. The :c:func:`PyInterpreterState_Main` function " +"returns a pointer to its state." +msgstr "" + +#: c-api/subinterpreters.rst:20 +msgid "" +"You can switch between sub-interpreters using " +"the :c:func:`PyThreadState_Swap` function. You can create and destroy them " +"using the following functions:" +msgstr "" + +#: c-api/subinterpreters.rst:26 +msgid "" +"Structure containing most parameters to configure a sub-interpreter. Its " +"values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " +"modified by the runtime." +msgstr "" + +#: c-api/subinterpreters.rst:32 +msgid "Structure fields:" +msgstr "" + +#: c-api/subinterpreters.rst:36 +msgid "" +"If this is ``0`` then the sub-interpreter will use its own \"object\" " +"allocator state. Otherwise it will use (share) the main interpreter's." +msgstr "" + +#: c-api/subinterpreters.rst:40 +msgid "" +"If this is ``0`` " +"then :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` must be " +"``1`` (non-zero). If this is ``1`` then :c:member:`~PyInterpreterConfig.gil` " +"must not be :c:macro:`PyInterpreterConfig_OWN_GIL`." +msgstr "" + +#: c-api/subinterpreters.rst:48 +msgid "" +"If this is ``0`` then the runtime will not support forking the process in " +"any thread where the sub-interpreter is currently active. Otherwise fork is " +"unrestricted." +msgstr "" + +#: c-api/subinterpreters.rst:52 +msgid "" +"Note that the :mod:`subprocess` module still works when fork is disallowed." +msgstr "" + +#: c-api/subinterpreters.rst:57 +msgid "" +"If this is ``0`` then the runtime will not support replacing the current " +"process via exec (e.g. :func:`os.execv`) in any thread where the sub-" +"interpreter is currently active. Otherwise exec is unrestricted." +msgstr "" + +#: c-api/subinterpreters.rst:62 +msgid "" +"Note that the :mod:`subprocess` module still works when exec is disallowed." +msgstr "" + +#: c-api/subinterpreters.rst:67 +msgid "" +"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " +"create threads. Otherwise threads are allowed." +msgstr "" + +#: c-api/subinterpreters.rst:73 +msgid "" +"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " +"create daemon threads. Otherwise daemon threads are allowed (as long " +"as :c:member:`~PyInterpreterConfig.allow_threads` is non-zero)." +msgstr "" + +#: c-api/subinterpreters.rst:80 +msgid "" +"If this is ``0`` then all extension modules may be imported, including " +"legacy (single-phase init) modules, in any thread where the sub-interpreter " +"is currently active. Otherwise only multi-phase init extension modules " +"(see :pep:`489`) may be imported. (Also " +"see :c:macro:`Py_mod_multiple_interpreters`.)" +msgstr "" + +#: c-api/subinterpreters.rst:87 +msgid "" +"This must be ``1`` (non-zero) " +"if :c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``." +msgstr "" + +#: c-api/subinterpreters.rst:92 +msgid "" +"This determines the operation of the GIL for the sub-interpreter. It may be " +"one of the following:" +msgstr "" + +#: c-api/subinterpreters.rst:99 +msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." +msgstr "" + +#: c-api/subinterpreters.rst:103 +msgid "Use (share) the main interpreter's GIL." +msgstr "" + +#: c-api/subinterpreters.rst:107 +msgid "Use the sub-interpreter's own GIL." +msgstr "" + +#: c-api/subinterpreters.rst:109 +msgid "" +"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` " +"then :c:member:`PyInterpreterConfig.use_main_obmalloc` must be ``0``." +msgstr "" + +#: c-api/subinterpreters.rst:123 +msgid "" +"Create a new sub-interpreter. This is an (almost) totally separate " +"environment for the execution of Python code. In particular, the new " +"interpreter has separate, independent versions of all imported modules, " +"including the fundamental modules :mod:`builtins`, :mod:`__main__` " +"and :mod:`sys`. The table of loaded modules (``sys.modules``) and the " +"module search path (``sys.path``) are also separate. The new environment " +"has no ``sys.argv`` variable. It has new standard I/O stream file objects " +"``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` (however these refer to the " +"same underlying file descriptors)." +msgstr "" + +#: c-api/subinterpreters.rst:133 +msgid "" +"The given *config* controls the options with which the interpreter is " +"initialized." +msgstr "" + +#: c-api/subinterpreters.rst:136 +msgid "" +"Upon success, *tstate_p* will be set to the first :term:`thread state` " +"created in the new sub-interpreter. This thread state is :term:`attached " +"`. Note that no actual thread is created; see the " +"discussion of thread states below. If creation of the new interpreter is " +"unsuccessful, *tstate_p* is set to ``NULL``; no exception is set since the " +"exception state is stored in the :term:`attached thread state`, which might " +"not exist." +msgstr "" + +#: c-api/subinterpreters.rst:145 +msgid "" +"Like all other Python/C API functions, an :term:`attached thread state` must " +"be present before calling this function, but it might be detached upon " +"returning. On success, the returned thread state will be :term:`attached " +"`. If the sub-interpreter is created with its " +"own :term:`GIL` then the :term:`attached thread state` of the calling " +"interpreter will be detached. When the function returns, the new " +"interpreter's :term:`thread state` will be :term:`attached ` to the current thread and the previous interpreter's :term:`attached " +"thread state` will remain detached." +msgstr "" + +#: c-api/subinterpreters.rst:156 +msgid "" +"Sub-interpreters are most effective when isolated from each other, with " +"certain functionality restricted::" +msgstr "" + +#: c-api/subinterpreters.rst:174 +msgid "" +"Note that the config is used only briefly and does not get modified. During " +"initialization the config's values are converted into " +"various :c:type:`PyInterpreterState` values. A read-only copy of the config " +"may be stored internally on the :c:type:`PyInterpreterState`." +msgstr "" + +#: c-api/subinterpreters.rst:183 +msgid "Extension modules are shared between (sub-)interpreters as follows:" +msgstr "" + +#: c-api/subinterpreters.rst:185 +msgid "" +"For modules using multi-phase initialization, " +"e.g. :c:func:`PyModule_FromDefAndSpec`, a separate module object is created " +"and initialized for each interpreter. Only C-level static and global " +"variables are shared between these module objects." +msgstr "" + +#: c-api/subinterpreters.rst:191 +msgid "" +"For modules using legacy :ref:`single-phase initialization `, e.g. :c:func:`PyModule_Create`, the first time a " +"particular extension is imported, it is initialized normally, and a " +"(shallow) copy of its module's dictionary is squirreled away. When the same " +"extension is imported by another (sub-)interpreter, a new module is " +"initialized and filled with the contents of this copy; the extension's " +"``init`` function is not called. Objects in the module's dictionary thus end " +"up shared across (sub-)interpreters, which might cause unwanted behavior " +"(see `Bugs and caveats`_ below)." +msgstr "" + +#: c-api/subinterpreters.rst:203 +msgid "" +"Note that this is different from what happens when an extension is imported " +"after the interpreter has been completely re-initialized by " +"calling :c:func:`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, " +"the extension's ``initmodule`` function *is* called again. As with multi-" +"phase initialization, this means that only C-level static and global " +"variables are shared between these modules." +msgstr "" + +#: c-api/subinterpreters.rst:223 +msgid "" +"Create a new sub-interpreter. This is essentially just a wrapper " +"around :c:func:`Py_NewInterpreterFromConfig` with a config that preserves " +"the existing behavior. The result is an unisolated sub-interpreter that " +"shares the main interpreter's GIL, allows fork/exec, allows daemon threads, " +"and allows single-phase init modules." +msgstr "" + +#: c-api/subinterpreters.rst:235 +msgid "" +"Destroy the (sub-)interpreter represented by the given :term:`thread state`. " +"The given thread state must be :term:`attached `. " +"When the call returns, there will be no :term:`attached thread state`. All " +"thread states associated with this interpreter are destroyed." +msgstr "" + +#: c-api/subinterpreters.rst:240 +msgid "" +":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " +"explicitly destroyed at that point." +msgstr "" + +#: c-api/subinterpreters.rst:247 +msgid "A per-interpreter GIL" +msgstr "" + +#: c-api/subinterpreters.rst:251 +msgid "" +"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " +"that is completely isolated from other interpreters, including having its " +"own GIL. The most important benefit of this isolation is that such an " +"interpreter can execute Python code without being blocked by other " +"interpreters or blocking any others. Thus a single Python process can truly " +"take advantage of multiple CPU cores when running Python code. The " +"isolation also encourages a different approach to concurrency than that of " +"just using threads. (See :pep:`554` and :pep:`684`.)" +msgstr "" + +#: c-api/subinterpreters.rst:261 +msgid "" +"Using an isolated interpreter requires vigilance in preserving that " +"isolation. That especially means not sharing any objects or mutable state " +"without guarantees about thread-safety. Even objects that are otherwise " +"immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of " +"the refcount. One simple but less-efficient approach around this is to use " +"a global lock around all use of some state (or object). Alternately, " +"effectively immutable objects (like integers or strings) can be made safe in " +"spite of their refcounts by making them :term:`immortal`. In fact, this has " +"been done for the builtin singletons, small integers, and a number of other " +"builtin objects." +msgstr "" + +#: c-api/subinterpreters.rst:272 +msgid "" +"If you preserve isolation then you will have access to proper multi-core " +"computing without the complications that come with free-threading. Failure " +"to preserve isolation will expose you to the full consequences of free-" +"threading, including races and hard-to-debug crashes." +msgstr "" + +#: c-api/subinterpreters.rst:277 +msgid "" +"Aside from that, one of the main challenges of using multiple isolated " +"interpreters is how to communicate between them safely (not break isolation) " +"and efficiently. The runtime and stdlib do not provide any standard " +"approach to this yet. A future stdlib module would help mitigate the effort " +"of preserving isolation and expose effective tools for communicating (and " +"sharing) data between interpreters." +msgstr "" + +#: c-api/subinterpreters.rst:286 +msgid "Bugs and caveats" +msgstr "" + +#: c-api/subinterpreters.rst:288 +msgid "" +"Because sub-interpreters (and the main interpreter) are part of the same " +"process, the insulation between them isn't perfect --- for example, using " +"low-level file operations like :func:`os.close` they can (accidentally or " +"maliciously) affect each other's open files. Because of the way extensions " +"are shared between (sub-)interpreters, some extensions may not work " +"properly; this is especially likely when using single-phase initialization " +"or (static) global variables. It is possible to insert objects created in " +"one sub-interpreter into a namespace of another (sub-)interpreter; this " +"should be avoided if possible." +msgstr "" + +#: c-api/subinterpreters.rst:298 +msgid "" +"Special care should be taken to avoid sharing user-defined functions, " +"methods, instances or classes between sub-interpreters, since import " +"operations executed by such objects may affect the wrong (sub-)interpreter's " +"dictionary of loaded modules. It is equally important to avoid sharing " +"objects from which the above are reachable." +msgstr "" + +#: c-api/subinterpreters.rst:304 +msgid "" +"Also note that combining this functionality with ``PyGILState_*`` APIs is " +"delicate, because these APIs assume a bijection between Python thread states " +"and OS-level threads, an assumption broken by the presence of sub-" +"interpreters. It is highly recommended that you don't switch sub-" +"interpreters between a pair of matching :c:func:`PyGILState_Ensure` " +"and :c:func:`PyGILState_Release` calls. Furthermore, extensions (such " +"as :mod:`ctypes`) using these APIs to allow calling of Python code from non-" +"Python created threads will probably be broken when using sub-interpreters." +msgstr "" + +#: c-api/subinterpreters.rst:315 +msgid "High-level APIs" +msgstr "" + +#: c-api/subinterpreters.rst:319 +msgid "" +"This data structure represents the state shared by a number of cooperating " +"threads. Threads belonging to the same interpreter share their module " +"administration and a few other internal items. There are no public members " +"in this structure." +msgstr "" + +#: c-api/subinterpreters.rst:324 +msgid "" +"Threads belonging to different interpreters initially share nothing, except " +"process state like available memory, open file descriptors and such. The " +"global interpreter lock is also shared by all threads, regardless of to " +"which interpreter they belong." +msgstr "" + +#: c-api/subinterpreters.rst:331 +msgid "" +":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL `. See :c:func:`Py_NewInterpreterFromConfig`." +msgstr "" + +#: c-api/subinterpreters.rst:338 +msgid "Get the current interpreter." +msgstr "" + +#: c-api/subinterpreters.rst:340 +msgid "" +"Issue a fatal error if there is no :term:`attached thread state`. It cannot " +"return NULL." +msgstr "" + +#: c-api/subinterpreters.rst:348 +msgid "" +"Return the interpreter's unique ID. If there was any error in doing so then " +"``-1`` is returned and an error is set." +msgstr "" + +#: c-api/subinterpreters.rst:351 +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +#: c-api/subinterpreters.rst:358 +msgid "" +"Return a dictionary in which interpreter-specific data may be stored. If " +"this function returns ``NULL`` then no exception has been raised and the " +"caller should assume no interpreter-specific dict is available." +msgstr "" + +#: c-api/subinterpreters.rst:362 +msgid "" +"This is not a replacement for :c:func:`PyModule_GetState()`, which " +"extensions should use to store interpreter-specific state information." +msgstr "" + +#: c-api/subinterpreters.rst:365 +msgid "" +"The returned dictionary is borrowed from the interpreter and is valid until " +"interpreter shutdown." +msgstr "" + +#: c-api/subinterpreters.rst:373 +msgid "Type of a frame evaluation function." +msgstr "" + +#: c-api/subinterpreters.rst:375 +msgid "" +"The *throwflag* parameter is used by the ``throw()`` method of generators: " +"if non-zero, handle the current exception." +msgstr "" + +#: c-api/subinterpreters.rst:378 +msgid "The function now takes a *tstate* parameter." +msgstr "" + +#: c-api/subinterpreters.rst:381 +msgid "" +"The *frame* parameter changed from ``PyFrameObject*`` to " +"``_PyInterpreterFrame*``." +msgstr "" + +#: c-api/subinterpreters.rst:387 +msgid "Get the frame evaluation function." +msgstr "" + +#: c-api/subinterpreters.rst:398 +msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." +msgstr "" + +#: c-api/subinterpreters.rst:396 +msgid "Set the frame evaluation function." +msgstr "" + +#: c-api/subinterpreters.rst:404 +msgid "" +"Enables or disables specialization why a custom frame evaluator is in place." +msgstr "" + +#: c-api/subinterpreters.rst:406 +msgid "" +"If *allow_specialization* is non-zero, the adaptive specializer will " +"continue to specialize bytecodes even though a custom eval frame function is " +"set. When *allow_specialization* is zero, setting a custom eval frame " +"disables specialization. The standard interpreter loop will continue to " +"deopt while a frame evaluation API is in place - the frame evaluation " +"function needs to handle the specialized opcodes to take advantage of this." +msgstr "" + +#: c-api/subinterpreters.rst:417 +msgid "" +"Return non-zero if adaptive specialization is enabled for the interpreter. " +"Specialization is enabled when no custom eval frame function is set, or when " +"one is set with *allow_specialization* enabled." +msgstr "" + +#: c-api/subinterpreters.rst:425 +msgid "Low-level APIs" +msgstr "" + +#: c-api/subinterpreters.rst:427 +msgid "" +"All of the following functions must be called after :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/subinterpreters.rst:429 +msgid "" +":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets " +"an :term:`attached thread state`." +msgstr "" + +#: c-api/subinterpreters.rst:436 +msgid "" +"Create a new interpreter state object. An :term:`attached thread state` is " +"not needed, but may optionally exist if it is necessary to serialize calls " +"to this function." +msgstr "" + +#: c-api/subinterpreters.rst:440 +msgid "" +"Raises an :ref:`auditing event ` " +"``cpython.PyInterpreterState_New`` with no arguments." +msgstr "" + +#: c-api/subinterpreters.rst:445 +msgid "" +"Reset all information in an interpreter state object. There must be " +"an :term:`attached thread state` for the interpreter." +msgstr "" + +#: c-api/subinterpreters.rst:448 +msgid "" +"Raises an :ref:`auditing event ` " +"``cpython.PyInterpreterState_Clear`` with no arguments." +msgstr "" + +#: c-api/subinterpreters.rst:453 +msgid "" +"Destroy an interpreter state object. There **should not** be " +"an :term:`attached thread state` for the target interpreter. The interpreter " +"state must have been reset with a previous call " +"to :c:func:`PyInterpreterState_Clear`." +msgstr "" + +#: c-api/subinterpreters.rst:461 +msgid "Advanced debugger support" +msgstr "" + +#: c-api/subinterpreters.rst:463 +msgid "" +"These functions are only intended to be used by advanced debugging tools." +msgstr "" + +#: c-api/subinterpreters.rst:468 +msgid "" +"Return the interpreter state object at the head of the list of all such " +"objects." +msgstr "" + +#: c-api/subinterpreters.rst:473 +msgid "Return the main interpreter state object." +msgstr "" + +#: c-api/subinterpreters.rst:478 +msgid "" +"Return the next interpreter state object after *interp* from the list of all " +"such objects." +msgstr "" + +#: c-api/subinterpreters.rst:484 +msgid "" +"Return the pointer to the first :c:type:`PyThreadState` object in the list " +"of threads associated with the interpreter *interp*." +msgstr "" + +#: c-api/subinterpreters.rst:490 +msgid "" +"Return the next thread state object after *tstate* from the list of all such " +"objects belonging to the same :c:type:`PyInterpreterState` object." +msgstr "" diff --git a/c-api/synchronization.po b/c-api/synchronization.po new file mode 100644 index 000000000..e47ff55ba --- /dev/null +++ b/c-api/synchronization.po @@ -0,0 +1,344 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/synchronization.rst:6 +msgid "Synchronization primitives" +msgstr "" + +#: c-api/synchronization.rst:8 +msgid "The C-API provides a basic mutual exclusion lock." +msgstr "" + +#: c-api/synchronization.rst:12 +msgid "" +"A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " +"zero to represent the unlocked state. For example::" +msgstr "" + +#: c-api/synchronization.rst:17 +msgid "" +"Instances of :c:type:`!PyMutex` should not be copied or moved. Both the " +"contents and address of a :c:type:`!PyMutex` are meaningful, and it must " +"remain at a fixed, writable location in memory." +msgstr "" + +#: c-api/synchronization.rst:23 +msgid "" +"A :c:type:`!PyMutex` currently occupies one byte, but the size should be " +"considered unstable. The size may change in future Python releases without " +"a deprecation period." +msgstr "" + +#: c-api/synchronization.rst:31 +msgid "" +"Lock mutex *m*. If another thread has already locked it, the calling thread " +"will block until the mutex is unlocked. While blocked, the thread will " +"temporarily detach the :term:`thread state ` if one " +"exists." +msgstr "" + +#: c-api/synchronization.rst:39 +msgid "" +"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " +"issue a fatal error." +msgstr "" + +#: c-api/synchronization.rst:46 +msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." +msgstr "" + +#: c-api/synchronization.rst:50 +msgid "" +"This function is intended for use in assertions and debugging only and " +"should not be used to make concurrency control decisions, as the lock state " +"may change immediately after the check." +msgstr "" + +#: c-api/synchronization.rst:59 +msgid "Python critical section API" +msgstr "" + +#: c-api/synchronization.rst:61 +msgid "" +"The critical section API provides a deadlock avoidance layer on top of per-" +"object locks for :term:`free-threaded ` CPython. They are " +"intended to replace reliance on the :term:`global interpreter lock`, and are " +"no-ops in versions of Python with the global interpreter lock." +msgstr "" + +#: c-api/synchronization.rst:66 +msgid "" +"Critical sections are intended to be used for custom types implemented in C-" +"API extensions. They should generally not be used with built-in types " +"like :class:`list` and :class:`dict` because their public C-APIs already use " +"critical sections internally, with the notable exception " +"of :c:func:`PyDict_Next`, which requires critical section to be acquired " +"externally." +msgstr "" + +#: c-api/synchronization.rst:73 +msgid "" +"Critical sections avoid deadlocks by implicitly suspending active critical " +"sections, hence, they do not provide exclusive access such as provided by " +"traditional locks like :c:type:`PyMutex`. When a critical section is " +"started, the per-object lock for the object is acquired. If the code " +"executed inside the critical section calls C-API functions then it can " +"suspend the critical section thereby releasing the per-object lock, so other " +"threads can acquire the per-object lock for the same object." +msgstr "" + +#: c-api/synchronization.rst:81 +msgid "" +"Variants that accept :c:type:`PyMutex` pointers rather than Python objects " +"are also available. Use these variants to start a critical section in a " +"situation where there is no :c:type:`PyObject` -- for example, when working " +"with a C type that does not extend or wrap :c:type:`PyObject` but still " +"needs to call into the C API in a manner that might lead to deadlocks." +msgstr "" + +#: c-api/synchronization.rst:89 +msgid "" +"Operations that need to lock two objects at once must " +"use :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical " +"sections to lock more than one object at once, because the inner critical " +"section may suspend the outer critical sections. This API does not provide " +"a way to lock more than two objects at once." +msgstr "" + +#: c-api/synchronization.rst:95 +msgid "Example usage::" +msgstr "" + +#: c-api/synchronization.rst:106 +msgid "" +"In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which " +"can call arbitrary code through an object's deallocation function. The " +"critical section API avoids potential deadlocks due to reentrancy and lock " +"ordering by allowing the runtime to temporarily suspend the critical section " +"if the code triggered by the finalizer blocks and " +"calls :c:func:`PyEval_SaveThread`." +msgstr "" + +#: c-api/synchronization.rst:116 +msgid "" +"Acquires the per-object lock for the object *op* and begins a critical " +"section." +msgstr "" + +#: c-api/synchronization.rst:151 c-api/synchronization.rst:199 +msgid "" +"In the free-threaded build, and when building for the :ref:`Stable ABI " +"`, this macro expands to::" +msgstr "" + +#: c-api/synchronization.rst:173 +msgid "In the default build, this macro expands to ``{``." +msgstr "" + +#: c-api/synchronization.rst:132 +msgid "Locks the mutex *m* and begins a critical section." +msgstr "" + +#: c-api/synchronization.rst:167 +msgid "In the free-threaded build, this macro expands to::" +msgstr "" + +#: c-api/synchronization.rst:140 +msgid "" +"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for " +"the argument of the macro - it must be a :c:type:`PyMutex` pointer." +msgstr "" + +#: c-api/synchronization.rst:191 +msgid "On the default build, this macro expands to ``{``." +msgstr "" + +#: c-api/synchronization.rst:149 +msgid "Ends the critical section and releases the per-object lock." +msgstr "" + +#: c-api/synchronization.rst:205 +msgid "In the default build, this macro expands to ``}``." +msgstr "" + +#: c-api/synchronization.rst:163 +msgid "" +"Acquires the per-object locks for the objects *a* and *b* and begins a " +"critical section. The locks are acquired in a consistent order (lowest " +"address first) to avoid lock ordering deadlocks." +msgstr "" + +#: c-api/synchronization.rst:179 +msgid "Locks the mutexes *m1* and *m2* and begins a critical section." +msgstr "" + +#: c-api/synchronization.rst:188 +msgid "" +"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for " +"the arguments of the macro - they must be :c:type:`PyMutex` pointers." +msgstr "" + +#: c-api/synchronization.rst:197 +msgid "Ends the critical section and releases the per-object locks." +msgstr "" + +#: c-api/synchronization.rst:210 +msgid "Low-level critical section API" +msgstr "" + +#: c-api/synchronization.rst:212 +msgid "" +"The following functions and structs are exposed for cases where C macros are " +"not available." +msgstr "" + +#: c-api/synchronization.rst:243 +msgid "" +"To be used only as in the macro expansions listed :ref:`earlier in this " +"section `." +msgstr "" + +#: c-api/synchronization.rst:246 +msgid "" +"In non-:term:`free-threaded ` builds of CPython, these " +"functions do nothing." +msgstr "" + +#: c-api/synchronization.rst:231 +msgid "" +"To be used only as in the macro expansions listed :ref:`earlier in this " +"section `. Note that the contents of the structures " +"are private and their meaning may change in future Python versions." +msgstr "" + +#: c-api/synchronization.rst:253 +msgid "Legacy locking APIs" +msgstr "" + +#: c-api/synchronization.rst:255 +msgid "" +"These APIs are obsolete since Python 3.13 with the introduction " +"of :c:type:`PyMutex`." +msgstr "" + +#: c-api/synchronization.rst:258 +msgid "These APIs are now a simple wrapper around ``PyMutex``." +msgstr "" + +#: c-api/synchronization.rst:264 +msgid "A pointer to a mutual exclusion lock." +msgstr "" + +#: c-api/synchronization.rst:269 +msgid "The result of acquiring a lock with a timeout." +msgstr "" + +#: c-api/synchronization.rst:275 +msgid "Failed to acquire the lock." +msgstr "" + +#: c-api/synchronization.rst:279 +msgid "The lock was successfully acquired." +msgstr "" + +#: c-api/synchronization.rst:283 +msgid "The lock was interrupted by a signal." +msgstr "" + +#: c-api/synchronization.rst:288 +msgid "Allocate a new lock." +msgstr "" + +#: c-api/synchronization.rst:290 +msgid "" +"On success, this function returns a lock; on failure, this function returns " +"``0`` without an exception set." +msgstr "" + +#: c-api/synchronization.rst:305 c-api/synchronization.rst:343 +#: c-api/synchronization.rst:351 +msgid "The caller does not need to hold an :term:`attached thread state`." +msgstr "" + +#: c-api/synchronization.rst:295 +msgid "" +"This function now always uses :c:type:`PyMutex`. In prior versions, this " +"would use a lock provided by the operating system." +msgstr "" + +#: c-api/synchronization.rst:302 +msgid "" +"Destroy *lock*. The lock should not be held by any thread when calling this." +msgstr "" + +#: c-api/synchronization.rst:310 +msgid "Acquire *lock* with a timeout." +msgstr "" + +#: c-api/synchronization.rst:312 +msgid "" +"This will wait for *microseconds* microseconds to acquire the lock. If the " +"timeout expires, this function returns :c:enumerator:`PY_LOCK_FAILURE`. If " +"*microseconds* is ``-1``, this will wait indefinitely until the lock has " +"been released." +msgstr "" + +#: c-api/synchronization.rst:317 +msgid "" +"If *intr_flag* is ``1``, acquiring the lock may be interrupted by a signal, " +"in which case this function returns :c:enumerator:`PY_LOCK_INTR`. Upon " +"interruption, it's generally expected that the caller makes a call " +"to :c:func:`Py_MakePendingCalls` to propagate an exception to Python code." +msgstr "" + +#: c-api/synchronization.rst:322 +msgid "" +"If the lock is successfully acquired, this function " +"returns :c:enumerator:`PY_LOCK_ACQUIRED`." +msgstr "" + +#: c-api/synchronization.rst:330 +msgid "Acquire *lock*." +msgstr "" + +#: c-api/synchronization.rst:332 +msgid "" +"If *waitflag* is ``1`` and another thread currently holds the lock, this " +"function will wait until the lock can be acquired and will always return " +"``1``." +msgstr "" + +#: c-api/synchronization.rst:336 +msgid "" +"If *waitflag* is ``0`` and another thread holds the lock, this function will " +"not wait and instead return ``0``. If the lock is not held by any other " +"thread, then this function will acquire it and return ``1``." +msgstr "" + +#: c-api/synchronization.rst:340 +msgid "" +"Unlike :c:func:`PyThread_acquire_lock_timed`, acquiring the lock cannot be " +"interrupted by a signal." +msgstr "" + +#: c-api/synchronization.rst:348 +msgid "" +"Release *lock*. If *lock* is not held, then this function issues a fatal " +"error." +msgstr "" diff --git a/c-api/sys.po b/c-api/sys.po index 1a6d2864e..d4a583450 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -20,12 +20,12 @@ msgstr "" #: c-api/sys.rst:11 msgid "" -"Return the file system representation for *path*. If the object is a :class:" -"`str` or :class:`bytes` object, then a new :term:`strong reference` is " -"returned. If the object implements the :class:`os.PathLike` interface, then :" -"meth:`~os.PathLike.__fspath__` is returned as long as it is a :class:`str` " -"or :class:`bytes` object. Otherwise :exc:`TypeError` is raised and ``NULL`` " -"is returned." +"Return the file system representation for *path*. If the object is " +"a :class:`str` or :class:`bytes` object, then a new :term:`strong reference` " +"is returned. If the object implements the :class:`os.PathLike` interface, " +"then :meth:`~os.PathLike.__fspath__` is returned as long as it is " +"a :class:`str` or :class:`bytes` object. Otherwise :exc:`TypeError` is " +"raised and ``NULL`` is returned." msgstr "" #: c-api/sys.rst:24 @@ -92,8 +92,8 @@ msgstr "" #: c-api/sys.rst:83 msgid "" ":func:`os.register_at_fork` allows registering custom Python functions to be " -"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` and :" -"c:func:`PyOS_AfterFork_Child`." +"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` " +"and :c:func:`PyOS_AfterFork_Child`." msgstr "" #: c-api/sys.rst:90 @@ -127,25 +127,50 @@ msgstr "" #: c-api/sys.rst:122 msgid "" "Set the signal handler for signal *i* to be *h*; return the old signal " -"handler. This is a thin wrapper around either :c:func:`!sigaction` or :c:" -"func:`!signal`. Do not call those functions directly!" +"handler. This is a thin wrapper around either :c:func:`!sigaction` " +"or :c:func:`!signal`. Do not call those functions directly!" msgstr "" #: c-api/sys.rst:129 +msgid "Check if a :c:macro:`!SIGINT` signal has been received." +msgstr "" + +#: c-api/sys.rst:131 +msgid "" +"Returns ``1`` if a :c:macro:`!SIGINT` has occurred and clears the signal " +"flag, or ``0`` otherwise." +msgstr "" + +#: c-api/sys.rst:134 +msgid "" +"In most cases, you should prefer :c:func:`PyErr_CheckSignals` over this " +"function. :c:func:`!PyErr_CheckSignals` invokes the appropriate signal " +"handlers for all pending signals, allowing Python code to handle the signal " +"properly. This function only detects :c:macro:`!SIGINT` and does not invoke " +"any Python signal handlers." +msgstr "" + +#: c-api/sys.rst:140 +msgid "" +"This function is async-signal-safe and this function cannot fail. The caller " +"must hold an :term:`attached thread state`." +msgstr "" + +#: c-api/sys.rst:147 msgid "" "This function should not be called directly: use the :c:type:`PyConfig` API " -"with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" -"`Python is preinitialized `." +"with the :c:func:`PyConfig_SetBytesString` function which ensures " +"that :ref:`Python is preinitialized `." msgstr "" -#: c-api/sys.rst:200 +#: c-api/sys.rst:218 msgid "" "This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" -"func:`Py_PreInitialize` function." +"preinit>` and so that the LC_CTYPE locale is properly configured: see " +"the :c:func:`Py_PreInitialize` function." msgstr "" -#: c-api/sys.rst:137 +#: c-api/sys.rst:155 msgid "" "Decode a byte string from the :term:`filesystem encoding and error handler`. " "If the error handler is :ref:`surrogateescape error handler " @@ -155,57 +180,58 @@ msgid "" "instead of decoding them." msgstr "" -#: c-api/sys.rst:144 +#: c-api/sys.rst:162 msgid "" -"Return a pointer to a newly allocated wide character string, use :c:func:" -"`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " -"number of wide characters excluding the null character into ``*size``" +"Return a pointer to a newly allocated wide character string, " +"use :c:func:`PyMem_RawFree` to free the memory. If size is not ``NULL``, " +"write the number of wide characters excluding the null character into " +"``*size``" msgstr "" -#: c-api/sys.rst:148 +#: c-api/sys.rst:166 msgid "" "Return ``NULL`` on decoding error or memory allocation error. If *size* is " "not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to " "``(size_t)-2`` on decoding error." msgstr "" -#: c-api/sys.rst:192 +#: c-api/sys.rst:210 msgid "" -"The :term:`filesystem encoding and error handler` are selected by :c:func:" -"`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" -"`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." +"The :term:`filesystem encoding and error handler` are selected " +"by :c:func:`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` " +"and :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." msgstr "" -#: c-api/sys.rst:156 +#: c-api/sys.rst:174 msgid "" "Decoding errors should never happen, unless there is a bug in the C library." msgstr "" -#: c-api/sys.rst:159 +#: c-api/sys.rst:177 msgid "" "Use the :c:func:`Py_EncodeLocale` function to encode the character string " "back to a byte string." msgstr "" -#: c-api/sys.rst:164 +#: c-api/sys.rst:182 msgid "" -"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" -"`PyUnicode_DecodeLocaleAndSize` functions." +"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` " +"and :c:func:`PyUnicode_DecodeLocaleAndSize` functions." msgstr "" -#: c-api/sys.rst:211 +#: c-api/sys.rst:229 msgid "" "The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode " "`." msgstr "" -#: c-api/sys.rst:173 +#: c-api/sys.rst:191 msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:" -"`PyPreConfig.legacy_windows_fs_encoding` is zero;" +"The function now uses the UTF-8 encoding on Windows " +"if :c:member:`PyPreConfig.legacy_windows_fs_encoding` is zero;" msgstr "" -#: c-api/sys.rst:180 +#: c-api/sys.rst:198 msgid "" "Encode a wide character string to the :term:`filesystem encoding and error " "handler`. If the error handler is :ref:`surrogateescape error handler " @@ -213,42 +239,85 @@ msgid "" "converted to bytes 0x80..0xFF." msgstr "" -#: c-api/sys.rst:185 +#: c-api/sys.rst:203 msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " "error." msgstr "" -#: c-api/sys.rst:189 +#: c-api/sys.rst:207 msgid "" "If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on " "success, or set to the index of the invalid character on encoding error." msgstr "" -#: c-api/sys.rst:196 +#: c-api/sys.rst:214 msgid "" "Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back " "to a wide character string." msgstr "" -#: c-api/sys.rst:206 +#: c-api/sys.rst:224 msgid "" "The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " "functions." msgstr "" -#: c-api/sys.rst:215 +#: c-api/sys.rst:233 +msgid "" +"The function now uses the UTF-8 encoding on Windows " +"if :c:member:`PyPreConfig.legacy_windows_fs_encoding` is zero." +msgstr "" + +#: c-api/sys.rst:239 +msgid "" +"Similar to :c:func:`!fopen`, but *path* is a Python object and an exception " +"is set on error." +msgstr "" + +#: c-api/sys.rst:242 +msgid "" +"*path* must be a :class:`str` object, a :class:`bytes` object, or " +"a :term:`path-like object`." +msgstr "" + +#: c-api/sys.rst:245 msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:" -"`PyPreConfig.legacy_windows_fs_encoding` is zero." +"On success, return the new file pointer. On error, set an exception and " +"return ``NULL``." msgstr "" -#: c-api/sys.rst:223 +#: c-api/sys.rst:248 +msgid "" +"The file must be closed by :c:func:`Py_fclose` rather than calling " +"directly :c:func:`!fclose`." +msgstr "" + +#: c-api/sys.rst:251 +msgid "The file descriptor is created non-inheritable (:pep:`446`)." +msgstr "" + +#: c-api/sys.rst:253 +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +#: c-api/sys.rst:260 +msgid "Close a file that was opened by :c:func:`Py_fopen`." +msgstr "" + +#: c-api/sys.rst:262 +msgid "" +"On success, return ``0``. On error, return ``EOF`` and ``errno`` is set to " +"indicate the error. In either case, any further access (including another " +"call to :c:func:`Py_fclose`) to the stream results in undefined behavior." +msgstr "" + +#: c-api/sys.rst:273 msgid "System Functions" msgstr "" -#: c-api/sys.rst:225 +#: c-api/sys.rst:275 msgid "" "These are utility functions that make functionality from the :mod:`sys` " "module accessible to C code. They all work with the current interpreter " @@ -256,36 +325,87 @@ msgid "" "state structure." msgstr "" -#: c-api/sys.rst:231 +#: c-api/sys.rst:281 msgid "" -"Return the object *name* from the :mod:`sys` module or ``NULL`` if it does " -"not exist, without setting an exception." +"Get the attribute *name* of the :mod:`sys` module. Return a :term:`strong " +"reference`. Raise :exc:`RuntimeError` and return ``NULL`` if it does not " +"exist or if the :mod:`sys` module cannot be found." msgstr "" -#: c-api/sys.rst:236 +#: c-api/sys.rst:286 msgid "" -"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " -"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " -"on error." +"If the non-existing object should not be treated as a failure, you can " +"use :c:func:`PySys_GetOptionalAttr` instead." msgstr "" -#: c-api/sys.rst:242 +#: c-api/sys.rst:293 msgid "" -"Reset :data:`sys.warnoptions` to an empty list. This function may be called " -"prior to :c:func:`Py_Initialize`." +"This is the same as :c:func:`PySys_GetAttr`, but *name* is specified as " +"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." msgstr "" -#: c-api/sys.rst:245 -msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +#: c-api/sys.rst:297 +msgid "" +"If the non-existing object should not be treated as a failure, you can " +"use :c:func:`PySys_GetOptionalAttrString` instead." msgstr "" -#: c-api/sys.rst:250 +#: c-api/sys.rst:304 +msgid "" +"Variant of :c:func:`PySys_GetAttr` which doesn't raise exception if the " +"object does not exist." +msgstr "" + +#: c-api/sys.rst:307 +msgid "" +"Set *\\*result* to a new :term:`strong reference` to the object and return " +"``1`` if the object exists." +msgstr "" + +#: c-api/sys.rst:309 +msgid "" +"Set *\\*result* to ``NULL`` and return ``0`` without setting an exception if " +"the object does not exist." +msgstr "" + +#: c-api/sys.rst:311 +msgid "" +"Set an exception, set *\\*result* to ``NULL``, and return ``-1``, if an " +"error occurred." +msgstr "" + +#: c-api/sys.rst:318 +msgid "" +"This is the same as :c:func:`PySys_GetOptionalAttr`, but *name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +#: c-api/sys.rst:326 +msgid "" +"Similar to :c:func:`PySys_GetAttrString`, but return a :term:`borrowed " +"reference` and return ``NULL`` *without* setting exception on failure." +msgstr "" + +#: c-api/sys.rst:329 +msgid "Preserves exception that was set before the call." +msgstr "" + +#: c-api/sys.rst:333 +msgid "" +"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " +"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " +"on error." +msgstr "" + +#: c-api/sys.rst:339 msgid "" "Write the output string described by *format* to :data:`sys.stdout`. No " "exceptions are raised, even if truncation occurs (see below)." msgstr "" -#: c-api/sys.rst:253 +#: c-api/sys.rst:342 msgid "" "*format* should limit the total size of the formatted output string to 1000 " "bytes or less -- after 1000 bytes, the output string is truncated. In " @@ -296,48 +416,49 @@ msgid "" "of digits for very large numbers." msgstr "" -#: c-api/sys.rst:261 +#: c-api/sys.rst:350 msgid "" "If a problem occurs, or :data:`sys.stdout` is unset, the formatted message " "is written to the real (C level) *stdout*." msgstr "" -#: c-api/sys.rst:266 +#: c-api/sys.rst:355 msgid "" "As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" -#: c-api/sys.rst:271 +#: c-api/sys.rst:360 msgid "" -"Function similar to PySys_WriteStdout() but format the message using :c:func:" -"`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " -"length." +"Function similar to PySys_WriteStdout() but format the message " +"using :c:func:`PyUnicode_FromFormatV` and don't truncate the message to an " +"arbitrary length." msgstr "" -#: c-api/sys.rst:279 +#: c-api/sys.rst:368 msgid "" "As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" -#: c-api/sys.rst:286 +#: c-api/sys.rst:375 msgid "" -"Return the current dictionary of :option:`-X` options, similarly to :data:" -"`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." +"Return the current dictionary of :option:`-X` options, similarly " +"to :data:`sys._xoptions`. On error, ``NULL`` is returned and an exception " +"is set." msgstr "" -#: c-api/sys.rst:295 +#: c-api/sys.rst:384 msgid "" "Raise an auditing event with any active hooks. Return zero for success and " "non-zero with an exception set on failure." msgstr "" -#: c-api/sys.rst:298 +#: c-api/sys.rst:387 msgid "The *event* string argument must not be *NULL*." msgstr "" -#: c-api/sys.rst:300 +#: c-api/sys.rst:389 msgid "" "If any hooks have been added, *format* and other arguments will be used to " "construct a tuple to pass. Apart from ``N``, the same format characters as " @@ -345,40 +466,41 @@ msgid "" "tuple, it will be added into a single-element tuple." msgstr "" -#: c-api/sys.rst:305 +#: c-api/sys.rst:394 msgid "" "The ``N`` format option must not be used. It consumes a reference, but since " "there is no way to know whether arguments to this function will be consumed, " "using it may cause reference leaks." msgstr "" -#: c-api/sys.rst:309 +#: c-api/sys.rst:398 msgid "" -"Note that ``#`` format characters should always be treated as :c:type:" -"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +"Note that ``#`` format characters should always be treated " +"as :c:type:`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was " +"defined." msgstr "" -#: c-api/sys.rst:312 +#: c-api/sys.rst:401 msgid ":func:`sys.audit` performs the same function from Python code." msgstr "" -#: c-api/sys.rst:314 +#: c-api/sys.rst:403 msgid "See also :c:func:`PySys_AuditTuple`." msgstr "" -#: c-api/sys.rst:320 +#: c-api/sys.rst:409 msgid "" "Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " "unavoidable deprecation warning was raised." msgstr "" -#: c-api/sys.rst:326 +#: c-api/sys.rst:415 msgid "" "Similar to :c:func:`PySys_Audit`, but pass arguments as a Python object. " "*args* must be a :class:`tuple`. To pass no arguments, *args* can be *NULL*." msgstr "" -#: c-api/sys.rst:334 +#: c-api/sys.rst:423 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " "on success and non-zero on failure. If the runtime has been initialized, " @@ -386,35 +508,35 @@ msgid "" "all interpreters created by the runtime." msgstr "" -#: c-api/sys.rst:340 +#: c-api/sys.rst:429 msgid "" "The *userData* pointer is passed into the hook function. Since hook " "functions may be called from different runtimes, this pointer should not " "refer directly to Python state." msgstr "" -#: c-api/sys.rst:344 +#: c-api/sys.rst:433 msgid "" "This function is safe to call before :c:func:`Py_Initialize`. When called " "after runtime initialization, existing audit hooks are notified and may " -"silently abort the operation by raising an error subclassed from :class:" -"`Exception` (other errors will not be silenced)." +"silently abort the operation by raising an error subclassed " +"from :class:`Exception` (other errors will not be silenced)." msgstr "" -#: c-api/sys.rst:349 +#: c-api/sys.rst:438 msgid "" -"The hook function is always called with the GIL held by the Python " -"interpreter that raised the event." +"The hook function is always called with an :term:`attached thread state` by " +"the Python interpreter that raised the event." msgstr "" -#: c-api/sys.rst:352 +#: c-api/sys.rst:441 msgid "" "See :pep:`578` for a detailed description of auditing. Functions in the " "runtime and standard library that raise events are listed in the :ref:`audit " "events table `. Details are in each function's documentation." msgstr "" -#: c-api/sys.rst:359 +#: c-api/sys.rst:448 msgid "" "If the interpreter is initialized, this function raises an auditing event " "``sys.addaudithook`` with no arguments. If any existing hooks raise an " @@ -423,7 +545,7 @@ msgid "" "hook has been added unless they control all existing hooks." msgstr "" -#: c-api/sys.rst:368 +#: c-api/sys.rst:457 msgid "" "The type of the hook function. *event* is the C string event argument passed " "to :c:func:`PySys_Audit` or :c:func:`PySys_AuditTuple`. *args* is guaranteed " @@ -431,43 +553,43 @@ msgid "" "PySys_AddAuditHook()." msgstr "" -#: c-api/sys.rst:380 +#: c-api/sys.rst:469 msgid "Process Control" msgstr "" -#: c-api/sys.rst:387 +#: c-api/sys.rst:476 msgid "" "Print a fatal error message and kill the process. No cleanup is performed. " "This function should only be invoked when a condition is detected that would " "make it dangerous to continue using the Python interpreter; e.g., when the " "object administration appears to be corrupted. On Unix, the standard C " -"library function :c:func:`!abort` is called which will attempt to produce a :" -"file:`core` file." +"library function :c:func:`!abort` is called which will attempt to produce " +"a :file:`core` file." msgstr "" -#: c-api/sys.rst:394 +#: c-api/sys.rst:483 msgid "" "The ``Py_FatalError()`` function is replaced with a macro which logs " "automatically the name of the current function, unless the " "``Py_LIMITED_API`` macro is defined." msgstr "" -#: c-api/sys.rst:398 +#: c-api/sys.rst:487 msgid "Log the function name automatically." msgstr "" -#: c-api/sys.rst:408 +#: c-api/sys.rst:497 msgid "" "Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " -"the standard C library function ``exit(status)``. If :c:func:" -"`Py_FinalizeEx` indicates an error, the exit status is set to 120." +"the standard C library function ``exit(status)``. " +"If :c:func:`Py_FinalizeEx` indicates an error, the exit status is set to 120." msgstr "" -#: c-api/sys.rst:412 +#: c-api/sys.rst:501 msgid "Errors from finalization no longer ignored." msgstr "" -#: c-api/sys.rst:422 +#: c-api/sys.rst:511 msgid "" "Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The " "cleanup function will be called with no arguments and should return no " @@ -479,6 +601,10 @@ msgid "" "should be called by *func*." msgstr "" +#: c-api/sys.rst:521 +msgid ":c:func:`PyUnstable_AtExit` for passing a ``void *data`` argument." +msgstr "" + #~ msgid "" #~ "Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " #~ "arguments." diff --git a/c-api/threads.po b/c-api/threads.po new file mode 100644 index 000000000..3ec948651 --- /dev/null +++ b/c-api/threads.po @@ -0,0 +1,1185 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/threads.rst:6 +msgid "Thread states and the global interpreter lock" +msgstr "" + +#: c-api/threads.rst:13 +msgid "" +"Unless on a :term:`free-threaded build` of :term:`CPython`, the Python " +"interpreter is generally not thread-safe. In order to support multi-" +"threaded Python programs, there's a global lock, called the :term:`global " +"interpreter lock` or :term:`GIL`, that must be held by a thread before " +"accessing Python objects. Without the lock, even the simplest operations " +"could cause problems in a multi-threaded program: for example, when two " +"threads simultaneously increment the reference count of the same object, the " +"reference count could end up being incremented only once instead of twice." +msgstr "" + +#: c-api/threads.rst:22 +msgid "" +"As such, only a thread that holds the GIL may operate on Python objects or " +"invoke Python's C API." +msgstr "" + +#: c-api/threads.rst:27 +msgid "" +"In order to emulate concurrency, the interpreter regularly tries to switch " +"threads between bytecode instructions (see :func:`sys.setswitchinterval`). " +"This is why locks are also necessary for thread-safety in pure-Python code." +msgstr "" + +#: c-api/threads.rst:31 +msgid "" +"Additionally, the global interpreter lock is released around blocking I/O " +"operations, such as reading or writing to a file. From the C API, this is " +"done by :ref:`detaching the thread state `." +msgstr "" + +#: c-api/threads.rst:39 +msgid "" +"The Python interpreter keeps some thread-local information inside a data " +"structure called :c:type:`PyThreadState`, known as a :term:`thread state`. " +"Each thread has a thread-local pointer to a :c:type:`PyThreadState`; a " +"thread state referenced by this pointer is considered to be :term:`attached " +"`." +msgstr "" + +#: c-api/threads.rst:44 +msgid "" +"A thread can only have one :term:`attached thread state` at a time. An " +"attached thread state is typically analogous with holding the GIL, except on " +"free-threaded builds. On builds with the GIL enabled, attaching a thread " +"state will block until the GIL can be acquired. However, even on builds with " +"the GIL disabled, it is still required to have an attached thread state, as " +"the interpreter needs to keep track of which threads may access Python " +"objects." +msgstr "" + +#: c-api/threads.rst:53 +msgid "" +"Even on the free-threaded build, attaching a thread state may block, as the " +"GIL can be re-enabled or threads might be temporarily suspended (such as " +"during a garbage collection)." +msgstr "" + +#: c-api/threads.rst:57 +msgid "" +"Generally, there will always be an attached thread state when using Python's " +"C API, including during embedding and when implementing methods, so it's " +"uncommon to need to set up a thread state on your own. Only in some specific " +"cases, such as in a :c:macro:`Py_BEGIN_ALLOW_THREADS` block or in a fresh " +"thread, will the thread not have an attached thread state. If uncertain, " +"check if :c:func:`PyThreadState_GetUnchecked` returns ``NULL``." +msgstr "" + +#: c-api/threads.rst:64 +msgid "" +"If it turns out that you do need to create a thread state, it is recommended " +"to use :c:func:`PyThreadState_Ensure` " +"or :c:func:`PyThreadState_EnsureFromView`, which will manage the thread " +"state for you." +msgstr "" + +#: c-api/threads.rst:72 +msgid "Detaching the thread state from extension code" +msgstr "" + +#: c-api/threads.rst:74 +msgid "" +"Most extension code manipulating the :term:`thread state` has the following " +"simple structure::" +msgstr "" + +#: c-api/threads.rst:81 +msgid "This is so common that a pair of macros exists to simplify it::" +msgstr "" + +#: c-api/threads.rst:91 +msgid "" +"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " +"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " +"block." +msgstr "" + +#: c-api/threads.rst:95 +msgid "The block above expands to the following code::" +msgstr "" + +#: c-api/threads.rst:107 +msgid "Here is how these functions work:" +msgstr "" + +#: c-api/threads.rst:109 +msgid "" +"The attached thread state implies that the GIL is held for the interpreter. " +"To detach it, :c:func:`PyEval_SaveThread` is called and the result is stored " +"in a local variable." +msgstr "" + +#: c-api/threads.rst:113 +msgid "" +"By detaching the thread state, the GIL is released, which allows other " +"threads to attach to the interpreter and execute while the current thread " +"performs blocking I/O. When the I/O operation is complete, the old thread " +"state is reattached by calling :c:func:`PyEval_RestoreThread`, which will " +"wait until the GIL can be acquired." +msgstr "" + +#: c-api/threads.rst:120 +msgid "" +"Performing blocking I/O is the most common use case for detaching the thread " +"state, but it is also useful to call it over long-running native code that " +"doesn't need access to Python objects or Python's C API. For example, the " +"standard :mod:`zlib` and :mod:`hashlib` modules detach the :term:`thread " +"state ` when compressing or hashing data." +msgstr "" + +#: c-api/threads.rst:127 +msgid "" +"On a :term:`free-threaded build`, the :term:`GIL` is usually out of the " +"question, but **detaching the thread state is still required**, because the " +"interpreter periodically needs to block all threads to get a consistent view " +"of Python objects without the risk of race conditions. For example, CPython " +"currently suspends all threads for a short period of time while running the " +"garbage collector." +msgstr "" + +#: c-api/threads.rst:136 +msgid "" +"Detaching the thread state can lead to unexpected behavior during " +"interpreter finalization. See :ref:`cautions-regarding-runtime-finalization` " +"for more details." +msgstr "" + +#: c-api/threads.rst:142 +msgid "APIs" +msgstr "" + +#: c-api/threads.rst:144 +msgid "" +"The following macros are normally used without a trailing semicolon; look " +"for example usage in the Python source distribution." +msgstr "" + +#: c-api/threads.rst:149 +msgid "" +"These macros are still necessary on the :term:`free-threaded build` to " +"prevent deadlocks." +msgstr "" + +#: c-api/threads.rst:154 +msgid "" +"This macro expands to ``{ PyThreadState *_save; _save = " +"PyEval_SaveThread();``. Note that it contains an opening brace; it must be " +"matched with a following :c:macro:`Py_END_ALLOW_THREADS` macro. See above " +"for further discussion of this macro." +msgstr "" + +#: c-api/threads.rst:162 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " +"contains a closing brace; it must be matched with an " +"earlier :c:macro:`Py_BEGIN_ALLOW_THREADS` macro. See above for further " +"discussion of this macro." +msgstr "" + +#: c-api/threads.rst:170 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent " +"to :c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +msgstr "" + +#: c-api/threads.rst:176 +msgid "" +"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent " +"to :c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " +"declaration." +msgstr "" + +#: c-api/threads.rst:186 +msgid "Using the C API from foreign threads" +msgstr "" + +#: c-api/threads.rst:188 +msgid "" +"When threads are created using the dedicated Python APIs (such as " +"the :mod:`threading` module), a thread state is automatically associated " +"with them, However, when a thread is created from native code (for example, " +"by a third-party library with its own thread management), it doesn't hold an " +"attached thread state." +msgstr "" + +#: c-api/threads.rst:194 +msgid "" +"If you need to call Python code from these threads (often this will be part " +"of a callback API provided by the aforementioned third-party library), you " +"must first register these threads with the interpreter by creating a new " +"thread state and attaching it." +msgstr "" + +#: c-api/threads.rst:199 +msgid "" +"The easiest way to do this is through :c:func:`PyThreadState_Ensure` " +"or :c:func:`PyThreadState_EnsureFromView`." +msgstr "" + +#: c-api/threads.rst:203 +msgid "" +"These functions require an argument pointing to the desired interpreter; " +"such a pointer can be acquired via a call " +"to :c:func:`PyInterpreterGuard_FromCurrent` (for ``PyThreadState_Ensure``) " +"or :c:func:`PyInterpreterView_FromCurrent` (for " +"``PyThreadState_EnsureFromView``) from the function that creates the thread. " +"If no pointer is available (such as when the given native thread library " +"doesn't provide a data argument), :c:func:`PyInterpreterView_FromMain` can " +"be used to get a view for the main interpreter, but note that this will make " +"the code incompatible with subinterpreters." +msgstr "" + +#: c-api/threads.rst:214 +msgid "For example::" +msgstr "" + +#: c-api/threads.rst:237 +msgid "" +"Keep in mind that calling ``PyThreadState_Ensure`` might not always create a " +"new thread state, and calling ``PyThreadState_Release`` might not always " +"detach it. These functions may reuse an existing attached thread state, or " +"may re-attach a thread state that was previously attached for the current " +"thread." +msgstr "" + +#: c-api/threads.rst:243 +msgid ":pep:`788`" +msgstr "" + +#: c-api/threads.rst:248 +msgid "Attaching/detaching thread states" +msgstr "" + +#: c-api/threads.rst:252 +msgid "" +"Ensure that the thread has an attached thread state for the interpreter " +"protected by *guard*, and thus can safely invoke that interpreter." +msgstr "" + +#: c-api/threads.rst:256 +msgid "" +"It is OK to call this function if the thread already has an attached thread " +"state, as long as there is a subsequent call " +"to :c:func:`PyThreadState_Release` that matches this one (meaning that " +"\"nested\" calls to this function are permitted)." +msgstr "" + +#: c-api/threads.rst:261 +msgid "" +"The function's effect (if any) will be reversed by the matching call " +"to :c:func:`PyThreadState_Release`." +msgstr "" + +#: c-api/threads.rst:264 +msgid "" +"On error, this function returns ``NULL`` *without* an exception set. Do not " +"call :c:func:`!PyThreadState_Release` in this case." +msgstr "" + +#: c-api/threads.rst:267 +msgid "" +"On success, this function returns a pointer value that must be passed to the " +"matching call to :c:func:`!PyThreadState_Release`." +msgstr "" + +#: c-api/threads.rst:270 +msgid "" +"The conditions in which this function creates a new :term:`thread state` are " +"considered unstable and implementation-dependent. If you need to control the " +"exact lifetime of a thread state, consider " +"using :c:func:`PyThreadState_New`. However, do not avoid this function " +"solely on the basis that the lifetime of the thread state may be " +"inconsistent across versions; changes to this function will be done with " +"caution and in a backwards-compatible manner. In particular, the saving of " +"thread-local variables and similar state will be retained across Python " +"versions." +msgstr "" + +#: c-api/threads.rst:281 +msgid "" +"The exact behavior of whether this function creates a new thread state is " +"described below, but be aware that this may change in the future." +msgstr "" + +#: c-api/threads.rst:284 +msgid "" +"First, this function checks if an attached thread state is present. If there " +"is, this function then checks if the interpreter of that thread state " +"matches the interpreter guarded by *guard*. If that is the case, this " +"function simply marks the thread state as being used by a " +"``PyThreadState_Ensure`` call and returns." +msgstr "" + +#: c-api/threads.rst:290 +msgid "" +"If there is no attached thread state, then this function checks if any " +"thread state has been used by the current OS thread. (This is returned " +"by :c:func:`PyGILState_GetThisThreadState`.) If there was, then this " +"function checks if that thread state's interpreter matches *guard*. If it " +"does, it is re-attached and marked as used." +msgstr "" + +#: c-api/threads.rst:296 +msgid "" +"Otherwise, if both of the above cases fail, a new thread state is created " +"for *guard*. It is then attached and marked as owned by " +"``PyThreadState_Ensure``." +msgstr "" + +#: c-api/threads.rst:304 +msgid "Get an attached thread state for the interpreter referenced by *view*." +msgstr "" + +#: c-api/threads.rst:306 +msgid "" +"The behavior and return value are the same as " +"for :c:func:`PyThreadState_Ensure`; additionally, if the function succeeds, " +"the interpreter referenced by *view* will be implicitly guarded. The guard " +"will be released upon the corresponding :c:func:`PyThreadState_Release` call." +msgstr "" + +#: c-api/threads.rst:316 +msgid "" +"Undo a :c:func:`PyThreadState_Ensure` " +"or :c:func:`PyThreadState_EnsureFromView` call." +msgstr "" + +#: c-api/threads.rst:319 +msgid "" +"This must be called exactly once for each successful *Ensure* call, with " +"*token* set to that call's return value." +msgstr "" + +#: c-api/threads.rst:322 +msgid "" +"The state that was attached before the corresponding *Ensure* call (if any) " +"will be attached when :c:func:`PyThreadState_Release` returns." +msgstr "" + +#: c-api/threads.rst:325 +msgid "" +"The exact behavior of whether this function deletes a thread state is " +"considered unstable and implementation-dependent." +msgstr "" + +#: c-api/threads.rst:330 +msgid "" +"Currently, this function will decrement an internal counter on the attached " +"thread state. If this counter ever reaches below zero, this function emits a " +"fatal error (via :c:func:`Py_FatalError`)." +msgstr "" + +#: c-api/threads.rst:334 +msgid "" +"If the attached thread state is owned by ``PyThreadState_Ensure``, then the " +"attached thread state will be deallocated and deleted upon the internal " +"counter reaching zero. Otherwise, nothing happens when the counter reaches " +"zero." +msgstr "" + +#: c-api/threads.rst:342 +msgid "" +"An opaque token retrieved from a :c:func:`PyThreadState_Ensure` call and " +"passed to a corresponding :c:func:`PyThreadState_Release` call." +msgstr "" + +#: c-api/threads.rst:350 +msgid "GIL-state APIs" +msgstr "" + +#: c-api/threads.rst:352 +msgid "" +"The following APIs are generally not compatible with subinterpreters and " +"will hang the process during interpreter finalization (see :ref:`cautions-" +"regarding-runtime-finalization`). As such, these APIs were :term:`soft " +"deprecated` in Python 3.15 in favor of the :ref:`new APIs `." +msgstr "" + +#: c-api/threads.rst:361 +msgid "" +"The type of the value returned by :c:func:`PyGILState_Ensure` and passed " +"to :c:func:`PyGILState_Release`." +msgstr "" + +#: c-api/threads.rst:366 +msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." +msgstr "" + +#: c-api/threads.rst:370 +msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." +msgstr "" + +#: c-api/threads.rst:375 +msgid "" +"Ensure that the current thread is ready to call the Python C API regardless " +"of the current state of Python, or of the :term:`attached thread state`. " +"This may be called as many times as desired by a thread as long as each call " +"is matched with a call to :c:func:`PyGILState_Release`. In general, other " +"thread-related APIs may be used between :c:func:`PyGILState_Ensure` " +"and :c:func:`PyGILState_Release` calls as long as the thread state is " +"restored to its previous state before the Release(). For example, normal " +"usage of the :c:macro:`Py_BEGIN_ALLOW_THREADS` " +"and :c:macro:`Py_END_ALLOW_THREADS` macros is acceptable." +msgstr "" + +#: c-api/threads.rst:385 +msgid "" +"The return value is an opaque \"handle\" to the :term:`attached thread " +"state` when :c:func:`PyGILState_Ensure` was called, and must be passed " +"to :c:func:`PyGILState_Release` to ensure Python is left in the same state. " +"Even though recursive calls are allowed, these handles *cannot* be shared - " +"each unique call to :c:func:`PyGILState_Ensure` must save the handle for its " +"call to :c:func:`PyGILState_Release`." +msgstr "" + +#: c-api/threads.rst:392 +msgid "" +"When the function returns, there will be an :term:`attached thread state` " +"and the thread will be able to call arbitrary Python code." +msgstr "" + +#: c-api/threads.rst:395 +msgid "" +"This function has no way to return an error. As such, errors are either " +"fatal (that is, they send ``SIGABRT`` and crash the process; " +"see :c:func:`Py_FatalError`), or the thread will be permanently blocked " +"(such as during interpreter finalization)." +msgstr "" + +#: c-api/threads.rst:401 +msgid "" +"Calling this function when the interpreter is finalizing will infinitely " +"hang the thread, which may cause deadlocks. :ref:`cautions-regarding-runtime-" +"finalization` for more details." +msgstr "" + +#: c-api/threads.rst:405 +msgid "" +"In addition, this function generally does not work with subinterpreters when " +"used from foreign threads, because this function has no way of knowing which " +"interpreter created the thread (and as such, will implicitly pick the main " +"interpreter)." +msgstr "" + +#: c-api/threads.rst:570 c-api/threads.rst:764 +msgid "" +"Hangs the current thread, rather than terminating it, if called while the " +"interpreter is finalizing." +msgstr "" + +#: c-api/threads.rst:414 +msgid "" +"Use :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView` " +"instead." +msgstr "" + +#: c-api/threads.rst:421 +msgid "" +"Release any resources previously acquired. After this call, Python's state " +"will be the same as it was prior to the " +"corresponding :c:func:`PyGILState_Ensure` call (but generally this state " +"will be unknown to the caller, hence the use of the GIL-state API)." +msgstr "" + +#: c-api/threads.rst:426 +msgid "" +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call " +"to :c:func:`PyGILState_Release` on the same thread." +msgstr "" + +#: c-api/threads.rst:429 +msgid "Use :c:func:`PyThreadState_Release` instead." +msgstr "" + +#: c-api/threads.rst:435 +msgid "" +"Get the :term:`thread state` that was most recently :term:`attached " +"` for this thread. (If the most recent thread state " +"has been deleted, this returns ``NULL``.)" +msgstr "" + +#: c-api/threads.rst:439 +msgid "If the caller has an attached thread state, it is returned." +msgstr "" + +#: c-api/threads.rst:441 +msgid "" +"In other terms, this function returns the thread state that will be used " +"by :c:func:`PyGILState_Ensure`. If this returns ``NULL``, then " +"``PyGILState_Ensure`` will create a new thread state." +msgstr "" + +#: c-api/threads.rst:445 +msgid "This function cannot fail." +msgstr "" + +#: c-api/threads.rst:447 +msgid "" +"Use :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` " +"instead." +msgstr "" + +#: c-api/threads.rst:454 +msgid "" +"Return ``1`` if the current thread has an :term:`attached thread state` that " +"matches the thread state returned " +"by :c:func:`PyGILState_GetThisThreadState`. If the caller has no attached " +"thread state or it otherwise doesn't match, then this returns ``0``." +msgstr "" + +#: c-api/threads.rst:459 +msgid "" +"If the current Python process has ever created a subinterpreter, this " +"function will *always* return ``1``." +msgstr "" + +#: c-api/threads.rst:462 +msgid "This is mainly a helper/diagnostic function." +msgstr "" + +#: c-api/threads.rst:466 +msgid "Use ``PyThreadState_GetUnchecked() != NULL`` instead." +msgstr "" + +#: c-api/threads.rst:473 +msgid "Cautions about fork()" +msgstr "" + +#: c-api/threads.rst:475 +msgid "" +"Another important thing to note about threads is their behaviour in the face " +"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " +"process forks only the thread that issued the fork will exist. This has a " +"concrete impact both on how locks must be handled and on all stored state in " +"CPython's runtime." +msgstr "" + +#: c-api/threads.rst:481 +msgid "" +"The fact that only the \"current\" thread remains means any locks held by " +"other threads will never be released. Python solves this for :func:`os.fork` " +"by acquiring the locks it uses internally before the fork, and releasing " +"them afterwards. In addition, it resets any :ref:`lock-objects` in the " +"child. When extending or embedding Python, there is no way to inform Python " +"of additional (non-Python) locks that need to be acquired before or reset " +"after a fork. OS facilities such as :c:func:`!pthread_atfork` would need to " +"be used to accomplish the same thing. Additionally, when extending or " +"embedding Python, calling :c:func:`fork` directly rather than " +"through :func:`os.fork` (and returning to or calling into Python) may result " +"in a deadlock by one of Python's internal locks being held by a thread that " +"is defunct after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the " +"necessary locks, but is not always able to." +msgstr "" + +#: c-api/threads.rst:496 +msgid "" +"The fact that all other threads go away also means that CPython's runtime " +"state there must be cleaned up properly, which :func:`os.fork` does. This " +"means finalizing all other :c:type:`PyThreadState` objects belonging to the " +"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " +"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " +"interpreter's \"main\" thread, where the CPython global runtime was " +"originally initialized. The only exception is if :c:func:`exec` will be " +"called immediately after." +msgstr "" + +#: c-api/threads.rst:509 +msgid "High-level APIs" +msgstr "" + +#: c-api/threads.rst:511 +msgid "" +"These are the most commonly used types and functions when writing multi-" +"threaded C extensions." +msgstr "" + +#: c-api/threads.rst:517 +msgid "" +"This data structure represents the state of a single thread. The only " +"public data member is:" +msgstr "" + +#: c-api/threads.rst:522 +msgid "This thread's interpreter state." +msgstr "" + +#: c-api/threads.rst:533 +msgid "Deprecated function which does nothing." +msgstr "" + +#: c-api/threads.rst:535 +msgid "" +"In Python 3.6 and older, this function created the GIL if it didn't exist." +msgstr "" + +#: c-api/threads.rst:537 +msgid "The function now does nothing." +msgstr "" + +#: c-api/threads.rst:540 +msgid "" +"This function is now called by :c:func:`Py_Initialize()`, so you don't have " +"to call it yourself anymore." +msgstr "" + +#: c-api/threads.rst:544 +msgid "" +"This function cannot be called before :c:func:`Py_Initialize()` anymore." +msgstr "" + +#: c-api/threads.rst:554 +msgid "" +"Detach the :term:`attached thread state` and return it. The thread will have " +"no :term:`thread state` upon returning." +msgstr "" + +#: c-api/threads.rst:560 +msgid "" +"Set the :term:`attached thread state` to *tstate*. The passed :term:`thread " +"state` **should not** be :term:`attached `, otherwise " +"deadlock ensues. *tstate* will be attached upon returning." +msgstr "" + +#: c-api/threads.rst:754 +msgid "" +"Calling this function from a thread when the runtime is finalizing will hang " +"the thread until the program exits, even if the thread was not created by " +"Python. Refer to :ref:`cautions-regarding-runtime-finalization` for more " +"details." +msgstr "" + +#: c-api/threads.rst:576 +msgid "" +"Return the :term:`attached thread state`. If the thread has no attached " +"thread state, (such as when inside of :c:macro:`Py_BEGIN_ALLOW_THREADS` " +"block), then this issues a fatal error (so that the caller needn't check for " +"``NULL``)." +msgstr "" + +#: c-api/threads.rst:581 +msgid "See also :c:func:`PyThreadState_GetUnchecked`." +msgstr "" + +#: c-api/threads.rst:585 +msgid "" +"Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " +"fatal error if it is NULL. The caller is responsible to check if the result " +"is NULL." +msgstr "" + +#: c-api/threads.rst:589 +msgid "" +"In Python 3.5 to 3.12, the function was private and known as " +"``_PyThreadState_UncheckedGet()``." +msgstr "" + +#: c-api/threads.rst:596 +msgid "" +"Set the :term:`attached thread state` to *tstate*, and return " +"the :term:`thread state` that was attached prior to calling." +msgstr "" + +#: c-api/threads.rst:599 +msgid "" +"This function is safe to call without an :term:`attached thread state`; it " +"will simply return ``NULL`` indicating that there was no prior thread state." +msgstr "" + +#: c-api/threads.rst:603 +msgid ":c:func:`PyEval_ReleaseThread`" +msgstr "" + +#: c-api/threads.rst:606 +msgid "" +"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " +"if the runtime is finalizing." +msgstr "" + +#: c-api/threads.rst:611 +msgid "Low-level APIs" +msgstr "" + +#: c-api/threads.rst:615 +msgid "" +"Create a new thread state object belonging to the given interpreter object. " +"An :term:`attached thread state` is not needed." +msgstr "" + +#: c-api/threads.rst:620 +msgid "" +"Reset all information in a :term:`thread state` object. *tstate* must " +"be :term:`attached `" +msgstr "" + +#: c-api/threads.rst:623 +msgid "" +"This function now calls the :c:member:`!PyThreadState.on_delete` callback. " +"Previously, that happened in :c:func:`PyThreadState_Delete`." +msgstr "" + +#: c-api/threads.rst:627 +msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." +msgstr "" + +#: c-api/threads.rst:633 +msgid "" +"Destroy a :term:`thread state` object. *tstate* should not " +"be :term:`attached ` to any thread. *tstate* must " +"have been reset with a previous call to :c:func:`PyThreadState_Clear`." +msgstr "" + +#: c-api/threads.rst:641 +msgid "" +"Detach the :term:`attached thread state` (which must have been reset with a " +"previous call to :c:func:`PyThreadState_Clear`) and then destroy it." +msgstr "" + +#: c-api/threads.rst:644 +msgid "" +"No :term:`thread state` will be :term:`attached ` " +"upon returning." +msgstr "" + +#: c-api/threads.rst:649 +msgid "Get the current frame of the Python thread state *tstate*." +msgstr "" + +#: c-api/threads.rst:651 +msgid "" +"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " +"executing." +msgstr "" + +#: c-api/threads.rst:654 +msgid "See also :c:func:`PyEval_GetFrame`." +msgstr "" + +#: c-api/threads.rst:665 c-api/threads.rst:674 +msgid "" +"*tstate* must not be ``NULL``, and must be :term:`attached `." +msgstr "" + +#: c-api/threads.rst:663 +msgid "" +"Get the unique :term:`thread state` identifier of the Python thread state " +"*tstate*." +msgstr "" + +#: c-api/threads.rst:672 +msgid "Get the interpreter of the Python thread state *tstate*." +msgstr "" + +#: c-api/threads.rst:681 +msgid "Suspend tracing and profiling in the Python thread state *tstate*." +msgstr "" + +#: c-api/threads.rst:683 +msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." +msgstr "" + +#: c-api/threads.rst:690 +msgid "" +"Resume tracing and profiling in the Python thread state *tstate* suspended " +"by the :c:func:`PyThreadState_EnterTracing` function." +msgstr "" + +#: c-api/threads.rst:693 +msgid "" +"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." +msgstr "" + +#: c-api/threads.rst:701 +msgid "" +"Set the stack protection start address and stack protection size of a Python " +"thread state." +msgstr "" + +#: c-api/threads.rst:704 +msgid "" +"On success, return ``0``. On failure, set an exception and return ``-1``." +msgstr "" + +#: c-api/threads.rst:707 +msgid "" +"CPython implements :ref:`recursion control ` for C code by " +"raising :py:exc:`RecursionError` when it notices that the machine execution " +"stack is close to overflow. See for example " +"the :c:func:`Py_EnterRecursiveCall` function. For this, it needs to know the " +"location of the current thread's stack, which it normally gets from the " +"operating system. When the stack is changed, for example using context " +"switching techniques like the Boost library's ``boost::context``, you must " +"call :c:func:`~PyUnstable_ThreadState_SetStackProtection` to inform CPython " +"of the change." +msgstr "" + +#: c-api/threads.rst:716 +msgid "" +"Call :c:func:`~PyUnstable_ThreadState_SetStackProtection` either before or " +"after changing the stack. Do not call any other Python C API between the " +"call and the stack change." +msgstr "" + +#: c-api/threads.rst:721 +msgid "" +"See :c:func:`PyUnstable_ThreadState_ResetStackProtection` for undoing this " +"operation." +msgstr "" + +#: c-api/threads.rst:728 +msgid "" +"Reset the stack protection start address and stack protection size of a " +"Python thread state to the operating system defaults." +msgstr "" + +#: c-api/threads.rst:731 +msgid "" +"See :c:func:`PyUnstable_ThreadState_SetStackProtection` for an explanation." +msgstr "" + +#: c-api/threads.rst:738 +msgid "" +"Return a dictionary in which extensions can store thread-specific state " +"information. Each extension should use a unique key to use to store state " +"in the dictionary. It is okay to call this function when no :term:`thread " +"state` is :term:`attached `. If this function returns " +"``NULL``, no exception has been raised and the caller should assume no " +"thread state is attached." +msgstr "" + +#: c-api/threads.rst:748 +msgid "" +":term:`Attach ` *tstate* to the current thread, which " +"must not be ``NULL`` or already :term:`attached `." +msgstr "" + +#: c-api/threads.rst:751 +msgid "" +"The calling thread must not already have an :term:`attached thread state`." +msgstr "" + +#: c-api/threads.rst:759 +msgid "" +"Updated to be consistent " +"with :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " +"and :c:func:`PyGILState_Ensure`, and terminate the current thread if called " +"while the interpreter is finalizing." +msgstr "" + +#: c-api/threads.rst:768 +msgid "" +":c:func:`PyEval_RestoreThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/threads.rst:774 +msgid "" +"Detach the :term:`attached thread state`. The *tstate* argument, which must " +"not be ``NULL``, is only used to check that it represents " +"the :term:`attached thread state` --- if it isn't, a fatal error is reported." +msgstr "" + +#: c-api/threads.rst:779 +msgid "" +":c:func:`PyEval_SaveThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/threads.rst:784 +msgid "Asynchronous notifications" +msgstr "" + +#: c-api/threads.rst:786 +msgid "" +"A mechanism is provided to make asynchronous notifications to the main " +"interpreter thread. These notifications take the form of a function pointer " +"and a void pointer argument." +msgstr "" + +#: c-api/threads.rst:793 +msgid "" +"Schedule a function to be called from the main interpreter thread. On " +"success, ``0`` is returned and *func* is queued for being called in the main " +"thread. On failure, ``-1`` is returned without setting any exception." +msgstr "" + +#: c-api/threads.rst:797 +msgid "" +"When successfully queued, *func* will be *eventually* called from the main " +"interpreter thread with the argument *arg*. It will be called " +"asynchronously with respect to normally running Python code, but with both " +"these conditions met:" +msgstr "" + +#: c-api/threads.rst:802 +msgid "on a :term:`bytecode` boundary;" +msgstr "" + +#: c-api/threads.rst:803 +msgid "" +"with the main thread holding an :term:`attached thread state` (*func* can " +"therefore use the full C API)." +msgstr "" + +#: c-api/threads.rst:806 +msgid "" +"*func* must return ``0`` on success, or ``-1`` on failure with an exception " +"set. *func* won't be interrupted to perform another asynchronous " +"notification recursively, but it can still be interrupted to switch threads " +"if the :term:`thread state ` is detached." +msgstr "" + +#: c-api/threads.rst:811 +msgid "" +"This function doesn't need an :term:`attached thread state`. However, to " +"call this function in a subinterpreter, the caller must have " +"an :term:`attached thread state`. Otherwise, the function *func* can be " +"scheduled to be called from the wrong interpreter." +msgstr "" + +#: c-api/threads.rst:816 +msgid "" +"This is a low-level function, only useful for very special cases. There is " +"no guarantee that *func* will be called as quick as possible. If the main " +"thread is busy executing a system call, *func* won't be called before the " +"system call returns. This function is generally **not** suitable for " +"calling Python code from arbitrary C threads. Instead, " +"use :c:func:`PyThreadState_EnsureFromView`." +msgstr "" + +#: c-api/threads.rst:825 +msgid "" +"If this function is called in a subinterpreter, the function *func* is now " +"scheduled to be called from the subinterpreter, rather than being called " +"from the main interpreter. Each subinterpreter now has its own list of " +"scheduled calls." +msgstr "" + +#: c-api/threads.rst:831 +msgid "" +"This function now always schedules *func* to be run in the main interpreter." +msgstr "" + +#: c-api/threads.rst:838 +msgid "" +"Execute all pending calls. This is usually executed automatically by the " +"interpreter." +msgstr "" + +#: c-api/threads.rst:841 +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +#: c-api/threads.rst:844 +msgid "" +"If this is not called in the main thread of the main interpreter, this " +"function does nothing and returns ``0``. The caller must hold " +"an :term:`attached thread state`." +msgstr "" + +#: c-api/threads.rst:850 +msgid "This function only runs pending calls in the main interpreter." +msgstr "" + +#: c-api/threads.rst:856 +msgid "" +"Schedule an exception to be raised asynchronously in a thread. If the thread " +"has a previously scheduled exception, it is overwritten." +msgstr "" + +#: c-api/threads.rst:859 +msgid "" +"The *id* argument is the thread id of the target thread, as returned " +"by :c:func:`PyThread_get_thread_ident`. *exc* is the class of the exception " +"to be raised, or ``NULL`` to clear the pending exception (if any)." +msgstr "" + +#: c-api/threads.rst:864 +msgid "" +"Return the number of affected thread states. This is normally ``1`` if *id* " +"is found, even when no change was made (the given *exc* was already pending, " +"or *exc* is ``NULL`` but no exception is pending). If the thread id isn't " +"found, return ``0``. This raises no exceptions." +msgstr "" + +#: c-api/threads.rst:870 +msgid "" +"To prevent naive misuse, you must write your own C extension to call this. " +"This function must be called with an :term:`attached thread state`. This " +"function does not steal any references to *exc*. This function does not " +"necessarily interrupt system calls such as :py:func:`~time.sleep`." +msgstr "" + +#: c-api/threads.rst:876 +msgid "" +"The type of the *id* parameter changed from :c:expr:`long` " +"to :c:expr:`unsigned long`." +msgstr "" + +#: c-api/threads.rst:882 +msgid "Operating system thread APIs" +msgstr "" + +#: c-api/threads.rst:886 +msgid "Sentinel value for an invalid thread ID." +msgstr "" + +#: c-api/threads.rst:888 +msgid "This is currently equivalent to ``(unsigned long)-1``." +msgstr "" + +#: c-api/threads.rst:893 +msgid "" +"Start function *func* in a new thread with argument *arg*. The resulting " +"thread is not intended to be joined." +msgstr "" + +#: c-api/threads.rst:896 +msgid "*func* must not be ``NULL``, but *arg* may be ``NULL``." +msgstr "" + +#: c-api/threads.rst:898 +msgid "" +"On success, this function returns the identifier of the new thread; on " +"failure, this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`." +msgstr "" + +#: c-api/threads.rst:986 c-api/threads.rst:994 +msgid "The caller does not need to hold an :term:`attached thread state`." +msgstr "" + +#: c-api/threads.rst:906 +msgid "Return the identifier of the current thread, which will never be zero." +msgstr "" + +#: c-api/threads.rst:941 +msgid "" +"This function cannot fail, and the caller does not need to hold " +"an :term:`attached thread state`." +msgstr "" + +#: c-api/threads.rst:912 +msgid "" +":py:func:`threading.get_ident` and :py:attr:`threading.Thread.ident` expose " +"this identifier to Python." +msgstr "" + +#: c-api/threads.rst:918 +msgid "" +"Get general information about the current thread in the form of " +"a :ref:`struct sequence ` object. This information " +"is accessible as :py:attr:`sys.thread_info` in Python." +msgstr "" + +#: c-api/threads.rst:922 +msgid "" +"On success, this returns a new :term:`strong reference` to the thread " +"information; on failure, this returns ``NULL`` with an exception set." +msgstr "" + +#: c-api/threads.rst:925 +msgid "The caller must hold an :term:`attached thread state`." +msgstr "" + +#: c-api/threads.rst:930 +msgid "This macro is defined when the system supports native thread IDs." +msgstr "" + +#: c-api/threads.rst:935 +msgid "" +"Get the native identifier of the current thread as it was assigned by the " +"operating system's kernel, which will never be less than zero." +msgstr "" + +#: c-api/threads.rst:938 +msgid "" +"This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is " +"defined." +msgstr "" + +#: c-api/threads.rst:945 +msgid ":py:func:`threading.get_native_id`" +msgstr "" + +#: c-api/threads.rst:950 +msgid "" +"Terminate the current thread. This function is generally considered unsafe " +"and should be avoided. It is kept solely for backwards compatibility." +msgstr "" + +#: c-api/threads.rst:953 +msgid "" +"This function is only safe to call if all functions in the full call stack " +"are written to safely allow it." +msgstr "" + +#: c-api/threads.rst:958 +msgid "" +"If the current system uses POSIX threads (also known as \"pthreads\"), this " +"calls :manpage:`pthread_exit(3)`, which attempts to unwind the stack and " +"call C++ destructors on some libc implementations. However, if a " +"``noexcept`` function is reached, it may terminate the process. Other " +"systems, such as macOS, do unwinding." +msgstr "" + +#: c-api/threads.rst:964 +msgid "" +"On Windows, this function calls ``_endthreadex()``, which kills the thread " +"without calling C++ destructors." +msgstr "" + +#: c-api/threads.rst:967 +msgid "In any case, there is a risk of corruption on the thread's stack." +msgstr "" + +#: c-api/threads.rst:974 +msgid "" +"Initialize ``PyThread*`` APIs. Python executes this function automatically, " +"so there's little need to call it from an extension module." +msgstr "" + +#: c-api/threads.rst:980 +msgid "Set the stack size of the current thread to *size* bytes." +msgstr "" + +#: c-api/threads.rst:982 +msgid "" +"This function returns ``0`` on success, ``-1`` if *size* is invalid, or " +"``-2`` if the system does not support changing the stack size. This function " +"does not set exceptions." +msgstr "" + +#: c-api/threads.rst:991 +msgid "" +"Return the stack size of the current thread in bytes, or ``0`` if the " +"system's default stack size is in use." +msgstr "" diff --git a/c-api/time.po b/c-api/time.po index 7388204df..20912569b 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,70 +15,70 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/c-api/time.rst:6 +#: c-api/time.rst:6 msgid "PyTime C API" msgstr "" -#: ../Doc/c-api/time.rst:10 +#: c-api/time.rst:10 msgid "" "The clock C API provides access to system clocks. It is similar to the " "Python :mod:`time` module." msgstr "" -#: ../Doc/c-api/time.rst:13 +#: c-api/time.rst:13 msgid "" "For C API related to the :mod:`datetime` module, see :ref:`datetimeobjects`." msgstr "" -#: ../Doc/c-api/time.rst:17 +#: c-api/time.rst:17 msgid "Types" msgstr "" -#: ../Doc/c-api/time.rst:21 +#: c-api/time.rst:21 msgid "" "A timestamp or duration in nanoseconds, represented as a signed 64-bit " "integer." msgstr "" -#: ../Doc/c-api/time.rst:24 +#: c-api/time.rst:24 msgid "" -"The reference point for timestamps depends on the clock used. For example, :" -"c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch." +"The reference point for timestamps depends on the clock used. For " +"example, :c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch." msgstr "" -#: ../Doc/c-api/time.rst:27 +#: c-api/time.rst:27 msgid "" "The supported range is around [-292.3 years; +292.3 years]. Using the Unix " "epoch (January 1st, 1970) as reference, the supported date range is around " "[1677-09-21; 2262-04-11]. The exact limits are exposed as constants:" msgstr "" -#: ../Doc/c-api/time.rst:34 +#: c-api/time.rst:34 msgid "Minimum value of :c:type:`PyTime_t`." msgstr "" -#: ../Doc/c-api/time.rst:38 +#: c-api/time.rst:38 msgid "Maximum value of :c:type:`PyTime_t`." msgstr "" -#: ../Doc/c-api/time.rst:42 +#: c-api/time.rst:42 msgid "Clock Functions" msgstr "" -#: ../Doc/c-api/time.rst:44 +#: c-api/time.rst:44 msgid "" "The following functions take a pointer to a :c:expr:`PyTime_t` that they set " "to the value of a particular clock. Details of each clock are given in the " "documentation of the corresponding Python function." msgstr "" -#: ../Doc/c-api/time.rst:49 +#: c-api/time.rst:49 msgid "" "The functions return ``0`` on success, or ``-1`` (with an exception set) on " "failure." msgstr "" -#: ../Doc/c-api/time.rst:52 +#: c-api/time.rst:52 msgid "" "On integer overflow, they set the :c:data:`PyExc_OverflowError` exception " "and set ``*result`` to the value clamped to the ``[PyTime_MIN; PyTime_MAX]`` " @@ -88,79 +86,80 @@ msgid "" "misconfigured system time.)" msgstr "" -#: ../Doc/c-api/time.rst:58 +#: c-api/time.rst:58 msgid "" "As any other C API (unless otherwise specified), the functions must be " -"called with the :term:`GIL` held." +"called with an :term:`attached thread state`." msgstr "" -#: ../Doc/c-api/time.rst:63 +#: c-api/time.rst:63 msgid "" "Read the monotonic clock. See :func:`time.monotonic` for important details " "on this clock." msgstr "" -#: ../Doc/c-api/time.rst:68 +#: c-api/time.rst:68 msgid "" "Read the performance counter. See :func:`time.perf_counter` for important " "details on this clock." msgstr "" -#: ../Doc/c-api/time.rst:73 +#: c-api/time.rst:73 msgid "" "Read the “wall clock” time. See :func:`time.time` for details important on " "this clock." msgstr "" -#: ../Doc/c-api/time.rst:78 +#: c-api/time.rst:78 msgid "Raw Clock Functions" msgstr "" -#: ../Doc/c-api/time.rst:80 +#: c-api/time.rst:80 msgid "" "Similar to clock functions, but don't set an exception on error and don't " -"require the caller to hold the GIL." +"require the caller to have an :term:`attached thread state`." msgstr "" -#: ../Doc/c-api/time.rst:83 +#: c-api/time.rst:83 msgid "On success, the functions return ``0``." msgstr "" -#: ../Doc/c-api/time.rst:85 +#: c-api/time.rst:85 msgid "" "On failure, they set ``*result`` to ``0`` and return ``-1``, *without* " -"setting an exception. To get the cause of the error, acquire the GIL and " -"call the regular (non-``Raw``) function. Note that the regular function may " -"succeed after the ``Raw`` one failed." +"setting an exception. To get the cause of the error, :term:`attach ` a :term:`thread state`, and call the regular (non-``Raw``) " +"function. Note that the regular function may succeed after the ``Raw`` one " +"failed." msgstr "" -#: ../Doc/c-api/time.rst:92 +#: c-api/time.rst:92 msgid "" "Similar to :c:func:`PyTime_Monotonic`, but don't set an exception on error " -"and don't require holding the GIL." +"and don't require an :term:`attached thread state`." msgstr "" -#: ../Doc/c-api/time.rst:97 +#: c-api/time.rst:97 msgid "" "Similar to :c:func:`PyTime_PerfCounter`, but don't set an exception on error " -"and don't require holding the GIL." +"and don't require an :term:`attached thread state`." msgstr "" -#: ../Doc/c-api/time.rst:102 +#: c-api/time.rst:102 msgid "" "Similar to :c:func:`PyTime_Time`, but don't set an exception on error and " -"don't require holding the GIL." +"don't require an :term:`attached thread state`." msgstr "" -#: ../Doc/c-api/time.rst:107 +#: c-api/time.rst:107 msgid "Conversion functions" msgstr "" -#: ../Doc/c-api/time.rst:111 +#: c-api/time.rst:111 msgid "Convert a timestamp to a number of seconds as a C :c:expr:`double`." msgstr "" -#: ../Doc/c-api/time.rst:113 +#: c-api/time.rst:113 msgid "" "The function cannot fail, but note that :c:expr:`double` has limited " "accuracy for large values." diff --git a/c-api/tls.po b/c-api/tls.po new file mode 100644 index 000000000..552707c36 --- /dev/null +++ b/c-api/tls.po @@ -0,0 +1,192 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/tls.rst:6 +msgid "Thread-local storage support" +msgstr "" + +#: c-api/tls.rst:8 +msgid "" +"The Python interpreter provides low-level support for thread-local storage " +"(TLS) which wraps the underlying native TLS implementation to support the " +"Python-level thread-local storage API (:class:`threading.local`). The " +"CPython C level APIs are similar to those offered by pthreads and Windows: " +"use a thread key and functions to associate a :c:expr:`void*` value per " +"thread." +msgstr "" + +#: c-api/tls.rst:15 +msgid "" +"A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they supply their own locking." +msgstr "" + +#: c-api/tls.rst:18 +msgid "" +"Note that :file:`Python.h` does not include the declaration of the TLS APIs, " +"you need to include :file:`pythread.h` to use thread-local storage." +msgstr "" + +#: c-api/tls.rst:22 +msgid "" +"None of these API functions handle memory management on behalf of " +"the :c:expr:`void*` values. You need to allocate and deallocate them " +"yourself. If the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, " +"these functions don't do refcount operations on them either." +msgstr "" + +#: c-api/tls.rst:30 +msgid "Thread-specific storage API" +msgstr "" + +#: c-api/tls.rst:32 +msgid "" +"The thread-specific storage (TSS) API was introduced to supersede the use of " +"the existing TLS API within the CPython interpreter. This API uses a new " +"type :c:type:`Py_tss_t` instead of :c:expr:`int` to represent thread keys." +msgstr "" + +#: c-api/tls.rst:38 +msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" +msgstr "" + +#: c-api/tls.rst:43 +msgid "" +"This data structure represents the state of a thread key, the definition of " +"which may depend on the underlying TLS implementation, and it has an " +"internal field representing the key's initialization state. There are no " +"public members in this structure." +msgstr "" + +#: c-api/tls.rst:48 +msgid "" +"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " +"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." +msgstr "" + +#: c-api/tls.rst:54 +msgid "" +"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " +"that this macro won't be defined with :ref:`Py_LIMITED_API `." +msgstr "" + +#: c-api/tls.rst:59 +msgid "Dynamic allocation" +msgstr "" + +#: c-api/tls.rst:61 +msgid "" +"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " +"built with :ref:`Py_LIMITED_API `, where static allocation of this " +"type is not possible due to its implementation being opaque at build time." +msgstr "" + +#: c-api/tls.rst:68 +msgid "" +"Return a value which is the same state as a value initialized " +"with :c:macro:`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic " +"allocation failure." +msgstr "" + +#: c-api/tls.rst:75 +msgid "" +"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " +"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " +"have been unassigned. This is a no-op if the *key* argument is ``NULL``." +msgstr "" + +#: c-api/tls.rst:81 +msgid "" +"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." +msgstr "" + +#: c-api/tls.rst:86 +msgid "Methods" +msgstr "" + +#: c-api/tls.rst:88 +msgid "" +"The parameter *key* of these functions must not be ``NULL``. Moreover, the " +"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " +"undefined if the given :c:type:`Py_tss_t` has not been initialized " +"by :c:func:`PyThread_tss_create`." +msgstr "" + +#: c-api/tls.rst:96 +msgid "" +"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " +"by :c:func:`PyThread_tss_create`." +msgstr "" + +#: c-api/tls.rst:102 +msgid "" +"Return a zero value on successful initialization of a TSS key. The behavior " +"is undefined if the value pointed to by the *key* argument is not " +"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " +"repeatedly on the same key -- calling it on an already initialized key is a " +"no-op and immediately returns success." +msgstr "" + +#: c-api/tls.rst:111 +msgid "" +"Destroy a TSS key to forget the values associated with the key across all " +"threads, and change the key's initialization state to uninitialized. A " +"destroyed key is able to be initialized again " +"by :c:func:`PyThread_tss_create`. This function can be called repeatedly on " +"the same key -- calling it on an already destroyed key is a no-op." +msgstr "" + +#: c-api/tls.rst:120 +msgid "" +"Return a zero value to indicate successfully associating a :c:expr:`void*` " +"value with a TSS key in the current thread. Each thread has a distinct " +"mapping of the key to a :c:expr:`void*` value." +msgstr "" + +#: c-api/tls.rst:127 +msgid "" +"Return the :c:expr:`void*` value associated with a TSS key in the current " +"thread. This returns ``NULL`` if no value is associated with the key in the " +"current thread." +msgstr "" + +#: c-api/tls.rst:135 +msgid "Legacy APIs" +msgstr "" + +#: c-api/tls.rst:137 +msgid "" +"This API is superseded by the :ref:`thread-specific storage (TSS) API " +"`." +msgstr "" + +#: c-api/tls.rst:142 +msgid "" +"This version of the API does not support platforms where the native TLS key " +"is defined in a way that cannot be safely cast to ``int``. On such " +"platforms, :c:func:`PyThread_create_key` will return immediately with a " +"failure status, and the other TLS functions will all be no-ops on such " +"platforms." +msgstr "" + +#: c-api/tls.rst:147 +msgid "" +"Due to the compatibility problem noted above, this version of the API should " +"not be used in new code." +msgstr "" diff --git a/c-api/tuple.po b/c-api/tuple.po index dee088dd3..aecd7c5ee 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -5,45 +5,48 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-23 16:10+0200\n" +"Last-Translator: Julien Palard \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.6\n" #: c-api/tuple.rst:6 msgid "Tuple Objects" -msgstr "" +msgstr "*n*-uplets" #: c-api/tuple.rst:13 -#, fuzzy msgid "This subtype of :c:type:`PyObject` represents a Python tuple object." msgstr "" -"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." +"Ce sous-type de :c:type:`PyObject` représente un objet Python ``tuple``." #: c-api/tuple.rst:18 -#, fuzzy msgid "" "This instance of :c:type:`PyTypeObject` represents the Python tuple type; it " "is the same object as :class:`tuple` in the Python layer." msgstr "" "Cette instance de :c:type:`PyTypeObject` représente le type Python " -"*bytearray*, c'est le même que :class:`bytearray` côté Python." +"``tuple``, c'est le même que l’objet Python :class:`tuple`." #: c-api/tuple.rst:24 msgid "" "Return true if *p* is a tuple object or an instance of a subtype of the " "tuple type. This function always succeeds." msgstr "" +"Renvoie vrai si *p* est un ``tuple`` ou un instance d’un de ses sous-type. " +"Cette fonction n’échoue jamais." #: c-api/tuple.rst:30 msgid "" "Return true if *p* is a tuple object, but not an instance of a subtype of " "the tuple type. This function always succeeds." msgstr "" +"Renvoie vrai uniquement si *p* est un ``tuple``, mais pas une instance d’un " +"des sous-types. Cette fonction n’échoue jamais." #: c-api/tuple.rst:36 msgid "" @@ -53,86 +56,131 @@ msgstr "" #: c-api/tuple.rst:42 msgid "" +"Create a tuple of *size* items and copy references from *array* to the new " +"tuple." +msgstr "" + +#: c-api/tuple.rst:45 +msgid "*array* can be NULL if *size* is ``0``." +msgstr "" + +#: c-api/tuple.rst:47 +msgid "" +"On success, return a new reference. On error, set an exception and return " +"``NULL``." +msgstr "" + +#: c-api/tuple.rst:55 +msgid "" "Return a new tuple object of size *n*, or ``NULL`` with an exception set on " "failure. The tuple values are initialized to the subsequent *n* C arguments " "pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to " "``Py_BuildValue(\"(OO)\", a, b)``." msgstr "" -#: c-api/tuple.rst:50 +#: c-api/tuple.rst:63 msgid "" "Take a pointer to a tuple object, and return the size of that tuple. On " -"error, return ``-1`` and with an exception set." +"error, return ``-1`` with an exception set." msgstr "" -#: c-api/tuple.rst:56 +#: c-api/tuple.rst:69 msgid "Like :c:func:`PyTuple_Size`, but without error checking." msgstr "" -#: c-api/tuple.rst:61 +#: c-api/tuple.rst:74 msgid "" "Return the object at position *pos* in the tuple pointed to by *p*. If " -"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" -"`IndexError` exception." +"*pos* is negative or out of bounds, return ``NULL`` and set " +"an :exc:`IndexError` exception." msgstr "" +"Renvoie l’objet à la position *pos* dans le *n*-uplet *p*. Si *pos* est " +"négatif ou hors limites, ``NULL`` est renvoyé et " +"l’exception :exc:`IndexError` est levée." -#: c-api/tuple.rst:64 +#: c-api/tuple.rst:77 msgid "" "The returned reference is borrowed from the tuple *p* (that is: it is only " "valid as long as you hold a reference to *p*). To get a :term:`strong " -"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` or :c:" -"func:`PySequence_GetItem`." +"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` " +"or :c:func:`PySequence_GetItem`." msgstr "" -#: c-api/tuple.rst:73 +#: c-api/tuple.rst:86 msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." msgstr "" +"Similaire à la fonction :c:func:`PyTuple_GetItem`, mais ne contrôle pas les " +"arguments." -#: c-api/tuple.rst:78 +#: c-api/tuple.rst:91 msgid "" "Return the slice of the tuple pointed to by *p* between *low* and *high*, or " "``NULL`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:81 +#: c-api/tuple.rst:94 msgid "" "This is the equivalent of the Python expression ``p[low:high]``. Indexing " "from the end of the tuple is not supported." msgstr "" -#: c-api/tuple.rst:87 +#: c-api/tuple.rst:100 +#, fuzzy msgid "" "Insert a reference to object *o* at position *pos* of the tuple pointed to " "by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` " -"and set an :exc:`IndexError` exception." +"and set an :exc:`IndexError` exception. This function should only be used to " +"fill in brand new tuples; using it on an existing tuple is thread-unsafe." msgstr "" +"Insère une référence à l’objet *o* à la position *pos* du *n*-uplet pointé " +"par *p*. Renvoie ``0`` si l’opération réussit. Si *pos* est hors limite, " +"l’exception :exc:`IndexError` est levée et la fonction renvoie ``-1``." -#: c-api/tuple.rst:93 +#: c-api/tuple.rst:107 msgid "" "This function \"steals\" a reference to *o* and discards a reference to an " "item already in the tuple at the affected position." msgstr "" +"Cette fonction « s’accapare » une référence à l’objet *o* et dé-référence " +"l’objet présent dans le *n*-uplet à cette position." -#: c-api/tuple.rst:99 +#: c-api/tuple.rst:113 +#, fuzzy msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " -"*only* be used to fill in brand new tuples." +"*only* be used to fill in brand new tuples, using it on an existing tuple is " +"thread-unsafe." msgstr "" +"Semblable à la fonction :c:func:`PyTuple_SetItem`, mais ne contrôle pas les " +"erreurs et *ne doit être utilisée que* pour remplir un *n*-uplet " +"nouvellement créé." -#: c-api/tuple.rst:218 c-api/tuple.rst:236 +#: c-api/tuple.rst:243 c-api/tuple.rst:261 msgid "" -"Bounds checking is performed as an assertion if Python is built in :ref:" -"`debug mode ` or :option:`with assertions <--with-assertions>`." +"Bounds checking is performed as an assertion if Python is built " +"in :ref:`debug mode ` or :option:`with assertions <--with-" +"assertions>`." msgstr "" -#: c-api/tuple.rst:107 +#: c-api/tuple.rst:121 msgid "" -"This function \"steals\" a reference to *o*, and, unlike :c:func:" -"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in the tuple at position *pos* will be leaked." +"This function \"steals\" a reference to *o*, and, " +"unlike :c:func:`PyTuple_SetItem`, does *not* discard a reference to any item " +"that is being replaced; any reference in the tuple at position *pos* will be " +"leaked." msgstr "" +"Cette fonction «  s’accapare » une référence à l’objet *o* et, contrairement " +"à :c:func:`PyTuple_SetItem`, ne dé-référence **pas** l’élément remplacé : la " +"référence à l’objet présent dans le *n*-uplet à la position *pos* est perdue." -#: c-api/tuple.rst:115 +#: c-api/tuple.rst:128 +msgid "" +"This macro should *only* be used on tuples that are newly created. Using " +"this macro on a tuple that is already in use (or in other words, has a " +"refcount > 1) could lead to undefined behavior." +msgstr "" + +#: c-api/tuple.rst:135 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -143,127 +191,161 @@ msgid "" "Client code should never assume that the resulting value of ``*p`` will be " "the same as before calling this function. If the object referenced by ``*p`` " "is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` " -"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:" -"`SystemError`." -msgstr "" - -#: c-api/tuple.rst:130 +"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` " +"or :exc:`SystemError`." +msgstr "" +"Permet de redimensionner un *n*-uplet. *newsize* est la nouvelle taille de " +"ce *n*-uplet. Comme les *n*-uplets sont *supposés* être immuables cette " +"fonction doit être utilisée uniquement s’il n’existe qu’une référence vers " +"cet objet. *N’utilisez pas* cette fonction s’il est possible que le *n*-" +"uplet soit connu d’une autre partie du code. Le *n*-uplet sera toujours " +"agrandi ou réduit à partir de la fin. Cette fonction est plus performante " +"que de détruire le ``tuple`` puis d’en créer un nouveau. Renvoie ``0`` si " +"l’opération réussit. Le code ne devrait jamais supposer que la valeur de " +"``*p`` sera la même après l’appel à cette fonction. Si l’objet référencé par " +"``*p`` doit être remplacé, alors il est d’abord détruit. En cas d’erreur " +"cette fonction renvoie ``-1`` , stocke ``NULL`` dans ``*p`` et lève " +"soit :exc:`MemoryError` soit :exc:`SystemError`." + +#: c-api/tuple.rst:150 msgid "Struct Sequence Objects" +msgstr "Objets structure-séquence" + +#: c-api/tuple.rst:152 +#, fuzzy +msgid "" +"A struct sequence object is a :term:`named tuple`, that is, a sequence whose " +"items can also be accessed through attributes. It is similar " +"to :func:`collections.namedtuple`, but provides a slightly different " +"interface." msgstr "" +"Les objets *structure-séquence* sont l’équivalent C des " +"objets :func:`~collections.namedtuple`, c’est-à-dire une liste d’objets dont " +"les éléments peuvent être désignés par des attributs. Pour créer un objet " +"structure-séquence vous devez d’abord définir son type." -#: c-api/tuple.rst:132 +#: c-api/tuple.rst:157 msgid "" -"Struct sequence objects are the C equivalent of :func:`~collections." -"namedtuple` objects, i.e. a sequence whose items can also be accessed " -"through attributes. To create a struct sequence, you first have to create a " -"specific struct sequence type." +"To create a struct sequence, you first have to create a specific struct " +"sequence type." msgstr "" -#: c-api/tuple.rst:139 +#: c-api/tuple.rst:162 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " -"Instances of the resulting type can be created with :c:func:" -"`PyStructSequence_New`." +"Instances of the resulting type can be created " +"with :c:func:`PyStructSequence_New`." msgstr "" +"Crée un nouveau type d’objet *structure-séquence* à partir des données dans " +"*desc*, décrit ci-dessous. Le type ainsi créé peut être instancié en " +"appelant :c:func:`PyStructSequence_New`." -#: c-api/tuple.rst:211 +#: c-api/tuple.rst:234 msgid "Return ``NULL`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:147 +#: c-api/tuple.rst:170 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" +"Initialise un type de structure-séquence à partir de *desc*, sur place." -#: c-api/tuple.rst:152 +#: c-api/tuple.rst:175 msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" -#: c-api/tuple.rst:160 +#: c-api/tuple.rst:183 msgid "Contains the meta information of a struct sequence type to create." -msgstr "" +msgstr "Contient les méta-données d’un type structure-séquence à créer." -#: c-api/tuple.rst:164 +#: c-api/tuple.rst:187 msgid "" "Fully qualified name of the type; null-terminated UTF-8 encoded. The name " "must contain the module name." msgstr "" -#: c-api/tuple.rst:169 +#: c-api/tuple.rst:192 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:173 +#: c-api/tuple.rst:196 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: c-api/tuple.rst:177 +#: c-api/tuple.rst:200 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: c-api/tuple.rst:182 +#: c-api/tuple.rst:205 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " -"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" -"member:`~PyStructSequence_Desc.fields` array of the :c:type:" -"`PyStructSequence_Desc` determines which field of the struct sequence is " -"described." +"tuple, all fields are typed as :c:expr:`PyObject*`. The index in " +"the :c:member:`~PyStructSequence_Desc.fields` array of " +"the :c:type:`PyStructSequence_Desc` determines which field of the struct " +"sequence is described." msgstr "" -#: c-api/tuple.rst:190 +#: c-api/tuple.rst:213 msgid "" -"Name for the field or ``NULL`` to end the list of named fields, set to :c:" -"data:`PyStructSequence_UnnamedField` to leave unnamed." +"Name for the field or ``NULL`` to end the list of named fields, set " +"to :c:data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: c-api/tuple.rst:195 +#: c-api/tuple.rst:218 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: c-api/tuple.rst:200 +#: c-api/tuple.rst:223 msgid "Special value for a field name to leave it unnamed." -msgstr "" +msgstr "Une valeur sentinelle pour indiquer qu’un champ n’est pas nommé." -#: c-api/tuple.rst:202 +#: c-api/tuple.rst:225 msgid "The type was changed from ``char *``." -msgstr "" +msgstr "Le type était ``char *``." -#: c-api/tuple.rst:208 +#: c-api/tuple.rst:231 msgid "" -"Creates an instance of *type*, which must have been created with :c:func:" -"`PyStructSequence_NewType`." +"Creates an instance of *type*, which must have been created " +"with :c:func:`PyStructSequence_NewType`." msgstr "" +"Crée une instance de *type*, qui doit avoir été créé " +"via :c:func:`PyStructSequence_NewType`." -#: c-api/tuple.rst:216 +#: c-api/tuple.rst:239 msgid "" -"Return the object at position *pos* in the struct sequence pointed to by *p*." +"Return the object at position *pos* in the struct sequence pointed to by " +"*p*. The returned reference is borrowed from the struct sequence *p* (that " +"is: it is only valid as long as you hold a reference to *p*)." msgstr "" -#: c-api/tuple.rst:224 +#: c-api/tuple.rst:249 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:226 +#: c-api/tuple.rst:251 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: c-api/tuple.rst:232 +#: c-api/tuple.rst:257 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" +"Insère un l’objet *o* dans la structure-séquence *p* à la position *pos*. " +"Pour les mêmes raisons que :c:func:`PyTuple_SET_ITEM`, cette fonction ne " +"doit être utilisée que pour des objets nouvellement créés." -#: c-api/tuple.rst:241 +#: c-api/tuple.rst:266 msgid "This function \"steals\" a reference to *o*." -msgstr "" +msgstr "Cette fonction « s’accapare » une référence à *o*." -#: c-api/tuple.rst:246 +#: c-api/tuple.rst:271 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" -#: c-api/tuple.rst:248 +#: c-api/tuple.rst:273 msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 2934439f2..ed5b2d23f 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -24,8 +24,8 @@ msgstr "" #: c-api/type.rst:18 msgid "" -"This is the type object for type objects; it is the same object as :class:" -"`type` in the Python layer." +"This is the type object for type objects; it is the same object " +"as :class:`type` in the Python layer." msgstr "" #: c-api/type.rst:24 @@ -50,9 +50,9 @@ msgstr "" msgid "" "Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This " "function is primarily meant for use with ``Py_LIMITED_API``; the individual " -"flag bits are guaranteed to be stable across Python releases, but access to :" -"c:member:`~PyTypeObject.tp_flags` itself is not part of the :ref:`limited " -"API `." +"flag bits are guaranteed to be stable across Python releases, but access " +"to :c:member:`~PyTypeObject.tp_flags` itself is not part of " +"the :ref:`limited API `." msgstr "" #: c-api/type.rst:49 @@ -95,85 +95,168 @@ msgid "" "exception." msgstr "" -#: c-api/type.rst:90 +#: c-api/type.rst:85 msgid "" -"Clear watcher identified by *watcher_id* (previously returned from :c:func:" -"`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error (e.g. if " -"*watcher_id* was never registered.)" +"In free-threaded builds, :c:func:`PyType_AddWatcher` is not thread-safe, so " +"it must be called at start up (before spawning the first thread)." msgstr "" -#: c-api/type.rst:94 +#: c-api/type.rst:93 +msgid "" +"Clear watcher identified by *watcher_id* (previously returned " +"from :c:func:`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error " +"(e.g. if *watcher_id* was never registered.)" +msgstr "" + +#: c-api/type.rst:97 msgid "" "An extension should never call ``PyType_ClearWatcher`` with a *watcher_id* " -"that was not returned to it by a previous call to :c:func:" -"`PyType_AddWatcher`." +"that was not returned to it by a previous call " +"to :c:func:`PyType_AddWatcher`." msgstr "" -#: c-api/type.rst:103 +#: c-api/type.rst:106 msgid "" -"Mark *type* as watched. The callback granted *watcher_id* by :c:func:" -"`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` " -"reports a change to *type*. (The callback may be called only once for a " -"series of consecutive modifications to *type*, if :c:func:`!_PyType_Lookup` " -"is not called on *type* between the modifications; this is an implementation " -"detail and subject to change.)" +"Mark *type* as watched. The callback granted *watcher_id* " +"by :c:func:`PyType_AddWatcher` will be called " +"whenever :c:func:`PyType_Modified` reports a change to *type*. (The callback " +"may be called only once for a series of consecutive modifications to *type*, " +"if :c:func:`!_PyType_Lookup` is not called on *type* between the " +"modifications; this is an implementation detail and subject to change.)" msgstr "" -#: c-api/type.rst:110 +#: c-api/type.rst:113 +msgid "The callback is also invoked when a watched heap type is deallocated." +msgstr "" + +#: c-api/type.rst:115 msgid "" "An extension should never call ``PyType_Watch`` with a *watcher_id* that was " "not returned to it by a previous call to :c:func:`PyType_AddWatcher`." msgstr "" -#: c-api/type.rst:118 +#: c-api/type.rst:120 +msgid "" +"The callback is now also invoked when a watched heap type is deallocated." +msgstr "" + +#: c-api/type.rst:126 +msgid "" +"Mark *type* as not watched. This undoes a previous call " +"to :c:func:`PyType_Watch`. *type* must not be ``NULL``." +msgstr "" + +#: c-api/type.rst:129 +msgid "" +"An extension should never call this function with a *watcher_id* that was " +"not returned to it by a previous call to :c:func:`PyType_AddWatcher`." +msgstr "" + +#: c-api/type.rst:132 +msgid "" +"On success, this function returns ``0``. On failure, this function returns " +"``-1`` with an exception set." +msgstr "" + +#: c-api/type.rst:140 msgid "Type of a type-watcher callback function." msgstr "" -#: c-api/type.rst:120 +#: c-api/type.rst:142 msgid "" "The callback must not modify *type* or cause :c:func:`PyType_Modified` to be " "called on *type* or any type in its MRO; violating this rule could cause " "infinite recursion." msgstr "" -#: c-api/type.rst:129 +#: c-api/type.rst:146 +msgid "" +"The callback may be called during type deallocation. In this case, the type " +"object is temporarily resurrected (its reference count is at least 1) and " +"all its attributes are still valid. However, the callback should not store " +"new strong references to the type, as this would resurrect the object and " +"prevent its deallocation." +msgstr "" + +#: c-api/type.rst:154 +msgid "" +"The callback may now be called during deallocation of a watched heap type." +msgstr "" + +#: c-api/type.rst:160 msgid "" "Return non-zero if the type object *o* sets the feature *feature*. Type " "features are denoted by single bit flags." msgstr "" -#: c-api/type.rst:135 +#: c-api/type.rst:166 +msgid "" +"Return non-zero if the type object *type* sets the subclass flag *flag*. " +"Subclass flags are denoted by :c:macro:`Py_TPFLAGS_*_SUBCLASS " +"`. This function is used by many ``_Check`` " +"functions for common types." +msgstr "" + +#: c-api/type.rst:172 +msgid "" +":c:func:`PyObject_TypeCheck`, which is used as a slower alternative in " +"``_Check`` functions for types that don't come with subclass flags." +msgstr "" + +#: c-api/type.rst:178 msgid "" "Return true if the type object includes support for the cycle detector; this " "tests the type flag :c:macro:`Py_TPFLAGS_HAVE_GC`." msgstr "" -#: c-api/type.rst:141 +#: c-api/type.rst:184 msgid "Return true if *a* is a subtype of *b*." msgstr "" -#: c-api/type.rst:143 +#: c-api/type.rst:186 msgid "" -"This function only checks for actual subtypes, which means that :meth:`~type." -"__subclasscheck__` is not called on *b*. Call :c:func:`PyObject_IsSubclass` " -"to do the same check that :func:`issubclass` would do." +"This function only checks for actual subtypes, which means " +"that :meth:`~type.__subclasscheck__` is not called on *b*. " +"Call :c:func:`PyObject_IsSubclass` to do the same check " +"that :func:`issubclass` would do." msgstr "" -#: c-api/type.rst:151 +#: c-api/type.rst:194 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " -"object. Use Python's default memory allocation mechanism to allocate a new " -"instance and initialize all its contents to ``NULL``." +"object. Uses Python's default memory allocation mechanism to allocate " +"memory for a new instance, zeros the memory, then initializes the memory as " +"if by calling :c:func:`PyObject_Init` or :c:func:`PyObject_InitVar`." +msgstr "" + +#: c-api/type.rst:199 +msgid "" +"Do not call this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." msgstr "" -#: c-api/type.rst:157 +#: c-api/type.rst:202 +msgid "" +"For types that support garbage collection (i.e., " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set), this function behaves " +"like :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar` (except the " +"memory is guaranteed to be zeroed before initialization), and should be " +"paired with :c:func:`PyObject_GC_Del` in :c:member:`~PyTypeObject.tp_free`. " +"Otherwise, it behaves like :c:macro:`PyObject_New` " +"or :c:macro:`PyObject_NewVar` (except the memory is guaranteed to be zeroed " +"before initialization) and should be paired with :c:func:`PyObject_Free` " +"in :c:member:`~PyTypeObject.tp_free`." +msgstr "" + +#: c-api/type.rst:215 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " -"object. Create a new instance using the type's :c:member:`~PyTypeObject." -"tp_alloc` slot." +"object. Creates a new instance using the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot and returns the resulting " +"object." msgstr "" -#: c-api/type.rst:162 +#: c-api/type.rst:222 msgid "" "Finalize a type object. This should be called on all type objects to finish " "their initialization. This function is responsible for adding inherited " @@ -181,43 +264,43 @@ msgid "" "and sets an exception on error." msgstr "" -#: c-api/type.rst:168 +#: c-api/type.rst:228 msgid "" "If some of the base classes implements the GC protocol and the provided type " "does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " "protocol will be automatically implemented from its parents. On the " -"contrary, if the type being created does include :c:macro:" -"`Py_TPFLAGS_HAVE_GC` in its flags then it **must** implement the GC protocol " -"itself by at least implementing the :c:member:`~PyTypeObject.tp_traverse` " -"handle." +"contrary, if the type being created does " +"include :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags then it **must** " +"implement the GC protocol itself by at least implementing " +"the :c:member:`~PyTypeObject.tp_traverse` handle." msgstr "" -#: c-api/type.rst:178 +#: c-api/type.rst:239 msgid "" -"Return the type's name. Equivalent to getting the type's :attr:`~type." -"__name__` attribute." +"Return the type's name. Equivalent to getting the " +"type's :attr:`~type.__name__` attribute." msgstr "" -#: c-api/type.rst:185 +#: c-api/type.rst:247 msgid "" -"Return the type's qualified name. Equivalent to getting the type's :attr:" -"`~type.__qualname__` attribute." +"Return the type's qualified name. Equivalent to getting the " +"type's :attr:`~type.__qualname__` attribute." msgstr "" -#: c-api/type.rst:192 +#: c-api/type.rst:254 msgid "" "Return the type's fully qualified name. Equivalent to ``f\"{type.__module__}." -"{type.__qualname__}\"``, or :attr:`type.__qualname__` if :attr:`type." -"__module__` is not a string or is equal to ``\"builtins\"``." +"{type.__qualname__}\"``, or :attr:`type.__qualname__` " +"if :attr:`type.__module__` is not a string or is equal to ``\"builtins\"``." msgstr "" -#: c-api/type.rst:200 +#: c-api/type.rst:263 msgid "" -"Return the type's module name. Equivalent to getting the :attr:`type." -"__module__` attribute." +"Return the type's module name. Equivalent to getting " +"the :attr:`type.__module__` attribute." msgstr "" -#: c-api/type.rst:207 +#: c-api/type.rst:271 msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " @@ -225,395 +308,843 @@ msgid "" "result pointer into the appropriate function type." msgstr "" -#: c-api/type.rst:213 +#: c-api/type.rst:277 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: c-api/type.rst:217 +#: c-api/type.rst:281 msgid "" ":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " "limited to :ref:`heap types `." msgstr "" -#: c-api/type.rst:223 +#: c-api/type.rst:288 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/type.rst:246 +#: c-api/type.rst:355 +msgid "" +"The returned reference is :term:`borrowed ` from *type*, " +"and will be valid as long as you hold a reference to *type*. Do not release " +"it with :c:func:`Py_DECREF` or similar." +msgstr "" + +#: c-api/type.rst:316 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: c-api/type.rst:229 +#: c-api/type.rst:298 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " "not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " "intended class, and subclasses are not necessarily defined in the same " "module as their superclass. See :c:type:`PyCMethod` to get the class that " -"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when :c:" -"type:`!PyCMethod` cannot be used." +"defines the method. See :c:func:`PyType_GetModuleByToken` for cases " +"when :c:type:`!PyCMethod` cannot be used." msgstr "" -#: c-api/type.rst:242 +#: c-api/type.rst:312 msgid "" "Return the state of the module object associated with the given type. This " -"is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" -"func:`PyType_GetModule`." +"is a shortcut for calling :c:func:`PyModule_GetState()` on the result " +"of :c:func:`PyType_GetModule`." msgstr "" -#: c-api/type.rst:249 +#: c-api/type.rst:319 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: c-api/type.rst:256 +#: c-api/type.rst:327 msgid "" -"Find the first superclass whose module was created from the given :c:type:" -"`PyModuleDef` *def*, and return that module." +"Find the first superclass whose module has the given :ref:`module token `, and return that module." msgstr "" -#: c-api/type.rst:259 +#: c-api/type.rst:330 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" -#: c-api/type.rst:261 +#: c-api/type.rst:332 msgid "" -"This function is intended to be used together with :c:func:" -"`PyModule_GetState()` to get module state from slot methods (such as :c:" -"member:`~PyTypeObject.tp_init` or :c:member:`~PyNumberMethods.nb_add`) and " -"other places where a method's defining class cannot be passed using the :c:" -"type:`PyCMethod` calling convention." +"This function is intended to be used together " +"with :c:func:`PyModule_GetState()` to get module state from slot methods " +"(such as :c:member:`~PyTypeObject.tp_init` " +"or :c:member:`~PyNumberMethods.nb_add`) and other places where a method's " +"defining class cannot be passed using the :c:type:`PyCMethod` calling " +"convention." msgstr "" -#: c-api/type.rst:271 -msgid "Attempt to assign a version tag to the given type." +#: c-api/type.rst:343 +msgid "" +"Find the first superclass whose module was created from the " +"given :c:type:`PyModuleDef` *def*, or whose :ref:`module token ` is equal to *def*, and return that module." msgstr "" -#: c-api/type.rst:273 +#: c-api/type.rst:347 msgid "" -"Returns 1 if the type already had a valid version tag or a new one was " -"assigned, or 0 if a new tag could not be assigned." +"Note that modules created from a :c:type:`PyModuleDef` always have their " +"token set to the :c:type:`PyModuleDef`'s address. In other words, this " +"function is equivalent to :c:func:`PyType_GetModuleByToken`, except that it:" msgstr "" -#: c-api/type.rst:280 -msgid "Creating Heap-Allocated Types" +#: c-api/type.rst:352 +msgid "returns a borrowed reference, and" msgstr "" -#: c-api/type.rst:282 +#: c-api/type.rst:353 msgid "" -"The following functions and structs are used to create :ref:`heap types " -"`." +"has a non-``void*`` argument type (which is a cosmetic difference in C)." msgstr "" -#: c-api/type.rst:287 +#: c-api/type.rst:364 msgid "" -"Create and return a :ref:`heap type ` from the *spec* (see :c:" -"macro:`Py_TPFLAGS_HEAPTYPE`)." +"Find the first superclass in *type*'s :term:`method resolution order` " +"whose :c:macro:`Py_tp_token` token is equal to *tp_token*." msgstr "" -#: c-api/type.rst:290 +#: c-api/type.rst:367 msgid "" -"The metaclass *metaclass* is used to construct the resulting type object. " -"When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or " -"*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)." +"If found, set *\\*result* to a new :term:`strong reference` to it and return " +"``1``." msgstr "" -#: c-api/type.rst:294 +#: c-api/type.rst:369 +msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." +msgstr "" + +#: c-api/type.rst:370 msgid "" -"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " -"supported, except if ``tp_new`` is ``NULL``. (For backwards compatibility, " -"other ``PyType_From*`` functions allow such metaclasses. They ignore " -"``tp_new``, which may result in incomplete initialization. This is " -"deprecated and in Python 3.14+ such metaclasses will not be supported.)" +"On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " +"set." +msgstr "" + +#: c-api/type.rst:373 +msgid "" +"The *result* argument may be ``NULL``, in which case *\\*result* is not set. " +"Use this if you need only the return value." +msgstr "" + +#: c-api/type.rst:376 +msgid "The *tp_token* argument may not be ``NULL``." +msgstr "" + +#: c-api/type.rst:383 +msgid "Attempt to assign a version tag to the given type." +msgstr "" + +#: c-api/type.rst:385 +msgid "" +"Returns 1 if the type already had a valid version tag or a new one was " +"assigned, or 0 if a new tag could not be assigned." +msgstr "" + +#: c-api/type.rst:393 +msgid "" +"Return true if instances of *type* support creating weak references, false " +"otherwise. This function always succeeds. *type* must not be ``NULL``." +msgstr "" + +#: c-api/type.rst:397 +msgid ":ref:`weakrefobjects`" +msgstr "" + +#: c-api/type.rst:398 +msgid ":py:mod:`weakref`" +msgstr "" + +#: c-api/type.rst:404 +msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:301 +#: c-api/type.rst:406 msgid "" -"The *bases* argument can be used to specify base classes; it can either be " -"only one class or a tuple of classes. If *bases* is ``NULL``, the " -"*Py_tp_bases* slot is used instead. If that also is ``NULL``, the " -"*Py_tp_base* slot is used instead. If that also is ``NULL``, the new type " -"derives from :class:`object`." +"The following function is used to create :ref:`heap types `:" msgstr "" -#: c-api/type.rst:307 +#: c-api/type.rst:410 msgid "" -"The *module* argument can be used to record the module in which the new " -"class is defined. It must be a module object or ``NULL``. If not ``NULL``, " -"the module is associated with the new type and can later be retrieved with :" -"c:func:`PyType_GetModule`. The associated module is not inherited by " -"subclasses; it must be specified for each class individually." +"Create and return a :ref:`heap type ` from a :c:type:`!PySlot` " +"array. See :ref:`capi-slots` for general information on slots, " +"and :ref:`pyslot_type_slot_ids` for slots specific to type creation." msgstr "" -#: c-api/type.rst:314 +#: c-api/type.rst:788 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:316 +#: c-api/type.rst:417 msgid "" -"Note that this function does *not* fully match the behavior of calling :py:" -"class:`type() ` or using the :keyword:`class` statement. With user-" -"provided base types or metaclasses, prefer :ref:`calling ` :py:" -"class:`type` (or the metaclass) over ``PyType_From*`` functions. " +"Note that this function does *not* fully match the behavior of " +"calling :py:class:`type() ` or using the :keyword:`class` statement. " +"With user-provided base types or metaclasses, prefer :ref:`calling ` :py:class:`type` (or the metaclass) over ``PyType_From*`` functions. " "Specifically:" msgstr "" -#: c-api/type.rst:323 +#: c-api/type.rst:424 msgid "" ":py:meth:`~object.__new__` is not called on the new class (and it must be " "set to ``type.__new__``)." msgstr "" -#: c-api/type.rst:325 +#: c-api/type.rst:426 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" -#: c-api/type.rst:326 +#: c-api/type.rst:427 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" -#: c-api/type.rst:327 +#: c-api/type.rst:428 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -#: c-api/type.rst:333 -msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +#: c-api/type.rst:430 +msgid "" +"Slots are typically defined as a global static constant arrays. However, " +"sometimes slot values are not statically known at compile time. For example, " +"slots like :c:data:`Py_tp_bases`, :c:data:`Py_tp_metaclass` " +"and :c:data:`Py_tp_module` require live Python objects. In this case, it is " +"recommended to put such slots on the stack, and " +"use :c:macro:`Py_slot_subslots` to refer to an array of static slots. For " +"example::" msgstr "" -#: c-api/type.rst:339 +#: c-api/type.rst:454 msgid "" -"The function now accepts a single class as the *bases* argument and ``NULL`` " -"as the ``tp_doc`` slot." +"Heap types created without the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag may " +"be modified, for example by setting attributes on them, as with classes " +"defined in Python code. Sometimes, such modifications are necessary to fully " +"initialize a type, but you may wish to prevent users from changing the type " +"after the initialization is done:" msgstr "" -#: c-api/type.rst:361 +#: c-api/type.rst:463 msgid "" -"The function now finds and uses a metaclass corresponding to the provided " -"base classes. Previously, only :class:`type` instances were returned." +"Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." msgstr "" -#: c-api/type.rst:364 c-api/type.rst:380 +#: c-api/type.rst:465 +msgid "All base classes of *type* must be immutable." +msgstr "" + +#: c-api/type.rst:467 +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +#: c-api/type.rst:470 msgid "" -"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " -"may result in incomplete initialization. Creating classes whose metaclass " -"overrides :c:member:`~PyTypeObject.tp_new` is deprecated and in Python 3.14+ " -"it will be no longer allowed." +"The type must not be used before it's made immutable. For example, type " +"instances must not be created before the type is made immutable." msgstr "" -#: c-api/type.rst:355 -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +#: c-api/type.rst:479 +msgid "Type slot IDs" msgstr "" -#: c-api/type.rst:372 -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +#: c-api/type.rst:481 +msgid "" +"Most type slot IDs are named like the field names of the " +"structures :c:type:`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:type:`PyMappingMethods` " +"and :c:type:`PyAsyncMethods` with an added ``Py_`` prefix. For example, use:" msgstr "" -#: c-api/type.rst:376 +#: c-api/type.rst:487 +msgid ":c:data:`Py_tp_dealloc` to set :c:member:`PyTypeObject.tp_dealloc`" +msgstr "" + +#: c-api/type.rst:488 +msgid ":c:data:`Py_nb_add` to set :c:member:`PyNumberMethods.nb_add`" +msgstr "" + +#: c-api/type.rst:489 +msgid ":c:data:`Py_sq_length` to set :c:member:`PySequenceMethods.sq_length`" +msgstr "" + +#: c-api/type.rst:491 msgid "" -"The function now finds and uses a metaclass corresponding to the base " -"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " -"instances were returned." +"The following slots need additional considerations when specified as slots:" msgstr "" -#: c-api/type.rst:397 -msgid "Structure defining a type's behavior." +#: c-api/type.rst:493 +msgid ":c:data:`Py_tp_name`" +msgstr "" + +#: c-api/type.rst:494 +msgid ":c:data:`Py_tp_basicsize` and :c:data:`Py_tp_extra_basicsize`" msgstr "" -#: c-api/type.rst:401 -msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." +#: c-api/type.rst:495 +msgid ":c:data:`Py_tp_itemsize`" msgstr "" -#: c-api/type.rst:405 +#: c-api/type.rst:496 +msgid ":c:data:`Py_tp_flags`" +msgstr "" + +#: c-api/type.rst:498 msgid "" -"If positive, specifies the size of the instance in bytes. It is used to set :" -"c:member:`PyTypeObject.tp_basicsize`." +"Additional slots do not directly correspond to a :c:type:`!PyTypeObject` " +"struct field:" msgstr "" -#: c-api/type.rst:408 +#: c-api/type.rst:501 +msgid ":c:data:`Py_tp_token`" +msgstr "" + +#: c-api/type.rst:502 +msgid ":c:data:`Py_tp_metaclass`" +msgstr "" + +#: c-api/type.rst:503 +msgid ":c:data:`Py_tp_module`" +msgstr "" + +#: c-api/type.rst:505 msgid "" -"If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " -"inherited." +"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:411 +#: c-api/type.rst:507 msgid "" -"If negative, the absolute value specifies how much space instances of the " -"class need *in addition* to the superclass. Use :c:func:" -"`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved " -"this way." +":c:member:`~PyTypeObject.tp_weaklistoffset` " +"(use :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -#: c-api/type.rst:418 -msgid "Previously, this field could not be negative." +#: c-api/type.rst:509 +msgid "" +":c:member:`~PyTypeObject.tp_dictoffset` " +"(use :c:macro:`Py_TPFLAGS_MANAGED_DICT` instead if possible)" msgstr "" -#: c-api/type.rst:422 +#: c-api/type.rst:511 msgid "" -"Size of one element of a variable-size type, in bytes. Used to set :c:member:" -"`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats." +":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " +"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:426 +#: c-api/type.rst:514 +msgid "" +"If it is not possible to switch to a ``MANAGED`` flag (for example, for " +"vectorcall or to support Python older than 3.12), specify the offset " +"in :c:data:`Py_tp_members`. See :ref:`PyMemberDef documentation ` for details." +msgstr "" + +#: c-api/type.rst:520 +msgid "" +"The following internal fields cannot be set at all when creating a heap type:" +msgstr "" + +#: c-api/type.rst:523 +msgid "" +":c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject.tp_mro`, :c:member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, " +"and :c:member:`~PyTypeObject.tp_weaklist`." +msgstr "" + +#: c-api/type.rst:529 +msgid "" +"The :c:data:`Py_tp_base` slot is equivalent to :c:data:`Py_tp_bases`; both " +"may be set either to a type or a tuple of types. If both are specified, the " +"value of :c:data:`Py_tp_bases` is used." +msgstr "" + +#: c-api/type.rst:534 +msgid "Slot values may not be ``NULL``, except for the following:" +msgstr "" + +#: c-api/type.rst:536 +msgid ":c:data:`Py_tp_doc`" +msgstr "" + +#: c-api/type.rst:537 +msgid "" +":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " +"than ``NULL``)" +msgstr "" + +#: c-api/type.rst:540 +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +msgstr "" + +#: c-api/type.rst:543 +msgid "" +":c:member:`~PyBufferProcs.bf_getbuffer` " +"and :c:member:`~PyBufferProcs.bf_releasebuffer` are now available under " +"the :ref:`limited API `." +msgstr "" + +#: c-api/type.rst:548 +msgid "" +"The field :c:member:`~PyTypeObject.tp_vectorcall` can now be set " +"using :c:data:`Py_tp_vectorcall`. See the field's documentation for details." +msgstr "" + +#: c-api/type.rst:553 +msgid "" +"The :c:data:`Py_tp_bases` slot may be set to a single type object, making it " +"equivalent to the :c:data:`Py_tp_base` slot. Previously, a tuple of types " +"was required." +msgstr "" + +#: c-api/type.rst:558 +msgid "" +"The following slots correspond to fields in the underlying type structure, " +"but need extra remarks for use as slots:" +msgstr "" + +#: c-api/type.rst:563 +msgid "" +":c:member:`Slot ID ` for the name of the type, used to " +"set :c:member:`PyTypeObject.tp_name`." +msgstr "" + +#: c-api/type.rst:566 +msgid "This slot (or :c:func:`PyType_Spec.name`) is required to create a type." +msgstr "" + +#: c-api/type.rst:568 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.name` instead." +msgstr "" + +#: c-api/type.rst:573 +msgid "" +"CPython processes slots in order. It is recommended to put ``Py_tp_name`` at " +"the beginning of the slots array, so that if processing of a later slots " +"fails, error messages can include the name." +msgstr "" + +#: c-api/type.rst:582 +msgid "" +":c:member:`Slot ID ` for the size of the instance in bytes. It " +"is used to set :c:member:`PyTypeObject.tp_basicsize`." +msgstr "" + +#: c-api/type.rst:632 +msgid "The value must be positive." +msgstr "" + +#: c-api/type.rst:587 msgid "" -"If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " -"arbitrary variable-sized classes is dangerous, since some types use a fixed " -"offset for variable-sized memory, which can then overlap fixed-sized memory " -"used by a subclass. To help prevent mistakes, inheriting ``itemsize`` is " -"only possible in the following situations:" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.basicsize` instead." msgstr "" -#: c-api/type.rst:433 +#: c-api/type.rst:590 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. " +"Use :c:member:`PyTypeObject.tp_basicsize` instead if needed, but be aware " +"that a type's size is often considered an implementation detail." +msgstr "" + +#: c-api/type.rst:598 +msgid "" +":c:member:`Slot ID ` for type data size in bytes, that is, how " +"much space instances of the class need *in addition* to space needed for " +"superclasses." +msgstr "" + +#: c-api/type.rst:602 +msgid "" +"The value is used, together with the size of superclasses, to " +"set :c:member:`PyTypeObject.tp_basicsize`. Python will insert padding as " +"needed to meet :c:member:`!tp_basicsize`'s alignment requirements." +msgstr "" + +#: c-api/type.rst:607 +msgid "" +"Use :c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific " +"memory reserved this way." +msgstr "" + +#: c-api/type.rst:610 +msgid "" +"The value must be positive. To specify that instances need no additional " +"size (that is, size should be inherited), omit the :c:macro:`!" +"Py_tp_extra_basicsize` slot rather than set it to zero." +msgstr "" + +#: c-api/type.rst:615 +msgid "" +"Specifying both :c:macro:`Py_tp_basicsize` and :c:macro:`!" +"Py_tp_extra_basicsize` is an error." +msgstr "" + +#: c-api/type.rst:665 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. Use " +"negative :c:func:`PyType_Spec.basicsize` instead." +msgstr "" + +#: c-api/type.rst:653 +msgid "This slot may not be used with :c:func:`PyType_GetSlot`." +msgstr "" + +#: c-api/type.rst:627 +msgid "" +":c:member:`Slot ID ` for the size of one element of a variable-" +"size type, in bytes. Used to set :c:member:`PyTypeObject.tp_itemsize`. " +"See :c:member:`!tp_itemsize` documentation for caveats." +msgstr "" + +#: c-api/type.rst:634 +msgid "" +"If this slot is missing, :c:member:`~PyTypeObject.tp_itemsize` is inherited. " +"Extending arbitrary variable-sized classes is dangerous, since some types " +"use a fixed offset for variable-sized memory, which can then overlap fixed-" +"sized memory used by a subclass. To help prevent mistakes, inheriting " +"``itemsize`` is only possible in the following situations:" +msgstr "" + +#: c-api/type.rst:641 msgid "" "The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." msgstr "" -#: c-api/type.rst:435 +#: c-api/type.rst:643 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " "the memory layout of the base class is known." msgstr "" -#: c-api/type.rst:437 +#: c-api/type.rst:645 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " "subclass does not access the instance's memory directly." msgstr "" -#: c-api/type.rst:440 +#: c-api/type.rst:648 msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" -#: c-api/type.rst:444 -msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." +#: c-api/type.rst:650 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_Spec.itemsize` instead." msgstr "" -#: c-api/type.rst:446 +#: c-api/type.rst:659 msgid "" -"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" -"`PyType_FromSpecWithBases` sets it automatically." +":c:member:`Slot ID ` for type flags, used to " +"set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:451 +#: c-api/type.rst:662 msgid "" -"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " -"value ``{0, NULL}``." +"The ``Py_TPFLAGS_HEAPTYPE`` flag is not " +"set, :c:func:`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:454 -msgid "Each slot ID should be specified at most once." +#: c-api/type.rst:668 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. " +"Use :c:func:`PyType_GetFlags` instead." msgstr "" -#: c-api/type.rst:464 +#: c-api/type.rst:673 msgid "" -"Structure defining optional functionality of a type, containing a slot ID " -"and a value pointer." +"The following slots do not correspond to public fields in the underlying " +"structures:" msgstr "" -#: c-api/type.rst:469 -msgid "A slot ID." +#: c-api/type.rst:678 +msgid "" +":c:member:`Slot ID ` for the metaclass used to construct the " +"resulting type object. When omitted the metaclass is derived from bases " +"(:c:macro:`Py_tp_bases` or the *bases* argument " +"of :c:func:`PyType_FromMetaclass`)." msgstr "" -#: c-api/type.rst:471 +#: c-api/type.rst:684 msgid "" -"Slot IDs are named like the field names of the structures :c:type:" -"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" -"type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` " -"prefix. For example, use:" +"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " +"supported, except if ``tp_new`` is ``NULL``." msgstr "" -#: c-api/type.rst:477 -msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" +#: c-api/type.rst:687 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_FromMetaclass` to specify a metaclass with :c:type:`!" +"PyType_Spec`." msgstr "" -#: c-api/type.rst:478 -msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" +#: c-api/type.rst:691 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. " +"Use :c:func:`Py_TYPE` on the type object instead." msgstr "" -#: c-api/type.rst:479 -msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" +#: c-api/type.rst:698 +msgid "" +":c:member:`Slot ID ` for recording the module in which the new " +"class is defined." msgstr "" -#: c-api/type.rst:481 +#: c-api/type.rst:701 msgid "" -"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" +"The value must be a module object. The module is associated with the new " +"type and can later be retrieved with :c:func:`PyType_GetModule`. The " +"associated module is not inherited by subclasses; it must be specified for " +"each class individually." msgstr "" -#: c-api/type.rst:483 +#: c-api/type.rst:707 msgid "" -":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" -"`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" +"This may not be used in :c:member:`PyType_Spec.slots`. " +"Use :c:func:`PyType_FromMetaclass` to specify a module with :c:type:`!" +"PyType_Spec`." msgstr "" -#: c-api/type.rst:485 +#: c-api/type.rst:711 msgid "" -":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" -"`Py_TPFLAGS_MANAGED_DICT` instead if possible)" +"This slot may not be used with :c:func:`PyType_GetSlot`. " +"Use :c:func:`PyType_GetModule` instead." msgstr "" -#: c-api/type.rst:487 +#: c-api/type.rst:718 msgid "" -":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " -"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" +":c:member:`Slot ID ` for recording a static memory layout ID " +"for a class." msgstr "" -#: c-api/type.rst:491 +#: c-api/type.rst:721 msgid "" -"If it is not possible to switch to a ``MANAGED`` flag (for example, for " -"vectorcall or to support Python older than 3.12), specify the offset in :c:" -"member:`Py_tp_members `. See :ref:`PyMemberDef " -"documentation ` for details." +"If the class is defined using a :c:type:`PyType_Spec`, and that spec is " +"statically allocated, the token can be set to the spec using the special " +"value :c:data:`Py_TP_USE_SPEC`:" msgstr "" -#: c-api/type.rst:497 -msgid "The following fields cannot be set at all when creating a heap type:" +#: c-api/type.rst:730 +msgid "It can also be set to an arbitrary pointer, but you must ensure that:" msgstr "" -#: c-api/type.rst:499 +#: c-api/type.rst:732 msgid "" -":c:member:`~PyTypeObject.tp_vectorcall` (use :c:member:`~PyTypeObject." -"tp_new` and/or :c:member:`~PyTypeObject.tp_init`)" +"The pointer outlives the class, so it's not reused for something else while " +"the class exists." msgstr "" -#: c-api/type.rst:503 +#: c-api/type.rst:734 msgid "" -"Internal fields: :c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject." -"tp_mro`, :c:member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject." -"tp_subclasses`, and :c:member:`~PyTypeObject.tp_weaklist`." +"It \"belongs\" to the extension module where the class lives, so it will not " +"clash with other extensions." msgstr "" -#: c-api/type.rst:510 +#: c-api/type.rst:737 msgid "" -"Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " -"some platforms. To avoid issues, use the *bases* argument of :c:func:" -"`PyType_FromSpecWithBases` instead." +"Use :c:func:`PyType_GetBaseByToken` to check if a class's superclass has a " +"given token -- that is, check whether the memory layout is compatible." msgstr "" -#: c-api/type.rst:517 -msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +#: c-api/type.rst:740 +msgid "" +"To get the token for a given class (without considering superclasses), " +"use :c:func:`PyType_GetSlot` with ``Py_tp_token``." msgstr "" -#: c-api/type.rst:519 +#: c-api/type.rst:749 msgid "" -":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." -"bf_releasebuffer` are now available under the :ref:`limited API `." +"Used as a value with :c:data:`Py_tp_token` to set the token to the " +"class's :c:type:`PyType_Spec`. May only be used for classes defined " +"using :c:type:`!PyType_Spec`." +msgstr "" + +#: c-api/type.rst:753 +msgid "Expands to ``NULL``." msgstr "" -#: c-api/type.rst:526 +#: c-api/type.rst:759 msgid "" -"The desired value of the slot. In most cases, this is a pointer to a " -"function." +":c:member:`Slot ID ` that works " +"like :c:macro:`Py_slot_subslots`, except it specifies an array " +"of :c:type:`PyType_Slot` structures." msgstr "" -#: c-api/type.rst:529 -msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``." +#: c-api/type.rst:767 +msgid "Soft-deprecated API" +msgstr "" + +#: c-api/type.rst:769 +msgid "" +"The following functions are :term:`soft deprecated`. They will continue to " +"work, but new features will be added as slots " +"for :c:func:`PyType_FromSlots`, not as arguments to new ``PyType_From*`` " +"functions." +msgstr "" + +#: c-api/type.rst:775 +msgid "" +"Create and return a :ref:`heap type ` from the *spec* " +"(see :c:macro:`Py_TPFLAGS_HEAPTYPE`)." +msgstr "" + +#: c-api/type.rst:778 +msgid "" +"A non-``NULL`` *metaclass* argument corresponds to " +"the :c:macro:`Py_tp_metaclass` slot." +msgstr "" + +#: c-api/type.rst:781 +msgid "" +"A non-``NULL`` *bases* argument corresponds to the :c:data:`Py_tp_bases` " +"slot, and takes precedence over :c:data:`Py_tp_bases` " +"and :c:data:`Py_tp_bases` slots." +msgstr "" + +#: c-api/type.rst:785 +msgid "" +"A non-``NULL`` *module* argument corresponds to the :c:macro:`Py_tp_module` " +"slot." +msgstr "" + +#: c-api/type.rst:790 +msgid "" +"Note that this function does *not* fully match the behavior of " +"calling :py:class:`type() ` or using the :keyword:`class` statement. " +"See the note in :c:func:`PyType_FromSlots` documentation for details." +msgstr "" + +#: c-api/type.rst:829 c-api/type.rst:880 +msgid "Prefer :c:func:`PyType_FromSlots` in new code." +msgstr "" + +#: c-api/type.rst:803 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +msgstr "" + +#: c-api/type.rst:809 +msgid "" +"The function now accepts a single class as the *bases* argument and ``NULL`` " +"as the ``tp_doc`` slot." +msgstr "" + +#: c-api/type.rst:840 +msgid "" +"The function now finds and uses a metaclass corresponding to the provided " +"base classes. Previously, only :class:`type` instances were returned." +msgstr "" + +#: c-api/type.rst:843 c-api/type.rst:868 +msgid "" +"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " +"may result in incomplete initialization. Creating classes whose metaclass " +"overrides :c:member:`~PyTypeObject.tp_new` is deprecated." +msgstr "" + +#: c-api/type.rst:850 c-api/type.rst:875 +msgid "" +"Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " +"is no longer allowed." +msgstr "" + +#: c-api/type.rst:834 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +msgstr "" + +#: c-api/type.rst:860 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +msgstr "" + +#: c-api/type.rst:864 +msgid "" +"The function now finds and uses a metaclass corresponding to the base " +"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " +"instances were returned." +msgstr "" + +#: c-api/type.rst:893 +msgid "" +"Structure defining a type's behavior, used for soft-deprecated functions " +"like :c:func:`PyType_FromMetaclass`." +msgstr "" + +#: c-api/type.rst:896 +msgid "" +"This structure contains several members that can instead be specified " +"as :ref:`slots ` for :c:func:`PyType_FromSlots`, and " +"an array of slot entries with a simpler structure." +msgstr "" + +#: c-api/type.rst:902 +msgid "Corresponds to :c:macro:`Py_tp_name`." +msgstr "" + +#: c-api/type.rst:906 +msgid "If positive, corresponds to :c:macro:`Py_tp_basicsize`." +msgstr "" + +#: c-api/type.rst:908 +msgid "" +"If negative, corresponds to :c:macro:`Py_tp_extra_basicsize` set to the " +"absolute value." +msgstr "" + +#: c-api/type.rst:913 +msgid "Previously, this field could not be negative." +msgstr "" + +#: c-api/type.rst:917 +msgid "Corresponds to :c:macro:`Py_tp_itemsize`." +msgstr "" + +#: c-api/type.rst:921 +msgid "Corresponds to :c:macro:`Py_tp_flags`." +msgstr "" + +#: c-api/type.rst:925 +msgid "Array of :c:type:`PyType_Slot` (not :c:type:`PySlot`) structures." +msgstr "" + +#: c-api/type.rst:927 +msgid "" +"Terminated by the special slot value ``{0, NULL}``. Each slot ID should be " +"specified at most once." +msgstr "" + +#: c-api/type.rst:940 +msgid "" +"Structure defining optional functionality of a type, used for soft-" +"deprecated functions like :c:func:`PyType_FromMetaclass`." +msgstr "" + +#: c-api/type.rst:943 +msgid "" +"Note that a :c:type:`!PyType_Slot` array may be included in a :c:type:`!" +"PySlot` array using :c:macro:`Py_tp_slots`, and vice versa " +"using :c:macro:`Py_slot_subslots`." +msgstr "" + +#: c-api/type.rst:947 +msgid "" +"Each :c:type:`!PyType_Slot` structure ``tpslot`` is interpreted as the " +"following :c:type:`PySlot` structure::" +msgstr "" + +#: c-api/type.rst:956 +msgid "" +"where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag " +"(such as for :c:macro:`Py_tp_methods`), or if this flag is present on the " +"\"parent\" :c:macro:`!Py_tp_slots` slot (if any)." +msgstr "" + +#: c-api/type.rst:962 +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "" + +#: c-api/type.rst:966 +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." msgstr "" #~ msgid "object" diff --git a/c-api/typehints.po b/c-api/typehints.po index 3f21b2ca7..b70ae2139 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -30,14 +30,14 @@ msgid "" "Create a :ref:`GenericAlias ` object. Equivalent to " "calling the Python class :class:`types.GenericAlias`. The *origin* and " "*args* arguments set the ``GenericAlias``\\ 's ``__origin__`` and " -"``__args__`` attributes respectively. *origin* should be a :c:expr:" -"`PyTypeObject*`, and *args* can be a :c:expr:`PyTupleObject*` or any " -"``PyObject*``. If *args* passed is not a tuple, a 1-tuple is automatically " -"constructed and ``__args__`` is set to ``(args,)``. Minimal checking is done " -"for the arguments, so the function will succeed even if *origin* is not a " -"type. The ``GenericAlias``\\ 's ``__parameters__`` attribute is constructed " -"lazily from ``__args__``. On failure, an exception is raised and ``NULL`` " -"is returned." +"``__args__`` attributes respectively. *origin* should be " +"a :c:expr:`PyTypeObject*`, and *args* can be a :c:expr:`PyTupleObject*` or " +"any ``PyObject*``. If *args* passed is not a tuple, a 1-tuple is " +"automatically constructed and ``__args__`` is set to ``(args,)``. Minimal " +"checking is done for the arguments, so the function will succeed even if " +"*origin* is not a type. The ``GenericAlias``\\ 's ``__parameters__`` " +"attribute is constructed lazily from ``__args__``. On failure, an exception " +"is raised and ``NULL`` is returned." msgstr "" #: c-api/typehints.rst:28 diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 7b0752b33..74639ba91 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -15,7 +15,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/typeobj.rst:6 -msgid "Type Objects" +#, fuzzy +msgid "Type Object Structures" msgstr "Objets type" #: c-api/typeobj.rst:8 @@ -42,8 +43,8 @@ msgstr "" #: c-api/typeobj.rst:23 msgid "" "In addition to the following quick reference, the :ref:`typedef-examples` " -"section provides at-a-glance insight into the meaning and use of :c:type:" -"`PyTypeObject`." +"section provides at-a-glance insight into the meaning and use " +"of :c:type:`PyTypeObject`." msgstr "" #: c-api/typeobj.rst:29 @@ -90,7 +91,7 @@ msgstr "" msgid " :c:member:`~PyTypeObject.tp_name`" msgstr "" -#: c-api/typeobj.rst:44 c-api/typeobj.rst:86 +#: c-api/typeobj.rst:86 c-api/typeobj.rst:377 msgid "const char *" msgstr "" @@ -111,8 +112,8 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_basicsize`" msgstr "" -#: c-api/typeobj.rst:46 c-api/typeobj.rst:52 c-api/typeobj.rst:120 -#: c-api/typeobj.rst:416 +#: c-api/typeobj.rst:48 c-api/typeobj.rst:99 c-api/typeobj.rst:343 +#: c-api/typeobj.rst:448 c-api/typeobj.rst:453 msgid ":c:type:`Py_ssize_t`" msgstr "" @@ -124,7 +125,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/typeobj.rst:142 c-api/typeobj.rst:346 +#: c-api/typeobj.rst:142 c-api/typeobj.rst:347 msgid ":c:type:`destructor`" msgstr "" @@ -136,7 +137,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_getattr`)" msgstr "" -#: c-api/typeobj.rst:370 +#: c-api/typeobj.rst:371 msgid ":c:type:`getattrfunc`" msgstr "" @@ -153,7 +154,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_setattr`)" msgstr "" -#: c-api/typeobj.rst:375 +#: c-api/typeobj.rst:376 msgid ":c:type:`setattrfunc`" msgstr "" @@ -169,7 +170,7 @@ msgstr "" msgid ":c:type:`PyAsyncMethods` *" msgstr "" -#: c-api/typeobj.rst:64 c-api/typeobj.rst:68 +#: c-api/typeobj.rst:64 c-api/typeobj.rst:68 c-api/typeobj.rst:82 msgid ":ref:`sub-slots`" msgstr ":ref:`sub-slots`" @@ -181,7 +182,7 @@ msgstr "%" msgid ":c:member:`~PyTypeObject.tp_repr`" msgstr "" -#: c-api/typeobj.rst:74 c-api/typeobj.rst:368 +#: c-api/typeobj.rst:74 c-api/typeobj.rst:369 msgid ":c:type:`reprfunc`" msgstr "" @@ -217,7 +218,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_hash`" msgstr "" -#: c-api/typeobj.rst:404 +#: c-api/typeobj.rst:405 msgid ":c:type:`hashfunc`" msgstr "" @@ -229,7 +230,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_call`" msgstr "" -#: c-api/typeobj.rst:237 c-api/typeobj.rst:440 +#: c-api/typeobj.rst:237 c-api/typeobj.rst:441 msgid ":c:type:`ternaryfunc`" msgstr "" @@ -249,7 +250,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: c-api/typeobj.rst:381 +#: c-api/typeobj.rst:382 msgid ":c:type:`getattrofunc`" msgstr "" @@ -257,7 +258,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: c-api/typeobj.rst:386 +#: c-api/typeobj.rst:387 msgid ":c:type:`setattrofunc`" msgstr "" @@ -294,7 +295,7 @@ msgstr "__doc__" msgid ":c:member:`~PyTypeObject.tp_traverse`" msgstr "" -#: c-api/typeobj.rst:350 +#: c-api/typeobj.rst:351 msgid ":c:type:`traverseproc`" msgstr "" @@ -302,7 +303,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: c-api/typeobj.rst:130 c-api/typeobj.rst:429 +#: c-api/typeobj.rst:130 c-api/typeobj.rst:430 msgid ":c:type:`inquiry`" msgstr "" @@ -310,7 +311,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:406 +#: c-api/typeobj.rst:407 msgid ":c:type:`richcmpfunc`" msgstr "" @@ -326,7 +327,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iter`" msgstr "" -#: c-api/typeobj.rst:412 +#: c-api/typeobj.rst:413 msgid ":c:type:`getiterfunc`" msgstr "" @@ -338,7 +339,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iternext`" msgstr "" -#: c-api/typeobj.rst:414 +#: c-api/typeobj.rst:415 msgid ":c:type:`iternextfunc`" msgstr "" @@ -374,7 +375,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_base`" msgstr "" -#: c-api/typeobj.rst:111 +#: c-api/typeobj.rst:342 c-api/typeobj.rst:357 msgid ":c:type:`PyTypeObject` *" msgstr "" @@ -386,10 +387,15 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" -#: c-api/typeobj.rst:113 c-api/typeobj.rst:134 c-api/typeobj.rst:140 -#: c-api/typeobj.rst:346 c-api/typeobj.rst:368 c-api/typeobj.rst:381 -#: c-api/typeobj.rst:404 c-api/typeobj.rst:412 c-api/typeobj.rst:416 -#: c-api/typeobj.rst:431 c-api/typeobj.rst:440 c-api/typeobj.rst:446 +#: c-api/typeobj.rst:132 c-api/typeobj.rst:136 c-api/typeobj.rst:342 +#: c-api/typeobj.rst:351 c-api/typeobj.rst:358 c-api/typeobj.rst:363 +#: c-api/typeobj.rst:365 c-api/typeobj.rst:371 c-api/typeobj.rst:378 +#: c-api/typeobj.rst:383 c-api/typeobj.rst:388 c-api/typeobj.rst:393 +#: c-api/typeobj.rst:395 c-api/typeobj.rst:400 c-api/typeobj.rst:405 +#: c-api/typeobj.rst:408 c-api/typeobj.rst:415 c-api/typeobj.rst:419 +#: c-api/typeobj.rst:430 c-api/typeobj.rst:436 c-api/typeobj.rst:441 +#: c-api/typeobj.rst:443 c-api/typeobj.rst:452 c-api/typeobj.rst:458 +#: c-api/typeobj.rst:463 c-api/typeobj.rst:465 msgid ":c:type:`PyObject` *" msgstr "" @@ -401,7 +407,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_get`" msgstr "" -#: c-api/typeobj.rst:392 +#: c-api/typeobj.rst:393 msgid ":c:type:`descrgetfunc`" msgstr "" @@ -413,7 +419,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_set`" msgstr "" -#: c-api/typeobj.rst:398 +#: c-api/typeobj.rst:399 msgid ":c:type:`descrsetfunc`" msgstr "" @@ -429,7 +435,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_init`" msgstr "" -#: c-api/typeobj.rst:362 +#: c-api/typeobj.rst:363 msgid ":c:type:`initproc`" msgstr "" @@ -441,7 +447,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" -#: c-api/typeobj.rst:341 +#: c-api/typeobj.rst:342 msgid ":c:type:`allocfunc`" msgstr "" @@ -449,7 +455,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_new`" msgstr "" -#: c-api/typeobj.rst:356 +#: c-api/typeobj.rst:357 msgid ":c:type:`newfunc`" msgstr "" @@ -461,7 +467,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: c-api/typeobj.rst:348 +#: c-api/typeobj.rst:349 msgid ":c:type:`freefunc`" msgstr "" @@ -497,7 +503,7 @@ msgstr "" msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" msgstr "" -#: c-api/typeobj.rst:138 c-api/typeobj.rst:348 +#: c-api/typeobj.rst:279 c-api/typeobj.rst:353 msgid "void *" msgstr "" @@ -610,7 +616,7 @@ msgid ":c:member:`~PyAsyncMethods.am_await`" msgstr "" #: c-api/typeobj.rst:206 c-api/typeobj.rst:242 c-api/typeobj.rst:246 -#: c-api/typeobj.rst:277 c-api/typeobj.rst:291 c-api/typeobj.rst:431 +#: c-api/typeobj.rst:277 c-api/typeobj.rst:291 c-api/typeobj.rst:432 msgid ":c:type:`unaryfunc`" msgstr "" @@ -650,7 +656,7 @@ msgstr "" #: c-api/typeobj.rst:232 c-api/typeobj.rst:252 c-api/typeobj.rst:257 #: c-api/typeobj.rst:262 c-api/typeobj.rst:267 c-api/typeobj.rst:272 #: c-api/typeobj.rst:283 c-api/typeobj.rst:287 c-api/typeobj.rst:293 -#: c-api/typeobj.rst:302 c-api/typeobj.rst:322 c-api/typeobj.rst:435 +#: c-api/typeobj.rst:302 c-api/typeobj.rst:322 c-api/typeobj.rst:436 msgid ":c:type:`binaryfunc`" msgstr "" @@ -938,7 +944,7 @@ msgstr "" msgid ":c:member:`~PyMappingMethods.mp_length`" msgstr "" -#: c-api/typeobj.rst:309 c-api/typeobj.rst:416 +#: c-api/typeobj.rst:309 c-api/typeobj.rst:417 msgid ":c:type:`lenfunc`" msgstr "" @@ -958,7 +964,7 @@ msgstr "" msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" msgstr "" -#: c-api/typeobj.rst:462 +#: c-api/typeobj.rst:463 msgid ":c:type:`objobjargproc`" msgstr "" @@ -982,7 +988,7 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_repeat`" msgstr "" -#: c-api/typeobj.rst:315 c-api/typeobj.rst:446 +#: c-api/typeobj.rst:315 c-api/typeobj.rst:447 msgid ":c:type:`ssizeargfunc`" msgstr "" @@ -998,7 +1004,7 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_ass_item`" msgstr "" -#: c-api/typeobj.rst:451 +#: c-api/typeobj.rst:452 msgid ":c:type:`ssizeobjargproc`" msgstr "" @@ -1010,7 +1016,7 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_contains`" msgstr "" -#: c-api/typeobj.rst:457 +#: c-api/typeobj.rst:458 msgid ":c:type:`objobjproc`" msgstr "" @@ -1034,6 +1040,10 @@ msgstr "" msgid ":c:func:`getbufferproc`" msgstr "" +#: c-api/typeobj.rst:328 +msgid "__buffer__" +msgstr "" + #: c-api/typeobj.rst:330 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" @@ -1042,110 +1052,123 @@ msgstr "" msgid ":c:func:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:336 +#: c-api/typeobj.rst:330 +msgid "__release_ buffer\\__" +msgstr "" + +#: c-api/typeobj.rst:337 msgid "slot typedefs" msgstr "" -#: c-api/typeobj.rst:339 +#: c-api/typeobj.rst:340 msgid "typedef" msgstr "" -#: c-api/typeobj.rst:339 +#: c-api/typeobj.rst:340 msgid "Parameter Types" msgstr "" -#: c-api/typeobj.rst:339 +#: c-api/typeobj.rst:340 msgid "Return Type" msgstr "" -#: c-api/typeobj.rst:348 c-api/typeobj.rst:424 +#: c-api/typeobj.rst:349 c-api/typeobj.rst:425 msgid "void" msgstr "" -#: c-api/typeobj.rst:0 +#: c-api/typeobj.rst:352 msgid ":c:type:`visitproc`" msgstr "" -#: c-api/typeobj.rst:350 c-api/typeobj.rst:375 c-api/typeobj.rst:398 -#: c-api/typeobj.rst:429 c-api/typeobj.rst:457 c-api/typeobj.rst:462 +#: c-api/typeobj.rst:363 c-api/typeobj.rst:387 c-api/typeobj.rst:409 +#: c-api/typeobj.rst:421 c-api/typeobj.rst:452 c-api/typeobj.rst:463 msgid "int" msgstr "*int*" -#: c-api/typeobj.rst:404 +#: c-api/typeobj.rst:405 msgid "Py_hash_t" msgstr "" -#: c-api/typeobj.rst:418 +#: c-api/typeobj.rst:419 msgid ":c:type:`getbufferproc`" msgstr "" -#: c-api/typeobj.rst:0 +#: c-api/typeobj.rst:426 msgid ":c:type:`Py_buffer` *" msgstr "" -#: c-api/typeobj.rst:424 +#: c-api/typeobj.rst:425 msgid ":c:type:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:469 +#: c-api/typeobj.rst:470 msgid "See :ref:`slot-typedefs` below for more detail." msgstr "" -#: c-api/typeobj.rst:473 +#: c-api/typeobj.rst:474 msgid "PyTypeObject Definition" msgstr "" -#: c-api/typeobj.rst:475 +#: c-api/typeobj.rst:476 msgid "" -"The structure definition for :c:type:`PyTypeObject` can be found in :file:" -"`Include/object.h`. For convenience of reference, this repeats the " -"definition found there:" +"The structure definition for :c:type:`PyTypeObject` can be found " +"in :file:`Include/cpython/object.h`. For convenience of reference, this " +"repeats the definition found there:" msgstr "" -#: c-api/typeobj.rst:485 +#: c-api/typeobj.rst:486 #, fuzzy msgid "PyObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:487 +#: c-api/typeobj.rst:488 msgid "" -"The type object structure extends the :c:type:`PyVarObject` structure. The :" -"c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :" -"c:func:`!type_new`, usually called from a class statement). Note that :c:" -"data:`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject." -"tp_itemsize`, which means that its instances (i.e. type objects) *must* have " +"The type object structure extends the :c:type:`PyVarObject` structure. " +"The :c:member:`~PyVarObject.ob_size` field is used for dynamic types " +"(created by :c:func:`!type_new`, usually called from a class statement). " +"Note that :c:data:`PyType_Type` (the metatype) " +"initializes :c:member:`~PyTypeObject.tp_itemsize`, which means that its " +"instances (i.e. type objects) *must* have " "the :c:member:`~PyVarObject.ob_size` field." msgstr "" -#: c-api/typeobj.rst:496 +#: c-api/typeobj.rst:495 +msgid ":c:member:`PyObject.ob_refcnt`" +msgstr "" + +#: c-api/typeobj.rst:497 msgid "" -"This is the type object's reference count, initialized to ``1`` by the " +"The type object's reference count is initialized to ``1`` by the " "``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " -"objects `, the type's instances (objects whose :c:member:" -"`~PyObject.ob_type` points back to the type) do *not* count as references. " -"But for :ref:`dynamically allocated type objects `, the " -"instances *do* count as references." -msgstr "" - -#: c-api/typeobj.rst:526 c-api/typeobj.rst:584 c-api/typeobj.rst:699 -#: c-api/typeobj.rst:757 c-api/typeobj.rst:792 c-api/typeobj.rst:833 -#: c-api/typeobj.rst:857 c-api/typeobj.rst:912 c-api/typeobj.rst:953 -#: c-api/typeobj.rst:998 c-api/typeobj.rst:1053 c-api/typeobj.rst:1074 -#: c-api/typeobj.rst:1098 c-api/typeobj.rst:1139 c-api/typeobj.rst:1170 -#: c-api/typeobj.rst:1236 c-api/typeobj.rst:1276 c-api/typeobj.rst:1328 -#: c-api/typeobj.rst:1439 c-api/typeobj.rst:1574 c-api/typeobj.rst:1635 -#: c-api/typeobj.rst:1671 c-api/typeobj.rst:1700 c-api/typeobj.rst:1762 -#: c-api/typeobj.rst:1806 c-api/typeobj.rst:1879 c-api/typeobj.rst:1937 -#: c-api/typeobj.rst:1991 c-api/typeobj.rst:2032 c-api/typeobj.rst:2059 -#: c-api/typeobj.rst:2090 c-api/typeobj.rst:2148 +"objects `, the type's instances (objects " +"whose :c:member:`~PyObject.ob_type` points back to the type) do *not* count " +"as references. But for :ref:`dynamically allocated type objects `, the instances *do* count as references." +msgstr "" + +#: c-api/typeobj.rst:527 c-api/typeobj.rst:590 c-api/typeobj.rst:816 +#: c-api/typeobj.rst:880 c-api/typeobj.rst:917 c-api/typeobj.rst:960 +#: c-api/typeobj.rst:984 c-api/typeobj.rst:1043 c-api/typeobj.rst:1088 +#: c-api/typeobj.rst:1135 c-api/typeobj.rst:1194 c-api/typeobj.rst:1215 +#: c-api/typeobj.rst:1239 c-api/typeobj.rst:1280 c-api/typeobj.rst:1313 +#: c-api/typeobj.rst:1395 c-api/typeobj.rst:1440 c-api/typeobj.rst:1492 +#: c-api/typeobj.rst:1542 c-api/typeobj.rst:1582 c-api/typeobj.rst:1795 +#: c-api/typeobj.rst:1858 c-api/typeobj.rst:1898 c-api/typeobj.rst:1931 +#: c-api/typeobj.rst:1995 c-api/typeobj.rst:2043 c-api/typeobj.rst:2118 +#: c-api/typeobj.rst:2179 c-api/typeobj.rst:2244 c-api/typeobj.rst:2287 +#: c-api/typeobj.rst:2314 c-api/typeobj.rst:2347 c-api/typeobj.rst:2551 msgid "**Inheritance:**" msgstr "" -#: c-api/typeobj.rst:542 c-api/typeobj.rst:586 +#: c-api/typeobj.rst:545 c-api/typeobj.rst:592 msgid "This field is not inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:510 +#: c-api/typeobj.rst:509 +msgid ":c:member:`PyObject.ob_type`" +msgstr "" + +#: c-api/typeobj.rst:511 msgid "" "This is the type's type, in other words its metatype. It is initialized by " "the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " @@ -1157,63 +1180,79 @@ msgid "" "doing anything else. This is typically done like this::" msgstr "" -#: c-api/typeobj.rst:521 +#: c-api/typeobj.rst:522 msgid "" -"This should be done before any instances of the type are created. :c:func:" -"`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if " -"so, initializes it to the :c:member:`~PyObject.ob_type` field of the base " -"class. :c:func:`PyType_Ready` will not change this field if it is non-zero." +"This should be done before any instances of the type are " +"created. :c:func:`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is " +"``NULL``, and if so, initializes it to the :c:member:`~PyObject.ob_type` " +"field of the base class. :c:func:`PyType_Ready` will not change this field " +"if it is non-zero." msgstr "" -#: c-api/typeobj.rst:701 c-api/typeobj.rst:914 c-api/typeobj.rst:1637 -#: c-api/typeobj.rst:1790 c-api/typeobj.rst:1881 c-api/typeobj.rst:2127 +#: c-api/typeobj.rst:818 c-api/typeobj.rst:1045 c-api/typeobj.rst:1860 +#: c-api/typeobj.rst:2025 c-api/typeobj.rst:2120 c-api/typeobj.rst:2493 msgid "This field is inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:532 +#: c-api/typeobj.rst:533 msgid "PyVarObject Slots" msgstr "" -#: c-api/typeobj.rst:536 +#: c-api/typeobj.rst:535 +msgid ":c:member:`PyVarObject.ob_size`" +msgstr "" + +#: c-api/typeobj.rst:537 msgid "" "For :ref:`statically allocated type objects `, this should be " "initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." msgstr "" -#: c-api/typeobj.rst:546 +#: c-api/typeobj.rst:541 +msgid "This field should be accessed using the :c:func:`Py_SIZE()` macro." +msgstr "" + +#: c-api/typeobj.rst:549 #, fuzzy msgid "PyTypeObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:548 +#: c-api/typeobj.rst:551 msgid "" "Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " "may set a value when the field is set to ``NULL`` then there will also be a " -"\"Default\" section. (Note that many fields set on :c:data:" -"`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)" +"\"Default\" section. (Note that many fields set " +"on :c:data:`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as " +"defaults.)" msgstr "" -#: c-api/typeobj.rst:555 +#: c-api/typeobj.rst:558 +msgid "" +"See :c:macro:`Py_tp_name` for the corresponding :c:member:`Slot ID " +"`." +msgstr "" + +#: c-api/typeobj.rst:561 msgid "" "Pointer to a NUL-terminated string containing the name of the type. For " "types that are accessible as module globals, the string should be the full " "module name, followed by a dot, followed by the type name; for built-in " "types, it should be just the type name. If the module is a submodule of a " "package, the full package name is part of the full module name. For " -"example, a type named :class:`!T` defined in module :mod:`!M` in subpackage :" -"mod:`!Q` in package :mod:`!P` should have the :c:member:`~PyTypeObject." -"tp_name` initializer ``\"P.Q.M.T\"``." +"example, a type named :class:`!T` defined in module :mod:`!M` in " +"subpackage :mod:`!Q` in package :mod:`!P` should have " +"the :c:member:`~PyTypeObject.tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" -#: c-api/typeobj.rst:563 +#: c-api/typeobj.rst:569 msgid "" "For :ref:`dynamically allocated type objects `, this should just " "be the type name, and the module name explicitly stored in the type dict as " "the value for key ``'__module__'``." msgstr "" -#: c-api/typeobj.rst:568 +#: c-api/typeobj.rst:574 msgid "" "For :ref:`statically allocated type objects `, the *tp_name* " "field should contain a dot. Everything before the last dot is made " @@ -1221,201 +1260,326 @@ msgid "" "the last dot is made accessible as the :attr:`~type.__name__` attribute." msgstr "" -#: c-api/typeobj.rst:574 +#: c-api/typeobj.rst:580 msgid "" "If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is " -"made accessible as the :attr:`~type.__name__` attribute, and the :attr:" -"`~type.__module__` attribute is undefined (unless explicitly set in the " -"dictionary, as explained above). This means your type will be impossible to " -"pickle. Additionally, it will not be listed in module documentations " -"created with pydoc." +"made accessible as the :attr:`~type.__name__` attribute, and " +"the :attr:`~type.__module__` attribute is undefined (unless explicitly set " +"in the dictionary, as explained above). This means your type will be " +"impossible to pickle. Additionally, it will not be listed in module " +"documentations created with pydoc." msgstr "" -#: c-api/typeobj.rst:580 +#: c-api/typeobj.rst:586 msgid "" -"This field must not be ``NULL``. It is the only required field in :c:func:" -"`PyTypeObject` (other than potentially :c:member:`~PyTypeObject." -"tp_itemsize`)." +"This field must not be ``NULL``. It is the only required field " +"in :c:func:`PyTypeObject` (other than " +"potentially :c:member:`~PyTypeObject.tp_itemsize`)." msgstr "" -#: c-api/typeobj.rst:592 +#: c-api/typeobj.rst:598 msgid "" "These fields allow calculating the size in bytes of instances of the type." msgstr "" -#: c-api/typeobj.rst:594 +#: c-api/typeobj.rst:600 msgid "" -"There are two kinds of types: types with fixed-length instances have a zero :" -"c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length " -"instances have a non-zero :c:member:`~PyTypeObject.tp_itemsize` field. For " -"a type with fixed-length instances, all instances have the same size, given " -"in :c:member:`~PyTypeObject.tp_basicsize`." +"See :c:macro:`Py_tp_basicsize`, :c:macro:`Py_tp_extra_basicsize` " +"and :c:macro:`Py_tp_itemsize` for the corresponding :c:member:`Slot IDs " +"`." msgstr "" -#: c-api/typeobj.rst:599 +#: c-api/typeobj.rst:604 msgid "" -"For a type with variable-length instances, the instances must have an :c:" -"member:`~PyVarObject.ob_size` field, and the instance size is :c:member:" -"`~PyTypeObject.tp_basicsize` plus N times :c:member:`~PyTypeObject." -"tp_itemsize`, where N is the \"length\" of the object. The value of N is " -"typically stored in the instance's :c:member:`~PyVarObject.ob_size` field. " -"There are exceptions: for example, ints use a negative :c:member:" -"`~PyVarObject.ob_size` to indicate a negative number, and N is " -"``abs(ob_size)`` there. Also, the presence of an :c:member:`~PyVarObject." -"ob_size` field in the instance layout doesn't mean that the instance " -"structure is variable-length (for example, the structure for the list type " -"has fixed-length instances, yet those instances have a meaningful :c:member:" -"`~PyVarObject.ob_size` field)." +"There are two kinds of types: types with fixed-length instances have a " +"zero :c:member:`!tp_itemsize` field, types with variable-length instances " +"have a non-zero :c:member:`!tp_itemsize` field. For a type with fixed-" +"length instances, all instances have the same size, given in :c:member:`!" +"tp_basicsize`. (Exceptions to this rule can be made " +"using :c:func:`PyUnstable_Object_GC_NewWithExtraData`.)" msgstr "" -#: c-api/typeobj.rst:610 +#: c-api/typeobj.rst:611 msgid "" -"The basic size includes the fields in the instance declared by the macro :c:" -"macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to " -"declare the instance struct) and this in turn includes the :c:member:" -"`~PyObject._ob_prev` and :c:member:`~PyObject._ob_next` fields if they are " -"present. This means that the only correct way to get an initializer for " -"the :c:member:`~PyTypeObject.tp_basicsize` is to use the ``sizeof`` operator " -"on the struct used to declare the instance layout. The basic size does not " -"include the GC header size." +"For a type with variable-length instances, the instances must have " +"an :c:member:`~PyVarObject.ob_size` field, and the instance size " +"is :c:member:`!tp_basicsize` plus N times :c:member:`!tp_itemsize`, where N " +"is the \"length\" of the object." msgstr "" -#: c-api/typeobj.rst:618 +#: c-api/typeobj.rst:616 msgid "" -"A note about alignment: if the variable items require a particular " -"alignment, this should be taken care of by the value of :c:member:" -"`~PyTypeObject.tp_basicsize`. Example: suppose a type implements an array " -"of ``double``. :c:member:`~PyTypeObject.tp_itemsize` is ``sizeof(double)``. " -"It is the programmer's responsibility that :c:member:`~PyTypeObject." -"tp_basicsize` is a multiple of ``sizeof(double)`` (assuming this is the " -"alignment requirement for ``double``)." +"Functions like :c:func:`PyObject_NewVar` will take the value of N as an " +"argument, and store in the instance's :c:member:`~PyVarObject.ob_size` " +"field. Note that the :c:member:`~PyVarObject.ob_size` field may later be " +"used for other purposes. For example, :py:type:`int` instances use the bits " +"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way; the " +"underlying storage and its size should be accessed " +"using :c:func:`PyLong_Export`." msgstr "" -#: c-api/typeobj.rst:625 +#: c-api/typeobj.rst:626 msgid "" -"For any type with variable-length instances, this field must not be ``NULL``." +"The :c:member:`~PyVarObject.ob_size` field should be accessed using " +"the :c:func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros." msgstr "" #: c-api/typeobj.rst:629 msgid "" -"These fields are inherited separately by subtypes. If the base type has a " -"non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to " -"set :c:member:`~PyTypeObject.tp_itemsize` to a different non-zero value in a " -"subtype (though this depends on the implementation of the base type)." +"Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the " +"instance layout doesn't mean that the instance structure is variable-length. " +"For example, the :py:type:`list` type has fixed-length instances, yet those " +"instances have a :c:member:`~PyVarObject.ob_size` field. (As " +"with :py:type:`int`, avoid reading lists' :c:member:`!ob_size` directly. " +"Call :c:func:`PyList_Size` instead.)" +msgstr "" + +#: c-api/typeobj.rst:636 +msgid "" +"The :c:member:`!tp_basicsize` includes size needed for data of the " +"type's :c:member:`~PyTypeObject.tp_base`, plus any extra data needed by each " +"instance." +msgstr "" + +#: c-api/typeobj.rst:640 +msgid "" +"The correct way to set :c:member:`!tp_basicsize` is to use the ``sizeof`` " +"operator on the struct used to declare the instance layout. This struct must " +"include the struct used to declare the base type. In other " +"words, :c:member:`!tp_basicsize` must be greater than or equal to the " +"base's :c:member:`!tp_basicsize`." +msgstr "" + +#: c-api/typeobj.rst:646 +msgid "" +"Since every type is a subtype of :py:type:`object`, this struct must " +"include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on " +"whether :c:member:`~PyVarObject.ob_size` should be included). These are " +"usually defined by the macro :c:macro:`PyObject_HEAD` " +"or :c:macro:`PyObject_VAR_HEAD`, respectively." msgstr "" -#: c-api/typeobj.rst:637 +#: c-api/typeobj.rst:652 msgid "" -"A pointer to the instance destructor function. This function must be " -"defined unless the type guarantees that its instances will never be " -"deallocated (as is the case for the singletons ``None`` and ``Ellipsis``). " -"The function signature is::" +"The basic size does not include the GC header size, as that header is not " +"part of :c:macro:`PyObject_HEAD`." msgstr "" -#: c-api/typeobj.rst:643 +#: c-api/typeobj.rst:655 msgid "" -"The destructor function is called by the :c:func:`Py_DECREF` and :c:func:" -"`Py_XDECREF` macros when the new reference count is zero. At this point, " -"the instance is still in existence, but there are no references to it. The " -"destructor function should free all references which the instance owns, free " -"all memory buffers owned by the instance (using the freeing function " -"corresponding to the allocation function used to allocate the buffer), and " -"call the type's :c:member:`~PyTypeObject.tp_free` function. If the type is " -"not subtypable (doesn't have the :c:macro:`Py_TPFLAGS_BASETYPE` flag bit " -"set), it is permissible to call the object deallocator directly instead of " -"via :c:member:`~PyTypeObject.tp_free`. The object deallocator should be the " -"one used to allocate the instance; this is normally :c:func:`PyObject_Del` " -"if the instance was allocated using :c:macro:`PyObject_New` or :c:macro:" -"`PyObject_NewVar`, or :c:func:`PyObject_GC_Del` if the instance was " -"allocated using :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`." +"For cases where struct used to declare the base type is unknown, " +"see :c:member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`." msgstr "" #: c-api/typeobj.rst:658 +msgid "Notes about alignment:" +msgstr "" + +#: c-api/typeobj.rst:660 +msgid "" +":c:member:`!tp_basicsize` must be a multiple of ``_Alignof(PyObject)``. When " +"using ``sizeof`` on a ``struct`` that includes :c:macro:`PyObject_HEAD`, as " +"recommended, the compiler ensures this. When not using a C ``struct``, or " +"when using compiler extensions like ``__attribute__((packed))``, it is up to " +"you." +msgstr "" + +#: c-api/typeobj.rst:665 msgid "" -"If the type supports garbage collection (has the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit set), the destructor should call :c:func:" -"`PyObject_GC_UnTrack` before clearing any member fields." +"If the variable items require a particular alignment, :c:member:`!" +"tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that " +"alignment. For example, if a type's variable part stores a ``double``, it is " +"your responsibility that both fields are a multiple of ``_Alignof(double)``." msgstr "" -#: c-api/typeobj.rst:670 +#: c-api/typeobj.rst:674 +msgid "" +"These fields are inherited separately by subtypes. (That is, if the field is " +"set to zero, :c:func:`PyType_Ready` will copy the value from the base type, " +"indicating that the instances do not need additional storage.)" +msgstr "" + +#: c-api/typeobj.rst:679 +msgid "" +"If the base type has a non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is " +"generally not safe to set :c:member:`~PyTypeObject.tp_itemsize` to a " +"different non-zero value in a subtype (though this depends on the " +"implementation of the base type)." +msgstr "" + +#: c-api/typeobj.rst:688 +msgid "" +"A pointer to the instance destructor function. The function signature is::" +msgstr "" + +#: c-api/typeobj.rst:692 +msgid "" +"The destructor function should remove all references which the instance owns " +"(e.g., call :c:func:`Py_CLEAR`), free all memory buffers owned by the " +"instance, and call the type's :c:member:`~PyTypeObject.tp_free` function to " +"free the object itself." +msgstr "" + +#: c-api/typeobj.rst:697 +msgid "" +"If you may call functions that may set the error indicator, you must " +"use :c:func:`PyErr_GetRaisedException` " +"and :c:func:`PyErr_SetRaisedException` to ensure you don't clobber a " +"preexisting error indicator (the deallocation could have occurred while " +"processing a different error):" +msgstr "" + +#: c-api/typeobj.rst:713 +msgid "" +"The dealloc handler itself must not raise an exception; if it hits an error " +"case it should call :c:func:`PyErr_FormatUnraisable` to log (and clear) an " +"unraisable exception." +msgstr "" + +#: c-api/typeobj.rst:717 +msgid "No guarantees are made about when an object is destroyed, except:" +msgstr "" + +#: c-api/typeobj.rst:719 +msgid "" +"Python will destroy an object immediately or some time after the final " +"reference to the object is deleted, unless its finalizer " +"(:c:member:`~PyTypeObject.tp_finalize`) subsequently resurrects the object." +msgstr "" + +#: c-api/typeobj.rst:723 +msgid "" +"An object will not be destroyed while it is being automatically finalized " +"(:c:member:`~PyTypeObject.tp_finalize`) or automatically cleared " +"(:c:member:`~PyTypeObject.tp_clear`)." +msgstr "" + +#: c-api/typeobj.rst:727 +msgid "" +"CPython currently destroys an object immediately from :c:func:`Py_DECREF` " +"when the new reference count is zero, but this may change in a future " +"version." +msgstr "" + +#: c-api/typeobj.rst:731 +msgid "" +"It is recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +#: c-api/typeobj.rst:735 +msgid "" +"If the type supports garbage collection (the :c:macro:`Py_TPFLAGS_HAVE_GC` " +"flag is set), the destructor should call :c:func:`PyObject_GC_UnTrack` " +"before clearing any member fields." +msgstr "" + +#: c-api/typeobj.rst:739 +msgid "" +"It is permissible to call :c:member:`~PyTypeObject.tp_clear` " +"from :c:member:`!tp_dealloc` to reduce code duplication and to guarantee " +"that the object is always cleared before destruction. Beware " +"that :c:member:`!tp_clear` might have already been called." +msgstr "" + +#: c-api/typeobj.rst:744 +msgid "" +"If the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " +"deallocator should release the owned reference to its type object " +"(via :c:func:`Py_DECREF`) after calling the type deallocator. See the " +"example code below.::" +msgstr "" + +#: c-api/typeobj.rst:758 +msgid "" +":c:member:`!tp_dealloc` must leave the exception status unchanged. If it " +"needs to call something that might raise an exception, the exception state " +"must be backed up first and restored later (after logging any exceptions " +"with :c:func:`PyErr_WriteUnraisable`)." +msgstr "" + +#: c-api/typeobj.rst:763 +#, fuzzy +msgid "Example::" +msgstr "Exemples" + +#: c-api/typeobj.rst:804 msgid "" -"Finally, if the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " -"deallocator should release the owned reference to its type object (via :c:" -"func:`Py_DECREF`) after calling the type deallocator. In order to avoid " -"dangling pointers, the recommended way to achieve this is:" +":c:member:`!tp_dealloc` may be called from any Python thread, not just the " +"thread which created the object (if the object becomes part of a refcount " +"cycle, that cycle might be collected by a garbage collection on any " +"thread). This is not a problem for Python API calls, since the thread on " +"which :c:member:`!tp_dealloc` is called with an :term:`attached thread " +"state`. However, if the object being destroyed in turn destroys objects " +"from some other C library, care should be taken to ensure that destroying " +"those objects on the thread which called :c:member:`!tp_dealloc` will not " +"violate any assumptions of the library." msgstr "" -#: c-api/typeobj.rst:687 +#: c-api/typeobj.rst:1739 c-api/typeobj.rst:2506 msgid "" -"In a garbage collected Python, :c:member:`!tp_dealloc` may be called from " -"any Python thread, not just the thread which created the object (if the " -"object becomes part of a refcount cycle, that cycle might be collected by a " -"garbage collection on any thread). This is not a problem for Python API " -"calls, since the thread on which :c:member:`!tp_dealloc` is called will own " -"the Global Interpreter Lock (GIL). However, if the object being destroyed " -"in turn destroys objects from some other C or C++ library, care should be " -"taken to ensure that destroying those objects on the thread which called :c:" -"member:`!tp_dealloc` will not violate any assumptions of the library." +":ref:`life-cycle` for details about how this slot relates to other slots." msgstr "" -#: c-api/typeobj.rst:706 +#: c-api/typeobj.rst:827 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:711 +#: c-api/typeobj.rst:832 msgid "" "This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" -#: c-api/typeobj.rst:715 +#: c-api/typeobj.rst:836 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:719 +#: c-api/typeobj.rst:840 msgid "" -"Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" -"`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " -"*vectorcallfunc* function. This can be done by setting *tp_call* to :c:func:" -"`PyVectorcall_Call`." +"Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also " +"set :c:member:`~PyTypeObject.tp_call` and make sure its behaviour is " +"consistent with the *vectorcallfunc* function. This can be done by setting " +"*tp_call* to :c:func:`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:726 +#: c-api/typeobj.rst:847 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" -#: c-api/typeobj.rst:732 +#: c-api/typeobj.rst:853 msgid "" "Before version 3.12, it was not recommended for :ref:`mutable heap types " -"` to implement the vectorcall protocol. When a user sets :attr:" -"`~object.__call__` in Python code, only *tp_call* is updated, likely making " -"it inconsistent with the vectorcall function. Since 3.12, setting " -"``__call__`` will disable vectorcall optimization by clearing the :c:macro:" -"`Py_TPFLAGS_HAVE_VECTORCALL` flag." +"` to implement the vectorcall protocol. When a user " +"sets :attr:`~object.__call__` in Python code, only *tp_call* is updated, " +"likely making it inconsistent with the vectorcall function. Since 3.12, " +"setting ``__call__`` will disable vectorcall optimization by clearing " +"the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" -#: c-api/typeobj.rst:742 +#: c-api/typeobj.rst:863 msgid "" -"This field is always inherited. However, the :c:macro:" -"`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " -"then the subclass won't use :ref:`vectorcall `, except when :c:" -"func:`PyVectorcall_Call` is explicitly called." +"This field is always inherited. However, " +"the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If " +"it's not set, then the subclass won't use :ref:`vectorcall `, " +"except when :c:func:`PyVectorcall_Call` is explicitly called." msgstr "" -#: c-api/typeobj.rst:751 +#: c-api/typeobj.rst:874 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:753 +#: c-api/typeobj.rst:876 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1423,27 +1587,26 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:955 -msgid "" -"Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." -"tp_getattro`" +#: c-api/typeobj.rst:1090 +msgid "Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: c-api/typeobj.rst:761 +#: c-api/typeobj.rst:884 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_getattro`: a subtype inherits " +"both :c:member:`~PyTypeObject.tp_getattr` " "and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " -"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." -"tp_getattro` are both ``NULL``." +"subtype's :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:968 +#: c-api/typeobj.rst:1105 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:770 +#: c-api/typeobj.rst:895 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1451,49 +1614,48 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:981 -msgid "" -"Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." -"tp_setattro`" +#: c-api/typeobj.rst:1118 +msgid "Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: c-api/typeobj.rst:778 +#: c-api/typeobj.rst:903 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_setattro`: a subtype inherits " +"both :c:member:`~PyTypeObject.tp_setattr` " "and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " -"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." -"tp_setattro` are both ``NULL``." +"subtype's :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:785 +#: c-api/typeobj.rst:910 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" -#: c-api/typeobj.rst:789 +#: c-api/typeobj.rst:914 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:794 +#: c-api/typeobj.rst:919 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:802 +#: c-api/typeobj.rst:929 msgid "" -"An optional pointer to a function that implements the built-in function :" -"func:`repr`." +"An optional pointer to a function that implements the built-in " +"function :func:`repr`." msgstr "" -#: c-api/typeobj.rst:805 +#: c-api/typeobj.rst:932 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:809 +#: c-api/typeobj.rst:936 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1502,134 +1664,133 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:899 c-api/typeobj.rst:961 c-api/typeobj.rst:1028 -#: c-api/typeobj.rst:1617 c-api/typeobj.rst:1767 c-api/typeobj.rst:1883 -#: c-api/typeobj.rst:1943 c-api/typeobj.rst:1995 +#: c-api/typeobj.rst:1028 c-api/typeobj.rst:1096 c-api/typeobj.rst:1169 +#: c-api/typeobj.rst:1838 c-api/typeobj.rst:2000 c-api/typeobj.rst:2122 +#: c-api/typeobj.rst:2185 c-api/typeobj.rst:2248 msgid "**Default:**" msgstr "" -#: c-api/typeobj.rst:822 +#: c-api/typeobj.rst:949 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" -#: c-api/typeobj.rst:829 +#: c-api/typeobj.rst:956 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" -#: c-api/typeobj.rst:835 +#: c-api/typeobj.rst:962 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:841 +#: c-api/typeobj.rst:968 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" -#: c-api/typeobj.rst:847 +#: c-api/typeobj.rst:974 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:853 +#: c-api/typeobj.rst:980 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" -#: c-api/typeobj.rst:859 +#: c-api/typeobj.rst:986 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:867 +#: c-api/typeobj.rst:996 msgid "" -"An optional pointer to a function that implements the built-in function :" -"func:`hash`." +"An optional pointer to a function that implements the built-in " +"function :func:`hash`." msgstr "" -#: c-api/typeobj.rst:870 +#: c-api/typeobj.rst:999 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:874 +#: c-api/typeobj.rst:1003 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" -#: c-api/typeobj.rst:878 +#: c-api/typeobj.rst:1007 msgid "" "When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " -"is not set), an attempt to take the hash of the object raises :exc:" -"`TypeError`. This is the same as setting it to :c:func:" -"`PyObject_HashNotImplemented`." +"is not set), an attempt to take the hash of the object " +"raises :exc:`TypeError`. This is the same as setting it " +"to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:882 +#: c-api/typeobj.rst:1011 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " "as the equivalent of ``__hash__ = None`` at the Python level, causing " "``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note " "that the converse is also true - setting ``__hash__ = None`` on a class at " -"the Python level will result in the ``tp_hash`` slot being set to :c:func:" -"`PyObject_HashNotImplemented`." +"the Python level will result in the ``tp_hash`` slot being set " +"to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1576 -msgid "" -"Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." -"tp_richcompare`" +#: c-api/typeobj.rst:1797 +msgid "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:894 +#: c-api/typeobj.rst:1023 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." -"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash`, when the subtype's :c:" -"member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` " -"are both ``NULL``." +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_richcompare`: a subtype inherits both " +"of :c:member:`~PyTypeObject.tp_richcompare` " +"and :c:member:`~PyTypeObject.tp_hash`, when the " +"subtype's :c:member:`~PyTypeObject.tp_richcompare` " +"and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:901 +#: c-api/typeobj.rst:1030 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." msgstr "" -#: c-api/typeobj.rst:906 +#: c-api/typeobj.rst:1037 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" -#: c-api/typeobj.rst:919 +#: c-api/typeobj.rst:1052 msgid "" -"An optional pointer to a function that implements the built-in operation :" -"func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " -"the constructor for that type. This constructor calls :c:func:" -"`PyObject_Str` to do the actual work, and :c:func:`PyObject_Str` will call " -"this handler.)" +"An optional pointer to a function that implements the built-in " +"operation :func:`str`. (Note that :class:`str` is a type now, " +"and :func:`str` calls the constructor for that type. This constructor " +"calls :c:func:`PyObject_Str` to do the actual work, " +"and :c:func:`PyObject_Str` will call this handler.)" msgstr "" -#: c-api/typeobj.rst:924 +#: c-api/typeobj.rst:1057 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:928 +#: c-api/typeobj.rst:1061 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1637,91 +1798,99 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:938 +#: c-api/typeobj.rst:1071 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" -#: c-api/typeobj.rst:944 +#: c-api/typeobj.rst:1079 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:946 +#: c-api/typeobj.rst:1081 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:950 +#: c-api/typeobj.rst:1085 msgid "" -"It is usually convenient to set this field to :c:func:" -"`PyObject_GenericGetAttr`, which implements the normal way of looking for " -"object attributes." +"It is usually convenient to set this field " +"to :c:func:`PyObject_GenericGetAttr`, which implements the normal way of " +"looking for object attributes." msgstr "" -#: c-api/typeobj.rst:957 +#: c-api/typeobj.rst:1092 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_getattr`: a subtype inherits " +"both :c:member:`~PyTypeObject.tp_getattr` " "and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " -"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." -"tp_getattro` are both ``NULL``." +"subtype's :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:963 +#: c-api/typeobj.rst:1098 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:970 +#: c-api/typeobj.rst:1107 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:974 +#: c-api/typeobj.rst:1111 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " -"supported. It is usually convenient to set this field to :c:func:" -"`PyObject_GenericSetAttr`, which implements the normal way of setting object " -"attributes." +"supported. It is usually convenient to set this field " +"to :c:func:`PyObject_GenericSetAttr`, which implements the normal way of " +"setting object attributes." msgstr "" -#: c-api/typeobj.rst:983 +#: c-api/typeobj.rst:1120 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_setattr`: a subtype inherits " +"both :c:member:`~PyTypeObject.tp_setattr` " "and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " -"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." -"tp_setattro` are both ``NULL``." +"subtype's :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:989 +#: c-api/typeobj.rst:1126 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:994 +#: c-api/typeobj.rst:1131 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" -#: c-api/typeobj.rst:1000 +#: c-api/typeobj.rst:1137 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:1006 +#: c-api/typeobj.rst:1143 +msgid "" +"See :c:macro:`Py_tp_flags` for the corresponding :c:member:`Slot ID " +"`." +msgstr "" + +#: c-api/typeobj.rst:1146 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " -"fields in the type object (or in the extension structures referenced via :c:" -"member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject." -"tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and :c:member:" -"`~PyTypeObject.tp_as_buffer`) that were historically not always present are " -"valid; if such a flag bit is clear, the type fields it guards must not be " -"accessed and must be considered to have a zero or ``NULL`` value instead." +"fields in the type object (or in the extension structures referenced " +"via :c:member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject.tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, " +"and :c:member:`~PyTypeObject.tp_as_buffer`) that were historically not " +"always present are valid; if such a flag bit is clear, the type fields it " +"guards must not be accessed and must be considered to have a zero or " +"``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:1016 +#: c-api/typeobj.rst:1156 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -1730,33 +1899,33 @@ msgid "" "type's value of the flag bit is copied into the subtype together with a " "pointer to the extension structure. The :c:macro:`Py_TPFLAGS_HAVE_GC` flag " "bit is inherited together with the :c:member:`~PyTypeObject.tp_traverse` " -"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :c:member:" -"`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in " -"the subtype exist and have ``NULL`` values. .. XXX are most flag bits " -"*really* inherited individually?" +"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and " +"the :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields in the subtype exist and have " +"``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1030 +#: c-api/typeobj.rst:1171 msgid "" ":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1033 +#: c-api/typeobj.rst:1174 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1037 +#: c-api/typeobj.rst:1178 msgid "" "The following bit masks are currently defined; these can be ORed together " -"using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." -"tp_flags` field. The macro :c:func:`PyType_HasFeature` takes a type and a " -"flags value, *tp* and *f*, and checks whether ``tp->tp_flags & f`` is non-" -"zero." +"using the ``|`` operator to form the value of " +"the :c:member:`~PyTypeObject.tp_flags` field. The " +"macro :c:func:`PyType_HasFeature` takes a type and a flags value, *tp* and " +"*f*, and checks whether ``tp->tp_flags & f`` is non-zero." msgstr "" -#: c-api/typeobj.rst:1044 +#: c-api/typeobj.rst:1185 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1764,252 +1933,280 @@ msgid "" "a reference to the type, and the type object is INCREF'ed when a new " "instance is created, and DECREF'ed when an instance is destroyed (this does " "not apply to instances of subtypes; only the type referenced by the " -"instance's ob_type gets INCREF'ed or DECREF'ed). Heap types should also :ref:" -"`support garbage collection ` as they can form a " -"reference cycle with their own module object." +"instance's ob_type gets INCREF'ed or DECREF'ed). Heap types should " +"also :ref:`support garbage collection ` as they " +"can form a reference cycle with their own module object." msgstr "" -#: c-api/typeobj.rst:1066 c-api/typeobj.rst:1086 c-api/typeobj.rst:1118 +#: c-api/typeobj.rst:1207 c-api/typeobj.rst:1227 c-api/typeobj.rst:1259 msgid "???" msgstr "" -#: c-api/typeobj.rst:1060 +#: c-api/typeobj.rst:1201 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: c-api/typeobj.rst:1071 +#: c-api/typeobj.rst:1212 msgid "" -"This bit is set when the type object has been fully initialized by :c:func:" -"`PyType_Ready`." +"This bit is set when the type object has been fully initialized " +"by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1081 +#: c-api/typeobj.rst:1222 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: c-api/typeobj.rst:1091 +#: c-api/typeobj.rst:1232 msgid "" "This bit is set when the object supports garbage collection. If this bit is " -"set, instances must be created using :c:macro:`PyObject_GC_New` and " -"destroyed using :c:func:`PyObject_GC_Del`. More information in section :ref:" -"`supporting-cycle-detection`. This bit also implies that the GC-related " -"fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject." -"tp_clear` are present in the type object." +"set, memory for new instances (see :c:member:`~PyTypeObject.tp_alloc`) must " +"be allocated using :c:macro:`PyObject_GC_New` " +"or :c:func:`PyType_GenericAlloc` and deallocated " +"(see :c:member:`~PyTypeObject.tp_free`) using :c:func:`PyObject_GC_Del`. " +"More information in section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1441 c-api/typeobj.rst:1515 -msgid "" -"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." -"tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" +#: c-api/typeobj.rst:1584 c-api/typeobj.rst:1730 +msgid "Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject.tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: c-api/typeobj.rst:1102 +#: c-api/typeobj.rst:1243 msgid "" -"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" -"member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " -"fields, i.e. if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the " -"subtype and the :c:member:`~PyTypeObject.tp_traverse` and :c:member:" -"`~PyTypeObject.tp_clear` fields in the subtype exist and have ``NULL`` " -"values." +"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with " +"the :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and " +"the :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields in the subtype exist and have " +"``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1112 +#: c-api/typeobj.rst:1253 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " "includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: c-api/typeobj.rst:1123 +#: c-api/typeobj.rst:1264 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1125 +#: c-api/typeobj.rst:1266 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1127 +#: c-api/typeobj.rst:1268 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1130 +#: c-api/typeobj.rst:1271 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1133 +#: c-api/typeobj.rst:1274 msgid "" -"This flag enables an optimization for typical method calls like ``obj." -"meth()``: it avoids creating a temporary \"bound method\" object for ``obj." -"meth``." +"This flag enables an optimization for typical method calls like " +"``obj.meth()``: it avoids creating a temporary \"bound method\" object for " +"``obj.meth``." msgstr "" -#: c-api/typeobj.rst:1141 +#: c-api/typeobj.rst:1282 msgid "" -"This flag is never inherited by types without the :c:macro:" -"`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " -"whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." +"This flag is never inherited by types without " +"the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it " +"is inherited whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: c-api/typeobj.rst:1147 +#: c-api/typeobj.rst:1288 msgid "" -"This bit indicates that instances of the class have a `~object.__dict__` " -"attribute, and that the space for the dictionary is managed by the VM." +"This bit indicates that instances of the class have " +"a :attr:`~object.__dict__` attribute, and that the space for the dictionary " +"is managed by the VM." msgstr "" -#: c-api/typeobj.rst:1150 -msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." +#: c-api/typeobj.rst:1309 +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set." msgstr "" -#: c-api/typeobj.rst:1152 +#: c-api/typeobj.rst:1293 msgid "" "The type traverse function must call :c:func:`PyObject_VisitManagedDict` and " "its clear function must call :c:func:`PyObject_ClearManagedDict`." msgstr "" -#: c-api/typeobj.rst:1159 +#: c-api/typeobj.rst:1300 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" -#: c-api/typeobj.rst:1165 +#: c-api/typeobj.rst:1306 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: c-api/typeobj.rst:1172 +#: c-api/typeobj.rst:1315 msgid "" -"This flag is inherited unless the :c:member:`~PyTypeObject." -"tp_weaklistoffset` field is set in a superclass." +"This flag is inherited unless " +"the :c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass." msgstr "" -#: c-api/typeobj.rst:1178 +#: c-api/typeobj.rst:1321 msgid "" -"Only usable with variable-size types, i.e. ones with non-zero :c:member:" -"`~PyTypeObject.tp_itemsize`." +"These bits indicate that the VM will manage some fields by storing them " +"before the object. Currently, this macro is equivalent " +"to :c:expr:`Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF`." msgstr "" -#: c-api/typeobj.rst:1181 +#: c-api/typeobj.rst:1325 +msgid "" +"This macro value relies on the implementation of the VM, so its value is not " +"stable and may change in a future version. Prefer using individual flags " +"instead." +msgstr "" + +#: c-api/typeobj.rst:1334 +msgid "" +"Only usable with variable-size types, i.e. ones with non-" +"zero :c:member:`~PyTypeObject.tp_itemsize`." +msgstr "" + +#: c-api/typeobj.rst:1337 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" ">tp_basicsize`` (which may be different in each subclass)." msgstr "" -#: c-api/typeobj.rst:1186 +#: c-api/typeobj.rst:1342 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" -#: c-api/typeobj.rst:1194 +#: c-api/typeobj.rst:1350 msgid "This flag is inherited." msgstr "" -#: c-api/typeobj.rst:1208 +#: c-api/typeobj.rst:1364 msgid "" -"These flags are used by functions such as :c:func:`PyLong_Check` to quickly " +"Functions such as :c:func:`PyLong_Check` will " +"call :c:func:`PyType_FastSubclass` with one of these flags to quickly " "determine if a type is a subclass of a built-in type; such specific checks " "are faster than a generic check, like :c:func:`PyObject_IsInstance`. Custom " -"types that inherit from built-ins should have their :c:member:`~PyTypeObject." -"tp_flags` set appropriately, or the code that interacts with such types will " -"behave differently depending on what kind of check is used." +"types that inherit from built-ins should have " +"their :c:member:`~PyTypeObject.tp_flags` set appropriately, or the code that " +"interacts with such types will behave differently depending on what kind of " +"check is used." msgstr "" -#: c-api/typeobj.rst:1219 +#: c-api/typeobj.rst:1375 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: c-api/typeobj.rst:1224 +#: c-api/typeobj.rst:1380 msgid "" -"This flag isn't necessary anymore, as the interpreter assumes the :c:member:" -"`~PyTypeObject.tp_finalize` slot is always present in the type structure." +"This flag isn't necessary anymore, as the interpreter assumes " +"the :c:member:`~PyTypeObject.tp_finalize` slot is always present in the type " +"structure." msgstr "" -#: c-api/typeobj.rst:1232 +#: c-api/typeobj.rst:1391 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: c-api/typeobj.rst:1238 +#: c-api/typeobj.rst:1397 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: c-api/typeobj.rst:1245 +#: c-api/typeobj.rst:1400 +msgid "as ``_Py_TPFLAGS_HAVE_VECTORCALL``" +msgstr "" + +#: c-api/typeobj.rst:1404 msgid "" -"This flag is now removed from a class when the class's :py:meth:`~object." -"__call__` method is reassigned." +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." msgstr "" -#: c-api/typeobj.rst:1248 +#: c-api/typeobj.rst:1409 +msgid "" +"This flag is now removed from a class when the " +"class's :py:meth:`~object.__call__` method is reassigned." +msgstr "" + +#: c-api/typeobj.rst:1412 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: c-api/typeobj.rst:1252 +#: c-api/typeobj.rst:1416 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" -#: c-api/typeobj.rst:1254 +#: c-api/typeobj.rst:1418 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: c-api/typeobj.rst:1259 +#: c-api/typeobj.rst:1532 c-api/typeobj.rst:1544 msgid "This flag is not inherited." msgstr "" -#: c-api/typeobj.rst:1265 +#: c-api/typeobj.rst:1429 msgid "" -"Disallow creating instances of the type: set :c:member:`~PyTypeObject." -"tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." +"Disallow creating instances of the type: " +"set :c:member:`~PyTypeObject.tp_new` to NULL and don't create the " +"``__new__`` key in the type dictionary." msgstr "" -#: c-api/typeobj.rst:1269 +#: c-api/typeobj.rst:1433 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" -#: c-api/typeobj.rst:1272 +#: c-api/typeobj.rst:1436 msgid "" -"The flag is set automatically on :ref:`static types ` if :c:" -"member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" -"member:`~PyTypeObject.tp_new` is NULL." +"The flag is set automatically on :ref:`static types ` " +"if :c:member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` " +"and :c:member:`~PyTypeObject.tp_new` is NULL." msgstr "" -#: c-api/typeobj.rst:1278 +#: c-api/typeobj.rst:1442 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" -#: c-api/typeobj.rst:1285 +#: c-api/typeobj.rst:1449 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" -#: c-api/typeobj.rst:1296 +#: c-api/typeobj.rst:1460 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2017,23 +2214,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: c-api/typeobj.rst:1325 +#: c-api/typeobj.rst:1489 msgid "" ":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " "mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: c-api/typeobj.rst:1308 +#: c-api/typeobj.rst:1472 msgid "" -"This flag is inherited by types that do not already set :c:macro:" -"`Py_TPFLAGS_SEQUENCE`." +"This flag is inherited by types that do not already " +"set :c:macro:`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: c-api/typeobj.rst:1333 +#: c-api/typeobj.rst:1497 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr ":pep:`634` — Spécifications pour le filtrage par motif" -#: c-api/typeobj.rst:1318 +#: c-api/typeobj.rst:1482 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2041,158 +2238,247 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: c-api/typeobj.rst:1330 +#: c-api/typeobj.rst:1494 msgid "" -"This flag is inherited by types that do not already set :c:macro:" -"`Py_TPFLAGS_MAPPING`." +"This flag is inherited by types that do not already " +"set :c:macro:`Py_TPFLAGS_MAPPING`." msgstr "" -#: c-api/typeobj.rst:1340 +#: c-api/typeobj.rst:1504 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" -#: c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1508 msgid "" "This flag is present in header files, but is not be used. It will be removed " "in a future version of CPython" msgstr "" -#: c-api/typeobj.rst:1350 +#: c-api/typeobj.rst:1514 +msgid "" +"This macro does nothing. Historically, this would indicate that " +"the :c:member:`~PyTypeObject.tp_version_tag` field was available and " +"initialized." +msgstr "" + +#: c-api/typeobj.rst:1524 +msgid "" +"This bit indicates that instances of this type will have an \"inline " +"values\" array (containing the object's attributes) placed directly after " +"the end of the object." +msgstr "" + +#: c-api/typeobj.rst:1528 +msgid "This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set." +msgstr "" + +#: c-api/typeobj.rst:1539 +msgid "" +"This bit indicates that this is an abstract type and therefore cannot be " +"instantiated." +msgstr "" + +#: c-api/typeobj.rst:1547 +msgid ":mod:`abc`" +msgstr "" + +#: c-api/typeobj.rst:1552 +msgid "" +"Internal. Do not set or unset this flag. Historically, this was a reserved " +"flag for use in Stackless Python." +msgstr "" + +#: c-api/typeobj.rst:1556 +msgid "" +"This flag is present in header files, but is not be used. This may be " +"removed in a future version of CPython." +msgstr "" + +#: c-api/typeobj.rst:1564 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`~type.__doc__` attribute on " "the type and instances of the type." msgstr "" -#: c-api/typeobj.rst:1356 +#: c-api/typeobj.rst:1570 msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1361 +#: c-api/typeobj.rst:1577 msgid "" "An optional pointer to a traversal function for the garbage collector. This " -"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " -"signature is::" +"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set." msgstr "" -#: c-api/typeobj.rst:1510 +#: c-api/typeobj.rst:1580 +msgid "See :ref:`gc-traversal` for documentation." +msgstr "" + +#: c-api/typeobj.rst:1586 msgid "" -"More information about Python's garbage collection scheme can be found in " -"section :ref:`supporting-cycle-detection`." +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_clear` and " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag " +"bit, :c:member:`~PyTypeObject.tp_traverse`, " +"and :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type " +"if they are all zero in the subtype." +msgstr "" + +#: c-api/typeobj.rst:1596 +msgid "An optional pointer to a clear function. The signature is::" +msgstr "" + +#: c-api/typeobj.rst:1600 +msgid "" +"The purpose of this function is to break reference cycles that are causing " +"a :term:`cyclic isolate` so that the objects can be safely destroyed. A " +"cleared object is a partially destroyed object; the object is not obligated " +"to satisfy design invariants held during normal use." +msgstr "" + +#: c-api/typeobj.rst:1605 +msgid "" +":c:member:`!tp_clear` does not need to delete references to objects that " +"can't participate in reference cycles, such as Python strings or Python " +"integers. However, it may be convenient to clear all references, and write " +"the type's :c:member:`~PyTypeObject.tp_dealloc` function to " +"invoke :c:member:`!tp_clear` to avoid code duplication. (Beware " +"that :c:member:`!tp_clear` might have already been called. Prefer calling " +"idempotent functions like :c:func:`Py_CLEAR`.)" +msgstr "" + +#: c-api/typeobj.rst:1613 +msgid "" +"Any non-trivial cleanup should be performed " +"in :c:member:`~PyTypeObject.tp_finalize` instead of :c:member:`!tp_clear`." msgstr "" -#: c-api/typeobj.rst:1369 +#: c-api/typeobj.rst:1618 msgid "" -"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " -"collector to detect reference cycles. A typical implementation of a :c:" -"member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` " -"on each of the instance's members that are Python objects that the instance " -"owns. For example, this is function :c:func:`!local_traverse` from the :mod:" -"`!_thread` extension module::" +"If :c:member:`!tp_clear` fails to break a reference cycle then the objects " +"in the :term:`cyclic isolate` may remain indefinitely uncollectable " +"(\"leak\"). See :data:`gc.garbage`." msgstr "" -#: c-api/typeobj.rst:1384 +#: c-api/typeobj.rst:1624 msgid "" -"Note that :c:func:`Py_VISIT` is called only on those members that can " -"participate in reference cycles. Although there is also a ``self->key`` " -"member, it can only be ``NULL`` or a Python string and therefore cannot be " -"part of a reference cycle." +"Referents (direct and indirect) might have already been cleared; they are " +"not guaranteed to be in a consistent state." msgstr "" -#: c-api/typeobj.rst:1388 +#: c-api/typeobj.rst:1629 msgid "" -"On the other hand, even if you know a member can never be part of a cycle, " -"as a debugging aid you may want to visit it anyway just so the :mod:`gc` " -"module's :func:`~gc.get_referents` function will include it." +"The :c:member:`~PyTypeObject.tp_clear` function can be called from any " +"thread." msgstr "" -#: c-api/typeobj.rst:1392 +#: c-api/typeobj.rst:1634 msgid "" -"Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" +"An object is not guaranteed to be automatically cleared before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called." msgstr "" -#: c-api/typeobj.rst:1396 +#: c-api/typeobj.rst:1637 msgid "" -"It is only needed since Python 3.9. To support Python 3.8 and older, this " -"line must be conditional::" +"This function differs from the destructor " +"(:c:member:`~PyTypeObject.tp_dealloc`) in the following ways:" msgstr "" -#: c-api/typeobj.rst:1403 +#: c-api/typeobj.rst:1640 msgid "" -"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" -"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" -"`PyObject_VisitManagedDict` like this::" +"The purpose of clearing an object is to remove references to other objects " +"that might participate in a reference cycle. The purpose of the destructor, " +"on the other hand, is a superset: it must release *all* resources it owns, " +"including references to objects that cannot participate in a reference cycle " +"(e.g., integers) as well as the object's own memory (by " +"calling :c:member:`~PyTypeObject.tp_free`)." msgstr "" -#: c-api/typeobj.rst:1410 +#: c-api/typeobj.rst:1646 msgid "" -"When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " -"that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports " -"weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the " -"pointer supporting the linked list (what *tp_weaklist* points to) must " -"**not** be visited as the instance does not directly own the weak references " -"to itself (the weakreference list is there to support the weak reference " -"machinery, but the instance has no strong reference to the elements inside " -"it, as they are allowed to be removed even if the instance is still alive)." +"When :c:member:`!tp_clear` is called, other objects might still hold " +"references to the object being cleared. Because of this, :c:member:`!" +"tp_clear` must not deallocate the object's own memory " +"(:c:member:`~PyTypeObject.tp_free`). The destructor, on the other hand, is " +"only called when no (strong) references exist, and as such, must safely " +"destroy the object itself by deallocating it." msgstr "" -#: c-api/typeobj.rst:1421 +#: c-api/typeobj.rst:1652 +msgid "" +":c:member:`!tp_clear` might never be automatically called. An object's " +"destructor, on the other hand, will be automatically called some time after " +"the object becomes unreachable (i.e., either there are no references to the " +"object or the object is a member of a :term:`cyclic isolate`)." +msgstr "" + +#: c-api/typeobj.rst:1657 msgid "" -"Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:" -"func:`!local_traverse` to have these specific names; don't name them just " -"anything." +"No guarantees are made about when, if, or how often Python automatically " +"clears an object, except:" msgstr "" -#: c-api/typeobj.rst:1425 +#: c-api/typeobj.rst:1660 msgid "" -"Instances of :ref:`heap-allocated types ` hold a reference to " -"their type. Their traversal function must therefore either visit :c:func:" -"`Py_TYPE(self) `, or delegate this responsibility by calling " -"``tp_traverse`` of another heap-allocated type (such as a heap-allocated " -"superclass). If they do not, the type object may not be garbage-collected." +"Python will not automatically clear an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." msgstr "" -#: c-api/typeobj.rst:1434 +#: c-api/typeobj.rst:1663 msgid "" -"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " -"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." +"Python will not automatically clear an object if it has not been " +"automatically finalized (see :c:member:`~PyTypeObject.tp_finalize`). (If " +"the finalizer resurrected the object, the object may or may not be " +"automatically finalized again before it is cleared.)" msgstr "" -#: c-api/typeobj.rst:1443 +#: c-api/typeobj.rst:1667 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" -"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " -"are all inherited from the base type if they are all zero in the subtype." +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically clear it if any member of the cyclic isolate has not yet been " +"automatically finalized (:c:member:`~PyTypeObject.tp_finalize`)." msgstr "" -#: c-api/typeobj.rst:1451 +#: c-api/typeobj.rst:1670 msgid "" -"An optional pointer to a clear function for the garbage collector. This is " -"only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " -"signature is::" +"Python will not destroy an object until after any automatic calls to " +"its :c:member:`!tp_clear` function have returned. This ensures that the act " +"of breaking a reference cycle does not invalidate the ``self`` pointer " +"while :c:member:`!tp_clear` is still executing." msgstr "" -#: c-api/typeobj.rst:1456 +#: c-api/typeobj.rst:1674 msgid "" -"The :c:member:`~PyTypeObject.tp_clear` member function is used to break " -"reference cycles in cyclic garbage detected by the garbage collector. Taken " -"together, all :c:member:`~PyTypeObject.tp_clear` functions in the system " -"must combine to break all reference cycles. This is subtle, and if in any " -"doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For example, " -"the tuple type does not implement a :c:member:`~PyTypeObject.tp_clear` " -"function, because it's possible to prove that no reference cycle can be " -"composed entirely of tuples. Therefore the :c:member:`~PyTypeObject." -"tp_clear` functions of other types must be sufficient to break any cycle " -"containing a tuple. This isn't immediately obvious, and there's rarely a " -"good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." +"Python will not automatically call :c:member:`!tp_clear` multiple times " +"concurrently." msgstr "" -#: c-api/typeobj.rst:1466 +#: c-api/typeobj.rst:1677 +msgid "" +"CPython currently only automatically clears objects as needed to break " +"reference cycles in a :term:`cyclic isolate`, but future versions might " +"clear objects regularly before their destruction." +msgstr "" + +#: c-api/typeobj.rst:1681 +msgid "" +"Taken together, all :c:member:`~PyTypeObject.tp_clear` functions in the " +"system must combine to break all reference cycles. This is subtle, and if " +"in any doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For " +"example, the tuple type does not implement " +"a :c:member:`~PyTypeObject.tp_clear` function, because it's possible to " +"prove that no reference cycle can be composed entirely of tuples. Therefore " +"the :c:member:`~PyTypeObject.tp_clear` functions of other types are " +"responsible for breaking any cycle containing a tuple. This isn't " +"immediately obvious, and there's rarely a good reason to avoid " +"implementing :c:member:`~PyTypeObject.tp_clear`." +msgstr "" + +#: c-api/typeobj.rst:1692 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2200,12 +2486,12 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1480 +#: c-api/typeobj.rst:1707 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " -"delicate: the reference to the contained object must not be released (via :" -"c:func:`Py_DECREF`) until after the pointer to the contained object is set " -"to ``NULL``. This is because releasing the reference may cause the " +"delicate: the reference to the contained object must not be released " +"(via :c:func:`Py_DECREF`) until after the pointer to the contained object is " +"set to ``NULL``. This is because releasing the reference may cause the " "contained object to become trash, triggering a chain of reclamation activity " "that may include invoking arbitrary Python code (due to finalizers, or " "weakref callbacks, associated with the contained object). If it's possible " @@ -2215,51 +2501,41 @@ msgid "" "performs the operations in a safe order." msgstr "" -#: c-api/typeobj.rst:1492 -msgid "" -"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" -"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" -"`PyObject_ClearManagedDict` like this::" -msgstr "" - -#: c-api/typeobj.rst:1498 +#: c-api/typeobj.rst:1719 msgid "" -"Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " -"an instance is deallocated. For example, when reference counting is enough " -"to determine that an object is no longer used, the cyclic garbage collector " -"is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in " +"the :c:member:`~PyTypeObject.tp_flags` field, the clear function must " +"call :c:func:`PyObject_ClearManagedDict` like this::" msgstr "" -#: c-api/typeobj.rst:1504 +#: c-api/typeobj.rst:1725 msgid "" -"Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " -"reference cycles, it's not necessary to clear contained objects like Python " -"strings or Python integers, which can't participate in reference cycles. On " -"the other hand, it may be convenient to clear all contained Python objects, " -"and write the type's :c:member:`~PyTypeObject.tp_dealloc` function to " -"invoke :c:member:`~PyTypeObject.tp_clear`." +"More information about Python's garbage collection scheme can be found in " +"section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1517 +#: c-api/typeobj.rst:1732 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" -"c:member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " -"are all inherited from the base type if they are all zero in the subtype." +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_traverse` and " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag " +"bit, :c:member:`~PyTypeObject.tp_traverse`, " +"and :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type " +"if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1525 +#: c-api/typeobj.rst:1746 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1529 +#: c-api/typeobj.rst:1750 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: c-api/typeobj.rst:1532 +#: c-api/typeobj.rst:1753 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2267,50 +2543,51 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1537 +#: c-api/typeobj.rst:1758 msgid "" -"The following constants are defined to be used as the third argument for :c:" -"member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" +"The following constants are defined to be used as the third argument " +"for :c:member:`~PyTypeObject.tp_richcompare` and " +"for :c:func:`PyObject_RichCompare`:" msgstr "" -#: c-api/typeobj.rst:1543 +#: c-api/typeobj.rst:1764 msgid "Constant" msgstr "Constante" -#: c-api/typeobj.rst:1543 +#: c-api/typeobj.rst:1764 msgid "Comparison" msgstr "Comparaison" -#: c-api/typeobj.rst:1545 +#: c-api/typeobj.rst:1766 msgid "``<``" msgstr "``<``" -#: c-api/typeobj.rst:1547 +#: c-api/typeobj.rst:1768 msgid "``<=``" msgstr "``<=``" -#: c-api/typeobj.rst:1549 +#: c-api/typeobj.rst:1770 msgid "``==``" msgstr "``==``" -#: c-api/typeobj.rst:1551 +#: c-api/typeobj.rst:1772 msgid "``!=``" msgstr "``!=``" -#: c-api/typeobj.rst:1553 +#: c-api/typeobj.rst:1774 msgid "``>``" msgstr "``>``" -#: c-api/typeobj.rst:1555 +#: c-api/typeobj.rst:1776 msgid "``>=``" msgstr "``>=``" -#: c-api/typeobj.rst:1558 +#: c-api/typeobj.rst:1779 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1562 +#: c-api/typeobj.rst:1783 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2318,60 +2595,62 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1568 +#: c-api/typeobj.rst:1789 msgid "The returned value is a new :term:`strong reference`." msgstr "" -#: c-api/typeobj.rst:1570 +#: c-api/typeobj.rst:1791 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1578 +#: c-api/typeobj.rst:1799 msgid "" -"This field is inherited by subtypes together with :c:member:`~PyTypeObject." -"tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" -"member:`~PyTypeObject.tp_hash` when the subtype's :c:member:`~PyTypeObject." -"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." +"This field is inherited by subtypes together " +"with :c:member:`~PyTypeObject.tp_hash`: a subtype " +"inherits :c:member:`~PyTypeObject.tp_richcompare` " +"and :c:member:`~PyTypeObject.tp_hash` when the " +"subtype's :c:member:`~PyTypeObject.tp_richcompare` " +"and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1585 +#: c-api/typeobj.rst:1806 msgid "" -":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." -"tp_richcompare` implementation, which may be inherited. However, if only :c:" -"member:`~PyTypeObject.tp_hash` is defined, not even the inherited function " -"is used and instances of the type will not be able to participate in any " -"comparisons." +":c:data:`PyBaseObject_Type` provides " +"a :c:member:`~PyTypeObject.tp_richcompare` implementation, which may be " +"inherited. However, if only :c:member:`~PyTypeObject.tp_hash` is defined, " +"not even the inherited function is used and instances of the type will not " +"be able to participate in any comparisons." msgstr "" -#: c-api/typeobj.rst:1594 +#: c-api/typeobj.rst:1815 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: c-api/typeobj.rst:1597 +#: c-api/typeobj.rst:1818 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " "weak reference list head (ignoring the GC header, if present); this offset " "is used by :c:func:`PyObject_ClearWeakRefs` and the ``PyWeakref_*`` " -"functions. The instance structure needs to include a field of type :c:expr:" -"`PyObject*` which is initialized to ``NULL``." +"functions. The instance structure needs to include a field of " +"type :c:expr:`PyObject*` which is initialized to ``NULL``." msgstr "" -#: c-api/typeobj.rst:1604 +#: c-api/typeobj.rst:1825 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: c-api/typeobj.rst:1607 +#: c-api/typeobj.rst:1828 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: c-api/typeobj.rst:1612 +#: c-api/typeobj.rst:1833 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2380,107 +2659,108 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1619 +#: c-api/typeobj.rst:1840 msgid "" -"If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" -"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject." -"tp_weaklistoffset` will be set to a negative value, to indicate that it is " -"unsafe to use this field." +"If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in " +"the :c:member:`~PyTypeObject.tp_flags` field, " +"then :c:member:`~PyTypeObject.tp_weaklistoffset` will be set to a negative " +"value, to indicate that it is unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:1627 +#: c-api/typeobj.rst:1850 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " -"object. Its presence normally signals that the instances of this type are :" -"term:`iterable` (although sequences may be iterable without this function)." +"object. Its presence normally signals that the instances of this type " +"are :term:`iterable` (although sequences may be iterable without this " +"function)." msgstr "" -#: c-api/typeobj.rst:1631 +#: c-api/typeobj.rst:1854 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1642 +#: c-api/typeobj.rst:1867 msgid "" -"An optional pointer to a function that returns the next item in an :term:" -"`iterator`. The signature is::" +"An optional pointer to a function that returns the next item in " +"an :term:`iterator`. The signature is::" msgstr "" -#: c-api/typeobj.rst:1647 +#: c-api/typeobj.rst:1872 msgid "" -"When the iterator is exhausted, it must return ``NULL``; a :exc:" -"`StopIteration` exception may or may not be set. When another error occurs, " -"it must return ``NULL`` too. Its presence signals that the instances of " -"this type are iterators." +"When the iterator is exhausted, it must return ``NULL``; " +"a :exc:`StopIteration` exception may or may not be set. When another error " +"occurs, it must return ``NULL`` too. Its presence signals that the " +"instances of this type are iterators." msgstr "" -#: c-api/typeobj.rst:1652 +#: c-api/typeobj.rst:1877 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: c-api/typeobj.rst:1656 +#: c-api/typeobj.rst:1881 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1665 +#: c-api/typeobj.rst:1892 msgid "" -"An optional pointer to a static ``NULL``-terminated array of :c:type:" -"`PyMethodDef` structures, declaring regular methods of this type." +"An optional pointer to a static ``NULL``-terminated array " +"of :c:type:`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: c-api/typeobj.rst:1668 +#: c-api/typeobj.rst:1895 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: c-api/typeobj.rst:1673 +#: c-api/typeobj.rst:1900 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1679 +#: c-api/typeobj.rst:1908 msgid "" -"An optional pointer to a static ``NULL``-terminated array of :c:type:" -"`PyMemberDef` structures, declaring regular data members (fields or slots) " -"of instances of this type." +"An optional pointer to a static ``NULL``-terminated array " +"of :c:type:`PyMemberDef` structures, declaring regular data members (fields " +"or slots) of instances of this type." msgstr "" -#: c-api/typeobj.rst:1683 +#: c-api/typeobj.rst:1912 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: c-api/typeobj.rst:1688 +#: c-api/typeobj.rst:1917 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1694 +#: c-api/typeobj.rst:1925 msgid "" -"An optional pointer to a static ``NULL``-terminated array of :c:type:" -"`PyGetSetDef` structures, declaring computed attributes of instances of this " -"type." +"An optional pointer to a static ``NULL``-terminated array " +"of :c:type:`PyGetSetDef` structures, declaring computed attributes of " +"instances of this type." msgstr "" -#: c-api/typeobj.rst:1697 +#: c-api/typeobj.rst:1928 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: c-api/typeobj.rst:1702 +#: c-api/typeobj.rst:1933 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1708 +#: c-api/typeobj.rst:1941 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2488,7 +2768,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1716 +#: c-api/typeobj.rst:1949 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2496,162 +2776,165 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1721 +#: c-api/typeobj.rst:1954 msgid "" -"However, the unary '&' operator applied to a non-static variable like :c:" -"data:`PyBaseObject_Type` is not required to produce an address constant. " -"Compilers may support this (gcc does), MSVC does not. Both compilers are " -"strictly standard conforming in this particular behavior." +"However, the unary '&' operator applied to a non-static variable " +"like :c:data:`PyBaseObject_Type` is not required to produce an address " +"constant. Compilers may support this (gcc does), MSVC does not. Both " +"compilers are strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1727 +#: c-api/typeobj.rst:1960 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: c-api/typeobj.rst:1732 +#: c-api/typeobj.rst:1965 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1736 +#: c-api/typeobj.rst:1969 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: c-api/typeobj.rst:1742 +#: c-api/typeobj.rst:1975 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1744 +#: c-api/typeobj.rst:1977 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " "attributes for the type. Once :c:func:`PyType_Ready` has initialized the " "type, extra attributes for the type may be added to this dictionary only if " -"they don't correspond to overloaded operations (like :meth:`~object." -"__add__`). Once initialization for the type has finished, this field should " -"be treated as read-only." +"they don't correspond to overloaded operations " +"(like :meth:`~object.__add__`). Once initialization for the type has " +"finished, this field should be treated as read-only." msgstr "" -#: c-api/typeobj.rst:1752 +#: c-api/typeobj.rst:1985 msgid "" -"Some types may not store their dictionary in this slot. Use :c:func:" -"`PyType_GetDict` to retrieve the dictionary for an arbitrary type." +"Some types may not store their dictionary in this slot. " +"Use :c:func:`PyType_GetDict` to retrieve the dictionary for an arbitrary " +"type." msgstr "" -#: c-api/typeobj.rst:1758 +#: c-api/typeobj.rst:1991 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " -"Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" -"func:`PyType_GetDict` to get the dict for an arbitrary type." +"Instead, the dict for such types is stored on ``PyInterpreterState``. " +"Use :c:func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: c-api/typeobj.rst:1764 +#: c-api/typeobj.rst:1997 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1769 +#: c-api/typeobj.rst:2002 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: c-api/typeobj.rst:1774 +#: c-api/typeobj.rst:2007 msgid "" -"It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" -"member:`~PyTypeObject.tp_dict` with the dictionary C-API." +"It is not safe to use :c:func:`PyDict_SetItem` on or otherwise " +"modify :c:member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: c-api/typeobj.rst:1780 +#: c-api/typeobj.rst:2015 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1798 c-api/typeobj.rst:1892 c-api/typeobj.rst:1916 +#: c-api/typeobj.rst:2035 c-api/typeobj.rst:2133 c-api/typeobj.rst:2158 msgid "The function signature is::" msgstr "" -#: c-api/typeobj.rst:1795 +#: c-api/typeobj.rst:2032 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: c-api/typeobj.rst:1802 +#: c-api/typeobj.rst:2039 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:1813 +#: c-api/typeobj.rst:2050 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: c-api/typeobj.rst:1816 +#: c-api/typeobj.rst:2053 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " -"of the type of the instance variable dictionary; this offset is used by :c:" -"func:`PyObject_GenericGetAttr`." +"of the type of the instance variable dictionary; this offset is used " +"by :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1821 +#: c-api/typeobj.rst:2058 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: c-api/typeobj.rst:1824 +#: c-api/typeobj.rst:2061 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: c-api/typeobj.rst:1826 +#: c-api/typeobj.rst:2063 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" -"only. To get the pointer to the dictionary call :c:func:" -"`PyObject_GenericGetDict`. Calling :c:func:`PyObject_GenericGetDict` may " -"need to allocate memory for the dictionary, so it is may be more efficient " -"to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." +"only. To get the pointer to the dictionary " +"call :c:func:`PyObject_GenericGetDict`. " +"Calling :c:func:`PyObject_GenericGetDict` may need to allocate memory for " +"the dictionary, so it is may be more efficient to " +"call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: c-api/typeobj.rst:1832 +#: c-api/typeobj.rst:2069 msgid "" -"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " +"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit " "and :c:member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: c-api/typeobj.rst:1837 +#: c-api/typeobj.rst:2074 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " -"at the previous offset. To properly support inheritance, use :c:macro:" -"`Py_TPFLAGS_MANAGED_DICT`." +"at the previous offset. To properly support inheritance, " +"use :c:macro:`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: c-api/typeobj.rst:1844 +#: c-api/typeobj.rst:2081 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" -#: c-api/typeobj.rst:1847 +#: c-api/typeobj.rst:2084 msgid "" -"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" -"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " -"will be set to ``-1``, to indicate that it is unsafe to use this field." +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in " +"the :c:member:`~PyTypeObject.tp_flags` field, " +"then :c:member:`~PyTypeObject.tp_dictoffset` will be set to ``-1``, to " +"indicate that it is unsafe to use this field." msgstr "" -#: c-api/typeobj.rst:1855 +#: c-api/typeobj.rst:2094 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:1857 +#: c-api/typeobj.rst:2096 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -2659,96 +2942,97 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: c-api/typeobj.rst:1866 +#: c-api/typeobj.rst:2105 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " -"arguments represent positional and keyword arguments of the call to :meth:" -"`~object.__init__`." +"arguments represent positional and keyword arguments of the call " +"to :meth:`~object.__init__`." msgstr "" -#: c-api/typeobj.rst:1870 +#: c-api/typeobj.rst:2109 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " -"when an instance is created normally by calling its type, after the type's :" -"c:member:`~PyTypeObject.tp_new` function has returned an instance of the " -"type. If the :c:member:`~PyTypeObject.tp_new` function returns an instance " -"of some other type that is not a subtype of the original type, no :c:member:" -"`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject." -"tp_new` returns an instance of a subtype of the original type, the " -"subtype's :c:member:`~PyTypeObject.tp_init` is called." +"when an instance is created normally by calling its type, after the " +"type's :c:member:`~PyTypeObject.tp_new` function has returned an instance of " +"the type. If the :c:member:`~PyTypeObject.tp_new` function returns an " +"instance of some other type that is not a subtype of the original type, " +"no :c:member:`~PyTypeObject.tp_init` function is called; " +"if :c:member:`~PyTypeObject.tp_new` returns an instance of a subtype of the " +"original type, the subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:1877 +#: c-api/typeobj.rst:2116 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:1885 +#: c-api/typeobj.rst:2124 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: c-api/typeobj.rst:1890 +#: c-api/typeobj.rst:2131 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:1898 +#: c-api/typeobj.rst:2139 msgid "" -"This field is inherited by static subtypes, but not by dynamic subtypes " -"(subtypes created by a class statement)." +"Static subtypes inherit this slot, which will " +"be :c:func:`PyType_GenericAlloc` if inherited from :class:`object`." msgstr "" -#: c-api/typeobj.rst:1903 -msgid "" -"For dynamic subtypes, this field is always set to :c:func:" -"`PyType_GenericAlloc`, to force a standard heap allocation strategy." +#: c-api/typeobj.rst:2213 +msgid ":ref:`Heap subtypes ` do not inherit this slot." msgstr "" -#: c-api/typeobj.rst:1907 +#: c-api/typeobj.rst:2146 msgid "" -"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" -"`PyType_GenericAlloc`. That is the recommended value for all statically " -"defined types." +"For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." msgstr "" -#: c-api/typeobj.rst:1914 +#: c-api/typeobj.rst:2221 +msgid "For static subtypes, this slot is inherited (see above)." +msgstr "" + +#: c-api/typeobj.rst:2156 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:1920 +#: c-api/typeobj.rst:2162 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " -"to the type. Note that *subtype* doesn't have to equal the type whose :c:" -"member:`~PyTypeObject.tp_new` function is called; it may be a subtype of " -"that type (but not an unrelated type)." +"to the type. Note that *subtype* doesn't have to equal the type " +"whose :c:member:`~PyTypeObject.tp_new` function is called; it may be a " +"subtype of that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:1926 +#: c-api/typeobj.rst:2168 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " "only as much further initialization as is absolutely necessary. " "Initialization that can safely be ignored or repeated should be placed in " "the :c:member:`~PyTypeObject.tp_init` handler. A good rule of thumb is that " -"for immutable types, all initialization should take place in :c:member:" -"`~PyTypeObject.tp_new`, while for mutable types, most initialization should " -"be deferred to :c:member:`~PyTypeObject.tp_init`." +"for immutable types, all initialization should take place " +"in :c:member:`~PyTypeObject.tp_new`, while for mutable types, most " +"initialization should be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:1934 +#: c-api/typeobj.rst:2176 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: c-api/typeobj.rst:1939 +#: c-api/typeobj.rst:2181 msgid "" -"This field is inherited by subtypes, except it is not inherited by :ref:" -"`static types ` whose :c:member:`~PyTypeObject.tp_base` is " -"``NULL`` or ``&PyBaseObject_Type``." +"This field is inherited by subtypes, except it is not inherited " +"by :ref:`static types ` " +"whose :c:member:`~PyTypeObject.tp_base` is ``NULL`` or " +"``&PyBaseObject_Type``." msgstr "" -#: c-api/typeobj.rst:1945 +#: c-api/typeobj.rst:2187 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -2756,132 +3040,131 @@ msgid "" "factory function." msgstr "" -#: c-api/typeobj.rst:1953 +#: c-api/typeobj.rst:2197 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1957 +#: c-api/typeobj.rst:2201 msgid "" -"An initializer that is compatible with this signature is :c:func:" -"`PyObject_Free`." +"This function must free the memory allocated " +"by :c:member:`~PyTypeObject.tp_alloc`." msgstr "" -#: c-api/typeobj.rst:1961 +#: c-api/typeobj.rst:2206 msgid "" -"This field is inherited by static subtypes, but not by dynamic subtypes " -"(subtypes created by a class statement)" +"Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " +"inherited from :class:`object`. Exception: If the type supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set " +"in :c:member:`~PyTypeObject.tp_flags`) and it would " +"inherit :c:func:`PyObject_Free`, then this slot is not inherited but instead " +"defaults to :c:func:`PyObject_GC_Del`." msgstr "" -#: c-api/typeobj.rst:1966 +#: c-api/typeobj.rst:2217 msgid "" -"In dynamic subtypes, this field is set to a deallocator suitable to match :c:" -"func:`PyType_GenericAlloc` and the value of the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit." +"For :ref:`heap subtypes `, this slot defaults to a deallocator " +"suitable to match :c:func:`PyType_GenericAlloc` and the value of " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: c-api/typeobj.rst:1970 -msgid "" -"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`." -msgstr "" - -#: c-api/typeobj.rst:1975 +#: c-api/typeobj.rst:2228 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:1977 +#: c-api/typeobj.rst:2230 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " -"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture of statically " -"and dynamically allocated instances, and the statically allocated instances " -"are not collectible. Such types should define this function; it should " -"return ``1`` for a collectible instance, and ``0`` for a non-collectible " -"instance. The signature is::" +"type's :c:member:`~PyTypeObject.tp_flags` field, and check " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture " +"of statically and dynamically allocated instances, and the statically " +"allocated instances are not collectible. Such types should define this " +"function; it should return ``1`` for a collectible instance, and ``0`` for a " +"non-collectible instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:1987 +#: c-api/typeobj.rst:2240 msgid "" -"(The only example of this are types themselves. The metatype, :c:data:" -"`PyType_Type`, defines this function to distinguish between statically and :" -"ref:`dynamically allocated types `.)" +"(The only example of this are types themselves. The " +"metatype, :c:data:`PyType_Type`, defines this function to distinguish " +"between statically and :ref:`dynamically allocated types `.)" msgstr "" -#: c-api/typeobj.rst:1997 +#: c-api/typeobj.rst:2250 msgid "" -"This slot has no default. If this field is ``NULL``, :c:macro:" -"`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." +"This slot has no default. If this field is " +"``NULL``, :c:macro:`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: c-api/typeobj.rst:2003 +#: c-api/typeobj.rst:2258 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:2029 +#: c-api/typeobj.rst:2284 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: c-api/typeobj.rst:2008 +#: c-api/typeobj.rst:2263 msgid "" -"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " -"` can be used instead of the *bases* argument of :c:func:" -"`PyType_FromSpecWithBases`. The argument form is preferred." +"For dynamically created classes, the :c:data:`Py_tp_bases` :c:type:`slot " +"` can be used instead of the *bases* argument " +"of :c:func:`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: c-api/typeobj.rst:2015 +#: c-api/typeobj.rst:2270 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: c-api/typeobj.rst:2044 c-api/typeobj.rst:2078 c-api/typeobj.rst:2092 +#: c-api/typeobj.rst:2299 c-api/typeobj.rst:2333 c-api/typeobj.rst:2349 msgid "This field is not inherited." msgstr "" -#: c-api/typeobj.rst:2026 +#: c-api/typeobj.rst:2281 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: c-api/typeobj.rst:2034 +#: c-api/typeobj.rst:2289 msgid "" -"This field is not inherited; it is calculated fresh by :c:func:" -"`PyType_Ready`." +"This field is not inherited; it is calculated fresh " +"by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:2040 +#: c-api/typeobj.rst:2295 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:2049 +#: c-api/typeobj.rst:2304 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: c-api/typeobj.rst:2051 +#: c-api/typeobj.rst:2306 msgid "" -"To get a list of subclasses, call the Python method :py:meth:`~type." -"__subclasses__`." +"To get a list of subclasses, call the Python " +"method :py:meth:`~type.__subclasses__`." msgstr "" -#: c-api/typeobj.rst:2056 +#: c-api/typeobj.rst:2311 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: c-api/typeobj.rst:2066 +#: c-api/typeobj.rst:2321 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: c-api/typeobj.rst:2071 +#: c-api/typeobj.rst:2326 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -2889,145 +3172,357 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: c-api/typeobj.rst:2083 +#: c-api/typeobj.rst:2340 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:2088 +#: c-api/typeobj.rst:2345 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:2097 +#: c-api/typeobj.rst:2356 +msgid "" +"An optional pointer to an instance finalization function. This is the C " +"implementation of the :meth:`~object.__del__` special method. Its signature " +"is::" +msgstr "" + +#: c-api/typeobj.rst:2362 +msgid "" +"The primary purpose of finalization is to perform any non-trivial cleanup " +"that must be performed before the object is destroyed, while the object and " +"any other objects it directly or indirectly references are still in a " +"consistent state. The finalizer is allowed to execute arbitrary Python code." +msgstr "" + +#: c-api/typeobj.rst:2368 +msgid "" +"Before Python automatically finalizes an object, some of the object's direct " +"or indirect referents might have themselves been automatically finalized. " +"However, none of the referents will have been automatically cleared " +"(:c:member:`~PyTypeObject.tp_clear`) yet." +msgstr "" + +#: c-api/typeobj.rst:2373 +msgid "" +"Other non-finalized objects might still be using a finalized object, so the " +"finalizer must leave the object in a sane state (e.g., invariants are still " +"met)." +msgstr "" + +#: c-api/typeobj.rst:2379 +msgid "" +"After Python automatically finalizes an object, Python might start " +"automatically clearing (:c:member:`~PyTypeObject.tp_clear`) the object and " +"its referents (direct and indirect). Cleared objects are not guaranteed to " +"be in a consistent state; a finalized object must be able to tolerate " +"cleared referents." +msgstr "" + +#: c-api/typeobj.rst:2387 +msgid "" +"An object is not guaranteed to be automatically finalized before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called. It is " +"recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +#: c-api/typeobj.rst:2395 +msgid "" +"The :c:member:`~PyTypeObject.tp_finalize` function can be called from any " +"thread, although the :term:`GIL` will be held." +msgstr "" + +#: c-api/typeobj.rst:2400 +msgid "" +"The :c:member:`!tp_finalize` function can be called during shutdown, after " +"some global variables have been deleted. See the documentation of " +"the :meth:`~object.__del__` method for details." +msgstr "" + +#: c-api/typeobj.rst:2404 +msgid "" +"When Python finalizes an object, it behaves like the following algorithm:" +msgstr "" + +#: c-api/typeobj.rst:2406 +msgid "" +"Python might mark the object as *finalized*. Currently, Python always marks " +"objects whose type supports garbage collection (i.e., " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set " +"in :c:member:`~PyTypeObject.tp_flags`) and never marks other types of " +"objects; this might change in a future version." +msgstr "" + +#: c-api/typeobj.rst:2411 +msgid "" +"If the object is not marked as *finalized* and its :c:member:`!tp_finalize` " +"finalizer function is non-``NULL``, the finalizer function is called." +msgstr "" + +#: c-api/typeobj.rst:2414 +msgid "" +"If the finalizer function was called and the finalizer made the object " +"reachable (i.e., there is a reference to the object and it is not a member " +"of a :term:`cyclic isolate`), then the finalizer is said to have " +"*resurrected* the object. It is unspecified whether the finalizer can also " +"resurrect the object by adding a new reference to the object that does not " +"make it reachable, i.e., the object is (still) a member of a cyclic isolate." +msgstr "" + +#: c-api/typeobj.rst:2421 msgid "" -"An optional pointer to an instance finalization function. Its signature is::" +"If the finalizer resurrected the object, the object's pending destruction is " +"canceled and the object's *finalized* mark might be removed if present. " +"Currently, Python never removes the *finalized* mark; this might change in a " +"future version." msgstr "" -#: c-api/typeobj.rst:2101 +#: c-api/typeobj.rst:2426 msgid "" -"If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " -"once when finalizing an instance. It is called either from the garbage " -"collector (if the instance is part of an isolated reference cycle) or just " -"before the object is deallocated. Either way, it is guaranteed to be called " -"before attempting to break reference cycles, ensuring that it finds the " -"object in a sane state." +"*Automatic finalization* refers to any finalization performed by Python " +"except via calls to :c:func:`PyObject_CallFinalizer` " +"or :c:func:`PyObject_CallFinalizerFromDealloc`. No guarantees are made " +"about when, if, or how often an object is automatically finalized, except:" msgstr "" -#: c-api/typeobj.rst:2108 +#: c-api/typeobj.rst:2431 msgid "" -":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " -"exception status; therefore, a recommended way to write a non-trivial " -"finalizer is::" +"Python will not automatically finalize an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." msgstr "" -#: c-api/typeobj.rst:2133 +#: c-api/typeobj.rst:2434 msgid "" -"Before version 3.8 it was necessary to set the :c:macro:" -"`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " -"This is no longer required." +"Python will not automatically finalize an object if finalizing it would not " +"mark the object as *finalized*. Currently, this applies to objects whose " +"type does not support garbage collection, i.e., " +"the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is not set. Such objects can still " +"be manually finalized by calling :c:func:`PyObject_CallFinalizer` " +"or :c:func:`PyObject_CallFinalizerFromDealloc`." msgstr "" -#: c-api/typeobj.rst:2137 -msgid "\"Safe object finalization\" (:pep:`442`)" +#: c-api/typeobj.rst:2440 +msgid "" +"Python will not automatically finalize any two members of a :term:`cyclic " +"isolate` concurrently." +msgstr "" + +#: c-api/typeobj.rst:2442 +msgid "" +"Python will not automatically finalize an object after it has automatically " +"cleared (:c:member:`~PyTypeObject.tp_clear`) the object." +msgstr "" + +#: c-api/typeobj.rst:2444 +msgid "" +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically finalize it after automatically clearing " +"(see :c:member:`~PyTypeObject.tp_clear`) any other member." +msgstr "" + +#: c-api/typeobj.rst:2447 +msgid "" +"Python will automatically finalize every member of a :term:`cyclic isolate` " +"before it automatically clears (see :c:member:`~PyTypeObject.tp_clear`) any " +"of them." +msgstr "" + +#: c-api/typeobj.rst:2450 +msgid "" +"If Python is going to automatically clear an object " +"(:c:member:`~PyTypeObject.tp_clear`), it will automatically finalize the " +"object first." +msgstr "" + +#: c-api/typeobj.rst:2454 +msgid "" +"Python currently only automatically finalizes objects that are members of " +"a :term:`cyclic isolate`, but future versions might finalize objects " +"regularly before their destruction." msgstr "" -#: c-api/typeobj.rst:2142 +#: c-api/typeobj.rst:2458 msgid "" -"Vectorcall function to use for calls of this type object. In other words, it " -"is used to implement :ref:`vectorcall ` for ``type.__call__``. " -"If ``tp_vectorcall`` is ``NULL``, the default call implementation using :" -"meth:`~object.__new__` and :meth:`~object.__init__` is used." +"To manually finalize an object, do not call this function directly; " +"call :c:func:`PyObject_CallFinalizer` " +"or :c:func:`PyObject_CallFinalizerFromDealloc` instead." msgstr "" -#: c-api/typeobj.rst:2150 +#: c-api/typeobj.rst:2462 +msgid "" +":c:member:`~PyTypeObject.tp_finalize` should leave the current exception " +"status unchanged. The recommended way to write a non-trivial finalizer is " +"to back up the exception at the beginning by " +"calling :c:func:`PyErr_GetRaisedException` and restore the exception at the " +"end by calling :c:func:`PyErr_SetRaisedException`. If an exception is " +"encountered in the middle of the finalizer, log and clear it " +"with :c:func:`PyErr_WriteUnraisable` or :c:func:`PyErr_FormatUnraisable`. " +"For example::" +msgstr "" + +#: c-api/typeobj.rst:2499 +msgid "" +"Before version 3.8 it was necessary to set " +"the :c:macro:`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to " +"be used. This is no longer required." +msgstr "" + +#: c-api/typeobj.rst:2505 +msgid ":pep:`442`: \"Safe object finalization\"" +msgstr "" + +#: c-api/typeobj.rst:2508 +msgid ":c:func:`PyObject_CallFinalizer`" +msgstr "" + +#: c-api/typeobj.rst:2509 +msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" +msgstr "" + +#: c-api/typeobj.rst:2516 +msgid "" +"A :ref:`vectorcall function ` to use for calls of this type " +"object (rather than instances). In other words, ``tp_vectorcall`` can be " +"used to optimize ``type.__call__``, which typically returns a new instance " +"of *type*." +msgstr "" + +#: c-api/typeobj.rst:2521 +msgid "" +"As with any vectorcall function, if ``tp_vectorcall`` is ``NULL``, the " +"*tp_call* protocol (``Py_TYPE(type)->tp_call``) is used instead." +msgstr "" + +#: c-api/typeobj.rst:2526 +msgid "" +"The :ref:`vectorcall protocol ` requires that the vectorcall " +"function has the same behavior as the corresponding ``tp_call``. This means " +"that ``type->tp_vectorcall`` must match the behavior of ``Py_TYPE(type)-" +">tp_call``." +msgstr "" + +#: c-api/typeobj.rst:2531 +msgid "" +"Specifically, if *type* uses the default metaclass, ``type->tp_vectorcall`` " +"must behave the same as :c:expr:`PyType_Type->tp_call`, which:" +msgstr "" + +#: c-api/typeobj.rst:2535 +msgid "calls ``type->tp_new``," +msgstr "" + +#: c-api/typeobj.rst:2537 +msgid "" +"if the result is a subclass of *type*, calls ``type->tp_init`` on the result " +"of ``tp_new``, and" +msgstr "" + +#: c-api/typeobj.rst:2540 +msgid "returns the result of ``tp_new``." +msgstr "" + +#: c-api/typeobj.rst:2542 +msgid "" +"Typically, ``tp_vectorcall`` is overridden to optimize this process for " +"specific :c:member:`~PyTypeObject.tp_new` " +"and :c:member:`~PyTypeObject.tp_init`. When doing this for user-subclassable " +"types, note that both can be overridden (using :py:func:`~object.__new__` " +"and :py:func:`~object.__init__`, respectively)." +msgstr "" + +#: c-api/typeobj.rst:2553 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:2152 +#: c-api/typeobj.rst:2555 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: c-api/typeobj.rst:2157 +#: c-api/typeobj.rst:2560 msgid "Internal. Do not use." msgstr "" -#: c-api/typeobj.rst:2165 +#: c-api/typeobj.rst:2568 msgid "Static Types" msgstr "" -#: c-api/typeobj.rst:2167 +#: c-api/typeobj.rst:2570 msgid "" -"Traditionally, types defined in C code are *static*, that is, a static :c:" -"type:`PyTypeObject` structure is defined directly in code and initialized " -"using :c:func:`PyType_Ready`." +"Traditionally, types defined in C code are *static*, that is, a " +"static :c:type:`PyTypeObject` structure is defined directly in code and " +"initialized using :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:2171 +#: c-api/typeobj.rst:2574 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:2173 +#: c-api/typeobj.rst:2576 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: c-api/typeobj.rst:2175 +#: c-api/typeobj.rst:2578 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: c-api/typeobj.rst:2177 +#: c-api/typeobj.rst:2580 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: c-api/typeobj.rst:2181 +#: c-api/typeobj.rst:2584 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: c-api/typeobj.rst:2189 +#: c-api/typeobj.rst:2592 msgid "Heap Types" msgstr "" -#: c-api/typeobj.rst:2191 +#: c-api/typeobj.rst:2594 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " -"created by Python's ``class`` statement. Heap types have the :c:macro:" -"`Py_TPFLAGS_HEAPTYPE` flag set." +"created by Python's ``class`` statement. Heap types have " +"the :c:macro:`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: c-api/typeobj.rst:2196 +#: c-api/typeobj.rst:2599 msgid "" -"This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" -"func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" -"`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." +"This is done by filling a :c:type:`PyType_Spec` structure and " +"calling :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:`PyType_FromModuleAndSpec`, " +"or :c:func:`PyType_FromMetaclass`." msgstr "" -#: c-api/typeobj.rst:2204 +#: c-api/typeobj.rst:2607 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:2211 +#: c-api/typeobj.rst:2611 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: c-api/typeobj.rst:2541 +#: c-api/typeobj.rst:3089 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2264 +#: c-api/typeobj.rst:2664 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3037,81 +3532,82 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2273 +#: c-api/typeobj.rst:2673 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: c-api/typeobj.rst:2318 +#: c-api/typeobj.rst:2824 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2325 +#: c-api/typeobj.rst:2828 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: c-api/typeobj.rst:2330 +#: c-api/typeobj.rst:2835 msgid "" -"This function is used by :c:func:`PyMapping_Size` and :c:func:" -"`PyObject_Size`, and has the same signature. This slot may be set to " -"``NULL`` if the object has no defined length." +"This function is used by :c:func:`PyMapping_Size` " +"and :c:func:`PyObject_Size`, and has the same signature. This slot may be " +"set to ``NULL`` if the object has no defined length." msgstr "" -#: c-api/typeobj.rst:2336 +#: c-api/typeobj.rst:2843 msgid "" -"This function is used by :c:func:`PyObject_GetItem` and :c:func:" -"`PySequence_GetSlice`, and has the same signature as :c:func:`!" -"PyObject_GetItem`. This slot must be filled for the :c:func:" -"`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." +"This function is used by :c:func:`PyObject_GetItem` " +"and :c:func:`PySequence_GetSlice`, and has the same signature as :c:func:`!" +"PyObject_GetItem`. This slot must be filled for " +"the :c:func:`PyMapping_Check` function to return ``1``, it can be ``NULL`` " +"otherwise." msgstr "" -#: c-api/typeobj.rst:2344 +#: c-api/typeobj.rst:2853 msgid "" -"This function is used by :c:func:`PyObject_SetItem`, :c:func:" -"`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" -"`PySequence_DelSlice`. It has the same signature as :c:func:`!" +"This function is used " +"by :c:func:`PyObject_SetItem`, :c:func:`PyObject_DelItem`, :c:func:`PySequence_SetSlice` " +"and :c:func:`PySequence_DelSlice`. It has the same signature as :c:func:`!" "PyObject_SetItem`, but *v* can also be set to ``NULL`` to delete an item. " "If this slot is ``NULL``, the object does not support item assignment and " "deletion." msgstr "" -#: c-api/typeobj.rst:2355 +#: c-api/typeobj.rst:2864 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2362 +#: c-api/typeobj.rst:2868 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: c-api/typeobj.rst:2367 +#: c-api/typeobj.rst:2875 msgid "" -"This function is used by :c:func:`PySequence_Size` and :c:func:" -"`PyObject_Size`, and has the same signature. It is also used for handling " -"negative indices via the :c:member:`~PySequenceMethods.sq_item` and the :c:" -"member:`~PySequenceMethods.sq_ass_item` slots." +"This function is used by :c:func:`PySequence_Size` " +"and :c:func:`PyObject_Size`, and has the same signature. It is also used " +"for handling negative indices via the :c:member:`~PySequenceMethods.sq_item` " +"and the :c:member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2374 +#: c-api/typeobj.rst:2884 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: c-api/typeobj.rst:2380 +#: c-api/typeobj.rst:2892 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2386 +#: c-api/typeobj.rst:2900 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3120,42 +3616,43 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2392 +#: c-api/typeobj.rst:2906 msgid "" -"Negative indexes are handled as follows: if the :c:member:" -"`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " -"length is used to compute a positive index which is passed to :c:member:" -"`~PySequenceMethods.sq_item`. If :c:member:`!sq_length` is ``NULL``, the " -"index is passed as is to the function." +"Negative indexes are handled as follows: if " +"the :c:member:`~PySequenceMethods.sq_length` slot is filled, it is called " +"and the sequence length is used to compute a positive index which is passed " +"to :c:member:`~PySequenceMethods.sq_item`. If :c:member:`!sq_length` is " +"``NULL``, the index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2399 +#: c-api/typeobj.rst:2915 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " -"signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" -"`PyObject_DelItem`, after trying the item assignment and deletion via the :c:" -"member:`~PyMappingMethods.mp_ass_subscript` slot. This slot may be left to " -"``NULL`` if the object does not support item assignment and deletion." +"signature. It is also used by :c:func:`PyObject_SetItem` " +"and :c:func:`PyObject_DelItem`, after trying the item assignment and " +"deletion via the :c:member:`~PyMappingMethods.mp_ass_subscript` slot. This " +"slot may be left to ``NULL`` if the object does not support item assignment " +"and deletion." msgstr "" -#: c-api/typeobj.rst:2408 +#: c-api/typeobj.rst:2926 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: c-api/typeobj.rst:2415 +#: c-api/typeobj.rst:2935 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " "may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceConcat` " "will fall back to :c:func:`PySequence_Concat`. It is also used by the " -"augmented assignment ``+=``, after trying numeric in-place addition via the :" -"c:member:`~PyNumberMethods.nb_inplace_add` slot." +"augmented assignment ``+=``, after trying numeric in-place addition via " +"the :c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2424 +#: c-api/typeobj.rst:2946 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3165,70 +3662,104 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2435 +#: c-api/typeobj.rst:2957 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2443 +#: c-api/typeobj.rst:2961 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: c-api/typeobj.rst:2498 c-api/typeobj.rst:2563 c-api/typeobj.rst:2585 +#: c-api/typeobj.rst:3038 c-api/typeobj.rst:3115 c-api/typeobj.rst:3141 msgid "The signature of this function is::" msgstr "" -#: c-api/typeobj.rst:2453 +#: c-api/typeobj.rst:2973 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: c-api/typeobj.rst:2457 +#: c-api/typeobj.rst:2977 msgid "" -"Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" -"expr:`view->obj` to ``NULL`` and return ``-1``." +"Check if the request can be met. If not, raise :exc:`BufferError`, set " +"``view->obj`` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/typeobj.rst:2460 +#: c-api/typeobj.rst:2980 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2462 +#: c-api/typeobj.rst:2982 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2464 -msgid "" -"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." +#: c-api/typeobj.rst:2984 +msgid "Set ``view->obj`` to *exporter* and increment ``view->obj``." msgstr "" -#: c-api/typeobj.rst:2466 +#: c-api/typeobj.rst:2986 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2468 +#: c-api/typeobj.rst:3051 +msgid "**Thread safety:**" +msgstr "" + +#: c-api/typeobj.rst:2990 +msgid "In the :term:`free-threaded build`, implementations must ensure:" +msgstr "" + +#: c-api/typeobj.rst:2992 +msgid "The export counter increment in step (3) is atomic." +msgstr "" + +#: c-api/typeobj.rst:2994 +msgid "" +"The underlying buffer data remains valid and at a stable memory location for " +"the lifetime of all exports." +msgstr "" + +#: c-api/typeobj.rst:2997 +msgid "" +"For objects that support resizing or reallocation (such " +"as :class:`bytearray`), the export counter is checked atomically before such " +"operations, and :exc:`BufferError` is raised if exports exist." +msgstr "" + +#: c-api/typeobj.rst:3001 +msgid "The function is safe to call concurrently from multiple threads." +msgstr "" + +#: c-api/typeobj.rst:3003 +msgid "" +"See also :ref:`thread-safety-memoryview` for the Python-level thread safety " +"guarantees of :class:`memoryview` objects." +msgstr "" + +#: c-api/typeobj.rst:3006 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: c-api/typeobj.rst:2471 +#: c-api/typeobj.rst:3009 msgid "" -"Re-export: Each member of the tree acts as the exporting object and sets :c:" -"expr:`view->obj` to a new reference to itself." +"Re-export: Each member of the tree acts as the exporting object and sets " +"``view->obj`` to a new reference to itself." msgstr "" -#: c-api/typeobj.rst:2474 +#: c-api/typeobj.rst:3012 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " -"Here, :c:expr:`view->obj` will be a new reference to the root object." +"Here, ``view->obj`` will be a new reference to the root object." msgstr "" -#: c-api/typeobj.rst:2478 +#: c-api/typeobj.rst:3016 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3236,28 +3767,27 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2483 +#: c-api/typeobj.rst:3021 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " -"exporter and must remain valid until there are no consumers left. :c:member:" -"`~Py_buffer.format`, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." -"strides`, :c:member:`~Py_buffer.suboffsets` and :c:member:`~Py_buffer." -"internal` are read-only for the consumer." +"exporter and must remain valid until there are no consumers " +"left. :c:member:`~Py_buffer.format`, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides`, :c:member:`~Py_buffer.suboffsets` " +"and :c:member:`~Py_buffer.internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2490 +#: c-api/typeobj.rst:3028 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: c-api/typeobj.rst:2493 +#: c-api/typeobj.rst:3031 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: c-api/typeobj.rst:2502 +#: c-api/typeobj.rst:3042 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3265,15 +3795,30 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2507 +#: c-api/typeobj.rst:3047 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2509 +#: c-api/typeobj.rst:3049 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2511 +#: c-api/typeobj.rst:3053 +msgid "In the :term:`free-threaded build`:" +msgstr "" + +#: c-api/typeobj.rst:3055 +msgid "The export counter decrement in step (1) must be atomic." +msgstr "" + +#: c-api/typeobj.rst:3057 +msgid "" +"Resource cleanup when the counter reaches zero must be done atomically, as " +"the final release may race with concurrent releases from other threads and " +"dellocation must only happen once." +msgstr "" + +#: c-api/typeobj.rst:3061 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3281,155 +3826,156 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2517 +#: c-api/typeobj.rst:3067 msgid "" -"This function MUST NOT decrement :c:expr:`view->obj`, since that is done " +"This function MUST NOT decrement ``view->obj``, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: c-api/typeobj.rst:2522 +#: c-api/typeobj.rst:3072 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: c-api/typeobj.rst:2530 +#: c-api/typeobj.rst:3080 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2538 +#: c-api/typeobj.rst:3086 msgid "" -"This structure holds pointers to the functions required to implement :term:" -"`awaitable` and :term:`asynchronous iterator` objects." +"This structure holds pointers to the functions required to " +"implement :term:`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: c-api/typeobj.rst:2556 +#: c-api/typeobj.rst:3106 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: c-api/typeobj.rst:2559 +#: c-api/typeobj.rst:3109 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: c-api/typeobj.rst:2567 +#: c-api/typeobj.rst:3119 msgid "" -"Must return an :term:`asynchronous iterator` object. See :meth:`~object." -"__anext__` for details." +"Must return an :term:`asynchronous iterator` object. " +"See :meth:`~object.__anext__` for details." msgstr "" -#: c-api/typeobj.rst:2570 +#: c-api/typeobj.rst:3122 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: c-api/typeobj.rst:2579 +#: c-api/typeobj.rst:3133 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2589 +#: c-api/typeobj.rst:3145 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2598 +#: c-api/typeobj.rst:3154 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2602 +#: c-api/typeobj.rst:3158 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " "length for the instance, suitably aligned, and initialized to zeros, but " -"with :c:member:`~PyObject.ob_refcnt` set to ``1`` and :c:member:`~PyObject." -"ob_type` set to the type argument. If the type's :c:member:`~PyTypeObject." -"tp_itemsize` is non-zero, the object's :c:member:`~PyVarObject.ob_size` " -"field should be initialized to *nitems* and the length of the allocated " -"memory block should be ``tp_basicsize + nitems*tp_itemsize``, rounded up to " -"a multiple of ``sizeof(void*)``; otherwise, *nitems* is not used and the " -"length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." +"with :c:member:`~PyObject.ob_refcnt` set to ``1`` " +"and :c:member:`~PyObject.ob_type` set to the type argument. If the " +"type's :c:member:`~PyTypeObject.tp_itemsize` is non-zero, the " +"object's :c:member:`~PyVarObject.ob_size` field should be initialized to " +"*nitems* and the length of the allocated memory block should be " +"``tp_basicsize + nitems*tp_itemsize``, rounded up to a multiple of " +"``sizeof(void*)``; otherwise, *nitems* is not used and the length of the " +"block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2612 +#: c-api/typeobj.rst:3168 msgid "" "This function should not do any other instance initialization, not even to " -"allocate additional memory; that should be done by :c:member:`~PyTypeObject." -"tp_new`." +"allocate additional memory; that should be done " +"by :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2619 +#: c-api/typeobj.rst:3175 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2623 +#: c-api/typeobj.rst:3179 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2627 +#: c-api/typeobj.rst:3183 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2631 +#: c-api/typeobj.rst:3187 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2644 +#: c-api/typeobj.rst:3200 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2650 +#: c-api/typeobj.rst:3206 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: c-api/typeobj.rst:2646 +#: c-api/typeobj.rst:3202 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2653 +#: c-api/typeobj.rst:3209 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2657 +#: c-api/typeobj.rst:3213 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" -#: c-api/typeobj.rst:2661 +#: c-api/typeobj.rst:3217 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" -#: c-api/typeobj.rst:2665 +#: c-api/typeobj.rst:3221 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:2669 +#: c-api/typeobj.rst:3225 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:2673 +#: c-api/typeobj.rst:3229 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:2677 +#: c-api/typeobj.rst:3233 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:2691 +#: c-api/typeobj.rst:3247 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" -#: c-api/typeobj.rst:2707 +#: c-api/typeobj.rst:3263 msgid "Examples" msgstr "Exemples" -#: c-api/typeobj.rst:2709 +#: c-api/typeobj.rst:3265 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3437,33 +3983,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:2714 +#: c-api/typeobj.rst:3270 msgid "A basic :ref:`static type `::" msgstr "" -#: c-api/typeobj.rst:2731 +#: c-api/typeobj.rst:3287 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: c-api/typeobj.rst:2775 +#: c-api/typeobj.rst:3331 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:2800 +#: c-api/typeobj.rst:3356 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " -"instances (e.g. uses a separate factory func) using :c:macro:" -"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" +"instances (e.g. uses a separate factory func) " +"using :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: c-api/typeobj.rst:2819 +#: c-api/typeobj.rst:3375 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: c-api/typeobj.rst:2830 +#: c-api/typeobj.rst:3386 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" diff --git a/c-api/unicode.po b/c-api/unicode.po index c8d342f8b..2b6233ada 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-02-20 12:47+0100\n" "Last-Translator: Victor Stinner \n" "Language-Team: FRENCH \n" @@ -18,11 +18,11 @@ msgstr "" msgid "Unicode Objects and Codecs" msgstr "Objets Unicode et Codecs" -#: c-api/unicode.rst:12 +#: c-api/unicode.rst:9 msgid "Unicode Objects" msgstr "Objets Unicode" -#: c-api/unicode.rst:14 +#: c-api/unicode.rst:11 msgid "" "Since the implementation of :pep:`393` in Python 3.3, Unicode objects " "internally use a variety of representations, in order to allow handling the " @@ -38,12 +38,12 @@ msgstr "" "sont inférieurs à 128, 256, ou 65536 ; sinon, les points de code doivent " "être inférieurs à 1114112 (qui est l'intervalle Unicode complet)." -#: c-api/unicode.rst:20 +#: c-api/unicode.rst:17 msgid "" "UTF-8 representation is created on demand and cached in the Unicode object." msgstr "" -#: c-api/unicode.rst:23 +#: c-api/unicode.rst:20 #, fuzzy msgid "" "The :c:type:`Py_UNICODE` representation has been removed since Python 3.12 " @@ -53,11 +53,11 @@ msgstr "" "les APIs dépréciées. Tous les objets Unicode vont être « canoniques » à " "partir de là. Voir :pep:`623` pour plus d'information." -#: c-api/unicode.rst:29 +#: c-api/unicode.rst:26 msgid "Unicode Type" msgstr "Type Unicode" -#: c-api/unicode.rst:31 +#: c-api/unicode.rst:28 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" @@ -65,7 +65,19 @@ msgstr "" "Voici les types d'objets Unicode utilisés pour l'implémentation Unicode en " "Python :" -#: c-api/unicode.rst:38 +#: c-api/unicode.rst:33 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " +"It is exposed to Python code as :py:class:`str`." +msgstr "" + +#: c-api/unicode.rst:39 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python Unicode " +"iterator type. It is used to iterate over Unicode string objects." +msgstr "" + +#: c-api/unicode.rst:47 msgid "" "These types are typedefs for unsigned integer types wide enough to contain " "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " @@ -75,87 +87,69 @@ msgstr "" "pour contenir des caractères de 32 bits, 16 bits et 8 bits, respectivement. " "Pour traiter des caractères uniques, utilisez :c:type:`Py_UCS4`." -#: c-api/unicode.rst:47 -#, fuzzy +#: c-api/unicode.rst:58 msgid "" -"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " -"type depending on the platform." +"These subtypes of :c:type:`PyObject` represent a Python Unicode object. In " +"almost all cases, they shouldn't be used directly, since all API functions " +"that deal with Unicode objects take and return :c:type:`PyObject` pointers." msgstr "" -"Ceci est un *typedef* de :c:expr:`wchar_t`, qui est un type 16-bit ou un " -"type 32-bit selon la plateforme." -#: c-api/unicode.rst:50 +#: c-api/unicode.rst:65 msgid "" -"In previous versions, this was a 16-bit type or a 32-bit type depending on " -"whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " -"build time." +"The structure of a particular object can be determined using the following " +"macros. The macros cannot fail; their behavior is undefined if their " +"argument is not a Python Unicode object." msgstr "" -"Dans les versions précédentes, ceci était un type 16-bit ou un type 32-bit " -"selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " -"à la compilation." -#: c-api/unicode.rst:62 -msgid "" -"These subtypes of :c:type:`PyObject` represent a Python Unicode object. In " -"almost all cases, they shouldn't be used directly, since all API functions " -"that deal with Unicode objects take and return :c:type:`PyObject` pointers." +#: c-api/unicode.rst:74 +msgid "True if *o* uses the :c:struct:`PyCompactUnicodeObject` structure." msgstr "" -#: c-api/unicode.rst:71 -msgid "" -"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " -"It is exposed to Python code as ``str``." +#: c-api/unicode.rst:81 +msgid "True if *o* uses the :c:struct:`PyASCIIObject` structure." msgstr "" -#: c-api/unicode.rst:75 +#: c-api/unicode.rst:86 msgid "" "The following APIs are C macros and static inlined functions for fast checks " "and access to internal read-only data of Unicode objects:" msgstr "" -#: c-api/unicode.rst:80 +#: c-api/unicode.rst:91 msgid "" "Return true if the object *obj* is a Unicode object or an instance of a " "Unicode subtype. This function always succeeds." msgstr "" -#: c-api/unicode.rst:86 +#: c-api/unicode.rst:97 msgid "" "Return true if the object *obj* is a Unicode object, but not an instance of " "a subtype. This function always succeeds." msgstr "" -#: c-api/unicode.rst:92 -msgid "Returns ``0``. This API is kept only for backward compatibility." -msgstr "" - -#: c-api/unicode.rst:96 -msgid "This API does nothing since Python 3.12." -msgstr "" - -#: c-api/unicode.rst:102 +#: c-api/unicode.rst:103 msgid "" "Return the length of the Unicode string, in code points. *unicode* has to " "be a Unicode object in the \"canonical\" representation (not checked)." msgstr "" -#: c-api/unicode.rst:112 +#: c-api/unicode.rst:113 msgid "" "Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 " "integer types for direct character access. No checks are performed if the " -"canonical representation has the correct character size; use :c:func:" -"`PyUnicode_KIND` to select the right function." +"canonical representation has the correct character size; " +"use :c:func:`PyUnicode_KIND` to select the right function." msgstr "" -#: c-api/unicode.rst:124 +#: c-api/unicode.rst:125 msgid "Return values of the :c:func:`PyUnicode_KIND` macro." msgstr "" -#: c-api/unicode.rst:128 +#: c-api/unicode.rst:129 msgid "``PyUnicode_WCHAR_KIND`` has been removed." msgstr "" -#: c-api/unicode.rst:134 +#: c-api/unicode.rst:135 msgid "" "Return one of the PyUnicode kind constants (see above) that indicate how " "many bytes per character this Unicode object uses to store its data. " @@ -163,225 +157,307 @@ msgid "" "(not checked)." msgstr "" -#: c-api/unicode.rst:143 +#: c-api/unicode.rst:144 msgid "" "Return a void pointer to the raw Unicode buffer. *unicode* has to be a " "Unicode object in the \"canonical\" representation (not checked)." msgstr "" -#: c-api/unicode.rst:152 +#: c-api/unicode.rst:153 +msgid "" +"Write the code point *value* to the given zero-based *index* in a string." +msgstr "" + +#: c-api/unicode.rst:155 msgid "" -"Write into a canonical representation *data* (as obtained with :c:func:" -"`PyUnicode_DATA`). This function performs no sanity checks, and is intended " -"for usage in loops. The caller should cache the *kind* value and *data* " -"pointer as obtained from other calls. *index* is the index in the string " -"(starts at 0) and *value* is the new code point value which should be " -"written to that location." +"The *kind* value and *data* pointer must have been obtained from a string " +"using :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` respectively. " +"You must hold a reference to that string while calling :c:func:`!" +"PyUnicode_WRITE`. All requirements of :c:func:`PyUnicode_WriteChar` also " +"apply." msgstr "" -#: c-api/unicode.rst:165 +#: c-api/unicode.rst:161 msgid "" -"Read a code point from a canonical representation *data* (as obtained with :" -"c:func:`PyUnicode_DATA`). No checks or ready calls are performed." +"The function performs no checks for any of its requirements, and is intended " +"for usage in loops." msgstr "" -#: c-api/unicode.rst:173 +#: c-api/unicode.rst:170 +msgid "" +"Read a code point from a canonical representation *data* (as obtained " +"with :c:func:`PyUnicode_DATA`). No checks or ready calls are performed." +msgstr "" + +#: c-api/unicode.rst:178 msgid "" "Read a character from a Unicode object *unicode*, which must be in the " -"\"canonical\" representation. This is less efficient than :c:func:" -"`PyUnicode_READ` if you do multiple consecutive reads." +"\"canonical\" representation. This is less efficient " +"than :c:func:`PyUnicode_READ` if you do multiple consecutive reads." msgstr "" -#: c-api/unicode.rst:182 +#: c-api/unicode.rst:187 msgid "" "Return the maximum code point that is suitable for creating another string " "based on *unicode*, which must be in the \"canonical\" representation. This " "is always an approximation but more efficient than iterating over the string." msgstr "" -#: c-api/unicode.rst:191 +#: c-api/unicode.rst:196 msgid "" "Return ``1`` if the string is a valid identifier according to the language " "definition, section :ref:`identifiers`. Return ``0`` otherwise." msgstr "" -#: c-api/unicode.rst:194 +#: c-api/unicode.rst:199 msgid "" "The function does not call :c:func:`Py_FatalError` anymore if the string is " "not ready." msgstr "" -#: c-api/unicode.rst:200 +#: c-api/unicode.rst:206 +msgid "" +"Return true if the string only contains ASCII characters. Equivalent " +"to :py:meth:`str.isascii`." +msgstr "" + +#: c-api/unicode.rst:214 +msgid "" +"If the hash of *str*, as returned by :c:func:`PyObject_Hash`, has been " +"cached and is immediately available, return it. Otherwise, return ``-1`` " +"*without* setting an exception." +msgstr "" + +#: c-api/unicode.rst:218 +msgid "" +"If *str* is not a string (that is, if ``PyUnicode_Check(obj)`` is false), " +"the behavior is undefined." +msgstr "" + +#: c-api/unicode.rst:221 +msgid "This function never fails with an exception." +msgstr "" + +#: c-api/unicode.rst:223 +msgid "" +"Note that there are no guarantees on when an object's hash is cached, and " +"the (non-)existence of a cached hash does not imply that the string has any " +"other properties." +msgstr "" + +#: c-api/unicode.rst:229 msgid "Unicode Character Properties" msgstr "" -#: c-api/unicode.rst:202 +#: c-api/unicode.rst:231 msgid "" "Unicode provides many different character properties. The most often needed " "ones are available through these macros which are mapped to C functions " "depending on the Python configuration." msgstr "" -#: c-api/unicode.rst:209 +#: c-api/unicode.rst:238 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." msgstr "" -#: c-api/unicode.rst:214 +#: c-api/unicode.rst:243 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." msgstr "" -#: c-api/unicode.rst:219 +#: c-api/unicode.rst:248 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." msgstr "" -#: c-api/unicode.rst:224 +#: c-api/unicode.rst:253 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." msgstr "" -#: c-api/unicode.rst:229 +#: c-api/unicode.rst:258 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." msgstr "" -#: c-api/unicode.rst:234 +#: c-api/unicode.rst:263 msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." msgstr "" -#: c-api/unicode.rst:239 +#: c-api/unicode.rst:268 msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." msgstr "" -#: c-api/unicode.rst:244 +#: c-api/unicode.rst:273 msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." msgstr "" -#: c-api/unicode.rst:249 +#: c-api/unicode.rst:278 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." msgstr "" -#: c-api/unicode.rst:254 +#: c-api/unicode.rst:283 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." msgstr "" -#: c-api/unicode.rst:259 +#: c-api/unicode.rst:288 msgid "" -"Return ``1`` or ``0`` depending on whether *ch* is a printable character. " -"Nonprintable characters are those characters defined in the Unicode " -"character database as \"Other\" or \"Separator\", excepting the ASCII space " -"(0x20) which is considered printable. (Note that printable characters in " -"this context are those which should not be escaped when :func:`repr` is " -"invoked on a string. It has no bearing on the handling of strings written " -"to :data:`sys.stdout` or :data:`sys.stderr`.)" +"Return ``1`` or ``0`` depending on whether *ch* is a printable character, in " +"the sense of :meth:`str.isprintable`." msgstr "" -#: c-api/unicode.rst:268 +#: c-api/unicode.rst:292 msgid "These APIs can be used for fast direct character conversions:" msgstr "" -#: c-api/unicode.rst:273 +#: c-api/unicode.rst:297 msgid "Return the character *ch* converted to lower case." msgstr "" -#: c-api/unicode.rst:278 +#: c-api/unicode.rst:302 msgid "Return the character *ch* converted to upper case." msgstr "" -#: c-api/unicode.rst:283 +#: c-api/unicode.rst:307 msgid "Return the character *ch* converted to title case." msgstr "" -#: c-api/unicode.rst:288 +#: c-api/unicode.rst:312 msgid "" "Return the character *ch* converted to a decimal positive integer. Return " "``-1`` if this is not possible. This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:294 +#: c-api/unicode.rst:318 msgid "" "Return the character *ch* converted to a single digit integer. Return ``-1`` " "if this is not possible. This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:300 +#: c-api/unicode.rst:324 msgid "" "Return the character *ch* converted to a double. Return ``-1.0`` if this is " "not possible. This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:304 +#: c-api/unicode.rst:328 msgid "These APIs can be used to work with surrogates:" msgstr "" -#: c-api/unicode.rst:308 +#: c-api/unicode.rst:332 msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:312 +#: c-api/unicode.rst:336 msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." msgstr "" -#: c-api/unicode.rst:316 +#: c-api/unicode.rst:340 msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:320 +#: c-api/unicode.rst:344 +msgid "" +"Return the high UTF-16 surrogate (``0xD800`` to ``0xDBFF``) for a Unicode " +"code point in the range ``[0x10000; 0x10FFFF]``." +msgstr "" + +#: c-api/unicode.rst:349 +msgid "" +"Return the low UTF-16 surrogate (``0xDC00`` to ``0xDFFF``) for a Unicode " +"code point in the range ``[0x10000; 0x10FFFF]``." +msgstr "" + +#: c-api/unicode.rst:354 msgid "" "Join two surrogate code points and return a single :c:type:`Py_UCS4` value. " "*high* and *low* are respectively the leading and trailing surrogates in a " -"surrogate pair. *high* must be in the range [0xD800; 0xDBFF] and *low* must " -"be in the range [0xDC00; 0xDFFF]." +"surrogate pair. *high* must be in the range ``[0xD800; 0xDBFF]`` and *low* " +"must be in the range ``[0xDC00; 0xDFFF]``." msgstr "" -#: c-api/unicode.rst:327 +#: c-api/unicode.rst:361 msgid "Creating and accessing Unicode strings" msgstr "" -#: c-api/unicode.rst:329 +#: c-api/unicode.rst:363 msgid "" "To create Unicode objects and access their basic sequence properties, use " "these APIs:" msgstr "" -#: c-api/unicode.rst:334 +#: c-api/unicode.rst:368 msgid "" "Create a new Unicode object. *maxchar* should be the true maximum code " "point to be placed in the string. As an approximation, it can be rounded up " "to the nearest value in the sequence 127, 255, 65535, 1114111." msgstr "" -#: c-api/unicode.rst:338 +#: c-api/unicode.rst:372 +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +#: c-api/unicode.rst:374 msgid "" -"This is the recommended way to allocate a new Unicode object. Objects " -"created using this function are not resizable." +"After creation, the string can be filled " +"by :c:func:`PyUnicode_WriteChar`, :c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, :c:func:`PyUnicode_WRITE` " +"or similar. Since strings are supposed to be immutable, take care to not " +"“use” the result while it is being modified. In particular, before it's " +"filled with its final contents, a string:" msgstr "" -#: c-api/unicode.rst:341 -msgid "On error, set an exception and return ``NULL``." +#: c-api/unicode.rst:381 +msgid "must not be hashed," msgstr "" -#: c-api/unicode.rst:349 +#: c-api/unicode.rst:382 msgid "" -"Create a new Unicode object with the given *kind* (possible values are :c:" -"macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:" -"`PyUnicode_KIND`). The *buffer* must point to an array of *size* units of " -"1, 2 or 4 bytes per character, as given by the kind." +"must not be :c:func:`converted to UTF-8 `, or " +"another non-\"canonical\" representation," msgstr "" -#: c-api/unicode.rst:354 +#: c-api/unicode.rst:384 +msgid "must not have its reference count changed," +msgstr "" + +#: c-api/unicode.rst:385 +msgid "must not be shared with code that might do one of the above." +msgstr "" + +#: c-api/unicode.rst:387 +msgid "" +"This list is not exhaustive. Avoiding these uses is your responsibility; " +"Python does not always check these requirements." +msgstr "" + +#: c-api/unicode.rst:390 +msgid "" +"To avoid accidentally exposing a partially-written string object, prefer " +"using the :c:type:`PyUnicodeWriter` API, or one of the ``PyUnicode_From*`` " +"functions below." +msgstr "" + +#: c-api/unicode.rst:401 +msgid "" +"Create a new Unicode object with the given *kind* (possible values " +"are :c:macro:`PyUnicode_1BYTE_KIND` etc., as returned " +"by :c:func:`PyUnicode_KIND`). The *buffer* must point to an array of *size* " +"units of 1, 2 or 4 bytes per character, as given by the kind." +msgstr "" + +#: c-api/unicode.rst:406 msgid "" "If necessary, the input *buffer* is copied and transformed into the " -"canonical representation. For example, if the *buffer* is a UCS4 string (:c:" -"macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in the UCS1 " -"range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)." +"canonical representation. For example, if the *buffer* is a UCS4 string " +"(:c:macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in the " +"UCS1 range, it will be transformed into UCS1 " +"(:c:macro:`PyUnicode_1BYTE_KIND`)." msgstr "" -#: c-api/unicode.rst:365 +#: c-api/unicode.rst:417 msgid "" "Create a Unicode object from the char buffer *str*. The bytes will be " "interpreted as being UTF-8 encoded. The buffer is copied into the new " @@ -389,29 +465,29 @@ msgid "" "data is not allowed." msgstr "" -#: c-api/unicode.rst:371 +#: c-api/unicode.rst:423 msgid "This function raises :exc:`SystemError` when:" msgstr "" -#: c-api/unicode.rst:373 +#: c-api/unicode.rst:425 msgid "*size* < 0," msgstr "" -#: c-api/unicode.rst:374 +#: c-api/unicode.rst:426 msgid "*str* is ``NULL`` and *size* > 0" msgstr "" -#: c-api/unicode.rst:376 +#: c-api/unicode.rst:428 msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore." msgstr "" -#: c-api/unicode.rst:382 +#: c-api/unicode.rst:434 msgid "" "Create a Unicode object from a UTF-8 encoded null-terminated char buffer " "*str*." msgstr "" -#: c-api/unicode.rst:388 +#: c-api/unicode.rst:440 msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python Unicode string and " @@ -420,7 +496,7 @@ msgid "" "*format* ASCII-encoded string." msgstr "" -#: c-api/unicode.rst:394 +#: c-api/unicode.rst:446 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" @@ -428,11 +504,11 @@ msgstr "" "Un indicateur de conversion contient deux ou plusieurs caractères et " "comporte les éléments suivants, qui doivent apparaître dans cet ordre :" -#: c-api/unicode.rst:397 +#: c-api/unicode.rst:449 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "le caractère ``'%'``, qui marque le début du marqueur ;" -#: c-api/unicode.rst:399 +#: c-api/unicode.rst:451 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." @@ -440,15 +516,15 @@ msgstr "" "des indications de conversion, facultatives, qui affectent le résultat de " "certains types de conversion ;" -#: c-api/unicode.rst:402 +#: c-api/unicode.rst:454 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " -"actual width is given in the next argument, which must be of type :c:expr:" -"`int`, and the object to convert comes after the minimum field width and " -"optional precision." +"actual width is given in the next argument, which must be of " +"type :c:expr:`int`, and the object to convert comes after the minimum field " +"width and optional precision." msgstr "" -#: c-api/unicode.rst:407 +#: c-api/unicode.rst:459 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. If " "specified as ``'*'`` (an asterisk), the actual precision is given in the " @@ -456,317 +532,317 @@ msgid "" "comes after the precision." msgstr "" -#: c-api/unicode.rst:412 +#: c-api/unicode.rst:464 msgid "Length modifier (optional)." msgstr "modificateur de longueur (facultatif) ;" -#: c-api/unicode.rst:414 +#: c-api/unicode.rst:466 msgid "Conversion type." msgstr "type de conversion." -#: c-api/unicode.rst:416 +#: c-api/unicode.rst:468 msgid "The conversion flag characters are:" msgstr "Les caractères indicateurs de conversion sont :" -#: c-api/unicode.rst:421 +#: c-api/unicode.rst:473 msgid "Flag" msgstr "Option" -#: c-api/unicode.rst:421 +#: c-api/unicode.rst:473 msgid "Meaning" msgstr "Signification" -#: c-api/unicode.rst:423 +#: c-api/unicode.rst:475 msgid "``0``" msgstr "``0``" -#: c-api/unicode.rst:423 +#: c-api/unicode.rst:475 msgid "The conversion will be zero padded for numeric values." msgstr "Les valeurs numériques converties sont complétées de zéros." -#: c-api/unicode.rst:425 +#: c-api/unicode.rst:477 msgid "``-``" msgstr "" -#: c-api/unicode.rst:425 +#: c-api/unicode.rst:477 msgid "" "The converted value is left adjusted (overrides the ``0`` flag if both are " "given)." msgstr "" -#: c-api/unicode.rst:429 +#: c-api/unicode.rst:481 msgid "" "The length modifiers for following integer conversions (``d``, ``i``, ``o``, " "``u``, ``x``, or ``X``) specify the type of the argument (:c:expr:`int` by " "default):" msgstr "" -#: c-api/unicode.rst:436 +#: c-api/unicode.rst:488 msgid "Modifier" msgstr "" -#: c-api/unicode.rst:436 +#: c-api/unicode.rst:488 #, fuzzy msgid "Types" msgstr "Type" -#: c-api/unicode.rst:438 +#: c-api/unicode.rst:490 msgid "``l``" msgstr "``l``" -#: c-api/unicode.rst:438 +#: c-api/unicode.rst:490 msgid ":c:expr:`long` or :c:expr:`unsigned long`" msgstr "" -#: c-api/unicode.rst:440 +#: c-api/unicode.rst:492 msgid "``ll``" msgstr "" -#: c-api/unicode.rst:440 +#: c-api/unicode.rst:492 msgid ":c:expr:`long long` or :c:expr:`unsigned long long`" msgstr "" -#: c-api/unicode.rst:442 +#: c-api/unicode.rst:494 msgid "``j``" msgstr "" -#: c-api/unicode.rst:442 +#: c-api/unicode.rst:494 msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" msgstr "" -#: c-api/unicode.rst:444 +#: c-api/unicode.rst:496 msgid "``z``" msgstr "" -#: c-api/unicode.rst:444 +#: c-api/unicode.rst:496 msgid ":c:type:`size_t` or :c:type:`ssize_t`" msgstr "" -#: c-api/unicode.rst:446 +#: c-api/unicode.rst:498 msgid "``t``" msgstr "" -#: c-api/unicode.rst:446 +#: c-api/unicode.rst:498 msgid ":c:type:`ptrdiff_t`" msgstr "" -#: c-api/unicode.rst:449 +#: c-api/unicode.rst:501 msgid "" "The length modifier ``l`` for following conversions ``s`` or ``V`` specify " "that the type of the argument is :c:expr:`const wchar_t*`." msgstr "" -#: c-api/unicode.rst:452 +#: c-api/unicode.rst:504 msgid "The conversion specifiers are:" msgstr "" -#: c-api/unicode.rst:458 +#: c-api/unicode.rst:510 msgid "Conversion Specifier" msgstr "" -#: c-api/unicode.rst:459 +#: c-api/unicode.rst:511 msgid "Type" msgstr "Type" -#: c-api/unicode.rst:460 +#: c-api/unicode.rst:512 #, fuzzy msgid "Comment" msgstr "Commentaires" -#: c-api/unicode.rst:462 +#: c-api/unicode.rst:514 msgid "``%``" msgstr "" -#: c-api/unicode.rst:463 +#: c-api/unicode.rst:515 msgid "*n/a*" msgstr "" -#: c-api/unicode.rst:464 +#: c-api/unicode.rst:516 msgid "The literal ``%`` character." msgstr "" -#: c-api/unicode.rst:466 +#: c-api/unicode.rst:518 msgid "``d``, ``i``" msgstr "" -#: c-api/unicode.rst:471 c-api/unicode.rst:479 c-api/unicode.rst:483 +#: c-api/unicode.rst:523 c-api/unicode.rst:531 c-api/unicode.rst:535 msgid "Specified by the length modifier" msgstr "" -#: c-api/unicode.rst:468 +#: c-api/unicode.rst:520 msgid "The decimal representation of a signed C integer." msgstr "" -#: c-api/unicode.rst:470 +#: c-api/unicode.rst:522 msgid "``u``" msgstr "" -#: c-api/unicode.rst:472 +#: c-api/unicode.rst:524 msgid "The decimal representation of an unsigned C integer." msgstr "" -#: c-api/unicode.rst:474 +#: c-api/unicode.rst:526 msgid "``o``" msgstr "" -#: c-api/unicode.rst:476 +#: c-api/unicode.rst:528 msgid "The octal representation of an unsigned C integer." msgstr "" -#: c-api/unicode.rst:478 +#: c-api/unicode.rst:530 msgid "``x``" msgstr "``x``" -#: c-api/unicode.rst:480 +#: c-api/unicode.rst:532 msgid "The hexadecimal representation of an unsigned C integer (lowercase)." msgstr "" -#: c-api/unicode.rst:482 +#: c-api/unicode.rst:534 msgid "``X``" msgstr "" -#: c-api/unicode.rst:484 +#: c-api/unicode.rst:536 msgid "The hexadecimal representation of an unsigned C integer (uppercase)." msgstr "" -#: c-api/unicode.rst:486 +#: c-api/unicode.rst:538 msgid "``c``" msgstr "``c``" -#: c-api/unicode.rst:487 +#: c-api/unicode.rst:539 msgid ":c:expr:`int`" msgstr "" -#: c-api/unicode.rst:488 +#: c-api/unicode.rst:540 msgid "A single character." msgstr "" -#: c-api/unicode.rst:490 +#: c-api/unicode.rst:542 msgid "``s``" msgstr "``s``" -#: c-api/unicode.rst:491 +#: c-api/unicode.rst:543 msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" -#: c-api/unicode.rst:492 +#: c-api/unicode.rst:544 msgid "A null-terminated C character array." msgstr "" -#: c-api/unicode.rst:494 +#: c-api/unicode.rst:546 msgid "``p``" msgstr "``p``" -#: c-api/unicode.rst:495 +#: c-api/unicode.rst:547 msgid ":c:expr:`const void*`" msgstr "" -#: c-api/unicode.rst:496 +#: c-api/unicode.rst:548 msgid "" "The hex representation of a C pointer. Mostly equivalent to " "``printf(\"%p\")`` except that it is guaranteed to start with the literal " "``0x`` regardless of what the platform's ``printf`` yields." msgstr "" -#: c-api/unicode.rst:501 +#: c-api/unicode.rst:553 msgid "``A``" msgstr "" -#: c-api/unicode.rst:506 c-api/unicode.rst:520 c-api/unicode.rst:529 +#: c-api/unicode.rst:558 c-api/unicode.rst:572 c-api/unicode.rst:581 #, fuzzy msgid ":c:expr:`PyObject*`" msgstr "PyObject\\*" -#: c-api/unicode.rst:503 +#: c-api/unicode.rst:555 msgid "The result of calling :func:`ascii`." msgstr "" -#: c-api/unicode.rst:505 +#: c-api/unicode.rst:557 msgid "``U``" msgstr "" -#: c-api/unicode.rst:507 +#: c-api/unicode.rst:559 #, fuzzy msgid "A Unicode object." msgstr "Un objet Unicode." -#: c-api/unicode.rst:509 +#: c-api/unicode.rst:561 msgid "``V``" msgstr "" -#: c-api/unicode.rst:510 +#: c-api/unicode.rst:562 msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" -#: c-api/unicode.rst:511 +#: c-api/unicode.rst:563 msgid "" "A Unicode object (which may be ``NULL``) and a null-terminated C character " "array as a second parameter (which will be used, if the first parameter is " "``NULL``)." msgstr "" -#: c-api/unicode.rst:515 +#: c-api/unicode.rst:567 msgid "``S``" msgstr "" -#: c-api/unicode.rst:517 +#: c-api/unicode.rst:569 msgid "The result of calling :c:func:`PyObject_Str`." msgstr "" -#: c-api/unicode.rst:519 +#: c-api/unicode.rst:571 msgid "``R``" msgstr "" -#: c-api/unicode.rst:521 +#: c-api/unicode.rst:573 msgid "The result of calling :c:func:`PyObject_Repr`." msgstr "" -#: c-api/unicode.rst:523 +#: c-api/unicode.rst:575 msgid "``T``" msgstr "" -#: c-api/unicode.rst:525 +#: c-api/unicode.rst:577 msgid "" -"Get the fully qualified name of an object type; call :c:func:" -"`PyType_GetFullyQualifiedName`." +"Get the fully qualified name of an object type; " +"call :c:func:`PyType_GetFullyQualifiedName`." msgstr "" -#: c-api/unicode.rst:528 +#: c-api/unicode.rst:580 msgid "``#T``" msgstr "" -#: c-api/unicode.rst:530 +#: c-api/unicode.rst:582 msgid "" "Similar to ``T`` format, but use a colon (``:``) as separator between the " "module name and the qualified name." msgstr "" -#: c-api/unicode.rst:533 +#: c-api/unicode.rst:585 msgid "``N``" msgstr "``N``" -#: c-api/unicode.rst:539 +#: c-api/unicode.rst:591 #, fuzzy msgid ":c:expr:`PyTypeObject*`" msgstr "PyObject\\*" -#: c-api/unicode.rst:535 +#: c-api/unicode.rst:587 msgid "" -"Get the fully qualified name of a type; call :c:func:" -"`PyType_GetFullyQualifiedName`." +"Get the fully qualified name of a type; " +"call :c:func:`PyType_GetFullyQualifiedName`." msgstr "" -#: c-api/unicode.rst:538 +#: c-api/unicode.rst:590 msgid "``#N``" msgstr "" -#: c-api/unicode.rst:540 +#: c-api/unicode.rst:592 msgid "" "Similar to ``N`` format, but use a colon (``:``) as separator between the " "module name and the qualified name." msgstr "" -#: c-api/unicode.rst:544 +#: c-api/unicode.rst:596 msgid "" "The width formatter unit is number of characters rather than bytes. The " "precision formatter unit is number of bytes or :c:type:`wchar_t` items (if " @@ -776,28 +852,28 @@ msgid "" "``PyObject*`` argument is not ``NULL``)." msgstr "" -#: c-api/unicode.rst:552 +#: c-api/unicode.rst:604 msgid "" "Unlike to C :c:func:`printf` the ``0`` flag has effect even when a precision " "is given for integer conversions (``d``, ``i``, ``u``, ``o``, ``x``, or " "``X``)." msgstr "" -#: c-api/unicode.rst:556 +#: c-api/unicode.rst:608 msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." msgstr "" -#: c-api/unicode.rst:559 +#: c-api/unicode.rst:611 msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." msgstr "" -#: c-api/unicode.rst:562 +#: c-api/unicode.rst:614 msgid "" "Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " "``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" -#: c-api/unicode.rst:566 +#: c-api/unicode.rst:618 msgid "" "Support for conversion specifiers ``o`` and ``X``. Support for length " "modifiers ``j`` and ``t``. Length modifiers are now applied to all integer " @@ -806,40 +882,50 @@ msgid "" "flag ``-``." msgstr "" -#: c-api/unicode.rst:574 +#: c-api/unicode.rst:626 msgid "" "An unrecognized format character now sets a :exc:`SystemError`. In previous " "versions it caused all the rest of the format string to be copied as-is to " "the result string, and any extra arguments discarded." msgstr "" -#: c-api/unicode.rst:578 +#: c-api/unicode.rst:630 msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added." msgstr "" -#: c-api/unicode.rst:584 +#: c-api/unicode.rst:636 msgid "" "Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " "arguments." msgstr "" -#: c-api/unicode.rst:590 +#: c-api/unicode.rst:642 msgid "" "Copy an instance of a Unicode subtype to a new true Unicode object if " "necessary. If *obj* is already a true Unicode object (not a subtype), return " "a new :term:`strong reference` to the object." msgstr "" -#: c-api/unicode.rst:594 +#: c-api/unicode.rst:646 msgid "" "Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." msgstr "" -#: c-api/unicode.rst:600 +#: c-api/unicode.rst:651 +msgid "Create a Unicode Object from the given Unicode code point *ordinal*." +msgstr "" + +#: c-api/unicode.rst:653 +msgid "" +"The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is raised in " +"the case it is not." +msgstr "" + +#: c-api/unicode.rst:660 msgid "Decode an encoded object *obj* to a Unicode object." msgstr "" -#: c-api/unicode.rst:602 +#: c-api/unicode.rst:662 msgid "" ":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects " "` are decoded according to the given *encoding* and using " @@ -847,27 +933,69 @@ msgid "" "interface use the default values (see :ref:`builtincodecs` for details)." msgstr "" -#: c-api/unicode.rst:608 +#: c-api/unicode.rst:668 msgid "" "All other objects, including Unicode objects, cause a :exc:`TypeError` to be " "set." msgstr "" -#: c-api/unicode.rst:611 +#: c-api/unicode.rst:671 msgid "" "The API returns ``NULL`` if there was an error. The caller is responsible " "for decref'ing the returned objects." msgstr "" -#: c-api/unicode.rst:617 +#: c-api/unicode.rst:677 +msgid "" +"Append the string *right* to the end of *p_left*. *p_left* must point to " +"a :term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` " +"releases (\"steals\") this reference." +msgstr "" + +#: c-api/unicode.rst:681 +msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." +msgstr "" + +#: c-api/unicode.rst:683 +msgid "On success, set *\\*p_left* to a new strong reference to the result." +msgstr "" + +#: c-api/unicode.rst:688 +msgid "" +"The function is similar to :c:func:`PyUnicode_Append`, with the only " +"difference being that it decrements the reference count of *right* by one." +msgstr "" + +#: c-api/unicode.rst:694 +msgid "" +"Return a mapping suitable for decoding a custom single-byte encoding. Given " +"a Unicode string *string* of up to 256 characters representing an encoding " +"table, returns either a compact internal mapping object or a dictionary " +"mapping character ordinals to byte values. Raises a :exc:`TypeError` and " +"return ``NULL`` on invalid input." +msgstr "" + +#: c-api/unicode.rst:705 +msgid "" +"Return the name of the default string encoding, ``\"utf-8\"``. " +"See :func:`sys.getdefaultencoding`." +msgstr "" + +#: c-api/unicode.rst:708 +msgid "" +"The returned string does not need to be freed, and is valid until " +"interpreter shutdown." +msgstr "" + +#: c-api/unicode.rst:714 msgid "Return the length of the Unicode object, in code points." msgstr "" -#: c-api/unicode.rst:619 +#: c-api/unicode.rst:716 msgid "On error, set an exception and return ``-1``." msgstr "" -#: c-api/unicode.rst:630 +#: c-api/unicode.rst:727 msgid "" "Copy characters from one Unicode object into another. This function " "performs character conversion when necessary and falls back to :c:func:`!" @@ -875,61 +1003,87 @@ msgid "" "otherwise returns the number of copied characters." msgstr "" -#: c-api/unicode.rst:641 +#: c-api/unicode.rst:762 c-api/unicode.rst:782 +msgid "" +"The string must not have been “used” yet. See :c:func:`PyUnicode_New` for " +"details." +msgstr "" + +#: c-api/unicode.rst:740 +msgid "" +"Resize a Unicode object *\\*unicode* to the new *length* in code points." +msgstr "" + +#: c-api/unicode.rst:742 +msgid "" +"Try to resize the string in place (which is usually faster than allocating a " +"new string and copying characters), or create a new string." +msgstr "" + +#: c-api/unicode.rst:745 msgid "" -"Fill a string with a character: write *fill_char* into ``unicode[start:" -"start+length]``." +"*\\*unicode* is modified to point to the new (resized) object and ``0`` is " +"returned on success. Otherwise, ``-1`` is returned and an exception is set, " +"and *\\*unicode* is left untouched." msgstr "" -#: c-api/unicode.rst:644 +#: c-api/unicode.rst:749 +msgid "" +"The function doesn't check string content, the result may not be a string in " +"canonical representation." +msgstr "" + +#: c-api/unicode.rst:756 +msgid "" +"Fill a string with a character: write *fill_char* into " +"``unicode[start:start+length]``." +msgstr "" + +#: c-api/unicode.rst:759 msgid "" "Fail if *fill_char* is bigger than the string maximum character, or if the " "string has more than 1 reference." msgstr "" -#: c-api/unicode.rst:647 +#: c-api/unicode.rst:765 msgid "" -"Return the number of written character, or return ``-1`` and raise an " +"Return the number of written characters, or return ``-1`` and raise an " "exception on error." msgstr "" -#: c-api/unicode.rst:656 +#: c-api/unicode.rst:774 msgid "" -"Write a character to a string. The string must have been created through :c:" -"func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, " -"the string must not be shared, or have been hashed yet." +"Write a *character* to the string *unicode* at the zero-based *index*. " +"Return ``0`` on success, ``-1`` on error with an exception set." msgstr "" -#: c-api/unicode.rst:660 +#: c-api/unicode.rst:777 msgid "" "This function checks that *unicode* is a Unicode object, that the index is " -"not out of bounds, and that the object can be modified safely (i.e. that it " -"its reference count is one)." +"not out of bounds, and that the object's reference count is one. " +"See :c:func:`PyUnicode_WRITE` for a version that skips these checks, making " +"them your responsibility." msgstr "" -#: c-api/unicode.rst:664 -msgid "Return ``0`` on success, ``-1`` on error with an exception set." -msgstr "" - -#: c-api/unicode.rst:671 +#: c-api/unicode.rst:790 msgid "" "Read a character from a string. This function checks that *unicode* is a " -"Unicode object and the index is not out of bounds, in contrast to :c:func:" -"`PyUnicode_READ_CHAR`, which performs no error checking." +"Unicode object and the index is not out of bounds, in contrast " +"to :c:func:`PyUnicode_READ_CHAR`, which performs no error checking." msgstr "" -#: c-api/unicode.rst:675 +#: c-api/unicode.rst:794 msgid "Return character on success, ``-1`` on error with an exception set." msgstr "" -#: c-api/unicode.rst:683 +#: c-api/unicode.rst:802 msgid "" "Return a substring of *unicode*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported. On " "error, set an exception and return ``NULL``." msgstr "" -#: c-api/unicode.rst:693 +#: c-api/unicode.rst:812 msgid "" "Copy the string *unicode* into a UCS4 buffer, including a null character, if " "*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " @@ -937,25 +1091,25 @@ msgid "" "*unicode*). *buffer* is returned on success." msgstr "" -#: c-api/unicode.rst:703 +#: c-api/unicode.rst:822 msgid "" -"Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:" -"func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" -"`MemoryError` set. The returned buffer always has an extra null code point " -"appended." +"Copy the string *unicode* into a new UCS4 buffer that is allocated " +"using :c:func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with " +"a :exc:`MemoryError` set. The returned buffer always has an extra null code " +"point appended." msgstr "" -#: c-api/unicode.rst:712 +#: c-api/unicode.rst:831 msgid "Locale Encoding" msgstr "" -#: c-api/unicode.rst:714 +#: c-api/unicode.rst:833 msgid "" "The current locale encoding can be used to decode text from the operating " "system." msgstr "" -#: c-api/unicode.rst:721 +#: c-api/unicode.rst:840 msgid "" "Decode a string from UTF-8 on Android and VxWorks, or from the current " "locale encoding on other platforms. The supported error handlers are " @@ -964,157 +1118,179 @@ msgid "" "null character but cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:728 +#: c-api/unicode.rst:847 msgid "" -"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :" -"term:`filesystem encoding and error handler`." +"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from " +"the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:766 +#: c-api/unicode.rst:885 msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/unicode.rst:832 +#: c-api/unicode.rst:970 msgid "The :c:func:`Py_DecodeLocale` function." msgstr "" -#: c-api/unicode.rst:739 +#: c-api/unicode.rst:858 msgid "" "The function now also uses the current locale encoding for the " -"``surrogateescape`` error handler, except on Android. Previously, :c:func:" -"`Py_DecodeLocale` was used for the ``surrogateescape``, and the current " -"locale encoding was used for ``strict``." +"``surrogateescape`` error handler, except on Android. " +"Previously, :c:func:`Py_DecodeLocale` was used for the ``surrogateescape``, " +"and the current locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:748 +#: c-api/unicode.rst:867 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`!strlen`." msgstr "" -#: c-api/unicode.rst:756 +#: c-api/unicode.rst:875 msgid "" "Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " "locale encoding on other platforms. The supported error handlers are " "``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses " -"``\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:" -"`bytes` object. *unicode* cannot contain embedded null characters." +"``\"strict\"`` error handler if *errors* is ``NULL``. Return " +"a :class:`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:763 +#: c-api/unicode.rst:882 msgid "" -"Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:" -"`filesystem encoding and error handler`." +"Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to " +"the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:863 +#: c-api/unicode.rst:1001 msgid "The :c:func:`Py_EncodeLocale` function." msgstr "" -#: c-api/unicode.rst:774 +#: c-api/unicode.rst:893 msgid "" "The function now also uses the current locale encoding for the " -"``surrogateescape`` error handler, except on Android. Previously, :c:func:" -"`Py_EncodeLocale` was used for the ``surrogateescape``, and the current " -"locale encoding was used for ``strict``." +"``surrogateescape`` error handler, except on Android. " +"Previously, :c:func:`Py_EncodeLocale` was used for the ``surrogateescape``, " +"and the current locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:783 +#: c-api/unicode.rst:902 msgid "File System Encoding" msgstr "" -#: c-api/unicode.rst:785 +#: c-api/unicode.rst:904 msgid "" "Functions encoding to and decoding from the :term:`filesystem encoding and " "error handler` (:pep:`383` and :pep:`529`)." msgstr "" -#: c-api/unicode.rst:788 +#: c-api/unicode.rst:907 msgid "" "To encode file names to :class:`bytes` during argument parsing, the " -"``\"O&\"`` converter should be used, passing :c:func:`PyUnicode_FSConverter` " -"as the conversion function:" +"``\"O&\"`` converter should be used, passing :c:func:`!" +"PyUnicode_FSConverter` as the conversion function:" msgstr "" -#: c-api/unicode.rst:794 +#: c-api/unicode.rst:913 +msgid "" +":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " +"-- obtained directly or through the :class:`os.PathLike` interface -- " +"to :class:`bytes` using :c:func:`PyUnicode_EncodeFSDefault`; :class:`bytes` " +"objects are output as-is. *result* must be an address of a C variable of " +"type :c:expr:`PyObject*` (or :c:expr:`PyBytesObject*`). On success, set the " +"variable to a new :term:`strong reference` to a :ref:`bytes object " +"` which must be released when it is no longer used and return " +"a non-zero value (:c:macro:`Py_CLEANUP_SUPPORTED`). Embedded null bytes are " +"not allowed in the result. On failure, return ``0`` with an exception set." +msgstr "" + +#: c-api/unicode.rst:925 msgid "" -"ParseTuple converter: encode :class:`str` objects -- obtained directly or " -"through the :class:`os.PathLike` interface -- to :class:`bytes` using :c:" -"func:`PyUnicode_EncodeFSDefault`; :class:`bytes` objects are output as-is. " -"*result* must be a :c:expr:`PyBytesObject*` which must be released when it " -"is no longer used." +"If *obj* is ``NULL``, the function releases a strong reference stored in the " +"variable referred by *result* and returns ``1``." msgstr "" -#: c-api/unicode.rst:819 +#: c-api/unicode.rst:957 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: c-api/unicode.rst:805 +#: c-api/unicode.rst:933 msgid "" "To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " -"converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the " +"converter should be used, passing :c:func:`!PyUnicode_FSDecoder` as the " "conversion function:" msgstr "" -#: c-api/unicode.rst:811 +#: c-api/unicode.rst:939 msgid "" -"ParseTuple converter: decode :class:`bytes` objects -- obtained either " -"directly or indirectly through the :class:`os.PathLike` interface -- to :" -"class:`str` using :c:func:`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` " -"objects are output as-is. *result* must be a :c:expr:`PyUnicodeObject*` " -"which must be released when it is no longer used." +":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " +"-- obtained either directly or indirectly through the :class:`os.PathLike` " +"interface -- to :class:`str` " +"using :c:func:`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` objects are " +"output as-is. *result* must be an address of a C variable of " +"type :c:expr:`PyObject*` (or :c:expr:`PyUnicodeObject*`). On success, set " +"the variable to a new :term:`strong reference` to a :ref:`Unicode object " +"` which must be released when it is no longer used and " +"return a non-zero value (:c:macro:`Py_CLEANUP_SUPPORTED`). Embedded null " +"characters are not allowed in the result. On failure, return ``0`` with an " +"exception set." msgstr "" -#: c-api/unicode.rst:825 +#: c-api/unicode.rst:952 +msgid "" +"If *obj* is ``NULL``, release the strong reference to the object referred to " +"by *result* and return ``1``." +msgstr "" + +#: c-api/unicode.rst:963 msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:827 +#: c-api/unicode.rst:965 msgid "" -"If you need to decode a string from the current locale encoding, use :c:func:" -"`PyUnicode_DecodeLocaleAndSize`." +"If you need to decode a string from the current locale encoding, " +"use :c:func:`PyUnicode_DecodeLocaleAndSize`." msgstr "" -#: c-api/unicode.rst:847 c-api/unicode.rst:867 +#: c-api/unicode.rst:985 c-api/unicode.rst:1005 msgid "" "The :term:`filesystem error handler ` " "is now used." msgstr "" -#: c-api/unicode.rst:841 +#: c-api/unicode.rst:979 msgid "" "Decode a null-terminated string from the :term:`filesystem encoding and " "error handler`." msgstr "" -#: c-api/unicode.rst:844 +#: c-api/unicode.rst:982 msgid "" -"If the string length is known, use :c:func:" -"`PyUnicode_DecodeFSDefaultAndSize`." +"If the string length is known, " +"use :c:func:`PyUnicode_DecodeFSDefaultAndSize`." msgstr "" -#: c-api/unicode.rst:854 +#: c-api/unicode.rst:992 msgid "" "Encode a Unicode object to the :term:`filesystem encoding and error " "handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` " "object can contain null bytes." msgstr "" -#: c-api/unicode.rst:858 +#: c-api/unicode.rst:996 msgid "" -"If you need to encode a string to the current locale encoding, use :c:func:" -"`PyUnicode_EncodeLocale`." +"If you need to encode a string to the current locale encoding, " +"use :c:func:`PyUnicode_EncodeLocale`." msgstr "" -#: c-api/unicode.rst:872 +#: c-api/unicode.rst:1010 msgid "wchar_t Support" msgstr "" -#: c-api/unicode.rst:874 +#: c-api/unicode.rst:1012 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" -#: c-api/unicode.rst:878 +#: c-api/unicode.rst:1016 msgid "" "Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the " "given *size*. Passing ``-1`` as the *size* indicates that the function must " @@ -1122,72 +1298,73 @@ msgid "" "failure." msgstr "" -#: c-api/unicode.rst:886 +#: c-api/unicode.rst:1024 msgid "" "Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. " "At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " -"trailing null termination character). Return the number of :c:type:" -"`wchar_t` characters copied or ``-1`` in case of an error." +"trailing null termination character). Return the number " +"of :c:type:`wchar_t` characters copied or ``-1`` in case of an error." msgstr "" -#: c-api/unicode.rst:891 +#: c-api/unicode.rst:1029 msgid "" "When *wstr* is ``NULL``, instead return the *size* that would be required to " "store all of *unicode* including a terminating null." msgstr "" -#: c-api/unicode.rst:894 +#: c-api/unicode.rst:1032 msgid "" "Note that the resulting :c:expr:`wchar_t*` string may or may not be null-" -"terminated. It is the responsibility of the caller to make sure that the :c:" -"expr:`wchar_t*` string is null-terminated in case this is required by the " -"application. Also, note that the :c:expr:`wchar_t*` string might contain " +"terminated. It is the responsibility of the caller to make sure that " +"the :c:expr:`wchar_t*` string is null-terminated in case this is required by " +"the application. Also, note that the :c:expr:`wchar_t*` string might contain " "null characters, which would cause the string to be truncated when used with " "most C functions." msgstr "" -#: c-api/unicode.rst:904 +#: c-api/unicode.rst:1042 msgid "" "Convert the Unicode object to a wide character string. The output string " "always ends with a null character. If *size* is not ``NULL``, write the " "number of wide characters (excluding the trailing null termination " "character) into *\\*size*. Note that the resulting :c:type:`wchar_t` string " "might contain null characters, which would cause the string to be truncated " -"when used with most C functions. If *size* is ``NULL`` and the :c:expr:" -"`wchar_t*` string contains null characters a :exc:`ValueError` is raised." +"when used with most C functions. If *size* is ``NULL`` and " +"the :c:expr:`wchar_t*` string contains null characters a :exc:`ValueError` " +"is raised." msgstr "" -#: c-api/unicode.rst:912 +#: c-api/unicode.rst:1050 msgid "" "Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " "to free it) on success. On error, returns ``NULL`` and *\\*size* is " "undefined. Raises a :exc:`MemoryError` if memory allocation is failed." msgstr "" -#: c-api/unicode.rst:919 +#: c-api/unicode.rst:1057 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " "string contains null characters." msgstr "" -#: c-api/unicode.rst:927 +#: c-api/unicode.rst:1065 msgid "Built-in Codecs" msgstr "" -#: c-api/unicode.rst:929 +#: c-api/unicode.rst:1067 msgid "" "Python provides a set of built-in codecs which are written in C for speed. " "All of these codecs are directly usable via the following functions." msgstr "" -#: c-api/unicode.rst:932 +#: c-api/unicode.rst:1070 msgid "" "Many of the following APIs take two arguments encoding and errors, and they " "have the same semantics as the ones of the built-in :func:`str` string " "object constructor." msgstr "" -#: c-api/unicode.rst:936 +#: c-api/unicode.rst:1074 msgid "" "Setting encoding to ``NULL`` causes the default encoding to be used which is " "UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " @@ -1195,28 +1372,42 @@ msgid "" "handler` internally." msgstr "" -#: c-api/unicode.rst:941 +#: c-api/unicode.rst:1079 msgid "" "Error handling is set by errors which may also be set to ``NULL`` meaning to " "use the default handling defined for the codec. Default error handling for " "all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." msgstr "" -#: c-api/unicode.rst:945 +#: c-api/unicode.rst:1083 msgid "" "The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" -#: c-api/unicode.rst:950 +#: c-api/unicode.rst:1088 msgid "Generic Codecs" msgstr "" -#: c-api/unicode.rst:952 +#: c-api/unicode.rst:1090 +msgid "The following macro is provided:" +msgstr "" + +#: c-api/unicode.rst:1095 +msgid "The Unicode code point ``U+FFFD`` (replacement character)." +msgstr "" + +#: c-api/unicode.rst:1097 +msgid "" +"This Unicode character is used as the replacement character during decoding " +"if the *errors* argument is set to \"replace\"." +msgstr "" + +#: c-api/unicode.rst:1101 msgid "These are the generic codec APIs:" msgstr "" -#: c-api/unicode.rst:958 +#: c-api/unicode.rst:1107 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string " "*str*. *encoding* and *errors* have the same meaning as the parameters of " @@ -1225,7 +1416,7 @@ msgid "" "was raised by the codec." msgstr "" -#: c-api/unicode.rst:968 +#: c-api/unicode.rst:1117 msgid "" "Encode a Unicode object and return the result as Python bytes object. " "*encoding* and *errors* have the same meaning as the parameters of the same " @@ -1234,21 +1425,21 @@ msgid "" "was raised by the codec." msgstr "" -#: c-api/unicode.rst:976 +#: c-api/unicode.rst:1125 msgid "UTF-8 Codecs" msgstr "" -#: c-api/unicode.rst:978 +#: c-api/unicode.rst:1127 msgid "These are the UTF-8 codec APIs:" msgstr "" -#: c-api/unicode.rst:983 +#: c-api/unicode.rst:1132 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:990 +#: c-api/unicode.rst:1139 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " @@ -1256,20 +1447,20 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:998 +#: c-api/unicode.rst:1147 msgid "" "Encode a Unicode object using UTF-8 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1017 +#: c-api/unicode.rst:1166 msgid "" "The function fails if the string contains surrogate code points (``U+D800`` " "- ``U+DFFF``)." msgstr "" -#: c-api/unicode.rst:1008 +#: c-api/unicode.rst:1157 msgid "" "Return a pointer to the UTF-8 encoding of the Unicode object, and store the " "size of the encoded representation (in bytes) in *size*. The *size* " @@ -1278,13 +1469,13 @@ msgid "" "regardless of whether there are any other null code points." msgstr "" -#: c-api/unicode.rst:1014 +#: c-api/unicode.rst:1163 msgid "" "On error, set an exception, set *size* to ``-1`` (if it's not NULL) and " "return ``NULL``." msgstr "" -#: c-api/unicode.rst:1020 +#: c-api/unicode.rst:1169 msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " @@ -1293,40 +1484,50 @@ msgid "" "collected." msgstr "" -#: c-api/unicode.rst:1040 -msgid "The return type is now ``const char *`` rather of ``char *``." +#: c-api/unicode.rst:1198 +msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "" -#: c-api/unicode.rst:1030 +#: c-api/unicode.rst:1179 msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: c-api/unicode.rst:1036 +#: c-api/unicode.rst:1185 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: c-api/unicode.rst:1045 +#: c-api/unicode.rst:1189 +msgid "" +"This function does not have any special behavior for `null characters " +"`_ embedded within *unicode*. " +"As a result, strings containing null characters will remain in the returned " +"string, which some C functions might interpret as the end of the string, " +"leading to truncation. If truncation is an issue, it is recommended to " +"use :c:func:`PyUnicode_AsUTF8AndSize` instead." +msgstr "" + +#: c-api/unicode.rst:1203 msgid "UTF-32 Codecs" msgstr "" -#: c-api/unicode.rst:1047 +#: c-api/unicode.rst:1205 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: c-api/unicode.rst:1053 +#: c-api/unicode.rst:1211 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1107 +#: c-api/unicode.rst:1265 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" -#: c-api/unicode.rst:1064 +#: c-api/unicode.rst:1222 msgid "" "If ``*byteorder`` is zero, and the first four bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1334,21 +1535,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: c-api/unicode.rst:1069 +#: c-api/unicode.rst:1227 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" -#: c-api/unicode.rst:1123 +#: c-api/unicode.rst:1281 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: c-api/unicode.rst:1125 +#: c-api/unicode.rst:1283 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1080 +#: c-api/unicode.rst:1238 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1357,29 +1558,29 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1089 +#: c-api/unicode.rst:1247 msgid "" "Return a Python byte string using the UTF-32 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1095 +#: c-api/unicode.rst:1253 msgid "UTF-16 Codecs" msgstr "" -#: c-api/unicode.rst:1097 +#: c-api/unicode.rst:1255 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: c-api/unicode.rst:1103 +#: c-api/unicode.rst:1261 msgid "" "Decode *size* bytes from a UTF-16 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1114 +#: c-api/unicode.rst:1272 msgid "" "If ``*byteorder`` is zero, and the first two bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1388,13 +1589,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: c-api/unicode.rst:1120 +#: c-api/unicode.rst:1278 msgid "" "After completion, ``*byteorder`` is set to the current byte order at the end " "of input data." msgstr "" -#: c-api/unicode.rst:1131 +#: c-api/unicode.rst:1289 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1404,28 +1605,28 @@ msgid "" "*consumed*." msgstr "" -#: c-api/unicode.rst:1140 +#: c-api/unicode.rst:1298 msgid "" "Return a Python byte string using the UTF-16 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1146 +#: c-api/unicode.rst:1304 msgid "UTF-7 Codecs" msgstr "" -#: c-api/unicode.rst:1148 +#: c-api/unicode.rst:1306 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: c-api/unicode.rst:1153 +#: c-api/unicode.rst:1311 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1160 +#: c-api/unicode.rst:1318 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1433,101 +1634,101 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1167 +#: c-api/unicode.rst:1325 msgid "Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1169 +#: c-api/unicode.rst:1327 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1175 +#: c-api/unicode.rst:1333 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: c-api/unicode.rst:1181 +#: c-api/unicode.rst:1339 msgid "" "Encode a Unicode object using Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1187 +#: c-api/unicode.rst:1345 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1189 +#: c-api/unicode.rst:1347 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1195 +#: c-api/unicode.rst:1353 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: c-api/unicode.rst:1201 +#: c-api/unicode.rst:1359 msgid "" "Encode a Unicode object using Raw-Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1207 +#: c-api/unicode.rst:1365 msgid "Latin-1 Codecs" msgstr "" -#: c-api/unicode.rst:1209 +#: c-api/unicode.rst:1367 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." msgstr "" -#: c-api/unicode.rst:1215 +#: c-api/unicode.rst:1373 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1221 +#: c-api/unicode.rst:1379 msgid "" "Encode a Unicode object using Latin-1 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1227 +#: c-api/unicode.rst:1385 msgid "ASCII Codecs" msgstr "" -#: c-api/unicode.rst:1229 +#: c-api/unicode.rst:1387 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" -#: c-api/unicode.rst:1235 +#: c-api/unicode.rst:1393 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1241 +#: c-api/unicode.rst:1399 msgid "" "Encode a Unicode object using ASCII and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1247 +#: c-api/unicode.rst:1405 msgid "Character Map Codecs" msgstr "" -#: c-api/unicode.rst:1249 +#: c-api/unicode.rst:1407 msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " @@ -1537,18 +1738,18 @@ msgid "" "sequences work well." msgstr "" -#: c-api/unicode.rst:1255 +#: c-api/unicode.rst:1413 msgid "These are the mapping codec APIs:" msgstr "" -#: c-api/unicode.rst:1260 +#: c-api/unicode.rst:1418 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *str* " "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1264 +#: c-api/unicode.rst:1422 msgid "" "If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " "must map bytes ordinals (integers in the range from 0 to 255) to Unicode " @@ -1558,14 +1759,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: c-api/unicode.rst:1275 +#: c-api/unicode.rst:1433 msgid "" "Encode a Unicode object using the given *mapping* object and return the " "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " "an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1279 +#: c-api/unicode.rst:1437 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1573,41 +1774,41 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: c-api/unicode.rst:1285 +#: c-api/unicode.rst:1443 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: c-api/unicode.rst:1289 +#: c-api/unicode.rst:1447 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1293 +#: c-api/unicode.rst:1451 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." msgstr "" -#: c-api/unicode.rst:1296 +#: c-api/unicode.rst:1454 msgid "" "Mapping tables need only provide the :meth:`~object.__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" -#: c-api/unicode.rst:1300 +#: c-api/unicode.rst:1458 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." msgstr "" -#: c-api/unicode.rst:1305 +#: c-api/unicode.rst:1463 msgid "MBCS codecs for Windows" msgstr "" -#: c-api/unicode.rst:1307 +#: c-api/unicode.rst:1465 msgid "" "These are the MBCS codec APIs. They are currently only available on Windows " "and use the Win32 MBCS converters to implement the conversions. Note that " @@ -1615,13 +1816,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: c-api/unicode.rst:1314 +#: c-api/unicode.rst:1472 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1321 +#: c-api/unicode.rst:1479 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -1629,44 +1830,46 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1329 +#: c-api/unicode.rst:1488 +msgid "" +"Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page " +"specified by *code_page*." +msgstr "" + +#: c-api/unicode.rst:1494 msgid "" "Encode a Unicode object using MBCS and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1336 +#: c-api/unicode.rst:1501 msgid "" "Encode the Unicode object using the specified code page and return a Python " -"bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" -"c:macro:`!CP_ACP` code page to get the MBCS encoder." -msgstr "" - -#: c-api/unicode.rst:1344 -msgid "Methods & Slots" +"bytes object. Return ``NULL`` if an exception was raised by the codec. " +"Use :c:macro:`!CP_ACP` code page to get the MBCS encoder." msgstr "" -#: c-api/unicode.rst:1350 +#: c-api/unicode.rst:1511 msgid "Methods and Slot Functions" msgstr "" -#: c-api/unicode.rst:1352 +#: c-api/unicode.rst:1513 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" -#: c-api/unicode.rst:1356 +#: c-api/unicode.rst:1517 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: c-api/unicode.rst:1361 +#: c-api/unicode.rst:1522 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: c-api/unicode.rst:1366 +#: c-api/unicode.rst:1527 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1675,27 +1878,72 @@ msgid "" "list." msgstr "" -#: c-api/unicode.rst:1374 +#: c-api/unicode.rst:1542 c-api/unicode.rst:1576 +msgid "On error, return ``NULL`` with an exception set." +msgstr "" + +#: c-api/unicode.rst:1534 +msgid "Equivalent to :py:meth:`str.split`." +msgstr "" + +#: c-api/unicode.rst:1539 +msgid "" +"Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " +"at the end of the string." +msgstr "" + +#: c-api/unicode.rst:1544 +msgid "Equivalent to :py:meth:`str.rsplit`." +msgstr "" + +#: c-api/unicode.rst:1549 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " "CRLF is considered to be one line break. If *keepends* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" -#: c-api/unicode.rst:1381 +#: c-api/unicode.rst:1556 +msgid "" +"Split a Unicode string at the first occurrence of *sep*, and return a 3-" +"tuple containing the part before the separator, the separator itself, and " +"the part after the separator. If the separator is not found, return a 3-" +"tuple containing the string itself, followed by two empty strings." +msgstr "" + +#: c-api/unicode.rst:1574 +msgid "*sep* must not be empty." +msgstr "" + +#: c-api/unicode.rst:1565 +msgid "Equivalent to :py:meth:`str.partition`." +msgstr "" + +#: c-api/unicode.rst:1570 +msgid "" +"Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " +"last occurrence of *sep*. If the separator is not found, return a 3-tuple " +"containing two empty strings, followed by the string itself." +msgstr "" + +#: c-api/unicode.rst:1578 +msgid "Equivalent to :py:meth:`str.rpartition`." +msgstr "" + +#: c-api/unicode.rst:1583 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" -#: c-api/unicode.rst:1388 +#: c-api/unicode.rst:1590 msgid "" "Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail " "end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` " "a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1396 +#: c-api/unicode.rst:1598 msgid "" "Return the first position of *substr* in ``unicode[start:end]`` using the " "given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1704,7 +1952,7 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1406 +#: c-api/unicode.rst:1608 msgid "" "Return the first position of the character *ch* in ``unicode[start:end]`` " "using the given *direction* (*direction* == ``1`` means to do a forward " @@ -1714,37 +1962,73 @@ msgid "" "set." msgstr "" -#: c-api/unicode.rst:1414 +#: c-api/unicode.rst:1616 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" -#: c-api/unicode.rst:1421 +#: c-api/unicode.rst:1623 msgid "" "Return the number of non-overlapping occurrences of *substr* in " "``unicode[start:end]``. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1428 +#: c-api/unicode.rst:1630 msgid "" "Replace at most *maxcount* occurrences of *substr* in *unicode* with " "*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " "means replace all occurrences." msgstr "" -#: c-api/unicode.rst:1435 +#: c-api/unicode.rst:1637 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" -#: c-api/unicode.rst:1438 +#: c-api/unicode.rst:1640 msgid "" -"This function returns ``-1`` upon failure, so one should call :c:func:" -"`PyErr_Occurred` to check for errors." +"This function returns ``-1`` upon failure, so one should " +"call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +#: c-api/unicode.rst:1645 +msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" -#: c-api/unicode.rst:1444 +#: c-api/unicode.rst:1650 +msgid "Test if two strings are equal:" +msgstr "" + +#: c-api/unicode.rst:1652 +msgid "Return ``1`` if *a* is equal to *b*." +msgstr "" + +#: c-api/unicode.rst:1653 +msgid "Return ``0`` if *a* is not equal to *b*." +msgstr "" + +#: c-api/unicode.rst:1654 +msgid "" +"Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not " +"a :class:`str` object." +msgstr "" + +#: c-api/unicode.rst:1657 +msgid "The function always succeeds if *a* and *b* are :class:`str` objects." +msgstr "" + +#: c-api/unicode.rst:1659 +msgid "" +"The function works for :class:`str` subclasses, but does not honor custom " +"``__eq__()`` method." +msgstr "" + +#: c-api/unicode.rst:1664 +msgid "The :c:func:`PyUnicode_Compare` function." +msgstr "" + +#: c-api/unicode.rst:1671 msgid "" "Compare a Unicode object with a char buffer which is interpreted as being " "UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " @@ -1753,18 +2037,18 @@ msgid "" "is returned." msgstr "" -#: c-api/unicode.rst:1472 +#: c-api/unicode.rst:1699 msgid "This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:1458 +#: c-api/unicode.rst:1685 msgid "" "Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " "length using :c:func:`!strlen`. If the Unicode object contains null " "characters, false (``0``) is returned." msgstr "" -#: c-api/unicode.rst:1467 +#: c-api/unicode.rst:1694 msgid "" "Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -1772,58 +2056,59 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: c-api/unicode.rst:1477 +#: c-api/unicode.rst:1704 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: c-api/unicode.rst:1479 +#: c-api/unicode.rst:1706 msgid "``NULL`` in case an exception was raised" msgstr "" -#: c-api/unicode.rst:1480 +#: c-api/unicode.rst:1707 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" -#: c-api/unicode.rst:1481 +#: c-api/unicode.rst:1708 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: c-api/unicode.rst:1483 +#: c-api/unicode.rst:1710 msgid "" -"Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" -"`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." +"Possible values for *op* " +"are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, " +"and :c:macro:`Py_LE`." msgstr "" -#: c-api/unicode.rst:1489 +#: c-api/unicode.rst:1716 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" -#: c-api/unicode.rst:1495 +#: c-api/unicode.rst:1722 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" -#: c-api/unicode.rst:1498 +#: c-api/unicode.rst:1725 msgid "" "*substr* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" -#: c-api/unicode.rst:1504 +#: c-api/unicode.rst:1731 msgid "" "Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " "address of a pointer variable pointing to a Python Unicode string object. " -"If there is an existing interned string that is the same as :c:expr:" -"`*p_unicode`, it sets :c:expr:`*p_unicode` to it (releasing the reference to " -"the old string object and creating a new :term:`strong reference` to the " -"interned string object), otherwise it leaves :c:expr:`*p_unicode` alone and " -"interns it." +"If there is an existing interned string that is the same " +"as :c:expr:`*p_unicode`, it sets :c:expr:`*p_unicode` to it (releasing the " +"reference to the old string object and creating a new :term:`strong " +"reference` to the interned string object), otherwise it " +"leaves :c:expr:`*p_unicode` alone and interns it." msgstr "" -#: c-api/unicode.rst:1511 +#: c-api/unicode.rst:1738 msgid "" "(Clarification: even though there is a lot of talk about references, think " "of this function as reference-neutral. You must own the object you pass in; " @@ -1831,49 +2116,290 @@ msgid "" "the result.)" msgstr "" -#: c-api/unicode.rst:1516 +#: c-api/unicode.rst:1743 msgid "" "This function never raises an exception. On error, it leaves its argument " "unchanged without interning it." msgstr "" -#: c-api/unicode.rst:1519 +#: c-api/unicode.rst:1746 msgid "" -"Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" -"expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " -"as with any other error -- the argument is left unchanged." +"Instances of subclasses of :py:class:`str` may not be interned, that " +"is, :c:expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, " +"then -- as with any other error -- the argument is left unchanged." msgstr "" -#: c-api/unicode.rst:1523 +#: c-api/unicode.rst:1750 msgid "" "Note that interned strings are not “immortal”. You must keep a reference to " "the result to benefit from interning." msgstr "" -#: c-api/unicode.rst:1529 +#: c-api/unicode.rst:1756 msgid "" -"A combination of :c:func:`PyUnicode_FromString` and :c:func:" -"`PyUnicode_InternInPlace`, meant for statically allocated strings." +"A combination of :c:func:`PyUnicode_FromString` " +"and :c:func:`PyUnicode_InternInPlace`, meant for statically allocated " +"strings." msgstr "" -#: c-api/unicode.rst:1532 +#: c-api/unicode.rst:1759 msgid "" "Return a new (\"owned\") reference to either a new Unicode string object " "that has been interned, or an earlier interned string object with the same " "value." msgstr "" -#: c-api/unicode.rst:1536 +#: c-api/unicode.rst:1763 msgid "" "Python may keep a reference to the result, or make it :term:`immortal`, " "preventing it from being garbage-collected promptly. For interning an " "unbounded number of different strings, such as ones coming from user input, " -"prefer calling :c:func:`PyUnicode_FromString` and :c:func:" -"`PyUnicode_InternInPlace` directly." +"prefer calling :c:func:`PyUnicode_FromString` " +"and :c:func:`PyUnicode_InternInPlace` directly." msgstr "" -#: c-api/unicode.rst:1544 -msgid "Strings interned this way are made :term:`immortal`." +#: c-api/unicode.rst:1772 +msgid "" +"Return a non-zero value if *str* is interned, zero if not. The *str* " +"argument must be a string; this is not checked. This function always " +"succeeds." +msgstr "" + +#: c-api/unicode.rst:1778 +msgid "" +"A non-zero return value may carry additional information about *how* the " +"string is interned. The meaning of such non-zero values, as well as each " +"specific string's intern-related details, may change between CPython " +"versions." +msgstr "" + +#: c-api/unicode.rst:1785 +msgid "PyUnicodeWriter" +msgstr "" + +#: c-api/unicode.rst:1787 +msgid "" +"The :c:type:`PyUnicodeWriter` API can be used to create a " +"Python :class:`str` object." +msgstr "" + +#: c-api/unicode.rst:1794 +#, fuzzy +msgid "A Unicode writer instance." +msgstr "Un objet Unicode." + +#: c-api/unicode.rst:1796 +msgid "" +"The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " +"success, or :c:func:`PyUnicodeWriter_Discard` on error." +msgstr "" + +#: c-api/unicode.rst:1801 +msgid "Create a Unicode writer instance." +msgstr "" + +#: c-api/unicode.rst:1803 +msgid "*length* must be greater than or equal to ``0``." +msgstr "" + +#: c-api/unicode.rst:1805 +msgid "" +"If *length* is greater than ``0``, preallocate an internal buffer of " +"*length* characters." +msgstr "" + +#: c-api/unicode.rst:1814 +msgid "Set an exception and return ``NULL`` on error." +msgstr "" + +#: c-api/unicode.rst:1812 +msgid "" +"Return the final Python :class:`str` object and destroy the writer instance." +msgstr "" + +#: c-api/unicode.rst:1824 +msgid "The writer instance is invalid after this call." +msgstr "" + +#: c-api/unicode.rst:1820 +msgid "Discard the internal Unicode buffer and destroy the writer instance." +msgstr "" + +#: c-api/unicode.rst:1822 +msgid "If *writer* is ``NULL``, no operation is performed." +msgstr "" + +#: c-api/unicode.rst:1828 +msgid "Write the single Unicode character *ch* into *writer*." +msgstr "" + +#: c-api/unicode.rst:1840 c-api/unicode.rst:1865 c-api/unicode.rst:1881 +#: c-api/unicode.rst:1909 c-api/unicode.rst:1935 +msgid "" +"On success, return ``0``. On error, set an exception, leave the writer " +"unchanged, and return ``-1``." +msgstr "" + +#: c-api/unicode.rst:1835 +msgid "" +"Decode the string *str* from UTF-8 in strict mode and write the output into " +"*writer*." +msgstr "" + +#: c-api/unicode.rst:1849 c-api/unicode.rst:1924 +msgid "" +"*size* is the string length in bytes. If *size* is equal to ``-1``, call " +"``strlen(str)`` to get the string length." +msgstr "" + +#: c-api/unicode.rst:1843 +msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." +msgstr "" + +#: c-api/unicode.rst:1847 +msgid "Write the ASCII string *str* into *writer*." +msgstr "" + +#: c-api/unicode.rst:1852 +msgid "" +"*str* must only contain ASCII characters. The behavior is undefined if *str* " +"contains non-ASCII characters." +msgstr "" + +#: c-api/unicode.rst:1860 +msgid "Write the wide string *str* into *writer*." +msgstr "" + +#: c-api/unicode.rst:1862 +msgid "" +"*size* is a number of wide characters. If *size* is equal to ``-1``, call " +"``wcslen(str)`` to get the string length." +msgstr "" + +#: c-api/unicode.rst:1870 +msgid "Writer the UCS4 string *str* into *writer*." +msgstr "" + +#: c-api/unicode.rst:1872 +msgid "*size* is a number of UCS4 characters." +msgstr "" + +#: c-api/unicode.rst:1879 +msgid "" +"Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." +msgstr "" + +#: c-api/unicode.rst:1884 +msgid "" +"To write a :class:`str` subclass which overrides the :meth:`~object.__str__` " +"method, :c:func:`PyUnicode_FromObject` can be used to get the original " +"string." +msgstr "" + +#: c-api/unicode.rst:1890 +msgid "" +"Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." +msgstr "" + +#: c-api/unicode.rst:1892 +msgid "If *obj* is ``NULL``, write the string ``\"\"`` into *writer*." +msgstr "" + +#: c-api/unicode.rst:1899 +msgid "Added support for ``NULL``." +msgstr "" + +#: c-api/unicode.rst:1903 +msgid "Write the substring ``str[start:end]`` into *writer*." +msgstr "" + +#: c-api/unicode.rst:1905 +msgid "" +"*str* must be Python :class:`str` object. *start* must be greater than or " +"equal to 0, and less than or equal to *end*. *end* must be less than or " +"equal to *str* length." +msgstr "" + +#: c-api/unicode.rst:1914 +msgid "" +"Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " +"into *writer*." +msgstr "" + +#: c-api/unicode.rst:1921 +msgid "" +"Decode the string *str* from UTF-8 with *errors* error handler and write the " +"output into *writer*." +msgstr "" + +#: c-api/unicode.rst:1927 +msgid "" +"*errors* is an :ref:`error handler ` name, such as " +"``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." +msgstr "" + +#: c-api/unicode.rst:1930 +msgid "" +"If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " +"bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " +"byte sequences as an error." +msgstr "" + +#: c-api/unicode.rst:1938 +msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." +msgstr "" + +#: c-api/unicode.rst:1941 +msgid "Deprecated API" +msgstr "" + +#: c-api/unicode.rst:1943 +msgid "The following API is deprecated." +msgstr "" + +#: c-api/unicode.rst:1947 +#, fuzzy +msgid "" +"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " +"type depending on the platform. Please use :c:type:`wchar_t` directly " +"instead." +msgstr "" +"Ceci est un *typedef* de :c:expr:`wchar_t`, qui est un type 16-bit ou un " +"type 32-bit selon la plateforme." + +#: c-api/unicode.rst:1951 +msgid "" +"In previous versions, this was a 16-bit type or a 32-bit type depending on " +"whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " +"build time." +msgstr "" +"Dans les versions précédentes, ceci était un type 16-bit ou un type 32-bit " +"selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " +"à la compilation." + +#: c-api/unicode.rst:1961 +msgid "" +"Do nothing and return ``0``. This API is kept only for backward " +"compatibility, but there are no plans to remove it." +msgstr "" + +#: c-api/unicode.rst:1967 +msgid "" +"This API does nothing since Python 3.12. Previously, this needed to be " +"called for each string created using the old API (:c:func:`!" +"PyUnicode_FromUnicode` or similar)." +msgstr "" + +#: c-api/unicode.rst:1975 +msgid "" +"Do nothing and return ``1``. This API is kept only for backward " +"compatibility, but there are no plans to remove it." +msgstr "" + +#: c-api/unicode.rst:1981 +msgid "" +"This API does nothing since Python 3.12. Previously, this could be called to " +"check if :c:func:`PyUnicode_READY` is necessary." msgstr "" #~ msgid "" @@ -1882,8 +2408,8 @@ msgstr "" #~ "is deprecated and inefficient." #~ msgstr "" #~ "Des représentations :c:expr:`Py_UNICODE*` et UTF-8 sont créées à la " -#~ "demande et mises en cache dans l'objet Unicode. La représentation :c:" -#~ "expr:`Py_UNICODE*` est dépréciée et inefficace." +#~ "demande et mises en cache dans l'objet Unicode. La " +#~ "représentation :c:expr:`Py_UNICODE*` est dépréciée et inefficace." #~ msgid "" #~ "Due to the transition between the old APIs and the new APIs, Unicode " @@ -1906,14 +2432,14 @@ msgstr "" #~ msgid "" #~ "\"legacy\" Unicode objects have been created through one of the " #~ "deprecated APIs (typically :c:func:`PyUnicode_FromUnicode`) and only bear " -#~ "the :c:expr:`Py_UNICODE*` representation; you will have to call :c:func:" -#~ "`PyUnicode_READY` on them before calling any other API." +#~ "the :c:expr:`Py_UNICODE*` representation; you will have to " +#~ "call :c:func:`PyUnicode_READY` on them before calling any other API." #~ msgstr "" #~ "Les objets Unicode « historiques » ont été créés via une des APIs " #~ "dépréciées (typiquement :c:func:`PyUnicode_FromUnicode`) et supportent " -#~ "uniquement la représentation :c:expr:`Py_UNICODE*`; vous devrez appeler :" -#~ "c:func:`PyUnicode_READY` sur eux avant d'appeler n'importe quelle autre " -#~ "API." +#~ "uniquement la représentation :c:expr:`Py_UNICODE*`; vous devrez " +#~ "appeler :c:func:`PyUnicode_READY` sur eux avant d'appeler n'importe " +#~ "quelle autre API." #~ msgid "Format Characters" #~ msgstr "Caractères de format" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index e54de3217..385d14e24 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,16 +28,17 @@ msgstr "" #: c-api/veryhigh.rst:14 msgid "" "Several of these functions accept a start symbol from the grammar as a " -"parameter. The available start symbols are :c:data:`Py_eval_input`, :c:data:" -"`Py_file_input`, and :c:data:`Py_single_input`. These are described " -"following the functions which accept them as parameters." +"parameter. The available start symbols " +"are :c:data:`Py_eval_input`, :c:data:`Py_file_input`, :c:data:`Py_single_input`, " +"and :c:data:`Py_func_type_input`. These are described following the " +"functions which accept them as parameters." msgstr "" -#: c-api/veryhigh.rst:19 +#: c-api/veryhigh.rst:20 msgid "" "Note also that several of these functions take :c:expr:`FILE*` parameters. " -"One particular issue which needs to be handled carefully is that the :c:type:" -"`FILE` structure for different C libraries can be different and " +"One particular issue which needs to be handled carefully is that " +"the :c:type:`FILE` structure for different C libraries can be different and " "incompatible. Under Windows (at least), it is possible for dynamically " "linked extensions to actually use different libraries, so care should be " "taken that :c:expr:`FILE*` parameters are only passed to these functions if " @@ -45,42 +46,42 @@ msgid "" "runtime is using." msgstr "" -#: c-api/veryhigh.rst:30 +#: c-api/veryhigh.rst:31 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:36 +#: c-api/veryhigh.rst:37 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving the *closeit* argument set to ``0``." msgstr "" -#: c-api/veryhigh.rst:42 +#: c-api/veryhigh.rst:43 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving the *flags* argument set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:48 +#: c-api/veryhigh.rst:49 msgid "" "If *fp* refers to a file associated with an interactive device (console or " -"terminal input or Unix pseudo-terminal), return the value of :c:func:" -"`PyRun_InteractiveLoop`, otherwise return the result of :c:func:" -"`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:" -"func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this function " -"uses ``\"???\"`` as the filename. If *closeit* is true, the file is closed " -"before ``PyRun_SimpleFileExFlags()`` returns." +"terminal input or Unix pseudo-terminal), return the value " +"of :c:func:`PyRun_InteractiveLoop`, otherwise return the result " +"of :c:func:`PyRun_SimpleFile`. *filename* is decoded from the filesystem " +"encoding (:func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, " +"this function uses ``\"???\"`` as the filename. If *closeit* is true, the " +"file is closed before ``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:60 +#: c-api/veryhigh.rst:61 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " "leaving the :c:struct:`PyCompilerFlags`\\* argument set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:66 +#: c-api/veryhigh.rst:67 msgid "" "Executes the Python source code from *command* in the :mod:`__main__` module " "according to the *flags* argument. If :mod:`__main__` does not already " @@ -89,26 +90,26 @@ msgid "" "information. For the meaning of *flags*, see below." msgstr "" -#: c-api/veryhigh.rst:72 +#: c-api/veryhigh.rst:73 msgid "" "Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " -"function will not return ``-1``, but exit the process, as long as :c:member:" -"`PyConfig.inspect` is zero." +"function will not return ``-1``, but exit the process, as long " +"as :c:member:`PyConfig.inspect` is zero." msgstr "" -#: c-api/veryhigh.rst:79 +#: c-api/veryhigh.rst:80 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:85 +#: c-api/veryhigh.rst:86 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:91 +#: c-api/veryhigh.rst:92 msgid "" "Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " "read from *fp* instead of an in-memory string. *filename* should be the name " @@ -117,43 +118,50 @@ msgid "" "``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:98 +#: c-api/veryhigh.rst:99 msgid "" "On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " "\"rb\")``). Otherwise, Python may not handle script file with LF line ending " "correctly." msgstr "" -#: c-api/veryhigh.rst:104 -msgid "" -"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " -"leaving *flags* set to ``NULL``." -msgstr "" - -#: c-api/veryhigh.rst:110 +#: c-api/veryhigh.rst:105 msgid "" "Read and execute a single statement from a file associated with an " "interactive device according to the *flags* argument. The user will be " -"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the :" -"term:`filesystem encoding and error handler`." +"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* must be a " +"Python :class:`str` object." msgstr "" -#: c-api/veryhigh.rst:115 +#: c-api/veryhigh.rst:110 msgid "" "Returns ``0`` when the input was executed successfully, ``-1`` if there was " "an exception, or an error code from the :file:`errcode.h` include file " -"distributed as part of Python if there was a parse error. (Note that :file:" -"`errcode.h` is not included by :file:`Python.h`, so must be included " -"specifically if needed.)" +"distributed as part of Python if there was a parse error. (Note " +"that :file:`errcode.h` is not included by :file:`Python.h`, so must be " +"included specifically if needed.)" +msgstr "" + +#: c-api/veryhigh.rst:119 +msgid "" +"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:125 +msgid "" +"Similar to :c:func:`PyRun_InteractiveOneObject`, but *filename* is " +"a :c:expr:`const char*`, which is decoded from the :term:`filesystem " +"encoding and error handler`." msgstr "" -#: c-api/veryhigh.rst:124 +#: c-api/veryhigh.rst:132 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " "below, leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:130 +#: c-api/veryhigh.rst:138 msgid "" "Read and execute statements from a file associated with an interactive " "device until EOF is reached. The user will be prompted using ``sys.ps1`` " @@ -161,23 +169,23 @@ msgid "" "and error handler`. Returns ``0`` at EOF or a negative number upon failure." msgstr "" -#: c-api/veryhigh.rst:138 +#: c-api/veryhigh.rst:146 msgid "" "Can be set to point to a function with the prototype ``int func(void)``. " "The function will be called when Python's interpreter prompt is about to " "become idle and wait for user input from the terminal. The return value is " "ignored. Overriding this hook can be used to integrate the interpreter's " -"prompt with other event loops, as done in the :file:`Modules/_tkinter.c` in " -"the Python source code." +"prompt with other event loops, as done in :file:`Modules/_tkinter.c` in the " +"Python source code." msgstr "" -#: c-api/veryhigh.rst:170 +#: c-api/veryhigh.rst:178 msgid "" "This function is only called from the :ref:`main interpreter `." msgstr "" -#: c-api/veryhigh.rst:153 +#: c-api/veryhigh.rst:161 msgid "" "Can be set to point to a function with the prototype ``char *func(FILE " "*stdin, FILE *stdout, char *prompt)``, overriding the default function used " @@ -188,91 +196,91 @@ msgid "" "line-editing and tab-completion features." msgstr "" -#: c-api/veryhigh.rst:162 +#: c-api/veryhigh.rst:170 msgid "" -"The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:" -"func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." +"The result must be a string allocated by :c:func:`PyMem_RawMalloc` " +"or :c:func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." msgstr "" -#: c-api/veryhigh.rst:165 +#: c-api/veryhigh.rst:173 msgid "" -"The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:" -"`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :" -"c:func:`PyMem_Realloc`." +"The result must be allocated by :c:func:`PyMem_RawMalloc` " +"or :c:func:`PyMem_RawRealloc`, instead of being allocated " +"by :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`." msgstr "" -#: c-api/veryhigh.rst:176 +#: c-api/veryhigh.rst:184 msgid "" "This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:182 +#: c-api/veryhigh.rst:190 msgid "" "Execute Python source code from *str* in the context specified by the " "objects *globals* and *locals* with the compiler flags specified by " "*flags*. *globals* must be a dictionary; *locals* can be any object that " "implements the mapping protocol. The parameter *start* specifies the start " -"token that should be used to parse the source code." +"symbol and must be one of the :ref:`available start symbols `." msgstr "" -#: c-api/veryhigh.rst:188 +#: c-api/veryhigh.rst:196 msgid "" "Returns the result of executing the code as a Python object, or ``NULL`` if " "an exception was raised." msgstr "" -#: c-api/veryhigh.rst:194 +#: c-api/veryhigh.rst:202 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:200 +#: c-api/veryhigh.rst:208 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:206 +#: c-api/veryhigh.rst:214 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0``." msgstr "" -#: c-api/veryhigh.rst:212 +#: c-api/veryhigh.rst:220 msgid "" "Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read " "from *fp* instead of an in-memory string. *filename* should be the name of " "the file, it is decoded from the :term:`filesystem encoding and error " -"handler`. If *closeit* is true, the file is closed before :c:func:" -"`PyRun_FileExFlags` returns." +"handler`. If *closeit* is true, the file is closed " +"before :c:func:`PyRun_FileExFlags` returns." msgstr "" -#: c-api/veryhigh.rst:221 +#: c-api/veryhigh.rst:229 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:227 +#: c-api/veryhigh.rst:235 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " "with *optimize* set to ``-1``." msgstr "" -#: c-api/veryhigh.rst:233 +#: c-api/veryhigh.rst:241 msgid "" "Parse and compile the Python source code in *str*, returning the resulting " -"code object. The start token is given by *start*; this can be used to " -"constrain the code which can be compiled and should be :c:data:" -"`Py_eval_input`, :c:data:`Py_file_input`, or :c:data:`Py_single_input`. The " -"filename specified by *filename* is used to construct the code object and " -"may appear in tracebacks or :exc:`SyntaxError` exception messages. This " -"returns ``NULL`` if the code cannot be parsed or compiled." +"code object. The start symbol is given by *start*; this can be used to " +"constrain the code which can be compiled and should be :ref:`available start " +"symbols `. The filename specified by *filename* is used to " +"construct the code object and may appear in tracebacks or :exc:`SyntaxError` " +"exception messages. This returns ``NULL`` if the code cannot be parsed or " +"compiled." msgstr "" -#: c-api/veryhigh.rst:241 +#: c-api/veryhigh.rst:249 msgid "" "The integer *optimize* specifies the optimization level of the compiler; a " "value of ``-1`` selects the optimization level of the interpreter as given " @@ -281,20 +289,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" -#: c-api/veryhigh.rst:252 +#: c-api/veryhigh.rst:260 msgid "" "Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/veryhigh.rst:259 +#: c-api/veryhigh.rst:267 msgid "" "This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the " "code object, and global and local variables. The other arguments are set to " "``NULL``." msgstr "" -#: c-api/veryhigh.rst:266 +#: c-api/veryhigh.rst:274 msgid "" "Evaluate a precompiled code object, given a particular environment for its " "evaluation. This environment consists of a dictionary of global variables, " @@ -303,13 +311,13 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" -#: c-api/veryhigh.rst:275 +#: c-api/veryhigh.rst:283 msgid "" -"Evaluate an execution frame. This is a simplified interface to :c:func:" -"`PyEval_EvalFrameEx`, for backward compatibility." +"Evaluate an execution frame. This is a simplified interface " +"to :c:func:`PyEval_EvalFrameEx`, for backward compatibility." msgstr "" -#: c-api/veryhigh.rst:281 +#: c-api/veryhigh.rst:289 msgid "" "This is the main, unvarnished function of Python interpretation. The code " "object associated with the execution frame *f* is executed, interpreting " @@ -319,7 +327,7 @@ msgid "" "of generator objects." msgstr "" -#: c-api/veryhigh.rst:288 +#: c-api/veryhigh.rst:296 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -327,71 +335,145 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/veryhigh.rst:295 +#: c-api/veryhigh.rst:303 msgid "" "This function changes the flags of the current evaluation frame, and returns " "true on success, false on failure." msgstr "" -#: c-api/veryhigh.rst:303 +#: c-api/veryhigh.rst:309 +msgid "" +"This is the structure used to hold compiler flags. In cases where code is " +"only being compiled, it is passed as ``int flags``, and in cases where code " +"is being executed, it is passed as ``PyCompilerFlags *flags``. In this " +"case, ``from __future__ import`` can modify *flags*." +msgstr "" + +#: c-api/veryhigh.rst:314 +msgid "" +"Whenever ``PyCompilerFlags *flags`` is " +"``NULL``, :c:member:`~PyCompilerFlags.cf_flags` is treated as equal to " +"``0``, and any modification due to ``from __future__ import`` is discarded." +msgstr "" + +#: c-api/veryhigh.rst:320 +msgid "Compiler flags." +msgstr "" + +#: c-api/veryhigh.rst:324 +msgid "" +"*cf_feature_version* is the minor Python version. It should be initialized " +"to ``PY_MINOR_VERSION``." +msgstr "" + +#: c-api/veryhigh.rst:327 +msgid "" +"The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " +"flag is set in :c:member:`~PyCompilerFlags.cf_flags`." +msgstr "" + +#: c-api/veryhigh.rst:330 +msgid "Added *cf_feature_version* field." +msgstr "" + +#: c-api/veryhigh.rst:333 +msgid "The available compiler flags are accessible as macros:" +msgstr "" + +#: c-api/veryhigh.rst:342 +msgid "" +"See :ref:`compiler flags ` in documentation of " +"the :py:mod:`!ast` Python module, which exports these constants under the " +"same names." +msgstr "" + +#: c-api/veryhigh.rst:346 +msgid "" +"The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " +"such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " +"selectable using :ref:`future statements `. " +"See :ref:`c_codeobject_flags` for a complete list." +msgstr "" + +#: c-api/veryhigh.rst:355 +msgid "Available start symbols" +msgstr "" + +#: c-api/veryhigh.rst:362 msgid "" "The start symbol from the Python grammar for isolated expressions; for use " "with :c:func:`Py_CompileString`." msgstr "" -#: c-api/veryhigh.rst:311 +#: c-api/veryhigh.rst:370 msgid "" "The start symbol from the Python grammar for sequences of statements as read " "from a file or other source; for use with :c:func:`Py_CompileString`. This " "is the symbol to use when compiling arbitrarily long Python source code." msgstr "" -#: c-api/veryhigh.rst:320 +#: c-api/veryhigh.rst:379 msgid "" "The start symbol from the Python grammar for a single statement; for use " "with :c:func:`Py_CompileString`. This is the symbol used for the interactive " "interpreter loop." msgstr "" -#: c-api/veryhigh.rst:327 +#: c-api/veryhigh.rst:388 msgid "" -"This is the structure used to hold compiler flags. In cases where code is " -"only being compiled, it is passed as ``int flags``, and in cases where code " -"is being executed, it is passed as ``PyCompilerFlags *flags``. In this " -"case, ``from __future__ import`` can modify *flags*." +"The start symbol from the Python grammar for a function type; for use " +"with :c:func:`Py_CompileString`. This is used to parse \"signature type " +"comments\" from :pep:`484`." msgstr "" -#: c-api/veryhigh.rst:332 -msgid "" -"Whenever ``PyCompilerFlags *flags`` is ``NULL``, :c:member:`~PyCompilerFlags." -"cf_flags` is treated as equal to ``0``, and any modification due to ``from " -"__future__ import`` is discarded." +#: c-api/veryhigh.rst:392 +msgid "This requires the :c:macro:`PyCF_ONLY_AST` flag to be set." msgstr "" -#: c-api/veryhigh.rst:338 -msgid "Compiler flags." +#: c-api/veryhigh.rst:395 +msgid ":py:class:`ast.FunctionType`" msgstr "" -#: c-api/veryhigh.rst:342 -msgid "" -"*cf_feature_version* is the minor Python version. It should be initialized " -"to ``PY_MINOR_VERSION``." +#: c-api/veryhigh.rst:396 +msgid ":pep:`484`" +msgstr "" + +#: c-api/veryhigh.rst:402 +msgid "Stack Effects" +msgstr "" + +#: c-api/veryhigh.rst:405 +msgid ":py:func:`dis.stack_effect`" +msgstr "" + +#: c-api/veryhigh.rst:410 +msgid "Sentinel value representing an invalid stack effect." msgstr "" -#: c-api/veryhigh.rst:345 +#: c-api/veryhigh.rst:412 +msgid "This is currently equivalent to ``INT_MAX``." +msgstr "" + +#: c-api/veryhigh.rst:419 +msgid "Compute the stack effect of *opcode* with argument *oparg*." +msgstr "" + +#: c-api/veryhigh.rst:435 msgid "" -"The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " -"flag is set in :c:member:`~PyCompilerFlags.cf_flags`." +"On success, this function returns the stack effect; on failure, this " +"returns :c:macro:`PY_INVALID_STACK_EFFECT`." msgstr "" -#: c-api/veryhigh.rst:348 -msgid "Added *cf_feature_version* field." +#: c-api/veryhigh.rst:429 +msgid "" +"Similar to :c:func:`PyCompile_OpcodeStackEffect`, but don't include the " +"stack effect of jumping if *jump* is zero." msgstr "" -#: c-api/veryhigh.rst:354 +#: c-api/veryhigh.rst:432 msgid "" -"This bit can be set in *flags* to cause division operator ``/`` to be " -"interpreted as \"true division\" according to :pep:`238`." +"If *jump* is ``0``, this will not include the stack effect of jumping, but " +"if *jump* is ``1`` or ``-1``, this will include it." msgstr "" #, fuzzy diff --git a/c-api/weakref.po b/c-api/weakref.po index 7b677d963..4d0309800 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-12-16 17:25+0100\n" "Last-Translator: Andy Kwok \n" "Language-Team: FRENCH \n" @@ -41,17 +41,24 @@ msgstr "Renvoie vrai si *ob* est soit une référence, soit un objet proxy." #: c-api/weakref.rst:22 #, fuzzy msgid "" -"Return non-zero if *ob* is a reference object. This function always " -"succeeds." +"Return non-zero if *ob* is a reference object or a subclass of the reference " +"type. This function always succeeds." msgstr "Retourne vrai si *ob* est un objet référence." -#: c-api/weakref.rst:27 +#: c-api/weakref.rst:28 +#, fuzzy +msgid "" +"Return non-zero if *ob* is a reference object, but not a subclass of the " +"reference type. This function always succeeds." +msgstr "Retourne vrai si *ob* est un objet référence." + +#: c-api/weakref.rst:34 #, fuzzy msgid "" "Return non-zero if *ob* is a proxy object. This function always succeeds." msgstr "Retourne vrai si *ob* est un objet proxy" -#: c-api/weakref.rst:32 +#: c-api/weakref.rst:39 #, fuzzy msgid "" "Return a weak reference object for the object *ob*. This will always return " @@ -74,7 +81,13 @@ msgstr "" "ou si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci retourne " "*NULL* et lève une :exc:`TypeError`." -#: c-api/weakref.rst:44 +#: c-api/weakref.rst:65 +msgid "" +":c:func:`PyType_SUPPORTS_WEAKREFS` for checking if *ob* is weakly " +"referenceable." +msgstr "" + +#: c-api/weakref.rst:55 #, fuzzy msgid "" "Return a weak reference proxy object for the object *ob*. This will always " @@ -96,58 +109,32 @@ msgstr "" "si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci renvoie *NULL* " "et lève une :exc:`TypeError`." -#: c-api/weakref.rst:56 +#: c-api/weakref.rst:71 msgid "" "Get a :term:`strong reference` to the referenced object from a weak " "reference, *ref*, into *\\*pobj*." msgstr "" -#: c-api/weakref.rst:59 +#: c-api/weakref.rst:74 msgid "" "On success, set *\\*pobj* to a new :term:`strong reference` to the " "referenced object and return 1." msgstr "" -#: c-api/weakref.rst:61 +#: c-api/weakref.rst:76 msgid "If the reference is dead, set *\\*pobj* to ``NULL`` and return 0." msgstr "" -#: c-api/weakref.rst:62 +#: c-api/weakref.rst:77 msgid "On error, raise an exception and return -1." msgstr "" -#: c-api/weakref.rst:69 -#, fuzzy +#: c-api/weakref.rst:84 msgid "" -"Return a :term:`borrowed reference` to the referenced object from a weak " -"reference, *ref*. If the referent is no longer live, returns ``Py_None``." +"Test if the weak reference *ref* is dead. Returns 1 if the reference is " +"dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak " +"reference object." msgstr "" -"Retourne l'objet référencé à partir d'une référence faible, *ref*. Si le " -"référence n'existe plus, alors l'objet renvoie :const:`Py_None`." - -#: c-api/weakref.rst:74 -#, fuzzy -msgid "" -"This function returns a :term:`borrowed reference` to the referenced object. " -"This means that you should always call :c:func:`Py_INCREF` on the object " -"except when it cannot be destroyed before the last usage of the borrowed " -"reference." -msgstr "" -"Cette fonction renvoie une **référence empruntée** à l'objet référencé. Cela " -"signifie que vous devez toujours appeler :c:func:`Py_INCREF` sur l'objet " -"sauf si vous savez qu'il ne peut pas être détruit tant que vous l'utilisez " -"encore." - -#: c-api/weakref.rst:87 -msgid "Use :c:func:`PyWeakref_GetRef` instead." -msgstr "" - -#: c-api/weakref.rst:85 -#, fuzzy -msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." -msgstr "" -"Similaire à :c:func:`PyWeakref_GetObject`, mais implémenté comme une macro " -"qui ne vérifie pas les erreurs." #: c-api/weakref.rst:93 msgid "" @@ -177,6 +164,34 @@ msgstr "" #: c-api/weakref.rst:111 msgid "" -"In most circumstances, it's more appropriate to use :c:func:" -"`PyObject_ClearWeakRefs` to clear weakrefs instead of this function." +"In most circumstances, it's more appropriate to " +"use :c:func:`PyObject_ClearWeakRefs` to clear weakrefs instead of this " +"function." msgstr "" + +#, fuzzy +#~ msgid "" +#~ "Return a :term:`borrowed reference` to the referenced object from a weak " +#~ "reference, *ref*. If the referent is no longer live, returns ``Py_None``." +#~ msgstr "" +#~ "Retourne l'objet référencé à partir d'une référence faible, *ref*. Si le " +#~ "référence n'existe plus, alors l'objet renvoie :const:`Py_None`." + +#, fuzzy +#~ msgid "" +#~ "This function returns a :term:`borrowed reference` to the referenced " +#~ "object. This means that you should always call :c:func:`Py_INCREF` on the " +#~ "object except when it cannot be destroyed before the last usage of the " +#~ "borrowed reference." +#~ msgstr "" +#~ "Cette fonction renvoie une **référence empruntée** à l'objet référencé. " +#~ "Cela signifie que vous devez toujours appeler :c:func:`Py_INCREF` sur " +#~ "l'objet sauf si vous savez qu'il ne peut pas être détruit tant que vous " +#~ "l'utilisez encore." + +#, fuzzy +#~ msgid "" +#~ "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." +#~ msgstr "" +#~ "Similaire à :c:func:`PyWeakref_GetObject`, mais implémenté comme une " +#~ "macro qui ne vérifie pas les erreurs." diff --git a/copyright.po b/copyright.po index bea7971d8..a219bb29c 100644 --- a/copyright.po +++ b/copyright.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" -"PO-Revision-Date: 2023-10-02 15:28-0600\n" -"Last-Translator: James Adjinwa \n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" +"PO-Revision-Date: 2025-10-26 22:33+0100\n" +"Last-Translator: Julien Palard \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.4\n" +"X-Generator: Poedit 3.6\n" #: copyright.rst:3 msgid "Copyright" @@ -24,9 +24,8 @@ msgid "Python and this documentation is:" msgstr "Python et cette documentation sont :" #: copyright.rst:7 -msgid "Copyright © 2001-2024 Python Software Foundation. All rights reserved." -msgstr "" -"Copyright © 2001-2024 Python Software Foundation. Tous droits réservés." +msgid "Copyright © 2001 Python Software Foundation. All rights reserved." +msgstr "Copyright © 2001 Python Software Foundation. Tous droits réservés." #: copyright.rst:9 msgid "Copyright © 2000 BeOpen.com. All rights reserved." diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index 41d6e8fca..40e572076 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,163 +15,18 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:2 -msgid "Pending Removal in Python 3.14" +#: deprecations/c-api-pending-removal-in-3.14.rst:2 +msgid "Pending removal in Python 3.14" msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:4 +#: deprecations/c-api-pending-removal-in-3.14.rst:4 msgid "" "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " "(:pep:`699`; :gh:`101193`)." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:7 +#: deprecations/c-api-pending-removal-in-3.14.rst:7 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases (:gh:`95388`)." msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:10 -msgid "" -"Functions to configure Python's initialization, deprecated in Python 3.11:" -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:12 -msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:14 -msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:16 -msgid "" -":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " -"instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:18 -msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:21 -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:71 -msgid "" -"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" -"`PyConfig` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:24 -msgid "Global configuration variables:" -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:30 -msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:32 -msgid "" -":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:34 -msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:36 -msgid "" -":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " -"instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:38 -msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:40 -msgid "" -":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:42 -msgid "" -":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:44 -msgid "" -":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " -"instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:46 -msgid "" -":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " -"instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:48 -msgid "" -":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." -"user_site_directory` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:50 -msgid "" -":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " -"instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:52 -msgid "" -":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " -"and :c:member:`PyConfig.hash_seed` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:55 -msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:57 -msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." -"legacy_windows_fs_encoding` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:59 -msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." -"legacy_windows_stdio` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:61 -msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." -"filesystem_encoding` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:63 -msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." -"filesystem_encoding` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:65 -msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." -"filesystem_errors` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:67 -msgid "" -":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" -"c:func:`Py_PreInitialize`)" -msgstr "" diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index fc1394be8..885ddc6a3 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,67 +16,269 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/c-api-pending-removal-in-3.15.rst:2 -msgid "Pending Removal in Python 3.15" +msgid "Pending removal in Python 3.15" msgstr "" #: deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." +msgid "" +"The :c:func:`!PyImport_ImportModuleNoBlock`: " +"Use :c:func:`PyImport_ImportModule` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:6 +msgid "" +":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: " +"Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project " +"`__ can be used to " +"get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:10 +msgid "" +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:12 +msgid "" +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`str`, such as :class:`bytes`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid "" +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid "" +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`bytes`, such as :class:`str`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:20 +msgid "Python initialization functions, deprecated in Python 3.13:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:22 +msgid "" +":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") " +"` (:data:`sys.path`) instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:25 +msgid "" +":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " +"` (:data:`sys.base_prefix`) instead. " +"Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) " +"if :ref:`virtual environments ` need to be handled." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:5 +#: deprecations/c-api-pending-removal-in-3.15.rst:30 msgid "" -"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" -"`PyImport_ImportModule` instead." +":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " +"` (:data:`sys.base_exec_prefix`) instead. " +"Use :c:func:`PyConfig_Get(\"exec_prefix\") ` " +"(:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to " +"be handled." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:7 +#: deprecations/c-api-pending-removal-in-3.15.rst:36 msgid "" -":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" -"func:`PyWeakref_GetRef` instead." +":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:9 +#: deprecations/c-api-pending-removal-in-3.15.rst:39 msgid "" -":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" -"type:`wchar_t` instead." +":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:42 +msgid "" +":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " +"` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:46 +msgid "" +"The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:50 +msgid "" +"Functions to configure Python's initialization, deprecated in Python 3.11:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:52 +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:11 -msgid "Python initialization functions:" +#: deprecations/c-api-pending-removal-in-3.15.rst:54 +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:13 +#: deprecations/c-api-pending-removal-in-3.15.rst:56 msgid "" -":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:58 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:60 +msgid "" +":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:15 +#: deprecations/c-api-pending-removal-in-3.15.rst:63 msgid "" -":c:func:`Py_GetExecPrefix`: Get :data:`sys.base_exec_prefix` and :data:`sys." -"exec_prefix` instead." +"The :c:func:`Py_InitializeFromConfig` API should be used " +"with :c:type:`PyConfig` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:66 +msgid "Global configuration variables:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:68 +msgid "" +":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` " +"or :c:func:`PyConfig_Get(\"parser_debug\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:71 +msgid "" +":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` " +"or :c:func:`PyConfig_Get(\"verbose\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:74 +msgid "" +":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` " +"or :c:func:`PyConfig_Get(\"quiet\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:77 +msgid "" +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` " +"or :c:func:`PyConfig_Get(\"interactive\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:80 +msgid "" +":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` " +"or :c:func:`PyConfig_Get(\"inspect\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:83 +msgid "" +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " +"or :c:func:`PyConfig_Get(\"optimization_level\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:86 +msgid "" +":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` " +"or :c:func:`PyConfig_Get(\"site_import\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:89 +msgid "" +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` " +"or :c:func:`PyConfig_Get(\"bytes_warning\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:92 +msgid "" +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` " +"or :c:func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:95 +msgid "" +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " +"or :c:func:`PyConfig_Get(\"use_environment\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:98 +msgid "" +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " +"or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:101 +msgid "" +":c:var:`Py_NoUserSiteDirectory`: " +"Use :c:member:`PyConfig.user_site_directory` " +"or :c:func:`PyConfig_Get(\"user_site_directory\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:104 +msgid "" +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " +"or :c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:107 +msgid "" +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " +"and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " +"` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:19 +#: deprecations/c-api-pending-removal-in-3.15.rst:111 msgid "" -":c:func:`Py_GetPrefix`: Get :data:`sys.base_prefix` and :data:`sys.prefix` " +":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` " +"or :c:func:`PyConfig_Get(\"isolated\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:114 +msgid "" +":c:var:`Py_LegacyWindowsFSEncodingFlag`: " +"Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` " +"or :c:func:`PyConfig_Get(\"legacy_windows_fs_encoding\") ` " "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:21 -msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:117 +msgid "" +":c:var:`Py_LegacyWindowsStdioFlag`: " +"Use :c:member:`PyConfig.legacy_windows_stdio` " +"or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:23 -msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:120 +msgid "" +":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" +"Py_HasFileSystemDefaultEncoding`: " +"Use :c:member:`PyConfig.filesystem_encoding` " +"or :c:func:`PyConfig_Get(\"filesystem_encoding\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:25 +#: deprecations/c-api-pending-removal-in-3.15.rst:123 +msgid "" +":c:var:`!Py_FileSystemDefaultEncodeErrors`: " +"Use :c:member:`PyConfig.filesystem_errors` " +"or :c:func:`PyConfig_Get(\"filesystem_errors\") ` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:126 +msgid "" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` " +"or :c:func:`PyConfig_Get(\"utf8_mode\") ` instead. " +"(see :c:func:`Py_PreInitialize`)" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:131 msgid "" -":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" -"`PYTHONHOME` environment variable instead." +"The :c:func:`Py_InitializeFromConfig` API should be used " +"with :c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can " +"be used to get these options at runtime." msgstr "" diff --git a/deprecations/c-api-pending-removal-in-3.16.po b/deprecations/c-api-pending-removal-in-3.16.po new file mode 100644 index 000000000..53696af71 --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.16.po @@ -0,0 +1,24 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/c-api-pending-removal-in-3.16.rst:2 +msgid "Pending removal in Python 3.16" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.16.rst:4 +msgid "The bundled copy of ``libmpdec``." +msgstr "" diff --git a/deprecations/c-api-pending-removal-in-3.18.po b/deprecations/c-api-pending-removal-in-3.18.po new file mode 100644 index 000000000..f6841d447 --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.18.po @@ -0,0 +1,143 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/c-api-pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:4 +msgid "" +"The following private functions are deprecated and planned for removal in " +"Python 3.18:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:7 +msgid ":c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:8 +msgid "" +":c:func:`!_PyDict_GetItemStringWithError`: " +"use :c:func:`PyDict_GetItemStringRef`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:9 +msgid ":c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:10 +msgid ":c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:11 +msgid "" +":c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`: " +"use :c:func:`PyLongWriter_Create`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:13 +msgid "" +":c:func:`!_PyThreadState_UncheckedGet`: " +"use :c:func:`PyThreadState_GetUnchecked`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:14 +msgid ":c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:15 +msgid "" +":c:func:`!_PyUnicodeWriter_Init`: replace ``_PyUnicodeWriter_Init(&writer)`` " +"with :c:func:`writer = PyUnicodeWriter_Create(0) `." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:18 +msgid "" +":c:func:`!_PyUnicodeWriter_Finish`: replace " +"``_PyUnicodeWriter_Finish(&writer)`` " +"with :c:func:`PyUnicodeWriter_Finish(writer) `." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:21 +msgid "" +":c:func:`!_PyUnicodeWriter_Dealloc`: replace " +"``_PyUnicodeWriter_Dealloc(&writer)`` " +"with :c:func:`PyUnicodeWriter_Discard(writer) `." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:24 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteChar`: replace " +"``_PyUnicodeWriter_WriteChar(&writer, ch)`` " +"with :c:func:`PyUnicodeWriter_WriteChar(writer, ch) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:27 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteStr`: replace " +"``_PyUnicodeWriter_WriteStr(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteStr(writer, str) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:30 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteSubstring`: replace " +"``_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)`` " +"with :c:func:`PyUnicodeWriter_WriteSubstring(writer, str, start, end) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:33 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteASCIIString`: replace " +"``_PyUnicodeWriter_WriteASCIIString(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteASCII(writer, str) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:36 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteLatin1String`: replace " +"``_PyUnicodeWriter_WriteLatin1String(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteUTF8(writer, str) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:39 +msgid ":c:func:`!_PyUnicodeWriter_Prepare`: (no replacement)." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:40 +msgid ":c:func:`!_PyUnicodeWriter_PrepareKind`: (no replacement)." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:41 +msgid ":c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:42 +msgid ":c:func:`!_Py_fopen_obj`: use :c:func:`Py_fopen`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:44 +msgid "" +"The `pythoncapi-compat project `__ can be used to get these new public functions on Python 3.13 and older. " +"(Contributed by Victor Stinner in :gh:`128863`.)" +msgstr "" diff --git a/deprecations/c-api-pending-removal-in-3.19.po b/deprecations/c-api-pending-removal-in-3.19.po new file mode 100644 index 000000000..ce400b74a --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.19.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/c-api-pending-removal-in-3.19.rst:2 +msgid "Pending removal in Python 3.19" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.19.rst:4 +msgid ":pep:`456` embedders support for the string hashing scheme definition." +msgstr "" diff --git a/deprecations/c-api-pending-removal-in-3.20.po b/deprecations/c-api-pending-removal-in-3.20.po new file mode 100644 index 000000000..516a17404 --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.20.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/c-api-pending-removal-in-3.20.rst:2 +msgid "Pending removal in Python 3.20" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:4 +msgid "" +":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` " +"and :c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be " +"removed in 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and " +"cache the result in the module state, then " +"call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. " +"(Contributed by Victor Stinner in :gh:`141049`.)" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:11 +msgid "" +"The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`). " +"Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to " +"convert a Python complex number to/from the C :c:type:`Py_complex` " +"representation." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:16 +msgid "Macros :c:macro:`!Py_MATH_PIl` and :c:macro:`!Py_MATH_El`." +msgstr "" diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index b0fafb30b..961b5a740 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,124 +15,100 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:2 -msgid "Pending Removal in Future Versions" +#: deprecations/c-api-pending-removal-in-future.rst:2 +msgid "Pending removal in future versions" msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:4 +#: deprecations/c-api-pending-removal-in-future.rst:4 msgid "" "The following APIs are deprecated and will be removed, although there is " "currently no date scheduled for their removal." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:7 +#: deprecations/c-api-pending-removal-in-future.rst:7 msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:9 +#: deprecations/c-api-pending-removal-in-future.rst:9 msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:11 +#: deprecations/c-api-pending-removal-in-future.rst:11 msgid "" ":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " "instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:13 +#: deprecations/c-api-pending-removal-in-future.rst:13 msgid "" ":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:15 +#: deprecations/c-api-pending-removal-in-future.rst:15 msgid "" ":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " "instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:17 +#: deprecations/c-api-pending-removal-in-future.rst:17 msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:19 +#: deprecations/c-api-pending-removal-in-future.rst:19 msgid "" -":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" -"`PySlice_AdjustIndices` instead." +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` " +"and :c:func:`PySlice_AdjustIndices` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:21 -msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:23 -msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:25 -msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:27 -msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:29 +#: deprecations/c-api-pending-removal-in-future.rst:21 msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:31 +#: deprecations/c-api-pending-removal-in-future.rst:23 msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:33 +#: deprecations/c-api-pending-removal-in-future.rst:25 msgid "" ":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " "instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:35 +#: deprecations/c-api-pending-removal-in-future.rst:27 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:37 -msgid ":c:member:`!PyDictObject.ma_version_tag` member." -msgstr "" - -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:38 +#: deprecations/c-api-pending-removal-in-future.rst:29 msgid "Thread Local Storage (TLS) API:" msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:40 +#: deprecations/c-api-pending-removal-in-future.rst:31 msgid "" ":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:42 +#: deprecations/c-api-pending-removal-in-future.rst:33 msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:44 +#: deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:46 +#: deprecations/c-api-pending-removal-in-future.rst:37 msgid "" ":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:48 +#: deprecations/c-api-pending-removal-in-future.rst:39 msgid "" ":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" -#: ../Doc/deprecations/c-api-pending-removal-in-future.rst:50 +#: deprecations/c-api-pending-removal-in-future.rst:41 msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" diff --git a/deprecations/index.po b/deprecations/index.po index 723001c3c..b5fcf6de0 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -19,424 +17,710 @@ msgstr "" #: deprecations/index.rst:2 msgid "Deprecations" -msgstr "" +msgstr "Obsolescence" -#: deprecations/c-api-pending-removal-in-3.14.rst:2 -#: deprecations/pending-removal-in-3.14.rst:2 -msgid "Pending Removal in Python 3.14" +#: deprecations/c-api-pending-removal-in-3.15.rst:2 +#: deprecations/pending-removal-in-3.15.rst:2 +msgid "Pending removal in Python 3.15" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:4 #: deprecations/pending-removal-in-3.15.rst:4 +#: deprecations/pending-removal-in-3.16.rst:4 msgid "The import system:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:6 +#: deprecations/pending-removal-in-3.15.rst:6 msgid "" -"Setting :attr:`~module.__loader__` on a module while failing to set :attr:" -"`__spec__.loader ` is deprecated. In " -"Python 3.14, :attr:`!__loader__` will cease to be set or taken into " -"consideration by the import system or the standard library." +"Setting ``__cached__`` on a module while failing to " +"set :attr:`__spec__.cached ` is " +"deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into " +"consideration by the import system or standard library. (:gh:`97879`)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:11 +#: deprecations/pending-removal-in-3.15.rst:11 msgid "" -":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" -"argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " -"(Contributed by Nikita Sobolev in :gh:`92248`.)" +"Setting :attr:`~module.__package__` on a module while failing to " +"set :attr:`__spec__.parent ` is " +"deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or " +"take into consideration by the import system or standard library. " +"(:gh:`97879`)" +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:16 +#: deprecations/pending-removal-in-3.19.rst:4 +msgid ":mod:`ctypes`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:16 +#: deprecations/pending-removal-in-3.15.rst:18 msgid "" -":mod:`ast`: The following features have been deprecated in documentation " -"since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at " -"runtime when they are accessed or used, and will be removed in Python 3.14:" +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:21 +msgid ":mod:`http.server`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:20 -msgid ":class:`!ast.Num`" +#: deprecations/pending-removal-in-3.15.rst:23 +msgid "" +"The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been " +"deprecated since Python 3.13. No direct replacement exists. *Anything* is " +"better than CGI to interface a web server with a request handler." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:21 -msgid ":class:`!ast.Str`" +#: deprecations/pending-removal-in-3.15.rst:29 +msgid "" +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:22 -msgid ":class:`!ast.Bytes`" +#: deprecations/pending-removal-in-3.15.rst:32 +#: deprecations/pending-removal-in-future.rst:62 +msgid ":mod:`importlib`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:23 -msgid ":class:`!ast.NameConstant`" +#: deprecations/pending-removal-in-3.15.rst:34 +msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:24 -msgid ":class:`!ast.Ellipsis`" +#: deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`pathlib`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:26 +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" -"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" -"`90953`.)" +":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. " +"Use :func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:29 -msgid ":mod:`asyncio`:" +#: deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`platform`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:31 +#: deprecations/pending-removal-in-3.15.rst:44 msgid "" -"The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, :class:" -"`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` and :" -"class:`~asyncio.SafeChildWatcher` are deprecated and will be removed in " -"Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" +":func:`!platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:48 +#: deprecations/pending-removal-in-3.16.rst:96 +msgid ":mod:`sysconfig`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:37 +#: deprecations/pending-removal-in-3.15.rst:50 msgid "" -":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:" -"`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio." -"AbstractEventLoopPolicy.get_child_watcher` are deprecated and will be " -"removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" +"The *check_home* argument of :func:`sysconfig.is_python_build` has been " +"deprecated since Python 3.12." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:53 +msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:43 +#: deprecations/pending-removal-in-3.15.rst:55 msgid "" -"The :meth:`~asyncio.get_event_loop` method of the default event loop policy " -"now emits a :exc:`DeprecationWarning` if there is no current event loop set " -"and it decides to create one. (Contributed by Serhiy Storchaka and Guido van " -"Rossum in :gh:`100160`.)" +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:61 +msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:48 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" -":mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`. " -"Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`. For use in " -"typing, prefer a union, like ``bytes | bytearray``, or :class:`collections." -"abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" +":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was " +"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " +"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " +"in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:70 +#: deprecations/pending-removal-in-3.17.rst:45 +msgid ":mod:`typing`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:54 +#: deprecations/pending-removal-in-3.15.rst:72 msgid "" -":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils." -"localtime`. (Contributed by Alan Williams in :gh:`72346`.)" +"The undocumented keyword argument syntax for " +"creating :class:`~typing.NamedTuple` classes (for example, ``Point = " +"NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python " +"3.13. Use the class-based syntax or the functional syntax instead." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:57 -msgid ":mod:`importlib.abc` deprecated classes:" +#: deprecations/pending-removal-in-3.15.rst:78 +msgid "" +"When using the functional syntax of :class:`~typing.TypedDict`\\s, failing " +"to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or " +"passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated " +"since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = " +"TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:59 -msgid ":class:`!importlib.abc.ResourceReader`" +#: deprecations/pending-removal-in-3.15.rst:85 +msgid "" +"The :func:`!typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:60 -msgid ":class:`!importlib.abc.Traversable`" +#: deprecations/pending-removal-in-3.15.rst:90 +msgid "" +":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:61 -msgid ":class:`!importlib.abc.TraversableResources`" +#: deprecations/pending-removal-in-3.15.rst:92 +msgid ":mod:`wave`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:63 -msgid "Use :mod:`importlib.resources.abc` classes instead:" +#: deprecations/pending-removal-in-3.15.rst:94 +msgid "" +"The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of " +"the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been " +"deprecated since Python 3.13." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:65 -msgid ":class:`importlib.resources.abc.Traversable`" +#: deprecations/pending-removal-in-3.15.rst:98 +msgid ":mod:`zipimport`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:66 -msgid ":class:`importlib.resources.abc.TraversableResources`" +#: deprecations/pending-removal-in-3.15.rst:100 +msgid "" +":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python " +"3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:68 -msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" +#: deprecations/c-api-pending-removal-in-3.16.rst:2 +#: deprecations/pending-removal-in-3.16.rst:2 +msgid "Pending removal in Python 3.16" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:70 +#: deprecations/pending-removal-in-3.16.rst:6 msgid "" -":mod:`itertools` had undocumented, inefficient, historically buggy, and " -"inconsistent support for copy, deepcopy, and pickle operations. This will be " -"removed in 3.14 for a significant reduction in code volume and maintenance " -"burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" +"Setting :attr:`~module.__loader__` on a module while failing to " +"set :attr:`__spec__.loader ` is " +"deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or " +"taken into consideration by the import system or the standard library." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:11 +msgid ":mod:`array`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:76 +#: deprecations/pending-removal-in-3.16.rst:13 msgid "" -":mod:`multiprocessing`: The default start method will change to a safer one " -"on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is " -"currently the default (:gh:`84559`). Adding a runtime warning about this was " -"deemed too disruptive as the majority of code is not expected to care. Use " -"the :func:`~multiprocessing.get_context` or :func:`~multiprocessing." -"set_start_method` APIs to explicitly specify when your code *requires* " -"``'fork'``. See :ref:`multiprocessing-start-methods`." +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:84 +#: deprecations/pending-removal-in-3.16.rst:19 +msgid ":mod:`asyncio`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:21 msgid "" -":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and :meth:`~pathlib." -"PurePath.relative_to`: passing additional arguments is deprecated." +":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in " +"Python 3.16; use :func:`inspect.iscoroutinefunction` instead. (Contributed " +"by Jiahao Li and Kumar Aditya in :gh:`122875`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:88 +#: deprecations/pending-removal-in-3.16.rst:26 msgid "" -":mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader` " -"now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` " -"instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" +":mod:`asyncio` policy system is deprecated and will be removed in Python " +"3.16. In particular, the following classes and functions are deprecated:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:93 -msgid ":mod:`pty`:" +#: deprecations/pending-removal-in-3.16.rst:29 +msgid ":class:`asyncio.AbstractEventLoopPolicy`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:95 -msgid "``master_open()``: use :func:`pty.openpty`." +#: deprecations/pending-removal-in-3.16.rst:30 +msgid ":class:`asyncio.DefaultEventLoopPolicy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:31 +msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:96 -msgid "``slave_open()``: use :func:`pty.openpty`." +#: deprecations/pending-removal-in-3.16.rst:32 +msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:98 -msgid ":mod:`sqlite3`:" +#: deprecations/pending-removal-in-3.16.rst:33 +msgid ":func:`asyncio.get_event_loop_policy`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:100 -msgid ":data:`~sqlite3.version` and :data:`~sqlite3.version_info`." +#: deprecations/pending-removal-in-3.16.rst:34 +msgid ":func:`asyncio.set_event_loop_policy`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:102 +#: deprecations/pending-removal-in-3.16.rst:36 msgid "" -":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` if :" -"ref:`named placeholders ` are used and *parameters* is " -"a sequence instead of a :class:`dict`." +"Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with " +"*loop_factory* to use the desired event loop implementation." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:106 +#: deprecations/pending-removal-in-3.16.rst:39 +msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows::" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:48 +msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:50 +#: deprecations/pending-removal-in-future.rst:16 +msgid ":mod:`builtins`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:52 msgid "" -"date and datetime adapter, date and timestamp converter: see the :mod:" -"`sqlite3` documentation for suggested replacement recipes." +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:59 +msgid ":mod:`functools`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:109 +#: deprecations/pending-removal-in-3.16.rst:61 msgid "" -":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " -"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " -"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " -"in 3.14. (Contributed by Nikita Sobolev in :gh:`101866`.)" +"Calling the Python implementation of :func:`functools.reduce` with " +"*function* or *sequence* as keyword arguments has been deprecated since " +"Python 3.14." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:64 +msgid ":mod:`logging`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:116 +#: deprecations/pending-removal-in-3.16.rst:66 msgid "" -":mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, now " -"causes a :exc:`DeprecationWarning` to be emitted when it is used." +"Support for custom logging handlers with the *strm* argument is deprecated " +"and scheduled for removal in Python 3.16. Define handlers with the *stream* " +"argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:70 +msgid ":mod:`mimetypes`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:119 +#: deprecations/pending-removal-in-3.16.rst:72 msgid "" -":mod:`urllib`: :class:`!urllib.parse.Quoter` is deprecated: it was not " -"intended to be a public API. (Contributed by Gregory P. Smith in :gh:" -"`88168`.)" +"Valid extensions start with a '.' or are empty " +"for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated " +"and will raise a :exc:`ValueError` in Python 3.16. (Contributed by Hugo van " +"Kemenade in :gh:`75223`.)" msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:2 -#: deprecations/pending-removal-in-3.15.rst:2 -msgid "Pending Removal in Python 3.15" +#: deprecations/pending-removal-in-3.16.rst:78 +msgid ":mod:`shutil`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:6 +#: deprecations/pending-removal-in-3.16.rst:80 msgid "" -"Setting :attr:`~module.__cached__` on a module while failing to set :attr:" -"`__spec__.cached ` is deprecated. In " -"Python 3.15, :attr:`!__cached__` will cease to be set or take into " -"consideration by the import system or standard library. (:gh:`97879`)" +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:11 +#: deprecations/pending-removal-in-3.16.rst:85 +msgid ":mod:`symtable`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:87 msgid "" -"Setting :attr:`~module.__package__` on a module while failing to set :attr:" -"`__spec__.parent ` is deprecated. In " -"Python 3.15, :attr:`!__package__` will cease to be set or take into " -"consideration by the import system or standard library. (:gh:`97879`)" +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:16 -msgid ":mod:`ctypes`:" +#: deprecations/pending-removal-in-3.16.rst:90 +msgid ":mod:`sys`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:18 +#: deprecations/pending-removal-in-3.16.rst:92 msgid "" -"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " -"since Python 3.13." +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:21 -msgid ":mod:`http.server`:" +#: deprecations/pending-removal-in-3.16.rst:98 +msgid "" +"The :func:`!sysconfig.expand_makefile_vars` function has been deprecated " +"since Python 3.14. Use the ``vars`` argument of :func:`sysconfig.get_paths` " +"instead." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:23 +#: deprecations/pending-removal-in-3.16.rst:102 +msgid ":mod:`tarfile`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:104 msgid "" -"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " -"been deprecated since Python 3.13. No direct replacement exists. *Anything* " -"is better than CGI to interface a web server with a request handler." +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:29 +#: deprecations/pending-removal-in-3.17.rst:2 +msgid "Pending removal in Python 3.17" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:4 +#: deprecations/pending-removal-in-future.rst:53 +msgid ":mod:`datetime`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:6 msgid "" -"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" -"line interface has been deprecated since Python 3.13." +":meth:`~datetime.datetime.strptime` calls using a format string containing " +"``%e`` (day of month) without a year. This has been deprecated since Python " +"3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:32 -msgid ":class:`locale`:" +#: deprecations/pending-removal-in-3.17.rst:12 +msgid ":mod:`collections.abc`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:34 +#: deprecations/pending-removal-in-3.17.rst:14 msgid "" -"The :func:`~locale.getdefaultlocale` function has been deprecated since " -"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" -"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." -"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " -"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" +":class:`collections.abc.ByteString` is scheduled for removal in Python 3.17." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:42 -msgid ":mod:`pathlib`:" +#: deprecations/pending-removal-in-3.17.rst:16 +#: deprecations/pending-removal-in-3.17.rst:55 +msgid "" +"Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " +"implements the :ref:`buffer protocol ` at runtime. For use in " +"type annotations, either use :class:`~collections.abc.Buffer` or a union " +"that explicitly specifies the types your code supports (e.g., ``bytes | " +"bytearray | memoryview``)." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:44 +#: deprecations/pending-removal-in-3.17.rst:22 +#: deprecations/pending-removal-in-3.17.rst:61 msgid "" -":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" -"func:`os.path.isreserved` to detect reserved paths on Windows." +":class:`!ByteString` was originally intended to be an abstract class that " +"would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " +"However, since the ABC never had any methods, knowing that an object was an " +"instance of :class:`!ByteString` never actually told you anything useful " +"about the object. Other common buffer types such as :class:`memoryview` were " +"also never understood as subtypes of :class:`!ByteString` (either at runtime " +"or by static type checkers)." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:48 -msgid ":mod:`platform`:" +#: deprecations/pending-removal-in-3.17.rst:30 +#: deprecations/pending-removal-in-3.17.rst:69 +msgid "" +"See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by " +"Shantanu Jain in :gh:`91896`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:50 +#: deprecations/pending-removal-in-3.17.rst:34 +msgid ":mod:`encodings`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:36 msgid "" -":func:`~platform.java_ver` has been deprecated since Python 3.13. This " -"function is only useful for Jython support, has a confusing API, and is " -"largely untested." +"Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` " +"is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan " +"Ulbrych in :gh:`136702`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 -msgid ":mod:`threading`:" +#: deprecations/pending-removal-in-3.17.rst:40 +msgid ":mod:`webbrowser`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:56 +#: deprecations/pending-removal-in-3.17.rst:42 msgid "" -":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " -"arguments has been deprecated since Python 3.14, as the Python version does " -"not permit any arguments, but the C version allows any number of positional " -"or keyword arguments, ignoring every argument." +":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" +"webbrowser.MacOS`. (:gh:`137586`)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:62 -msgid ":mod:`typing`:" +#: deprecations/pending-removal-in-3.17.rst:47 +msgid "" +"Before Python 3.14, old-style unions were implemented using the private " +"class ``typing._UnionGenericAlias``. This class is no longer needed for the " +"implementation, but it has been retained for backward compatibility, with " +"removal scheduled for Python 3.17. Users should use documented introspection " +"helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead " +"of relying on private implementation details." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:64 +#: deprecations/pending-removal-in-3.17.rst:52 msgid "" -"The undocumented keyword argument syntax for creating :class:`~typing." -"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " -"has been deprecated since Python 3.13. Use the class-based syntax or the " -"functional syntax instead." +":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " +"removal in Python 3.17." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:70 +#: deprecations/c-api-pending-removal-in-3.18.rst:2 +#: deprecations/pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:4 msgid "" -"The :func:`typing.no_type_check_decorator` decorator function has been " -"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " -"it has yet to be supported by any major type checker." +"No longer accept a boolean value when a file descriptor is expected. " +"(Contributed by Serhiy Storchaka in :gh:`82626`.)" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:75 -msgid ":mod:`wave`:" +#: deprecations/pending-removal-in-3.18.rst:7 +msgid ":mod:`decimal`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:77 +#: deprecations/pending-removal-in-3.18.rst:9 msgid "" -"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." -"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" -"`~wave.Wave_write` classes have been deprecated since Python 3.13." +"The non-standard and undocumented :class:`~decimal.Decimal` format specifier " +"``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation, has been deprecated since Python 3.13. (Contributed by " +"Serhiy Storchaka in :gh:`89902`.)" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:2 -msgid "Pending Removal in Python 3.16" +#: deprecations/pending-removal-in-3.18.rst:14 +#: deprecations/pending-removal-in-3.20.rst:42 +msgid "Deprecations defined by :pep:`829`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:4 -#: deprecations/pending-removal-in-future.rst:12 -msgid ":mod:`builtins`:" +#: deprecations/pending-removal-in-3.18.rst:16 +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:6 +#: deprecations/pending-removal-in-3.18.rst:18 +#: deprecations/pending-removal-in-3.20.rst:50 +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.19.rst:2 +#: deprecations/pending-removal-in-3.19.rst:2 +msgid "Pending removal in Python 3.19" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:6 msgid "" -"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " -"deprecated since Python 3.12, as it produces surprising and unintuitive " -"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " -"of a Boolean. In the rare case that you need the bitwise inversion of the " -"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +"Implicitly switching to the MSVC-compatible struct layout by " +"setting :attr:`~ctypes.Structure._pack_` but " +"not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:13 -msgid ":mod:`array`:" +#: deprecations/pending-removal-in-3.19.rst:10 +msgid ":mod:`hashlib`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:15 +#: deprecations/pending-removal-in-3.19.rst:12 msgid "" -"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " -"documentation since Python 3.3 and at runtime since Python 3.13. Use the " -"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +"In hash function constructors such as :func:`~hashlib.new` or the direct " +"hash-named constructors such as :func:`~hashlib.md5` " +"and :func:`~hashlib.sha256`, their optional initial data parameter could " +"also be passed a keyword argument named ``data=`` or ``string=`` in " +"various :mod:`!hashlib` implementations." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:21 -msgid ":mod:`shutil`:" +#: deprecations/pending-removal-in-3.19.rst:18 +msgid "" +"Support for the ``string`` keyword argument name is now deprecated and " +"slated for removal in Python 3.19." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:23 +#: deprecations/pending-removal-in-3.19.rst:21 msgid "" -"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " -"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " -"now an alias of :exc:`RuntimeError`." +"Before Python 3.13, the ``string`` keyword parameter was not correctly " +"supported depending on the backend implementation of hash functions. Prefer " +"passing the initial data as a positional argument for maximum backwards " +"compatibility." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:28 -msgid ":mod:`symtable`:" +#: deprecations/pending-removal-in-3.19.rst:26 +msgid ":mod:`http.cookies`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:30 +#: deprecations/pending-removal-in-3.19.rst:28 msgid "" -"The :meth:`Class.get_methods ` method has been " -"deprecated since Python 3.14." +":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in " +"Python 3.19." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:33 -msgid ":mod:`sys`:" +#: deprecations/pending-removal-in-3.19.rst:31 +msgid "" +":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed " +"in Python 3.19." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:34 +msgid ":mod:`imaplib`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:35 +#: deprecations/pending-removal-in-3.19.rst:36 msgid "" -"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " -"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " -"environment variable instead." +"Altering :attr:`IMAP4.file ` is now deprecated and " +"slated for removal in Python 3.19. This property is now unused and changing " +"its value does not automatically close the current file." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:39 -msgid ":mod:`tarfile`:" +#: deprecations/pending-removal-in-3.19.rst:40 +msgid "" +"Before Python 3.14, this property was used to implement the corresponding " +"``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this " +"is no longer the case since then." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:2 +#: deprecations/pending-removal-in-3.20.rst:2 +msgid "Pending removal in Python 3.20" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:41 +#: deprecations/pending-removal-in-3.20.rst:4 msgid "" -"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " -"deprecated since Python 3.13." +"Calling the ``__new__()`` method of :class:`struct.Struct` without the " +"*format* argument is deprecated and will be removed in Python 3.20. " +"Calling :meth:`~object.__init__` method on " +"initialized :class:`~struct.Struct` objects is deprecated and will be " +"removed in Python 3.20." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:9 +msgid "" +"(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:11 +msgid "" +"The ``__version__``, ``version`` and ``VERSION`` attributes have been " +"deprecated in these standard library modules and will be removed in Python " +"3.20. Use :py:data:`sys.version_info` instead." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:15 +msgid ":mod:`argparse`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:16 +msgid ":mod:`csv`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:17 +msgid ":mod:`ctypes`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:18 +msgid ":mod:`!ctypes.macholib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:19 +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:20 +msgid ":mod:`http.server`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:21 +msgid ":mod:`imaplib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:22 +msgid ":mod:`ipaddress`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:23 +msgid ":mod:`json`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:24 +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:25 +msgid ":mod:`optparse`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:26 +msgid ":mod:`pickle`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:27 +msgid ":mod:`platform`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:28 +msgid ":mod:`re`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:29 +msgid ":mod:`socketserver`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:30 +msgid ":mod:`tabnanny`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:31 +msgid ":mod:`tarfile`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:32 +msgid ":mod:`tkinter.font`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:33 +msgid ":mod:`tkinter.ttk`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:34 +msgid ":mod:`wsgiref.simple_server`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:35 +msgid ":mod:`xml.etree.ElementTree`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:36 +msgid ":mod:`!xml.sax.expatreader`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:37 +msgid ":mod:`xml.sax.handler`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:38 +msgid ":mod:`zlib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:40 +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:44 +msgid "" +"Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:47 +msgid "" +":file:`{name}.pth` files are no longer decoded in the locale encoding by " +"default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:52 +msgid ":mod:`ast`:" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:54 +msgid "" +"Creating instances of abstract AST nodes (such as :class:`ast.AST` " +"or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." msgstr "" #: deprecations/c-api-pending-removal-in-future.rst:2 #: deprecations/pending-removal-in-future.rst:2 -msgid "Pending Removal in Future Versions" +msgid "Pending removal in future versions" msgstr "" #: deprecations/pending-removal-in-future.rst:4 @@ -446,154 +730,161 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-future.rst:7 +msgid ":mod:`argparse`:" +msgstr "" + +#: deprecations/pending-removal-in-future.rst:9 msgid "" -":mod:`argparse`: Nesting argument groups and nesting mutually exclusive " -"groups are deprecated." +"Nesting argument groups and nesting mutually exclusive groups are deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:10 -msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" +#: deprecations/pending-removal-in-future.rst:11 +msgid "" +"Passing the undocumented keyword argument *prefix_chars* " +"to :meth:`~argparse.ArgumentParser.add_argument_group` is now deprecated." msgstr "" #: deprecations/pending-removal-in-future.rst:14 -msgid "``bool(NotImplemented)``." +msgid "The :class:`argparse.FileType` type converter is deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:15 +#: deprecations/pending-removal-in-future.rst:18 msgid "" "Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature " "is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single " "argument signature." msgstr "" -#: deprecations/pending-removal-in-future.rst:18 +#: deprecations/pending-removal-in-future.rst:21 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " "ambiguous expressions like ``[0x1for x in y]`` (which can be interpreted as " "``[0x1 for x in y]`` or ``[0x1f or x in y]``). A syntax warning is raised " -"if the numeric literal is immediately followed by one of keywords :keyword:" -"`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :" -"keyword:`is` and :keyword:`or`. In a future release it will be changed to a " -"syntax error. (:gh:`87999`)" +"if the numeric literal is immediately followed by one of " +"keywords :keyword:`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :keyword:`is` " +"and :keyword:`or`. In a future release it will be changed to a syntax " +"error. (:gh:`87999`)" msgstr "" -#: deprecations/pending-removal-in-future.rst:26 +#: deprecations/pending-removal-in-future.rst:29 msgid "" "Support for ``__index__()`` and ``__int__()`` method returning non-int type: " "these methods will be required to return an instance of a strict subclass " "of :class:`int`." msgstr "" -#: deprecations/pending-removal-in-future.rst:29 -msgid "" -"Support for ``__float__()`` method returning a strict subclass of :class:" -"`float`: these methods will be required to return an instance of :class:" -"`float`." -msgstr "" - #: deprecations/pending-removal-in-future.rst:32 msgid "" -"Support for ``__complex__()`` method returning a strict subclass of :class:" -"`complex`: these methods will be required to return an instance of :class:" -"`complex`." +"Support for ``__float__()`` method returning a strict subclass " +"of :class:`float`: these methods will be required to return an instance " +"of :class:`float`." msgstr "" #: deprecations/pending-removal-in-future.rst:35 -msgid "Delegation of ``int()`` to ``__trunc__()`` method." +msgid "" +"Support for ``__complex__()`` method returning a strict subclass " +"of :class:`complex`: these methods will be required to return an instance " +"of :class:`complex`." msgstr "" -#: deprecations/pending-removal-in-future.rst:36 +#: deprecations/pending-removal-in-future.rst:38 msgid "" -"Passing a complex number as the *real* or *imag* argument in the :func:" -"`complex` constructor is now deprecated; it should only be passed as a " -"single positional argument. (Contributed by Serhiy Storchaka in :gh:" -"`109218`.)" +"Passing a complex number as the *real* or *imag* argument in " +"the :func:`complex` constructor is now deprecated; it should only be passed " +"as a single positional argument. (Contributed by Serhiy Storchaka " +"in :gh:`109218`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:41 +#: deprecations/pending-removal-in-future.rst:43 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " -"are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." -"FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" +"are deprecated and replaced by :data:`calendar.JANUARY` " +"and :data:`calendar.FEBRUARY`. (Contributed by Prince Roshan " +"in :gh:`103636`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:46 +#: deprecations/pending-removal-in-future.rst:48 msgid "" -":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " -"instead." +":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. " +"(:gh:`133038`)" msgstr "" -#: deprecations/pending-removal-in-future.rst:49 -msgid ":mod:`datetime`:" -msgstr "" - -#: deprecations/pending-removal-in-future.rst:51 +#: deprecations/pending-removal-in-future.rst:50 msgid "" -":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime." -"UTC)``." +":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " +"instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:53 +#: deprecations/pending-removal-in-future.rst:55 msgid "" -":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime." -"fromtimestamp(timestamp, tz=datetime.UTC)``." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:56 -msgid ":mod:`gettext`: Plural value must be an integer." +":meth:`~datetime.datetime.utcnow`: use " +"``datetime.datetime.now(tz=datetime.UTC)``." msgstr "" -#: deprecations/pending-removal-in-future.rst:58 -msgid ":mod:`importlib`:" +#: deprecations/pending-removal-in-future.rst:57 +msgid "" +":meth:`~datetime.datetime.utcfromtimestamp`: use " +"``datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC)``." msgstr "" #: deprecations/pending-removal-in-future.rst:60 -msgid "``load_module()`` method: use ``exec_module()`` instead." +msgid ":mod:`gettext`: Plural value must be an integer." msgstr "" -#: deprecations/pending-removal-in-future.rst:61 +#: deprecations/pending-removal-in-future.rst:64 msgid "" ":func:`~importlib.util.cache_from_source` *debug_override* parameter is " "deprecated: use the *optimization* parameter instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:64 +#: deprecations/pending-removal-in-future.rst:67 msgid ":mod:`importlib.metadata`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:66 +#: deprecations/pending-removal-in-future.rst:69 msgid "``EntryPoints`` tuple interface." msgstr "" -#: deprecations/pending-removal-in-future.rst:67 +#: deprecations/pending-removal-in-future.rst:70 msgid "Implicit ``None`` on return values." msgstr "" -#: deprecations/pending-removal-in-future.rst:69 +#: deprecations/pending-removal-in-future.rst:72 msgid "" ":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, " "use :meth:`~logging.warning` instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:72 +#: deprecations/pending-removal-in-future.rst:75 msgid "" ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use " "BytesIO and binary mode instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:75 +#: deprecations/pending-removal-in-future.rst:78 +msgid "" +":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr "" + +#: deprecations/pending-removal-in-future.rst:80 msgid "" -":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." +":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, " +"use :func:`os.path.commonpath` for path prefixes. " +"The :func:`os.path.commonprefix` function is being deprecated due to having " +"a misleading name and module. The function is not safe to use for path " +"prefixes despite being included in a module about path manipulation, meaning " +"it is easy to accidentally introduce path traversal vulnerabilities into " +"Python programs by using this function." msgstr "" -#: deprecations/pending-removal-in-future.rst:77 +#: deprecations/pending-removal-in-future.rst:88 msgid "" ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is " "deprecated, use an exception instance." msgstr "" -#: deprecations/pending-removal-in-future.rst:80 +#: deprecations/pending-removal-in-future.rst:91 msgid "" ":mod:`re`: More strict rules are now applied for numerical group references " "and group names in regular expressions. Only sequence of ASCII digits is " @@ -602,419 +893,642 @@ msgid "" "underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:87 -msgid "" -":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:89 +#: deprecations/pending-removal-in-future.rst:98 msgid "" ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in " "Python 3.12; use the *onexc* parameter instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:92 +#: deprecations/pending-removal-in-future.rst:101 msgid ":mod:`ssl` options and protocols:" msgstr "" -#: deprecations/pending-removal-in-future.rst:94 +#: deprecations/pending-removal-in-future.rst:103 msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:95 +#: deprecations/pending-removal-in-future.rst:104 msgid "" -":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:" -"`!selected_npn_protocol` are deprecated: use ALPN instead." +":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` " +"and :meth:`!selected_npn_protocol` are deprecated: use ALPN instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:98 +#: deprecations/pending-removal-in-future.rst:107 msgid "``ssl.OP_NO_SSL*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:99 +#: deprecations/pending-removal-in-future.rst:108 msgid "``ssl.OP_NO_TLS*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:100 +#: deprecations/pending-removal-in-future.rst:109 msgid "``ssl.PROTOCOL_SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:101 +#: deprecations/pending-removal-in-future.rst:110 msgid "``ssl.PROTOCOL_TLS``" msgstr "" -#: deprecations/pending-removal-in-future.rst:102 +#: deprecations/pending-removal-in-future.rst:111 msgid "``ssl.PROTOCOL_TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:103 +#: deprecations/pending-removal-in-future.rst:112 msgid "``ssl.PROTOCOL_TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:104 +#: deprecations/pending-removal-in-future.rst:113 msgid "``ssl.PROTOCOL_TLSv1_2``" msgstr "" -#: deprecations/pending-removal-in-future.rst:105 +#: deprecations/pending-removal-in-future.rst:114 msgid "``ssl.TLSVersion.SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:106 +#: deprecations/pending-removal-in-future.rst:115 msgid "``ssl.TLSVersion.TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:107 +#: deprecations/pending-removal-in-future.rst:116 msgid "``ssl.TLSVersion.TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:109 -msgid "" -":func:`sysconfig.is_python_build` *check_home* parameter is deprecated and " -"ignored." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:112 +#: deprecations/pending-removal-in-future.rst:118 msgid ":mod:`threading` methods:" msgstr "" -#: deprecations/pending-removal-in-future.rst:114 +#: deprecations/pending-removal-in-future.rst:120 msgid "" -":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition." -"notify_all`." +":meth:`!threading.Condition.notifyAll`: " +"use :meth:`~threading.Condition.notify_all`." msgstr "" -#: deprecations/pending-removal-in-future.rst:115 +#: deprecations/pending-removal-in-future.rst:121 msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`." msgstr "" -#: deprecations/pending-removal-in-future.rst:116 +#: deprecations/pending-removal-in-future.rst:122 msgid "" -":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :" -"attr:`threading.Thread.daemon` attribute." +":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: " +"use :attr:`threading.Thread.daemon` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:118 +#: deprecations/pending-removal-in-future.rst:124 msgid "" -":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :" -"attr:`threading.Thread.name` attribute." +":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: " +"use :attr:`threading.Thread.name` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:120 +#: deprecations/pending-removal-in-future.rst:126 msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." msgstr "" -#: deprecations/pending-removal-in-future.rst:121 +#: deprecations/pending-removal-in-future.rst:127 msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." msgstr "" -#: deprecations/pending-removal-in-future.rst:123 +#: deprecations/pending-removal-in-future.rst:129 msgid ":class:`typing.Text` (:gh:`92332`)." msgstr "" -#: deprecations/pending-removal-in-future.rst:125 +#: deprecations/pending-removal-in-future.rst:131 +msgid "" +"The internal class ``typing._UnionGenericAlias`` is no longer used to " +"implement :class:`typing.Union`. To preserve compatibility with users using " +"this private class, a compatibility shim will be provided until at least " +"Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "" + +#: deprecations/pending-removal-in-future.rst:136 msgid "" ":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a " "value that is not ``None`` from a test case." msgstr "" -#: deprecations/pending-removal-in-future.rst:128 +#: deprecations/pending-removal-in-future.rst:139 msgid "" ":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` " "instead" msgstr "" -#: deprecations/pending-removal-in-future.rst:130 +#: deprecations/pending-removal-in-future.rst:141 msgid "``splitattr()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:131 +#: deprecations/pending-removal-in-future.rst:142 msgid "``splithost()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:132 +#: deprecations/pending-removal-in-future.rst:143 msgid "``splitnport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:133 +#: deprecations/pending-removal-in-future.rst:144 msgid "``splitpasswd()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:134 +#: deprecations/pending-removal-in-future.rst:145 msgid "``splitport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:135 +#: deprecations/pending-removal-in-future.rst:146 msgid "``splitquery()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:136 +#: deprecations/pending-removal-in-future.rst:147 msgid "``splittag()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:137 +#: deprecations/pending-removal-in-future.rst:148 msgid "``splittype()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:138 +#: deprecations/pending-removal-in-future.rst:149 msgid "``splituser()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:139 +#: deprecations/pending-removal-in-future.rst:150 msgid "``splitvalue()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:140 +#: deprecations/pending-removal-in-future.rst:151 msgid "``to_bytes()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:142 +#: deprecations/pending-removal-in-future.rst:153 msgid "" -":mod:`urllib.request`: :class:`~urllib.request.URLopener` and :class:" -"`~urllib.request.FancyURLopener` style of invoking requests is deprecated. " -"Use newer :func:`~urllib.request.urlopen` functions and methods." +":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial " +"writes." msgstr "" -#: deprecations/pending-removal-in-future.rst:146 +#: deprecations/pending-removal-in-future.rst:156 msgid "" -":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial " -"writes." +":mod:`xml.etree.ElementTree`: Testing the truth value of " +"an :class:`~xml.etree.ElementTree.Element` is deprecated. In a future " +"release it will always return ``True``. Prefer explicit ``len(elem)`` or " +"``elem is not None`` tests instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:149 +#: deprecations/pending-removal-in-future.rst:161 msgid "" -":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml." -"etree.ElementTree.Element` is deprecated. In a future release it will always " -"return ``True``. Prefer explicit ``len(elem)`` or ``elem is not None`` tests " -"instead." +":func:`sys._clear_type_cache` is deprecated: " +"use :func:`sys._clear_internal_caches` instead." +msgstr "" + +#: deprecations/soft-deprecations.rst:2 +#, fuzzy +msgid "Soft deprecations" +msgstr "Obsolescence" + +#: deprecations/soft-deprecations.rst:4 +msgid "There are no plans to remove :term:`soft deprecated` APIs." +msgstr "" + +#: deprecations/soft-deprecations.rst:6 +msgid "" +":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft " +"deprecated` in favor of the new :func:`re.prefixmatch` " +"and :meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate, " +"more explicit names. These are intended to be used to alleviate confusion " +"around what *match* means by following the Zen of Python's *\"Explicit is " +"better than implicit\"* mantra. Most other language regular expression " +"libraries use an API named *match* to mean what Python has always called " +"*search*." +msgstr "" + +#: deprecations/soft-deprecations.rst:15 +msgid "" +"We **do not** plan to remove the older :func:`!match` name, as it has been " +"used in code for over 30 years. Code supporting older versions of Python " +"should continue to use :func:`!match`, while new code should prefer :func:`!" +"prefixmatch`. See :ref:`prefixmatch-vs-match`." +msgstr "" + +#: deprecations/soft-deprecations.rst:20 +msgid "" +"(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade " +"in :gh:`148100`.)" +msgstr "" + +#: deprecations/index.rst:21 +msgid "C API deprecations" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:4 +msgid "" +"The :c:func:`!PyImport_ImportModuleNoBlock`: " +"Use :c:func:`PyImport_ImportModule` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:6 +msgid "" +":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: " +"Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project " +"`__ can be used to " +"get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:10 +msgid "" +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:12 +msgid "" +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`str`, such as :class:`bytes`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid "" +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid "" +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`bytes`, such as :class:`str`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:20 +msgid "Python initialization functions, deprecated in Python 3.13:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:22 +msgid "" +":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") " +"` (:data:`sys.path`) instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:25 +msgid "" +":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " +"` (:data:`sys.base_prefix`) instead. " +"Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) " +"if :ref:`virtual environments ` need to be handled." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:30 +msgid "" +":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " +"` (:data:`sys.base_exec_prefix`) instead. " +"Use :c:func:`PyConfig_Get(\"exec_prefix\") ` " +"(:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to " +"be handled." msgstr "" -#: deprecations/pending-removal-in-future.rst:154 +#: deprecations/c-api-pending-removal-in-3.15.rst:36 msgid "" -":meth:`zipimport.zipimporter.load_module` is deprecated: use :meth:" -"`~zipimport.zipimporter.exec_module` instead." +":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/index.rst:13 -msgid "C API Deprecations" +#: deprecations/c-api-pending-removal-in-3.15.rst:39 +msgid "" +":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:4 +#: deprecations/c-api-pending-removal-in-3.15.rst:42 msgid "" -"The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " -"(:pep:`699`; :gh:`101193`)." +":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " +"` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:7 +#: deprecations/c-api-pending-removal-in-3.15.rst:46 msgid "" -"Creating :c:data:`immutable types ` with mutable " -"bases (:gh:`95388`)." +"The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:10 +#: deprecations/c-api-pending-removal-in-3.15.rst:50 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:12 +#: deprecations/c-api-pending-removal-in-3.15.rst:52 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:14 +#: deprecations/c-api-pending-removal-in-3.15.rst:54 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:16 +#: deprecations/c-api-pending-removal-in-3.15.rst:56 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:18 +#: deprecations/c-api-pending-removal-in-3.15.rst:58 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:21 -#: deprecations/c-api-pending-removal-in-3.14.rst:71 +#: deprecations/c-api-pending-removal-in-3.15.rst:60 +msgid "" +":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +"warnings.filters` instead." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.15.rst:63 msgid "" -"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" -"`PyConfig` instead." +"The :c:func:`Py_InitializeFromConfig` API should be used " +"with :c:type:`PyConfig` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:24 +#: deprecations/c-api-pending-removal-in-3.15.rst:66 msgid "Global configuration variables:" msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:26 -msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:68 +msgid "" +":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` " +"or :c:func:`PyConfig_Get(\"parser_debug\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:28 -msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:71 +msgid "" +":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` " +"or :c:func:`PyConfig_Get(\"verbose\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:30 -msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:74 +msgid "" +":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` " +"or :c:func:`PyConfig_Get(\"quiet\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:32 +#: deprecations/c-api-pending-removal-in-3.15.rst:77 msgid "" -":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` " +"or :c:func:`PyConfig_Get(\"interactive\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:34 -msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:80 +msgid "" +":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` " +"or :c:func:`PyConfig_Get(\"inspect\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:36 +#: deprecations/c-api-pending-removal-in-3.15.rst:83 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " -"instead." +"or :c:func:`PyConfig_Get(\"optimization_level\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:38 -msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:86 +msgid "" +":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` " +"or :c:func:`PyConfig_Get(\"site_import\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:40 +#: deprecations/c-api-pending-removal-in-3.15.rst:89 msgid "" -":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` " +"or :c:func:`PyConfig_Get(\"bytes_warning\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:42 +#: deprecations/c-api-pending-removal-in-3.15.rst:92 msgid "" -":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` " +"or :c:func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:44 +#: deprecations/c-api-pending-removal-in-3.15.rst:95 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " -"instead." +"or :c:func:`PyConfig_Get(\"use_environment\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:46 +#: deprecations/c-api-pending-removal-in-3.15.rst:98 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " -"instead." +"or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:48 +#: deprecations/c-api-pending-removal-in-3.15.rst:101 msgid "" -":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." -"user_site_directory` instead." +":c:var:`Py_NoUserSiteDirectory`: " +"Use :c:member:`PyConfig.user_site_directory` " +"or :c:func:`PyConfig_Get(\"user_site_directory\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:50 +#: deprecations/c-api-pending-removal-in-3.15.rst:104 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " -"instead." +"or :c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:52 +#: deprecations/c-api-pending-removal-in-3.15.rst:107 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " -"and :c:member:`PyConfig.hash_seed` instead." +"and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " +"` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:55 -msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." +#: deprecations/c-api-pending-removal-in-3.15.rst:111 +msgid "" +":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` " +"or :c:func:`PyConfig_Get(\"isolated\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:57 +#: deprecations/c-api-pending-removal-in-3.15.rst:114 msgid "" -":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." -"legacy_windows_fs_encoding` instead." +":c:var:`Py_LegacyWindowsFSEncodingFlag`: " +"Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` " +"or :c:func:`PyConfig_Get(\"legacy_windows_fs_encoding\") ` " +"instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:59 +#: deprecations/c-api-pending-removal-in-3.15.rst:117 msgid "" -":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." -"legacy_windows_stdio` instead." +":c:var:`Py_LegacyWindowsStdioFlag`: " +"Use :c:member:`PyConfig.legacy_windows_stdio` " +"or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:61 +#: deprecations/c-api-pending-removal-in-3.15.rst:120 msgid "" -":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." -"filesystem_encoding` instead." +":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" +"Py_HasFileSystemDefaultEncoding`: " +"Use :c:member:`PyConfig.filesystem_encoding` " +"or :c:func:`PyConfig_Get(\"filesystem_encoding\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:63 +#: deprecations/c-api-pending-removal-in-3.15.rst:123 msgid "" -":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." -"filesystem_encoding` instead." +":c:var:`!Py_FileSystemDefaultEncodeErrors`: " +"Use :c:member:`PyConfig.filesystem_errors` " +"or :c:func:`PyConfig_Get(\"filesystem_errors\") ` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:65 +#: deprecations/c-api-pending-removal-in-3.15.rst:126 msgid "" -":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." -"filesystem_errors` instead." +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` " +"or :c:func:`PyConfig_Get(\"utf8_mode\") ` instead. " +"(see :c:func:`Py_PreInitialize`)" msgstr "" -#: deprecations/c-api-pending-removal-in-3.14.rst:67 +#: deprecations/c-api-pending-removal-in-3.15.rst:131 msgid "" -":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" -"c:func:`Py_PreInitialize`)" +"The :c:func:`Py_InitializeFromConfig` API should be used " +"with :c:type:`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can " +"be used to get these options at runtime." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." +#: deprecations/c-api-pending-removal-in-3.16.rst:4 +msgid "The bundled copy of ``libmpdec``." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:4 +msgid "" +"The following private functions are deprecated and planned for removal in " +"Python 3.18:" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:7 +msgid ":c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:8 +msgid "" +":c:func:`!_PyDict_GetItemStringWithError`: " +"use :c:func:`PyDict_GetItemStringRef`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:9 +msgid ":c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:10 +msgid ":c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:5 +#: deprecations/c-api-pending-removal-in-3.18.rst:11 msgid "" -"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" -"`PyImport_ImportModule` instead." +":c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`: " +"use :c:func:`PyLongWriter_Create`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:7 +#: deprecations/c-api-pending-removal-in-3.18.rst:13 msgid "" -":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" -"func:`PyWeakref_GetRef` instead." +":c:func:`!_PyThreadState_UncheckedGet`: " +"use :c:func:`PyThreadState_GetUnchecked`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:14 +msgid ":c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:9 +#: deprecations/c-api-pending-removal-in-3.18.rst:15 msgid "" -":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:" -"type:`wchar_t` instead." +":c:func:`!_PyUnicodeWriter_Init`: replace ``_PyUnicodeWriter_Init(&writer)`` " +"with :c:func:`writer = PyUnicodeWriter_Create(0) `." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:11 -msgid "Python initialization functions:" +#: deprecations/c-api-pending-removal-in-3.18.rst:18 +msgid "" +":c:func:`!_PyUnicodeWriter_Finish`: replace " +"``_PyUnicodeWriter_Finish(&writer)`` " +"with :c:func:`PyUnicodeWriter_Finish(writer) `." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:13 +#: deprecations/c-api-pending-removal-in-3.18.rst:21 msgid "" -":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" -"warnings.filters` instead." +":c:func:`!_PyUnicodeWriter_Dealloc`: replace " +"``_PyUnicodeWriter_Dealloc(&writer)`` " +"with :c:func:`PyUnicodeWriter_Discard(writer) `." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:15 +#: deprecations/c-api-pending-removal-in-3.18.rst:24 msgid "" -":c:func:`Py_GetExecPrefix`: Get :data:`sys.base_exec_prefix` and :data:`sys." -"exec_prefix` instead." +":c:func:`!_PyUnicodeWriter_WriteChar`: replace " +"``_PyUnicodeWriter_WriteChar(&writer, ch)`` " +"with :c:func:`PyUnicodeWriter_WriteChar(writer, ch) " +"`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:17 -msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." +#: deprecations/c-api-pending-removal-in-3.18.rst:27 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteStr`: replace " +"``_PyUnicodeWriter_WriteStr(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteStr(writer, str) " +"`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:19 +#: deprecations/c-api-pending-removal-in-3.18.rst:30 msgid "" -":c:func:`Py_GetPrefix`: Get :data:`sys.base_prefix` and :data:`sys.prefix` " -"instead." +":c:func:`!_PyUnicodeWriter_WriteSubstring`: replace " +"``_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)`` " +"with :c:func:`PyUnicodeWriter_WriteSubstring(writer, str, start, end) " +"`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:33 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteASCIIString`: replace " +"``_PyUnicodeWriter_WriteASCIIString(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteASCII(writer, str) " +"`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:21 -msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." +#: deprecations/c-api-pending-removal-in-3.18.rst:36 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteLatin1String`: replace " +"``_PyUnicodeWriter_WriteLatin1String(&writer, str)`` " +"with :c:func:`PyUnicodeWriter_WriteUTF8(writer, str) " +"`." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:23 -msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." +#: deprecations/c-api-pending-removal-in-3.18.rst:39 +msgid ":c:func:`!_PyUnicodeWriter_Prepare`: (no replacement)." msgstr "" -#: deprecations/c-api-pending-removal-in-3.15.rst:25 +#: deprecations/c-api-pending-removal-in-3.18.rst:40 +msgid ":c:func:`!_PyUnicodeWriter_PrepareKind`: (no replacement)." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:41 +msgid ":c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:42 +msgid ":c:func:`!_Py_fopen_obj`: use :c:func:`Py_fopen`." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.18.rst:44 +msgid "" +"The `pythoncapi-compat project `__ can be used to get these new public functions on Python 3.13 and older. " +"(Contributed by Victor Stinner in :gh:`128863`.)" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.19.rst:4 +msgid ":pep:`456` embedders support for the string hashing scheme definition." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:4 +msgid "" +":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` " +"and :c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be " +"removed in 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and " +"cache the result in the module state, then " +"call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. " +"(Contributed by Victor Stinner in :gh:`141049`.)" +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:11 msgid "" -":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" -"`PYTHONHOME` environment variable instead." +"The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`). " +"Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to " +"convert a Python complex number to/from the C :c:type:`Py_complex` " +"representation." +msgstr "" + +#: deprecations/c-api-pending-removal-in-3.20.rst:16 +msgid "Macros :c:macro:`!Py_MATH_PIl` and :c:macro:`!Py_MATH_El`." msgstr "" #: deprecations/c-api-pending-removal-in-future.rst:4 @@ -1054,83 +1568,59 @@ msgstr "" #: deprecations/c-api-pending-removal-in-future.rst:19 msgid "" -":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" -"`PySlice_AdjustIndices` instead." +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` " +"and :c:func:`PySlice_AdjustIndices` instead." msgstr "" #: deprecations/c-api-pending-removal-in-future.rst:21 -msgid "" -":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-future.rst:23 -msgid "" -":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-future.rst:25 -msgid "" -":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-future.rst:27 -msgid "" -":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." -msgstr "" - -#: deprecations/c-api-pending-removal-in-future.rst:29 msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:31 +#: deprecations/c-api-pending-removal-in-future.rst:23 msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:33 +#: deprecations/c-api-pending-removal-in-future.rst:25 msgid "" ":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:35 +#: deprecations/c-api-pending-removal-in-future.rst:27 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:37 -msgid ":c:member:`!PyDictObject.ma_version_tag` member." -msgstr "" - -#: deprecations/c-api-pending-removal-in-future.rst:38 +#: deprecations/c-api-pending-removal-in-future.rst:29 msgid "Thread Local Storage (TLS) API:" msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:40 +#: deprecations/c-api-pending-removal-in-future.rst:31 msgid "" ":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:42 +#: deprecations/c-api-pending-removal-in-future.rst:33 msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:44 +#: deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:46 +#: deprecations/c-api-pending-removal-in-future.rst:37 msgid "" ":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:48 +#: deprecations/c-api-pending-removal-in-future.rst:39 msgid "" ":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" -#: deprecations/c-api-pending-removal-in-future.rst:50 +#: deprecations/c-api-pending-removal-in-future.rst:41 msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po index b4d43d103..e3e0f6b9c 100644 --- a/deprecations/pending-removal-in-3.13.po +++ b/deprecations/pending-removal-in-3.13.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/pending-removal-in-3.13.rst:2 -msgid "Pending Removal in Python 3.13" +msgid "Pending removal in Python 3.13" msgstr "" #: deprecations/pending-removal-in-3.13.rst:4 @@ -148,42 +146,3 @@ msgstr "" #: deprecations/pending-removal-in-3.13.rst:40 msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:41 -msgid ":mod:`importlib.resources` deprecated methods:" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:43 -msgid "``contents()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:44 -msgid "``is_resource()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:45 -msgid "``open_binary()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:46 -msgid "``open_text()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:47 -msgid "``path()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:48 -msgid "``read_binary()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:49 -msgid "``read_text()``" -msgstr "" - -#: deprecations/pending-removal-in-3.13.rst:51 -msgid "" -"Use :func:`importlib.resources.files` instead. Refer to `importlib-" -"resources: Migrating from Legacy `_ (:gh:`106531`)" -msgstr "" diff --git a/deprecations/pending-removal-in-3.14.po b/deprecations/pending-removal-in-3.14.po index 112b293a3..d8f784581 100644 --- a/deprecations/pending-removal-in-3.14.po +++ b/deprecations/pending-removal-in-3.14.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,82 +16,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/pending-removal-in-3.14.rst:2 -msgid "Pending Removal in Python 3.14" +msgid "Pending removal in Python 3.14" msgstr "" #: deprecations/pending-removal-in-3.14.rst:4 -msgid "The import system:" -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:6 -msgid "" -"Setting :attr:`~module.__loader__` on a module while failing to set :attr:" -"`__spec__.loader ` is deprecated. In " -"Python 3.14, :attr:`!__loader__` will cease to be set or taken into " -"consideration by the import system or the standard library." -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:11 msgid "" ":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" "argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " "(Contributed by Nikita Sobolev in :gh:`92248`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:16 +#: deprecations/pending-removal-in-3.14.rst:9 msgid "" ":mod:`ast`: The following features have been deprecated in documentation " "since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at " "runtime when they are accessed or used, and will be removed in Python 3.14:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:20 +#: deprecations/pending-removal-in-3.14.rst:13 msgid ":class:`!ast.Num`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:21 +#: deprecations/pending-removal-in-3.14.rst:14 msgid ":class:`!ast.Str`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:22 +#: deprecations/pending-removal-in-3.14.rst:15 msgid ":class:`!ast.Bytes`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:23 +#: deprecations/pending-removal-in-3.14.rst:16 msgid ":class:`!ast.NameConstant`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:24 +#: deprecations/pending-removal-in-3.14.rst:17 msgid ":class:`!ast.Ellipsis`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:26 +#: deprecations/pending-removal-in-3.14.rst:19 msgid "" -"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" -"`90953`.)" +"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka " +"in :gh:`90953`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:29 +#: deprecations/pending-removal-in-3.14.rst:22 msgid ":mod:`asyncio`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:31 +#: deprecations/pending-removal-in-3.14.rst:24 msgid "" -"The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, :class:" -"`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` and :" -"class:`~asyncio.SafeChildWatcher` are deprecated and will be removed in " +"The child watcher classes :class:`!asyncio.MultiLoopChildWatcher`, :class:`!" +"asyncio.FastChildWatcher`, :class:`!asyncio.AbstractChildWatcher` " +"and :class:`!asyncio.SafeChildWatcher` are deprecated and will be removed in " "Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:37 +#: deprecations/pending-removal-in-3.14.rst:30 msgid "" -":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:" -"`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio." -"AbstractEventLoopPolicy.get_child_watcher` are deprecated and will be " -"removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" +":func:`!asyncio.set_child_watcher`, :func:`!" +"asyncio.get_child_watcher`, :meth:`!" +"asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`!" +"asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated and will " +"be removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:43 +#: deprecations/pending-removal-in-3.14.rst:36 msgid "" "The :meth:`~asyncio.get_event_loop` method of the default event loop policy " "now emits a :exc:`DeprecationWarning` if there is no current event loop set " @@ -101,53 +88,46 @@ msgid "" "Rossum in :gh:`100160`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:48 -msgid "" -":mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`. " -"Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`. For use in " -"typing, prefer a union, like ``bytes | bytearray``, or :class:`collections." -"abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:54 +#: deprecations/pending-removal-in-3.14.rst:41 msgid "" -":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils." -"localtime`. (Contributed by Alan Williams in :gh:`72346`.)" +":mod:`email`: Deprecated the *isdst* parameter " +"in :func:`email.utils.localtime`. (Contributed by Alan Williams " +"in :gh:`72346`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:57 +#: deprecations/pending-removal-in-3.14.rst:44 msgid ":mod:`importlib.abc` deprecated classes:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:59 +#: deprecations/pending-removal-in-3.14.rst:46 msgid ":class:`!importlib.abc.ResourceReader`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:60 +#: deprecations/pending-removal-in-3.14.rst:47 msgid ":class:`!importlib.abc.Traversable`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:61 +#: deprecations/pending-removal-in-3.14.rst:48 msgid ":class:`!importlib.abc.TraversableResources`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:63 +#: deprecations/pending-removal-in-3.14.rst:50 msgid "Use :mod:`importlib.resources.abc` classes instead:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:65 +#: deprecations/pending-removal-in-3.14.rst:52 msgid ":class:`importlib.resources.abc.Traversable`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:66 +#: deprecations/pending-removal-in-3.14.rst:53 msgid ":class:`importlib.resources.abc.TraversableResources`" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:68 +#: deprecations/pending-removal-in-3.14.rst:55 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:70 +#: deprecations/pending-removal-in-3.14.rst:57 msgid "" ":mod:`itertools` had undocumented, inefficient, historically buggy, and " "inconsistent support for copy, deepcopy, and pickle operations. This will be " @@ -155,80 +135,61 @@ msgid "" "burden. (Contributed by Raymond Hettinger in :gh:`101588`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:76 +#: deprecations/pending-removal-in-3.14.rst:63 msgid "" ":mod:`multiprocessing`: The default start method will change to a safer one " "on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is " "currently the default (:gh:`84559`). Adding a runtime warning about this was " "deemed too disruptive as the majority of code is not expected to care. Use " -"the :func:`~multiprocessing.get_context` or :func:`~multiprocessing." -"set_start_method` APIs to explicitly specify when your code *requires* " -"``'fork'``. See :ref:`multiprocessing-start-methods`." +"the :func:`~multiprocessing.get_context` " +"or :func:`~multiprocessing.set_start_method` APIs to explicitly specify when " +"your code *requires* ``'fork'``. See :ref:`multiprocessing-start-methods`." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:84 +#: deprecations/pending-removal-in-3.14.rst:71 msgid "" -":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and :meth:`~pathlib." -"PurePath.relative_to`: passing additional arguments is deprecated." +":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` " +"and :meth:`~pathlib.PurePath.relative_to`: passing additional arguments is " +"deprecated." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:88 +#: deprecations/pending-removal-in-3.14.rst:75 msgid "" -":mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader` " +":mod:`pkgutil`: :func:`!pkgutil.find_loader` and :func:`!pkgutil.get_loader` " "now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` " "instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:93 +#: deprecations/pending-removal-in-3.14.rst:80 msgid ":mod:`pty`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:95 +#: deprecations/pending-removal-in-3.14.rst:82 msgid "``master_open()``: use :func:`pty.openpty`." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:96 +#: deprecations/pending-removal-in-3.14.rst:83 msgid "``slave_open()``: use :func:`pty.openpty`." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:98 +#: deprecations/pending-removal-in-3.14.rst:85 msgid ":mod:`sqlite3`:" msgstr "" -#: deprecations/pending-removal-in-3.14.rst:100 -msgid ":data:`~sqlite3.version` and :data:`~sqlite3.version_info`." -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:102 -msgid "" -":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` if :" -"ref:`named placeholders ` are used and *parameters* is " -"a sequence instead of a :class:`dict`." +#: deprecations/pending-removal-in-3.14.rst:87 +msgid ":data:`!version` and :data:`!version_info`." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:106 +#: deprecations/pending-removal-in-3.14.rst:89 msgid "" -"date and datetime adapter, date and timestamp converter: see the :mod:" -"`sqlite3` documentation for suggested replacement recipes." +":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` " +"if :ref:`named placeholders ` are used and " +"*parameters* is a sequence instead of a :class:`dict`." msgstr "" -#: deprecations/pending-removal-in-3.14.rst:109 -msgid "" -":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was " -"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " -"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " -"in 3.14. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:116 -msgid "" -":mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, now " -"causes a :exc:`DeprecationWarning` to be emitted when it is used." -msgstr "" - -#: deprecations/pending-removal-in-3.14.rst:119 +#: deprecations/pending-removal-in-3.14.rst:93 msgid "" ":mod:`urllib`: :class:`!urllib.parse.Quoter` is deprecated: it was not " -"intended to be a public API. (Contributed by Gregory P. Smith in :gh:" -"`88168`.)" +"intended to be a public API. (Contributed by Gregory P. Smith " +"in :gh:`88168`.)" msgstr "" diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index 0a7c166d1..1a7107cf9 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/pending-removal-in-3.15.rst:2 -msgid "Pending Removal in Python 3.15" +msgid "Pending removal in Python 3.15" msgstr "" #: deprecations/pending-removal-in-3.15.rst:4 @@ -27,18 +25,19 @@ msgstr "" #: deprecations/pending-removal-in-3.15.rst:6 msgid "" -"Setting :attr:`~module.__cached__` on a module while failing to set :attr:" -"`__spec__.cached ` is deprecated. In " -"Python 3.15, :attr:`!__cached__` will cease to be set or take into " +"Setting ``__cached__`` on a module while failing to " +"set :attr:`__spec__.cached ` is " +"deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into " "consideration by the import system or standard library. (:gh:`97879`)" msgstr "" #: deprecations/pending-removal-in-3.15.rst:11 msgid "" -"Setting :attr:`~module.__package__` on a module while failing to set :attr:" -"`__spec__.parent ` is deprecated. In " -"Python 3.15, :attr:`!__package__` will cease to be set or take into " -"consideration by the import system or standard library. (:gh:`97879`)" +"Setting :attr:`~module.__package__` on a module while failing to " +"set :attr:`__spec__.parent ` is " +"deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or " +"take into consideration by the import system or standard library. " +"(:gh:`97879`)" msgstr "" #: deprecations/pending-removal-in-3.15.rst:16 @@ -57,9 +56,9 @@ msgstr "" #: deprecations/pending-removal-in-3.15.rst:23 msgid "" -"The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has " -"been deprecated since Python 3.13. No direct replacement exists. *Anything* " -"is better than CGI to interface a web server with a request handler." +"The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been " +"deprecated since Python 3.13. No direct replacement exists. *Anything* is " +"better than CGI to interface a web server with a request handler." msgstr "" #: deprecations/pending-removal-in-3.15.rst:29 @@ -69,77 +68,118 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-3.15.rst:32 -msgid ":class:`locale`:" +msgid ":mod:`importlib`:" msgstr "" #: deprecations/pending-removal-in-3.15.rst:34 +msgid "``load_module()`` method: use ``exec_module()`` instead." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`pathlib`:" +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:38 msgid "" -"The :func:`~locale.getdefaultlocale` function has been deprecated since " -"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:" -"`90817`), but has been postponed to Python 3.15. Use :func:`~locale." -"getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " -"instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" +":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. " +"Use :func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" #: deprecations/pending-removal-in-3.15.rst:42 -msgid ":mod:`pathlib`:" +msgid ":mod:`platform`:" msgstr "" #: deprecations/pending-removal-in-3.15.rst:44 msgid "" -":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" -"func:`os.path.isreserved` to detect reserved paths on Windows." +":func:`!platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." msgstr "" #: deprecations/pending-removal-in-3.15.rst:48 -msgid ":mod:`platform`:" +msgid ":mod:`sysconfig`:" msgstr "" #: deprecations/pending-removal-in-3.15.rst:50 msgid "" -":func:`~platform.java_ver` has been deprecated since Python 3.13. This " -"function is only useful for Jython support, has a confusing API, and is " -"largely untested." +"The *check_home* argument of :func:`sysconfig.is_python_build` has been " +"deprecated since Python 3.12." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:54 +#: deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`threading`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:56 +#: deprecations/pending-removal-in-3.15.rst:55 msgid "" ":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " -"arguments has been deprecated since Python 3.14, as the Python version does " +"arguments has been deprecated since Python 3.14, as the Python version does " "not permit any arguments, but the C version allows any number of positional " "or keyword arguments, ignoring every argument." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:62 -msgid ":mod:`typing`:" +#: deprecations/pending-removal-in-3.15.rst:61 +msgid ":mod:`types`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:64 +#: deprecations/pending-removal-in-3.15.rst:63 msgid "" -"The undocumented keyword argument syntax for creating :class:`~typing." -"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) " -"has been deprecated since Python 3.13. Use the class-based syntax or the " -"functional syntax instead." +":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was " +"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " +"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " +"in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" #: deprecations/pending-removal-in-3.15.rst:70 +msgid ":mod:`typing`:" +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:72 +msgid "" +"The undocumented keyword argument syntax for " +"creating :class:`~typing.NamedTuple` classes (for example, ``Point = " +"NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python " +"3.13. Use the class-based syntax or the functional syntax instead." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:78 msgid "" -"The :func:`typing.no_type_check_decorator` decorator function has been " +"When using the functional syntax of :class:`~typing.TypedDict`\\s, failing " +"to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or " +"passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated " +"since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = " +"TypedDict(\"TD\", {})`` to create a TypedDict with zero field." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:85 +msgid "" +"The :func:`!typing.no_type_check_decorator` decorator function has been " "deprecated since Python 3.13. After eight years in the :mod:`typing` module, " "it has yet to be supported by any major type checker." msgstr "" -#: deprecations/pending-removal-in-3.15.rst:75 +#: deprecations/pending-removal-in-3.15.rst:90 +msgid "" +":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:92 msgid ":mod:`wave`:" msgstr "" -#: deprecations/pending-removal-in-3.15.rst:77 +#: deprecations/pending-removal-in-3.15.rst:94 +msgid "" +"The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of " +"the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been " +"deprecated since Python 3.13." +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:98 +msgid ":mod:`zipimport`:" +msgstr "" + +#: deprecations/pending-removal-in-3.15.rst:100 msgid "" -"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave." -"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" -"`~wave.Wave_write` classes have been deprecated since Python 3.13." +":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python " +"3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" msgstr "" diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po index 47cf7db20..bd5b85b0f 100644 --- a/deprecations/pending-removal-in-3.16.po +++ b/deprecations/pending-removal-in-3.16.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,70 +16,182 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/pending-removal-in-3.16.rst:2 -msgid "Pending Removal in Python 3.16" +msgid "Pending removal in Python 3.16" msgstr "" #: deprecations/pending-removal-in-3.16.rst:4 -msgid ":mod:`builtins`:" +msgid "The import system:" msgstr "" #: deprecations/pending-removal-in-3.16.rst:6 msgid "" -"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " -"deprecated since Python 3.12, as it produces surprising and unintuitive " -"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " -"of a Boolean. In the rare case that you need the bitwise inversion of the " -"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +"Setting :attr:`~module.__loader__` on a module while failing to " +"set :attr:`__spec__.loader ` is " +"deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or " +"taken into consideration by the import system or the standard library." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:13 +#: deprecations/pending-removal-in-3.16.rst:11 msgid ":mod:`array`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:15 +#: deprecations/pending-removal-in-3.16.rst:13 msgid "" "The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " "documentation since Python 3.3 and at runtime since Python 3.13. Use the " "``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." msgstr "" +#: deprecations/pending-removal-in-3.16.rst:19 +msgid ":mod:`asyncio`:" +msgstr "" + #: deprecations/pending-removal-in-3.16.rst:21 +msgid "" +":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in " +"Python 3.16; use :func:`inspect.iscoroutinefunction` instead. (Contributed " +"by Jiahao Li and Kumar Aditya in :gh:`122875`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:26 +msgid "" +":mod:`asyncio` policy system is deprecated and will be removed in Python " +"3.16. In particular, the following classes and functions are deprecated:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:29 +msgid ":class:`asyncio.AbstractEventLoopPolicy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:30 +msgid ":class:`asyncio.DefaultEventLoopPolicy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:31 +msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:32 +msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:33 +msgid ":func:`asyncio.get_event_loop_policy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:34 +msgid ":func:`asyncio.set_event_loop_policy`" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:36 +msgid "" +"Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with " +"*loop_factory* to use the desired event loop implementation." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:39 +msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows::" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:48 +msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:50 +msgid ":mod:`builtins`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:52 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:59 +msgid ":mod:`functools`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:61 +msgid "" +"Calling the Python implementation of :func:`functools.reduce` with " +"*function* or *sequence* as keyword arguments has been deprecated since " +"Python 3.14." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:64 +msgid ":mod:`logging`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:66 +msgid "" +"Support for custom logging handlers with the *strm* argument is deprecated " +"and scheduled for removal in Python 3.16. Define handlers with the *stream* " +"argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:70 +msgid ":mod:`mimetypes`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:72 +msgid "" +"Valid extensions start with a '.' or are empty " +"for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated " +"and will raise a :exc:`ValueError` in Python 3.16. (Contributed by Hugo van " +"Kemenade in :gh:`75223`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:78 msgid ":mod:`shutil`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:23 +#: deprecations/pending-removal-in-3.16.rst:80 msgid "" "The :class:`!ExecError` exception has been deprecated since Python 3.14. It " "has not been used by any function in :mod:`!shutil` since Python 3.4, and is " "now an alias of :exc:`RuntimeError`." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:28 +#: deprecations/pending-removal-in-3.16.rst:85 msgid ":mod:`symtable`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:30 +#: deprecations/pending-removal-in-3.16.rst:87 msgid "" "The :meth:`Class.get_methods ` method has been " "deprecated since Python 3.14." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:33 +#: deprecations/pending-removal-in-3.16.rst:90 msgid ":mod:`sys`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:35 +#: deprecations/pending-removal-in-3.16.rst:92 msgid "" "The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " "since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable instead." msgstr "" -#: deprecations/pending-removal-in-3.16.rst:39 +#: deprecations/pending-removal-in-3.16.rst:96 +msgid ":mod:`sysconfig`:" +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:98 +msgid "" +"The :func:`!sysconfig.expand_makefile_vars` function has been deprecated " +"since Python 3.14. Use the ``vars`` argument of :func:`sysconfig.get_paths` " +"instead." +msgstr "" + +#: deprecations/pending-removal-in-3.16.rst:102 msgid ":mod:`tarfile`:" msgstr "" -#: deprecations/pending-removal-in-3.16.rst:41 +#: deprecations/pending-removal-in-3.16.rst:104 msgid "" "The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " "deprecated since Python 3.13." diff --git a/deprecations/pending-removal-in-3.17.po b/deprecations/pending-removal-in-3.17.po new file mode 100644 index 000000000..1c5cb08f8 --- /dev/null +++ b/deprecations/pending-removal-in-3.17.po @@ -0,0 +1,110 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/pending-removal-in-3.17.rst:2 +msgid "Pending removal in Python 3.17" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:4 +msgid ":mod:`datetime`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:6 +msgid "" +":meth:`~datetime.datetime.strptime` calls using a format string containing " +"``%e`` (day of month) without a year. This has been deprecated since Python " +"3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:12 +msgid ":mod:`collections.abc`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:14 +msgid "" +":class:`collections.abc.ByteString` is scheduled for removal in Python 3.17." +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:16 +#: deprecations/pending-removal-in-3.17.rst:55 +msgid "" +"Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " +"implements the :ref:`buffer protocol ` at runtime. For use in " +"type annotations, either use :class:`~collections.abc.Buffer` or a union " +"that explicitly specifies the types your code supports (e.g., ``bytes | " +"bytearray | memoryview``)." +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:22 +#: deprecations/pending-removal-in-3.17.rst:61 +msgid "" +":class:`!ByteString` was originally intended to be an abstract class that " +"would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " +"However, since the ABC never had any methods, knowing that an object was an " +"instance of :class:`!ByteString` never actually told you anything useful " +"about the object. Other common buffer types such as :class:`memoryview` were " +"also never understood as subtypes of :class:`!ByteString` (either at runtime " +"or by static type checkers)." +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:30 +#: deprecations/pending-removal-in-3.17.rst:69 +msgid "" +"See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by " +"Shantanu Jain in :gh:`91896`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:34 +msgid ":mod:`encodings`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:36 +msgid "" +"Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` " +"is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan " +"Ulbrych in :gh:`136702`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:40 +msgid ":mod:`webbrowser`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:42 +msgid "" +":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" +"webbrowser.MacOS`. (:gh:`137586`)" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:45 +msgid ":mod:`typing`:" +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:47 +msgid "" +"Before Python 3.14, old-style unions were implemented using the private " +"class ``typing._UnionGenericAlias``. This class is no longer needed for the " +"implementation, but it has been retained for backward compatibility, with " +"removal scheduled for Python 3.17. Users should use documented introspection " +"helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead " +"of relying on private implementation details." +msgstr "" + +#: deprecations/pending-removal-in-3.17.rst:52 +msgid "" +":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " +"removal in Python 3.17." +msgstr "" diff --git a/deprecations/pending-removal-in-3.18.po b/deprecations/pending-removal-in-3.18.po new file mode 100644 index 000000000..ae3c87f1b --- /dev/null +++ b/deprecations/pending-removal-in-3.18.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:4 +msgid "" +"No longer accept a boolean value when a file descriptor is expected. " +"(Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:7 +msgid ":mod:`decimal`:" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:9 +msgid "" +"The non-standard and undocumented :class:`~decimal.Decimal` format specifier " +"``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation, has been deprecated since Python 3.13. (Contributed by " +"Serhiy Storchaka in :gh:`89902`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:14 +msgid "Deprecations defined by :pep:`829`:" +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:16 +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "" + +#: deprecations/pending-removal-in-3.18.rst:18 +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "" diff --git a/deprecations/pending-removal-in-3.19.po b/deprecations/pending-removal-in-3.19.po new file mode 100644 index 000000000..4acbc6cae --- /dev/null +++ b/deprecations/pending-removal-in-3.19.po @@ -0,0 +1,92 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/pending-removal-in-3.19.rst:2 +msgid "Pending removal in Python 3.19" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:4 +msgid ":mod:`ctypes`:" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:6 +msgid "" +"Implicitly switching to the MSVC-compatible struct layout by " +"setting :attr:`~ctypes.Structure._pack_` but " +"not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:10 +msgid ":mod:`hashlib`:" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:12 +msgid "" +"In hash function constructors such as :func:`~hashlib.new` or the direct " +"hash-named constructors such as :func:`~hashlib.md5` " +"and :func:`~hashlib.sha256`, their optional initial data parameter could " +"also be passed a keyword argument named ``data=`` or ``string=`` in " +"various :mod:`!hashlib` implementations." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:18 +msgid "" +"Support for the ``string`` keyword argument name is now deprecated and " +"slated for removal in Python 3.19." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:21 +msgid "" +"Before Python 3.13, the ``string`` keyword parameter was not correctly " +"supported depending on the backend implementation of hash functions. Prefer " +"passing the initial data as a positional argument for maximum backwards " +"compatibility." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:26 +msgid ":mod:`http.cookies`:" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:28 +msgid "" +":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in " +"Python 3.19." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:31 +msgid "" +":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed " +"in Python 3.19." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:34 +msgid ":mod:`imaplib`:" +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:36 +msgid "" +"Altering :attr:`IMAP4.file ` is now deprecated and " +"slated for removal in Python 3.19. This property is now unused and changing " +"its value does not automatically close the current file." +msgstr "" + +#: deprecations/pending-removal-in-3.19.rst:40 +msgid "" +"Before Python 3.14, this property was used to implement the corresponding " +"``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this " +"is no longer the case since then." +msgstr "" diff --git a/deprecations/pending-removal-in-3.20.po b/deprecations/pending-removal-in-3.20.po new file mode 100644 index 000000000..691e20f4c --- /dev/null +++ b/deprecations/pending-removal-in-3.20.po @@ -0,0 +1,172 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/pending-removal-in-3.20.rst:2 +msgid "Pending removal in Python 3.20" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:4 +msgid "" +"Calling the ``__new__()`` method of :class:`struct.Struct` without the " +"*format* argument is deprecated and will be removed in Python 3.20. " +"Calling :meth:`~object.__init__` method on " +"initialized :class:`~struct.Struct` objects is deprecated and will be " +"removed in Python 3.20." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:9 +msgid "" +"(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:11 +msgid "" +"The ``__version__``, ``version`` and ``VERSION`` attributes have been " +"deprecated in these standard library modules and will be removed in Python " +"3.20. Use :py:data:`sys.version_info` instead." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:15 +msgid ":mod:`argparse`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:16 +msgid ":mod:`csv`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:17 +msgid ":mod:`ctypes`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:18 +msgid ":mod:`!ctypes.macholib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:19 +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:20 +msgid ":mod:`http.server`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:21 +msgid ":mod:`imaplib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:22 +msgid ":mod:`ipaddress`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:23 +msgid ":mod:`json`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:24 +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:25 +msgid ":mod:`optparse`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:26 +msgid ":mod:`pickle`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:27 +msgid ":mod:`platform`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:28 +msgid ":mod:`re`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:29 +msgid ":mod:`socketserver`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:30 +msgid ":mod:`tabnanny`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:31 +msgid ":mod:`tarfile`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:32 +msgid ":mod:`tkinter.font`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:33 +msgid ":mod:`tkinter.ttk`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:34 +msgid ":mod:`wsgiref.simple_server`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:35 +msgid ":mod:`xml.etree.ElementTree`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:36 +msgid ":mod:`!xml.sax.expatreader`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:37 +msgid ":mod:`xml.sax.handler`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:38 +msgid ":mod:`zlib`" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:40 +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:42 +msgid "Deprecations defined by :pep:`829`:" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:44 +msgid "" +"Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:47 +msgid "" +":file:`{name}.pth` files are no longer decoded in the locale encoding by " +"default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:50 +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:52 +msgid ":mod:`ast`:" +msgstr "" + +#: deprecations/pending-removal-in-3.20.rst:54 +msgid "" +"Creating instances of abstract AST nodes (such as :class:`ast.AST` " +"or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "" diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po index 09d06f6eb..a3be5d351 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: deprecations/pending-removal-in-future.rst:2 -msgid "Pending Removal in Future Versions" +msgid "Pending removal in future versions" msgstr "" #: deprecations/pending-removal-in-future.rst:4 @@ -28,158 +26,173 @@ msgid "" msgstr "" #: deprecations/pending-removal-in-future.rst:7 -msgid "" -":mod:`argparse`: Nesting argument groups and nesting mutually exclusive " -"groups are deprecated." +msgid ":mod:`argparse`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:10 -msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" +#: deprecations/pending-removal-in-future.rst:9 +msgid "" +"Nesting argument groups and nesting mutually exclusive groups are deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:12 -msgid ":mod:`builtins`:" +#: deprecations/pending-removal-in-future.rst:11 +msgid "" +"Passing the undocumented keyword argument *prefix_chars* " +"to :meth:`~argparse.ArgumentParser.add_argument_group` is now deprecated." msgstr "" #: deprecations/pending-removal-in-future.rst:14 -msgid "``bool(NotImplemented)``." +msgid "The :class:`argparse.FileType` type converter is deprecated." +msgstr "" + +#: deprecations/pending-removal-in-future.rst:16 +msgid ":mod:`builtins`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:15 +#: deprecations/pending-removal-in-future.rst:18 msgid "" "Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature " "is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single " "argument signature." msgstr "" -#: deprecations/pending-removal-in-future.rst:18 +#: deprecations/pending-removal-in-future.rst:21 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " "ambiguous expressions like ``[0x1for x in y]`` (which can be interpreted as " "``[0x1 for x in y]`` or ``[0x1f or x in y]``). A syntax warning is raised " -"if the numeric literal is immediately followed by one of keywords :keyword:" -"`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :" -"keyword:`is` and :keyword:`or`. In a future release it will be changed to a " -"syntax error. (:gh:`87999`)" +"if the numeric literal is immediately followed by one of " +"keywords :keyword:`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :keyword:`is` " +"and :keyword:`or`. In a future release it will be changed to a syntax " +"error. (:gh:`87999`)" msgstr "" -#: deprecations/pending-removal-in-future.rst:26 +#: deprecations/pending-removal-in-future.rst:29 msgid "" "Support for ``__index__()`` and ``__int__()`` method returning non-int type: " "these methods will be required to return an instance of a strict subclass " "of :class:`int`." msgstr "" -#: deprecations/pending-removal-in-future.rst:29 -msgid "" -"Support for ``__float__()`` method returning a strict subclass of :class:" -"`float`: these methods will be required to return an instance of :class:" -"`float`." -msgstr "" - #: deprecations/pending-removal-in-future.rst:32 msgid "" -"Support for ``__complex__()`` method returning a strict subclass of :class:" -"`complex`: these methods will be required to return an instance of :class:" -"`complex`." +"Support for ``__float__()`` method returning a strict subclass " +"of :class:`float`: these methods will be required to return an instance " +"of :class:`float`." msgstr "" #: deprecations/pending-removal-in-future.rst:35 -msgid "Delegation of ``int()`` to ``__trunc__()`` method." +msgid "" +"Support for ``__complex__()`` method returning a strict subclass " +"of :class:`complex`: these methods will be required to return an instance " +"of :class:`complex`." msgstr "" -#: deprecations/pending-removal-in-future.rst:36 +#: deprecations/pending-removal-in-future.rst:38 msgid "" -"Passing a complex number as the *real* or *imag* argument in the :func:" -"`complex` constructor is now deprecated; it should only be passed as a " -"single positional argument. (Contributed by Serhiy Storchaka in :gh:" -"`109218`.)" +"Passing a complex number as the *real* or *imag* argument in " +"the :func:`complex` constructor is now deprecated; it should only be passed " +"as a single positional argument. (Contributed by Serhiy Storchaka " +"in :gh:`109218`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:41 +#: deprecations/pending-removal-in-future.rst:43 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " -"are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." -"FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" +"are deprecated and replaced by :data:`calendar.JANUARY` " +"and :data:`calendar.FEBRUARY`. (Contributed by Prince Roshan " +"in :gh:`103636`.)" +msgstr "" + +#: deprecations/pending-removal-in-future.rst:48 +msgid "" +":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. " +"(:gh:`133038`)" msgstr "" -#: deprecations/pending-removal-in-future.rst:46 +#: deprecations/pending-removal-in-future.rst:50 msgid "" -":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " +":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " "instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:49 +#: deprecations/pending-removal-in-future.rst:53 msgid ":mod:`datetime`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:51 +#: deprecations/pending-removal-in-future.rst:55 msgid "" -":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime." -"UTC)``." +":meth:`~datetime.datetime.utcnow`: use " +"``datetime.datetime.now(tz=datetime.UTC)``." msgstr "" -#: deprecations/pending-removal-in-future.rst:53 +#: deprecations/pending-removal-in-future.rst:57 msgid "" -":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime." -"fromtimestamp(timestamp, tz=datetime.UTC)``." +":meth:`~datetime.datetime.utcfromtimestamp`: use " +"``datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC)``." msgstr "" -#: deprecations/pending-removal-in-future.rst:56 +#: deprecations/pending-removal-in-future.rst:60 msgid ":mod:`gettext`: Plural value must be an integer." msgstr "" -#: deprecations/pending-removal-in-future.rst:58 +#: deprecations/pending-removal-in-future.rst:62 msgid ":mod:`importlib`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:60 -msgid "``load_module()`` method: use ``exec_module()`` instead." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:61 +#: deprecations/pending-removal-in-future.rst:64 msgid "" ":func:`~importlib.util.cache_from_source` *debug_override* parameter is " "deprecated: use the *optimization* parameter instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:64 +#: deprecations/pending-removal-in-future.rst:67 msgid ":mod:`importlib.metadata`:" msgstr "" -#: deprecations/pending-removal-in-future.rst:66 +#: deprecations/pending-removal-in-future.rst:69 msgid "``EntryPoints`` tuple interface." msgstr "" -#: deprecations/pending-removal-in-future.rst:67 +#: deprecations/pending-removal-in-future.rst:70 msgid "Implicit ``None`` on return values." msgstr "" -#: deprecations/pending-removal-in-future.rst:69 +#: deprecations/pending-removal-in-future.rst:72 msgid "" ":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, " "use :meth:`~logging.warning` instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:72 +#: deprecations/pending-removal-in-future.rst:75 msgid "" ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use " "BytesIO and binary mode instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:75 +#: deprecations/pending-removal-in-future.rst:78 msgid "" -":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." +":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." msgstr "" -#: deprecations/pending-removal-in-future.rst:77 +#: deprecations/pending-removal-in-future.rst:80 +msgid "" +":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, " +"use :func:`os.path.commonpath` for path prefixes. " +"The :func:`os.path.commonprefix` function is being deprecated due to having " +"a misleading name and module. The function is not safe to use for path " +"prefixes despite being included in a module about path manipulation, meaning " +"it is easy to accidentally introduce path traversal vulnerabilities into " +"Python programs by using this function." +msgstr "" + +#: deprecations/pending-removal-in-future.rst:88 msgid "" ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is " "deprecated, use an exception instance." msgstr "" -#: deprecations/pending-removal-in-future.rst:80 +#: deprecations/pending-removal-in-future.rst:91 msgid "" ":mod:`re`: More strict rules are now applied for numerical group references " "and group names in regular expressions. Only sequence of ASCII digits is " @@ -188,194 +201,184 @@ msgid "" "underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr "" -#: deprecations/pending-removal-in-future.rst:87 -msgid "" -":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:89 +#: deprecations/pending-removal-in-future.rst:98 msgid "" ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in " "Python 3.12; use the *onexc* parameter instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:92 +#: deprecations/pending-removal-in-future.rst:101 msgid ":mod:`ssl` options and protocols:" msgstr "" -#: deprecations/pending-removal-in-future.rst:94 +#: deprecations/pending-removal-in-future.rst:103 msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." msgstr "" -#: deprecations/pending-removal-in-future.rst:95 +#: deprecations/pending-removal-in-future.rst:104 msgid "" -":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:" -"`!selected_npn_protocol` are deprecated: use ALPN instead." +":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` " +"and :meth:`!selected_npn_protocol` are deprecated: use ALPN instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:98 +#: deprecations/pending-removal-in-future.rst:107 msgid "``ssl.OP_NO_SSL*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:99 +#: deprecations/pending-removal-in-future.rst:108 msgid "``ssl.OP_NO_TLS*`` options" msgstr "" -#: deprecations/pending-removal-in-future.rst:100 +#: deprecations/pending-removal-in-future.rst:109 msgid "``ssl.PROTOCOL_SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:101 +#: deprecations/pending-removal-in-future.rst:110 msgid "``ssl.PROTOCOL_TLS``" msgstr "" -#: deprecations/pending-removal-in-future.rst:102 +#: deprecations/pending-removal-in-future.rst:111 msgid "``ssl.PROTOCOL_TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:103 +#: deprecations/pending-removal-in-future.rst:112 msgid "``ssl.PROTOCOL_TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:104 +#: deprecations/pending-removal-in-future.rst:113 msgid "``ssl.PROTOCOL_TLSv1_2``" msgstr "" -#: deprecations/pending-removal-in-future.rst:105 +#: deprecations/pending-removal-in-future.rst:114 msgid "``ssl.TLSVersion.SSLv3``" msgstr "" -#: deprecations/pending-removal-in-future.rst:106 +#: deprecations/pending-removal-in-future.rst:115 msgid "``ssl.TLSVersion.TLSv1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:107 +#: deprecations/pending-removal-in-future.rst:116 msgid "``ssl.TLSVersion.TLSv1_1``" msgstr "" -#: deprecations/pending-removal-in-future.rst:109 -msgid "" -":func:`sysconfig.is_python_build` *check_home* parameter is deprecated and " -"ignored." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:112 +#: deprecations/pending-removal-in-future.rst:118 msgid ":mod:`threading` methods:" msgstr "" -#: deprecations/pending-removal-in-future.rst:114 +#: deprecations/pending-removal-in-future.rst:120 msgid "" -":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition." -"notify_all`." +":meth:`!threading.Condition.notifyAll`: " +"use :meth:`~threading.Condition.notify_all`." msgstr "" -#: deprecations/pending-removal-in-future.rst:115 +#: deprecations/pending-removal-in-future.rst:121 msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`." msgstr "" -#: deprecations/pending-removal-in-future.rst:116 +#: deprecations/pending-removal-in-future.rst:122 msgid "" -":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :" -"attr:`threading.Thread.daemon` attribute." +":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: " +"use :attr:`threading.Thread.daemon` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:118 +#: deprecations/pending-removal-in-future.rst:124 msgid "" -":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :" -"attr:`threading.Thread.name` attribute." +":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: " +"use :attr:`threading.Thread.name` attribute." msgstr "" -#: deprecations/pending-removal-in-future.rst:120 +#: deprecations/pending-removal-in-future.rst:126 msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." msgstr "" -#: deprecations/pending-removal-in-future.rst:121 +#: deprecations/pending-removal-in-future.rst:127 msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." msgstr "" -#: deprecations/pending-removal-in-future.rst:123 +#: deprecations/pending-removal-in-future.rst:129 msgid ":class:`typing.Text` (:gh:`92332`)." msgstr "" -#: deprecations/pending-removal-in-future.rst:125 +#: deprecations/pending-removal-in-future.rst:131 +msgid "" +"The internal class ``typing._UnionGenericAlias`` is no longer used to " +"implement :class:`typing.Union`. To preserve compatibility with users using " +"this private class, a compatibility shim will be provided until at least " +"Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "" + +#: deprecations/pending-removal-in-future.rst:136 msgid "" ":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a " "value that is not ``None`` from a test case." msgstr "" -#: deprecations/pending-removal-in-future.rst:128 +#: deprecations/pending-removal-in-future.rst:139 msgid "" ":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` " "instead" msgstr "" -#: deprecations/pending-removal-in-future.rst:130 +#: deprecations/pending-removal-in-future.rst:141 msgid "``splitattr()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:131 +#: deprecations/pending-removal-in-future.rst:142 msgid "``splithost()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:132 +#: deprecations/pending-removal-in-future.rst:143 msgid "``splitnport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:133 +#: deprecations/pending-removal-in-future.rst:144 msgid "``splitpasswd()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:134 +#: deprecations/pending-removal-in-future.rst:145 msgid "``splitport()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:135 +#: deprecations/pending-removal-in-future.rst:146 msgid "``splitquery()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:136 +#: deprecations/pending-removal-in-future.rst:147 msgid "``splittag()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:137 +#: deprecations/pending-removal-in-future.rst:148 msgid "``splittype()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:138 +#: deprecations/pending-removal-in-future.rst:149 msgid "``splituser()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:139 +#: deprecations/pending-removal-in-future.rst:150 msgid "``splitvalue()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:140 +#: deprecations/pending-removal-in-future.rst:151 msgid "``to_bytes()``" msgstr "" -#: deprecations/pending-removal-in-future.rst:142 -msgid "" -":mod:`urllib.request`: :class:`~urllib.request.URLopener` and :class:" -"`~urllib.request.FancyURLopener` style of invoking requests is deprecated. " -"Use newer :func:`~urllib.request.urlopen` functions and methods." -msgstr "" - -#: deprecations/pending-removal-in-future.rst:146 +#: deprecations/pending-removal-in-future.rst:153 msgid "" ":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial " "writes." msgstr "" -#: deprecations/pending-removal-in-future.rst:149 +#: deprecations/pending-removal-in-future.rst:156 msgid "" -":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml." -"etree.ElementTree.Element` is deprecated. In a future release it will always " -"return ``True``. Prefer explicit ``len(elem)`` or ``elem is not None`` tests " -"instead." +":mod:`xml.etree.ElementTree`: Testing the truth value of " +"an :class:`~xml.etree.ElementTree.Element` is deprecated. In a future " +"release it will always return ``True``. Prefer explicit ``len(elem)`` or " +"``elem is not None`` tests instead." msgstr "" -#: deprecations/pending-removal-in-future.rst:154 +#: deprecations/pending-removal-in-future.rst:161 msgid "" -":meth:`zipimport.zipimporter.load_module` is deprecated: use :meth:" -"`~zipimport.zipimporter.exec_module` instead." +":func:`sys._clear_type_cache` is deprecated: " +"use :func:`sys._clear_internal_caches` instead." msgstr "" diff --git a/deprecations/soft-deprecations.po b/deprecations/soft-deprecations.po new file mode 100644 index 000000000..650283562 --- /dev/null +++ b/deprecations/soft-deprecations.po @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: deprecations/soft-deprecations.rst:2 +msgid "Soft deprecations" +msgstr "" + +#: deprecations/soft-deprecations.rst:4 +msgid "There are no plans to remove :term:`soft deprecated` APIs." +msgstr "" + +#: deprecations/soft-deprecations.rst:6 +msgid "" +":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft " +"deprecated` in favor of the new :func:`re.prefixmatch` " +"and :meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate, " +"more explicit names. These are intended to be used to alleviate confusion " +"around what *match* means by following the Zen of Python's *\"Explicit is " +"better than implicit\"* mantra. Most other language regular expression " +"libraries use an API named *match* to mean what Python has always called " +"*search*." +msgstr "" + +#: deprecations/soft-deprecations.rst:15 +msgid "" +"We **do not** plan to remove the older :func:`!match` name, as it has been " +"used in code for over 30 years. Code supporting older versions of Python " +"should continue to use :func:`!match`, while new code should prefer :func:`!" +"prefixmatch`. See :ref:`prefixmatch-vs-match`." +msgstr "" + +#: deprecations/soft-deprecations.rst:20 +msgid "" +"(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade " +"in :gh:`148100`.)" +msgstr "" diff --git a/dict b/dict index 4009fdf8e..17f66a29f 100644 --- a/dict +++ b/dict @@ -107,6 +107,7 @@ journalisés jr. kolams kuchling +mailcap l'allocateur l'indiçage l'itérateur diff --git a/distributing/index.po b/distributing/index.po index b4b9f4bf3..cdf4dbc67 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2021-12-16 02:36+0100\n" "Last-Translator: Fipaddict \n" "Language-Team: FRENCH \n" @@ -105,9 +105,9 @@ msgstr "" #, fuzzy #~ msgid "" #~ ":mod:`distutils` is the original build and distribution system first " -#~ "added to the Python standard library in 1998. While direct use of :mod:" -#~ "`distutils` is being phased out, it still laid the foundation for the " -#~ "current packaging and distribution infrastructure, and it not only " +#~ "added to the Python standard library in 1998. While direct use " +#~ "of :mod:`distutils` is being phased out, it still laid the foundation for " +#~ "the current packaging and distribution infrastructure, and it not only " #~ "remains part of the standard library, but its name lives on in other ways " #~ "(such as the name of the mailing list used to coordinate Python packaging " #~ "standards development)." @@ -124,11 +124,12 @@ msgstr "" #, fuzzy #~ msgid "" #~ "`setuptools`_ is a (largely) drop-in replacement for :mod:`distutils` " -#~ "first published in 2004. Its most notable addition over the unmodified :" -#~ "mod:`distutils` tools was the ability to declare dependencies on other " -#~ "packages. It is currently recommended as a more regularly updated " -#~ "alternative to :mod:`distutils` that offers consistent support for more " -#~ "recent packaging standards across a wide range of Python versions." +#~ "first published in 2004. Its most notable addition over the " +#~ "unmodified :mod:`distutils` tools was the ability to declare dependencies " +#~ "on other packages. It is currently recommended as a more regularly " +#~ "updated alternative to :mod:`distutils` that offers consistent support " +#~ "for more recent packaging standards across a wide range of Python " +#~ "versions." #~ msgstr "" #~ "`setuptools`_, d'abord publié en 2004, est (en grande partie) le " #~ "remplaçant de :mod:`distutils`. La nouveauté la plus notable, au-delà des " @@ -321,8 +322,8 @@ msgstr "" #~ "Packaging User Guide* pour plus d'informations et de recommandations." #~ msgid "" -#~ "`Python Packaging User Guide: Binary Extensions `__" +#~ "`Python Packaging User Guide: Binary Extensions `__" #~ msgstr "" -#~ "`Python Packaging User Guide: Binary Extensions `__" +#~ "`Python Packaging User Guide: Binary Extensions `__" diff --git a/extending/building.po b/extending/building.po index 0fbc41692..c4184dabd 100644 --- a/extending/building.po +++ b/extending/building.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-07-28 22:22+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,84 +20,91 @@ msgid "Building C and C++ Extensions" msgstr "Construire des extensions C et C++" #: extending/building.rst:9 +#, fuzzy msgid "" -"A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, " -"``.pyd`` on Windows), which exports an *initialization function*." +"A C extension for CPython is a shared library (for example, a ``.so`` file " +"on Linux, ``.pyd`` on Windows), which exports an *initialization function*." msgstr "" "Une extension C pour CPython est une bibliothèque partagée (Un ``.so`` sur " "Linux, un ``.pyd`` sur Windows), qui expose une *fonction d'initialisation*." #: extending/building.rst:12 -#, fuzzy -msgid "" -"To be importable, the shared library must be available on :envvar:" -"`PYTHONPATH`, and must be named after the module name, with an appropriate " -"extension. When using setuptools, the correct filename is generated " -"automatically." -msgstr "" -"Pour pouvoir être importée, la bibliothèque partagée doit pourvoir être " -"trouvée dans :envvar:`PYTHONPATH`, et doit porter le nom du module, avec " -"l'extension appropriée. En utilisant *distutils*, le nom est généré " -"automatiquement." +msgid "See :ref:`extension-modules` for details." +msgstr "Voir :ref:`extension-modules` pour plus de détails." -#: extending/building.rst:16 -msgid "The initialization function has the signature:" -msgstr "La fonction d'initialisation doit avoir le prototype :" +#: extending/building.rst:21 +#, fuzzy +msgid "Building C and C++ Extensions with setuptools" +msgstr "Construire les extensions C et C++ avec *setuptools*" -#: extending/building.rst:20 +#: extending/building.rst:24 msgid "" -"It returns either a fully initialized module, or a :c:type:`PyModuleDef` " -"instance. See :ref:`initializing-modules` for details." +"Building, packaging and distributing extension modules is best done with " +"third-party tools, and is out of scope of this document. One suitable tool " +"is Setuptools, whose documentation can be found at https://" +"setuptools.pypa.io/en/latest/setuptools.html." msgstr "" -"Elle doit donner soit un module entièrement initialisé, soit une instance " -"de :c:type:`PyModuleDef`. Voir :ref:`initializing-modules` pour plus de " -"détails." -#: extending/building.rst:25 +#: extending/building.rst:29 msgid "" -"For modules with ASCII-only names, the function must be named " -"``PyInit_``, with ```` replaced by the name of the " -"module. When using :ref:`multi-phase-initialization`, non-ASCII module names " -"are allowed. In this case, the initialization function name is " -"``PyInitU_``, with ```` encoded using Python's " -"*punycode* encoding with hyphens replaced by underscores. In Python::" +"The :mod:`distutils` module, which was included in the standard library " +"until Python 3.12, is now maintained as part of Setuptools." msgstr "" -"Pour les modules dont les noms sont entièrement en ASCII, la fonction doit " -"être nommée ``PyInit_``, dont ```` est remplacé par " -"le nom du module. En utilisant :ref:`multi-phase-initialization`, il est " -"possible d'utiliser des noms de modules comptant des caractères non ASCII. " -"Dans ce cas, le nom de la fonction d'initialisation est " -"``PyInitU_``, où ``modulename`` est encodé avec l'encodage " -"*punyencode* de Python, dont les tirets sont remplacés par des tirets-bas. " -"En Python ça donne ::" - -#: extending/building.rst:39 -msgid "" -"It is possible to export multiple modules from a single shared library by " -"defining multiple initialization functions. However, importing them requires " -"using symbolic links or a custom importer, because by default only the " -"function corresponding to the filename is found. See the *\"Multiple modules " -"in one library\"* section in :pep:`489` for details." -msgstr "" -"Il est possible d'exporter plusieurs modules depuis une seule bibliothèque " -"partagée en définissant plusieurs fonctions d'initialisation. Cependant pour " -"les importer, un lien symbolique doit être créé pour chacun, ou un " -"*importer* personnalisé, puisque par défaut seule la fonction correspondant " -"au nom du fichier est cherchée. Voir le chapitre *\"Multiple modules in one " -"library\"* dans la :pep:`489` pour plus d'informations." - -#: extending/building.rst:52 + #, fuzzy -msgid "Building C and C++ Extensions with setuptools" -msgstr "Construire les extensions C et C++ avec *distutils*" +#~ msgid "" +#~ "To be importable, the shared library must be available " +#~ "on :envvar:`PYTHONPATH`, and must be named after the module name, with an " +#~ "appropriate extension. When using setuptools, the correct filename is " +#~ "generated automatically." +#~ msgstr "" +#~ "Pour pouvoir être importée, la bibliothèque partagée doit pourvoir être " +#~ "trouvée dans :envvar:`PYTHONPATH`, et doit porter le nom du module, avec " +#~ "l'extension appropriée. En utilisant *distutils*, le nom est généré " +#~ "automatiquement." -#: extending/building.rst:54 -msgid "" -"Python 3.12 and newer no longer come with distutils. Please refer to the " -"``setuptools`` documentation at https://setuptools.readthedocs.io/en/latest/" -"setuptools.html to learn more about how build and distribute C/C++ " -"extensions with setuptools." -msgstr "" +#~ msgid "The initialization function has the signature:" +#~ msgstr "La fonction d'initialisation doit avoir le prototype :" + +#~ msgid "" +#~ "It returns either a fully initialized module, or a :c:type:`PyModuleDef` " +#~ "instance. See :ref:`initializing-modules` for details." +#~ msgstr "" +#~ "Elle doit donner soit un module entièrement initialisé, soit une instance " +#~ "de :c:type:`PyModuleDef`. Voir :ref:`initializing-modules` pour plus de " +#~ "détails." + +#~ msgid "" +#~ "For modules with ASCII-only names, the function must be named " +#~ "``PyInit_``, with ```` replaced by the name of " +#~ "the module. When using :ref:`multi-phase-initialization`, non-ASCII " +#~ "module names are allowed. In this case, the initialization function name " +#~ "is ``PyInitU_``, with ```` encoded using Python's " +#~ "*punycode* encoding with hyphens replaced by underscores. In Python::" +#~ msgstr "" +#~ "Pour les modules dont les noms sont entièrement en ASCII, la fonction " +#~ "doit être nommée ``PyInit_``, dont ```` est " +#~ "remplacé par le nom du module. En utilisant :ref:`multi-phase-" +#~ "initialization`, il est possible d'utiliser des noms de modules comptant " +#~ "des caractères non ASCII. Dans ce cas, le nom de la fonction " +#~ "d'initialisation est ``PyInitU_``, où ``modulename`` est " +#~ "encodé avec l'encodage *punyencode* de Python, dont les tirets sont " +#~ "remplacés par des tirets-bas. En Python ça donne ::" + +#~ msgid "" +#~ "It is possible to export multiple modules from a single shared library by " +#~ "defining multiple initialization functions. However, importing them " +#~ "requires using symbolic links or a custom importer, because by default " +#~ "only the function corresponding to the filename is found. See the " +#~ "*\"Multiple modules in one library\"* section in :pep:`489` for details." +#~ msgstr "" +#~ "Il est possible d'exporter plusieurs modules depuis une seule " +#~ "bibliothèque partagée en définissant plusieurs fonctions " +#~ "d'initialisation. Cependant pour les importer, un lien symbolique doit " +#~ "être créé pour chacun, ou un *importer* personnalisé, puisque par défaut " +#~ "seule la fonction correspondant au nom du fichier est cherchée. Voir le " +#~ "chapitre *\"Multiple modules in one library\"* dans la :pep:`489` pour " +#~ "plus d'informations." #~ msgid "" #~ "Extension modules can be built using distutils, which is included in " @@ -155,17 +162,18 @@ msgstr "" #~ "It is common to pre-compute arguments to :func:`setup`, to better " #~ "structure the driver script. In the example above, the ``ext_modules`` " #~ "argument to :func:`~distutils.core.setup` is a list of extension modules, " -#~ "each of which is an instance of the :class:`~distutils.extension." -#~ "Extension`. In the example, the instance defines an extension named " -#~ "``demo`` which is build by compiling a single source file, :file:`demo.c`." +#~ "each of which is an instance of " +#~ "the :class:`~distutils.extension.Extension`. In the example, the instance " +#~ "defines an extension named ``demo`` which is build by compiling a single " +#~ "source file, :file:`demo.c`." #~ msgstr "" -#~ "Il est classique de pré-calculer les arguments à la fonction :func:" -#~ "`setup`, pour plus de lisibilité. Dans l'exemple ci-dessus, l'argument " -#~ "``ext_modules`` à :func:`~distutils.core.setup` est une liste de modules " -#~ "d'extension, chacun est une instance de la classe :class:`~distutils." -#~ "extension.Extension`. Dans l'exemple, l'instance définit une extension " -#~ "nommée ``demo`` construite par la compilation d'un seul fichier source :" -#~ "file:`demo.c`." +#~ "Il est classique de pré-calculer les arguments à la " +#~ "fonction :func:`setup`, pour plus de lisibilité. Dans l'exemple ci-" +#~ "dessus, l'argument ``ext_modules`` à :func:`~distutils.core.setup` est " +#~ "une liste de modules d'extension, chacun est une instance de la " +#~ "classe :class:`~distutils.extension.Extension`. Dans l'exemple, " +#~ "l'instance définit une extension nommée ``demo`` construite par la " +#~ "compilation d'un seul fichier source :file:`demo.c`." #~ msgid "" #~ "In many cases, building an extension is more complex, since additional " @@ -226,12 +234,12 @@ msgstr "" #~ msgid "" #~ "In some cases, additional files need to be included in a source " -#~ "distribution; this is done through a :file:`MANIFEST.in` file; see :ref:" -#~ "`manifest` for details." +#~ "distribution; this is done through a :file:`MANIFEST.in` file; " +#~ "see :ref:`manifest` for details." #~ msgstr "" #~ "Dans certains cas, des fichiers supplémentaires doivent être inclus dans " -#~ "une distribution source : c'est possible via un fichier :file:`MANIFEST." -#~ "in`, voir :ref:`manifest` pour les détails." +#~ "une distribution source : c'est possible via un " +#~ "fichier :file:`MANIFEST.in`, voir :ref:`manifest` pour les détails." #~ msgid "" #~ "If the source distribution has been built successfully, maintainers can " diff --git a/extending/embedding.po b/extending/embedding.po index 0ac774831..e51e4684d 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-07-28 22:36+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -59,16 +59,16 @@ msgstr "" msgid "" "So if you are embedding Python, you are providing your own main program. " "One of the things this main program has to do is initialize the Python " -"interpreter. At the very least, you have to call the function :c:func:" -"`Py_Initialize`. There are optional calls to pass command line arguments to " -"Python. Then later you can call the interpreter from any part of the " -"application." +"interpreter. At the very least, you have to call the " +"function :c:func:`Py_Initialize`. There are optional calls to pass command " +"line arguments to Python. Then later you can call the interpreter from any " +"part of the application." msgstr "" "En intégrant Python, vous fournissez le programme principal. L'une de ses " -"tâches sera d'initialiser l'interpréteur. Au minimum vous devrez appeler :c:" -"func:`Py_Initialize`. Il est possible, avec quelques appels supplémentaires, " -"de passer des options à Python. Ensuite vous pourrez appeler l'interpréteur " -"depuis n'importe quelle partie de votre programme." +"tâches sera d'initialiser l'interpréteur. Au minimum vous devrez " +"appeler :c:func:`Py_Initialize`. Il est possible, avec quelques appels " +"supplémentaires, de passer des options à Python. Ensuite vous pourrez " +"appeler l'interpréteur depuis n'importe quelle partie de votre programme." #: extending/embedding.rst:32 msgid "" @@ -125,29 +125,29 @@ msgstr "" #: extending/embedding.rst:97 #, fuzzy msgid "" -"Setting :c:member:`PyConfig.program_name` should be called before :c:func:" -"`Py_InitializeFromConfig` to inform the interpreter about paths to Python " -"run-time libraries. Next, the Python interpreter is initialized with :c:" -"func:`Py_Initialize`, followed by the execution of a hard-coded Python " -"script that prints the date and time. Afterwards, the :c:func:" -"`Py_FinalizeEx` call shuts the interpreter down, followed by the end of the " -"program. In a real program, you may want to get the Python script from " -"another source, perhaps a text-editor routine, a file, or a database. " -"Getting the Python code from a file can better be done by using the :c:func:" -"`PyRun_SimpleFile` function, which saves you the trouble of allocating " -"memory space and loading the file contents." +"Setting :c:member:`PyConfig.program_name` should be called " +"before :c:func:`Py_InitializeFromConfig` to inform the interpreter about " +"paths to Python run-time libraries. Next, the Python interpreter is " +"initialized with :c:func:`Py_Initialize`, followed by the execution of a " +"hard-coded Python script that prints the date and time. Afterwards, " +"the :c:func:`Py_FinalizeEx` call shuts the interpreter down, followed by the " +"end of the program. In a real program, you may want to get the Python " +"script from another source, perhaps a text-editor routine, a file, or a " +"database. Getting the Python code from a file can better be done by using " +"the :c:func:`PyRun_SimpleFile` function, which saves you the trouble of " +"allocating memory space and loading the file contents." msgstr "" "C'est la fonction :c:func:`Py_SetProgramName` qui devrait être appelée en " "premier, avant :c:func:`Py_Initialize`, afin d'informer l'interpréteur des " -"chemins vers ses bibliothèques. Ensuite l'interpréteur est initialisé par :c:" -"func:`Py_Initialize`, suivi de l'exécution de Python codé en dur affichant " -"la date et l'heure, puis, l'appel à :c:func:`Py_FinalizeEx` éteint " +"chemins vers ses bibliothèques. Ensuite l'interpréteur est initialisé " +"par :c:func:`Py_Initialize`, suivi de l'exécution de Python codé en dur " +"affichant la date et l'heure, puis, l'appel à :c:func:`Py_FinalizeEx` éteint " "l'interpréteur, engendrant ainsi la fin du programme. Dans un vrai " "programme, vous pourriez vouloir lire le script Python depuis une autre " "source, peut être depuis un éditeur de texte, un fichier, ou une base de " -"donnée. Récupérer du code Python depuis un fichier se fait via :c:func:" -"`PyRun_SimplFile`, qui vous économise le travail d'allouer de la mémoire et " -"de charger le contenu du fichier." +"donnée. Récupérer du code Python depuis un fichier se fait " +"via :c:func:`PyRun_SimplFile`, qui vous économise le travail d'allouer de la " +"mémoire et de charger le contenu du fichier." #: extending/embedding.rst:112 msgid "Beyond Very High Level Embedding: An overview" @@ -287,30 +287,31 @@ msgstr "" "Python débute par ::" #: extending/embedding.rst:197 +#, fuzzy msgid "" -"After initializing the interpreter, the script is loaded using :c:func:" -"`PyImport_Import`. This routine needs a Python string as its argument, " -"which is constructed using the :c:func:`PyUnicode_FromString` data " -"conversion routine. ::" +"After initializing the interpreter, the script is loaded " +"using :c:func:`PyImport_Import`. This routine needs a Python string as its " +"argument, which is constructed using the :c:func:`PyUnicode_DecodeFSDefault` " +"data conversion routine. ::" msgstr "" -"Après avoir initialisé l'interpréteur, le script est chargé en utilisant :c:" -"func:`PyImport_Import`. Cette fonction prend une chaîne Python pour " -"argument, elle-même construite en utilisant la fonction de conversion :c:" -"func:`PyUnicode_FromString`. ::" +"Après avoir initialisé l'interpréteur, le script est chargé en " +"utilisant :c:func:`PyImport_Import`. Cette fonction prend une chaîne Python " +"pour argument, elle-même construite en utilisant la fonction de " +"conversion :c:func:`PyUnicode_FromString`. ::" #: extending/embedding.rst:210 msgid "" -"Once the script is loaded, the name we're looking for is retrieved using :c:" -"func:`PyObject_GetAttrString`. If the name exists, and the object returned " -"is callable, you can safely assume that it is a function. The program then " -"proceeds by constructing a tuple of arguments as normal. The call to the " -"Python function is then made with::" +"Once the script is loaded, the name we're looking for is retrieved " +"using :c:func:`PyObject_GetAttrString`. If the name exists, and the object " +"returned is callable, you can safely assume that it is a function. The " +"program then proceeds by constructing a tuple of arguments as normal. The " +"call to the Python function is then made with::" msgstr "" -"Une fois le script chargé, le nom recherché est obtenu en utilisant :c:func:" -"`PyObject_GetAttrString`. Si le nom existe, et que l'objet récupéré peut " -"être appelé, vous pouvez présumer sans risque que c'est une fonction. Le " -"programme continue, classiquement, par la construction de *n*-uplet " -"d'arguments. L'appel à la fonction Python est alors effectué avec ::" +"Une fois le script chargé, le nom recherché est obtenu en " +"utilisant :c:func:`PyObject_GetAttrString`. Si le nom existe, et que l'objet " +"récupéré peut être appelé, vous pouvez présumer sans risque que c'est une " +"fonction. Le programme continue, classiquement, par la construction de *n*-" +"uplet d'arguments. L'appel à la fonction Python est alors effectué avec ::" #: extending/embedding.rst:218 msgid "" @@ -347,27 +348,27 @@ msgstr "" "à Python, tout comme vous écririez une extension Python normale. Par " "exemple ::" -#: extending/embedding.rst:265 +#: extending/embedding.rst:267 msgid "" "Insert the above code just above the :c:func:`main` function. Also, insert " "the following two statements before the call to :c:func:`Py_Initialize`::" msgstr "" "Insérez le code ci-dessus juste avant la fonction :c:func:`main`. Ajoutez " -"aussi les deux instructions suivantes avant l'appel à :c:func:" -"`Py_Initialize` ::" +"aussi les deux instructions suivantes avant l'appel " +"à :c:func:`Py_Initialize` ::" -#: extending/embedding.rst:271 +#: extending/embedding.rst:273 #, fuzzy msgid "" "These two lines initialize the ``numargs`` variable, and make the :func:`!" "emb.numargs` function accessible to the embedded Python interpreter. With " "these extensions, the Python script can do things like" msgstr "" -"Ces deux lignes initialisent la variable ``numarg``, et rend la fonction :" -"func:`emb.numargs` accessible à l'interpréteur intégré. Avec ces ajouts, le " -"script Python petit maintenant faire des choses comme" +"Ces deux lignes initialisent la variable ``numarg``, et rend la " +"fonction :func:`emb.numargs` accessible à l'interpréteur intégré. Avec ces " +"ajouts, le script Python petit maintenant faire des choses comme" -#: extending/embedding.rst:280 +#: extending/embedding.rst:282 msgid "" "In a real application, the methods will expose an API of the application to " "Python." @@ -375,11 +376,11 @@ msgstr "" "Dans un cas réel, les méthodes exposeraient une API de l'application à " "Python." -#: extending/embedding.rst:290 +#: extending/embedding.rst:292 msgid "Embedding Python in C++" msgstr "Intégrer Python dans du C++" -#: extending/embedding.rst:292 +#: extending/embedding.rst:294 msgid "" "It is also possible to embed Python in a C++ program; precisely how this is " "done will depend on the details of the C++ system used; in general you will " @@ -393,11 +394,11 @@ msgstr "" "compilateur C++ pour compiler et lier votre programme. Il n'y a pas besoin " "de recompiler Python en utilisant C++." -#: extending/embedding.rst:301 +#: extending/embedding.rst:303 msgid "Compiling and Linking under Unix-like systems" msgstr "Compiler et Lier en environnement Unix ou similaire" -#: extending/embedding.rst:303 +#: extending/embedding.rst:305 msgid "" "It is not necessarily trivial to find the right flags to pass to your " "compiler (and linker) in order to embed the Python interpreter into your " @@ -409,10 +410,10 @@ msgstr "" "Python ayant besoin de charger des extensions sous forme de bibliothèques " "dynamiques en C (des :file:`.so`) pour se lier avec." -#: extending/embedding.rst:309 +#: extending/embedding.rst:311 msgid "" -"To find out the required compiler and linker flags, you can execute the :" -"file:`python{X.Y}-config` script which is generated as part of the " +"To find out the required compiler and linker flags, you can execute " +"the :file:`python{X.Y}-config` script which is generated as part of the " "installation process (a :file:`python3-config` script may also be " "available). This script has several options, of which the following will be " "directly useful to you:" @@ -422,7 +423,7 @@ msgstr "" "(un script :file:`python3-config` peut aussi être disponible). Ce script a " "quelques options, celles-ci vous seront utiles :" -#: extending/embedding.rst:315 +#: extending/embedding.rst:317 msgid "" "``pythonX.Y-config --cflags`` will give you the recommended flags when " "compiling:" @@ -430,7 +431,7 @@ msgstr "" "``pythonX.Y-config --cflags`` vous donnera les options recommandées pour " "compiler :" -#: extending/embedding.rst:323 +#: extending/embedding.rst:325 msgid "" "``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " "when linking:" @@ -438,7 +439,7 @@ msgstr "" "``pythonX.Y-config --ldflags --embed`` vous donnera les drapeaux recommandés " "lors de l'édition de lien :" -#: extending/embedding.rst:332 +#: extending/embedding.rst:334 msgid "" "To avoid confusion between several Python installations (and especially " "between the system Python and your own compiled Python), it is recommended " @@ -450,23 +451,23 @@ msgstr "" "recommandé d'utiliser un chemin absolu vers :file:`python{X.Y}-config`, " "comme dans l'exemple précédent." -#: extending/embedding.rst:337 +#: extending/embedding.rst:339 msgid "" "If this procedure doesn't work for you (it is not guaranteed to work for all " "Unix-like platforms; however, we welcome :ref:`bug reports `) you will have to read your system's documentation about dynamic " -"linking and/or examine Python's :file:`Makefile` (use :func:`sysconfig." -"get_makefile_filename` to find its location) and compilation options. In " -"this case, the :mod:`sysconfig` module is a useful tool to programmatically " -"extract the configuration values that you will want to combine together. " -"For example:" +"linking and/or examine Python's :file:`Makefile` " +"(use :func:`sysconfig.get_makefile_filename` to find its location) and " +"compilation options. In this case, the :mod:`sysconfig` module is a useful " +"tool to programmatically extract the configuration values that you will want " +"to combine together. For example:" msgstr "" "Si cette procédure ne fonctionne pas pour vous (il n'est pas garanti qu'elle " "fonctionne pour toutes les plateformes Unix, mais nous traiteront volontiers " "les :ref:`rapports de bugs `), vous devrez lire la " "documentation de votre système sur la liaison dynamique (*dynamic linking*) " -"et / ou examiner le :file:`Makefile` de Python (utilisez :func:`sysconfig." -"get_makefile_filename` pour trouver son emplacement) et les options de " -"compilation. Dans ce cas, le module :mod:`sysconfig` est un outil utile pour " -"extraire automatiquement les valeurs de configuration que vous voudrez " -"combiner ensemble. Par exemple :" +"et / ou examiner le :file:`Makefile` de Python " +"(utilisez :func:`sysconfig.get_makefile_filename` pour trouver son " +"emplacement) et les options de compilation. Dans ce cas, le " +"module :mod:`sysconfig` est un outil utile pour extraire automatiquement les " +"valeurs de configuration que vous voudrez combiner ensemble. Par exemple :" diff --git a/extending/extending.po b/extending/extending.po index 8f7969014..a827799ba 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-11-26 10:23+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -16,221 +16,23 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: extending/extending.rst:8 -msgid "Extending Python with C or C++" -msgstr "Étendre Python en C ou C++" - -#: extending/extending.rst:10 -msgid "" -"It is quite easy to add new built-in modules to Python, if you know how to " -"program in C. Such :dfn:`extension modules` can do two things that can't be " -"done directly in Python: they can implement new built-in object types, and " -"they can call C library functions and system calls." +msgid "Using the C API: Assorted topics" msgstr "" -"Il est relativement facile d'ajouter de nouveaux modules à Python, si vous " -"savez programmer en C. Ces :dfn:`modules d'extension` permettent deux choses " -"qui ne sont pas possibles directement en Python : ils peuvent définir de " -"nouveaux types natifs et peuvent appeler des fonctions de bibliothèques C ou " -"faire des appels systèmes." -#: extending/extending.rst:15 -msgid "" -"To support extensions, the Python API (Application Programmers Interface) " -"defines a set of functions, macros and variables that provide access to most " -"aspects of the Python run-time system. The Python API is incorporated in a " -"C source file by including the header ``\"Python.h\"``." -msgstr "" -"Pour gérer les extensions, l'API Python (*Application Programmer Interface*) " -"définit un ensemble de fonctions, macros et variables qui donnent accès à la " -"plupart des aspects du système d'exécution de Python. L'API Python est " -"incorporée dans un fichier source C en incluant l'en-tête ``Python.h``." - -#: extending/extending.rst:20 +#: extending/extending.rst:10 msgid "" -"The compilation of an extension module depends on its intended use as well " -"as on your system setup; details are given in later chapters." +"The :ref:`tutorial ` walked you through creating a C " +"API extension module, but left many areas unexplained. This document looks " +"at several concepts that you'll need to learn in order to write more complex " +"extensions." msgstr "" -"La compilation d'un module d'extension dépend de l'usage prévu et de la " -"configuration du système, plus de détails peuvent être trouvés dans les " -"chapitres suivants." - -# suit un : -#: extending/extending.rst:25 -msgid "" -"The C extension interface is specific to CPython, and extension modules do " -"not work on other Python implementations. In many cases, it is possible to " -"avoid writing C extensions and preserve portability to other " -"implementations. For example, if your use case is calling C library " -"functions or system calls, you should consider using the :mod:`ctypes` " -"module or the `cffi `_ library rather than " -"writing custom C code. These modules let you write Python code to interface " -"with C code and are more portable between implementations of Python than " -"writing and compiling a C extension module." -msgstr "" -"l'interface d'extension C est spécifique à *CPython*, et les modules " -"d'extension ne fonctionnent pas sur les autres implémentations de Python. " -"Dans de nombreux cas, il est possible d'éviter la rédaction des extensions " -"en C et ainsi préserver la portabilité vers d'autres implémentations. Par " -"exemple, si vous devez appeler une fonction de la bibliothèque C ou faire un " -"appel système, vous devriez envisager d'utiliser le module :mod:`ctypes` ou " -"d'utiliser la bibliothèque `cffi `_ plutôt que " -"d'écrire du code C sur mesure. Ces modules vous permettent d'écrire du code " -"Python s'interfaçant avec le code C et sont plus portables entre les " -"implémentations de Python que l'écriture et la compilation d'une d'extension " -"C." - -#: extending/extending.rst:40 -msgid "A Simple Example" -msgstr "Un exemple simple" - -#: extending/extending.rst:42 -msgid "" -"Let's create an extension module called ``spam`` (the favorite food of Monty " -"Python fans...) and let's say we want to create a Python interface to the C " -"library function :c:func:`system` [#]_. This function takes a null-" -"terminated character string as argument and returns an integer. We want " -"this function to be callable from Python as follows:" -msgstr "" -"Créons un module d'extension appelé ``spam`` (la nourriture préférée de fans " -"des *Monty Python*) et disons que nous voulons créer une interface Python à " -"la fonction de la bibliothèque C :c:func:`system` [#]_. Cette fonction prend " -"une chaîne de caractères à terminaison nulle comme argument et renvoie un " -"entier. Nous voulons que cette fonction soit appelable à partir de Python " -"comme suit :" - -#: extending/extending.rst:53 -msgid "" -"Begin by creating a file :file:`spammodule.c`. (Historically, if a module " -"is called ``spam``, the C file containing its implementation is called :file:" -"`spammodule.c`; if the module name is very long, like ``spammify``, the " -"module name can be just :file:`spammify.c`.)" -msgstr "" -"Commençons par créer un fichier :file:`spammodule.c` (historiquement, si un " -"module se nomme ``spam``, le fichier C contenant son implémentation est " -"appelé :file:`spammodule.c` ; si le nom du module est très long, comme " -"``spammify``, le nom du module peut être juste :file:`spammify.c`)." - -#: extending/extending.rst:58 -msgid "The first two lines of our file can be::" -msgstr "Les deux premières lignes de notre fichier peuvent être ::" - -#: extending/extending.rst:63 -msgid "" -"which pulls in the Python API (you can add a comment describing the purpose " -"of the module and a copyright notice if you like)." -msgstr "" -"qui récupère l'API Python (vous pouvez ajouter un commentaire décrivant le " -"but du module et un avis de droit d'auteur si vous le souhaitez)." -# suit un : -#: extending/extending.rst:68 -msgid "" -"Since Python may define some pre-processor definitions which affect the " -"standard headers on some systems, you *must* include :file:`Python.h` before " -"any standard headers are included." -msgstr "" -"il est possible que Python déclare certaines définitions pré-processeur qui " -"affectent les têtes standards sur certains systèmes, vous *devez* donc " -"inclure :file:`Python.h` avant les en-têtes standards." - -#: extending/extending.rst:72 -msgid "" -"``#define PY_SSIZE_T_CLEAN`` was used to indicate that ``Py_ssize_t`` should " -"be used in some APIs instead of ``int``. It is not necessary since Python " -"3.13, but we keep it here for backward compatibility. See :ref:`arg-parsing-" -"string-and-buffers` for a description of this macro." -msgstr "" - -#: extending/extending.rst:77 -msgid "" -"All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` " -"or ``PY``, except those defined in standard header files. For convenience, " -"and since they are used extensively by the Python interpreter, ``\"Python." -"h\"`` includes a few standard header files: ````, ````, " -"````, and ````. If the latter header file does not exist " -"on your system, it declares the functions :c:func:`malloc`, :c:func:`free` " -"and :c:func:`realloc` directly." -msgstr "" -"Tous les symboles exposés par :file:`Python.h` sont préfixés de ``Py`` ou " -"``PY``, sauf ceux qui sont définis dans les en-têtes standards. Pour le " -"confort, et comme ils sont largement utilisés par l'interpréteur Python, " -"``\"Python.h\"`` inclut lui-même quelques en-têtes standards : ````, ````, ```` et ````. Si ce dernier " -"n'existe pas sur votre système, il déclare les fonctions :c:func:`malloc`, :" -"c:func:`free` et :c:func:`realloc` directement." - -#: extending/extending.rst:85 -msgid "" -"The next thing we add to our module file is the C function that will be " -"called when the Python expression ``spam.system(string)`` is evaluated " -"(we'll see shortly how it ends up being called)::" -msgstr "" -"La prochaine chose que nous ajoutons à notre fichier de module est la " -"fonction C qui sera appelée lorsque l'expression Python ``spam." -"system(chaîne)`` sera évaluée (nous verrons bientôt comment elle finit par " -"être appelée) ::" - -#: extending/extending.rst:101 -msgid "" -"There is a straightforward translation from the argument list in Python (for " -"example, the single expression ``\"ls -l\"``) to the arguments passed to the " -"C function. The C function always has two arguments, conventionally named " -"*self* and *args*." -msgstr "" -"Il y a une correspondance directe de la liste des arguments en Python (par " -"exemple, l'expression ``\"ls -l\"``) aux arguments passés à la fonction C. " -"La fonction C a toujours deux arguments, appelés par convention *self* et " -"*args*." - -#: extending/extending.rst:106 -msgid "" -"The *self* argument points to the module object for module-level functions; " -"for a method it would point to the object instance." -msgstr "" -"Pour les fonctions au niveau du module, l'argument *self* pointe sur l'objet " -"module, pour une méthode, il pointe sur l'instance de l'objet." - -#: extending/extending.rst:109 -msgid "" -"The *args* argument will be a pointer to a Python tuple object containing " -"the arguments. Each item of the tuple corresponds to an argument in the " -"call's argument list. The arguments are Python objects --- in order to do " -"anything with them in our C function we have to convert them to C values. " -"The function :c:func:`PyArg_ParseTuple` in the Python API checks the " -"argument types and converts them to C values. It uses a template string to " -"determine the required types of the arguments as well as the types of the C " -"variables into which to store the converted values. More about this later." -msgstr "" -"L'argument *args* sera un pointeur vers un *n*-uplet Python contenant les " -"arguments. Chaque élément du *n*-uplet correspond à un argument dans la " -"liste des arguments de l'appel. Les arguments sont des objets Python, afin " -"d'en faire quelque chose dans notre fonction C, nous devons les convertir en " -"valeurs C. La fonction :c:func:`PyArg_ParseTuple` de l'API Python vérifie " -"les types des arguments et les convertit en valeurs C. Elle utilise un " -"modèle sous forme de chaîne pour déterminer les types requis des arguments " -"ainsi que les types de variables C dans lequel stocker les valeurs " -"converties. Nous approfondirons ceci plus tard." - -#: extending/extending.rst:118 -msgid "" -":c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have the " -"right type and its components have been stored in the variables whose " -"addresses are passed. It returns false (zero) if an invalid argument list " -"was passed. In the latter case it also raises an appropriate exception so " -"the calling function can return ``NULL`` immediately (as we saw in the " -"example)." -msgstr "" -":c:func:`PyArg_ParseTuple` renvoie vrai (pas zéro) si tous les arguments ont " -"le bon type et que ses composants ont été stockés dans les variables dont " -"les adresses ont été données en entrée. Elle renvoie faux (zéro) si une " -"liste d'arguments invalide a été passée. Dans ce dernier cas, elle lève " -"également une exception appropriée de sorte que la fonction d'appel puisse " -"renvoyer ``NULL`` immédiatement (comme nous l'avons vu dans l'exemple)." - -#: extending/extending.rst:128 -msgid "Intermezzo: Errors and Exceptions" +#: extending/extending.rst:19 +#, fuzzy +msgid "Errors and Exceptions" msgstr "Intermezzo : les erreurs et les exceptions" -#: extending/extending.rst:130 +#: extending/extending.rst:21 msgid "" "An important convention throughout the Python interpreter is the following: " "when a function fails, it should set an exception condition and return an " @@ -251,7 +53,7 @@ msgstr "" "d'exception et d'un objet de trace. Il est important de les connaître pour " "comprendre comment les erreurs sont transmises." -#: extending/extending.rst:139 +#: extending/extending.rst:30 msgid "" "The Python API defines a number of functions to set various types of " "exceptions." @@ -259,7 +61,7 @@ msgstr "" "L'API Python définit un certain nombre de fonctions pour créer différents " "types d'exceptions." -#: extending/extending.rst:141 +#: extending/extending.rst:32 msgid "" "The most common one is :c:func:`PyErr_SetString`. Its arguments are an " "exception object and a C string. The exception object is usually a " @@ -273,28 +75,28 @@ msgstr "" "cause de l'erreur et est convertie en une chaîne Python puis stockée en tant " "que « valeur associée » à l'exception." -#: extending/extending.rst:147 +#: extending/extending.rst:38 msgid "" "Another useful function is :c:func:`PyErr_SetFromErrno`, which only takes an " "exception argument and constructs the associated value by inspection of the " -"global variable :c:data:`errno`. The most general function is :c:func:" -"`PyErr_SetObject`, which takes two object arguments, the exception and its " -"associated value. You don't need to :c:func:`Py_INCREF` the objects passed " -"to any of these functions." +"global variable :c:data:`errno`. The most general function " +"is :c:func:`PyErr_SetObject`, which takes two object arguments, the " +"exception and its associated value. You don't need to :c:func:`Py_INCREF` " +"the objects passed to any of these functions." msgstr "" "Une autre fonction utile est :c:func:`PyErr_SetFromErrno`, qui construit une " "exception à partir de la valeur de la variable globale :c:data:`errno`. La " "fonction la plus générale est :c:func:`PyErr_SetObject`, qui prend deux " -"arguments : l'exception et sa valeur associée. Vous ne devez pas appliquer :" -"c:func:`Py_INCREF` aux objets transmis à ces fonctions." +"arguments : l'exception et sa valeur associée. Vous ne devez pas " +"appliquer :c:func:`Py_INCREF` aux objets transmis à ces fonctions." -#: extending/extending.rst:154 +#: extending/extending.rst:45 msgid "" -"You can test non-destructively whether an exception has been set with :c:" -"func:`PyErr_Occurred`. This returns the current exception object, or " -"``NULL`` if no exception has occurred. You normally don't need to call :c:" -"func:`PyErr_Occurred` to see whether an error occurred in a function call, " -"since you should be able to tell from the return value." +"You can test non-destructively whether an exception has been set " +"with :c:func:`PyErr_Occurred`. This returns the current exception object, " +"or ``NULL`` if no exception has occurred. You normally don't need to " +"call :c:func:`PyErr_Occurred` to see whether an error occurred in a function " +"call, since you should be able to tell from the return value." msgstr "" "Vous pouvez tester de manière non destructive si une exception a été levée " "avec :c:func:`PyErr_Occurred`. Cela renvoie l'objet exception actuel, ou " @@ -303,7 +105,7 @@ msgstr "" "survenue durant l'appel d'une fonction, puisque vous devriez être en mesure " "de le déterminer à partir de la valeur renvoyée." -#: extending/extending.rst:160 +#: extending/extending.rst:51 msgid "" "When a function *f* that calls another function *g* detects that the latter " "fails, *f* should itself return an error value (usually ``NULL`` or " @@ -327,7 +129,7 @@ msgstr "" "code en cours d'exécution et essaie de trouver un gestionnaire d'exception " "spécifié par le développeur Python." -#: extending/extending.rst:170 +#: extending/extending.rst:61 msgid "" "(There are situations where a module can actually give a more detailed error " "message by calling another ``PyErr_*`` function, and in such cases it is " @@ -342,7 +144,7 @@ msgstr "" "cause de l'erreur : la plupart des opérations peuvent échouer pour tout un " "tas de raisons.)" -#: extending/extending.rst:176 +#: extending/extending.rst:67 msgid "" "To ignore an exception set by a function call that failed, the exception " "condition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The " @@ -351,28 +153,29 @@ msgid "" "itself (possibly by trying something else, or pretending nothing went wrong)." msgstr "" "Pour ignorer une exception qui aurait été émise lors d'un appel de fonction " -"qui a échoué, l'exception doit être retirée explicitement en appelant :c:" -"func:`PyErr_Clear`. Le seul cas pour lequel du code C devrait appeler :c:" -"func:`PyErr_Clear` est lorsqu'il ne veut pas passer l'erreur à " +"qui a échoué, l'exception doit être retirée explicitement en " +"appelant :c:func:`PyErr_Clear`. Le seul cas pour lequel du code C devrait " +"appeler :c:func:`PyErr_Clear` est lorsqu'il ne veut pas passer l'erreur à " "l'interpréteur, mais souhaite la gérer lui-même (peut-être en essayant " "quelque chose d'autre, ou en prétendant que rien n'a mal tourné)." -#: extending/extending.rst:182 +#: extending/extending.rst:73 msgid "" "Every failing :c:func:`malloc` call must be turned into an exception --- the " -"direct caller of :c:func:`malloc` (or :c:func:`realloc`) must call :c:func:" -"`PyErr_NoMemory` and return a failure indicator itself. All the object-" -"creating functions (for example, :c:func:`PyLong_FromLong`) already do this, " -"so this note is only relevant to those who call :c:func:`malloc` directly." +"direct caller of :c:func:`malloc` (or :c:func:`realloc`) must " +"call :c:func:`PyErr_NoMemory` and return a failure indicator itself. All " +"the object-creating functions (for example, :c:func:`PyLong_FromLong`) " +"already do this, so this note is only relevant to those who " +"call :c:func:`malloc` directly." msgstr "" "Chaque échec de :c:func:`malloc` doit être transformé en une exception, " -"l'appelant direct de :c:func:`malloc` (ou :c:func:`realloc`) doit appeler :c:" -"func:`PyErr_NoMemory` et prendre l'initiative de renvoyer une valeur " -"d'erreur. Toutes les fonctions construisant des objets (tels que :c:func:" -"`PyLong_FromLong`) le font déjà, donc cette note ne concerne que ceux qui " -"appellent :c:func:`malloc` directement." +"l'appelant direct de :c:func:`malloc` (ou :c:func:`realloc`) doit " +"appeler :c:func:`PyErr_NoMemory` et prendre l'initiative de renvoyer une " +"valeur d'erreur. Toutes les fonctions construisant des objets (tels " +"que :c:func:`PyLong_FromLong`) le font déjà, donc cette note ne concerne que " +"ceux qui appellent :c:func:`malloc` directement." -#: extending/extending.rst:188 +#: extending/extending.rst:79 msgid "" "Also note that, with the important exception of :c:func:`PyArg_ParseTuple` " "and friends, functions that return an integer status usually return a " @@ -384,59 +187,72 @@ msgstr "" "donnent généralement une valeur positive ou zéro en cas de succès et ``-1`` " "en cas d'échec, comme les appels du système Unix." -#: extending/extending.rst:192 +#: extending/extending.rst:83 msgid "" -"Finally, be careful to clean up garbage (by making :c:func:`Py_XDECREF` or :" -"c:func:`Py_DECREF` calls for objects you have already created) when you " +"Finally, be careful to clean up garbage (by making :c:func:`Py_XDECREF` " +"or :c:func:`Py_DECREF` calls for objects you have already created) when you " "return an error indicator!" msgstr "" "Enfin, lorsque vous renvoyez un code d'erreur, n'oubliez pas faire un brin " "de nettoyage (en appelant :c:func:`Py_XDECREF` ou :c:func:`Py_DECREF` avec " "les objets que vous auriez déjà créés) !" -#: extending/extending.rst:196 +#: extending/extending.rst:87 #, fuzzy msgid "" "The choice of which exception to raise is entirely yours. There are " "predeclared C objects corresponding to all built-in Python exceptions, such " "as :c:data:`PyExc_ZeroDivisionError`, which you can use directly. Of course, " "you should choose exceptions wisely --- don't use :c:data:`PyExc_TypeError` " -"to mean that a file couldn't be opened (that should probably be :c:data:" -"`PyExc_OSError`). If something's wrong with the argument list, the :c:func:" -"`PyArg_ParseTuple` function usually raises :c:data:`PyExc_TypeError`. If " -"you have an argument whose value must be in a particular range or must " -"satisfy other conditions, :c:data:`PyExc_ValueError` is appropriate." +"to mean that a file couldn't be opened (that should probably " +"be :c:data:`PyExc_OSError`). If something's wrong with the argument list, " +"the :c:func:`PyArg_ParseTuple` function usually " +"raises :c:data:`PyExc_TypeError`. If you have an argument whose value must " +"be in a particular range or must satisfy other " +"conditions, :c:data:`PyExc_ValueError` is appropriate." msgstr "" "Le choix de l'exception à lever vous incombe. Il existe des objets C " -"correspondant à chaque exception Python, tel que :c:data:" -"`PyExc_ZeroDivisionError`, que vous pouvez utiliser directement. Choisissez " -"judicieusement vos exceptions, typiquement n'utilisez pas :c:data:" -"`PyExc_TypeError` pour indiquer qu'un fichier n'a pas pu être ouvert (cela " -"devrait probablement être :c:data:`PyExc_IOError`). Si quelque chose ne va " -"pas avec la liste des arguments, la fonction :c:func:`PyArg_ParseTuple` lève " -"habituellement une exception :c:data:`PyExc_TypeError`. Mais si vous avez un " -"argument dont la valeur doit être dans un intervalle particulier ou qui doit " -"satisfaire d'autres conditions, :c:data:`PyExc_ValueError` sera plus " -"appropriée." - -#: extending/extending.rst:206 +"correspondant à chaque exception Python, tel " +"que :c:data:`PyExc_ZeroDivisionError`, que vous pouvez utiliser directement. " +"Choisissez judicieusement vos exceptions, typiquement n'utilisez " +"pas :c:data:`PyExc_TypeError` pour indiquer qu'un fichier n'a pas pu être " +"ouvert (cela devrait probablement être :c:data:`PyExc_IOError`). Si quelque " +"chose ne va pas avec la liste des arguments, la " +"fonction :c:func:`PyArg_ParseTuple` lève habituellement une " +"exception :c:data:`PyExc_TypeError`. Mais si vous avez un argument dont la " +"valeur doit être dans un intervalle particulier ou qui doit satisfaire " +"d'autres conditions, :c:data:`PyExc_ValueError` sera plus appropriée." + +#: extending/extending.rst:97 +#, fuzzy msgid "" -"You can also define a new exception that is unique to your module. For this, " -"you usually declare a static object variable at the beginning of your file::" +"You can also define a new exception that is unique to your module. The " +"simplest way to do this is to declare a static global object variable at the " +"beginning of the file::" msgstr "" "Vous pouvez également créer une exception spécifique à votre module. Pour " "cela, déclarez simplement une variable statique au début de votre fichier ::" -#: extending/extending.rst:211 -#, fuzzy +#: extending/extending.rst:103 msgid "" -"and initialize it in your module's initialization function (:c:func:`!" -"PyInit_spam`) with an exception object::" +"and initialize it by calling :c:func:`PyErr_NewException` in the " +"module's :c:data:`Py_mod_exec` function (:c:func:`!spam_module_exec`)::" msgstr "" -"et initialisez-la dans la fonction d'initialisation de votre module (:c:func:" -"`PyInit_spam`) avec un objet exception ::" -#: extending/extending.rst:233 +#: extending/extending.rst:108 +msgid "" +"Since :c:data:`!SpamError` is a global variable, it will be overwritten " +"every time the module is reinitialized, when the :c:data:`Py_mod_exec` " +"function is called." +msgstr "" + +#: extending/extending.rst:111 +msgid "" +"For now, let's avoid the issue: we will block repeated initialization by " +"raising an :py:exc:`ImportError`::" +msgstr "" + +#: extending/extending.rst:150 #, fuzzy msgid "" "Note that the Python name for the exception object is :exc:`!spam.error`. " @@ -445,11 +261,11 @@ msgid "" "``NULL``), described in :ref:`bltin-exceptions`." msgstr "" "Notez que le nom de l'exception en Python est :exc:`spam.error`. La " -"fonction :c:func:`PyErr_NewException` peut créer une classe héritant de :exc:" -"`Exception` (à moins qu'une autre classe ne lui soit fournie à la place de " -"``NULL``), voir :ref:`bltin-exceptions`." +"fonction :c:func:`PyErr_NewException` peut créer une classe héritant " +"de :exc:`Exception` (à moins qu'une autre classe ne lui soit fournie à la " +"place de ``NULL``), voir :ref:`bltin-exceptions`." -#: extending/extending.rst:238 +#: extending/extending.rst:155 msgid "" "Note also that the :c:data:`!SpamError` variable retains a reference to the " "newly created exception class; this is intentional! Since the exception " @@ -467,7 +283,15 @@ msgstr "" "vide. Si cela se produisait, le code C qui lève cette exception peut " "engendrer un *core dump* ou des effets secondaires inattendus." -#: extending/extending.rst:245 +#: extending/extending.rst:162 +msgid "" +"For now, the :c:func:`Py_DECREF` call to remove this reference is missing. " +"Even when the Python interpreter shuts down, the global :c:data:`!SpamError` " +"variable will not be garbage-collected. It will \"leak\". We did, however, " +"ensure that this will happen at most once per process." +msgstr "" + +#: extending/extending.rst:167 #, fuzzy msgid "" "We discuss the use of :c:macro:`PyMODINIT_FUNC` as a function return type " @@ -476,7 +300,7 @@ msgstr "" "Nous traiterons de l'utilisation de ``PyMODINIT_FUNC`` comme type de renvoi " "de fonction plus tard dans cette section." -#: extending/extending.rst:248 +#: extending/extending.rst:170 #, fuzzy msgid "" "The :exc:`!spam.error` exception can be raised in your extension module " @@ -485,280 +309,16 @@ msgstr "" "L'exception :exc:`spam.error` peut être levée dans votre module d'extension " "en appelant :c:func:`PyErr_SetString` comme montré ci-dessous ::" -#: extending/extending.rst:271 -msgid "Back to the Example" -msgstr "Retour vers l'exemple" - -#: extending/extending.rst:273 -msgid "" -"Going back to our example function, you should now be able to understand " -"this statement::" -msgstr "" -"En revenant vers notre fonction exemple, vous devriez maintenant être " -"capable de comprendre cette affirmation ::" - -#: extending/extending.rst:279 -msgid "" -"It returns ``NULL`` (the error indicator for functions returning object " -"pointers) if an error is detected in the argument list, relying on the " -"exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value of " -"the argument has been copied to the local variable :c:data:`!command`. This " -"is a pointer assignment and you are not supposed to modify the string to " -"which it points (so in Standard C, the variable :c:data:`!command` should " -"properly be declared as ``const char *command``)." +#: extending/extending.rst:193 +msgid "Embedding an extension" msgstr "" -"Elle renvoie ``NULL`` (l'indicateur d'erreur pour les fonctions renvoyant " -"des pointeurs d'objet) si une erreur est détectée dans la liste des " -"arguments, se fiant à l'exception définie par :c:func:`PyArg_ParseTuple`. " -"Autrement, la valeur chaîne de l'argument a été copiée dans la variable " -"locale :c:data:`!command`. Il s'agit d'une attribution de pointeur et vous " -"n'êtes pas supposés modifier la chaîne vers laquelle il pointe (donc en C " -"Standard, la variable :c:data:`!command` doit être clairement déclarée comme " -"``const char *command``)." -#: extending/extending.rst:287 -msgid "" -"The next statement is a call to the Unix function :c:func:`system`, passing " -"it the string we just got from :c:func:`PyArg_ParseTuple`::" -msgstr "" -"La prochaine instruction est un appel à la fonction Unix :c:func:`system`, " -"en lui passant la chaîne que nous venons d'obtenir à partir de :c:func:" -"`PyArg_ParseTuple` ::" - -#: extending/extending.rst:292 -msgid "" -"Our :func:`!spam.system` function must return the value of :c:data:`!sts` as " -"a Python object. This is done using the function :c:func:" -"`PyLong_FromLong`. ::" -msgstr "" -"Notre fonction :func:`!spam.system` doit renvoyer la valeur de :c:data:`!" -"sts` comme un objet Python. Cela est effectué par l'utilisation de la " -"fonction :c:func:`PyLong_FromLong`. ::" - -#: extending/extending.rst:297 -msgid "" -"In this case, it will return an integer object. (Yes, even integers are " -"objects on the heap in Python!)" -msgstr "" -"Dans ce cas, elle renvoie un objet de type entier (oui, même les entiers " -"sont des objets, stockés dans le tas, en Python !)." - -#: extending/extending.rst:300 -msgid "" -"If you have a C function that returns no useful argument (a function " -"returning :c:expr:`void`), the corresponding Python function must return " -"``None``. You need this idiom to do so (which is implemented by the :c:" -"macro:`Py_RETURN_NONE` macro)::" -msgstr "" -"Si vous avez une fonction C qui ne renvoie aucun argument utile (une " -"fonction renvoyant :c:expr:`void`), la fonction Python correspondante doit " -"renvoyer ``None``. Vous aurez besoin de cet idiome pour cela (qui est " -"implémenté par la macro :c:macro:`Py_RETURN_NONE`) ::" - -#: extending/extending.rst:308 -msgid "" -":c:data:`Py_None` is the C name for the special Python object ``None``. It " -"is a genuine Python object rather than a ``NULL`` pointer, which means " -"\"error\" in most contexts, as we have seen." -msgstr "" -":c:data:`Py_None` est la dénomination en C pour l'objet spécial Python " -"``None``. C'est un authentique objet Python plutôt qu'un pointeur ``NULL`` " -"qui, dans la plupart des situations, signifie qu'une erreur est survenue " -"comme nous l'avons vu." - -#: extending/extending.rst:316 -msgid "The Module's Method Table and Initialization Function" -msgstr "La fonction d'initialisation et le tableau des méthodes du module" - -#: extending/extending.rst:318 +#: extending/extending.rst:195 #, fuzzy msgid "" -"I promised to show how :c:func:`!spam_system` is called from Python " -"programs. First, we need to list its name and address in a \"method table\"::" -msgstr "" -"Nous avons promis de montrer comment :c:func:`spam_system` est appelée " -"depuis les programmes Python. D'abord, nous avons besoin d'avoir son nom et " -"son adresse dans un « tableau des méthodes » ::" - -#: extending/extending.rst:329 -msgid "" -"Note the third entry (``METH_VARARGS``). This is a flag telling the " -"interpreter the calling convention to be used for the C function. It should " -"normally always be ``METH_VARARGS`` or ``METH_VARARGS | METH_KEYWORDS``; a " -"value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` " -"is used." -msgstr "" -"Notez la troisième entrée (``METH_VARARGS``). C'est un indicateur du type de " -"convention à utiliser pour la fonction C, à destination de l'interpréteur. " -"Il doit valoir normalement ``METH_VARARGS`` ou ``METH_VARARGS | " -"METH_KEYWORDS`` ; la valeur ``0`` indique qu'une variante obsolète de :c:" -"func:`PyArg_ParseTuple` est utilisée." - -#: extending/extending.rst:334 -msgid "" -"When using only ``METH_VARARGS``, the function should expect the Python-" -"level parameters to be passed in as a tuple acceptable for parsing via :c:" -"func:`PyArg_ParseTuple`; more information on this function is provided below." -msgstr "" -"Si seulement ``METH_VARARGS`` est utilisé, la fonction s'attend à ce que les " -"paramètres Python soient passés comme un *n*-uplet que l'on peut analyser " -"*via* :c:func:`PyArg_ParseTuple` ; des informations supplémentaires sont " -"fournies plus bas." - -#: extending/extending.rst:338 -msgid "" -"The :c:macro:`METH_KEYWORDS` bit may be set in the third field if keyword " -"arguments should be passed to the function. In this case, the C function " -"should accept a third ``PyObject *`` parameter which will be a dictionary of " -"keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments " -"to such a function." -msgstr "" -"Le bit :c:macro:`METH_KEYWORDS` peut être mis à un dans le troisième champ " -"si des arguments par mots-clés doivent être passés à la fonction. Dans ce " -"cas, la fonction C doit accepter un troisième paramètre ``PyObject *`` qui " -"est un dictionnaire des mots-clés. Utilisez :c:func:" -"`PyArg_ParseTupleAndKeywords` pour analyser les arguments d'une telle " -"fonction." - -#: extending/extending.rst:344 -msgid "" -"The method table must be referenced in the module definition structure::" -msgstr "" -"Le tableau des méthodes doit être référencé dans la structure de définition " -"du module ::" - -#: extending/extending.rst:355 -#, fuzzy -msgid "" -"This structure, in turn, must be passed to the interpreter in the module's " -"initialization function. The initialization function must be named :c:func:" -"`!PyInit_name`, where *name* is the name of the module, and should be the " -"only non-\\ ``static`` item defined in the module file::" -msgstr "" -"Cette structure, à son tour, doit être transmise à l'interpréteur dans la " -"fonction d'initialisation du module. La fonction d'initialisation doit être " -"nommée :c:func:`PyInit_name`, où *nom* est le nom du module, et doit être le " -"seul élément non ``static`` défini dans le fichier du module ::" - -#: extending/extending.rst:366 -#, fuzzy -msgid "" -"Note that :c:macro:`PyMODINIT_FUNC` declares the function as ``PyObject *`` " -"return type, declares any special linkage declarations required by the " -"platform, and for C++ declares the function as ``extern \"C\"``." -msgstr "" -"Notez que *PyMODINIT_FUNC* déclare la fonction comme renvoyant un objet de " -"type ``PyObject *``, déclare également toute déclaration de liaison spéciale " -"requise par la plate-forme et, pour le C++, déclare la fonction comme " -"``extern C``." - -#: extending/extending.rst:370 -#, fuzzy -msgid "" -"When the Python program imports module :mod:`!spam` for the first time, :c:" -"func:`!PyInit_spam` is called. (See below for comments about embedding " -"Python.) It calls :c:func:`PyModule_Create`, which returns a module object, " -"and inserts built-in function objects into the newly created module based " -"upon the table (an array of :c:type:`PyMethodDef` structures) found in the " -"module definition. :c:func:`PyModule_Create` returns a pointer to the module " -"object that it creates. It may abort with a fatal error for certain errors, " -"or return ``NULL`` if the module could not be initialized satisfactorily. " -"The init function must return the module object to its caller, so that it " -"then gets inserted into ``sys.modules``." -msgstr "" -"Lorsque le programme Python importe le module :mod:`spam` pour la première " -"fois, :c:func:`PyInit_spam` est appelée (voir ci-dessous pour les " -"commentaires sur l'intégration en Python). Elle appelle :c:func:" -"`PyModule_Create`, qui renvoie un objet module et insère des objets fonction " -"intégrés dans le module nouvellement créé en se basant sur le tableau (un " -"tableau de structures :c:type:`PyMethodDef`) trouvée dans la définition du " -"module. :c:func:`PyModule_Create` renvoie un pointeur vers l'objet module " -"qu'il crée. Elle peut s'interrompre avec une erreur fatale pour certaines " -"erreurs, ou renvoyer ``NULL`` si le module n'a pas pu être initialisé de " -"manière satisfaisante. La fonction *init* doit renvoyer l'objet module à son " -"appelant, afin qu'il soit ensuite inséré dans ``sys.modules``." - -#: extending/extending.rst:381 -#, fuzzy -msgid "" -"When embedding Python, the :c:func:`!PyInit_spam` function is not called " -"automatically unless there's an entry in the :c:data:`PyImport_Inittab` " -"table. To add the module to the initialization table, use :c:func:" -"`PyImport_AppendInittab`, optionally followed by an import of the module::" -msgstr "" -"Lors de l'intégration de Python, la fonction :c:func:`PyInit_spam` n'est pas " -"appelée automatiquement, sauf s'il y a une entrée dans la table :c:data:" -"`PyImport_Inittab`. Pour ajouter le module au tableau d'initialisation, " -"utilisez :c:func:`PyImport_AppendInittab`, suivie éventuellement d'une " -"importation du module ::" - -# suit un : -#: extending/extending.rst:436 -msgid "" -"Removing entries from ``sys.modules`` or importing compiled modules into " -"multiple interpreters within a process (or following a :c:func:`fork` " -"without an intervening :c:func:`exec`) can create problems for some " -"extension modules. Extension module authors should exercise caution when " -"initializing internal data structures." -msgstr "" -"supprimer des entrées de ``sys.modules`` ou importer des modules compilés " -"dans plusieurs interpréteurs au sein d'un même processus (ou le faire à la " -"suite d'un :c:func:`fork` sans un :c:func:`exec` préalable) peut créer des " -"problèmes pour certains modules d'extension. Les auteurs de modules " -"d'extension doivent faire preuve de prudence lorsqu'ils initialisent des " -"structures de données internes." - -#: extending/extending.rst:442 -msgid "" -"A more substantial example module is included in the Python source " -"distribution as :file:`Modules/xxmodule.c`. This file may be used as a " -"template or simply read as an example." -msgstr "" -"Un exemple de module plus substantiel est inclus dans la distribution des " -"sources Python sous le nom :file:`Modules/xxmodule.c`. Ce fichier peut être " -"utilisé comme modèle ou simplement lu comme exemple." - -# suit un : -#: extending/extending.rst:448 -msgid "" -"Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* " -"(new in Python 3.5), where a PyModuleDef structure is returned from " -"``PyInit_spam``, and creation of the module is left to the import machinery. " -"For details on multi-phase initialization, see :PEP:`489`." -msgstr "" -"contrairement à notre exemple de ``spam``, ``xxmodule`` utilise une " -"*initialisation multi-phases* (nouveau en Python 3.5), où une structure " -"*PyModuleDef* est renvoyée à partir de ``PyInit_spam``, et la création du " -"module est laissée au mécanisme d'importation. Pour plus de détails sur " -"l'initialisation multi-phases, voir :PEP:`489`." - -#: extending/extending.rst:457 -msgid "Compilation and Linkage" -msgstr "Compilation et liaison" - -#: extending/extending.rst:459 -msgid "" -"There are two more things to do before you can use your new extension: " -"compiling and linking it with the Python system. If you use dynamic " -"loading, the details may depend on the style of dynamic loading your system " -"uses; see the chapters about building extension modules (chapter :ref:" -"`building`) and additional information that pertains only to building on " -"Windows (chapter :ref:`building-on-windows`) for more information about this." -msgstr "" -"Il y a encore deux choses à faire avant de pouvoir utiliser votre nouvelle " -"extension : la compiler et la lier au système Python. Si vous utilisez le " -"chargement dynamique, les détails peuvent dépendre du style de chargement " -"dynamique utilisé par votre système ; voir les chapitres sur la compilation " -"de modules d'extension (chapitre :ref:`building`) et les informations " -"supplémentaires concernant uniquement la construction sous Windows " -"(chapitre :ref:`building-on-windows`) pour plus d'informations à ce sujet." - -#: extending/extending.rst:466 -msgid "" -"If you can't use dynamic loading, or if you want to make your module a " -"permanent part of the Python interpreter, you will have to change the " -"configuration setup and rebuild the interpreter. Luckily, this is very " -"simple on Unix: just place your file (:file:`spammodule.c` for example) in " +"If you want to make your module a permanent part of the Python interpreter, " +"you will have to change the configuration setup and rebuild the " +"interpreter. On Unix, place your file (:file:`spammodule.c` for example) in " "the :file:`Modules/` directory of an unpacked source distribution, add a " "line to the file :file:`Modules/Setup.local` describing your file:" msgstr "" @@ -767,10 +327,10 @@ msgstr "" "devez modifier la configuration et reconstruire l'interpréteur. " "Heureusement, c'est très simple sous Unix : placez simplement votre fichier " "(:file:`spammodule.c` par exemple) dans le répertoire :file:`Modules/` d'une " -"distribution source décompressée, ajoutez une ligne au fichier :file:" -"`Modules/Setup.local` décrivant votre fichier :" +"distribution source décompressée, ajoutez une ligne au " +"fichier :file:`Modules/Setup.local` décrivant votre fichier :" -#: extending/extending.rst:477 +#: extending/extending.rst:206 msgid "" "and rebuild the interpreter by running :program:`make` in the toplevel " "directory. You can also run :program:`make` in the :file:`Modules/` " @@ -779,12 +339,13 @@ msgid "" "the :file:`Setup` file.)" msgstr "" "et reconstruisez l'interpréteur en exécutant :program:`make` dans le " -"répertoire de niveau supérieur. Vous pouvez également exécuter :program:" -"`make` dans le sous-répertoire :file:`Modules/`, mais vous devez d'abord " -"reconstruire le :file:`Makefile` en exécutant « :program:`make` Makefile » " -"(c'est nécessaire chaque fois que vous modifiez le fichier :file:`Setup`)." +"répertoire de niveau supérieur. Vous pouvez également " +"exécuter :program:`make` dans le sous-répertoire :file:`Modules/`, mais vous " +"devez d'abord reconstruire le :file:`Makefile` en exécutant " +"« :program:`make` Makefile » (c'est nécessaire chaque fois que vous modifiez " +"le fichier :file:`Setup`)." -#: extending/extending.rst:483 +#: extending/extending.rst:212 msgid "" "If your module requires additional libraries to link with, these can be " "listed on the line in the configuration file as well, for instance:" @@ -793,13 +354,14 @@ msgstr "" "celles-ci peuvent être ajoutées à la fin de la ligne de votre module dans le " "fichier de configuration, par exemple :" -#: extending/extending.rst:494 +#: extending/extending.rst:223 msgid "Calling Python Functions from C" msgstr "Appeler des fonctions Python en C" -#: extending/extending.rst:496 +#: extending/extending.rst:225 +#, fuzzy msgid "" -"So far we have concentrated on making C functions callable from Python. The " +"The tutorial concentrated on making C functions callable from Python. The " "reverse is also useful: calling Python functions from C. This is especially " "the case for libraries that support so-called \"callback\" functions. If a " "C interface makes use of callbacks, the equivalent Python often needs to " @@ -816,7 +378,7 @@ msgstr "" "l'implémentation nécessite d'appeler les fonctions de rappel Python à partir " "d'un rappel C. D'autres utilisations sont également envisageables." -#: extending/extending.rst:504 +#: extending/extending.rst:233 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " "is a standard interface to call a Python function. (I won't dwell on how to " @@ -831,7 +393,7 @@ msgstr "" "jetez un œil à l'implémentation de l'option de ligne de commande :option:`-" "c` dans :file:`Modules/main.c` à partir du code source Python)." -#: extending/extending.rst:510 +#: extending/extending.rst:239 msgid "" "Calling a Python function is easy. First, the Python program must somehow " "pass you the Python function object. You should provide a function (or some " @@ -848,19 +410,20 @@ msgstr "" "dans une variable globale — ou là où vous le souhaitez. Par exemple, la " "fonction suivante peut faire partie d'une définition de module ::" -#: extending/extending.rst:540 +#: extending/extending.rst:269 +#, fuzzy msgid "" -"This function must be registered with the interpreter using the :c:macro:" -"`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" -"c:func:`PyArg_ParseTuple` function and its arguments are documented in " +"This function must be registered with the interpreter using " +"the :c:macro:`METH_VARARGS` flag in :c:type:`PyMethodDef.ml_flags`. " +"The :c:func:`PyArg_ParseTuple` function and its arguments are documented in " "section :ref:`parsetuple`." msgstr "" -"Cette fonction doit être déclarée en utilisant le drapeau :c:macro:" -"`METH_VARARGS` ; ceci est décrit dans la section :ref:`methodtable`. La " -"fonction :c:func:`PyArg_ParseTuple` et ses arguments sont documentés dans la " -"section :ref:`parsetuple`." +"Cette fonction doit être déclarée en utilisant le " +"drapeau :c:macro:`METH_VARARGS` ; ceci est décrit dans la " +"section :ref:`methodtable`. La fonction :c:func:`PyArg_ParseTuple` et ses " +"arguments sont documentés dans la section :ref:`parsetuple`." -#: extending/extending.rst:545 +#: extending/extending.rst:274 msgid "" "The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement " "the reference count of an object and are safe in the presence of ``NULL`` " @@ -870,19 +433,20 @@ msgstr "" "Les macros :c:func:`Py_XINCREF` et :c:func:`Py_XDECREF` incrémentent/" "décrémentent le compteur des références d'un objet et sont sûres quant à la " "présence de pointeurs ``NULL`` (mais notez que *temp* ne sera pas ``NULL`` " -"dans ce contexte). Plus d'informations à ce sujet dans la section :ref:" -"`refcounts`." +"dans ce contexte). Plus d'informations à ce sujet dans la " +"section :ref:`refcounts`." -#: extending/extending.rst:552 +#: extending/extending.rst:281 msgid "" -"Later, when it is time to call the function, you call the C function :c:func:" -"`PyObject_CallObject`. This function has two arguments, both pointers to " -"arbitrary Python objects: the Python function, and the argument list. The " -"argument list must always be a tuple object, whose length is the number of " -"arguments. To call the Python function with no arguments, pass in ``NULL``, " -"or an empty tuple; to call it with one argument, pass a singleton tuple. :c:" -"func:`Py_BuildValue` returns a tuple when its format string consists of zero " -"or more format codes between parentheses. For example::" +"Later, when it is time to call the function, you call the C " +"function :c:func:`PyObject_CallObject`. This function has two arguments, " +"both pointers to arbitrary Python objects: the Python function, and the " +"argument list. The argument list must always be a tuple object, whose " +"length is the number of arguments. To call the Python function with no " +"arguments, pass in ``NULL``, or an empty tuple; to call it with one " +"argument, pass a singleton tuple. :c:func:`Py_BuildValue` returns a tuple " +"when its format string consists of zero or more format codes between " +"parentheses. For example::" msgstr "" "Plus tard, quand il est temps d'appeler la fonction, vous appelez la " "fonction C :c:func:`PyObject_CallObject`. Cette fonction requiert deux " @@ -890,27 +454,28 @@ msgstr "" "fonction Python et la liste d'arguments. La liste d'arguments doit toujours " "être un objet *n*-uplet, dont la longueur est le nombre d'arguments. Pour " "appeler la fonction Python sans argument, passez ``NULL`` ou le *n*-uplet " -"vide ; pour l'appeler avec un argument, passez un *n*-uplet singleton. :c:" -"func:`Py_BuildValue` renvoie un *n*-uplet lorsque sa chaîne de format se " -"compose de zéro ou plusieurs codes de format entre parenthèses. Par " -"exemple ::" +"vide ; pour l'appeler avec un argument, passez un *n*-uplet " +"singleton. :c:func:`Py_BuildValue` renvoie un *n*-uplet lorsque sa chaîne de " +"format se compose de zéro ou plusieurs codes de format entre parenthèses. " +"Par exemple ::" -#: extending/extending.rst:572 +#: extending/extending.rst:301 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " "\"reference-count-neutral\" with respect to its arguments. In the example a " -"new tuple was created to serve as the argument list, which is :c:func:" -"`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." +"new tuple was created to serve as the argument list, which " +"is :c:func:`Py_DECREF`\\ -ed immediately after " +"the :c:func:`PyObject_CallObject` call." msgstr "" ":c:func:`PyObject_CallObject` renvoie un pointeur d'objet Python : c'est la " "valeur de retour de la fonction Python. :c:func:`PyObject_CallObject` est " "« neutre en nombre de références » par rapport à ses arguments. Dans " "l'exemple, un nouveau *n*-uplet a été créé pour servir de liste d'arguments, " -"qui est décrémenté (avec :c:func:`Py_DECREF`) immédiatement après l'appel :c:" -"func:`PyObject_CallObject`." +"qui est décrémenté (avec :c:func:`Py_DECREF`) immédiatement après " +"l'appel :c:func:`PyObject_CallObject`." -#: extending/extending.rst:579 +#: extending/extending.rst:308 msgid "" "The return value of :c:func:`PyObject_CallObject` is \"new\": either it is a " "brand new object, or it is an existing object whose reference count has been " @@ -921,11 +486,11 @@ msgstr "" "La valeur de retour de :c:func:`PyObject_CallObject` est « nouvelle » : soit " "c'est un tout nouvel objet, soit c'est un objet existant dont le nombre de " "références a été incrémenté. Donc, à moins que vous ne vouliez l'enregistrer " -"dans une variable globale, vous devriez en quelque sorte décrémenter avec :c:" -"func:`Py_DECREF` le résultat, même (surtout !) si vous n'êtes pas intéressé " -"par sa valeur." +"dans une variable globale, vous devriez en quelque sorte décrémenter " +"avec :c:func:`Py_DECREF` le résultat, même (surtout !) si vous n'êtes pas " +"intéressé par sa valeur." -#: extending/extending.rst:585 +#: extending/extending.rst:314 msgid "" "Before you do this, however, it is important to check that the return value " "isn't ``NULL``. If it is, the Python function terminated by raising an " @@ -937,15 +502,15 @@ msgid "" msgstr "" "Mais avant de le faire, il est important de vérifier que la valeur renvoyée " "n'est pas ``NULL``. Si c'est le cas, la fonction Python s'est terminée par " -"une levée d'exception. Si le code C qui a appelé :c:func:" -"`PyObject_CallObject` est appelé depuis Python, il devrait maintenant " -"renvoyer une indication d'erreur à son appelant Python, afin que " +"une levée d'exception. Si le code C qui a " +"appelé :c:func:`PyObject_CallObject` est appelé depuis Python, il devrait " +"maintenant renvoyer une indication d'erreur à son appelant Python, afin que " "l'interpréteur puisse afficher la pile d'appels, ou que le code Python " "appelant puisse gérer l'exception. Si cela n'est pas possible ou " -"souhaitable, l'exception doit être effacée en appelant :c:func:" -"`PyErr_Clear`. Par exemple ::" +"souhaitable, l'exception doit être effacée en " +"appelant :c:func:`PyErr_Clear`. Par exemple ::" -#: extending/extending.rst:598 +#: extending/extending.rst:327 msgid "" "Depending on the desired interface to the Python callback function, you may " "also have to provide an argument list to :c:func:`PyObject_CallObject`. In " @@ -957,17 +522,17 @@ msgid "" "you want to pass an integral event code, you might use the following code::" msgstr "" "Selon l'interface souhaitée pour la fonction de rappel Python, vous devrez " -"peut-être aussi fournir une liste d'arguments à :c:func:" -"`PyObject_CallObject`. Dans certains cas, la liste d'arguments est également " -"fournie par le programme Python, par l'intermédiaire de la même interface " -"qui a spécifié la fonction de rappel. Elle peut alors être sauvegardée et " -"utilisée de la même manière que l'objet fonction. Dans d'autres cas, vous " -"pouvez avoir à construire un nouveau *n*-uplet à passer comme liste " -"d'arguments. La façon la plus simple de faire cela est d'appeler :c:func:" -"`Py_BuildValue`. Par exemple, si vous voulez passer un code d'événement " -"intégral, vous pouvez utiliser le code suivant ::" - -#: extending/extending.rst:617 +"peut-être aussi fournir une liste d'arguments " +"à :c:func:`PyObject_CallObject`. Dans certains cas, la liste d'arguments est " +"également fournie par le programme Python, par l'intermédiaire de la même " +"interface qui a spécifié la fonction de rappel. Elle peut alors être " +"sauvegardée et utilisée de la même manière que l'objet fonction. Dans " +"d'autres cas, vous pouvez avoir à construire un nouveau *n*-uplet à passer " +"comme liste d'arguments. La façon la plus simple de faire cela est " +"d'appeler :c:func:`Py_BuildValue`. Par exemple, si vous voulez passer un " +"code d'événement intégral, vous pouvez utiliser le code suivant ::" + +#: extending/extending.rst:346 msgid "" "Note the placement of ``Py_DECREF(arglist)`` immediately after the call, " "before the error check! Also note that strictly speaking this code is not " @@ -979,26 +544,38 @@ msgstr "" "ce code n'est pas complet : :c:func:`Py_BuildValue` peut manquer de mémoire, " "et cela doit être vérifié." -#: extending/extending.rst:621 +#: extending/extending.rst:350 msgid "" -"You may also call a function with keyword arguments by using :c:func:" -"`PyObject_Call`, which supports arguments and keyword arguments. As in the " -"above example, we use :c:func:`Py_BuildValue` to construct the dictionary. ::" +"You may also call a function with keyword arguments by " +"using :c:func:`PyObject_Call`, which supports arguments and keyword " +"arguments. As in the above example, we use :c:func:`Py_BuildValue` to " +"construct the dictionary. ::" msgstr "" "Vous pouvez également appeler une fonction avec des arguments nommés en " "utilisant :c:func:`PyObject_Call`, qui accepte les arguments et les " -"arguments nommés. Comme dans l'exemple ci-dessus, nous utilisons :c:func:" -"`Py_BuildValue` pour construire le dictionnaire. ::" +"arguments nommés. Comme dans l'exemple ci-dessus, nous " +"utilisons :c:func:`Py_BuildValue` pour construire le dictionnaire. ::" -#: extending/extending.rst:639 +#: extending/extending.rst:370 msgid "Extracting Parameters in Extension Functions" msgstr "Extraire des paramètres dans des fonctions d'extension" -#: extending/extending.rst:643 -msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" +#: extending/extending.rst:372 +msgid "" +"The :ref:`tutorial ` uses a \":c:data:`METH_O`\" " +"function, which is limited to a single Python argument. If you want more, " +"you can use :c:data:`METH_VARARGS` instead. With this flag, the C function " +"will receive a :py:class:`tuple` of arguments instead of a single object." +msgstr "" + +#: extending/extending.rst:378 +#, fuzzy +msgid "" +"For unpacking the tuple, CPython provides the :c:func:`PyArg_ParseTuple` " +"function, declared as follows::" msgstr "La fonction :c:func:`PyArg_ParseTuple` est déclarée ainsi ::" -#: extending/extending.rst:647 +#: extending/extending.rst:383 msgid "" "The *arg* argument must be a tuple object containing an argument list passed " "from Python to a C function. The *format* argument must be a format string, " @@ -1012,7 +589,21 @@ msgstr "" "manuel de référence de l'API Python/C. Les arguments restants doivent être " "des adresses de variables dont le type est déterminé par la chaîne de format." -#: extending/extending.rst:653 +#: extending/extending.rst:389 +msgid "" +"For example, to receive a single Python :py:class:`str` object and turn it " +"into a C buffer, you would use ``\"s\"`` as the format string::" +msgstr "" + +#: extending/extending.rst:397 +msgid "" +"If an error is detected in the argument list, :c:func:`!PyArg_ParseTuple` " +"returns ``NULL`` (the error indicator for functions returning object " +"pointers); your function may return ``NULL``, relying on the exception set " +"by :c:func:`PyArg_ParseTuple`." +msgstr "" + +#: extending/extending.rst:402 msgid "" "Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments " "have the required types, it cannot check the validity of the addresses of C " @@ -1025,7 +616,7 @@ msgstr "" "plantera probablement ou au moins écrasera des bits aléatoires en mémoire. " "Donc soyez prudent !" -#: extending/extending.rst:658 +#: extending/extending.rst:407 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" @@ -1033,52 +624,76 @@ msgstr "" "Notez que toute référence sur un objet Python donnée à l'appelant est une " "référence *empruntée* ; ne décrémentez pas son compteur de références !" -#: extending/extending.rst:661 +#: extending/extending.rst:410 msgid "Some example calls::" msgstr "Quelques exemples d'appels ::" -#: extending/extending.rst:731 +#: extending/extending.rst:479 msgid "Keyword Parameters for Extension Functions" msgstr "Paramètres nommés pour des fonctions d'extension" -#: extending/extending.rst:735 +#: extending/extending.rst:481 +msgid "" +"If you also want your function to accept :term:`keyword arguments `, use the :c:data:`METH_KEYWORDS` flag in combination " +"with :c:data:`METH_VARARGS`. (:c:data:`!METH_KEYWORDS` can also be used with " +"other flags; see its documentation for the allowed combinations.)" +msgstr "" + +#: extending/extending.rst:487 +#, fuzzy +msgid "" +"In this case, the C function should accept a third ``PyObject *`` parameter " +"which will be a dictionary of keywords. " +"Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a " +"function." +msgstr "" +"Le bit :c:macro:`METH_KEYWORDS` peut être mis à un dans le troisième champ " +"si des arguments par mots-clés doivent être passés à la fonction. Dans ce " +"cas, la fonction C doit accepter un troisième paramètre ``PyObject *`` qui " +"est un dictionnaire des mots-clés. " +"Utilisez :c:func:`PyArg_ParseTupleAndKeywords` pour analyser les arguments " +"d'une telle fonction." + +#: extending/extending.rst:494 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" "La fonction :c:func:`PyArg_ParseTupleAndKeywords` est déclarée ainsi ::" -#: extending/extending.rst:740 -msgid "" -"The *arg* and *format* parameters are identical to those of the :c:func:" -"`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " -"keywords received as the third parameter from the Python runtime. The " -"*kwlist* parameter is a ``NULL``-terminated list of strings which identify " -"the parameters; the names are matched with the type information from " -"*format* from left to right. On success, :c:func:" -"`PyArg_ParseTupleAndKeywords` returns true, otherwise it returns false and " -"raises an appropriate exception." -msgstr "" -"Les paramètres *arg* et *format* sont identiques à ceux de la fonction :c:" -"func:`PyArg_ParseTuple`. Le paramètre *kwdict* est le dictionnaire de mots-" -"clés reçu comme troisième paramètre du *runtime* Python. Le paramètre " -"*kwlist* est une liste de chaînes de caractères terminée par ``NULL`` qui " -"identifie les paramètres ; les noms sont mis en correspondance, de gauche à " -"droite, avec les informations de type de *format*. En cas de succès du " +#: extending/extending.rst:499 +msgid "" +"The *arg* and *format* parameters are identical to those of " +"the :c:func:`PyArg_ParseTuple` function. The *kwdict* parameter is the " +"dictionary of keywords received as the third parameter from the Python " +"runtime. The *kwlist* parameter is a ``NULL``-terminated list of strings " +"which identify the parameters; the names are matched with the type " +"information from *format* from left to right. On " +"success, :c:func:`PyArg_ParseTupleAndKeywords` returns true, otherwise it " +"returns false and raises an appropriate exception." +msgstr "" +"Les paramètres *arg* et *format* sont identiques à ceux de la " +"fonction :c:func:`PyArg_ParseTuple`. Le paramètre *kwdict* est le " +"dictionnaire de mots-clés reçu comme troisième paramètre du *runtime* " +"Python. Le paramètre *kwlist* est une liste de chaînes de caractères " +"terminée par ``NULL`` qui identifie les paramètres ; les noms sont mis en " +"correspondance, de gauche à droite, avec les informations de type de " +"*format*. En cas de succès du " "processus, :c:func:`PyArg_ParseTupleAndKeywords` renvoie vrai, sinon elle " "renvoie faux et lève une exception appropriée." # suit un : -#: extending/extending.rst:750 +#: extending/extending.rst:509 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " -"parameters passed in which are not present in the *kwlist* will cause :exc:" -"`TypeError` to be raised." +"parameters passed in which are not present in the *kwlist* will " +"cause :exc:`TypeError` to be raised." msgstr "" "les *n*-uplets imbriqués ne peuvent pas être traités lorsqu'on utilise des " "arguments nommés ! Ceux-ci doivent apparaître dans *kwlist*, dans le cas " "contraire une exception :exc:`TypeError` est levée." -#: extending/extending.rst:756 +#: extending/extending.rst:515 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" @@ -1086,11 +701,11 @@ msgstr "" "Voici un exemple de module qui utilise des arguments nommés, basé sur un " "exemple de *Geoff Philbrick* (philbrick@hks.com) ::" -#: extending/extending.rst:811 +#: extending/extending.rst:556 msgid "Building Arbitrary Values" msgstr "Créer des valeurs arbitraires" -#: extending/extending.rst:813 +#: extending/extending.rst:558 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" @@ -1098,12 +713,12 @@ msgstr "" "Cette fonction est le complément de :c:func:`PyArg_ParseTuple`. Elle est " "déclarée comme suit ::" -#: extending/extending.rst:818 +#: extending/extending.rst:563 msgid "" -"It recognizes a set of format units similar to the ones recognized by :c:" -"func:`PyArg_ParseTuple`, but the arguments (which are input to the function, " -"not output) must not be pointers, just values. It returns a new Python " -"object, suitable for returning from a C function called from Python." +"It recognizes a set of format units similar to the ones recognized " +"by :c:func:`PyArg_ParseTuple`, but the arguments (which are input to the " +"function, not output) must not be pointers, just values. It returns a new " +"Python object, suitable for returning from a C function called from Python." msgstr "" "Elle reconnaît un ensemble d'unités de format similaires à celles reconnues " "par :c:func:`PyArg_ParseTuple`, mais les arguments (qui sont les données en " @@ -1111,7 +726,7 @@ msgstr "" "pointeurs, mais juste des valeurs. Elle renvoie un nouvel objet Python, " "adapté pour être renvoyé par une fonction C appelée depuis Python." -#: extending/extending.rst:823 +#: extending/extending.rst:568 msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " "its first argument to be a tuple (since Python argument lists are always " @@ -1132,17 +747,17 @@ msgstr "" "tout objet décrit par cette unité de format. Pour la forcer à renvoyer un " "*n*-uplet de taille 0 ou un, mettez la chaîne de format entre parenthèses." -#: extending/extending.rst:831 +#: extending/extending.rst:576 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" "Exemples (à gauche l'appel, à droite la valeur résultante, en Python) :" -#: extending/extending.rst:857 +#: extending/extending.rst:602 msgid "Reference Counts" msgstr "Compteurs de références" -#: extending/extending.rst:859 +#: extending/extending.rst:604 msgid "" "In languages like C or C++, the programmer is responsible for dynamic " "allocation and deallocation of memory on the heap. In C, this is done using " @@ -1157,34 +772,35 @@ msgstr "" "essentiellement la même signification et nous limiterons la discussion " "suivante au cas du C." -#: extending/extending.rst:865 +#: extending/extending.rst:610 #, fuzzy msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " -"returned to the pool of available memory by exactly one call to :c:func:" -"`free`. It is important to call :c:func:`free` at the right time. If a " -"block's address is forgotten but :c:func:`free` is not called for it, the " -"memory it occupies cannot be reused until the program terminates. This is " -"called a :dfn:`memory leak`. On the other hand, if a program calls :c:func:" -"`free` for a block and then continues to use the block, it creates a " -"conflict with reuse of the block through another :c:func:`malloc` call. " -"This is called :dfn:`using freed memory`. It has the same bad consequences " -"as referencing uninitialized data --- core dumps, wrong results, mysterious " -"crashes." +"returned to the pool of available memory by exactly one call " +"to :c:func:`free`. It is important to call :c:func:`free` at the right " +"time. If a block's address is forgotten but :c:func:`free` is not called " +"for it, the memory it occupies cannot be reused until the program " +"terminates. This is called a :dfn:`memory leak`. On the other hand, if a " +"program calls :c:func:`free` for a block and then continues to use the " +"block, it creates a conflict with reuse of the block through " +"another :c:func:`malloc` call. This is called :dfn:`using freed memory`. It " +"has the same bad consequences as referencing uninitialized data --- core " +"dumps, wrong results, mysterious crashes." msgstr "" "Chaque bloc de mémoire alloué avec :c:func:`malloc` doit finalement être " -"libéré par exactement un appel à :c:func:`free`. Il est important d'appeler :" -"c:func:`free` au bon moment. Si l'adresse d'un bloc est oubliée mais que :c:" -"func:`free` n'est pas appelée, la mémoire qu'il occupe ne peut être " -"réutilisée tant que le programme n'est pas terminé. C'est ce qu'on appelle " -"une :dfn:`fuite de mémoire`. D'autre part, si un programme appelle :c:func:" -"`free` pour un bloc et continue ensuite à utiliser le bloc, il crée un " -"conflit avec la réutilisation du bloc via un autre appel :c:func:`malloc`. " -"Cela s'appelle :dfn:`utiliser de la mémoire libérée`. Cela a les mêmes " -"conséquences néfastes que le référencement de données non initialisées — " -"« *core dumps* », résultats erronés, plantages mystérieux." - -#: extending/extending.rst:876 +"libéré par exactement un appel à :c:func:`free`. Il est important " +"d'appeler :c:func:`free` au bon moment. Si l'adresse d'un bloc est oubliée " +"mais que :c:func:`free` n'est pas appelée, la mémoire qu'il occupe ne peut " +"être réutilisée tant que le programme n'est pas terminé. C'est ce qu'on " +"appelle une :dfn:`fuite de mémoire`. D'autre part, si un programme " +"appelle :c:func:`free` pour un bloc et continue ensuite à utiliser le bloc, " +"il crée un conflit avec la réutilisation du bloc via un autre " +"appel :c:func:`malloc`. Cela s'appelle :dfn:`utiliser de la mémoire " +"libérée`. Cela a les mêmes conséquences néfastes que le référencement de " +"données non initialisées — « *core dumps* », résultats erronés, plantages " +"mystérieux." + +#: extending/extending.rst:621 msgid "" "Common causes of memory leaks are unusual paths through the code. For " "instance, a function may allocate a block of memory, do some calculation, " @@ -1215,7 +831,7 @@ msgstr "" "est important d'éviter les fuites en ayant une convention ou une stratégie " "de codage qui minimise ce type d'erreurs." -#: extending/extending.rst:889 +#: extending/extending.rst:634 msgid "" "Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it " "needs a strategy to avoid memory leaks as well as the use of freed memory. " @@ -1225,16 +841,16 @@ msgid "" "reference to it is deleted. When the counter reaches zero, the last " "reference to the object has been deleted and the object is freed." msgstr "" -"Comme Python fait un usage intensif de :c:func:`malloc` et de :c:func:" -"`free`, il a besoin d'une stratégie pour éviter les fuites de mémoire ainsi " -"que l'utilisation de la mémoire libérée. La méthode choisie est appelée le :" -"dfn:`comptage de références`. Le principe est simple : chaque objet contient " -"un compteur, qui est incrémenté lorsqu'une référence à l'objet est stockée " -"quelque part, et qui est décrémenté lorsqu'une référence à celui-ci est " -"supprimée. Lorsque le compteur atteint zéro, la dernière référence à l'objet " -"a été supprimée et l'objet est libéré." +"Comme Python fait un usage intensif de :c:func:`malloc` et " +"de :c:func:`free`, il a besoin d'une stratégie pour éviter les fuites de " +"mémoire ainsi que l'utilisation de la mémoire libérée. La méthode choisie " +"est appelée le :dfn:`comptage de références`. Le principe est simple : " +"chaque objet contient un compteur, qui est incrémenté lorsqu'une référence à " +"l'objet est stockée quelque part, et qui est décrémenté lorsqu'une référence " +"à celui-ci est supprimée. Lorsque le compteur atteint zéro, la dernière " +"référence à l'objet a été supprimée et l'objet est libéré." -#: extending/extending.rst:897 +#: extending/extending.rst:642 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " @@ -1253,17 +869,18 @@ msgstr "" "(*automatic garbage collection* en anglais). Parfois, le comptage des " "références est également appelé stratégie de ramasse-miettes, d'où " "l'utilisation du terme « automatique » pour distinguer les deux. Le grand " -"avantage du ramasse-miettes est que l'utilisateur n'a pas besoin d'appeler :" -"c:func:`free` explicitement (un autre avantage important est l'amélioration " -"de la vitesse ou de l'utilisation de la mémoire, ce n'est cependant pas un " -"fait avéré). L'inconvénient est que pour C, il n'y a pas de ramasse-miettes " -"portable proprement-dit, alors que le comptage des références peut être " -"implémenté de façon portable (tant que les fonctions :c:func:`malloc` et :c:" -"func:`free` sont disponibles, ce que la norme C garantit). Peut-être qu'un " -"jour un ramasse-miettes suffisamment portable sera disponible pour C. D'ici " -"là, nous devons utiliser les compteurs de références." - -#: extending/extending.rst:909 +"avantage du ramasse-miettes est que l'utilisateur n'a pas besoin " +"d'appeler :c:func:`free` explicitement (un autre avantage important est " +"l'amélioration de la vitesse ou de l'utilisation de la mémoire, ce n'est " +"cependant pas un fait avéré). L'inconvénient est que pour C, il n'y a pas de " +"ramasse-miettes portable proprement-dit, alors que le comptage des " +"références peut être implémenté de façon portable (tant que les " +"fonctions :c:func:`malloc` et :c:func:`free` sont disponibles, ce que la " +"norme C garantit). Peut-être qu'un jour un ramasse-miettes suffisamment " +"portable sera disponible pour C. D'ici là, nous devons utiliser les " +"compteurs de références." + +#: extending/extending.rst:654 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -1289,12 +906,12 @@ msgstr "" "références, ou référencés à partir des objets dans le cycle, même s'il n'y a " "pas d'autre référence au cycle lui-même." -#: extending/extending.rst:920 +#: extending/extending.rst:665 msgid "" "The cycle detector is able to detect garbage cycles and can reclaim them. " -"The :mod:`gc` module exposes a way to run the detector (the :func:`~gc." -"collect` function), as well as configuration interfaces and the ability to " -"disable the detector at runtime." +"The :mod:`gc` module exposes a way to run the detector " +"(the :func:`~gc.collect` function), as well as configuration interfaces and " +"the ability to disable the detector at runtime." msgstr "" "Le détecteur de cycle est capable de détecter les cycles isolés et peut " "récupérer la mémoire afférente. Le module :mod:`gc` expose un moyen " @@ -1302,29 +919,29 @@ msgstr "" "interfaces de configuration et la possibilité de désactiver le détecteur au " "moment de l'exécution." -#: extending/extending.rst:929 +#: extending/extending.rst:674 msgid "Reference Counting in Python" msgstr "Comptage de références en Python" -#: extending/extending.rst:931 +#: extending/extending.rst:676 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " -"the incrementing and decrementing of the reference count. :c:func:" -"`Py_DECREF` also frees the object when the count reaches zero. For " -"flexibility, it doesn't call :c:func:`free` directly --- rather, it makes a " -"call through a function pointer in the object's :dfn:`type object`. For " -"this purpose (and others), every object also contains a pointer to its type " -"object." +"the incrementing and decrementing of the reference " +"count. :c:func:`Py_DECREF` also frees the object when the count reaches " +"zero. For flexibility, it doesn't call :c:func:`free` directly --- rather, " +"it makes a call through a function pointer in the object's :dfn:`type " +"object`. For this purpose (and others), every object also contains a " +"pointer to its type object." msgstr "" "Il existe deux macros, ``Py_INCREF(x)`` et ``Py_DECREF(x)``, qui gèrent " -"l'incrémentation et la décrémentation du comptage de références. :c:func:" -"`Py_DECREF` libère également l'objet lorsque le compteur atteint zéro. Pour " -"plus de flexibilité, il n'appelle pas :c:func:`free` directement — plutôt, " -"il fait un appel à travers un pointeur de fonction dans l'objet :dfn:`type " -"objet` de l'objet. À cette fin (et pour d'autres), chaque objet contient " -"également un pointeur vers son objet type." +"l'incrémentation et la décrémentation du comptage de " +"références. :c:func:`Py_DECREF` libère également l'objet lorsque le compteur " +"atteint zéro. Pour plus de flexibilité, il n'appelle pas :c:func:`free` " +"directement — plutôt, il fait un appel à travers un pointeur de fonction " +"dans l'objet :dfn:`type objet` de l'objet. À cette fin (et pour d'autres), " +"chaque objet contient également un pointeur vers son objet type." -#: extending/extending.rst:938 +#: extending/extending.rst:683 msgid "" "The big question now remains: when to use ``Py_INCREF(x)`` and " "``Py_DECREF(x)``? Let's first introduce some terms. Nobody \"owns\" an " @@ -1347,13 +964,15 @@ msgstr "" "la stocker ou appeler :c:func:`Py_DECREF`. Oublier de se débarrasser d'une " "référence crée une fuite de mémoire." -#: extending/extending.rst:947 +#: extending/extending.rst:692 +#, fuzzy msgid "" -"It is also possible to :dfn:`borrow` [#]_ a reference to an object. The " -"borrower of a reference should not call :c:func:`Py_DECREF`. The borrower " -"must not hold on to the object longer than the owner from which it was " -"borrowed. Using a borrowed reference after the owner has disposed of it " -"risks using freed memory and should be avoided completely [#]_." +"It is also possible to :dfn:`borrow` [#borrow]_ a reference to an object. " +"The borrower of a reference should not call :c:func:`Py_DECREF`. The " +"borrower must not hold on to the object longer than the owner from which it " +"was borrowed. Using a borrowed reference after the owner has disposed of it " +"risks using freed memory and should be avoided completely [#dont-check-" +"refcount]_." msgstr "" "Il est également possible d':dfn:`emprunter` [#]_ une référence à un objet. " "L'emprunteur d'une référence ne doit pas appeler :c:func:`Py_DECREF`. " @@ -1362,7 +981,7 @@ msgstr "" "empruntée après que le propriétaire s'en est débarrassée risque d'utiliser " "de la mémoire libérée et doit être absolument évitée [#]_." -#: extending/extending.rst:953 +#: extending/extending.rst:698 msgid "" "The advantage of borrowing over owning a reference is that you don't need to " "take care of disposing of the reference on all possible paths through the " @@ -1381,13 +1000,13 @@ msgstr "" "référence empruntée peut être utilisée après que le propriétaire auquel elle " "a été empruntée l'a en fait éliminée." -#: extending/extending.rst:961 +#: extending/extending.rst:706 msgid "" -"A borrowed reference can be changed into an owned reference by calling :c:" -"func:`Py_INCREF`. This does not affect the status of the owner from which " -"the reference was borrowed --- it creates a new owned reference, and gives " -"full owner responsibilities (the new owner must dispose of the reference " -"properly, as well as the previous owner)." +"A borrowed reference can be changed into an owned reference by " +"calling :c:func:`Py_INCREF`. This does not affect the status of the owner " +"from which the reference was borrowed --- it creates a new owned reference, " +"and gives full owner responsibilities (the new owner must dispose of the " +"reference properly, as well as the previous owner)." msgstr "" "Une référence empruntée peut être changée en une référence possédée en " "appelant :c:func:`Py_INCREF`. Cela n'affecte pas le statut du propriétaire à " @@ -1395,11 +1014,11 @@ msgstr "" "et donne l'entière responsabilité au propriétaire (le nouveau propriétaire " "doit libérer la référence correctement, ainsi que le propriétaire précédent)." -#: extending/extending.rst:971 +#: extending/extending.rst:716 msgid "Ownership Rules" msgstr "Règles concernant la possession de références" -#: extending/extending.rst:973 +#: extending/extending.rst:718 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " @@ -1410,44 +1029,44 @@ msgstr "" "l'interface de la fonction, peu importe que la possession soit transférée " "avec la référence ou non." -#: extending/extending.rst:977 +#: extending/extending.rst:722 msgid "" "Most functions that return a reference to an object pass on ownership with " "the reference. In particular, all functions whose function it is to create " "a new object, such as :c:func:`PyLong_FromLong` and :c:func:`Py_BuildValue`, " "pass ownership to the receiver. Even if the object is not actually new, you " -"still receive ownership of a new reference to that object. For instance, :c:" -"func:`PyLong_FromLong` maintains a cache of popular values and can return a " -"reference to a cached item." +"still receive ownership of a new reference to that object. For " +"instance, :c:func:`PyLong_FromLong` maintains a cache of popular values and " +"can return a reference to a cached item." msgstr "" "La plupart des fonctions qui renvoient une référence à un objet transmettent " "la possession avec la référence. En particulier, toutes les fonctions dont " -"la fonction est de créer un nouvel objet, telles que :c:func:" -"`PyLong_FromLong` et :c:func:`Py_BuildValue`, transmettent la possession au " -"récepteur. Même si l'objet n'est pas réellement nouveau, vous recevez " -"toujours la possession d'une nouvelle référence à cet objet. Par exemple, :c:" -"func:`PyLong_FromLong` maintient un cache des valeurs souvent utilisées et " -"peut renvoyer une référence à un élément mis en cache." +"la fonction est de créer un nouvel objet, telles " +"que :c:func:`PyLong_FromLong` et :c:func:`Py_BuildValue`, transmettent la " +"possession au récepteur. Même si l'objet n'est pas réellement nouveau, vous " +"recevez toujours la possession d'une nouvelle référence à cet objet. Par " +"exemple, :c:func:`PyLong_FromLong` maintient un cache des valeurs souvent " +"utilisées et peut renvoyer une référence à un élément mis en cache." -#: extending/extending.rst:985 +#: extending/extending.rst:730 msgid "" "Many functions that extract objects from other objects also transfer " -"ownership with the reference, for instance :c:func:" -"`PyObject_GetAttrString`. The picture is less clear, here, however, since a " -"few common routines are exceptions: :c:func:`PyTuple_GetItem`, :c:func:" -"`PyList_GetItem`, :c:func:`PyDict_GetItem`, and :c:func:" -"`PyDict_GetItemString` all return references that you borrow from the tuple, " -"list or dictionary." +"ownership with the reference, for " +"instance :c:func:`PyObject_GetAttrString`. The picture is less clear, here, " +"however, since a few common routines are " +"exceptions: :c:func:`PyTuple_GetItem`, :c:func:`PyList_GetItem`, :c:func:`PyDict_GetItem`, " +"and :c:func:`PyDict_GetItemString` all return references that you borrow " +"from the tuple, list or dictionary." msgstr "" "De nombreuses fonctions qui extraient des objets d'autres objets transfèrent " -"également la possession avec la référence, par exemple :c:func:" -"`PyObject_GetAttrString`. L'image est moins claire ici, cependant, puisque " -"quelques routines courantes sont des exceptions : :c:func:" -"`PyTuple_GetItem`, :c:func:`PyList_GetItem`, :c:func:`PyDict_GetItem` et :c:" -"func:`PyDict_GetItemString` renvoient toutes des références qui sont " +"également la possession avec la référence, par " +"exemple :c:func:`PyObject_GetAttrString`. L'image est moins claire ici, " +"cependant, puisque quelques routines courantes sont des " +"exceptions : :c:func:`PyTuple_GetItem`, :c:func:`PyList_GetItem`, :c:func:`PyDict_GetItem` " +"et :c:func:`PyDict_GetItemString` renvoient toutes des références qui sont " "empruntées au *n*-uplet, à la liste ou au dictionnaire." -#: extending/extending.rst:992 +#: extending/extending.rst:737 msgid "" "The function :c:func:`PyImport_AddModule` also returns a borrowed reference, " "even though it may actually create the object it returns: this is possible " @@ -1457,15 +1076,16 @@ msgstr "" "empruntée, même si elle peut en fait créer l'objet qu'elle renvoie : c'est " "possible car une référence à l'objet est stockée dans ``sys.modules``." -#: extending/extending.rst:996 +#: extending/extending.rst:741 msgid "" "When you pass an object reference into another function, in general, the " "function borrows the reference from you --- if it needs to store it, it will " "use :c:func:`Py_INCREF` to become an independent owner. There are exactly " -"two important exceptions to this rule: :c:func:`PyTuple_SetItem` and :c:func:" -"`PyList_SetItem`. These functions take over ownership of the item passed to " -"them --- even if they fail! (Note that :c:func:`PyDict_SetItem` and friends " -"don't take over ownership --- they are \"normal.\")" +"two important exceptions to this rule: :c:func:`PyTuple_SetItem` " +"and :c:func:`PyList_SetItem`. These functions take over ownership of the " +"item passed to them --- even if they fail! (Note " +"that :c:func:`PyDict_SetItem` and friends don't take over ownership --- they " +"are \"normal.\")" msgstr "" "Lorsque vous passez une référence d'objet dans une autre fonction, en " "général, la fonction vous emprunte la référence — si elle a besoin de la " @@ -1476,7 +1096,7 @@ msgstr "" "que :c:func:`PyDict_SetItem` et compagnie ne prennent pas la possession de " "l'objet, elles sont « normales ».)" -#: extending/extending.rst:1004 +#: extending/extending.rst:749 msgid "" "When a C function is called from Python, it borrows references to its " "arguments from the caller. The caller owns a reference to the object, so " @@ -1491,7 +1111,7 @@ msgstr "" "doit être stockée ou transmise qu'elle doit être transformée en référence " "possédée en appelant :c:func:`Py_INCREF`." -#: extending/extending.rst:1010 +#: extending/extending.rst:755 msgid "" "The object reference returned from a C function that is called from Python " "must be an owned reference --- ownership is transferred from the function to " @@ -1501,11 +1121,11 @@ msgstr "" "être une référence détenue en propre — la possession est transférée de la " "fonction à son appelant." -#: extending/extending.rst:1018 +#: extending/extending.rst:763 msgid "Thin Ice" msgstr "Terrain dangereux" -#: extending/extending.rst:1020 +#: extending/extending.rst:765 msgid "" "There are a few situations where seemingly harmless use of a borrowed " "reference can lead to problems. These all have to do with implicit " @@ -1517,7 +1137,7 @@ msgstr "" "lien avec des invocations implicites de l’interpréteur et peuvent amener le " "propriétaire d'une référence à s'en défaire." -#: extending/extending.rst:1024 +#: extending/extending.rst:769 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " @@ -1527,7 +1147,7 @@ msgstr "" "de :c:func:`Py_DECREF` à un objet non relié lors de l'emprunt d'une " "référence à un élément de liste. Par exemple ::" -#: extending/extending.rst:1036 +#: extending/extending.rst:781 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " @@ -1537,7 +1157,7 @@ msgstr "" "``list[1]`` par la valeur ``0``, et enfin affiche la référence empruntée. " "Ça a l'air inoffensif, n'est-ce pas ? Mais ce n'est pas le cas !" -#: extending/extending.rst:1040 +#: extending/extending.rst:785 #, fuzzy msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " @@ -1545,17 +1165,24 @@ msgid "" "of the original item 1. Now let's suppose the original item 1 was an " "instance of a user-defined class, and let's further suppose that the class " "defined a :meth:`!__del__` method. If this class instance has a reference " -"count of 1, disposing of it will call its :meth:`!__del__` method." +"count of 1, disposing of it will call its :meth:`!__del__` method. " +"Internally, :c:func:`PyList_SetItem` calls :c:func:`Py_DECREF` on the " +"replaced item, which invokes replaced item's " +"corresponding :c:member:`~PyTypeObject.tp_dealloc` function. During " +"deallocation, :c:member:`~PyTypeObject.tp_dealloc` " +"calls :c:member:`~PyTypeObject.tp_finalize`, which is mapped to the :meth:`!" +"__del__` method for class instances (see :pep:`442`). This entire sequence " +"happens synchronously within the :c:func:`PyList_SetItem` call." msgstr "" "Suivons le flux de contrôle dans :c:func:`PyList_SetItem`. La liste possède " "des références à tous ses éléments, donc quand l'élément 1 est remplacé, " "elle doit se débarrasser de l'élément 1 original. Supposons maintenant que " "l'élément 1 original était une instance d'une classe définie par " -"l'utilisateur, et supposons en outre que la classe définisse une méthode :" -"meth:`__del__`. Si l'instance de cette classe a un nombre des références de " -"1, sa destruction appellera sa méthode :meth:`__del__`." +"l'utilisateur, et supposons en outre que la classe définisse une " +"méthode :meth:`__del__`. Si l'instance de cette classe a un nombre des " +"références de 1, sa destruction appellera sa méthode :meth:`__del__`." -#: extending/extending.rst:1047 +#: extending/extending.rst:799 #, fuzzy msgid "" "Since it is written in Python, the :meth:`!__del__` method can execute " @@ -1574,7 +1201,7 @@ msgstr "" "supposant que ce soit la dernière référence à cet objet, elle libérerait la " "mémoire qui lui est associée, invalidant ainsi ``item``." -#: extending/extending.rst:1055 +#: extending/extending.rst:807 msgid "" "The solution, once you know the source of the problem, is easy: temporarily " "increment the reference count. The correct version of the function reads::" @@ -1583,7 +1210,7 @@ msgstr "" "simple : incrémentez temporairement le compteur de références. La version " "correcte de la fonction est ::" -#: extending/extending.rst:1069 +#: extending/extending.rst:821 #, fuzzy msgid "" "This is a true story. An older version of Python contained variants of this " @@ -1592,16 +1219,18 @@ msgid "" msgstr "" "C'est une histoire vraie. Une ancienne version de Python contenait des " "variantes de ce bogue et quelqu'un a passé beaucoup de temps dans un " -"débogueur C pour comprendre pourquoi il arrivait que ses méthodes :meth:" -"`__del__` échouent…" +"débogueur C pour comprendre pourquoi il arrivait que ses " +"méthodes :meth:`__del__` échouent…" -#: extending/extending.rst:1073 +#: extending/extending.rst:825 +#, fuzzy msgid "" "The second case of problems with a borrowed reference is a variant involving " "threads. Normally, multiple threads in the Python interpreter can't get in " -"each other's way, because there is a global lock protecting Python's entire " -"object space. However, it is possible to temporarily release this lock " -"using the macro :c:macro:`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it " +"each other's way, because there is a :term:`global lock ` protecting Python's entire object space. However, it is possible to " +"temporarily release this lock using the " +"macro :c:macro:`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it " "using :c:macro:`Py_END_ALLOW_THREADS`. This is common around blocking I/O " "calls, to let other threads use the processor while waiting for the I/O to " "complete. Obviously, the following function has the same problem as the " @@ -1611,18 +1240,18 @@ msgstr "" "impliquant des fils d'exécution. Normalement, plusieurs threads dans " "l'interpréteur Python ne peuvent pas se gêner mutuellement, car il existe un " "verrou global protégeant tout l'espace objet de Python. Cependant, il est " -"possible de libérer temporairement ce verrou en utilisant la macro :c:macro:" -"`Py_BEGIN_ALLOW_THREADS`, et de le ré-acquérir en utilisant :c:macro:" -"`Py_END_ALLOW_THREADS`. Ceci est un procédé courant pour bloquer les appels " -"d'entrées/sorties, afin de permettre aux autres threads d'utiliser le " -"processeur en attendant que les E/S soient terminées. Évidemment, la " -"fonction suivante a le même problème que la précédente ::" - -#: extending/extending.rst:1096 +"possible de libérer temporairement ce verrou en utilisant la " +"macro :c:macro:`Py_BEGIN_ALLOW_THREADS`, et de le ré-acquérir en " +"utilisant :c:macro:`Py_END_ALLOW_THREADS`. Ceci est un procédé courant pour " +"bloquer les appels d'entrées/sorties, afin de permettre aux autres threads " +"d'utiliser le processeur en attendant que les E/S soient terminées. " +"Évidemment, la fonction suivante a le même problème que la précédente ::" + +#: extending/extending.rst:849 msgid "NULL Pointers" msgstr "Pointeurs ``NULL``" -#: extending/extending.rst:1098 +#: extending/extending.rst:851 msgid "" "In general, functions that take object references as arguments do not expect " "you to pass them ``NULL`` pointers, and will dump core (or cause later core " @@ -1644,27 +1273,27 @@ msgstr "" "devait tester pour ``NULL``, il y aurait beaucoup de tests redondants et le " "code s'exécuterait plus lentement." -#: extending/extending.rst:1106 +#: extending/extending.rst:859 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " "a function that may raise an exception." msgstr "" "Il est préférable de tester la présence de ``NULL`` uniquement au début : " -"lorsqu'un pointeur qui peut être ``NULL`` est reçu, par exemple, de :c:func:" -"`malloc` ou d'une fonction qui peut lever une exception." +"lorsqu'un pointeur qui peut être ``NULL`` est reçu, par exemple, " +"de :c:func:`malloc` ou d'une fonction qui peut lever une exception." -#: extending/extending.rst:1110 +#: extending/extending.rst:863 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " -"``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" -"func:`Py_XDECREF` do." +"``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` " +"and :c:func:`Py_XDECREF` do." msgstr "" "Les macros :c:func:`Py_INCREF` et :c:func:`Py_DECREF` ne vérifient pas les " -"pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` et :c:" -"func:`Py_XDECREF` le font." +"pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` " +"et :c:func:`Py_XDECREF` le font." -#: extending/extending.rst:1114 +#: extending/extending.rst:867 msgid "" "The macros for checking for a particular object type (``Pytype_Check()``) " "don't check for ``NULL`` pointers --- again, there is much code that calls " @@ -1679,17 +1308,18 @@ msgstr "" "des tests redondants. Il n'y a pas de variantes avec la vérification " "``NULL``." -#: extending/extending.rst:1120 +#: extending/extending.rst:873 +#, fuzzy msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " -"guarantees that it is always a tuple [#]_." +"guarantees that it is always a tuple [#old-calling-convention]_." msgstr "" "Le mécanisme d'appel de fonctions C garantit que la liste d'arguments passée " "aux fonctions C (``args`` dans les exemples) n'est jamais ``NULL``. En fait, " "il garantit qu'il s'agit toujours d'un *n*-uplet [#]_." -#: extending/extending.rst:1124 +#: extending/extending.rst:877 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." @@ -1697,11 +1327,11 @@ msgstr "" "C'est une grave erreur de laisser un pointeur ``NULL`` « s'échapper » vers " "l'utilisateur Python." -#: extending/extending.rst:1135 +#: extending/extending.rst:888 msgid "Writing Extensions in C++" msgstr "Écrire des extensions en C++" -#: extending/extending.rst:1137 +#: extending/extending.rst:890 msgid "" "It is possible to write extension modules in C++. Some restrictions apply. " "If the main program (the Python interpreter) is compiled and linked by the C " @@ -1725,11 +1355,11 @@ msgstr "" "``__cplusplus`` est défini (tous les compilateurs C++ récents définissent ce " "symbole)." -#: extending/extending.rst:1151 +#: extending/extending.rst:904 msgid "Providing a C API for an Extension Module" msgstr "Fournir une API en langage C pour un module d'extension" -#: extending/extending.rst:1156 +#: extending/extending.rst:906 msgid "" "Many extension modules just provide new functions and types to be used from " "Python, but sometimes the code in an extension module can be useful for " @@ -1749,7 +1379,7 @@ msgstr "" "collection devrait posséder un ensemble de fonctions C pour une manipulation " "directe à partir d'autres modules d'extension." -#: extending/extending.rst:1164 +#: extending/extending.rst:914 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -1779,25 +1409,26 @@ msgstr "" "*Unix*). Et même si les symboles sont globalement visibles, le module dont " "on souhaite appeler les fonctions n'est peut-être pas encore chargé !" -#: extending/extending.rst:1176 +#: extending/extending.rst:926 +#, fuzzy msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " "declared ``static``, except for the module's initialization function, in " -"order to avoid name clashes with other extension modules (as discussed in " -"section :ref:`methodtable`). And it means that symbols that *should* be " -"accessible from other extension modules must be exported in a different way." +"order to avoid name clashes with other extension modules. And it means that " +"symbols that *should* be accessible from other extension modules must be " +"exported in a different way." msgstr "" "La portabilité exige donc de ne faire aucune supposition sur la visibilité " "des symboles. Cela signifie que tous les symboles des modules d'extension " "doivent être déclarés ``static``, à l'exception de la fonction " "d'initialisation du module, afin d'éviter les conflits de noms avec les " -"autres modules d'extension (comme discuté dans la section :ref:" -"`methodtable`). Et cela signifie que les symboles qui *devraient* être " -"accessibles à partir d'autres modules d'extension doivent être exportés " -"d'une manière différente." +"autres modules d'extension (comme discuté dans la " +"section :ref:`methodtable`). Et cela signifie que les symboles qui " +"*devraient* être accessibles à partir d'autres modules d'extension doivent " +"être exportés d'une manière différente." -#: extending/extending.rst:1183 +#: extending/extending.rst:933 msgid "" "Python provides a special mechanism to pass C-level information (pointers) " "from one extension module to another one: Capsules. A Capsule is a Python " @@ -1818,7 +1449,7 @@ msgstr "" "importer ce module, récupérer la valeur de ce nom, puis récupérer le " "pointeur de la Capsule." -#: extending/extending.rst:1191 +#: extending/extending.rst:941 msgid "" "There are many ways in which Capsules can be used to export the C API of an " "extension module. Each function could get its own Capsule, or all C API " @@ -1835,7 +1466,7 @@ msgstr "" "différentes manières entre le module fournissant le code et les modules " "clients." -#: extending/extending.rst:1197 +#: extending/extending.rst:947 msgid "" "Whichever method you choose, it's important to name your Capsules properly. " "The function :c:func:`PyCapsule_New` takes a name parameter (:c:expr:`const " @@ -1852,7 +1483,7 @@ msgstr "" "concernant un éventuel conflit de types, car il n'y a pas de moyen de " "distinguer deux ou plusieurs Capsules non nommées entre elles." -#: extending/extending.rst:1204 +#: extending/extending.rst:954 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" @@ -1860,7 +1491,7 @@ msgstr "" "En particulier, les capsules utilisées pour exposer les API C doivent " "recevoir un nom suivant cette convention ::" -#: extending/extending.rst:1209 +#: extending/extending.rst:959 msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " "C API provided via a Capsule, but only if the Capsule's name matches this " @@ -1873,7 +1504,7 @@ msgstr "" "utilisateurs d'API C un degré élevé de certitude que la Capsule qu'ils " "chargent contient l'API C correcte." -#: extending/extending.rst:1214 +#: extending/extending.rst:964 msgid "" "The following example demonstrates an approach that puts most of the burden " "on the writer of the exporting module, which is appropriate for commonly " @@ -1892,14 +1523,14 @@ msgstr "" "le module et de récupérer ses pointeurs d'API C. Les modules clients n'ont " "qu'à appeler cette macro avant d'accéder à l'API C." -#: extending/extending.rst:1222 +#: extending/extending.rst:972 #, fuzzy msgid "" "The exporting module is a modification of the :mod:`!spam` module from " -"section :ref:`extending-simpleexample`. The function :func:`!spam.system` " -"does not call the C library function :c:func:`system` directly, but a " -"function :c:func:`!PySpam_System`, which would of course do something more " -"complicated in reality (such as adding \"spam\" to every command). This " +"the :ref:`tutorial `. The function :func:`!" +"spam.system` does not call the C library function :c:func:`system` directly, " +"but a function :c:func:`!PySpam_System`, which would of course do something " +"more complicated in reality (such as adding \"spam\" to every command). This " "function :c:func:`!PySpam_System` is also exported to other extension " "modules." msgstr "" @@ -1911,7 +1542,7 @@ msgstr "" "Cette fonction :c:func:`PySpam_System` est également exportée vers d'autres " "modules d'extension." -#: extending/extending.rst:1229 +#: extending/extending.rst:980 #, fuzzy msgid "" "The function :c:func:`!PySpam_System` is a plain C function, declared " @@ -1920,32 +1551,33 @@ msgstr "" "La fonction :c:func:`PySpam_System` est une simple fonction C, déclarée " "``static`` comme tout le reste ::" -#: extending/extending.rst:1238 +#: extending/extending.rst:989 #, fuzzy msgid "The function :c:func:`!spam_system` is modified in a trivial way::" msgstr "La fonction :c:func:`spam_system` est modifiée de manière simple ::" -#: extending/extending.rst:1252 +#: extending/extending.rst:1003 msgid "In the beginning of the module, right after the line ::" msgstr "Au début du module, immédiatement après la ligne ::" -#: extending/extending.rst:1256 +#: extending/extending.rst:1007 msgid "two more lines must be added::" msgstr "on doit ajouter deux lignes supplémentaires ::" -#: extending/extending.rst:1261 +#: extending/extending.rst:1012 +#, fuzzy msgid "" "The ``#define`` is used to tell the header file that it is being included in " -"the exporting module, not a client module. Finally, the module's " -"initialization function must take care of initializing the C API pointer " -"array::" +"the exporting module, not a client module. Finally, the " +"module's :c:data:`mod_exec ` function must take care of " +"initializing the C API pointer array::" msgstr "" "L'indicateur ``#define`` est utilisé pour indiquer au fichier d'en-tête " "qu'il est inclus dans le module d'exportation, et non dans un module client. " "Enfin, la fonction d'initialisation du module doit prendre en charge " "l'initialisation du tableau de pointeurs de l'API C ::" -#: extending/extending.rst:1290 +#: extending/extending.rst:1035 #, fuzzy msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " @@ -1954,37 +1586,38 @@ msgstr "" "Notez que ``PySpam_API`` est déclaré ``static`` ; sinon le tableau de " "pointeurs disparaîtrait lorsque :func:`PyInit_spam` se finit !" -#: extending/extending.rst:1293 +#: extending/extending.rst:1038 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" msgstr "" -"L'essentiel du travail se trouve dans le fichier d'en-tête :file:`spammodule." -"h`, qui ressemble à ceci ::" +"L'essentiel du travail se trouve dans le fichier d'en-" +"tête :file:`spammodule.h`, qui ressemble à ceci ::" -#: extending/extending.rst:1344 +#: extending/extending.rst:1089 #, fuzzy msgid "" -"All that a client module must do in order to have access to the function :c:" -"func:`!PySpam_System` is to call the function (or rather macro) :c:func:`!" -"import_spam` in its initialization function::" +"All that a client module must do in order to have access to the " +"function :c:func:`!PySpam_System` is to call the function (or rather " +"macro) :c:func:`!import_spam` in its :c:data:`mod_exec ` " +"function::" msgstr "" -"Tout ce qu'un module client doit faire pour avoir accès à la fonction :c:" -"func:`PySpam_System` est d'appeler la fonction (ou plutôt la macro) :c:func:" -"`import_spam` dans sa fonction d'initialisation ::" +"Tout ce qu'un module client doit faire pour avoir accès à la " +"fonction :c:func:`PySpam_System` est d'appeler la fonction (ou plutôt la " +"macro) :c:func:`import_spam` dans sa fonction d'initialisation ::" -#: extending/extending.rst:1362 +#: extending/extending.rst:1103 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " "function that is exported, so it has to be learned only once." msgstr "" -"Le principal inconvénient de cette approche est que le fichier :file:" -"`spammodule.h` est assez compliqué. Cependant, la structure de base est la " -"même pour chaque fonction exportée, ce qui fait qu'elle ne doit être apprise " -"qu'une seule fois." +"Le principal inconvénient de cette approche est que le " +"fichier :file:`spammodule.h` est assez compliqué. Cependant, la structure de " +"base est la même pour chaque fonction exportée, ce qui fait qu'elle ne doit " +"être apprise qu'une seule fois." -#: extending/extending.rst:1366 +#: extending/extending.rst:1107 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1998,22 +1631,14 @@ msgstr "" "l'allocation de la mémoire et la dés-allocation du pointeur stocké dans un " "objet Capsule. Les détails sont décrits dans le manuel de référence de l'API " "Python/C dans la section :ref:`capsules` et dans l'implémentation des " -"Capsules (fichiers :file:`Include/pycapsule.h` et :file:`Objects/pycapsule." -"c` dans la distribution du code source Python)." +"Capsules (fichiers :file:`Include/pycapsule.h` et :file:`Objects/" +"pycapsule.c` dans la distribution du code source Python)." -#: extending/extending.rst:1374 +#: extending/extending.rst:1115 msgid "Footnotes" msgstr "Notes" -#: extending/extending.rst:1375 -msgid "" -"An interface for this function already exists in the standard module :mod:" -"`os` --- it was chosen as a simple and straightforward example." -msgstr "" -"Une interface pour cette fonction existe déjà dans le module standard :mod:" -"`os`, elle a été choisie comme un exemple simple et direct." - -#: extending/extending.rst:1378 +#: extending/extending.rst:1116 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." @@ -2021,7 +1646,7 @@ msgstr "" "L'expression « emprunter une référence » n'est pas tout à fait correcte, car " "le propriétaire a toujours une copie de la référence." -#: extending/extending.rst:1381 +#: extending/extending.rst:1119 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " @@ -2031,7 +1656,7 @@ msgstr "" "pas**, le compte de référence lui-même pourrait être en mémoire libérée et " "peut donc être réutilisé pour un autre objet !" -#: extending/extending.rst:1385 +#: extending/extending.rst:1124 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." @@ -2040,6 +1665,453 @@ msgstr "" "nommage anciennes, qu'on retrouve encore assez souvent dans beaucoup de code " "existant." +#~ msgid "Extending Python with C or C++" +#~ msgstr "Étendre Python en C ou C++" + +#~ msgid "" +#~ "It is quite easy to add new built-in modules to Python, if you know how " +#~ "to program in C. Such :dfn:`extension modules` can do two things that " +#~ "can't be done directly in Python: they can implement new built-in object " +#~ "types, and they can call C library functions and system calls." +#~ msgstr "" +#~ "Il est relativement facile d'ajouter de nouveaux modules à Python, si " +#~ "vous savez programmer en C. Ces :dfn:`modules d'extension` permettent " +#~ "deux choses qui ne sont pas possibles directement en Python : ils peuvent " +#~ "définir de nouveaux types natifs et peuvent appeler des fonctions de " +#~ "bibliothèques C ou faire des appels systèmes." + +#~ msgid "" +#~ "To support extensions, the Python API (Application Programmers Interface) " +#~ "defines a set of functions, macros and variables that provide access to " +#~ "most aspects of the Python run-time system. The Python API is " +#~ "incorporated in a C source file by including the header ``\"Python.h\"``." +#~ msgstr "" +#~ "Pour gérer les extensions, l'API Python (*Application Programmer " +#~ "Interface*) définit un ensemble de fonctions, macros et variables qui " +#~ "donnent accès à la plupart des aspects du système d'exécution de Python. " +#~ "L'API Python est incorporée dans un fichier source C en incluant l'en-" +#~ "tête ``Python.h``." + +#~ msgid "" +#~ "The compilation of an extension module depends on its intended use as " +#~ "well as on your system setup; details are given in later chapters." +#~ msgstr "" +#~ "La compilation d'un module d'extension dépend de l'usage prévu et de la " +#~ "configuration du système, plus de détails peuvent être trouvés dans les " +#~ "chapitres suivants." + +# suit un : +#~ msgid "" +#~ "The C extension interface is specific to CPython, and extension modules " +#~ "do not work on other Python implementations. In many cases, it is " +#~ "possible to avoid writing C extensions and preserve portability to other " +#~ "implementations. For example, if your use case is calling C library " +#~ "functions or system calls, you should consider using the :mod:`ctypes` " +#~ "module or the `cffi `_ library rather than " +#~ "writing custom C code. These modules let you write Python code to " +#~ "interface with C code and are more portable between implementations of " +#~ "Python than writing and compiling a C extension module." +#~ msgstr "" +#~ "l'interface d'extension C est spécifique à *CPython*, et les modules " +#~ "d'extension ne fonctionnent pas sur les autres implémentations de Python. " +#~ "Dans de nombreux cas, il est possible d'éviter la rédaction des " +#~ "extensions en C et ainsi préserver la portabilité vers d'autres " +#~ "implémentations. Par exemple, si vous devez appeler une fonction de la " +#~ "bibliothèque C ou faire un appel système, vous devriez envisager " +#~ "d'utiliser le module :mod:`ctypes` ou d'utiliser la bibliothèque `cffi " +#~ "`_ plutôt que d'écrire du code C sur " +#~ "mesure. Ces modules vous permettent d'écrire du code Python s'interfaçant " +#~ "avec le code C et sont plus portables entre les implémentations de Python " +#~ "que l'écriture et la compilation d'une d'extension C." + +#~ msgid "A Simple Example" +#~ msgstr "Un exemple simple" + +#~ msgid "" +#~ "Let's create an extension module called ``spam`` (the favorite food of " +#~ "Monty Python fans...) and let's say we want to create a Python interface " +#~ "to the C library function :c:func:`system` [#]_. This function takes a " +#~ "null-terminated character string as argument and returns an integer. We " +#~ "want this function to be callable from Python as follows:" +#~ msgstr "" +#~ "Créons un module d'extension appelé ``spam`` (la nourriture préférée de " +#~ "fans des *Monty Python*) et disons que nous voulons créer une interface " +#~ "Python à la fonction de la bibliothèque C :c:func:`system` [#]_. Cette " +#~ "fonction prend une chaîne de caractères à terminaison nulle comme " +#~ "argument et renvoie un entier. Nous voulons que cette fonction soit " +#~ "appelable à partir de Python comme suit :" + +#~ msgid "" +#~ "Begin by creating a file :file:`spammodule.c`. (Historically, if a " +#~ "module is called ``spam``, the C file containing its implementation is " +#~ "called :file:`spammodule.c`; if the module name is very long, like " +#~ "``spammify``, the module name can be just :file:`spammify.c`.)" +#~ msgstr "" +#~ "Commençons par créer un fichier :file:`spammodule.c` (historiquement, si " +#~ "un module se nomme ``spam``, le fichier C contenant son implémentation " +#~ "est appelé :file:`spammodule.c` ; si le nom du module est très long, " +#~ "comme ``spammify``, le nom du module peut être juste :file:`spammify.c`)." + +#~ msgid "The first two lines of our file can be::" +#~ msgstr "Les deux premières lignes de notre fichier peuvent être ::" + +#~ msgid "" +#~ "which pulls in the Python API (you can add a comment describing the " +#~ "purpose of the module and a copyright notice if you like)." +#~ msgstr "" +#~ "qui récupère l'API Python (vous pouvez ajouter un commentaire décrivant " +#~ "le but du module et un avis de droit d'auteur si vous le souhaitez)." + +# suit un : +#~ msgid "" +#~ "Since Python may define some pre-processor definitions which affect the " +#~ "standard headers on some systems, you *must* include :file:`Python.h` " +#~ "before any standard headers are included." +#~ msgstr "" +#~ "il est possible que Python déclare certaines définitions pré-processeur " +#~ "qui affectent les têtes standards sur certains systèmes, vous *devez* " +#~ "donc inclure :file:`Python.h` avant les en-têtes standards." + +#~ msgid "" +#~ "The next thing we add to our module file is the C function that will be " +#~ "called when the Python expression ``spam.system(string)`` is evaluated " +#~ "(we'll see shortly how it ends up being called)::" +#~ msgstr "" +#~ "La prochaine chose que nous ajoutons à notre fichier de module est la " +#~ "fonction C qui sera appelée lorsque l'expression Python " +#~ "``spam.system(chaîne)`` sera évaluée (nous verrons bientôt comment elle " +#~ "finit par être appelée) ::" + +#~ msgid "" +#~ "There is a straightforward translation from the argument list in Python " +#~ "(for example, the single expression ``\"ls -l\"``) to the arguments " +#~ "passed to the C function. The C function always has two arguments, " +#~ "conventionally named *self* and *args*." +#~ msgstr "" +#~ "Il y a une correspondance directe de la liste des arguments en Python " +#~ "(par exemple, l'expression ``\"ls -l\"``) aux arguments passés à la " +#~ "fonction C. La fonction C a toujours deux arguments, appelés par " +#~ "convention *self* et *args*." + +#~ msgid "" +#~ "The *self* argument points to the module object for module-level " +#~ "functions; for a method it would point to the object instance." +#~ msgstr "" +#~ "Pour les fonctions au niveau du module, l'argument *self* pointe sur " +#~ "l'objet module, pour une méthode, il pointe sur l'instance de l'objet." + +#~ msgid "" +#~ "The *args* argument will be a pointer to a Python tuple object containing " +#~ "the arguments. Each item of the tuple corresponds to an argument in the " +#~ "call's argument list. The arguments are Python objects --- in order to " +#~ "do anything with them in our C function we have to convert them to C " +#~ "values. The function :c:func:`PyArg_ParseTuple` in the Python API checks " +#~ "the argument types and converts them to C values. It uses a template " +#~ "string to determine the required types of the arguments as well as the " +#~ "types of the C variables into which to store the converted values. More " +#~ "about this later." +#~ msgstr "" +#~ "L'argument *args* sera un pointeur vers un *n*-uplet Python contenant les " +#~ "arguments. Chaque élément du *n*-uplet correspond à un argument dans la " +#~ "liste des arguments de l'appel. Les arguments sont des objets Python, " +#~ "afin d'en faire quelque chose dans notre fonction C, nous devons les " +#~ "convertir en valeurs C. La fonction :c:func:`PyArg_ParseTuple` de l'API " +#~ "Python vérifie les types des arguments et les convertit en valeurs C. " +#~ "Elle utilise un modèle sous forme de chaîne pour déterminer les types " +#~ "requis des arguments ainsi que les types de variables C dans lequel " +#~ "stocker les valeurs converties. Nous approfondirons ceci plus tard." + +#~ msgid "" +#~ ":c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have " +#~ "the right type and its components have been stored in the variables whose " +#~ "addresses are passed. It returns false (zero) if an invalid argument " +#~ "list was passed. In the latter case it also raises an appropriate " +#~ "exception so the calling function can return ``NULL`` immediately (as we " +#~ "saw in the example)." +#~ msgstr "" +#~ ":c:func:`PyArg_ParseTuple` renvoie vrai (pas zéro) si tous les arguments " +#~ "ont le bon type et que ses composants ont été stockés dans les variables " +#~ "dont les adresses ont été données en entrée. Elle renvoie faux (zéro) si " +#~ "une liste d'arguments invalide a été passée. Dans ce dernier cas, elle " +#~ "lève également une exception appropriée de sorte que la fonction d'appel " +#~ "puisse renvoyer ``NULL`` immédiatement (comme nous l'avons vu dans " +#~ "l'exemple)." + +#~ msgid "Back to the Example" +#~ msgstr "Retour vers l'exemple" + +#~ msgid "" +#~ "Going back to our example function, you should now be able to understand " +#~ "this statement::" +#~ msgstr "" +#~ "En revenant vers notre fonction exemple, vous devriez maintenant être " +#~ "capable de comprendre cette affirmation ::" + +#~ msgid "" +#~ "It returns ``NULL`` (the error indicator for functions returning object " +#~ "pointers) if an error is detected in the argument list, relying on the " +#~ "exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value " +#~ "of the argument has been copied to the local variable :c:data:`!" +#~ "command`. This is a pointer assignment and you are not supposed to " +#~ "modify the string to which it points (so in Standard C, the " +#~ "variable :c:data:`!command` should properly be declared as ``const char " +#~ "*command``)." +#~ msgstr "" +#~ "Elle renvoie ``NULL`` (l'indicateur d'erreur pour les fonctions renvoyant " +#~ "des pointeurs d'objet) si une erreur est détectée dans la liste des " +#~ "arguments, se fiant à l'exception définie par :c:func:`PyArg_ParseTuple`. " +#~ "Autrement, la valeur chaîne de l'argument a été copiée dans la variable " +#~ "locale :c:data:`!command`. Il s'agit d'une attribution de pointeur et " +#~ "vous n'êtes pas supposés modifier la chaîne vers laquelle il pointe (donc " +#~ "en C Standard, la variable :c:data:`!command` doit être clairement " +#~ "déclarée comme ``const char *command``)." + +#~ msgid "" +#~ "The next statement is a call to the Unix function :c:func:`system`, " +#~ "passing it the string we just got from :c:func:`PyArg_ParseTuple`::" +#~ msgstr "" +#~ "La prochaine instruction est un appel à la fonction " +#~ "Unix :c:func:`system`, en lui passant la chaîne que nous venons d'obtenir " +#~ "à partir de :c:func:`PyArg_ParseTuple` ::" + +#~ msgid "" +#~ "Our :func:`!spam.system` function must return the value of :c:data:`!sts` " +#~ "as a Python object. This is done using the " +#~ "function :c:func:`PyLong_FromLong`. ::" +#~ msgstr "" +#~ "Notre fonction :func:`!spam.system` doit renvoyer la valeur de :c:data:`!" +#~ "sts` comme un objet Python. Cela est effectué par l'utilisation de la " +#~ "fonction :c:func:`PyLong_FromLong`. ::" + +#~ msgid "" +#~ "In this case, it will return an integer object. (Yes, even integers are " +#~ "objects on the heap in Python!)" +#~ msgstr "" +#~ "Dans ce cas, elle renvoie un objet de type entier (oui, même les entiers " +#~ "sont des objets, stockés dans le tas, en Python !)." + +#~ msgid "" +#~ "If you have a C function that returns no useful argument (a function " +#~ "returning :c:expr:`void`), the corresponding Python function must return " +#~ "``None``. You need this idiom to do so (which is implemented by " +#~ "the :c:macro:`Py_RETURN_NONE` macro)::" +#~ msgstr "" +#~ "Si vous avez une fonction C qui ne renvoie aucun argument utile (une " +#~ "fonction renvoyant :c:expr:`void`), la fonction Python correspondante " +#~ "doit renvoyer ``None``. Vous aurez besoin de cet idiome pour cela (qui " +#~ "est implémenté par la macro :c:macro:`Py_RETURN_NONE`) ::" + +#~ msgid "" +#~ ":c:data:`Py_None` is the C name for the special Python object ``None``. " +#~ "It is a genuine Python object rather than a ``NULL`` pointer, which means " +#~ "\"error\" in most contexts, as we have seen." +#~ msgstr "" +#~ ":c:data:`Py_None` est la dénomination en C pour l'objet spécial Python " +#~ "``None``. C'est un authentique objet Python plutôt qu'un pointeur " +#~ "``NULL`` qui, dans la plupart des situations, signifie qu'une erreur est " +#~ "survenue comme nous l'avons vu." + +#~ msgid "The Module's Method Table and Initialization Function" +#~ msgstr "La fonction d'initialisation et le tableau des méthodes du module" + +#, fuzzy +#~ msgid "" +#~ "I promised to show how :c:func:`!spam_system` is called from Python " +#~ "programs. First, we need to list its name and address in a \"method " +#~ "table\"::" +#~ msgstr "" +#~ "Nous avons promis de montrer comment :c:func:`spam_system` est appelée " +#~ "depuis les programmes Python. D'abord, nous avons besoin d'avoir son nom " +#~ "et son adresse dans un « tableau des méthodes » ::" + +#~ msgid "" +#~ "Note the third entry (``METH_VARARGS``). This is a flag telling the " +#~ "interpreter the calling convention to be used for the C function. It " +#~ "should normally always be ``METH_VARARGS`` or ``METH_VARARGS | " +#~ "METH_KEYWORDS``; a value of ``0`` means that an obsolete variant " +#~ "of :c:func:`PyArg_ParseTuple` is used." +#~ msgstr "" +#~ "Notez la troisième entrée (``METH_VARARGS``). C'est un indicateur du type " +#~ "de convention à utiliser pour la fonction C, à destination de " +#~ "l'interpréteur. Il doit valoir normalement ``METH_VARARGS`` ou " +#~ "``METH_VARARGS | METH_KEYWORDS`` ; la valeur ``0`` indique qu'une " +#~ "variante obsolète de :c:func:`PyArg_ParseTuple` est utilisée." + +#~ msgid "" +#~ "When using only ``METH_VARARGS``, the function should expect the Python-" +#~ "level parameters to be passed in as a tuple acceptable for parsing " +#~ "via :c:func:`PyArg_ParseTuple`; more information on this function is " +#~ "provided below." +#~ msgstr "" +#~ "Si seulement ``METH_VARARGS`` est utilisé, la fonction s'attend à ce que " +#~ "les paramètres Python soient passés comme un *n*-uplet que l'on peut " +#~ "analyser *via* :c:func:`PyArg_ParseTuple` ; des informations " +#~ "supplémentaires sont fournies plus bas." + +#~ msgid "" +#~ "The method table must be referenced in the module definition structure::" +#~ msgstr "" +#~ "Le tableau des méthodes doit être référencé dans la structure de " +#~ "définition du module ::" + +#, fuzzy +#~ msgid "" +#~ "This structure, in turn, must be passed to the interpreter in the " +#~ "module's initialization function. The initialization function must be " +#~ "named :c:func:`!PyInit_name`, where *name* is the name of the module, and " +#~ "should be the only non-\\ ``static`` item defined in the module file::" +#~ msgstr "" +#~ "Cette structure, à son tour, doit être transmise à l'interpréteur dans la " +#~ "fonction d'initialisation du module. La fonction d'initialisation doit " +#~ "être nommée :c:func:`PyInit_name`, où *nom* est le nom du module, et doit " +#~ "être le seul élément non ``static`` défini dans le fichier du module ::" + +#, fuzzy +#~ msgid "" +#~ "Note that :c:macro:`PyMODINIT_FUNC` declares the function as ``PyObject " +#~ "*`` return type, declares any special linkage declarations required by " +#~ "the platform, and for C++ declares the function as ``extern \"C\"``." +#~ msgstr "" +#~ "Notez que *PyMODINIT_FUNC* déclare la fonction comme renvoyant un objet " +#~ "de type ``PyObject *``, déclare également toute déclaration de liaison " +#~ "spéciale requise par la plate-forme et, pour le C++, déclare la fonction " +#~ "comme ``extern C``." + +#, fuzzy +#~ msgid "" +#~ "When embedding Python, the :c:func:`!PyInit_spam` function is not called " +#~ "automatically unless there's an entry in the :c:data:`!PyImport_Inittab` " +#~ "table. To add the module to the initialization table, " +#~ "use :c:func:`PyImport_AppendInittab`, optionally followed by an import of " +#~ "the module::" +#~ msgstr "" +#~ "Lors de l'intégration de Python, la fonction :c:func:`PyInit_spam` n'est " +#~ "pas appelée automatiquement, sauf s'il y a une entrée dans la " +#~ "table :c:data:`PyImport_Inittab`. Pour ajouter le module au tableau " +#~ "d'initialisation, utilisez :c:func:`PyImport_AppendInittab`, suivie " +#~ "éventuellement d'une importation du module ::" + +#, fuzzy +#~ msgid "" +#~ "A more substantial example module is included in the Python source " +#~ "distribution as :file:`Modules/xxlimited.c`. This file may be used as a " +#~ "template or simply read as an example." +#~ msgstr "" +#~ "Un exemple de module plus substantiel est inclus dans la distribution des " +#~ "sources Python sous le nom :file:`Modules/xxmodule.c`. Ce fichier peut " +#~ "être utilisé comme modèle ou simplement lu comme exemple." + +#~ msgid "Compilation and Linkage" +#~ msgstr "Compilation et liaison" + +#~ msgid "" +#~ "There are two more things to do before you can use your new extension: " +#~ "compiling and linking it with the Python system. If you use dynamic " +#~ "loading, the details may depend on the style of dynamic loading your " +#~ "system uses; see the chapters about building extension modules " +#~ "(chapter :ref:`building`) and additional information that pertains only " +#~ "to building on Windows (chapter :ref:`building-on-windows`) for more " +#~ "information about this." +#~ msgstr "" +#~ "Il y a encore deux choses à faire avant de pouvoir utiliser votre " +#~ "nouvelle extension : la compiler et la lier au système Python. Si vous " +#~ "utilisez le chargement dynamique, les détails peuvent dépendre du style " +#~ "de chargement dynamique utilisé par votre système ; voir les chapitres " +#~ "sur la compilation de modules d'extension (chapitre :ref:`building`) et " +#~ "les informations supplémentaires concernant uniquement la construction " +#~ "sous Windows (chapitre :ref:`building-on-windows`) pour plus " +#~ "d'informations à ce sujet." + +#~ msgid "" +#~ "An interface for this function already exists in the standard " +#~ "module :mod:`os` --- it was chosen as a simple and straightforward " +#~ "example." +#~ msgstr "" +#~ "Une interface pour cette fonction existe déjà dans le module " +#~ "standard :mod:`os`, elle a été choisie comme un exemple simple et direct." + +#~ msgid "" +#~ "All user-visible symbols defined by :file:`Python.h` have a prefix of " +#~ "``Py`` or ``PY``, except those defined in standard header files. For " +#~ "convenience, and since they are used extensively by the Python " +#~ "interpreter, ``\"Python.h\"`` includes a few standard header files: " +#~ "````, ````, ````, and ````. If the " +#~ "latter header file does not exist on your system, it declares the " +#~ "functions :c:func:`malloc`, :c:func:`free` and :c:func:`realloc` directly." +#~ msgstr "" +#~ "Tous les symboles exposés par :file:`Python.h` sont préfixés de ``Py`` ou " +#~ "``PY``, sauf ceux qui sont définis dans les en-têtes standards. Pour le " +#~ "confort, et comme ils sont largement utilisés par l'interpréteur Python, " +#~ "``\"Python.h\"`` inclut lui-même quelques en-têtes standards : " +#~ "````, ````, ```` et ````. Si ce " +#~ "dernier n'existe pas sur votre système, il déclare les " +#~ "fonctions :c:func:`malloc`, :c:func:`free` et :c:func:`realloc` " +#~ "directement." + +#, fuzzy +#~ msgid "" +#~ "and initialize it in your module's initialization function (:c:func:`!" +#~ "PyInit_spam`) with an exception object::" +#~ msgstr "" +#~ "et initialisez-la dans la fonction d'initialisation de votre module " +#~ "(:c:func:`PyInit_spam`) avec un objet exception ::" + +#, fuzzy +#~ msgid "" +#~ "When the Python program imports module :mod:`!spam` for the first " +#~ "time, :c:func:`!PyInit_spam` is called. (See below for comments about " +#~ "embedding Python.) It calls :c:func:`PyModule_Create`, which returns a " +#~ "module object, and inserts built-in function objects into the newly " +#~ "created module based upon the table (an array of :c:type:`PyMethodDef` " +#~ "structures) found in the module definition. :c:func:`PyModule_Create` " +#~ "returns a pointer to the module object that it creates. It may abort " +#~ "with a fatal error for certain errors, or return ``NULL`` if the module " +#~ "could not be initialized satisfactorily. The init function must return " +#~ "the module object to its caller, so that it then gets inserted into " +#~ "``sys.modules``." +#~ msgstr "" +#~ "Lorsque le programme Python importe le module :mod:`spam` pour la " +#~ "première fois, :c:func:`PyInit_spam` est appelée (voir ci-dessous pour " +#~ "les commentaires sur l'intégration en Python). Elle " +#~ "appelle :c:func:`PyModule_Create`, qui renvoie un objet module et insère " +#~ "des objets fonction intégrés dans le module nouvellement créé en se " +#~ "basant sur le tableau (un tableau de structures :c:type:`PyMethodDef`) " +#~ "trouvée dans la définition du module. :c:func:`PyModule_Create` renvoie " +#~ "un pointeur vers l'objet module qu'il crée. Elle peut s'interrompre avec " +#~ "une erreur fatale pour certaines erreurs, ou renvoyer ``NULL`` si le " +#~ "module n'a pas pu être initialisé de manière satisfaisante. La fonction " +#~ "*init* doit renvoyer l'objet module à son appelant, afin qu'il soit " +#~ "ensuite inséré dans ``sys.modules``." + +# suit un : +#~ msgid "" +#~ "Removing entries from ``sys.modules`` or importing compiled modules into " +#~ "multiple interpreters within a process (or following a :c:func:`fork` " +#~ "without an intervening :c:func:`exec`) can create problems for some " +#~ "extension modules. Extension module authors should exercise caution when " +#~ "initializing internal data structures." +#~ msgstr "" +#~ "supprimer des entrées de ``sys.modules`` ou importer des modules compilés " +#~ "dans plusieurs interpréteurs au sein d'un même processus (ou le faire à " +#~ "la suite d'un :c:func:`fork` sans un :c:func:`exec` préalable) peut créer " +#~ "des problèmes pour certains modules d'extension. Les auteurs de modules " +#~ "d'extension doivent faire preuve de prudence lorsqu'ils initialisent des " +#~ "structures de données internes." + +# suit un : +#~ msgid "" +#~ "Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase " +#~ "initialization* (new in Python 3.5), where a PyModuleDef structure is " +#~ "returned from ``PyInit_spam``, and creation of the module is left to the " +#~ "import machinery. For details on multi-phase initialization, " +#~ "see :PEP:`489`." +#~ msgstr "" +#~ "contrairement à notre exemple de ``spam``, ``xxmodule`` utilise une " +#~ "*initialisation multi-phases* (nouveau en Python 3.5), où une structure " +#~ "*PyModuleDef* est renvoyée à partir de ``PyInit_spam``, et la création du " +#~ "module est laissée au mécanisme d'importation. Pour plus de détails sur " +#~ "l'initialisation multi-phases, voir :PEP:`489`." + #, fuzzy #~ msgid "PyObject_CallObject (C function)" #~ msgstr "PyObject_CallObject()" diff --git a/extending/first-extension-module.po b/extending/first-extension-module.po new file mode 100644 index 000000000..3fef01c15 --- /dev/null +++ b/extending/first-extension-module.po @@ -0,0 +1,727 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: extending/first-extension-module.rst:9 +msgid "Your first C API extension module" +msgstr "" + +#: extending/first-extension-module.rst:11 +msgid "" +"This tutorial will take you through creating a simple Python extension " +"module written in C or C++." +msgstr "" + +#: extending/first-extension-module.rst:14 +msgid "" +"We will use the low-level Python C API directly. For easier ways to create " +"extension modules, see the :ref:`recommended third party tools `." +msgstr "" + +#: extending/first-extension-module.rst:18 +msgid "" +"The tutorial assumes basic knowledge about Python: you should be able to " +"define functions in Python code before starting to write them in C. " +"See :ref:`tutorial-index` for an introduction to Python itself." +msgstr "" + +#: extending/first-extension-module.rst:22 +msgid "" +"The tutorial should be approachable for anyone who can write a basic C " +"library. While we will mention several concepts that a C beginner would not " +"be expected to know, like ``static`` functions or linkage declarations, " +"understanding these is not necessary for success." +msgstr "" + +#: extending/first-extension-module.rst:27 +msgid "" +"We will focus on giving you a \"feel\" of what Python's C API is like. It " +"will not teach you important concepts, like error handling and reference " +"counting, which are covered in later chapters." +msgstr "" + +#: extending/first-extension-module.rst:31 +msgid "" +"We will assume that you use a Unix-like system (including macOS and Linux), " +"or Windows. On other systems, you might need to adjust some details -- for " +"example, a system command name." +msgstr "" + +#: extending/first-extension-module.rst:36 +msgid "" +"You need to have a suitable C compiler and Python development headers " +"installed. On Linux, headers are often in a package like ``python3-dev`` or " +"``python3-devel``." +msgstr "" + +#: extending/first-extension-module.rst:40 +msgid "" +"You need to be able to install Python packages. This tutorial uses `pip " +"`__ (``pip install``), but you can substitute any tool " +"that can build and install ``pyproject.toml``-based projects, like `uv " +"`_ (``uv pip install``). Preferably, have " +"a :ref:`virtual environment ` activated." +msgstr "" + +#: extending/first-extension-module.rst:49 +msgid "" +"This tutorial uses APIs that were added in CPython 3.15. To create an " +"extension that's compatible with earlier versions of CPython, please follow " +"an earlier version of this documentation." +msgstr "" + +#: extending/first-extension-module.rst:53 +msgid "" +"This tutorial uses C syntax added in C11 and C++20. If your extension needs " +"to be compatible with earlier standards, please follow tutorials in " +"documentation for Python 3.14 or below." +msgstr "" + +#: extending/first-extension-module.rst:59 +msgid "What we'll do" +msgstr "" + +#: extending/first-extension-module.rst:61 +msgid "" +"Let's create an extension module called ``spam`` [#why-spam]_, which will " +"include a Python interface to the C standard library " +"function :c:func:`system`. This function is defined in ``stdlib.h``. It " +"takes a C string as argument, runs the argument as a system command, and " +"returns a result value as an integer. A manual page for :c:func:`system` " +"might summarize it this way::" +msgstr "" + +#: extending/first-extension-module.rst:72 +msgid "" +"Note that like many functions in the C standard library, this function is " +"already exposed in Python. In production, use :py:func:`os.system` " +"or :py:func:`subprocess.run` rather than the module you'll write here." +msgstr "" + +#: extending/first-extension-module.rst:77 +msgid "We want this function to be callable from Python as follows:" +msgstr "" + +#: extending/first-extension-module.rst:89 +msgid "" +"The system command ``whoami`` prints out your username. It's useful in " +"tutorials like this one because it has the same name on both Unix and " +"Windows." +msgstr "" + +#: extending/first-extension-module.rst:95 +msgid "Start with the headers" +msgstr "" + +#: extending/first-extension-module.rst:97 +msgid "" +"Begin by creating a directory for this tutorial, and switching to it on the " +"command line. Then, create a file named :file:`spammodule.c` in your " +"directory. [#why-spammodule]_" +msgstr "" + +#: extending/first-extension-module.rst:102 +msgid "" +"In this file, we'll include two headers: :file:`Python.h` to pull in all " +"declarations of the Python C API, and :file:`stdlib.h` for " +"the :c:func:`system` function. [#stdlib-h]_" +msgstr "" + +#: extending/first-extension-module.rst:106 +msgid "Add the following lines to :file:`spammodule.c`:" +msgstr "" + +#: extending/first-extension-module.rst:112 +msgid "" +"Be sure to put :file:`stdlib.h`, and any other standard library includes, " +"*after* :file:`Python.h`. On some systems, Python may define some pre-" +"processor definitions that affect the standard headers." +msgstr "" + +#: extending/first-extension-module.rst:119 +msgid "Running your build tool" +msgstr "" + +#: extending/first-extension-module.rst:121 +msgid "" +"With only the includes in place, your extension won't do anything. Still, " +"it's a good time to compile it and try to import it. This will ensure that " +"your build tool works, so that you can make and test incremental changes as " +"you follow the rest of the text." +msgstr "" + +#: extending/first-extension-module.rst:126 +msgid "" +"CPython itself does not come with a tool to build extension modules; it is " +"recommended to use a third-party project for this. In this tutorial, we'll " +"use `meson-python`_. (If you want to use another one, see :ref:`first-" +"extension-other-tools`.)" +msgstr "" + +#: extending/first-extension-module.rst:135 +msgid "``meson-python`` requires defining a \"project\" using two extra files." +msgstr "" + +#: extending/first-extension-module.rst:137 +msgid "First, add ``pyproject.toml`` with these contents:" +msgstr "" + +#: extending/first-extension-module.rst:151 +msgid "Then, create ``meson.build`` containing the following:" +msgstr "" + +#: extending/first-extension-module.rst:167 +msgid "" +"See the `meson-python documentation `_ for details on " +"configuration." +msgstr "" + +#: extending/first-extension-module.rst:170 +msgid "" +"Now, build install the *project in the current directory* (``.``) via " +"``pip``:" +msgstr "" + +#: extending/first-extension-module.rst:176 +msgid "" +"The ``-v`` (``--verbose``) option causes ``pip`` to show the output from the " +"compiler, which is often useful during development." +msgstr "" + +#: extending/first-extension-module.rst:181 +msgid "" +"If you don't have ``pip`` installed, run ``python -m ensurepip``, preferably " +"in a :ref:`virtual environment `. (Or, if you prefer another tool " +"that can build and install ``pyproject.toml``-based projects, use that.)" +msgstr "" + +#: extending/first-extension-module.rst:189 +msgid "" +"Note that you will need to run this command again every time you change your " +"extension. Unlike Python, C has an explicit compilation step." +msgstr "" + +#: extending/first-extension-module.rst:193 +msgid "" +"When your extension is compiled and installed, start Python and try to " +"import it. This should fail with the following exception:" +msgstr "" + +#: extending/first-extension-module.rst:206 +msgid "Module export hook" +msgstr "" + +#: extending/first-extension-module.rst:208 +msgid "" +"The exception you got when you tried to import the module told you that " +"Python is looking for a \"module export function\", also known as " +"a :ref:`module export hook `. Let's define one." +msgstr "" + +#: extending/first-extension-module.rst:213 +msgid "First, add a prototype below the ``#include`` lines:" +msgstr "" + +#: extending/first-extension-module.rst:220 +msgid "" +"The prototype is not strictly necessary, but some modern compilers emit " +"warnings without it. It's generally better to add the prototype than to " +"disable the warning." +msgstr "" + +#: extending/first-extension-module.rst:224 +msgid "" +"The :c:macro:`PyMODEXPORT_FUNC` macro declares the function's return type, " +"and adds any special linkage declarations needed to make the function " +"visible and usable when CPython loads it." +msgstr "" + +#: extending/first-extension-module.rst:228 +msgid "" +"After the prototype, add the function itself. For now, make it return " +"``NULL``:" +msgstr "" + +#: extending/first-extension-module.rst:239 +msgid "" +"Compile and load the module again. You should get a different error this " +"time." +msgstr "" + +#: extending/first-extension-module.rst:249 +msgid "" +"Simply returning ``NULL`` is *not* correct behavior for an export hook, and " +"CPython complains about it. That's good -- it means that CPython found the " +"function! Let's now make it do something useful." +msgstr "" + +#: extending/first-extension-module.rst:256 +msgid "The slot table" +msgstr "" + +#: extending/first-extension-module.rst:258 +msgid "" +"Rather than ``NULL``, the export hook should return the information needed " +"to create a module. Let's start with the basics: the name and docstring." +msgstr "" + +#: extending/first-extension-module.rst:262 +msgid "" +"The information should be defined in an array of :c:type:`PySlot` entries, " +"which are essentially key-value pairs. Define this array just before your " +"export hook:" +msgstr "" + +#: extending/first-extension-module.rst:277 +msgid "" +"The :c:macro:`PySlot_STATIC_DATA` macro is used when the slot value (here: " +"``&abi_info``, ``\"spam\"``, and the docstring) is a pointer to constant, " +"statically allocated data." +msgstr "" + +#: extending/first-extension-module.rst:281 +msgid "" +"The ``PyABIInfo_VAR(abi_info);`` macro and the :c:data:`Py_mod_abi` slot are " +"a bit of boilerplate that helps prevent extensions compiled for a different " +"version of Python from crashing the interpreter." +msgstr "" + +#: extending/first-extension-module.rst:285 +msgid "" +"For both :c:data:`Py_mod_name` and :c:data:`Py_mod_doc`, the values are C " +"strings -- that is, NUL-terminated, UTF-8 encoded byte arrays." +msgstr "" + +#: extending/first-extension-module.rst:288 +msgid "" +"Note ``PySlot_END`` sentinel entry at the end. This marks the end of the " +"array. If you forget it, you'll trigger undefined behavior." +msgstr "" + +#: extending/first-extension-module.rst:292 +msgid "" +"The array is defined as ``static`` -- that is, not visible outside this " +"``.c`` file. This will be a common theme. CPython only needs to access the " +"export hook; all global variables and all other functions should generally " +"be ``static``, so that they don't clash with other extensions." +msgstr "" + +#: extending/first-extension-module.rst:298 +msgid "Return this array from your export hook instead of ``NULL``:" +msgstr "" + +#: extending/first-extension-module.rst:309 +msgid "Now, recompile and try it out:" +msgstr "" + +#: extending/first-extension-module.rst:317 +msgid "You have an extension module! Try ``help(spam)`` to see the docstring." +msgstr "" + +#: extending/first-extension-module.rst:320 +msgid "The next step will be adding a function." +msgstr "" + +#: extending/first-extension-module.rst:326 +msgid "Exposing a function" +msgstr "" + +#: extending/first-extension-module.rst:328 +msgid "" +"To expose the :c:func:`system` C function directly to Python, we'll need to " +"write a layer of glue code to convert arguments from Python objects to C " +"values, and the C return value back to Python." +msgstr "" + +#: extending/first-extension-module.rst:332 +msgid "" +"One of the simplest ways to write glue code is a \":c:data:`METH_O`\" " +"function, which takes two Python objects and returns one. All Python objects " +"-- regardless of the Python type -- are represented in C as pointers to " +"the :c:type:`PyObject` structure." +msgstr "" + +#: extending/first-extension-module.rst:337 +msgid "Add such a function above the slots array::" +msgstr "" + +#: extending/first-extension-module.rst:345 +msgid "" +"For now, we ignore the arguments, and use the :c:macro:`Py_RETURN_NONE` " +"macro, which expands to a ``return`` statement that properly returns a " +"Python :py:data:`None` object." +msgstr "" + +#: extending/first-extension-module.rst:349 +msgid "" +"Recompile your extension to make sure you don't have syntax errors. We " +"haven't yet added ``spam_system`` to the module, so you might get a warning " +"that ``spam_system`` is unused." +msgstr "" + +#: extending/first-extension-module.rst:356 +msgid "Method definitions" +msgstr "" + +#: extending/first-extension-module.rst:358 +msgid "" +"To expose the C function to Python, you will need to provide several pieces " +"of information in a structure called :c:type:`PyMethodDef` [#why-" +"pymethoddef]_:" +msgstr "" + +#: extending/first-extension-module.rst:362 +msgid "``ml_name``: the name of the Python function;" +msgstr "" + +#: extending/first-extension-module.rst:363 +msgid "``ml_doc``: a docstring;" +msgstr "" + +#: extending/first-extension-module.rst:364 +msgid "``ml_meth``: the C function to be called; and" +msgstr "" + +#: extending/first-extension-module.rst:365 +msgid "" +"``ml_flags``: a set of flags describing details like how Python arguments " +"are passed to the C function. We'll use :c:data:`METH_O` here -- the flag " +"that matches our ``spam_system`` function's signature." +msgstr "" + +#: extending/first-extension-module.rst:370 +msgid "" +"Because modules typically create several functions, these definitions need " +"to be collected in an array, with a zero-filled sentinel at the end. Add " +"this array just below the ``spam_system`` function:" +msgstr "" + +#: extending/first-extension-module.rst:378 +msgid "" +"As with module slots, a zero-filled sentinel marks the end of the array." +msgstr "" + +#: extending/first-extension-module.rst:380 +msgid "" +"Next, we'll add the method to the module. Add a :c:data:`Py_mod_methods` " +"slot to your :c:type:`PyMethodDef` array:" +msgstr "" + +#: extending/first-extension-module.rst:388 +msgid "" +"Recompile your extension again, and test it. Be sure to restart the Python " +"interpreter, so that ``import spam`` picks up the new version of the module." +msgstr "" + +#: extending/first-extension-module.rst:392 +msgid "You should now be able to call the function:" +msgstr "" + +#: extending/first-extension-module.rst:402 +msgid "" +"Note that our ``spam.system`` does not yet run the ``whoami`` command; it " +"only returns ``None``." +msgstr "" + +#: extending/first-extension-module.rst:405 +msgid "" +"Check that the function accepts exactly one argument, as specified by " +"the :c:data:`METH_O` flag:" +msgstr "" + +#: extending/first-extension-module.rst:417 +msgid "Returning an integer" +msgstr "" + +#: extending/first-extension-module.rst:419 +msgid "" +"Now, let's take a look at the return value. Instead of ``None``, we'll want " +"``spam.system`` to return a number -- that is, a Python :py:type:`int` " +"object. Eventually this will be the exit code of a system command, but let's " +"start with a fixed value, say, ``3``." +msgstr "" + +#: extending/first-extension-module.rst:425 +msgid "" +"The Python C API provides a function to create a Python :py:type:`int` " +"object from a C ``int`` value: :c:func:`PyLong_FromLong`. [#why-" +"pylongfromlong]_" +msgstr "" + +#: extending/first-extension-module.rst:428 +msgid "To call it, replace the ``Py_RETURN_NONE`` with the following 3 lines:" +msgstr "" + +#: extending/first-extension-module.rst:444 +msgid "" +"Recompile, restart the Python interpreter again, and check that the function " +"now returns 3:" +msgstr "" + +#: extending/first-extension-module.rst:455 +msgid "Accepting a string" +msgstr "" + +#: extending/first-extension-module.rst:457 +msgid "Finally, let's handle the function argument." +msgstr "" + +#: extending/first-extension-module.rst:459 +msgid "" +"Our C function, :c:func:`!spam_system`, takes two arguments. The first one, " +"``PyObject *self``, will be set to the ``spam`` module object. This isn't " +"useful in our case, so we'll ignore it." +msgstr "" + +#: extending/first-extension-module.rst:464 +msgid "" +"The other one, ``PyObject *arg``, will be set to the object that the user " +"passed from Python. We expect that it should be a Python string. In order to " +"use the information in it, we will need to convert it to a C value -- in " +"this case, a C string (``const char *``)." +msgstr "" + +#: extending/first-extension-module.rst:470 +msgid "" +"There's a slight type mismatch here: Python's :py:class:`str` objects store " +"Unicode text, but C strings are arrays of bytes. So, we'll need to *encode* " +"the data, and we'll use the UTF-8 encoding for it. (UTF-8 might not always " +"be correct for system commands, but it's what :py:meth:`str.encode` uses by " +"default, and the C API has special support for it.)" +msgstr "" + +#: extending/first-extension-module.rst:477 +msgid "" +"The function to encode a Python string into a UTF-8 buffer is " +"named :c:func:`PyUnicode_AsUTF8AndSize` [#why-pyunicodeasutf8]_. Call it " +"like this:" +msgstr "" + +#: extending/first-extension-module.rst:493 +msgid "" +"If :c:func:`PyUnicode_AsUTF8AndSize` is successful, *command* will point to " +"the resulting C string -- a zero-terminated array of bytes [#embedded-nul]_. " +"This buffer is managed by the *arg* object, which means we don't need to " +"free it, but we must follow some rules:" +msgstr "" + +#: extending/first-extension-module.rst:498 +msgid "" +"We should only use the buffer inside the ``spam_system`` function. After " +"``spam_system`` returns, *arg* and the buffer it manages might be garbage-" +"collected." +msgstr "" + +#: extending/first-extension-module.rst:501 +msgid "We must not modify it. This is why we use ``const``." +msgstr "" + +#: extending/first-extension-module.rst:503 +msgid "" +"If :c:func:`PyUnicode_AsUTF8AndSize` was *not* successful, it returns a " +"``NULL`` pointer. When calling *any* Python C API, we always need to handle " +"such error cases. The way to do this in general is left for later chapters " +"of this documentation. For now, be assured that we are already handling " +"errors from :c:func:`PyLong_FromLong` correctly." +msgstr "" + +#: extending/first-extension-module.rst:510 +msgid "" +"For the :c:func:`PyUnicode_AsUTF8AndSize` call, the correct way to handle " +"errors is returning ``NULL`` from ``spam_system``. Add an ``if`` block for " +"this:" +msgstr "" + +#: extending/first-extension-module.rst:530 +msgid "" +"To test that error handling works, compile again, restart Python so that " +"``import spam`` picks up the new version of your module, and try passing a " +"non-string value to your function:" +msgstr "" + +#: extending/first-extension-module.rst:542 +msgid "" +"Now, all that is left is calling the C library function :c:func:`system` " +"with the ``char *`` buffer, and using its result instead of the ``3``:" +msgstr "" + +#: extending/first-extension-module.rst:560 +msgid "" +"Compile your module, restart Python, and test. This time, you should see " +"your username -- the output of the ``whoami`` system command:" +msgstr "" + +#: extending/first-extension-module.rst:572 +msgid "" +"You can also test with other commands, like ``ls``, ``dir``, or one that " +"doesn't exist:" +msgstr "" + +#: extending/first-extension-module.rst:585 +msgid "The result" +msgstr "" + +#: extending/first-extension-module.rst:588 +msgid "" +"Congratulations! You have written a complete Python C API extension module, " +"and completed this tutorial!" +msgstr "" + +#: extending/first-extension-module.rst:592 +msgid "Here is the entire source file, for your convenience:" +msgstr "" + +#: extending/first-extension-module.rst:603 +msgid "Appendix: Other build tools" +msgstr "" + +#: extending/first-extension-module.rst:605 +msgid "" +"You should be able to follow this tutorial -- except the *Running your build " +"tool* section itself -- with a build tool other than ``meson-python``." +msgstr "" + +#: extending/first-extension-module.rst:609 +msgid "" +"The Python Packaging User Guide has a `list of recommended tools `_; be sure to choose one for the C language." +msgstr "" + +#: extending/first-extension-module.rst:614 +msgid "Workaround for missing PyInit function" +msgstr "" + +#: extending/first-extension-module.rst:616 +msgid "" +"If your build tool output complains about missing ``PyInit_spam``, add the " +"following function to your module for now:" +msgstr "" + +#: extending/first-extension-module.rst:624 +msgid "" +"This is a shim for an old-style :ref:`initialization function `, which was required in extension modules for CPython 3.14 and " +"below. Current CPython does not need it, but some build tools may still " +"assume that all extension modules need to define it." +msgstr "" + +#: extending/first-extension-module.rst:629 +msgid "" +"If you use this workaround, you will get the exception ``SystemError: " +"initialization of spam failed without raising an exception`` instead of " +"``ImportError: dynamic module does not define module export function``." +msgstr "" + +#: extending/first-extension-module.rst:636 +msgid "Compiling directly" +msgstr "" + +#: extending/first-extension-module.rst:638 +msgid "" +"Using a third-party build tool is heavily recommended, as it will take care " +"of various details of your platform and Python installation, of naming the " +"resulting extension, and, later, of distributing your work." +msgstr "" + +#: extending/first-extension-module.rst:643 +msgid "" +"If you are building an extension for as *specific* system, or for yourself " +"only, you might instead want to run your compiler directly. The way to do " +"this is system-specific; be prepared for issues you will need to solve " +"yourself." +msgstr "" + +#: extending/first-extension-module.rst:649 +msgid "Linux" +msgstr "" + +#: extending/first-extension-module.rst:651 +msgid "" +"On Linux, the Python development package may include a ``python3-config`` " +"command that prints out the required compiler flags. If you use it, check " +"that it corresponds to the CPython interpreter you'll use to load the " +"module. Then, start with the following command:" +msgstr "" + +#: extending/first-extension-module.rst:661 +msgid "" +"This should generate a ``spam.so`` file that you need to put in a directory " +"on :py:attr:`sys.path`." +msgstr "" + +#: extending/first-extension-module.rst:666 +msgid "Footnotes" +msgstr "" + +#: extending/first-extension-module.rst:667 +msgid "``spam`` is the favorite food of Monty Python fans..." +msgstr "" + +#: extending/first-extension-module.rst:668 +msgid "" +"The source file name is entirely up to you, though some tools can be picky " +"about the ``.c`` extension. This tutorial uses the traditional ``*module.c`` " +"suffix. Some people would just use :file:`spam.c` to implement a module " +"named ``spam``, projects where Python isn't the primary language might use " +"``py_spam.c``, and so on." +msgstr "" + +#: extending/first-extension-module.rst:675 +msgid "" +"Including :file:`stdlib.h` is technically not necessary, " +"since :file:`Python.h` includes it and :ref:`several other standard headers " +"` for its own use or for backwards compatibility. " +"However, it is good practice to explicitly include what you need." +msgstr "" + +#: extending/first-extension-module.rst:680 +msgid "" +"The :c:type:`!PyMethodDef` structure is also used to create methods of " +"classes, so there's no separate \":c:type:`!PyFunctionDef`\"." +msgstr "" + +#: extending/first-extension-module.rst:683 +msgid "" +"The name :c:func:`PyLong_FromLong` might not seem obvious. ``PyLong`` refers " +"to a the Python :py:class:`int`, which was originally called ``long``; the " +"``FromLong`` refers to the C ``long`` (or ``long int``) type." +msgstr "" + +#: extending/first-extension-module.rst:688 +msgid "" +"Here, ``PyUnicode`` refers to the original name of the " +"Python :py:class:`str` class: ``unicode``." +msgstr "" + +#: extending/first-extension-module.rst:691 +msgid "" +"The ``AndSize`` part of the name refers to the fact that this function can " +"also retrieve the size of the buffer, using an output argument. We don't " +"need this, so we set the second argument to NULL." +msgstr "" + +#: extending/first-extension-module.rst:694 +msgid "" +"We're ignoring the fact that Python strings can also contain NUL bytes, " +"which terminate a C string. In other words, our function will treat " +"``spam.system(\"foo\\0bar\")`` as ``spam.system(\"foo\")``. This possibility " +"can lead to security issues, so the real ``os.system`` function size checks " +"for this case and raises an error." +msgstr "" diff --git a/extending/index.po b/extending/index.po index a5e9d164e..44e1293d4 100644 --- a/extending/index.po +++ b/extending/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-15 22:33+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-07-04 11:38+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -20,14 +20,17 @@ msgid "Extending and Embedding the Python Interpreter" msgstr "Extension et intégration de l'interpréteur Python" #: extending/index.rst:7 +#, fuzzy msgid "" "This document describes how to write modules in C or C++ to extend the " -"Python interpreter with new modules. Those modules can not only define new " -"functions but also new object types and their methods. The document also " -"describes how to embed the Python interpreter in another application, for " -"use as an extension language. Finally, it shows how to compile and link " -"extension modules so that they can be loaded dynamically (at run time) into " -"the interpreter, if the underlying operating system supports this feature." +"Python interpreter with new modules. Those modules can do what Python code " +"does -- define functions, object types and methods -- but also interact with " +"native libraries or achieve better performance by avoiding the overhead of " +"an interpreter. The document also describes how to embed the Python " +"interpreter in another application, for use as an extension language. " +"Finally, it shows how to compile and link extension modules so that they can " +"be loaded dynamically (at run time) into the interpreter, if the underlying " +"operating system supports this feature." msgstr "" "Ce document décrit comment écrire des modules en C ou C++ pour étendre " "l'interpréteur Python à de nouveaux modules. En plus de définir de nouvelles " @@ -39,41 +42,62 @@ msgstr "" "dans l'interpréteur, si le système d'exploitation sous-jacent supporte cette " "fonctionnalité." -#: extending/index.rst:15 +#: extending/index.rst:17 +#, fuzzy msgid "" -"This document assumes basic knowledge about Python. For an informal " -"introduction to the language, see :ref:`tutorial-index`. :ref:`reference-" -"index` gives a more formal definition of the language. :ref:`library-index` " +"This document assumes basic knowledge about C and Python. For an informal " +"introduction to Python, see :ref:`tutorial-index`. :ref:`reference-index` " +"gives a more formal definition of the language. :ref:`library-index` " "documents the existing object types, functions and modules (both built-in " "and written in Python) that give the language its wide application range." msgstr "" "Ce document présuppose que vous avez des connaissances de base sur Python. " -"Pour une introduction informelle du langage, voyez :ref:`tutorial-index`. :" -"ref:`reference-index` donne une définition plus formelle du langage. :ref:" -"`library-index` documente les objets types, fonctions et modules existants " -"(tous intégrés et écrits en Python) qui donnent au langage sa large gamme " -"d'applications." +"Pour une introduction informelle du langage, voyez :ref:`tutorial-" +"index`. :ref:`reference-index` donne une définition plus formelle du " +"langage. :ref:`library-index` documente les objets types, fonctions et " +"modules existants (tous intégrés et écrits en Python) qui donnent au langage " +"sa large gamme d'applications." -#: extending/index.rst:21 +#: extending/index.rst:23 msgid "" -"For a detailed description of the whole Python/C API, see the separate :ref:" -"`c-api-index`." +"For a detailed description of the whole Python/C API, see the " +"separate :ref:`c-api-index`." msgstr "" "Pour une description dans sa totalité de l'API Python/C, voir :ref:`c-api-" "index`." #: extending/index.rst:26 +msgid "" +"To support extensions, Python's C API (Application Programmers Interface) " +"defines a set of functions, macros and variables that provide access to most " +"aspects of the Python run-time system. The Python API is incorporated in a " +"C source file by including the header ``\"Python.h\"``." +msgstr "" + +#: extending/index.rst:33 +msgid "" +"The C extension interface is specific to CPython, and extension modules do " +"not work on other Python implementations. In many cases, it is possible to " +"avoid writing C extensions and preserve portability to other " +"implementations. For example, if your use case is calling C library " +"functions or system calls, you should consider using the :mod:`ctypes` " +"module or the `cffi `_ library rather than " +"writing custom C code. These modules let you write Python code to interface " +"with C code and are more portable between implementations of Python than " +"writing and compiling a C extension module." +msgstr "" + +#: extending/index.rst:58 msgid "Recommended third party tools" msgstr "Les outils tiers recommandés" -#: extending/index.rst:28 +#: extending/index.rst:60 #, fuzzy msgid "" -"This guide only covers the basic tools for creating extensions provided as " -"part of this version of CPython. Third party tools like `Cython `_, `cffi `_, `SWIG `_ and `Numba `_ offer both simpler and " -"more sophisticated approaches to creating C and C++ extensions for Python." +"This document only covers the basic tools for creating extensions provided " +"as part of this version of CPython. Some :ref:`third party tools ` offer both simpler and more sophisticated approaches to creating C " +"and C++ extensions for Python." msgstr "" "Ce guide ne couvre que les outils basiques permettant de créer des " "extensions fournies dans cette version de CPython. Les outils tiers tels que " @@ -82,30 +106,34 @@ msgstr "" "approches plus simples et plus élaborées pour créer des extensions C et C++ " "pour Python." -#: extending/index.rst:40 +#: extending/index.rst:65 msgid "" -"`Python Packaging User Guide: Binary Extensions `_" +"While this document is aimed at extension authors, it should also be helpful " +"to the authors of such tools. For example, the tutorial module can serve as " +"a simple test case for a build tool or sample expected output of a code " +"generator." +msgstr "" + +#: extending/index.rst:72 +msgid "C API Tutorial" msgstr "" -"`Guide d'utilisation de l'empaquetage Python : Extensions binaires `_" -#: extending/index.rst:38 +#: extending/index.rst:74 msgid "" -"The Python Packaging User Guide not only covers several available tools that " -"simplify the creation of binary extensions, but also discusses the various " -"reasons why creating an extension module may be desirable in the first place." +"This tutorial describes how to write a simple module in C or C++, using the " +"Python C API -- that is, using the basic tools provided as part of this " +"version of CPython." msgstr "" -"Le guide d'utilisation de l'empaquetage Python ne couvre pas uniquement " -"quelques outils disponibles qui simplifient la création d'extensions " -"binaires, mais aborde aussi les différentes raisons pour lesquelles créer un " -"module d'extension peut être souhaitable d'entrée." -#: extending/index.rst:45 -msgid "Creating extensions without third party tools" -msgstr "Création d'extensions sans outils tiers" +#: extending/index.rst:79 +msgid ":ref:`first-extension-module`" +msgstr "" -#: extending/index.rst:47 +#: extending/index.rst:83 +msgid "Guides for intermediate topics" +msgstr "" + +#: extending/index.rst:85 msgid "" "This section of the guide covers creating C and C++ extensions without " "assistance from third party tools. It is intended primarily for creators of " @@ -117,11 +145,31 @@ msgstr "" "ces outils, plus que d'être une méthode recommandée pour créer votre propre " "extension C." -#: extending/index.rst:63 +#: extending/index.rst:90 +msgid ":ref:`extending-intro`" +msgstr "" + +#: extending/index.rst:91 +msgid ":ref:`defining-new-types`" +msgstr "" + +#: extending/index.rst:92 +msgid ":ref:`new-types-topics`" +msgstr "" + +#: extending/index.rst:93 +msgid ":ref:`building`" +msgstr "" + +#: extending/index.rst:94 +msgid ":ref:`building-on-windows`" +msgstr "" + +#: extending/index.rst:97 msgid "Embedding the CPython runtime in a larger application" msgstr "Intégrer l'interpréteur CPython dans une plus grande application" -#: extending/index.rst:65 +#: extending/index.rst:99 msgid "" "Sometimes, rather than creating an extension that runs inside the Python " "interpreter as the main application, it is desirable to instead embed the " @@ -132,3 +180,28 @@ msgstr "" "Python comme application principale, il est préférable d'intégrer " "l'interpréteur Python dans une application plus large. Cette section donne " "quelques informations nécessaires au succès de cette opération." + +#: extending/index.rst:104 +msgid ":ref:`embedding`" +msgstr "" + +#~ msgid "Creating extensions without third party tools" +#~ msgstr "Création d'extensions sans outils tiers" + +#~ msgid "" +#~ "`Python Packaging User Guide: Binary Extensions `_" +#~ msgstr "" +#~ "`Guide d'utilisation de l'empaquetage Python : Extensions binaires " +#~ "`_" + +#~ msgid "" +#~ "The Python Packaging User Guide not only covers several available tools " +#~ "that simplify the creation of binary extensions, but also discusses the " +#~ "various reasons why creating an extension module may be desirable in the " +#~ "first place." +#~ msgstr "" +#~ "Le guide d'utilisation de l'empaquetage Python ne couvre pas uniquement " +#~ "quelques outils disponibles qui simplifient la création d'extensions " +#~ "binaires, mais aborde aussi les différentes raisons pour lesquelles créer " +#~ "un module d'extension peut être souhaitable d'entrée." diff --git a/extending/newtypes.po b/extending/newtypes.po index 71ee577e7..ae9e06d7b 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-10-29 22:00+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -75,9 +75,9 @@ msgstr "" msgid "" "These fields tell the runtime how much memory to allocate when new objects " "of this type are created. Python has some built-in support for variable " -"length structures (think: strings, tuples) which is where the :c:member:" -"`~PyTypeObject.tp_itemsize` field comes in. This will be dealt with " -"later. ::" +"length structures (think: strings, tuples) which is where " +"the :c:member:`~PyTypeObject.tp_itemsize` field comes in. This will be " +"dealt with later. ::" msgstr "" "Ces champs indiquent la quantité de mémoire à allouer à l'exécution lorsque " "de nouveaux objets de ce type sont créés. Python prend en charge nativement " @@ -120,15 +120,15 @@ msgstr "" "nettoyage à effectuer, vous pouvez le mettre ici. L'objet lui-même doit être " "libéré ici aussi. Voici un exemple de cette fonction ::" -#: extending/newtypes.rst:79 +#: extending/newtypes.rst:80 msgid "" -"If your type supports garbage collection, the destructor should call :c:func:" -"`PyObject_GC_UnTrack` before clearing any member fields::" +"If your type supports garbage collection, the destructor should " +"call :c:func:`PyObject_GC_UnTrack` before clearing any member fields::" msgstr "" "Si votre type prend en charge le ramasse-miettes, le destructeur doit " "appeler :c:func:`PyObject_GC_UnTrack` avant d'effacer les champs membres ::" -#: extending/newtypes.rst:95 +#: extending/newtypes.rst:97 msgid "" "One important requirement of the deallocator function is that it leaves any " "pending exceptions alone. This is important since deallocators are " @@ -139,8 +139,8 @@ msgid "" "additional Python code to be executed may detect that an exception has been " "set. This can lead to misleading errors from the interpreter. The proper " "way to protect against this is to save a pending exception before performing " -"the unsafe action, and restoring it when done. This can be done using the :" -"c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` functions::" +"the unsafe action, and restoring it when done. This can be done using " +"the :c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` functions::" msgstr "" "Une exigence importante de la fonction de libération de la mémoire est de ne " "pas s'occuper de toutes les exceptions en attente. C'est important car les " @@ -153,35 +153,38 @@ msgstr "" "exception a été définie. Cela peut conduire l’interpréteur à se tromper sur " "la nature de l'erreur. La bonne façon d'éviter cela est d'enregistrer une " "exception en attente avant d'effectuer l'action non sécurisée et à la " -"restaurer une fois terminée. Cela peut être fait en utilisant les fonctions :" -"c:func:`PyErr_Fetch` et :c:func:`PyErr_Restore` ::" +"restaurer une fois terminée. Cela peut être fait en utilisant les " +"fonctions :c:func:`PyErr_Fetch` et :c:func:`PyErr_Restore` ::" # suit un : -#: extending/newtypes.rst:134 +#: extending/newtypes.rst:138 msgid "" "There are limitations to what you can safely do in a deallocator function. " -"First, if your type supports garbage collection (using :c:member:" -"`~PyTypeObject.tp_traverse` and/or :c:member:`~PyTypeObject.tp_clear`), some " -"of the object's members can have been cleared or finalized by the time :c:" -"member:`~PyTypeObject.tp_dealloc` is called. Second, in :c:member:" -"`~PyTypeObject.tp_dealloc`, your object is in an unstable state: its " -"reference count is equal to zero. Any call to a non-trivial object or API " -"(as in the example above) might end up calling :c:member:`~PyTypeObject." -"tp_dealloc` again, causing a double free and a crash." +"First, if your type supports garbage collection " +"(using :c:member:`~PyTypeObject.tp_traverse` and/" +"or :c:member:`~PyTypeObject.tp_clear`), some of the object's members can " +"have been cleared or finalized by the " +"time :c:member:`~PyTypeObject.tp_dealloc` is called. Second, " +"in :c:member:`~PyTypeObject.tp_dealloc`, your object is in an unstable " +"state: its reference count is equal to zero. Any call to a non-trivial " +"object or API (as in the example above) might end up " +"calling :c:member:`~PyTypeObject.tp_dealloc` again, causing a double free " +"and a crash." msgstr "" "des limites existent à ce que vous pouvez faire en toute sécurité dans une " "fonction de libération de la mémoire. Tout d'abord, si votre type prend en " -"charge le ramasse-miettes (en utilisant :c:member:`~PyTypeObject." -"tp_traverse` et/ou :c:member:`~PyTypeObject.tp_clear`), certains membres de " -"l'objet peuvent avoir été effacés ou finalisés avant que :c:member:" -"`~PyTypeObject.tp_dealloc` ne soit appelé. Deuxièmement, dans :c:member:" -"`~PyTypeObject.tp_dealloc`, votre objet est dans un état instable : son " -"compteur de références est égal à zéro. Tout appel à un objet non trivial ou " -"à une API (comme dans l'exemple ci-dessus) peut finir par appeler :c:member:" -"`~PyTypeObject.tp_dealloc` à nouveau, provoquant une double libération et un " -"plantage." - -#: extending/newtypes.rst:143 +"charge le ramasse-miettes (en " +"utilisant :c:member:`~PyTypeObject.tp_traverse` et/" +"ou :c:member:`~PyTypeObject.tp_clear`), certains membres de l'objet peuvent " +"avoir été effacés ou finalisés avant " +"que :c:member:`~PyTypeObject.tp_dealloc` ne soit appelé. Deuxièmement, " +"dans :c:member:`~PyTypeObject.tp_dealloc`, votre objet est dans un état " +"instable : son compteur de références est égal à zéro. Tout appel à un objet " +"non trivial ou à une API (comme dans l'exemple ci-dessus) peut finir par " +"appeler :c:member:`~PyTypeObject.tp_dealloc` à nouveau, provoquant une " +"double libération et un plantage." + +#: extending/newtypes.rst:147 msgid "" "Starting with Python 3.4, it is recommended not to put any complex " "finalization code in :c:member:`~PyTypeObject.tp_dealloc`, and instead use " @@ -189,29 +192,30 @@ msgid "" msgstr "" "À partir de Python 3.4, il est recommandé de ne pas mettre de code de " "finalisation complexe dans :c:member:`~PyTypeObject.tp_dealloc`, et " -"d'utiliser à la place la nouvelle méthode de type :c:member:`~PyTypeObject." -"tp_finalize`." +"d'utiliser à la place la nouvelle méthode de " +"type :c:member:`~PyTypeObject.tp_finalize`." -#: extending/newtypes.rst:148 +#: extending/newtypes.rst:152 msgid ":pep:`442` explains the new finalization scheme." msgstr ":pep:`442` explique le nouveau schéma de finalisation." -#: extending/newtypes.rst:155 +#: extending/newtypes.rst:159 msgid "Object Presentation" msgstr "Présentation de l'objet" -#: extending/newtypes.rst:157 +#: extending/newtypes.rst:161 msgid "" "In Python, there are two ways to generate a textual representation of an " -"object: the :func:`repr` function, and the :func:`str` function. (The :func:" -"`print` function just calls :func:`str`.) These handlers are both optional." +"object: the :func:`repr` function, and the :func:`str` function. " +"(The :func:`print` function just calls :func:`str`.) These handlers are " +"both optional." msgstr "" "En Python, il existe deux façons de générer une représentation textuelle " "d'un objet : la fonction :func:`repr` et la fonction :func:`str` (la " "fonction :func:`print` appelle simplement :func:`str`). Ces gestionnaires " "sont tous deux facultatifs." -#: extending/newtypes.rst:166 +#: extending/newtypes.rst:170 msgid "" "The :c:member:`~PyTypeObject.tp_repr` handler should return a string object " "containing a representation of the instance for which it is called. Here is " @@ -221,44 +225,46 @@ msgstr "" "chaîne contenant une représentation de l'instance pour laquelle il est " "appelé. Voici un exemple simple ::" -#: extending/newtypes.rst:177 +#: extending/newtypes.rst:182 msgid "" "If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the " -"interpreter will supply a representation that uses the type's :c:member:" -"`~PyTypeObject.tp_name` and a uniquely identifying value for the object." +"interpreter will supply a representation that uses the " +"type's :c:member:`~PyTypeObject.tp_name` and a uniquely identifying value " +"for the object." msgstr "" "Si aucun gestionnaire :c:member:`~PyTypeObject.tp_repr` n'est spécifié, " -"l'interpréteur fournira une représentation qui utilise le type :c:member:" -"`~PyTypeObject.tp_name` et une valeur d'identification unique pour l'objet." +"l'interpréteur fournira une représentation qui utilise le " +"type :c:member:`~PyTypeObject.tp_name` et une valeur d'identification unique " +"pour l'objet." -#: extending/newtypes.rst:181 +#: extending/newtypes.rst:186 msgid "" -"The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:" -"member:`~PyTypeObject.tp_repr` handler described above is to :func:`repr`; " -"that is, it is called when Python code calls :func:`str` on an instance of " -"your object. Its implementation is very similar to the :c:member:" -"`~PyTypeObject.tp_repr` function, but the resulting string is intended for " -"human consumption. If :c:member:`~PyTypeObject.tp_str` is not specified, " -"the :c:member:`~PyTypeObject.tp_repr` handler is used instead." +"The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what " +"the :c:member:`~PyTypeObject.tp_repr` handler described above is " +"to :func:`repr`; that is, it is called when Python code calls :func:`str` on " +"an instance of your object. Its implementation is very similar to " +"the :c:member:`~PyTypeObject.tp_repr` function, but the resulting string is " +"intended for human consumption. If :c:member:`~PyTypeObject.tp_str` is not " +"specified, the :c:member:`~PyTypeObject.tp_repr` handler is used instead." msgstr "" "Le gestionnaire :c:member:`~PyTypeObject.tp_str` est à :func:`str` ce que le " -"gestionnaire :c:member:`~PyTypeObject.tp_repr` décrit ci-dessus est à :func:" -"`repr` ; c'est-à-dire qu'il est appelé lorsque le code Python appelle :func:" -"`str` sur une instance de votre objet. Son implémentation est très similaire " -"à la fonction :c:member:`~PyTypeObject.tp_repr`, mais la chaîne résultante " -"est destinée à être lue par des utilisateurs. Si :c:member:`~PyTypeObject." -"tp_str` n'est pas spécifié, le gestionnaire :c:member:`~PyTypeObject." -"tp_repr` est utilisé à la place." - -#: extending/newtypes.rst:188 +"gestionnaire :c:member:`~PyTypeObject.tp_repr` décrit ci-dessus est " +"à :func:`repr` ; c'est-à-dire qu'il est appelé lorsque le code Python " +"appelle :func:`str` sur une instance de votre objet. Son implémentation est " +"très similaire à la fonction :c:member:`~PyTypeObject.tp_repr`, mais la " +"chaîne résultante est destinée à être lue par des utilisateurs. " +"Si :c:member:`~PyTypeObject.tp_str` n'est pas spécifié, le " +"gestionnaire :c:member:`~PyTypeObject.tp_repr` est utilisé à la place." + +#: extending/newtypes.rst:193 msgid "Here is a simple example::" msgstr "Voici un exemple simple ::" -#: extending/newtypes.rst:200 +#: extending/newtypes.rst:206 msgid "Attribute Management" msgstr "Gestion des attributs" -#: extending/newtypes.rst:202 +#: extending/newtypes.rst:208 msgid "" "For every object which can support attributes, the corresponding type must " "provide the functions that control how the attributes are resolved. There " @@ -275,22 +281,23 @@ msgstr "" "cas particulier, pour lequel la nouvelle valeur transmise au gestionnaire " "est ``NULL``." -#: extending/newtypes.rst:208 +#: extending/newtypes.rst:214 msgid "" "Python supports two pairs of attribute handlers; a type that supports " "attributes only needs to implement the functions for one pair. The " -"difference is that one pair takes the name of the attribute as a :c:expr:" -"`char\\*`, while the other accepts a :c:expr:`PyObject*`. Each type can use " -"whichever pair makes more sense for the implementation's convenience. ::" +"difference is that one pair takes the name of the attribute as " +"a :c:expr:`char\\*`, while the other accepts a :c:expr:`PyObject*`. Each " +"type can use whichever pair makes more sense for the implementation's " +"convenience. ::" msgstr "" "Python prend en charge deux paires de gestionnaires d'attributs ; un type " "qui prend en charge les attributs n'a besoin d'implémenter les fonctions que " "pour une paire. La différence est qu'une paire prend le nom de l'attribut en " -"tant que :c:expr:`char\\*`, tandis que l'autre accepte un :c:expr:" -"`PyObject*`. Chaque type peut utiliser la paire la plus logique pour la " -"commodité de l'implémentation. ::" +"tant que :c:expr:`char\\*`, tandis que l'autre accepte " +"un :c:expr:`PyObject*`. Chaque type peut utiliser la paire la plus logique " +"pour la commodité de l'implémentation. ::" -#: extending/newtypes.rst:220 +#: extending/newtypes.rst:226 msgid "" "If accessing attributes of an object is always a simple operation (this will " "be explained shortly), there are generic implementations which can be used " @@ -308,11 +315,11 @@ msgstr "" "Python 2.2, bien qu'il existe de nombreux exemples qui n'ont pas été mis à " "jour pour utiliser certains des nouveaux mécanismes génériques disponibles." -#: extending/newtypes.rst:231 +#: extending/newtypes.rst:237 msgid "Generic Attribute Management" msgstr "Gestion des attributs génériques" -#: extending/newtypes.rst:233 +#: extending/newtypes.rst:239 msgid "" "Most extension types only use *simple* attributes. So, what makes the " "attributes simple? There are only a couple of conditions that must be met:" @@ -322,16 +329,16 @@ msgstr "" "doivent être remplies :" # énumération -#: extending/newtypes.rst:236 +#: extending/newtypes.rst:242 msgid "" "The name of the attributes must be known when :c:func:`PyType_Ready` is " "called." msgstr "" -"le nom des attributs doit être déjà connu lorsqu'on lance :c:func:" -"`PyType_Ready` ;" +"le nom des attributs doit être déjà connu lorsqu'on " +"lance :c:func:`PyType_Ready` ;" # énumération -#: extending/newtypes.rst:239 +#: extending/newtypes.rst:245 msgid "" "No special processing is needed to record that an attribute was looked up or " "set, nor do actions need to be taken based on the value." @@ -340,7 +347,7 @@ msgstr "" "été recherché ou défini, et aucune action ne doit être entreprise en " "fonction de la valeur." -#: extending/newtypes.rst:242 +#: extending/newtypes.rst:248 msgid "" "Note that this list does not place any restrictions on the values of the " "attributes, when the values are computed, or how relevant data is stored." @@ -349,32 +356,34 @@ msgstr "" "attributs, le moment où les valeurs sont calculées ou la manière dont les " "données pertinentes sont stockées." -#: extending/newtypes.rst:245 +#: extending/newtypes.rst:251 msgid "" "When :c:func:`PyType_Ready` is called, it uses three tables referenced by " "the type object to create :term:`descriptor`\\s which are placed in the " "dictionary of the type object. Each descriptor controls access to one " "attribute of the instance object. Each of the tables is optional; if all " "three are ``NULL``, instances of the type will only have attributes that are " -"inherited from their base type, and should leave the :c:member:" -"`~PyTypeObject.tp_getattro` and :c:member:`~PyTypeObject.tp_setattro` fields " -"``NULL`` as well, allowing the base type to handle attributes." +"inherited from their base type, and should leave " +"the :c:member:`~PyTypeObject.tp_getattro` " +"and :c:member:`~PyTypeObject.tp_setattro` fields ``NULL`` as well, allowing " +"the base type to handle attributes." msgstr "" "Lorsque :c:func:`PyType_Ready` est appelé, il utilise trois tableaux " "référencés par l'objet type pour créer des :term:`descripteurs ` " "qui sont placés dans le dictionnaire de l'objet type. Chaque descripteur " "contrôle l'accès à un attribut de l'objet instance. Chacun des tableaux est " "facultatif ; si les trois sont ``NULL``, les instances du type n'auront que " -"des attributs hérités de leur type de base et doivent laisser les champs :c:" -"member:`~PyTypeObject.tp_getattro` et :c:member:`~PyTypeObject .tp_setattro` " -"à ``NULL`` également, permettant au type de base de gérer les attributs." +"des attributs hérités de leur type de base et doivent laisser les " +"champs :c:member:`~PyTypeObject.tp_getattro` " +"et :c:member:`~PyTypeObject .tp_setattro` à ``NULL`` également, permettant " +"au type de base de gérer les attributs." -#: extending/newtypes.rst:253 +#: extending/newtypes.rst:259 msgid "The tables are declared as three fields of the type object::" msgstr "" "Les tableaux sont déclarés sous la forme de trois champs de type objet ::" -#: extending/newtypes.rst:259 +#: extending/newtypes.rst:265 msgid "" "If :c:member:`~PyTypeObject.tp_methods` is not ``NULL``, it must refer to an " "array of :c:type:`PyMethodDef` structures. Each entry in the table is an " @@ -384,13 +393,13 @@ msgstr "" "référence à un tableau de structures :c:type:`PyMethodDef`. Chaque entrée du " "tableau est une instance de cette structure ::" -#: extending/newtypes.rst:270 +#: extending/newtypes.rst:276 #, fuzzy msgid "" "One entry should be defined for each method provided by the type; no entries " "are needed for methods inherited from a base type. One additional entry is " -"needed at the end; it is a sentinel that marks the end of the array. The :c:" -"member:`~PyMethodDef.ml_name` field of the sentinel must be ``NULL``." +"needed at the end; it is a sentinel that marks the end of the array. " +"The :c:member:`~PyMethodDef.ml_name` field of the sentinel must be ``NULL``." msgstr "" "Une entrée doit être définie pour chaque méthode fournie par le type ; " "aucune entrée n'est nécessaire pour les méthodes héritées d'un type ancêtre. " @@ -398,7 +407,7 @@ msgstr "" "marque la fin du tableau. Le champ :attr:`ml_name` de la sentinelle doit " "être ``NULL``." -#: extending/newtypes.rst:275 +#: extending/newtypes.rst:281 msgid "" "The second table is used to define attributes which map directly to data " "stored in the instance. A variety of primitive C types are supported, and " @@ -410,17 +419,17 @@ msgstr "" "pris en charge et l'accès peut être en lecture seule ou en lecture-écriture. " "Les structures du tableau sont définies comme suit :" -#: extending/newtypes.rst:287 +#: extending/newtypes.rst:293 #, fuzzy msgid "" "For each entry in the table, a :term:`descriptor` will be constructed and " "added to the type which will be able to extract a value from the instance " "structure. The :c:member:`~PyMemberDef.type` field should contain a type " "code like :c:macro:`Py_T_INT` or :c:macro:`Py_T_DOUBLE`; the value will be " -"used to determine how to convert Python values to and from C values. The :c:" -"member:`~PyMemberDef.flags` field is used to store flags which control how " -"the attribute can be accessed: you can set it to :c:macro:`Py_READONLY` to " -"prevent Python code from setting it." +"used to determine how to convert Python values to and from C values. " +"The :c:member:`~PyMemberDef.flags` field is used to store flags which " +"control how the attribute can be accessed: you can set it " +"to :c:macro:`Py_READONLY` to prevent Python code from setting it." msgstr "" "Pour chaque entrée du tableau, un :term:`descripteur ` sera " "construit et ajouté au type qui pourra extraire une valeur de la structure " @@ -430,25 +439,26 @@ msgstr "" "C. Le champ :attr:`flags` est utilisé pour stocker les drapeaux qui " "contrôlent l'accès à l'attribut." -#: extending/newtypes.rst:295 +#: extending/newtypes.rst:301 #, fuzzy msgid "" "An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` " "table to build descriptors that are used at runtime is that any attribute " "defined this way can have an associated doc string simply by providing the " "text in the table. An application can use the introspection API to retrieve " -"the descriptor from the class object, and get the doc string using its :attr:" -"`~type.__doc__` attribute." -msgstr "" -"Un avantage intéressant de l'utilisation du tableau :c:member:`~PyTypeObject." -"tp_members` pour construire les descripteurs utilisés à l'exécution est que, " -"à tout attribut défini de cette façon, on peut associer une chaîne de " -"documentation (*docstring*), en écrivant simplement le texte dans le " -"tableau. Une application peut utiliser l'API d'introspection pour récupérer " -"le descripteur de l'objet de classe et utiliser son attribut :attr:`__doc__` " -"pour renvoyer la chaîne de documentation." - -#: extending/newtypes.rst:301 +"the descriptor from the class object, and get the doc string using " +"its :attr:`~type.__doc__` attribute." +msgstr "" +"Un avantage intéressant de l'utilisation du " +"tableau :c:member:`~PyTypeObject.tp_members` pour construire les " +"descripteurs utilisés à l'exécution est que, à tout attribut défini de cette " +"façon, on peut associer une chaîne de documentation (*docstring*), en " +"écrivant simplement le texte dans le tableau. Une application peut utiliser " +"l'API d'introspection pour récupérer le descripteur de l'objet de classe et " +"utiliser son attribut :attr:`__doc__` pour renvoyer la chaîne de " +"documentation." + +#: extending/newtypes.rst:307 #, fuzzy msgid "" "As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry " @@ -457,15 +467,15 @@ msgstr "" "Comme pour le tableau :c:member:`~PyTypeObject.tp_methods`, une entrée " "sentinelle avec une valeur ``NULL`` pour :attr:`name` est requise." -#: extending/newtypes.rst:315 +#: extending/newtypes.rst:321 msgid "Type-specific Attribute Management" msgstr "Gestion des attributs de type spécifiques" -#: extending/newtypes.rst:317 +#: extending/newtypes.rst:323 msgid "" "For simplicity, only the :c:expr:`char\\*` version will be demonstrated " -"here; the type of the name parameter is the only difference between the :c:" -"expr:`char\\*` and :c:expr:`PyObject*` flavors of the interface. This " +"here; the type of the name parameter is the only difference between " +"the :c:expr:`char\\*` and :c:expr:`PyObject*` flavors of the interface. This " "example effectively does the same thing as the generic example above, but " "does not use the generic support added in Python 2.2. It explains how the " "handler functions are called, so that if you do need to extend their " @@ -480,7 +490,7 @@ msgstr "" "avez besoin d'étendre leurs fonctionnalités, vous comprendrez ce qui doit " "être fait." -#: extending/newtypes.rst:325 +#: extending/newtypes.rst:331 #, fuzzy msgid "" "The :c:member:`~PyTypeObject.tp_getattr` handler is called when the object " @@ -491,46 +501,48 @@ msgstr "" "l'objet nécessite une recherche d'attribut. Il est appelé dans les mêmes " "situations que l'appel à la méthode :meth:`__getattr__` d'une classe." -#: extending/newtypes.rst:329 +#: extending/newtypes.rst:335 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: extending/newtypes.rst:345 +#: extending/newtypes.rst:351 #, fuzzy msgid "" -"The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:" -"`~object.__setattr__` or :meth:`~object.__delattr__` method of a class " -"instance would be called. When an attribute should be deleted, the third " -"parameter will be ``NULL``. Here is an example that simply raises an " -"exception; if this were really all you wanted, the :c:member:`~PyTypeObject." -"tp_setattr` handler should be set to ``NULL``. ::" +"The :c:member:`~PyTypeObject.tp_setattr` handler is called when " +"the :meth:`~object.__setattr__` or :meth:`~object.__delattr__` method of a " +"class instance would be called. When an attribute should be deleted, the " +"third parameter will be ``NULL``. Here is an example that simply raises an " +"exception; if this were really all you wanted, " +"the :c:member:`~PyTypeObject.tp_setattr` handler should be set to " +"``NULL``. ::" msgstr "" "Le gestionnaire :c:member:`~PyTypeObject.tp_setattr` est appelé lorsque la " "méthode :meth:`__setattr__` ou :meth:`__delattr__` d'une instance de classe " "est appelée. Lorsqu'un attribut doit être supprimé, le troisième paramètre " "est ``NULL``. Voici un exemple qui lève simplement une exception ; si " -"c'était vraiment tout ce que vous vouliez, le gestionnaire :c:member:" -"`~PyTypeObject.tp_setattr` devrait être défini sur ``NULL``. ::" +"c'était vraiment tout ce que vous vouliez, le " +"gestionnaire :c:member:`~PyTypeObject.tp_setattr` devrait être défini sur " +"``NULL``. ::" -#: extending/newtypes.rst:359 +#: extending/newtypes.rst:365 msgid "Object Comparison" msgstr "Comparaison des objets" -#: extending/newtypes.rst:365 +#: extending/newtypes.rst:371 #, fuzzy msgid "" "The :c:member:`~PyTypeObject.tp_richcompare` handler is called when " "comparisons are needed. It is analogous to the :ref:`rich comparison " -"methods `, like :meth:`!__lt__`, and also called by :c:func:" -"`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." +"methods `, like :meth:`!__lt__`, and also called " +"by :c:func:`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." msgstr "" "Le gestionnaire :c:member:`~PyTypeObject.tp_richcompare` est appelé lorsque " "des comparaisons sont nécessaires. Il est analogue aux :ref:`méthodes de " "comparaison riches `, comme :meth:`__lt__`, et est également " -"appelé par :c:func:`PyObject_RichCompare` et :c:func:" -"`PyObject_RichCompareBool`." +"appelé par :c:func:`PyObject_RichCompare` " +"et :c:func:`PyObject_RichCompareBool`." -#: extending/newtypes.rst:370 +#: extending/newtypes.rst:376 msgid "" "This function is called with two Python objects and the operator as " "arguments, where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, " @@ -548,7 +560,7 @@ msgstr "" "n'est pas implémentée et que la méthode de comparaison de l'autre objet doit " "être essayée, ou ``NULL`` si une exception doit être levée." -#: extending/newtypes.rst:378 +#: extending/newtypes.rst:384 msgid "" "Here is a sample implementation, for a datatype that is considered equal if " "the size of an internal pointer is equal::" @@ -556,20 +568,20 @@ msgstr "" "Voici un exemple d'implémentation, pour un type de données où l'égalité " "signifie que la taille d'un pointeur interne est égale :" -#: extending/newtypes.rst:408 +#: extending/newtypes.rst:415 msgid "Abstract Protocol Support" msgstr "Gestion de protocoles abstraits" -#: extending/newtypes.rst:410 +#: extending/newtypes.rst:417 msgid "" "Python supports a variety of *abstract* 'protocols;' the specific interfaces " "provided to use these interfaces are documented in :ref:`abstract`." msgstr "" "Python prend en charge divers « protocoles » *abstraits* ; les interfaces " -"spécifiques fournies pour utiliser ces interfaces sont documentées dans :ref:" -"`abstract`." +"spécifiques fournies pour utiliser ces interfaces sont documentées " +"dans :ref:`abstract`." -#: extending/newtypes.rst:414 +#: extending/newtypes.rst:421 msgid "" "A number of these abstract interfaces were defined early in the development " "of the Python implementation. In particular, the number, mapping, and " @@ -597,12 +609,12 @@ msgstr "" "``NULL`` ; il peut être défini pour indiquer la présence d'un emplacement, " "mais un emplacement peut toujours être vide). ::" -#: extending/newtypes.rst:429 +#: extending/newtypes.rst:436 msgid "" "If you wish your object to be able to act like a number, a sequence, or a " "mapping object, then you place the address of a structure that implements " -"the C type :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, or :c:" -"type:`PyMappingMethods`, respectively. It is up to you to fill in this " +"the C type :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, " +"or :c:type:`PyMappingMethods`, respectively. It is up to you to fill in this " "structure with appropriate values. You can find examples of the use of each " "of these in the :file:`Objects` directory of the Python source " "distribution. ::" @@ -615,7 +627,7 @@ msgstr "" "d'utilisation de chacun d'entre eux dans le répertoire :file:`Objects` de la " "distribution source de Python. ::" -#: extending/newtypes.rst:438 +#: extending/newtypes.rst:445 msgid "" "This function, if you choose to provide it, should return a hash number for " "an instance of your data type. Here is a simple example::" @@ -623,7 +635,7 @@ msgstr "" "Cette fonction, si vous la fournissez, doit renvoyer un condensat pour une " "instance de votre type de données. Voici un exemple simple ::" -#: extending/newtypes.rst:451 +#: extending/newtypes.rst:460 #, fuzzy msgid "" ":c:type:`Py_hash_t` is a signed integer type with a platform-varying width. " @@ -636,7 +648,7 @@ msgstr "" "indique une erreur, c'est pourquoi vous devez faire attention à ne pas le " "renvoyer lorsque le calcul du hachage est réussi, comme vu ci-dessus." -#: extending/newtypes.rst:460 +#: extending/newtypes.rst:469 msgid "" "This function is called when an instance of your data type is \"called\", " "for example, if ``obj1`` is an instance of your data type and the Python " @@ -645,14 +657,14 @@ msgid "" msgstr "" "Cette fonction est appelée lorsqu'une instance de votre type de données est " "« appelée », par exemple, si ``obj1`` est une instance de votre type de " -"données et que le script Python contient ``obj1('hello')``, le gestionnaire :" -"c:member:`~PyTypeObject.tp_call` est appelé." +"données et que le script Python contient ``obj1('hello')``, le " +"gestionnaire :c:member:`~PyTypeObject.tp_call` est appelé." -#: extending/newtypes.rst:464 +#: extending/newtypes.rst:473 msgid "This function takes three arguments:" msgstr "Cette fonction prend trois arguments :" -#: extending/newtypes.rst:466 +#: extending/newtypes.rst:475 msgid "" "*self* is the instance of the data type which is the subject of the call. If " "the call is ``obj1('hello')``, then *self* is ``obj1``." @@ -660,64 +672,66 @@ msgstr "" "*self* est l'instance du type de données qui fait l'objet de l'appel. Si " "l'appel est ``obj1('hello')``, alors *self* est ``obj1``." -#: extending/newtypes.rst:469 +#: extending/newtypes.rst:478 msgid "" -"*args* is a tuple containing the arguments to the call. You can use :c:func:" -"`PyArg_ParseTuple` to extract the arguments." +"*args* is a tuple containing the arguments to the call. You can " +"use :c:func:`PyArg_ParseTuple` to extract the arguments." msgstr "" "*args* est un *n*-uplet contenant les arguments de l'appel. Vous pouvez " "utiliser :c:func:`PyArg_ParseTuple` pour extraire les arguments." -#: extending/newtypes.rst:472 +#: extending/newtypes.rst:481 msgid "" "*kwds* is a dictionary of keyword arguments that were passed. If this is non-" -"``NULL`` and you support keyword arguments, use :c:func:" -"`PyArg_ParseTupleAndKeywords` to extract the arguments. If you do not want " -"to support keyword arguments and this is non-``NULL``, raise a :exc:" -"`TypeError` with a message saying that keyword arguments are not supported." +"``NULL`` and you support keyword arguments, " +"use :c:func:`PyArg_ParseTupleAndKeywords` to extract the arguments. If you " +"do not want to support keyword arguments and this is non-``NULL``, raise " +"a :exc:`TypeError` with a message saying that keyword arguments are not " +"supported." msgstr "" "*kwds* est le dictionnaire d'arguments nommés qui ont été passés. Si ce " -"n'est pas ``NULL`` et que vous gérez les arguments nommés, utilisez :c:func:" -"`PyArg_ParseTupleAndKeywords` pour extraire les arguments. Si vous ne " -"souhaitez pas prendre en charge les arguments nommés et qu'il n'est pas " -"``NULL``, levez une :exc:`TypeError` avec un message indiquant que les " -"arguments nommés ne sont pas pris en charge." +"n'est pas ``NULL`` et que vous gérez les arguments nommés, " +"utilisez :c:func:`PyArg_ParseTupleAndKeywords` pour extraire les arguments. " +"Si vous ne souhaitez pas prendre en charge les arguments nommés et qu'il " +"n'est pas ``NULL``, levez une :exc:`TypeError` avec un message indiquant que " +"les arguments nommés ne sont pas pris en charge." -#: extending/newtypes.rst:478 +#: extending/newtypes.rst:487 msgid "Here is a toy ``tp_call`` implementation::" msgstr "Ceci est une implémentation ``tp_call`` très simple ::" -#: extending/newtypes.rst:504 +#: extending/newtypes.rst:514 #, fuzzy msgid "" "These functions provide support for the iterator protocol. Both handlers " "take exactly one parameter, the instance for which they are being called, " "and return a new reference. In the case of an error, they should set an " "exception and return ``NULL``. :c:member:`~PyTypeObject.tp_iter` " -"corresponds to the Python :meth:`~object.__iter__` method, while :c:member:" -"`~PyTypeObject.tp_iternext` corresponds to the Python :meth:`~iterator." -"__next__` method." +"corresponds to the Python :meth:`~object.__iter__` method, " +"while :c:member:`~PyTypeObject.tp_iternext` corresponds to the " +"Python :meth:`~iterator.__next__` method." msgstr "" "Ces fonctions prennent en charge le protocole itérateur. Les deux " "gestionnaires prennent exactement un paramètre, l'instance pour laquelle ils " "sont appelés, et renvoient une nouvelle référence. En cas d'erreur, ils " -"doivent définir une exception et renvoyer ``NULL``. :c:member:`~PyTypeObject." -"tp_iter` correspond à la méthode Python :meth:`__iter__`, tandis que :c:" -"member:`~PyTypeObject.tp_iternext` correspond à la méthode Python :meth:" -"`~iterator.__next__`." +"doivent définir une exception et renvoyer " +"``NULL``. :c:member:`~PyTypeObject.tp_iter` correspond à la méthode " +"Python :meth:`__iter__`, tandis que :c:member:`~PyTypeObject.tp_iternext` " +"correspond à la méthode Python :meth:`~iterator.__next__`." -#: extending/newtypes.rst:511 +#: extending/newtypes.rst:521 msgid "" -"Any :term:`iterable` object must implement the :c:member:`~PyTypeObject." -"tp_iter` handler, which must return an :term:`iterator` object. Here the " -"same guidelines apply as for Python classes:" +"Any :term:`iterable` object must implement " +"the :c:member:`~PyTypeObject.tp_iter` handler, which must return " +"an :term:`iterator` object. Here the same guidelines apply as for Python " +"classes:" msgstr "" -"Tout objet :term:`iterable` doit implémenter le gestionnaire :c:member:" -"`~PyTypeObject.tp_iter`, qui doit renvoyer un objet de type :term:" -"`iterator`. Ici, les mêmes directives s'appliquent de la même façon que " -"pour les classes *Python* :" +"Tout objet :term:`iterable` doit implémenter le " +"gestionnaire :c:member:`~PyTypeObject.tp_iter`, qui doit renvoyer un objet " +"de type :term:`iterator`. Ici, les mêmes directives s'appliquent de la même " +"façon que pour les classes *Python* :" -#: extending/newtypes.rst:515 +#: extending/newtypes.rst:525 msgid "" "For collections (such as lists and tuples) which can support multiple " "independent iterators, a new iterator should be created and returned by each " @@ -727,12 +741,13 @@ msgstr "" "implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être " "créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`." -#: extending/newtypes.rst:518 +#: extending/newtypes.rst:528 msgid "" "Objects which can only be iterated over once (usually due to side effects of " -"iteration, such as file objects) can implement :c:member:`~PyTypeObject." -"tp_iter` by returning a new reference to themselves -- and should also " -"therefore implement the :c:member:`~PyTypeObject.tp_iternext` handler." +"iteration, such as file objects) can " +"implement :c:member:`~PyTypeObject.tp_iter` by returning a new reference to " +"themselves -- and should also therefore implement " +"the :c:member:`~PyTypeObject.tp_iternext` handler." msgstr "" "Les objets qui ne peuvent être itérés qu'une seule fois (généralement en " "raison d'effets de bord de l'itération, tels que les objets fichiers) " @@ -740,38 +755,41 @@ msgstr "" "nouvelle référence à eux-mêmes – et doivent donc également implémenter le " "gestionnaire :c:member:`~PyTypeObject.tp_iternext`." -#: extending/newtypes.rst:523 -msgid "" -"Any :term:`iterator` object should implement both :c:member:`~PyTypeObject." -"tp_iter` and :c:member:`~PyTypeObject.tp_iternext`. An iterator's :c:member:" -"`~PyTypeObject.tp_iter` handler should return a new reference to the " -"iterator. Its :c:member:`~PyTypeObject.tp_iternext` handler should return a " -"new reference to the next object in the iteration, if there is one. If the " -"iteration has reached the end, :c:member:`~PyTypeObject.tp_iternext` may " -"return ``NULL`` without setting an exception, or it may set :exc:" -"`StopIteration` *in addition* to returning ``NULL``; avoiding the exception " -"can yield slightly better performance. If an actual error occurs, :c:member:" -"`~PyTypeObject.tp_iternext` should always set an exception and return " -"``NULL``." -msgstr "" -"Tout objet :term:`itérateur ` doit implémenter à la fois :c:member:" -"`~PyTypeObject.tp_iter` et :c:member:`~PyTypeObject.tp_iternext`. Le " +#: extending/newtypes.rst:533 +msgid "" +"Any :term:`iterator` object should implement " +"both :c:member:`~PyTypeObject.tp_iter` " +"and :c:member:`~PyTypeObject.tp_iternext`. An " +"iterator's :c:member:`~PyTypeObject.tp_iter` handler should return a new " +"reference to the iterator. Its :c:member:`~PyTypeObject.tp_iternext` " +"handler should return a new reference to the next object in the iteration, " +"if there is one. If the iteration has reached the " +"end, :c:member:`~PyTypeObject.tp_iternext` may return ``NULL`` without " +"setting an exception, or it may set :exc:`StopIteration` *in addition* to " +"returning ``NULL``; avoiding the exception can yield slightly better " +"performance. If an actual error " +"occurs, :c:member:`~PyTypeObject.tp_iternext` should always set an exception " +"and return ``NULL``." +msgstr "" +"Tout objet :term:`itérateur ` doit implémenter à la " +"fois :c:member:`~PyTypeObject.tp_iter` " +"et :c:member:`~PyTypeObject.tp_iternext`. Le " "gestionnaire :c:member:`~PyTypeObject.tp_iter` d'un itérateur doit renvoyer " -"une nouvelle référence de l'itérateur. Son gestionnaire :c:member:" -"`~PyTypeObject.tp_iternext` doit renvoyer une nouvelle référence à l'objet " -"suivant dans l'itération, s'il y en a un. Si l'itération a atteint la fin, :" -"c:member:`~PyTypeObject.tp_iternext` peut renvoyer ``NULL`` sans définir " -"d'exception, ou il peut définir :exc:`StopIteration` *en plus* de renvoyer " -"``NULL`` ; éviter de lever une exception peut donner des performances " -"légèrement meilleures. Si une erreur réelle se produit, :c:member:" -"`~PyTypeObject.tp_iternext` doit toujours définir une exception et renvoyer " -"``NULL``." - -#: extending/newtypes.rst:539 +"une nouvelle référence de l'itérateur. Son " +"gestionnaire :c:member:`~PyTypeObject.tp_iternext` doit renvoyer une " +"nouvelle référence à l'objet suivant dans l'itération, s'il y en a un. Si " +"l'itération a atteint la fin, :c:member:`~PyTypeObject.tp_iternext` peut " +"renvoyer ``NULL`` sans définir d'exception, ou il peut " +"définir :exc:`StopIteration` *en plus* de renvoyer ``NULL`` ; éviter de " +"lever une exception peut donner des performances légèrement meilleures. Si " +"une erreur réelle se produit, :c:member:`~PyTypeObject.tp_iternext` doit " +"toujours définir une exception et renvoyer ``NULL``." + +#: extending/newtypes.rst:549 msgid "Weak Reference Support" msgstr "Prise en charge de la référence faible" -#: extending/newtypes.rst:541 +#: extending/newtypes.rst:551 msgid "" "One of the goals of Python's weak reference implementation is to allow any " "type to participate in the weak reference mechanism without incurring the " @@ -783,11 +801,11 @@ msgstr "" "certains objets, tels que les nombres." # suit un : -#: extending/newtypes.rst:546 +#: extending/newtypes.rst:556 msgid "Documentation for the :mod:`weakref` module." msgstr "documentation pour le module :mod:`weakref`." -#: extending/newtypes.rst:548 +#: extending/newtypes.rst:558 msgid "" "For an object to be weakly referenceable, the extension type must set the " "``Py_TPFLAGS_MANAGED_WEAKREF`` bit of the :c:member:`~PyTypeObject.tp_flags` " @@ -795,14 +813,18 @@ msgid "" "be left as zero." msgstr "" -#: extending/newtypes.rst:553 +#: extending/newtypes.rst:563 +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." +msgstr "" + +#: extending/newtypes.rst:565 #, fuzzy msgid "" "Concretely, here is how the statically declared type object would look::" msgstr "" "Et le membre correspondant dans l'objet de type déclaré statiquement ::" -#: extending/newtypes.rst:562 +#: extending/newtypes.rst:574 #, fuzzy msgid "" "The only further addition is that ``tp_dealloc`` needs to clear any weak " @@ -812,11 +834,11 @@ msgstr "" "référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " "est non ``NULL`` ::" -#: extending/newtypes.rst:576 +#: extending/newtypes.rst:588 msgid "More Suggestions" msgstr "Plus de suggestions" -#: extending/newtypes.rst:578 +#: extending/newtypes.rst:590 msgid "" "In order to learn how to implement any specific method for your new data " "type, get the :term:`CPython` source code. Go to the :file:`Objects` " @@ -831,31 +853,31 @@ msgstr "" "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " "voulez implémenter." -#: extending/newtypes.rst:584 +#: extending/newtypes.rst:596 msgid "" "When you need to verify that an object is a concrete instance of the type " "you are implementing, use the :c:func:`PyObject_TypeCheck` function. A " "sample of its use might be something like the following::" msgstr "" "Lorsque vous avez besoin de vérifier qu'un objet est une instance concrète " -"du type que vous implémentez, utilisez la fonction :c:func:" -"`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" +"du type que vous implémentez, utilisez la " +"fonction :c:func:`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" -#: extending/newtypes.rst:594 +#: extending/newtypes.rst:606 msgid "Download CPython source releases." msgstr "Télécharger les versions sources de *CPython*." -#: extending/newtypes.rst:595 +#: extending/newtypes.rst:607 msgid "https://www.python.org/downloads/source/" msgstr "https://www.python.org/downloads/source/" -#: extending/newtypes.rst:597 +#: extending/newtypes.rst:609 msgid "" "The CPython project on GitHub, where the CPython source code is developed." msgstr "" "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*." -#: extending/newtypes.rst:598 +#: extending/newtypes.rst:610 msgid "https://github.com/python/cpython" msgstr "https://github.com/python/cpython" @@ -896,8 +918,9 @@ msgstr "https://github.com/python/cpython" #~ "The following flag constants are defined in :file:`structmember.h`; they " #~ "may be combined using bitwise-OR." #~ msgstr "" -#~ "Les constantes de drapeaux suivantes sont définies dans :file:" -#~ "`structmember.h` ; elles peuvent être combinées à l'aide du *OU* binaire." +#~ "Les constantes de drapeaux suivantes sont définies " +#~ "dans :file:`structmember.h` ; elles peuvent être combinées à l'aide du " +#~ "*OU* binaire." #~ msgid "Constant" #~ msgstr "Constante" @@ -922,16 +945,18 @@ msgstr "https://github.com/python/cpython" #~ "avant la lecture." #~ msgid "" -#~ ":const:`RESTRICTED`, :const:`READ_RESTRICTED` and :const:" -#~ "`WRITE_RESTRICTED` are deprecated. However, :const:`READ_RESTRICTED` is " -#~ "an alias for :const:`PY_AUDIT_READ`, so fields that specify either :const:" -#~ "`RESTRICTED` or :const:`READ_RESTRICTED` will also raise an audit event." +#~ ":const:`RESTRICTED`, :const:`READ_RESTRICTED` " +#~ "and :const:`WRITE_RESTRICTED` are deprecated. " +#~ "However, :const:`READ_RESTRICTED` is an alias for :const:`PY_AUDIT_READ`, " +#~ "so fields that specify either :const:`RESTRICTED` " +#~ "or :const:`READ_RESTRICTED` will also raise an audit event." #~ msgstr "" -#~ ":const:`RESTRICTED`, :const:`READ_RESTRICTED` et :const:" -#~ "`WRITE_RESTRICTED` sont obsolètes. Cependant, :const:`READ_RESTRICTED` " -#~ "est un alias pour :const:`PY_AUDIT_READ`, donc les champs qui spécifient :" -#~ "const:`RESTRICTED` ou :const:`READ_RESTRICTED` déclenchent également un " -#~ "événement d'audit." +#~ ":const:`RESTRICTED`, :const:`READ_RESTRICTED` " +#~ "et :const:`WRITE_RESTRICTED` sont obsolètes. " +#~ "Cependant, :const:`READ_RESTRICTED` est un alias " +#~ "pour :const:`PY_AUDIT_READ`, donc les champs qui " +#~ "spécifient :const:`RESTRICTED` ou :const:`READ_RESTRICTED` déclenchent " +#~ "également un événement d'audit." #~ msgid "" #~ "For an object to be weakly referencable, the extension type must do two " @@ -944,8 +969,8 @@ msgstr "https://github.com/python/cpython" #~ msgid "" #~ "Include a :c:expr:`PyObject*` field in the C object structure dedicated " #~ "to the weak reference mechanism. The object's constructor should leave " -#~ "it ``NULL`` (which is automatic when using the default :c:member:" -#~ "`~PyTypeObject.tp_alloc`)." +#~ "it ``NULL`` (which is automatic when using the " +#~ "default :c:member:`~PyTypeObject.tp_alloc`)." #~ msgstr "" #~ "inclure un champ :c:expr:`PyObject*` dans la structure d'objet C dédiée " #~ "au mécanisme de référence faible. Le constructeur de l'objet doit le " diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index 422bf3056..7f6a8bcaa 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-27 23:20+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -19,7 +19,7 @@ msgstr "" msgid "Defining Extension Types: Tutorial" msgstr "Tutoriel : définir des types dans des extensions" -#: extending/newtypes_tutorial.rst:14 +#: extending/newtypes_tutorial.rst:9 msgid "" "Python allows the writer of a C extension module to define new types that " "can be manipulated from Python code, much like the built-in :class:`str` " @@ -33,32 +33,32 @@ msgstr "" "types d'extension ont des similarités, mais quelques subtilités doivent être " "abordées avant de commencer." -#: extending/newtypes_tutorial.rst:24 +#: extending/newtypes_tutorial.rst:19 msgid "The Basics" msgstr "Les bases" -#: extending/newtypes_tutorial.rst:26 +#: extending/newtypes_tutorial.rst:21 msgid "" -"The :term:`CPython` runtime sees all Python objects as variables of type :c:" -"expr:`PyObject*`, which serves as a \"base type\" for all Python objects. " -"The :c:type:`PyObject` structure itself only contains the object's :term:" -"`reference count` and a pointer to the object's \"type object\". This is " -"where the action is; the type object determines which (C) functions get " -"called by the interpreter when, for instance, an attribute gets looked up on " -"an object, a method called, or it is multiplied by another object. These C " -"functions are called \"type methods\"." +"The :term:`CPython` runtime sees all Python objects as variables of " +"type :c:expr:`PyObject*`, which serves as a \"base type\" for all Python " +"objects. The :c:type:`PyObject` structure itself only contains the " +"object's :term:`reference count` and a pointer to the object's \"type " +"object\". This is where the action is; the type object determines which (C) " +"functions get called by the interpreter when, for instance, an attribute " +"gets looked up on an object, a method called, or it is multiplied by another " +"object. These C functions are called \"type methods\"." msgstr "" ":term:`CPython` considère que tous les objets Python sont des variables de " "type :c:expr:`PyObject*`, qui sert de type de base pour tous les objets " -"Python. La structure de :c:type:`PyObject` ne contient que le :term:" -"`compteur de références ` et un pointeur vers un objet de " -"type « type de l'objet ». C'est ici que tout se joue : l'objet type " +"Python. La structure de :c:type:`PyObject` ne contient que " +"le :term:`compteur de références ` et un pointeur vers un " +"objet de type « type de l'objet ». C'est ici que tout se joue : l'objet type " "détermine quelle fonction C doit être appelée par l'interpréteur quand, par " "exemple, un attribut est recherché sur un objet, quand une méthode est " "appelée, ou quand l'objet est multiplié par un autre objet. Ces fonctions C " "sont appelées des « méthodes de type »." -#: extending/newtypes_tutorial.rst:35 +#: extending/newtypes_tutorial.rst:30 msgid "" "So, if you want to define a new extension type, you need to create a new " "type object." @@ -66,7 +66,7 @@ msgstr "" "Donc, pour définir un nouveau type dans une extension, vous devez créer un " "nouvel objet type." -#: extending/newtypes_tutorial.rst:38 +#: extending/newtypes_tutorial.rst:33 #, fuzzy msgid "" "This sort of thing can only be explained by example, so here's a minimal, " @@ -74,23 +74,24 @@ msgid "" "C extension module :mod:`!custom`:" msgstr "" "Ce genre de chose ne s'explique correctement qu'avec des exemples, voici " -"donc un module minimaliste mais suffisant qui définit un nouveau type nommé :" -"class:`Custom` dans le module d'extension :mod:`custom` :" +"donc un module minimaliste mais suffisant qui définit un nouveau type " +"nommé :class:`Custom` dans le module d'extension :mod:`custom` :" # suit un : -#: extending/newtypes_tutorial.rst:43 +#: extending/newtypes_tutorial.rst:38 msgid "" "What we're showing here is the traditional way of defining *static* " "extension types. It should be adequate for most uses. The C API also " -"allows defining heap-allocated extension types using the :c:func:" -"`PyType_FromSpec` function, which isn't covered in this tutorial." +"allows defining heap-allocated extension types using " +"the :c:func:`PyType_FromSpec` function, which isn't covered in this tutorial." msgstr "" "ce qui est montré ici est la manière traditionnelle de définir des types " "d'extension *statiques*, et cela convient dans la majorité des cas. L'API C " -"permet aussi de définir des types alloués sur le tas, via la fonction :c:" -"func:`PyType_FromSpec`, mais ce n'est pas couvert par ce tutoriel." +"permet aussi de définir des types alloués sur le tas, via la " +"fonction :c:func:`PyType_FromSpec`, mais ce n'est pas couvert par ce " +"tutoriel." -#: extending/newtypes_tutorial.rst:50 +#: extending/newtypes_tutorial.rst:45 msgid "" "Now that's quite a bit to take in at once, but hopefully bits will seem " "familiar from the previous chapter. This file defines three things:" @@ -98,17 +99,17 @@ msgstr "" "C'est un peu long, mais vous devez déjà reconnaître quelques morceaux " "expliqués au chapitre précédent. Ce fichier définit trois choses :" -#: extending/newtypes_tutorial.rst:53 +#: extending/newtypes_tutorial.rst:48 #, fuzzy msgid "" "What a :class:`!Custom` **object** contains: this is the ``CustomObject`` " "struct, which is allocated once for each :class:`!Custom` instance." msgstr "" "Ce qu'un **objet** :class:`Custom` contient : c'est la structure " -"``CustomObject``, qui est allouée une fois pour chaque instance de :class:" -"`Custom`." +"``CustomObject``, qui est allouée une fois pour chaque instance " +"de :class:`Custom`." -#: extending/newtypes_tutorial.rst:55 +#: extending/newtypes_tutorial.rst:50 #, fuzzy msgid "" "How the :class:`!Custom` **type** behaves: this is the ``CustomType`` " @@ -119,20 +120,22 @@ msgstr "" "``CustomType``, qui définit l'ensemble des options et pointeurs de fonction " "utilisés par l'interpréteur." -#: extending/newtypes_tutorial.rst:58 +#: extending/newtypes_tutorial.rst:53 #, fuzzy msgid "" -"How to initialize the :mod:`!custom` module: this is the ``PyInit_custom`` " -"function and the associated ``custommodule`` struct." +"How to define and execute the :mod:`!custom` module: this is the " +"``PyInit_custom`` function and the associated ``custom_module`` struct for " +"defining the module, and the ``custom_module_exec`` function to set up a " +"fresh module object." msgstr "" "Comment initialiser le module :mod:`custom` : c'est la fonction " "``PyInit_custom`` et la structure associée ``custommodule``." -#: extending/newtypes_tutorial.rst:61 +#: extending/newtypes_tutorial.rst:58 msgid "The first bit is::" msgstr "Commençons par ::" -#: extending/newtypes_tutorial.rst:67 +#: extending/newtypes_tutorial.rst:64 msgid "" "This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory " "at the start of each object struct and defines a field called ``ob_base`` of " @@ -151,7 +154,7 @@ msgstr "" "ainsi de permettre l'ajout de champs en :ref:`mode débogage `." # suit un : -#: extending/newtypes_tutorial.rst:76 +#: extending/newtypes_tutorial.rst:73 msgid "" "There is no semicolon above after the :c:macro:`PyObject_HEAD` macro. Be " "wary of adding one by accident: some compilers will complain." @@ -160,7 +163,7 @@ msgstr "" "Attention à ne pas l'ajouter par accident : certains compilateurs pourraient " "s'en plaindre." -#: extending/newtypes_tutorial.rst:79 +#: extending/newtypes_tutorial.rst:76 msgid "" "Of course, objects generally store additional data besides the standard " "``PyObject_HEAD`` boilerplate; for example, here is the definition for " @@ -170,12 +173,12 @@ msgstr "" "l'entête standard ``PyObject_HEAD``. Par exemple voici la définition du type " "standard Python ``float`` ::" -#: extending/newtypes_tutorial.rst:88 +#: extending/newtypes_tutorial.rst:85 msgid "The second bit is the definition of the type object. ::" msgstr "La deuxième partie est la définition de l'objet type ::" # suit un : -#: extending/newtypes_tutorial.rst:101 +#: extending/newtypes_tutorial.rst:98 msgid "" "We recommend using C99-style designated initializers as above, to avoid " "listing all the :c:type:`PyTypeObject` fields that you don't care about and " @@ -186,7 +189,7 @@ msgstr "" "champs de :c:type:`PyTypeObject` dont vous n'avez pas besoin, et de ne pas " "vous soucier de leur ordre." -#: extending/newtypes_tutorial.rst:105 +#: extending/newtypes_tutorial.rst:102 msgid "" "The actual definition of :c:type:`PyTypeObject` in :file:`object.h` has many " "more :ref:`fields ` than the definition above. The remaining " @@ -198,11 +201,11 @@ msgstr "" "Les champs restants sont mis à zéro par le compilateur C, et c'est une " "pratique répandue de ne pas spécifier les champs dont vous n'avez pas besoin." -#: extending/newtypes_tutorial.rst:110 +#: extending/newtypes_tutorial.rst:107 msgid "We're going to pick it apart, one field at a time::" msgstr "Regardons les champs de cette structure, un par un ::" -#: extending/newtypes_tutorial.rst:114 +#: extending/newtypes_tutorial.rst:111 msgid "" "This line is mandatory boilerplate to initialize the ``ob_base`` field " "mentioned above. ::" @@ -210,7 +213,7 @@ msgstr "" "Cette ligne, obligatoire, initialise le champ ``ob_base`` mentionné " "précédemment. ::" -#: extending/newtypes_tutorial.rst:119 +#: extending/newtypes_tutorial.rst:116 msgid "" "The name of our type. This will appear in the default textual " "representation of our objects and in some error messages, for example:" @@ -219,27 +222,28 @@ msgstr "" "défaut de nos objets, ainsi que dans quelques messages d'erreur, par " "exemple :" -#: extending/newtypes_tutorial.rst:129 +#: extending/newtypes_tutorial.rst:126 #, fuzzy msgid "" "Note that the name is a dotted name that includes both the module name and " "the name of the type within the module. The module in this case is :mod:`!" -"custom` and the type is :class:`!Custom`, so we set the type name to :class:" -"`!custom.Custom`. Using the real dotted import path is important to make " -"your type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" +"custom` and the type is :class:`!Custom`, so we set the type name " +"to :class:`!custom.Custom`. Using the real dotted import path is important " +"to make your type compatible with the :mod:`pydoc` and :mod:`pickle` " +"modules. ::" msgstr "" "Notez que le nom comporte un point : il inclut le nom du module et le nom du " -"type. Dans ce cas le module est :mod:`custom` et le type est :class:" -"`Custom`, donc nous donnons comme nom :class:`custom.Custom`. Nommer " -"correctement son type, avec le point, est important pour le rendre " +"type. Dans ce cas le module est :mod:`custom` et le type " +"est :class:`Custom`, donc nous donnons comme nom :class:`custom.Custom`. " +"Nommer correctement son type, avec le point, est important pour le rendre " "compatible avec :mod:`pydoc` et :mod:`pickle`. ::" -#: extending/newtypes_tutorial.rst:138 +#: extending/newtypes_tutorial.rst:135 #, fuzzy msgid "" -"This is so that Python knows how much memory to allocate when creating new :" -"class:`!Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " -"used for variable-sized objects and should otherwise be zero." +"This is so that Python knows how much memory to allocate when creating " +"new :class:`!Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is " +"only used for variable-sized objects and should otherwise be zero." msgstr "" "C'est pour que Python sache combien de mémoire allouer à la création d'une " "nouvelle instance de :class:`Custom`. :c:member:`~PyTypeObject.tp_itemsize` " @@ -247,7 +251,7 @@ msgstr "" "zéro." # suit un : -#: extending/newtypes_tutorial.rst:144 +#: extending/newtypes_tutorial.rst:141 #, fuzzy msgid "" "If you want your type to be subclassable from Python, and your type has the " @@ -264,20 +268,20 @@ msgstr "" "si vous voulez qu'une classe en Python puisse hériter de votre type, et que " "votre type a le même :c:member:`~PyTypeObject.tp_basicsize` que son parent, " "vous rencontrerez des problèmes avec l'héritage multiple. Une sous-classe " -"Python de votre type devra lister votre type en premier dans son :attr:" -"`~class.__bases__`, sans quoi elle ne sera pas capable d'appeler la méthode :" -"meth:`__new__` de votre type sans erreur. Vous pouvez éviter ce problème en " -"vous assurant que votre type a un :c:member:`~PyTypeObject.tp_basicsize` " -"plus grand que son parent. La plupart du temps ce sera vrai (soit son parent " -"sera :class:`object`, soit vous ajouterez des attributs à votre type, " -"augmentant ainsi sa taille)." - -#: extending/newtypes_tutorial.rst:154 +"Python de votre type devra lister votre type en premier dans " +"son :attr:`~class.__bases__`, sans quoi elle ne sera pas capable d'appeler " +"la méthode :meth:`__new__` de votre type sans erreur. Vous pouvez éviter ce " +"problème en vous assurant que votre type a " +"un :c:member:`~PyTypeObject.tp_basicsize` plus grand que son parent. La " +"plupart du temps ce sera vrai (soit son parent sera :class:`object`, soit " +"vous ajouterez des attributs à votre type, augmentant ainsi sa taille)." + +#: extending/newtypes_tutorial.rst:151 msgid "We set the class flags to :c:macro:`Py_TPFLAGS_DEFAULT`. ::" msgstr "" "Nous définissons les drapeaux de la classe à :c:macro:`Py_TPFLAGS_DEFAULT` ::" -#: extending/newtypes_tutorial.rst:158 +#: extending/newtypes_tutorial.rst:155 msgid "" "All types should include this constant in their flags. It enables all of " "the members defined until at least Python 3.3. If you need further members, " @@ -288,38 +292,38 @@ msgstr "" "de membres, vous pouvez la combiner à d'autres constantes avec un *OU* " "binaire." -#: extending/newtypes_tutorial.rst:162 +#: extending/newtypes_tutorial.rst:159 msgid "" "We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. ::" msgstr "" -"Nous fournissons une *docstring* pour ce type via le membre :c:member:" -"`~PyTypeObject.tp_doc`. ::" +"Nous fournissons une *docstring* pour ce type via le " +"membre :c:member:`~PyTypeObject.tp_doc`. ::" -#: extending/newtypes_tutorial.rst:166 +#: extending/newtypes_tutorial.rst:163 #, fuzzy msgid "" -"To enable object creation, we have to provide a :c:member:`~PyTypeObject." -"tp_new` handler. This is the equivalent of the Python method :meth:`~object." -"__new__`, but has to be specified explicitly. In this case, we can just use " -"the default implementation provided by the API function :c:func:" -"`PyType_GenericNew`. ::" +"To enable object creation, we have to provide " +"a :c:member:`~PyTypeObject.tp_new` handler. This is the equivalent of the " +"Python method :meth:`~object.__new__`, but has to be specified explicitly. " +"In this case, we can just use the default implementation provided by the API " +"function :c:func:`PyType_GenericNew`. ::" msgstr "" -"Pour permettre la création d'une instance, nous devons fournir un *handler* :" -"c:member:`~PyTypeObject.tp_new`, qui est l'équivalent de la méthode Python :" -"meth:`__new__`, mais elle a besoin d'être spécifiée explicitement. Dans ce " -"cas, on se contente de l'implémentation par défaut fournie par la fonction :" -"c:func:`PyType_GenericNew` de l'API. ::" +"Pour permettre la création d'une instance, nous devons fournir un " +"*handler* :c:member:`~PyTypeObject.tp_new`, qui est l'équivalent de la " +"méthode Python :meth:`__new__`, mais elle a besoin d'être spécifiée " +"explicitement. Dans ce cas, on se contente de l'implémentation par défaut " +"fournie par la fonction :c:func:`PyType_GenericNew` de l'API. ::" -#: extending/newtypes_tutorial.rst:173 +#: extending/newtypes_tutorial.rst:170 #, fuzzy msgid "" -"Everything else in the file should be familiar, except for some code in :c:" -"func:`!PyInit_custom`::" +"Everything else in the file should be familiar, except for some code " +"in :c:func:`!custom_module_exec`::" msgstr "" -"Le reste du fichier doit vous être familier, en dehors du code de :c:func:" -"`PyInit_custom` ::" +"Le reste du fichier doit vous être familier, en dehors du code " +"de :c:func:`PyInit_custom` ::" -#: extending/newtypes_tutorial.rst:179 +#: extending/newtypes_tutorial.rst:177 #, fuzzy msgid "" "This initializes the :class:`!Custom` type, filling in a number of members " @@ -330,16 +334,16 @@ msgstr "" "valeurs par défaut, tel que :attr:`ob_type` qui valait initialement " "``NULL``. ::" -#: extending/newtypes_tutorial.rst:188 +#: extending/newtypes_tutorial.rst:185 #, fuzzy msgid "" -"This adds the type to the module dictionary. This allows us to create :" -"class:`!Custom` instances by calling the :class:`!Custom` class:" +"This adds the type to the module dictionary. This allows us to " +"create :class:`!Custom` instances by calling the :class:`!Custom` class:" msgstr "" "Ici on ajoute le type au dictionnaire du module. Cela permet de créer une " "instance de :class:`Custom` en appelant la classe :class:`Custom` :" -#: extending/newtypes_tutorial.rst:196 +#: extending/newtypes_tutorial.rst:193 #, fuzzy msgid "" "That's it! All that remains is to build it; put the above code in a file " @@ -348,16 +352,16 @@ msgstr "" "C'est tout ! Il ne reste plus qu'à compiler, placez le code ci-dessus dans " "un fichier :file:`custom.c` et :" -#: extending/newtypes_tutorial.rst:201 +#: extending/newtypes_tutorial.rst:198 #, fuzzy msgid "in a file called :file:`pyproject.toml`, and" msgstr "dans un fichier appelé :file:`setup.py` ; puis en tapant" -#: extending/newtypes_tutorial.rst:208 +#: extending/newtypes_tutorial.rst:205 msgid "in a file called :file:`setup.py`; then typing" msgstr "dans un fichier appelé :file:`setup.py` ; puis en tapant" -#: extending/newtypes_tutorial.rst:214 +#: extending/newtypes_tutorial.rst:211 #, fuzzy msgid "" "in a shell should produce a file :file:`custom.so` in a subdirectory and " @@ -369,11 +373,11 @@ msgstr "" "devriez pouvoir faire ``import custom`` et jouer avec des objets " "personnalisés." -#: extending/newtypes_tutorial.rst:218 +#: extending/newtypes_tutorial.rst:215 msgid "That wasn't so hard, was it?" msgstr "Ce n'était pas si difficile, n'est-ce pas ?" -#: extending/newtypes_tutorial.rst:220 +#: extending/newtypes_tutorial.rst:217 msgid "" "Of course, the current Custom type is pretty uninteresting. It has no data " "and doesn't do anything. It can't even be subclassed." @@ -382,11 +386,11 @@ msgstr "" "données et ne fait rien. Il ne peut même pas être sous-classé." # suit un : -#: extending/newtypes_tutorial.rst:225 +#: extending/newtypes_tutorial.rst:222 msgid "Adding data and methods to the Basic example" msgstr "ajout de données et de méthodes à l'exemple basique" -#: extending/newtypes_tutorial.rst:227 +#: extending/newtypes_tutorial.rst:224 #, fuzzy msgid "" "Let's extend the basic example to add some data and methods. Let's also " @@ -397,11 +401,11 @@ msgstr "" "également le type utilisable comme classe de base. Nous allons créer un " "nouveau module, :mod:`custom2` qui ajoute ces fonctionnalités :" -#: extending/newtypes_tutorial.rst:234 +#: extending/newtypes_tutorial.rst:231 msgid "This version of the module has a number of changes." msgstr "Cette version du module comporte un certain nombre de modifications." -#: extending/newtypes_tutorial.rst:236 +#: extending/newtypes_tutorial.rst:233 #, fuzzy msgid "" "The :class:`!Custom` type now has three data attributes in its C struct, " @@ -414,11 +418,11 @@ msgstr "" "sont des chaînes Python contenant les noms et prénoms. L'attribut *number* " "est un entier C." -#: extending/newtypes_tutorial.rst:240 +#: extending/newtypes_tutorial.rst:237 msgid "The object structure is updated accordingly::" msgstr "La structure de l'objet est mise à jour en conséquence ::" -#: extending/newtypes_tutorial.rst:249 +#: extending/newtypes_tutorial.rst:246 msgid "" "Because we now have data to manage, we have to be more careful about object " "allocation and deallocation. At a minimum, we need a deallocation method::" @@ -427,20 +431,20 @@ msgstr "" "attention à l'allocation et à la libération d'objets. Au minimum, nous avons " "besoin d'une méthode de dés-allocation ::" -#: extending/newtypes_tutorial.rst:260 +#: extending/newtypes_tutorial.rst:258 msgid "which is assigned to the :c:member:`~PyTypeObject.tp_dealloc` member::" msgstr "qui est assignée au membre :c:member:`~PyTypeObject.tp_dealloc` ::" -#: extending/newtypes_tutorial.rst:264 +#: extending/newtypes_tutorial.rst:262 #, fuzzy msgid "" -"This method first clears the reference counts of the two Python attributes. :" -"c:func:`Py_XDECREF` correctly handles the case where its argument is " -"``NULL`` (which might happen here if ``tp_new`` failed midway). It then " -"calls the :c:member:`~PyTypeObject.tp_free` member of the object's type " -"(computed by ``Py_TYPE(self)``) to free the object's memory. Note that the " -"object's type might not be :class:`!CustomType`, because the object may be " -"an instance of a subclass." +"This method first clears the reference counts of the two Python " +"attributes. :c:func:`Py_XDECREF` correctly handles the case where its " +"argument is ``NULL`` (which might happen here if ``tp_new`` failed midway). " +"It then calls the :c:member:`~PyTypeObject.tp_free` member of the object's " +"type (computed by ``Py_TYPE(self)``) to free the object's memory. Note that " +"the object's type might not be :class:`!CustomType`, because the object may " +"be an instance of a subclass." msgstr "" "Cette méthode efface d'abord le nombre de références des deux attributs " "Python. :c:func:`Py_XDECREF` gère correctement le cas où son argument est " @@ -450,13 +454,15 @@ msgstr "" "Notez que le type de l'objet peut ne pas être :class:`CustomType`, car " "l'objet peut être une instance d'une sous-classe." -#: extending/newtypes_tutorial.rst:273 +#: extending/newtypes_tutorial.rst:272 +#, fuzzy msgid "" -"The explicit cast to ``destructor`` above is needed because we defined " -"``Custom_dealloc`` to take a ``CustomObject *`` argument, but the " -"``tp_dealloc`` function pointer expects to receive a ``PyObject *`` " -"argument. Otherwise, the compiler will emit a warning. This is object-" -"oriented polymorphism, in C!" +"The explicit cast to ``CustomObject *`` above is needed because we defined " +"``Custom_dealloc`` to take a ``PyObject *`` argument, as the ``tp_dealloc`` " +"function pointer expects to receive a ``PyObject *`` argument. By assigning " +"to the ``tp_dealloc`` slot of a type, we declare that it can only be called " +"with instances of our ``CustomObject`` class, so the cast to ``(CustomObject " +"*)`` is safe. This is object-oriented polymorphism, in C!" msgstr "" "La conversion explicite en ``destructor`` ci-dessus est nécessaire car nous " "avons défini ``Custom_dealloc`` pour prendre un argument ``CustomObject *``, " @@ -464,7 +470,20 @@ msgstr "" "``PyObject *``. Sinon, le compilateur émet un avertissement. C'est du " "polymorphisme orienté objet, en C !" -#: extending/newtypes_tutorial.rst:279 +#: extending/newtypes_tutorial.rst:280 +msgid "" +"In existing code, or in previous versions of this tutorial, you might see " +"similar functions take a pointer to the subtype object structure " +"(``CustomObject*``) directly, like this::" +msgstr "" + +#: extending/newtypes_tutorial.rst:293 +msgid "" +"This does the same thing on all architectures that CPython supports, but " +"according to the C standard, it invokes undefined behavior." +msgstr "" + +#: extending/newtypes_tutorial.rst:297 msgid "" "We want to make sure that the first and last names are initialized to empty " "strings, so we provide a ``tp_new`` implementation::" @@ -472,20 +491,21 @@ msgstr "" "Nous voulons nous assurer que le prénom et le nom sont initialisés avec des " "chaînes vides, nous fournissons donc une implémentation ``tp_new`` ::" -#: extending/newtypes_tutorial.rst:303 +#: extending/newtypes_tutorial.rst:321 msgid "and install it in the :c:member:`~PyTypeObject.tp_new` member::" msgstr "et installez-le dans le membre :c:member:`~PyTypeObject.tp_new` ::" -#: extending/newtypes_tutorial.rst:307 +#: extending/newtypes_tutorial.rst:325 #, fuzzy msgid "" "The ``tp_new`` handler is responsible for creating (as opposed to " -"initializing) objects of the type. It is exposed in Python as the :meth:" -"`~object.__new__` method. It is not required to define a ``tp_new`` member, " -"and indeed many extension types will simply reuse :c:func:" -"`PyType_GenericNew` as done in the first version of the :class:`!Custom` " -"type above. In this case, we use the ``tp_new`` handler to initialize the " -"``first`` and ``last`` attributes to non-``NULL`` default values." +"initializing) objects of the type. It is exposed in Python as " +"the :meth:`~object.__new__` method. It is not required to define a " +"``tp_new`` member, and indeed many extension types will simply " +"reuse :c:func:`PyType_GenericNew` as done in the first version of " +"the :class:`!Custom` type above. In this case, we use the ``tp_new`` " +"handler to initialize the ``first`` and ``last`` attributes to non-``NULL`` " +"default values." msgstr "" "Le gestionnaire ``tp_new`` est responsable de la création (par opposition à " "l'initialisation) des objets du type. Il est exposé en Python en tant que " @@ -496,14 +516,14 @@ msgstr "" "le gestionnaire ``tp_new`` pour initialiser les attributs ``first`` et " "``last`` à des valeurs par défaut non ``NULL``." -#: extending/newtypes_tutorial.rst:315 +#: extending/newtypes_tutorial.rst:333 msgid "" "``tp_new`` is passed the type being instantiated (not necessarily " "``CustomType``, if a subclass is instantiated) and any arguments passed when " "the type was called, and is expected to return the instance created. " "``tp_new`` handlers always accept positional and keyword arguments, but they " -"often ignore the arguments, leaving the argument handling to initializer (a." -"k.a. ``tp_init`` in C or ``__init__`` in Python) methods." +"often ignore the arguments, leaving the argument handling to initializer " +"(a.k.a. ``tp_init`` in C or ``__init__`` in Python) methods." msgstr "" "``tp_new`` reçoit le type en cours d'instanciation (pas nécessairement " "``CustomType``, si une sous-classe est instanciée) et tous les arguments " @@ -513,7 +533,7 @@ msgstr "" "arguments aux méthodes d'initialisation (alias ``tp_init`` en C ou " "``__init__`` en Python)." -#: extending/newtypes_tutorial.rst:323 +#: extending/newtypes_tutorial.rst:341 msgid "" "``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do " "it itself." @@ -521,24 +541,26 @@ msgstr "" "``tp_new`` ne doit pas appeler ``tp_init`` explicitement, car l'interpréteur " "le fera lui-même." -#: extending/newtypes_tutorial.rst:326 +#: extending/newtypes_tutorial.rst:344 msgid "" "The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` " "slot to allocate memory::" msgstr "" -"L'implémentation ``tp_new`` appelle l'emplacement :c:member:`~PyTypeObject." -"tp_alloc` pour allouer de la mémoire ::" +"L'implémentation ``tp_new`` appelle " +"l'emplacement :c:member:`~PyTypeObject.tp_alloc` pour allouer de la " +"mémoire ::" -#: extending/newtypes_tutorial.rst:331 +#: extending/newtypes_tutorial.rst:349 msgid "" -"Since memory allocation may fail, we must check the :c:member:`~PyTypeObject." -"tp_alloc` result against ``NULL`` before proceeding." +"Since memory allocation may fail, we must check " +"the :c:member:`~PyTypeObject.tp_alloc` result against ``NULL`` before " +"proceeding." msgstr "" "Puisque l'allocation de mémoire peut échouer, nous devons vérifier le " "résultat :c:member:`~PyTypeObject.tp_alloc` par rapport à ``NULL`` avant de " "continuer." -#: extending/newtypes_tutorial.rst:335 +#: extending/newtypes_tutorial.rst:353 msgid "" "We didn't fill the :c:member:`~PyTypeObject.tp_alloc` slot ourselves. " "Rather :c:func:`PyType_Ready` fills it for us by inheriting it from our base " @@ -550,31 +572,33 @@ msgstr "" "hérite de notre classe mère, qui est :class:`object` par défaut. La plupart " "des types utilisent la stratégie d'allocation par défaut." -#: extending/newtypes_tutorial.rst:341 +#: extending/newtypes_tutorial.rst:359 #, fuzzy msgid "" "If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " -"that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:`~object." -"__new__`), you must *not* try to determine what method to call using method " -"resolution order at runtime. Always statically determine what type you are " -"going to call, and call its :c:member:`~PyTypeObject.tp_new` directly, or " -"via ``type->tp_base->tp_new``. If you do not do this, Python subclasses of " -"your type that also inherit from other Python-defined classes may not work " -"correctly. (Specifically, you may not be able to create instances of such " -"subclasses without getting a :exc:`TypeError`.)" -msgstr "" -"Si vous créez une :c:member:`~PyTypeObject.tp_new` coopérative (qui appelle :" -"c:member:`~PyTypeObject.tp_new` ou :meth:`__new__` d'un type de base), vous " -"ne devez *pas* essayer de déterminer quelle méthode appeler en utilisant " -"l'ordre de résolution des méthodes au moment de l'exécution. Déterminez " -"toujours statiquement quel type vous allez appeler, et appelez son :c:member:" -"`~PyTypeObject.tp_new` directement, ou via ``type->tp_base->tp_new``. Si " -"vous ne le faites pas, les sous-classes Python de votre type qui héritent " -"également d'autres classes définies par Python risquent de ne pas " -"fonctionner correctement. (Plus précisément, vous ne pourrez peut-être pas " -"créer d'instances de telles sous-classes sans obtenir une :exc:`TypeError`.)" - -#: extending/newtypes_tutorial.rst:351 +"that calls a base type's :c:member:`~PyTypeObject.tp_new` " +"or :meth:`~object.__new__`), you must *not* try to determine what method to " +"call using method resolution order at runtime. Always statically determine " +"what type you are going to call, and call " +"its :c:member:`~PyTypeObject.tp_new` directly, or via ``type->tp_base-" +">tp_new``. If you do not do this, Python subclasses of your type that also " +"inherit from other Python-defined classes may not work correctly. " +"(Specifically, you may not be able to create instances of such subclasses " +"without getting a :exc:`TypeError`.)" +msgstr "" +"Si vous créez une :c:member:`~PyTypeObject.tp_new` coopérative (qui " +"appelle :c:member:`~PyTypeObject.tp_new` ou :meth:`__new__` d'un type de " +"base), vous ne devez *pas* essayer de déterminer quelle méthode appeler en " +"utilisant l'ordre de résolution des méthodes au moment de l'exécution. " +"Déterminez toujours statiquement quel type vous allez appeler, et appelez " +"son :c:member:`~PyTypeObject.tp_new` directement, ou via ``type->tp_base-" +">tp_new``. Si vous ne le faites pas, les sous-classes Python de votre type " +"qui héritent également d'autres classes définies par Python risquent de ne " +"pas fonctionner correctement. (Plus précisément, vous ne pourrez peut-être " +"pas créer d'instances de telles sous-classes sans obtenir " +"une :exc:`TypeError`.)" + +#: extending/newtypes_tutorial.rst:369 msgid "" "We also define an initialization function which accepts arguments to provide " "initial values for our instance::" @@ -582,17 +606,17 @@ msgstr "" "Nous définissons également une fonction d'initialisation qui accepte des " "arguments pour fournir des valeurs initiales pour notre instance ::" -#: extending/newtypes_tutorial.rst:380 +#: extending/newtypes_tutorial.rst:399 msgid "by filling the :c:member:`~PyTypeObject.tp_init` slot. ::" msgstr "en remplissant l'emplacement :c:member:`~PyTypeObject.tp_init`. ::" -#: extending/newtypes_tutorial.rst:384 +#: extending/newtypes_tutorial.rst:403 #, fuzzy msgid "" -"The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the :meth:" -"`~object.__init__` method. It is used to initialize an object after it's " -"created. Initializers always accept positional and keyword arguments, and " -"they should return either ``0`` on success or ``-1`` on error." +"The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as " +"the :meth:`~object.__init__` method. It is used to initialize an object " +"after it's created. Initializers always accept positional and keyword " +"arguments, and they should return either ``0`` on success or ``-1`` on error." msgstr "" "L'emplacement :c:member:`~PyTypeObject.tp_init` est exposé en Python en tant " "que méthode :meth:`__init__`. Il est utilisé pour initialiser un objet après " @@ -600,7 +624,7 @@ msgstr "" "et nommés, et ils doivent renvoyer soit ``0`` en cas de succès, soit ``-1`` " "en cas d'erreur." -#: extending/newtypes_tutorial.rst:389 +#: extending/newtypes_tutorial.rst:408 #, fuzzy msgid "" "Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " @@ -614,18 +638,20 @@ msgstr "" "Contrairement au gestionnaire ``tp_new``, il n'y a aucune garantie que " "``tp_init`` soit appelé (par exemple, le module :mod:`pickle` par défaut " "n'appelle pas :meth:`__init__` sur les instances *unpickled*). Il peut " -"également être appelé plusieurs fois. N'importe qui peut appeler la méthode :" -"meth:`__init__` sur nos objets. Pour cette raison, nous devons être très " -"prudents lors de l'attribution des nouvelles valeurs d'attribut. On pourrait " -"être tenté, par exemple, d'affecter le membre ``first`` comme ceci ::" +"également être appelé plusieurs fois. N'importe qui peut appeler la " +"méthode :meth:`__init__` sur nos objets. Pour cette raison, nous devons être " +"très prudents lors de l'attribution des nouvelles valeurs d'attribut. On " +"pourrait être tenté, par exemple, d'affecter le membre ``first`` comme " +"ceci ::" -#: extending/newtypes_tutorial.rst:403 +#: extending/newtypes_tutorial.rst:422 +#, fuzzy msgid "" "But this would be risky. Our type doesn't restrict the type of the " "``first`` member, so it could be any kind of object. It could have a " "destructor that causes code to be executed that tries to access the " -"``first`` member; or that destructor could release the :term:`Global " -"interpreter Lock ` and let arbitrary code run in other threads that " +"``first`` member; or that destructor could detach the :term:`thread state " +"` and let arbitrary code run in other threads that " "accesses and modifies our object." msgstr "" "Mais ce serait risqué. Notre type ne limite pas le type du membre ``first``, " @@ -635,7 +661,7 @@ msgstr "" "Lock ` et laisser du code arbitraire s'exécuter dans d'autres threads " "qui accèdent et modifient notre objet." -#: extending/newtypes_tutorial.rst:410 +#: extending/newtypes_tutorial.rst:429 msgid "" "To be paranoid and protect ourselves against this possibility, we almost " "always reassign members before decrementing their reference counts. When " @@ -645,30 +671,32 @@ msgstr "" "réaffecte presque toujours les membres avant de décrémenter leur compteur de " "références. Quand ne devons-nous pas faire cela ?" -#: extending/newtypes_tutorial.rst:414 +#: extending/newtypes_tutorial.rst:433 msgid "when we absolutely know that the reference count is greater than 1;" msgstr "lorsque l'on est sûr que le compteur de références est supérieur à 1 ;" -#: extending/newtypes_tutorial.rst:416 +#: extending/newtypes_tutorial.rst:435 +#, fuzzy msgid "" -"when we know that deallocation of the object [#]_ will neither release the :" -"term:`GIL` nor cause any calls back into our type's code;" +"when we know that deallocation of the object [#]_ will neither detach " +"the :term:`thread state ` nor cause any calls back " +"into our type's code;" msgstr "" "lorsque nous savons que la libération de la mémoire de l'objet [#]_ ne " "libérera pas le :term:`GIL` ni ne provoquera de rappel dans le code de notre " "type ;" -#: extending/newtypes_tutorial.rst:419 +#: extending/newtypes_tutorial.rst:438 msgid "" -"when decrementing a reference count in a :c:member:`~PyTypeObject." -"tp_dealloc` handler on a type which doesn't support cyclic garbage " -"collection [#]_." +"when decrementing a reference count in " +"a :c:member:`~PyTypeObject.tp_dealloc` handler on a type which doesn't " +"support cyclic garbage collection [#]_." msgstr "" -"lors de la décrémentation d'un compteur de références dans un gestionnaire :" -"c:member:`~PyTypeObject.tp_dealloc` sur un type qui ne prend pas en charge " -"le ramasse-miettes cyclique [#]_." +"lors de la décrémentation d'un compteur de références dans un " +"gestionnaire :c:member:`~PyTypeObject.tp_dealloc` sur un type qui ne prend " +"pas en charge le ramasse-miettes cyclique [#]_." -#: extending/newtypes_tutorial.rst:422 +#: extending/newtypes_tutorial.rst:441 msgid "" "We want to expose our instance variables as attributes. There are a number " "of ways to do that. The simplest way is to define member definitions::" @@ -677,24 +705,24 @@ msgstr "" "existe plusieurs façons de le faire. Le moyen le plus simple consiste à " "définir des définitions de membres ::" -#: extending/newtypes_tutorial.rst:435 +#: extending/newtypes_tutorial.rst:454 msgid "" "and put the definitions in the :c:member:`~PyTypeObject.tp_members` slot::" msgstr "" -"et placer les définitions dans l'emplacement :c:member:`~PyTypeObject." -"tp_members` ::" +"et placer les définitions dans " +"l'emplacement :c:member:`~PyTypeObject.tp_members` ::" -#: extending/newtypes_tutorial.rst:439 +#: extending/newtypes_tutorial.rst:458 msgid "" "Each member definition has a member name, type, offset, access flags and " "documentation string. See the :ref:`Generic-Attribute-Management` section " "below for details." msgstr "" "Chaque définition de membre possède un nom, un type, un décalage, des " -"indicateurs d'accès et une chaîne de documentation. Voir la section :ref:" -"`Generic-Attribute-Management` ci-dessous pour plus de détails." +"indicateurs d'accès et une chaîne de documentation. Voir la " +"section :ref:`Generic-Attribute-Management` ci-dessous pour plus de détails." -#: extending/newtypes_tutorial.rst:443 +#: extending/newtypes_tutorial.rst:462 msgid "" "A disadvantage of this approach is that it doesn't provide a way to restrict " "the types of objects that can be assigned to the Python attributes. We " @@ -713,7 +741,7 @@ msgstr "" "les membres peuvent être définis sur ``NULL`` si les attributs sont " "supprimés." -#: extending/newtypes_tutorial.rst:450 +#: extending/newtypes_tutorial.rst:469 #, fuzzy msgid "" "We define a single method, :meth:`!Custom.name`, that outputs the objects " @@ -722,32 +750,32 @@ msgstr "" "Nous définissons une seule méthode, :meth:`Custom.name()`, qui génère le nom " "des objets sous la forme de la concaténation des prénom et nom. ::" -#: extending/newtypes_tutorial.rst:467 +#: extending/newtypes_tutorial.rst:487 #, fuzzy msgid "" -"The method is implemented as a C function that takes a :class:`!Custom` (or :" -"class:`!Custom` subclass) instance as the first argument. Methods always " -"take an instance as the first argument. Methods often take positional and " -"keyword arguments as well, but in this case we don't take any and don't need " -"to accept a positional argument tuple or keyword argument dictionary. This " -"method is equivalent to the Python method:" +"The method is implemented as a C function that takes a :class:`!Custom` " +"(or :class:`!Custom` subclass) instance as the first argument. Methods " +"always take an instance as the first argument. Methods often take positional " +"and keyword arguments as well, but in this case we don't take any and don't " +"need to accept a positional argument tuple or keyword argument dictionary. " +"This method is equivalent to the Python method:" msgstr "" -"La méthode est implémentée comme une fonction C qui prend une instance :" -"class:`Custom` (ou une sous-classe de :class:`Custom`) comme premier " -"argument. Les méthodes prennent toujours une instance comme premier " +"La méthode est implémentée comme une fonction C qui prend une " +"instance :class:`Custom` (ou une sous-classe de :class:`Custom`) comme " +"premier argument. Les méthodes prennent toujours une instance comme premier " "argument. Les méthodes prennent souvent aussi des arguments positionnels et " "nommés, mais dans ce cas nous n'en prenons aucun et n'avons pas besoin " "d'accepter un *n*-uplet d'arguments positionnels ou un dictionnaire en " "argument nommé. Cette méthode est équivalente à la méthode Python :" -#: extending/newtypes_tutorial.rst:479 +#: extending/newtypes_tutorial.rst:499 #, fuzzy msgid "" -"Note that we have to check for the possibility that our :attr:`!first` and :" -"attr:`!last` members are ``NULL``. This is because they can be deleted, in " -"which case they are set to ``NULL``. It would be better to prevent deletion " -"of these attributes and to restrict the attribute values to be strings. " -"We'll see how to do that in the next section." +"Note that we have to check for the possibility that our :attr:`!first` " +"and :attr:`!last` members are ``NULL``. This is because they can be " +"deleted, in which case they are set to ``NULL``. It would be better to " +"prevent deletion of these attributes and to restrict the attribute values to " +"be strings. We'll see how to do that in the next section." msgstr "" "Notez que nous devons vérifier la possibilité que nos membres :attr:`first` " "et :attr:`last` soient ``NULL``. En effet, ils peuvent être supprimés, " @@ -755,7 +783,7 @@ msgstr "" "suppression de ces attributs et de limiter les valeurs d'attribut à des " "chaînes. Nous verrons comment procéder dans la section suivante." -#: extending/newtypes_tutorial.rst:485 +#: extending/newtypes_tutorial.rst:505 msgid "" "Now that we've defined the method, we need to create an array of method " "definitions::" @@ -763,7 +791,7 @@ msgstr "" "Maintenant que nous avons défini la méthode, nous devons créer un tableau de " "définitions de méthode ::" -#: extending/newtypes_tutorial.rst:495 +#: extending/newtypes_tutorial.rst:515 msgid "" "(note that we used the :c:macro:`METH_NOARGS` flag to indicate that the " "method is expecting no arguments other than *self*)" @@ -771,12 +799,12 @@ msgstr "" "(notez que nous avons utilisé le drapeau :c:macro:`METH_NOARGS` pour " "indiquer que la méthode n'attend aucun argument autre que *self*)" -#: extending/newtypes_tutorial.rst:498 +#: extending/newtypes_tutorial.rst:518 msgid "and assign it to the :c:member:`~PyTypeObject.tp_methods` slot::" msgstr "" "et assignons-le à l'emplacement :c:member:`~PyTypeObject.tp_methods` ::" -#: extending/newtypes_tutorial.rst:502 +#: extending/newtypes_tutorial.rst:522 msgid "" "Finally, we'll make our type usable as a base class for subclassing. We've " "written our methods carefully so far so that they don't make any assumptions " @@ -786,10 +814,11 @@ msgstr "" "Enfin, nous rendons notre type utilisable comme classe de base pour le sous-" "classement. Nous avons écrit nos méthodes avec soin jusqu'à présent afin " "qu'elles ne fassent aucune hypothèse sur le type de l'objet créé ou utilisé, " -"donc tout ce que nous avons à faire est d'ajouter la macro :c:macro:" -"`Py_TPFLAGS_BASETYPE` à notre définition d'indicateur de classe ::" +"donc tout ce que nous avons à faire est d'ajouter la " +"macro :c:macro:`Py_TPFLAGS_BASETYPE` à notre définition d'indicateur de " +"classe ::" -#: extending/newtypes_tutorial.rst:509 +#: extending/newtypes_tutorial.rst:529 #, fuzzy msgid "" "We rename :c:func:`!PyInit_custom` to :c:func:`!PyInit_custom2`, update the " @@ -800,50 +829,50 @@ msgstr "" "à jour le nom du module dans la structure :c:type:`PyModuleDef` et mettons à " "jour le nom complet de la classe dans la structure :c:type:`PyTypeObject`." -#: extending/newtypes_tutorial.rst:513 +#: extending/newtypes_tutorial.rst:533 #, fuzzy msgid "Finally, we update our :file:`setup.py` file to include the new module," msgstr "" "Enfin, nous mettons à jour notre fichier :file:`setup.py` pour construire le " "nouveau module :" -#: extending/newtypes_tutorial.rst:523 +#: extending/newtypes_tutorial.rst:543 msgid "and then we re-install so that we can ``import custom2``:" msgstr "" -#: extending/newtypes_tutorial.rst:530 +#: extending/newtypes_tutorial.rst:550 msgid "Providing finer control over data attributes" msgstr "Contrôle précis sur les attributs de données" -#: extending/newtypes_tutorial.rst:532 +#: extending/newtypes_tutorial.rst:552 #, fuzzy msgid "" "In this section, we'll provide finer control over how the :attr:`!first` " "and :attr:`!last` attributes are set in the :class:`!Custom` example. In the " -"previous version of our module, the instance variables :attr:`!first` and :" -"attr:`!last` could be set to non-string values or even deleted. We want to " -"make sure that these attributes always contain strings." +"previous version of our module, the instance variables :attr:`!first` " +"and :attr:`!last` could be set to non-string values or even deleted. We want " +"to make sure that these attributes always contain strings." msgstr "" "Dans cette section, nous assurons un contrôle plus précis sur la façon dont " -"les attributs :attr:`first` et :attr:`last` sont définis dans l'exemple :" -"class:`Custom`. Dans la version précédente de notre module, les variables " -"d'instance :attr:`first` et :attr:`last` pouvaient être définies sur des " -"valeurs autres que des chaînes ou même supprimées. Nous voulons nous assurer " -"que ces attributs contiennent toujours des chaînes." +"les attributs :attr:`first` et :attr:`last` sont définis dans " +"l'exemple :class:`Custom`. Dans la version précédente de notre module, les " +"variables d'instance :attr:`first` et :attr:`last` pouvaient être définies " +"sur des valeurs autres que des chaînes ou même supprimées. Nous voulons nous " +"assurer que ces attributs contiennent toujours des chaînes." -#: extending/newtypes_tutorial.rst:541 +#: extending/newtypes_tutorial.rst:561 #, fuzzy msgid "" "To provide greater control, over the :attr:`!first` and :attr:`!last` " "attributes, we'll use custom getter and setter functions. Here are the " "functions for getting and setting the :attr:`!first` attribute::" msgstr "" -"Pour avoir un meilleur contrôle sur les attributs :attr:`first` et :attr:" -"`last`, nous utilisons des fonctions accesseur (*getter*) et mutateur " -"(*setter*) personnalisées. Voici les fonctions pour obtenir et définir " -"l'attribut :attr:`first` ::" +"Pour avoir un meilleur contrôle sur les attributs :attr:`first` " +"et :attr:`last`, nous utilisons des fonctions accesseur (*getter*) et " +"mutateur (*setter*) personnalisées. Voici les fonctions pour obtenir et " +"définir l'attribut :attr:`first` ::" -#: extending/newtypes_tutorial.rst:572 +#: extending/newtypes_tutorial.rst:594 #, fuzzy msgid "" "The getter function is passed a :class:`!Custom` object and a \"closure\", " @@ -861,7 +890,7 @@ msgstr "" "qui décident de l'attribut à obtenir ou à définir en fonction des données " "dans la fermeture.)" -#: extending/newtypes_tutorial.rst:578 +#: extending/newtypes_tutorial.rst:600 #, fuzzy msgid "" "The setter function is passed the :class:`!Custom` object, the new value, " @@ -874,16 +903,16 @@ msgstr "" "supprimé. Dans notre mutateur, nous levons une erreur si l'attribut est " "supprimé ou si sa nouvelle valeur n'est pas une chaîne." -#: extending/newtypes_tutorial.rst:583 +#: extending/newtypes_tutorial.rst:605 msgid "We create an array of :c:type:`PyGetSetDef` structures::" msgstr "Nous créons un tableau de structures :c:type:`PyGetSetDef` ::" -#: extending/newtypes_tutorial.rst:593 +#: extending/newtypes_tutorial.rst:615 msgid "and register it in the :c:member:`~PyTypeObject.tp_getset` slot::" msgstr "" "et l'enregistrons dans l'emplacement :c:member:`~PyTypeObject.tp_getset` ::" -#: extending/newtypes_tutorial.rst:597 +#: extending/newtypes_tutorial.rst:619 msgid "" "The last item in a :c:type:`PyGetSetDef` structure is the \"closure\" " "mentioned above. In this case, we aren't using a closure, so we just pass " @@ -893,20 +922,21 @@ msgstr "" "mentionnée ci-dessus. Dans ce cas, nous n'utilisons pas de fermeture, nous " "passons donc simplement ``NULL``." -#: extending/newtypes_tutorial.rst:600 +#: extending/newtypes_tutorial.rst:622 msgid "We also remove the member definitions for these attributes::" msgstr "" "Nous supprimons également les définitions de membre pour ces attributs :" -#: extending/newtypes_tutorial.rst:608 +#: extending/newtypes_tutorial.rst:630 msgid "" "We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only " "allow strings [#]_ to be passed::" msgstr "" -"Nous devons également mettre à jour le gestionnaire :c:member:`~PyTypeObject." -"tp_init` pour autoriser uniquement le passage des chaînes [#]_ ::" +"Nous devons également mettre à jour le " +"gestionnaire :c:member:`~PyTypeObject.tp_init` pour autoriser uniquement le " +"passage des chaînes [#]_ ::" -#: extending/newtypes_tutorial.rst:637 +#: extending/newtypes_tutorial.rst:660 msgid "" "With these changes, we can assure that the ``first`` and ``last`` members " "are never ``NULL`` so we can remove checks for ``NULL`` values in almost all " @@ -923,7 +953,7 @@ msgstr "" "ces appels est dans l'implémentation de ``tp_dealloc``, où il est possible " "que l'initialisation de ces membres ait échoué dans ``tp_new``." -#: extending/newtypes_tutorial.rst:644 +#: extending/newtypes_tutorial.rst:667 msgid "" "We also rename the module initialization function and module name in the " "initialization function, as we did before, and we add an extra definition to " @@ -931,14 +961,14 @@ msgid "" msgstr "" "Nous renommons également la fonction d'initialisation du module et le nom du " "module dans la fonction d'initialisation, comme nous l'avons fait " -"précédemment, et nous ajoutons une définition supplémentaire au fichier :" -"file:`setup.py`." +"précédemment, et nous ajoutons une définition supplémentaire au " +"fichier :file:`setup.py`." -#: extending/newtypes_tutorial.rst:650 +#: extending/newtypes_tutorial.rst:673 msgid "Supporting cyclic garbage collection" msgstr "Prise en charge du ramasse-miettes cyclique" -#: extending/newtypes_tutorial.rst:652 +#: extending/newtypes_tutorial.rst:675 msgid "" "Python has a :term:`cyclic garbage collector (GC) ` that " "can identify unneeded objects even when their reference counts are not zero. " @@ -949,7 +979,7 @@ msgstr "" "n'est pas nul. Cela peut se produire lorsque des objets sont impliqués dans " "des cycles. Par exemple, considérons :" -#: extending/newtypes_tutorial.rst:662 +#: extending/newtypes_tutorial.rst:685 msgid "" "In this example, we create a list that contains itself. When we delete it, " "it still has a reference from itself. Its reference count doesn't drop to " @@ -962,23 +992,24 @@ msgstr "" "cyclique de Python finira par comprendre que la liste est un déchet et la " "libérera." -#: extending/newtypes_tutorial.rst:667 +#: extending/newtypes_tutorial.rst:690 #, fuzzy msgid "" "In the second version of the :class:`!Custom` example, we allowed any kind " "of object to be stored in the :attr:`!first` or :attr:`!last` attributes " -"[#]_. Besides, in the second and third versions, we allowed subclassing :" -"class:`!Custom`, and subclasses may add arbitrary attributes. For any of " -"those two reasons, :class:`!Custom` objects can participate in cycles:" +"[#]_. Besides, in the second and third versions, we allowed " +"subclassing :class:`!Custom`, and subclasses may add arbitrary attributes. " +"For any of those two reasons, :class:`!Custom` objects can participate in " +"cycles:" msgstr "" "Dans la seconde version de l'exemple :class:`Custom`, nous avons autorisé le " -"stockage de n'importe quel type d'objet dans les attributs :attr:`first` ou :" -"attr:`last` [#]_. De plus, dans les deuxième et troisième versions, nous " +"stockage de n'importe quel type d'objet dans les attributs :attr:`first` " +"ou :attr:`last` [#]_. De plus, dans les deuxième et troisième versions, nous " "avons autorisé le sous-classement de :class:`Custom`, et les sous-classes " "peuvent ajouter des attributs arbitraires. Pour l'une de ces deux raisons, " "les objets :class:`Custom` peuvent produire des cycles :" -#: extending/newtypes_tutorial.rst:681 +#: extending/newtypes_tutorial.rst:704 #, fuzzy msgid "" "To allow a :class:`!Custom` instance participating in a reference cycle to " @@ -991,7 +1022,7 @@ msgstr "" "cyclique, notre type :class:`Custom` doit définir deux emplacements " "supplémentaires et activer un drapeau qui active ces emplacements :" -#: extending/newtypes_tutorial.rst:688 +#: extending/newtypes_tutorial.rst:711 msgid "" "First, the traversal method lets the cyclic GC know about subobjects that " "could participate in cycles::" @@ -1000,14 +1031,14 @@ msgstr "" "miettes cyclique de connaître les sous-objets qui pourraient conduire à des " "cycles ::" -#: extending/newtypes_tutorial.rst:708 +#: extending/newtypes_tutorial.rst:732 #, fuzzy msgid "" -"For each subobject that can participate in cycles, we need to call the :c:" -"func:`!visit` function, which is passed to the traversal method. The :c:func:" -"`!visit` function takes as arguments the subobject and the extra argument " -"*arg* passed to the traversal method. It returns an integer value that must " -"be returned if it is non-zero." +"For each subobject that can participate in cycles, we need to call " +"the :c:func:`!visit` function, which is passed to the traversal method. " +"The :c:func:`!visit` function takes as arguments the subobject and the extra " +"argument *arg* passed to the traversal method. It returns an integer value " +"that must be returned if it is non-zero." msgstr "" "Pour chaque sous-objet pouvant conduire à des cycles, nous devons appeler la " "fonction :c:func:`visit`, qui est passée à la méthode de parcours. La " @@ -1015,7 +1046,7 @@ msgstr "" "supplémentaire *arg* passé à la méthode de parcours. Elle renvoie une valeur " "entière qui doit être renvoyée si elle est différente de zéro." -#: extending/newtypes_tutorial.rst:714 +#: extending/newtypes_tutorial.rst:738 msgid "" "Python provides a :c:func:`Py_VISIT` macro that automates calling visit " "functions. With :c:func:`Py_VISIT`, we can minimize the amount of " @@ -1026,7 +1057,7 @@ msgstr "" "quantité de code générique dans ``Custom_traverse`` ::" # suit un : -#: extending/newtypes_tutorial.rst:727 +#: extending/newtypes_tutorial.rst:752 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` implementation must name its " "arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`." @@ -1034,7 +1065,7 @@ msgstr "" "l'implémentation :c:member:`~PyTypeObject.tp_traverse` doit nommer ses " "arguments exactement *visit* et *arg* afin d'utiliser :c:func:`Py_VISIT`." -#: extending/newtypes_tutorial.rst:730 +#: extending/newtypes_tutorial.rst:755 msgid "" "Second, we need to provide a method for clearing any subobjects that can " "participate in cycles::" @@ -1042,7 +1073,7 @@ msgstr "" "Deuxièmement, nous devons fournir une méthode pour effacer tous les sous-" "objets qui peuvent conduire à des cycles ::" -#: extending/newtypes_tutorial.rst:741 +#: extending/newtypes_tutorial.rst:767 msgid "" "Notice the use of the :c:func:`Py_CLEAR` macro. It is the recommended and " "safe way to clear data attributes of arbitrary types while decrementing " @@ -1053,34 +1084,35 @@ msgid "" msgstr "" "Notez l'utilisation de la macro :c:func:`Py_CLEAR`. C'est le moyen " "recommandé et sûr d'effacer les attributs de données de types arbitraires " -"tout en décrémentant leur compteur de références. Si vous deviez appeler :c:" -"func:`Py_XDECREF` à la place sur l'attribut avant de le définir sur " -"``NULL``, il est possible que le destructeur de l'attribut appelle du code " -"qui lit à nouveau l'attribut (*surtout* s'il existe un cycle de références)." +"tout en décrémentant leur compteur de références. Si vous deviez " +"appeler :c:func:`Py_XDECREF` à la place sur l'attribut avant de le définir " +"sur ``NULL``, il est possible que le destructeur de l'attribut appelle du " +"code qui lit à nouveau l'attribut (*surtout* s'il existe un cycle de " +"références)." # suit un : -#: extending/newtypes_tutorial.rst:749 +#: extending/newtypes_tutorial.rst:775 msgid "You could emulate :c:func:`Py_CLEAR` by writing::" msgstr "vous pouvez émuler :c:func:`Py_CLEAR` en écrivant ::" -#: extending/newtypes_tutorial.rst:756 +#: extending/newtypes_tutorial.rst:782 msgid "" -"Nevertheless, it is much easier and less error-prone to always use :c:func:" -"`Py_CLEAR` when deleting an attribute. Don't try to micro-optimize at the " -"expense of robustness!" +"Nevertheless, it is much easier and less error-prone to always " +"use :c:func:`Py_CLEAR` when deleting an attribute. Don't try to micro-" +"optimize at the expense of robustness!" msgstr "" "Néanmoins, il est beaucoup plus facile et moins sujet aux erreurs de " "toujours utiliser :c:func:`Py_CLEAR` lors de la suppression d'un attribut. " "N'essayez pas de micro-optimiser au détriment de la robustesse !" -#: extending/newtypes_tutorial.rst:760 +#: extending/newtypes_tutorial.rst:786 msgid "" "The deallocator ``Custom_dealloc`` may call arbitrary code when clearing " "attributes. It means the circular GC can be triggered inside the function. " "Since the GC assumes reference count is not zero, we need to untrack the " "object from the GC by calling :c:func:`PyObject_GC_UnTrack` before clearing " -"members. Here is our reimplemented deallocator using :c:func:" -"`PyObject_GC_UnTrack` and ``Custom_clear``::" +"members. Here is our reimplemented deallocator " +"using :c:func:`PyObject_GC_UnTrack` and ``Custom_clear``::" msgstr "" "La fonction de libération de la mémoire ``Custom_dealloc`` peut appeler du " "code arbitraire lors de la suppression des attributs. Cela signifie que le " @@ -1088,33 +1120,35 @@ msgstr "" "Étant donné que le ramasse-miettes suppose que le nombre de références n'est " "pas nul, nous devons annuler le suivi de l'objet par le ramasse-miettes en " "appelant :c:func:`PyObject_GC_UnTrack` avant d'effacer les membres. Voici " -"notre fonction de libération de la mémoire réimplémentée en utilisant :c:" -"func:`PyObject_GC_UnTrack` et ``Custom_clear`` ::" +"notre fonction de libération de la mémoire réimplémentée en " +"utilisant :c:func:`PyObject_GC_UnTrack` et ``Custom_clear`` ::" -#: extending/newtypes_tutorial.rst:775 +#: extending/newtypes_tutorial.rst:801 msgid "" "Finally, we add the :c:macro:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" msgstr "" "Enfin, nous ajoutons le drapeau :c:macro:`Py_TPFLAGS_HAVE_GC` aux drapeaux " "de la classe ::" -#: extending/newtypes_tutorial.rst:779 +#: extending/newtypes_tutorial.rst:805 msgid "" -"That's pretty much it. If we had written custom :c:member:`~PyTypeObject." -"tp_alloc` or :c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify " -"them for cyclic garbage collection. Most extensions will use the versions " +"That's pretty much it. If we had written " +"custom :c:member:`~PyTypeObject.tp_alloc` " +"or :c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify them for " +"cyclic garbage collection. Most extensions will use the versions " "automatically provided." msgstr "" -"C'est à peu près tout. Si nous avions écrit des gestionnaires personnalisés :" -"c:member:`~PyTypeObject.tp_alloc` ou :c:member:`~PyTypeObject.tp_free`, nous " -"aurions besoin de les modifier pour le ramasse-miettes cyclique. La plupart " -"des extensions utilisent les versions fournies automatiquement." +"C'est à peu près tout. Si nous avions écrit des gestionnaires " +"personnalisés :c:member:`~PyTypeObject.tp_alloc` " +"ou :c:member:`~PyTypeObject.tp_free`, nous aurions besoin de les modifier " +"pour le ramasse-miettes cyclique. La plupart des extensions utilisent les " +"versions fournies automatiquement." -#: extending/newtypes_tutorial.rst:785 +#: extending/newtypes_tutorial.rst:811 msgid "Subclassing other types" msgstr "Sous-classement d'autres types" -#: extending/newtypes_tutorial.rst:787 +#: extending/newtypes_tutorial.rst:813 msgid "" "It is possible to create new extension types that are derived from existing " "types. It is easiest to inherit from the built in types, since an extension " @@ -1127,7 +1161,7 @@ msgstr "" "peut être difficile de partager ces structures :c:type:`PyTypeObject` entre " "modules d'extension." -#: extending/newtypes_tutorial.rst:792 +#: extending/newtypes_tutorial.rst:818 #, fuzzy msgid "" "In this example we will create a :class:`!SubList` type that inherits from " @@ -1137,21 +1171,21 @@ msgid "" msgstr "" "Dans cet exemple, nous allons créer un type :class:`SubList` qui hérite du " "type intégré :class:`list`. Le nouveau type sera complètement compatible " -"avec les listes natives, mais aura une méthode supplémentaire :meth:" -"`increment` qui augmente un compteur interne :" +"avec les listes natives, mais aura une méthode " +"supplémentaire :meth:`increment` qui augmente un compteur interne :" -#: extending/newtypes_tutorial.rst:812 +#: extending/newtypes_tutorial.rst:838 #, fuzzy msgid "" "As you can see, the source code closely resembles the :class:`!Custom` " "examples in previous sections. We will break down the main differences " "between them. ::" msgstr "" -"Comme vous pouvez le voir, le code source ressemble beaucoup aux exemples :" -"class:`Custom` des sections précédentes. Analysons les principales " +"Comme vous pouvez le voir, le code source ressemble beaucoup aux " +"exemples :class:`Custom` des sections précédentes. Analysons les principales " "différences ::" -#: extending/newtypes_tutorial.rst:820 +#: extending/newtypes_tutorial.rst:846 msgid "" "The primary difference for derived type objects is that the base type's " "object structure must be the first value. The base type will already " @@ -1161,7 +1195,7 @@ msgstr "" "structure d'objet du type père doit être la première valeur. Le type père " "inclut déjà le :c:func:`PyObject_HEAD` au début de sa structure." -#: extending/newtypes_tutorial.rst:824 +#: extending/newtypes_tutorial.rst:850 #, fuzzy msgid "" "When a Python object is a :class:`!SubList` instance, its ``PyObject *`` " @@ -1172,7 +1206,7 @@ msgstr "" "``PyObject *`` peut être trans-typé en toute sécurité vers ``PyListObject " "*`` et ``SubListObject *`` ::" -#: extending/newtypes_tutorial.rst:836 +#: extending/newtypes_tutorial.rst:863 #, fuzzy msgid "" "We see above how to call through to the :meth:`~object.__init__` method of " @@ -1181,50 +1215,55 @@ msgstr "" "Nous voyons ci-dessus comment appeler la méthode :attr:`__init__` du type " "père." -#: extending/newtypes_tutorial.rst:839 +#: extending/newtypes_tutorial.rst:866 msgid "" -"This pattern is important when writing a type with custom :c:member:" -"`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_dealloc` members. " +"This pattern is important when writing a type with " +"custom :c:member:`~PyTypeObject.tp_new` " +"and :c:member:`~PyTypeObject.tp_dealloc` members. " "The :c:member:`~PyTypeObject.tp_new` handler should not actually create the " "memory for the object with its :c:member:`~PyTypeObject.tp_alloc`, but let " "the base class handle it by calling its own :c:member:`~PyTypeObject.tp_new`." msgstr "" "Ce modèle est important lors de l'écriture d'un type avec des membres " -"personnalisés :c:member:`~PyTypeObject.tp_new` et :c:member:`~PyTypeObject." -"tp_dealloc`. Le gestionnaire :c:member:`~PyTypeObject.tp_new` ne doit pas " -"réellement allouer la mémoire pour l'objet avec son :c:member:`~PyTypeObject." -"tp_alloc`, mais laisser la classe mère gérer ça en appelant sa propre :c:" -"member:`~PyTypeObject.tp_new`." - -#: extending/newtypes_tutorial.rst:845 -msgid "" -"The :c:type:`PyTypeObject` struct supports a :c:member:`~PyTypeObject." -"tp_base` specifying the type's concrete base class. Due to cross-platform " -"compiler issues, you can't fill that field directly with a reference to :c:" -"type:`PyList_Type`; it should be done later in the module initialization " -"function::" -msgstr "" -"La structure :c:type:`PyTypeObject` prend en charge un :c:member:" -"`~PyTypeObject.tp_base` spécifiant la classe mère concrète du type. En " -"raison de problèmes de compilateur multiplateformes, vous ne pouvez pas " -"remplir ce champ directement avec une référence à :c:type:`PyList_Type` ; " -"cela doit être fait plus tard dans la fonction d'initialisation du module ::" - -#: extending/newtypes_tutorial.rst:871 -msgid "" -"Before calling :c:func:`PyType_Ready`, the type structure must have the :c:" -"member:`~PyTypeObject.tp_base` slot filled in. When we are deriving an " -"existing type, it is not necessary to fill out the :c:member:`~PyTypeObject." -"tp_alloc` slot with :c:func:`PyType_GenericNew` -- the allocation function " -"from the base type will be inherited." +"personnalisés :c:member:`~PyTypeObject.tp_new` " +"et :c:member:`~PyTypeObject.tp_dealloc`. Le " +"gestionnaire :c:member:`~PyTypeObject.tp_new` ne doit pas réellement allouer " +"la mémoire pour l'objet avec son :c:member:`~PyTypeObject.tp_alloc`, mais " +"laisser la classe mère gérer ça en appelant sa " +"propre :c:member:`~PyTypeObject.tp_new`." + +#: extending/newtypes_tutorial.rst:872 +#, fuzzy +msgid "" +"The :c:type:`PyTypeObject` struct supports " +"a :c:member:`~PyTypeObject.tp_base` specifying the type's concrete base " +"class. Due to cross-platform compiler issues, you can't fill that field " +"directly with a reference to :c:type:`PyList_Type`; it should be done in " +"the :c:data:`Py_mod_exec` function::" +msgstr "" +"La structure :c:type:`PyTypeObject` prend en charge " +"un :c:member:`~PyTypeObject.tp_base` spécifiant la classe mère concrète du " +"type. En raison de problèmes de compilateur multiplateformes, vous ne pouvez " +"pas remplir ce champ directement avec une référence " +"à :c:type:`PyList_Type` ; cela doit être fait plus tard dans la fonction " +"d'initialisation du module ::" + +#: extending/newtypes_tutorial.rst:893 +msgid "" +"Before calling :c:func:`PyType_Ready`, the type structure must have " +"the :c:member:`~PyTypeObject.tp_base` slot filled in. When we are deriving " +"an existing type, it is not necessary to fill out " +"the :c:member:`~PyTypeObject.tp_alloc` slot with :c:func:`PyType_GenericNew` " +"-- the allocation function from the base type will be inherited." msgstr "" "Avant d'appeler :c:func:`PyType_Ready`, la structure de type doit avoir " "l'emplacement :c:member:`~PyTypeObject.tp_base` rempli. Lorsque nous " -"dérivons un type existant, il n'est pas nécessaire de remplir l'emplacement :" -"c:member:`~PyTypeObject.tp_alloc` avec :c:func:`PyType_GenericNew` – la " -"fonction d'allocation du type père sera héritée." +"dérivons un type existant, il n'est pas nécessaire de remplir " +"l'emplacement :c:member:`~PyTypeObject.tp_alloc` " +"avec :c:func:`PyType_GenericNew` – la fonction d'allocation du type père " +"sera héritée." -#: extending/newtypes_tutorial.rst:877 +#: extending/newtypes_tutorial.rst:899 #, fuzzy msgid "" "After that, calling :c:func:`PyType_Ready` and adding the type object to the " @@ -1233,11 +1272,11 @@ msgstr "" "Ensuite, appeler :c:func:`PyType_Ready` et ajouter l'objet type au module se " "fait de la même manière qu'avec les exemples de base :class:`Custom`." -#: extending/newtypes_tutorial.rst:882 +#: extending/newtypes_tutorial.rst:904 msgid "Footnotes" msgstr "Notes" -#: extending/newtypes_tutorial.rst:883 +#: extending/newtypes_tutorial.rst:905 msgid "" "This is true when we know that the object is a basic type, like a string or " "a float." @@ -1245,16 +1284,16 @@ msgstr "" "C'est vrai lorsque nous savons que l'objet est un type de base, comme une " "chaîne ou un flottant." -#: extending/newtypes_tutorial.rst:886 +#: extending/newtypes_tutorial.rst:908 msgid "" "We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler in " "this example, because our type doesn't support garbage collection." msgstr "" -"Nous nous sommes appuyés sur le gestionnaire :c:member:`~PyTypeObject." -"tp_dealloc` dans cet exemple, car notre type ne prend pas en charge le " -"ramasse-miettes." +"Nous nous sommes appuyés sur le " +"gestionnaire :c:member:`~PyTypeObject.tp_dealloc` dans cet exemple, car " +"notre type ne prend pas en charge le ramasse-miettes." -#: extending/newtypes_tutorial.rst:889 +#: extending/newtypes_tutorial.rst:911 msgid "" "We now know that the first and last members are strings, so perhaps we could " "be less careful about decrementing their reference counts, however, we " @@ -1271,7 +1310,7 @@ msgstr "" "libération de mémoire d'une instance d'une sous-classe de chaîne ne " "rappellera pas nos objets." -#: extending/newtypes_tutorial.rst:895 +#: extending/newtypes_tutorial.rst:917 msgid "" "Also, even with our attributes restricted to strings instances, the user " "could pass arbitrary :class:`str` subclasses and therefore still create " @@ -1286,8 +1325,8 @@ msgstr "" #~ "for building C extensions, it is recommended in real-world use cases to " #~ "use the newer and better-maintained ``setuptools`` library. " #~ "Documentation on how to do this is out of scope for this document and can " -#~ "be found in the `Python Packaging User's Guide `_." +#~ "be found in the `Python Packaging User's Guide `_." #~ msgstr "" #~ "Bien que cette documentation présente le module standard :mod:`distutils` " #~ "pour la construction d'extensions C, il est recommandé dans les cas " diff --git a/extending/windows.po b/extending/windows.po index 194af270c..b19c0b5fe 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-28 22:32+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -86,15 +86,15 @@ msgstr "" "documentation pour utiliser :mod:`distutils` pour construire et empaqueter " "les modules d'extension est disponible dans :ref:`distutils-index`. Si vous " "considérez que vous avez réellement besoin de faire les choses manuellement, " -"il pourrait être enrichissant d'étudier le fichier de projet :source:" -"`winsound ` pour le module de la bibliothèque " -"standard." +"il pourrait être enrichissant d'étudier le fichier de " +"projet :source:`winsound ` pour le module de la " +"bibliothèque standard." #: extending/windows.rst:48 msgid "Differences Between Unix and Windows" msgstr "Différences entre Unix et Windows" -#: extending/windows.rst:53 +#: extending/windows.rst:50 msgid "" "Unix and Windows use completely different paradigms for run-time loading of " "code. Before you try to build a module that can be dynamically loaded, be " @@ -105,7 +105,7 @@ msgstr "" "module qui puisse être chargé dynamiquement, soyez conscient du mode de " "fonctionnement du système." -#: extending/windows.rst:57 +#: extending/windows.rst:54 msgid "" "In Unix, a shared object (:file:`.so`) file contains code to be used by the " "program, and also the names of functions and data that it expects to find in " @@ -122,7 +122,7 @@ msgstr "" "programme où sont désormais placées les fonctions et données dans la " "mémoire. C'est tout simplement une opération de liaison." -#: extending/windows.rst:64 +#: extending/windows.rst:61 msgid "" "In Windows, a dynamic-link library (:file:`.dll`) file has no dangling " "references. Instead, an access to functions or data goes through a lookup " @@ -139,7 +139,7 @@ msgstr "" "cette table est modifiée à l'exécution pour pointer vers les fonctions et " "données." -#: extending/windows.rst:70 +#: extending/windows.rst:67 msgid "" "In Unix, there is only one type of library file (:file:`.a`) which contains " "code from several object files (:file:`.o`). During the link step to create " @@ -155,18 +155,18 @@ msgstr "" "lieur le cherchera dans les fichiers objet dans les bibliothèques ; s'il le " "trouve, il inclura tout le code provenant de ce fichier objet." -#: extending/windows.rst:76 +#: extending/windows.rst:73 msgid "" "In Windows, there are two types of library, a static library and an import " -"library (both called :file:`.lib`). A static library is like a Unix :file:`." -"a` file; it contains code to be included as necessary. An import library is " -"basically used only to reassure the linker that a certain identifier is " -"legal, and will be present in the program when the DLL is loaded. So the " -"linker uses the information from the import library to build the lookup " -"table for using identifiers that are not included in the DLL. When an " -"application or a DLL is linked, an import library may be generated, which " -"will need to be used for all future DLLs that depend on the symbols in the " -"application or DLL." +"library (both called :file:`.lib`). A static library is like a " +"Unix :file:`.a` file; it contains code to be included as necessary. An " +"import library is basically used only to reassure the linker that a certain " +"identifier is legal, and will be present in the program when the DLL is " +"loaded. So the linker uses the information from the import library to build " +"the lookup table for using identifiers that are not included in the DLL. " +"When an application or a DLL is linked, an import library may be generated, " +"which will need to be used for all future DLLs that depend on the symbols in " +"the application or DLL." msgstr "" "Sur Windows, il y a deux types de bibliothèques, une bibliothèque statique " "et une bibliothèque d'importation (toutes deux appelées :file:`.lib`). Une " @@ -181,26 +181,28 @@ msgstr "" "devra être utilisée pour toutes les futures DLL dépendantes aux symboles " "provenant de l'application ou de la DLL." -#: extending/windows.rst:86 +#: extending/windows.rst:83 msgid "" "Suppose you are building two dynamic-load modules, B and C, which should " "share another block of code A. On Unix, you would *not* pass :file:`A.a` to " "the linker for :file:`B.so` and :file:`C.so`; that would cause it to be " "included twice, so that B and C would each have their own copy. In Windows, " -"building :file:`A.dll` will also build :file:`A.lib`. You *do* pass :file:" -"`A.lib` to the linker for B and C. :file:`A.lib` does not contain code; it " -"just contains information which will be used at runtime to access A's code." +"building :file:`A.dll` will also build :file:`A.lib`. You *do* " +"pass :file:`A.lib` to the linker for B and C. :file:`A.lib` does not " +"contain code; it just contains information which will be used at runtime to " +"access A's code." msgstr "" "Supposons que vous construisez deux modules de chargement dynamiques, B et " "C, qui ne devraient pas partager un autre bloc de code avec A. Sur Unix, " -"vous ne transmettrez pas :file:`A.a` au lieur pour :file:`B.so` et :file:`C." -"so` ; cela le ferait être inclus deux fois, pour que B et C aient chacun " -"leur propre copie. Sur Windows, construire :file:`A.dll` construira aussi :" -"file:`A.lib`. Vous transmettez :file:`A.lib` au lieur pour B et C. :file:`A." -"lib` ne contient pas de code ; il contient uniquement des informations qui " -"seront utilisées lors de l'exécution pour accéder au code de A." +"vous ne transmettrez pas :file:`A.a` au lieur pour :file:`B.so` " +"et :file:`C.so` ; cela le ferait être inclus deux fois, pour que B et C " +"aient chacun leur propre copie. Sur Windows, construire :file:`A.dll` " +"construira aussi :file:`A.lib`. Vous transmettez :file:`A.lib` au lieur pour " +"B et C. :file:`A.lib` ne contient pas de code ; il contient uniquement des " +"informations qui seront utilisées lors de l'exécution pour accéder au code " +"de A." -#: extending/windows.rst:94 +#: extending/windows.rst:91 msgid "" "In Windows, using an import library is sort of like using ``import spam``; " "it gives you access to spam's names, but does not create a separate copy. " @@ -212,11 +214,17 @@ msgstr "" "de copie séparée. Sur Unix, se lier à une bibliothèque est plus comme ``from " "spam import *`` ; cela crée une copie séparée." -#: extending/windows.rst:103 +#: extending/windows.rst:98 +msgid "" +"Turn off the implicit, ``#pragma``-based linkage with the Python library, " +"performed inside CPython header files." +msgstr "" + +#: extending/windows.rst:107 msgid "Using DLLs in Practice" msgstr "Utiliser les DLL en pratique" -#: extending/windows.rst:108 +#: extending/windows.rst:109 msgid "" "Windows Python is built in Microsoft Visual C++; using other compilers may " "or may not work. The rest of this section is MSVC++ specific." @@ -225,39 +233,75 @@ msgstr "" "d'autres compilateurs pourrait fonctionner, ou pas. Le reste de cette " "section est spécifique à MSVC++." -#: extending/windows.rst:111 +#: extending/windows.rst:112 +msgid "" +"When creating DLLs in Windows, you can use the CPython library in two ways:" +msgstr "" + +#: extending/windows.rst:114 msgid "" -"When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the " -"linker. To build two DLLs, spam and ni (which uses C functions found in " -"spam), you could use these commands::" +"By default, inclusion of :file:`PC/pyconfig.h` directly or " +"via :file:`Python.h` triggers an implicit, configure-aware link with the " +"library. The header file chooses :file:`pythonXY_d.lib` for " +"Debug, :file:`pythonXY.lib` for Release, and :file:`pythonX.lib` for Release " +"with the :ref:`Limited API ` enabled." msgstr "" -"Lorsque vous créez des DLL sur Windows, vous devez transmettre :file:" -"`pythonXY.lib` au lieur. Pour construire deux DLL, spam et ni (qui utilisent " -"des fonctions C trouvées dans spam), vous pouvez utiliser ces commandes ::" -#: extending/windows.rst:118 +#: extending/windows.rst:138 +#, fuzzy +msgid "" +"To build two DLLs, spam and ni (which uses C functions found in spam), you " +"could use these commands::" +msgstr "" +"Lorsque vous créez des DLL sur Windows, vous devez " +"transmettre :file:`pythonXY.lib` au lieur. Pour construire deux DLL, spam et " +"ni (qui utilisent des fonctions C trouvées dans spam), vous pouvez utiliser " +"ces commandes ::" + +#: extending/windows.rst:126 +#, fuzzy msgid "" "The first command created three files: :file:`spam.obj`, :file:`spam.dll` " "and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python " "functions (such as :c:func:`PyArg_ParseTuple`), but it does know how to find " -"the Python code thanks to :file:`pythonXY.lib`." +"the Python code thanks to the implicitly linked :file:`pythonXY.lib`." msgstr "" -"La première commande a créé trois fichiers : :file:`spam.obj`, :file:`spam." -"dll` et :file:`spam.lib`. :file:`Spam.dll` ne contient pas de fonctions " -"Python (telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver " -"le code Python grâce à :file:`pythonXY.lib`." +"La première commande a créé trois " +"fichiers : :file:`spam.obj`, :file:`spam.dll` " +"et :file:`spam.lib`. :file:`Spam.dll` ne contient pas de fonctions Python " +"(telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver le " +"code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:123 +#: extending/windows.rst:149 msgid "" -"The second command created :file:`ni.dll` (and :file:`.obj` and :file:`." -"lib`), which knows how to find the necessary functions from spam, and also " -"from the Python executable." +"The second command created :file:`ni.dll` (and :file:`.obj` " +"and :file:`.lib`), which knows how to find the necessary functions from " +"spam, and also from the Python executable." msgstr "" "La seconde commande a créé :file:`ni.dll` (et :file:`.obj` et :file:`.lib`), " "qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " "partir de l'exécutable Python." -#: extending/windows.rst:127 +#: extending/windows.rst:135 +msgid "" +"Manually by defining :c:macro:`Py_NO_LINK_LIB` macro before " +"including :file:`Python.h`. You must pass :file:`pythonXY.lib` to the linker." +msgstr "" + +#: extending/windows.rst:144 +msgid "" +"The first command created three files: :file:`spam.obj`, :file:`spam.dll` " +"and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python " +"functions (such as :c:func:`PyArg_ParseTuple`), but it does know how to find " +"the Python code thanks to :file:`pythonXY.lib`." +msgstr "" +"La première commande a créé trois " +"fichiers : :file:`spam.obj`, :file:`spam.dll` " +"et :file:`spam.lib`. :file:`Spam.dll` ne contient pas de fonctions Python " +"(telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver le " +"code Python grâce à :file:`pythonXY.lib`." + +#: extending/windows.rst:153 msgid "" "Not every identifier is exported to the lookup table. If you want any other " "modules (including Python) to be able to see your identifiers, you have to " @@ -270,7 +314,7 @@ msgstr "" "``void _declspec(dllexport) initspam(void)`` ou ``PyObject " "_declspec(dllexport) *NiGetSpamData(void)``." -#: extending/windows.rst:132 +#: extending/windows.rst:158 #, fuzzy msgid "" "Developer Studio will throw in a lot of import libraries that you do not " @@ -281,5 +325,5 @@ msgstr "" "\\ Developer Studio apportera beaucoup de bibliothèques d'importation dont " "vous n'avez pas vraiment besoin, augmentant d'environ *100ko* votre " "exécutable. Pour s'en débarrasser, allez dans les Paramètres du Projet, " -"onglet Lien, pour préciser *ignorer les bibliothèques par défaut*. Et la :" -"file:`msvcrtxx.lib` correcte à la liste des bibliothèques." +"onglet Lien, pour préciser *ignorer les bibliothèques par défaut*. Et " +"la :file:`msvcrtxx.lib` correcte à la liste des bibliothèques." diff --git a/faq/design.po b/faq/design.po index 489289058..c8a403b4e 100644 --- a/faq/design.po +++ b/faq/design.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-26 17:18+0200\n" "Last-Translator: Mathieu Dupuy\n" "Language-Team: FRENCH \n" @@ -126,12 +126,13 @@ msgstr "" #: faq/design.rst:65 msgid "" -"The :class:`float` type in CPython uses a C ``double`` for storage. A :" -"class:`float` object's value is stored in binary floating-point with a fixed " -"precision (typically 53 bits) and Python uses C operations, which in turn " -"rely on the hardware implementation in the processor, to perform floating-" -"point operations. This means that as far as floating-point operations are " -"concerned, Python behaves like many popular languages including C and Java." +"The :class:`float` type in CPython uses a C ``double`` for storage. " +"A :class:`float` object's value is stored in binary floating-point with a " +"fixed precision (typically 53 bits) and Python uses C operations, which in " +"turn rely on the hardware implementation in the processor, to perform " +"floating-point operations. This means that as far as floating-point " +"operations are concerned, Python behaves like many popular languages " +"including C and Java." msgstr "" "La classe :class:`float` dans CPython utilise le type double du langage C " "comme stockage. La valeur d'un objet :class:`float` est stockée dans un " @@ -269,12 +270,12 @@ msgstr "" "Ensuite, ça veut dire qu'aucune syntaxe spéciale n'est nécessaire si vous " "souhaitez explicitement référencer ou appeler la méthode depuis une classe " "en particulier. En C++, si vous utilisez la méthode d'une classe mère elle-" -"même surchargée par une classe dérivée, vous devez utiliser l'opérateur ``::" -"`` — en Python vous pouvez écrire ``ClasseDeBase.nom_methode(self, )``. C'est particulièrement utile pour les méthodes :meth:`__init__` " -"et, de manière générale, dans les cas où une classe dérivée veut étendre la " -"méthode du même nom de la classe mère, et doit donc se débrouiller pour " -"appeler la méthode de la classe mère." +"même surchargée par une classe dérivée, vous devez utiliser l'opérateur " +"``::`` — en Python vous pouvez écrire ``ClasseDeBase.nom_methode(self, " +")``. C'est particulièrement utile pour les " +"méthodes :meth:`__init__` et, de manière générale, dans les cas où une " +"classe dérivée veut étendre la méthode du même nom de la classe mère, et " +"doit donc se débrouiller pour appeler la méthode de la classe mère." #: faq/design.rst:136 msgid "" @@ -360,12 +361,12 @@ msgstr "" msgid "" "(b) When I read code that says len(x) I *know* that it is asking for the " "length of something. This tells me two things: the result is an integer, and " -"the argument is some kind of container. To the contrary, when I read x." -"len(), I have to already know that x is some kind of container implementing " -"an interface or inheriting from a class that has a standard len(). Witness " -"the confusion we occasionally have when a class that is not implementing a " -"mapping has a get() or keys() method, or something that isn't a file has a " -"write() method." +"the argument is some kind of container. To the contrary, when I read " +"x.len(), I have to already know that x is some kind of container " +"implementing an interface or inheriting from a class that has a standard " +"len(). Witness the confusion we occasionally have when a class that is not " +"implementing a mapping has a get() or keys() method, or something that isn't " +"a file has a write() method." msgstr "" "(b) Quand je lis du code qui dit ``len(x)`` *je sais* qu'il demande la " "longueur de quelque chose. Cela me dit deux choses : le résultat est un " @@ -429,8 +430,9 @@ msgstr "" msgid "" "The second objection is typically cast as: \"I am really telling a sequence " "to join its members together with a string constant\". Sadly, you aren't. " -"For some reason there seems to be much less difficulty with having :meth:" -"`~str.split` as a string method, since in that case it is easy to see that ::" +"For some reason there seems to be much less difficulty with " +"having :meth:`~str.split` as a string method, since in that case it is easy " +"to see that ::" msgstr "" "Le second consiste à se demander : « suis-je réellement en train de dire à " "une séquence de joindre ses membres avec une constante de chaîne ? ». " @@ -524,8 +526,8 @@ msgstr "" #: faq/design.rst:279 msgid "" -"For calling methods on objects, you can simplify yet further by using the :" -"func:`getattr` built-in to retrieve methods with a particular name::" +"For calling methods on objects, you can simplify yet further by using " +"the :func:`getattr` built-in to retrieve methods with a particular name::" msgstr "" "Pour appeler les méthodes sur des objets, vous pouvez simplifier davantage " "en utilisant la fonction native :func:`getattr` pour récupérer les méthodes " @@ -631,9 +633,9 @@ msgid "" "full Python language." msgstr "" "`Cython `_ compile une version modifiée de Python avec " -"des annotations optionnelles en extensions C. `Nuitka `_ est un compilateur en devenir de Python vers C++, visant à supporter " -"le langage Python dans son entièreté." +"des annotations optionnelles en extensions C. `Nuitka `_ est un compilateur en devenir de Python vers C++, visant " +"à supporter le langage Python dans son entièreté." #: faq/design.rst:337 msgid "How does Python manage memory?" @@ -650,13 +652,13 @@ msgid "" "statistics, and tune the collector's parameters." msgstr "" "Les détails de la gestion de la mémoire en Python dépendent de " -"l'implémentation. En effet, l'implémentation standard de Python, :term:" -"`CPython`, utilise des compteurs de références afin de détecter des objets " -"inaccessibles et un autre mécanisme pour collecter les références " -"circulaires, exécutant périodiquement un algorithme de détection de cycles " -"qui recherche les cycles inaccessibles et supprime les objets impliqués. Le " -"module :mod:`gc` fournit des fonctions pour lancer le ramasse-miettes, " -"d'obtenir des statistiques de débogage et ajuster ses paramètres." +"l'implémentation. En effet, l'implémentation standard de " +"Python, :term:`CPython`, utilise des compteurs de références afin de " +"détecter des objets inaccessibles et un autre mécanisme pour collecter les " +"références circulaires, exécutant périodiquement un algorithme de détection " +"de cycles qui recherche les cycles inaccessibles et supprime les objets " +"impliqués. Le module :mod:`gc` fournit des fonctions pour lancer le ramasse-" +"miettes, d'obtenir des statistiques de débogage et ajuster ses paramètres." #: faq/design.rst:347 #, fuzzy @@ -667,11 +669,11 @@ msgid "" "problems if your Python code depends on the behavior of the reference " "counting implementation." msgstr "" -"Cependant, d'autres implémentations (par exemple `Jython `_ ou `PyPy `_) peuvent compter sur un mécanisme " -"différent comme un véritable ramasse-miettes. Cette différence peut causer " -"de subtils problèmes de portabilité si votre code Python dépend du " -"comportement de l'implémentation du compteur de références." +"Cependant, d'autres implémentations (par exemple `Jython `_ ou `PyPy `_) peuvent compter sur un " +"mécanisme différent comme un véritable ramasse-miettes. Cette différence " +"peut causer de subtils problèmes de portabilité si votre code Python dépend " +"du comportement de l'implémentation du compteur de références." #: faq/design.rst:353 msgid "" @@ -806,10 +808,10 @@ msgstr "" msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " -"which are operated on one-by-one. For example, :func:`os.listdir('.') ` returns a list of strings representing the files in the current " -"directory. Functions which operate on this output would generally not break " -"if you added another file or two to the directory." +"which are operated on one-by-one. For example, :func:`os.listdir('.') " +"` returns a list of strings representing the files in the " +"current directory. Functions which operate on this output would generally " +"not break if you added another file or two to the directory." msgstr "" "Les listes, ressemblent davantage à des tableaux dans d'autres langages. " "Elles ont tendance à contenir un nombre variable d'objets de même type " @@ -820,12 +822,15 @@ msgstr "" "dossier." #: faq/design.rst:423 +#, fuzzy msgid "" -"Tuples are immutable, meaning that once a tuple has been created, you can't " -"replace any of its elements with a new value. Lists are mutable, meaning " -"that you can always change a list's elements. Only immutable elements can " -"be used as dictionary keys, and hence only tuples and not lists can be used " -"as keys." +"Tuples are :term:`immutable`, meaning that once a tuple has been created, " +"you can't replace any of its elements with a new value. Lists " +"are :term:`mutable`, meaning that you can always change a list's elements. " +"Only :term:`hashable` objects can be used as dictionary keys. Most immutable " +"types are hashable, which is why tuples, but not lists, can be used as keys. " +"Note, however, that a tuple is only hashable if all of its elements are " +"hashable." msgstr "" "Les *n*-uplets sont immuables, ce qui signifie que lorsqu'un *n*-uplet a été " "créé, vous ne pouvez remplacer aucun de ses éléments par une nouvelle " @@ -834,11 +839,11 @@ msgstr "" "utilisés comme clés de dictionnaires, et donc de ``tuple`` et ``list`` seul " "des *n*-uplets peuvent être utilisés comme clés." -#: faq/design.rst:430 +#: faq/design.rst:432 msgid "How are lists implemented in CPython?" msgstr "Comment les listes sont-elles implémentées dans CPython ?" -#: faq/design.rst:432 +#: faq/design.rst:434 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -851,7 +856,7 @@ msgstr "" "Elle conserve également un pointeur vers ce tableau et la longueur du " "tableau dans une structure de tête de liste." -#: faq/design.rst:436 +#: faq/design.rst:438 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." @@ -859,7 +864,7 @@ msgstr "" "Cela rend l'indexation d'une liste ``a[i]`` une opération dont le coût est " "indépendant de la taille de la liste ou de la valeur de l'indice." -#: faq/design.rst:439 +#: faq/design.rst:441 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -872,11 +877,11 @@ msgstr "" "être étendu, un certain espace supplémentaire est alloué de sorte que pour " "la prochaine fois, ceci ne nécessite plus un redimensionnement effectif." -#: faq/design.rst:446 +#: faq/design.rst:448 msgid "How are dictionaries implemented in CPython?" msgstr "Comment les dictionnaires sont-ils implémentés dans CPython ?" -#: faq/design.rst:448 +#: faq/design.rst:450 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -888,7 +893,7 @@ msgstr "" "performances pour la recherche (l'opération la plus courante de loin) dans " "la plupart des circonstances, et leur implémentation est plus simple." -#: faq/design.rst:452 +#: faq/design.rst:454 #, fuzzy msgid "" "Dictionaries work by computing a hash code for each key stored in the " @@ -913,11 +918,11 @@ msgstr "" "différents, cela signifie que le temps pour récupérer une clé est constant — " "O(1), en notation grand O de Landau." -#: faq/design.rst:463 +#: faq/design.rst:465 msgid "Why must dictionary keys be immutable?" msgstr "Pourquoi les clés du dictionnaire sont immuables ?" -#: faq/design.rst:465 +#: faq/design.rst:467 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -940,7 +945,7 @@ msgstr "" "chercher l'ancienne valeur, elle serait également introuvable car la valeur " "de l'objet trouvé dans cet emplacement de hachage serait différente." -#: faq/design.rst:474 +#: faq/design.rst:476 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -952,11 +957,11 @@ msgstr "" "uplet avec les mêmes entrées que la liste ``L``. Les *n*-uplets sont " "immuables et peuvent donc être utilisés comme clés du dictionnaire." -#: faq/design.rst:478 +#: faq/design.rst:480 msgid "Some unacceptable solutions that have been proposed:" msgstr "Certaines solutions insatisfaisantes ont été proposées :" -#: faq/design.rst:480 +#: faq/design.rst:482 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" @@ -965,19 +970,19 @@ msgstr "" "parce que si vous créez une nouvelle liste avec la même valeur, elle ne sera " "pas retrouvée ; par exemple ::" -#: faq/design.rst:486 +#: faq/design.rst:488 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " -"words, dictionary keys should be compared using ``==``, not using :keyword:" -"`is`." +"words, dictionary keys should be compared using ``==``, not " +"using :keyword:`is`." msgstr "" "lèverait une exception :exc:`KeyError` car l'ID de ``[1, 2]`` utilisé dans " "la deuxième ligne diffère de celui de la première ligne. En d'autres termes, " "les clés de dictionnaire doivent être comparées à l'aide du comparateur " "``==`` et non à l'aide du mot clé :keyword:`is`." -#: faq/design.rst:490 +#: faq/design.rst:492 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " @@ -988,7 +993,7 @@ msgstr "" "une référence à elle-même ou avoir une boucle infinie au niveau du code " "copié." -#: faq/design.rst:494 +#: faq/design.rst:496 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -1001,7 +1006,7 @@ msgstr "" "accident. Cela casse également un impératif important des dictionnaires : " "chaque valeur de ``d.keys()`` est utilisable comme clé du dictionnaire." -#: faq/design.rst:499 +#: faq/design.rst:501 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -1019,7 +1024,7 @@ msgstr "" "encore une fois, les objets se faisant référence pourraient provoquer une " "boucle infinie." -#: faq/design.rst:505 +#: faq/design.rst:507 #, fuzzy msgid "" "There is a trick to get around this if you need to, but use it at your own " @@ -1031,13 +1036,13 @@ msgid "" msgstr "" "Il y a un truc pour contourner ceci si vous en avez besoin, mais utilisez-le " "à vos risques et périls. Vous pouvez encapsuler une structure mutable à " -"l'intérieur d'une instance de classe qui a à la fois une méthode :meth:" -"`__eq__` et :meth:`__hash__`. Vous devez ensuite vous assurer que la valeur " -"de hachage pour tous ces objets *wrapper* qui résident dans un dictionnaire " -"(ou une autre structure basée sur le hachage), restent fixes pendant que " -"l'objet est dans le dictionnaire (ou une autre structure). ::" +"l'intérieur d'une instance de classe qui a à la fois une " +"méthode :meth:`__eq__` et :meth:`__hash__`. Vous devez ensuite vous assurer " +"que la valeur de hachage pour tous ces objets *wrapper* qui résident dans un " +"dictionnaire (ou une autre structure basée sur le hachage), restent fixes " +"pendant que l'objet est dans le dictionnaire (ou une autre structure). ::" -#: faq/design.rst:530 +#: faq/design.rst:532 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " @@ -1047,13 +1052,13 @@ msgstr "" "certains membres de la liste soient impossibles à hacher et aussi par la " "possibilité de débordement arithmétique." -#: faq/design.rst:534 +#: faq/design.rst:536 msgid "" -"Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." -"__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " -"o2.__hash__()``), regardless of whether the object is in a dictionary or " -"not. If you fail to meet these restrictions dictionaries and other hash " -"based structures will misbehave." +"Furthermore it must always be the case that if ``o1 == o2`` (ie " +"``o1.__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, " +"``o1.__hash__() == o2.__hash__()``), regardless of whether the object is in " +"a dictionary or not. If you fail to meet these restrictions dictionaries " +"and other hash based structures will misbehave." msgstr "" "De plus, il faut toujours que, si ``o1 == o2`` (par exemple ``o1.__eq__(o2) " "vaut True``) alors ``hash(o1) == hash(o2)`` (par exemple, ``o1.__hash__() == " @@ -1061,7 +1066,7 @@ msgstr "" "ne remplissez pas ces conditions, les dictionnaires et autres structures " "basées sur le hachage se comporteront mal." -#: faq/design.rst:539 +#: faq/design.rst:541 #, fuzzy msgid "" "In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " @@ -1075,11 +1080,11 @@ msgstr "" "conséquences de ne pas satisfaire entièrement ces conditions. Vous avez été " "prévenus." -#: faq/design.rst:546 +#: faq/design.rst:548 msgid "Why doesn't list.sort() return the sorted list?" msgstr "Pourquoi ``list.sort()`` ne renvoie pas la liste triée ?" -#: faq/design.rst:548 +#: faq/design.rst:550 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -1089,13 +1094,13 @@ msgid "" "around." msgstr "" "Dans les situations où la performance est importante, faire une copie de la " -"liste juste pour la classer serait un gaspillage. Par conséquent, :meth:" -"`list.sort` classe la liste en place. Afin de vous le rappeler, elle ne " -"renvoie pas la liste classée. De cette façon, vous ne serez pas dupés en " -"écrasant accidentellement une liste lorsque vous avez besoin d’une copie " -"triée tout en gardant sous la main la version non triée." +"liste juste pour la classer serait un gaspillage. Par " +"conséquent, :meth:`list.sort` classe la liste en place. Afin de vous le " +"rappeler, elle ne renvoie pas la liste classée. De cette façon, vous ne " +"serez pas dupés en écrasant accidentellement une liste lorsque vous avez " +"besoin d’une copie triée tout en gardant sous la main la version non triée." -#: faq/design.rst:554 +#: faq/design.rst:556 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " @@ -1107,13 +1112,13 @@ msgstr "" "partir d’un itérable fourni, la classe et la renvoie. Par exemple, voici " "comment itérer dans l’ordre sur les clés d’un dictionnaire ::" -#: faq/design.rst:564 +#: faq/design.rst:566 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" "Comment spécifier une interface et appliquer une spécification d’interface " "en Python ?" -#: faq/design.rst:566 +#: faq/design.rst:568 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -1125,24 +1130,24 @@ msgstr "" "module. Beaucoup estiment que la vérification au moment de la compilation " "des spécifications d'interface facilite la construction de grands programmes." -#: faq/design.rst:571 +#: faq/design.rst:573 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " -"to check whether an instance or a class implements a particular ABC. The :" -"mod:`collections.abc` module defines a set of useful ABCs such as :class:" -"`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:" -"`~collections.abc.MutableMapping`." +"to check whether an instance or a class implements a particular ABC. " +"The :mod:`collections.abc` module defines a set of useful ABCs such " +"as :class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, " +"and :class:`~collections.abc.MutableMapping`." msgstr "" "Python 2.6 ajoute un module :mod:`abc` qui vous permet de définir des " -"classes mères abstraites (ABC pour *abstract base classes* en anglais). Vous " +"classes abstraites (ABC pour *abstract base classes* en anglais). Vous " "pouvez ensuite utiliser :func:`isinstance` et :func:`issubclass` pour " "vérifier si une instance ou une classe implémente une ABC particulière. Le " -"module :mod:`collections.abc` définit un ensemble d'ABC utiles telles que :" -"class:`~collections.abc.Iterable`, :class:`~collections.abc.Container` et :" -"class:`collections.abc.MutableMapping`." +"module :mod:`collections.abc` définit un ensemble d'ABC utiles telles " +"que :class:`~collections.abc.Iterable`, :class:`~collections.abc.Container` " +"et :class:`collections.abc.MutableMapping`." -#: faq/design.rst:578 +#: faq/design.rst:580 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." @@ -1150,16 +1155,16 @@ msgstr "" "Pour Python, la plupart des avantages des spécifications d'interface peuvent " "être obtenus par une discipline de test appropriée pour les composants." -#: faq/design.rst:581 +#: faq/design.rst:583 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " "modules can be run as a script to provide a simple \"self test.\" Even " "modules which use complex external interfaces can often be tested in " -"isolation using trivial \"stub\" emulations of the external interface. The :" -"mod:`doctest` and :mod:`unittest` modules or third-party test frameworks can " -"be used to construct exhaustive test suites that exercise every line of code " -"in a module." +"isolation using trivial \"stub\" emulations of the external interface. " +"The :mod:`doctest` and :mod:`unittest` modules or third-party test " +"frameworks can be used to construct exhaustive test suites that exercise " +"every line of code in a module." msgstr "" "Une bonne suite de tests pour un module peut à la fois fournir un test de " "non-régression et servir de spécification d'interface de module ainsi qu'un " @@ -1171,15 +1176,15 @@ msgstr "" "test tiers peuvent être utilisés pour construire des suites de tests " "exhaustives qui éprouvent chaque ligne de code dans un module." -#: faq/design.rst:589 +#: faq/design.rst:591 #, fuzzy msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " "be better because an interface specification cannot test certain properties " -"of a program. For example, the :meth:`!list.append` method is expected to " +"of a program. For example, the :meth:`list.append` method is expected to " "add new elements to the end of some internal list; an interface " -"specification cannot test that your :meth:`!list.append` implementation will " +"specification cannot test that your :meth:`list.append` implementation will " "actually do this correctly, but it's trivial to check this property in a " "test suite." msgstr "" @@ -1193,7 +1198,7 @@ msgstr "" "réellement le faire correctement, mais il est trivial de vérifier cette " "propriété dans une suite de tests." -#: faq/design.rst:597 +#: faq/design.rst:599 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -1208,20 +1213,20 @@ msgstr "" "le code réel. Bien sûr, Python vous permet d'être laxiste et de ne pas " "écrire de test du tout." -#: faq/design.rst:605 +#: faq/design.rst:607 msgid "Why is there no goto?" msgstr "Pourquoi n'y a-t-il pas de ``goto`` en Python ?" -#: faq/design.rst:607 +#: faq/design.rst:609 #, fuzzy msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " "language, it is also unneeded as long as there are ways to branch (in " "Python, with :keyword:`if` statements and :keyword:`or`, :keyword:`and`, " -"and :keyword:`if`/:keyword:`else` expressions) and loop (with :keyword:" -"`while` and :keyword:`for` statements, possibly containing :keyword:" -"`continue` and :keyword:`break`)." +"and :keyword:`if`/:keyword:`else` expressions) and loop " +"(with :keyword:`while` and :keyword:`for` statements, possibly " +"containing :keyword:`continue` and :keyword:`break`)." msgstr "" "Dans les années 1970, les gens se sont aperçus que le foisonnement de *goto* " "conduisait à du code « spaghetti » difficile à comprendre et à modifier. " @@ -1231,7 +1236,7 @@ msgstr "" "boucler (avec les instructions ``while`` et ``for``, qui peuvent contenir " "des ``continue`` et ``break``)." -#: faq/design.rst:614 +#: faq/design.rst:616 #, fuzzy msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " @@ -1245,7 +1250,7 @@ msgstr "" "l'utilisation raisonnable des constructions *go* ou *goto* du C, du Fortran " "ou d'autres langages de programmation. Par exemple ::" -#: faq/design.rst:630 +#: faq/design.rst:632 #, fuzzy msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " @@ -1255,13 +1260,13 @@ msgstr "" "toute façon généralement considéré comme un abus de ``goto``. À Utiliser " "avec parcimonie." -#: faq/design.rst:635 +#: faq/design.rst:637 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" "Pourquoi les chaînes de caractères brutes (r-strings) ne peuvent-elles pas " "se terminer par un *backslash* ?" -#: faq/design.rst:637 +#: faq/design.rst:639 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " @@ -1271,7 +1276,7 @@ msgstr "" "*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " "guillemet final, laissant la chaîne non terminée." -#: faq/design.rst:641 +#: faq/design.rst:643 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -1289,7 +1294,7 @@ msgstr "" "chaîne en l'échappant avec un *antislash*. Ces règles fonctionnent bien " "lorsque les chaînes brutes sont utilisées pour leur but premier." -#: faq/design.rst:648 +#: faq/design.rst:650 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" @@ -1298,20 +1303,20 @@ msgstr "" "les appels système Windows acceptent également les *slashes* " "« classiques » ::" -#: faq/design.rst:653 +#: faq/design.rst:655 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" "Si vous essayez de construire un chemin d'accès pour une commande DOS, " "essayez par exemple l'un de ceux-ci ::" -#: faq/design.rst:661 +#: faq/design.rst:663 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" "Pourquoi la déclaration ``with`` pour les assignations d'attributs n'existe " "pas en Python ?" -#: faq/design.rst:663 +#: faq/design.rst:665 #, fuzzy msgid "" "Python has a :keyword:`with` statement that wraps the execution of a block, " @@ -1322,11 +1327,11 @@ msgstr "" "appelant du code à l'entrée et la sortie du bloc. Certains langages " "possèdent une construction qui ressemble à ceci ::" -#: faq/design.rst:671 +#: faq/design.rst:673 msgid "In Python, such a construct would be ambiguous." msgstr "En Python, une telle construction serait ambiguë." -#: faq/design.rst:673 +#: faq/design.rst:675 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " @@ -1339,7 +1344,7 @@ msgstr "" "le compilateur connaît *toujours* la portée de toutes les variables au " "moment de la compilation." -#: faq/design.rst:678 +#: faq/design.rst:680 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1353,11 +1358,11 @@ msgstr "" "impossible de savoir, d'une simple lecture, quel attribut est référencé : " "s'il est local, global ou un attribut membre ?" -#: faq/design.rst:684 +#: faq/design.rst:686 msgid "For instance, take the following incomplete snippet::" msgstr "Prenons par exemple l'extrait incomplet suivant ::" -#: faq/design.rst:690 +#: faq/design.rst:692 #, fuzzy msgid "" "The snippet assumes that ``a`` must have a member attribute called ``x``. " @@ -1372,7 +1377,7 @@ msgstr "" "« x » existe, est-elle utilisée dans le bloc ``with`` ? Comme vous voyez, " "la nature dynamique du Python rend ces choix beaucoup plus difficiles." -#: faq/design.rst:696 +#: faq/design.rst:698 #, fuzzy msgid "" "The primary benefit of :keyword:`with` and similar language features " @@ -1383,11 +1388,11 @@ msgstr "" "similaires (réduction du volume de code) peut, cependant, être facilement " "réalisé en Python par assignation. Au lieu de ::" -#: faq/design.rst:703 +#: faq/design.rst:705 msgid "write this::" msgstr "écrivez ceci ::" -#: faq/design.rst:710 +#: faq/design.rst:712 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " @@ -1397,40 +1402,40 @@ msgstr "" "car les liaisons de noms sont résolues au moment de l'exécution en Python, " "et la deuxième version n'a besoin d'exécuter la résolution qu'une seule fois." -#: faq/design.rst:714 +#: faq/design.rst:716 msgid "" "Similar proposals that would introduce syntax to further reduce code volume, " "such as using a 'leading dot', have been rejected in favour of explicitness " "(see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html)." msgstr "" -#: faq/design.rst:720 +#: faq/design.rst:722 msgid "Why don't generators support the with statement?" msgstr "" "Pourquoi l'instruction ``with`` ne prend-elle pas en charge les générateurs ?" -#: faq/design.rst:722 +#: faq/design.rst:724 #, fuzzy msgid "" "For technical reasons, a generator used directly as a context manager would " "not work correctly. When, as is most common, a generator is used as an " -"iterator run to completion, no closing is needed. When it is, wrap it as :" -"func:`contextlib.closing(generator) ` in the :keyword:" -"`with` statement." +"iterator run to completion, no closing is needed. When it is, wrap it " +"as :func:`contextlib.closing(generator) ` in " +"the :keyword:`with` statement." msgstr "" "Pour des raisons d'ordre technique, un générateur utilisé directement comme " "gestionnaire de contexte ne pourrait pas fonctionner. Dans le cas le plus " "courant, où un générateur est utilisé jusqu'à épuisement, il n'y a pas " -"besoin de le fermer. Sinon, on peut toujours mettre ``contextlib." -"closing(générateur)`` dans la ligne du ``with``." +"besoin de le fermer. Sinon, on peut toujours mettre " +"``contextlib.closing(générateur)`` dans la ligne du ``with``." -#: faq/design.rst:730 +#: faq/design.rst:732 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" "Pourquoi les deux-points sont-ils nécessaires pour les déclarations ``if/" "while/def/class`` ?" -#: faq/design.rst:732 +#: faq/design.rst:734 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" @@ -1438,11 +1443,11 @@ msgstr "" "Le deux-points est principalement nécessaire pour améliorer la lisibilité " "(l'un des résultats du langage expérimental ABC). Considérez ceci ::" -#: faq/design.rst:738 +#: faq/design.rst:740 msgid "versus ::" msgstr "et cela ::" -#: faq/design.rst:743 +#: faq/design.rst:745 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " @@ -1452,7 +1457,7 @@ msgstr "" "aussi comment un deux-points introduit l'exemple dans cette réponse à la " "FAQ ; c'est un usage standard en français (et en anglais)." -#: faq/design.rst:746 +#: faq/design.rst:748 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1464,13 +1469,13 @@ msgstr "" "pour décider quand l'indentation doit être augmentée au lieu d'avoir à faire " "une analyse plus élaborée du texte du programme." -#: faq/design.rst:752 +#: faq/design.rst:754 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" "Pourquoi Python permet-il les virgules à la fin des listes et des *n*-" "uplets ?" -#: faq/design.rst:754 +#: faq/design.rst:756 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1478,11 +1483,11 @@ msgstr "" "Python vous permet d'ajouter une virgule à la fin des listes, des *n*-uplets " "et des dictionnaires ::" -#: faq/design.rst:765 +#: faq/design.rst:767 msgid "There are several reasons to allow this." msgstr "Il y a plusieurs raisons d'accepter cela." -#: faq/design.rst:767 +#: faq/design.rst:769 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1495,7 +1500,7 @@ msgstr "" "virgule à la ligne précédente. Les lignes peuvent aussi être réorganisées " "sans créer une erreur de syntaxe." -#: faq/design.rst:772 +#: faq/design.rst:774 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" @@ -1503,7 +1508,7 @@ msgstr "" "L'omission accidentelle de la virgule peut entraîner des erreurs difficiles " "à diagnostiquer, par exemple ::" -#: faq/design.rst:782 +#: faq/design.rst:784 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " @@ -1513,7 +1518,7 @@ msgstr "" "trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " "permet d'éviter cette source d'erreur." -#: faq/design.rst:785 +#: faq/design.rst:787 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." @@ -1533,8 +1538,8 @@ msgstr "" #~ msgid "" #~ "You can do this easily enough with a sequence of ``if... elif... elif... " #~ "else``. There have been some proposals for switch statement syntax, but " -#~ "there is no consensus (yet) on whether and how to do range tests. See :" -#~ "pep:`275` for complete details and the current status." +#~ "there is no consensus (yet) on whether and how to do range tests. " +#~ "See :pep:`275` for complete details and the current status." #~ msgstr "" #~ "Vous pouvez le faire assez facilement avec une séquence de ``if... " #~ "elif... elif... else``. Il y a eu quelques propositions pour la syntaxe " diff --git a/faq/extending.po b/faq/extending.po index e3bd38547..4cd7479a2 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2021-10-17 18:37+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -30,8 +30,8 @@ msgstr "Puis-je créer mes propres fonctions en C ?" #: faq/extending.rst:18 msgid "" "Yes, you can create built-in modules containing functions, variables, " -"exceptions and even new types in C. This is explained in the document :ref:" -"`extending-index`." +"exceptions and even new types in C. This is explained in the " +"document :ref:`extending-index`." msgstr "" "Oui, vous pouvez créer des modules intégrés contenant des fonctions, des " "variables, des exceptions et même de nouveaux types en C. Ceci est expliqué " @@ -67,74 +67,39 @@ msgstr "Écrire directement en C est difficile ; existe-t-il des alternatives ?" #: faq/extending.rst:39 msgid "" "There are a number of alternatives to writing your own C extensions, " -"depending on what you're trying to do." +"depending on what you're trying to do. :ref:`Recommended third party tools " +"` offer both simpler and more sophisticated approaches to " +"creating C and C++ extensions for Python." msgstr "" -"Il y a un certain nombre de solutions existantes qui vous permettent " -"d'écrire vos propres extensions C, selon ce que vous essayez de faire." -#: faq/extending.rst:44 -#, fuzzy -msgid "" -"`Cython `_ and its relative `Pyrex `_ are compilers that accept a " -"slightly modified form of Python and generate the corresponding C code. " -"Cython and Pyrex make it possible to write an extension without having to " -"learn Python's C API." -msgstr "" -"`Cython `_ et son cousin `Pyrex `_ sont des compilateurs qui " -"acceptent une forme légèrement modifiée de Python et produisent du code C " -"correspondant. Cython et Pyrex permettent d'écrire une extension sans avoir " -"à connaître l'API C de Python." - -#: faq/extending.rst:50 -#, fuzzy -msgid "" -"If you need to interface to some C or C++ library for which no Python " -"extension currently exists, you can try wrapping the library's data types " -"and functions with a tool such as `SWIG `_. `SIP " -"`__, `CXX `_ `Boost `_, or `Weave " -"`_ are also alternatives for wrapping C++ " -"libraries." -msgstr "" -"Si vous avez besoin d'accéder à l'interface d'une bibliothèque C ou C++ pour " -"laquelle aucune extension Python n'existe à ce jour, vous pouvez essayer " -"d'encapsuler les types de données et fonctions de la bibliothèque avec un " -"outil tel que `SWIG `_. `SIP `__, `CXX `_, `Boost `_ ou " -"`Weave `_ sont également des alternatives " -"pour encapsuler des bibliothèques C++." - -#: faq/extending.rst:61 +#: faq/extending.rst:46 msgid "How can I execute arbitrary Python statements from C?" msgstr "" "Comment puis-je exécuter des instructions quelconques Python à partir de C ?" -#: faq/extending.rst:63 +#: faq/extending.rst:48 msgid "" "The highest-level function to do this is :c:func:`PyRun_SimpleString` which " "takes a single string argument to be executed in the context of the module " "``__main__`` and returns ``0`` for success and ``-1`` when an exception " -"occurred (including :exc:`SyntaxError`). If you want more control, use :c:" -"func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in " -"``Python/pythonrun.c``." -msgstr "" -"La fonction de plus haut niveau pour ce faire est :c:func:" -"`PyRun_SimpleStringString` qui prend une chaîne pour seul argument afin de " -"l'exécuter dans le contexte du module ``__main__`` et renvoie ``0`` en cas " -"de succès et ``-1`` quand une exception se produit (incluant :exc:" -"`SyntaxError`). Pour une meilleure maîtrise, utilisez :c:func:" -"`PyRun_String` ; voir le code source pour :c:func:`PyRun_SimpleString` dans " -"``Python/pythonrun.c``." - -#: faq/extending.rst:72 +"occurred (including :exc:`SyntaxError`). If you want more control, " +"use :c:func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` " +"in ``Python/pythonrun.c``." +msgstr "" +"La fonction de plus haut niveau pour ce faire " +"est :c:func:`PyRun_SimpleStringString` qui prend une chaîne pour seul " +"argument afin de l'exécuter dans le contexte du module ``__main__`` et " +"renvoie ``0`` en cas de succès et ``-1`` quand une exception se produit " +"(incluant :exc:`SyntaxError`). Pour une meilleure maîtrise, " +"utilisez :c:func:`PyRun_String` ; voir le code source " +"pour :c:func:`PyRun_SimpleString` dans ``Python/pythonrun.c``." + +#: faq/extending.rst:57 msgid "How can I evaluate an arbitrary Python expression from C?" msgstr "" "Comment puis-je évaluer une expression quelconque de Python à partir de C ?" -#: faq/extending.rst:74 +#: faq/extending.rst:59 msgid "" "Call the function :c:func:`PyRun_String` from the previous question with the " "start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it " @@ -144,47 +109,49 @@ msgstr "" "symbole de départ :c:data:`Py_eval_input` ; il analyse une expression, " "l'évalue et renvoie sa valeur." -#: faq/extending.rst:80 +#: faq/extending.rst:65 msgid "How do I extract C values from a Python object?" msgstr "Comment puis-je extraire des donnés en C d'un objet Python ?" -#: faq/extending.rst:82 +#: faq/extending.rst:67 #, fuzzy msgid "" "That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` " "returns its length and :c:func:`PyTuple_GetItem` returns the item at a " -"specified index. Lists have similar functions, :c:func:`PyList_Size` and :c:" -"func:`PyList_GetItem`." +"specified index. Lists have similar functions, :c:func:`PyList_Size` " +"and :c:func:`PyList_GetItem`." msgstr "" "Cela dépend du type d'objet. Si c'est un *n*-uplet, :c:func:`PyTuple_Size` " "renvoie sa longueur et :c:func:`PyTuple_GetItem` renvoie l'élément à l'index " -"spécifié. Les listes ont des fonctions similaires, :c:func:`PyListSize` et :" -"c:func:`PyList_GetItem`." +"spécifié. Les listes ont des fonctions similaires, :c:func:`PyListSize` " +"et :c:func:`PyList_GetItem`." -#: faq/extending.rst:87 +#: faq/extending.rst:72 #, fuzzy msgid "" -"For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:" -"`PyBytes_AsStringAndSize` provides a pointer to its value and its length. " -"Note that Python bytes objects may contain null bytes so C's :c:func:`!" -"strlen` should not be used." +"For bytes, :c:func:`PyBytes_Size` returns its length " +"and :c:func:`PyBytes_AsStringAndSize` provides a pointer to its value and " +"its length. Note that Python bytes objects may contain null bytes so " +"C's :c:func:`!strlen` should not be used." msgstr "" -"Pour les bytes, :c:func:`PyBytes_Size` renvoie sa longueur et :c:func:" -"`PyBytes_AsStringAndSize` fournit un pointeur vers sa valeur et sa longueur. " -"Notez que les objets bytes en Python peuvent contenir des valeurs nulles, " -"c'est pourquoi il ne faut pas utiliser la fonction C :c:func:`strlen`." +"Pour les bytes, :c:func:`PyBytes_Size` renvoie sa longueur " +"et :c:func:`PyBytes_AsStringAndSize` fournit un pointeur vers sa valeur et " +"sa longueur. Notez que les objets bytes en Python peuvent contenir des " +"valeurs nulles, c'est pourquoi il ne faut pas utiliser la fonction " +"C :c:func:`strlen`." -#: faq/extending.rst:92 +#: faq/extending.rst:77 msgid "" "To test the type of an object, first make sure it isn't ``NULL``, and then " -"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:" -"`PyList_Check`, etc." +"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:`PyList_Check`, " +"etc." msgstr "" "Pour tester le type d'un objet, assurez-vous d'abord qu'il ne soit pas " -"``NULL``, puis utilisez :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:" -"func:`PyList_Check`, etc." +"``NULL``, puis " +"utilisez :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:`PyList_Check`, " +"etc." -#: faq/extending.rst:95 +#: faq/extending.rst:80 msgid "" "There is also a high-level API to Python objects which is provided by the so-" "called 'abstract' interface -- read ``Include/abstract.h`` for further " @@ -196,26 +163,27 @@ msgstr "" "Il y a aussi une API de haut niveau pour les objets Python qui est fournie " "par l'interface dite « abstraite » — voir ``Include/abstract.h`` pour plus " "de détails. Elle permet l'interfaçage avec tout type de séquence Python en " -"utilisant des appels tels que :c:func:`PySequence_Length`, :c:func:" -"`PySequence_GetItem`, etc. ainsi que de nombreux autres protocoles utiles " -"tels que les nombres (:c:func:`PyNumber_Index` et autres) et les " -"correspondances dans les APIs PyMapping." +"utilisant des appels tels " +"que :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. ainsi " +"que de nombreux autres protocoles utiles tels que les nombres " +"(:c:func:`PyNumber_Index` et autres) et les correspondances dans les APIs " +"PyMapping." -#: faq/extending.rst:104 +#: faq/extending.rst:89 msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" msgstr "" "Comment utiliser Py_BuildValue() pour créer un *n*-uplet de longueur " "définie ?" -#: faq/extending.rst:106 +#: faq/extending.rst:91 msgid "You can't. Use :c:func:`PyTuple_Pack` instead." msgstr "Vous ne pouvez pas. Utilisez :c:func:`PyTuple_Pack` à la place." -#: faq/extending.rst:110 +#: faq/extending.rst:95 msgid "How do I call an object's method from C?" msgstr "Comment puis-je appeler la méthode d'un objet à partir de C ?" -#: faq/extending.rst:112 +#: faq/extending.rst:97 msgid "" "The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary " "method of an object. The parameters are the object, the name of the method " @@ -224,20 +192,20 @@ msgid "" msgstr "" "La fonction :c:func:`PyObject_CallMethod` peut être utilisée pour appeler la " "méthode d'un objet. Les paramètres sont l'objet, le nom de la méthode à " -"appeler, une chaîne de caractères comme celle utilisée pour :c:func:" -"`Py_BuildValue` et les valeurs des arguments ::" +"appeler, une chaîne de caractères comme celle utilisée " +"pour :c:func:`Py_BuildValue` et les valeurs des arguments ::" -#: faq/extending.rst:121 +#: faq/extending.rst:106 msgid "" "This works for any object that has methods -- whether built-in or user-" "defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the " "return value." msgstr "" "Cela fonctionne pour tous les objets qui ont des méthodes — qu'elles soient " -"intégrées ou définies par l'utilisateur. Vous êtes responsable de « :c:func:" -"`Py_DECREF`\\ *er* » la valeur de retour à la fin." +"intégrées ou définies par l'utilisateur. Vous êtes responsable de " +"« :c:func:`Py_DECREF`\\ *er* » la valeur de retour à la fin." -#: faq/extending.rst:124 +#: faq/extending.rst:109 msgid "" "To call, e.g., a file object's \"seek\" method with arguments 10, 0 " "(assuming the file object pointer is \"f\")::" @@ -245,7 +213,7 @@ msgstr "" "Pour appeler, p. ex., la méthode *seek* d'un objet *file* avec les arguments " "10, 0 (en supposant que le pointeur de l'objet fichier est *f*) ::" -#: faq/extending.rst:135 +#: faq/extending.rst:120 msgid "" "Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the " "argument list, to call a function without arguments, pass \"()\" for the " @@ -257,7 +225,7 @@ msgstr "" "\"()\" pour être conforme au type et, pour appeler une fonction avec un " "paramètre, entourez-le de parenthèses, p. ex. \"(i)\"." -#: faq/extending.rst:142 +#: faq/extending.rst:127 msgid "" "How do I catch the output from PyErr_Print() (or anything that prints to " "stdout/stderr)?" @@ -265,7 +233,7 @@ msgstr "" "Comment puis-je récupérer la sortie de ``PyErr_Print()`` (ou tout ce qui " "s'affiche sur *stdout*/*stderr*) ?" -#: faq/extending.rst:144 +#: faq/extending.rst:129 msgid "" "In Python code, define an object that supports the ``write()`` method. " "Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call " @@ -278,40 +246,40 @@ msgstr "" "remontée des erreurs fonctionne. Ensuite, la sortie sera dirigée vers " "l'endroit où votre méthode ``write()`` écrit." -#: faq/extending.rst:149 +#: faq/extending.rst:134 msgid "The easiest way to do this is to use the :class:`io.StringIO` class:" msgstr "" "La façon la plus simple consiste à utiliser la classe :class:`io.StringIO` :" -#: faq/extending.rst:161 +#: faq/extending.rst:146 msgid "A custom object to do the same would look like this:" msgstr "" "Le code d'un objet à la fonctionnalité similaire ressemblerait à ceci :" -#: faq/extending.rst:182 +#: faq/extending.rst:167 msgid "How do I access a module written in Python from C?" msgstr "Comment accéder à un module écrit en Python à partir de C ?" -#: faq/extending.rst:184 +#: faq/extending.rst:169 msgid "You can get a pointer to the module object as follows::" msgstr "Vous pouvez obtenir un pointeur sur l'objet module comme suit ::" -#: faq/extending.rst:188 +#: faq/extending.rst:173 msgid "" -"If the module hasn't been imported yet (i.e. it is not yet present in :data:" -"`sys.modules`), this initializes the module; otherwise it simply returns the " -"value of ``sys.modules[\"\"]``. Note that it doesn't enter the " -"module into any namespace -- it only ensures it has been initialized and is " -"stored in :data:`sys.modules`." +"If the module hasn't been imported yet (i.e. it is not yet present " +"in :data:`sys.modules`), this initializes the module; otherwise it simply " +"returns the value of ``sys.modules[\"\"]``. Note that it " +"doesn't enter the module into any namespace -- it only ensures it has been " +"initialized and is stored in :data:`sys.modules`." msgstr "" "Si le module n'a pas encore été importé (c.-à-d. qu'il n'est pas encore " "présent dans :data:`sys.modules`), cela initialise le module ; sinon il " "renvoie simplement la valeur de ``sys.modules[\"\"]``. Notez " "qu'il n'inscrit le module dans aucun espace de nommage — il s'assure " -"seulement qu'il a été initialisé et qu'il est stocké dans :data:`sys." -"modules`." +"seulement qu'il a été initialisé et qu'il est stocké " +"dans :data:`sys.modules`." -#: faq/extending.rst:194 +#: faq/extending.rst:179 msgid "" "You can then access the module's attributes (i.e. any name defined in the " "module) as follows::" @@ -319,7 +287,7 @@ msgstr "" "Vous pouvez alors accéder aux attributs du module (c.-à-d. à tout nom défini " "dans le module) comme suit ::" -#: faq/extending.rst:199 +#: faq/extending.rst:184 msgid "" "Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " "module also works." @@ -327,11 +295,11 @@ msgstr "" "Appeler :c:func:`PyObject_SetAttrString` pour assigner des valeurs aux " "variables du module fonctionne également." -#: faq/extending.rst:204 +#: faq/extending.rst:189 msgid "How do I interface to C++ objects from Python?" msgstr "Comment s'interfacer avec les objets C++ depuis Python ?" -#: faq/extending.rst:206 +#: faq/extending.rst:191 msgid "" "Depending on your requirements, there are many approaches. To do this " "manually, begin by reading :ref:`the \"Extending and Embedding\" document " @@ -347,17 +315,17 @@ msgstr "" "pour construire un nouveau type Python à partir d'une structure C (pointeur) " "fonctionne également avec des objets en C++." -#: faq/extending.rst:212 +#: faq/extending.rst:197 msgid "For C++ libraries, see :ref:`c-wrapper-software`." msgstr "Pour les bibliothèques C++, voir :ref:`c-wrapper-software`." -#: faq/extending.rst:216 +#: faq/extending.rst:201 msgid "I added a module using the Setup file and the make fails; why?" msgstr "" "J'ai ajouté un module en utilisant le fichier *Setup* et la compilation " "échoue ; pourquoi ?" -#: faq/extending.rst:218 +#: faq/extending.rst:203 msgid "" "Setup must end in a newline, if there is no newline there, the build process " "fails. (Fixing this requires some ugly shell script hackery, and this bug " @@ -368,11 +336,11 @@ msgstr "" "en bidouillant un script shell, et ce bogue est si mineur qu'il ne mérite " "pas qu'on s'y attarde)." -#: faq/extending.rst:224 +#: faq/extending.rst:209 msgid "How do I debug an extension?" msgstr "Comment déboguer une extension ?" -#: faq/extending.rst:226 +#: faq/extending.rst:211 msgid "" "When using GDB with dynamically loaded extensions, you can't set a " "breakpoint in your extension until your extension is loaded." @@ -381,16 +349,16 @@ msgstr "" "ne pouvez pas placer de point d'arrêt dans votre extension tant que celle-ci " "n'est pas chargée." -#: faq/extending.rst:229 +#: faq/extending.rst:214 msgid "In your ``.gdbinit`` file (or interactively), add the command:" msgstr "" "Dans votre fichier ``.gdbinit`` (ou manuellement), ajoutez la commande :" -#: faq/extending.rst:235 +#: faq/extending.rst:220 msgid "Then, when you run GDB:" msgstr "Ensuite, lorsque vous exécutez GDB :" -#: faq/extending.rst:247 +#: faq/extending.rst:232 msgid "" "I want to compile a Python module on my Linux system, but some files are " "missing. Why?" @@ -398,7 +366,7 @@ msgstr "" "Je veux compiler un module Python sur mon système Linux, mais il manque " "certains fichiers. Pourquoi ?" -#: faq/extending.rst:249 +#: faq/extending.rst:234 #, fuzzy msgid "" "Most packaged versions of Python omit some files required for compiling " @@ -408,25 +376,25 @@ msgstr "" "répertoire :file:`/usr/lib/python2.{x}/config/`, qui contient les différents " "fichiers nécessaires à la compilation des extensions Python." -#: faq/extending.rst:252 +#: faq/extending.rst:237 #, fuzzy msgid "For Red Hat, install the python3-devel RPM to get the necessary files." msgstr "" "Pour Red Hat, installez le RPM *python-devel* pour obtenir les fichiers " "nécessaires." -#: faq/extending.rst:254 +#: faq/extending.rst:239 #, fuzzy msgid "For Debian, run ``apt-get install python3-dev``." msgstr "Pour Debian, exécutez ``apt-get install python-dev``." -#: faq/extending.rst:257 +#: faq/extending.rst:242 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" "Comment distinguer une « entrée incomplète » (*incomplete input*) d'une " "« entrée invalide » (*invalid input*) ?" -#: faq/extending.rst:259 +#: faq/extending.rst:244 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -440,7 +408,7 @@ msgstr "" "vous n'avez pas fermé vos parenthèses ou triple guillemets) mais il vous " "renvoie immédiatement une erreur syntaxique quand la saisie est incorrecte." -#: faq/extending.rst:265 +#: faq/extending.rst:250 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." @@ -448,7 +416,7 @@ msgstr "" "En Python, vous pouvez utiliser le module :mod:`codeop`, qui se rapproche " "assez du comportement de l'analyseur. Par exemple, IDLE l'utilise." -#: faq/extending.rst:268 +#: faq/extending.rst:253 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -456,20 +424,20 @@ msgid "" "to point at your custom input function. See ``Modules/readline.c`` and " "``Parser/myreadline.c`` for more hints." msgstr "" -"La façon la plus simple de le faire en C est d'appeler :c:func:" -"`PyRun_InteractiveLoop` (peut-être dans un autre fil d'exécution) et laisser " -"l'interpréteur Python gérer l'entrée pour vous. Vous pouvez également " -"définir :c:func:`PyOS_ReadlineFunctionPointer` pour pointer vers votre " -"fonction d'entrée personnalisée. Voir ``Modules/readline.c`` et ``Parser/" -"myreadline.c`` pour plus de conseils." +"La façon la plus simple de le faire en C est " +"d'appeler :c:func:`PyRun_InteractiveLoop` (peut-être dans un autre fil " +"d'exécution) et laisser l'interpréteur Python gérer l'entrée pour vous. Vous " +"pouvez également définir :c:func:`PyOS_ReadlineFunctionPointer` pour pointer " +"vers votre fonction d'entrée personnalisée. Voir ``Modules/readline.c`` et " +"``Parser/myreadline.c`` pour plus de conseils." -#: faq/extending.rst:275 +#: faq/extending.rst:260 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "" "Comment puis-je trouver les symboles g++ indéfinis ``__builtin_new`` ou " "``__pure_virtual`` ?" -#: faq/extending.rst:277 +#: faq/extending.rst:262 msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " "it using g++ (change LINKCC in the Python Modules Makefile), and link your " @@ -478,10 +446,10 @@ msgstr "" "Pour charger dynamiquement les modules d'extension g++, vous devez " "recompiler Python, effectuer l'édition de liens en utilisant g++ (modifiez " "*LINKCC* dans le *Python Modules Makefile*), et effectuer l'édition de liens " -"de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule." -"so mymodule.o``)." +"de votre module d'extension avec g++ (par exemple, ``g++ -shared -o " +"mymodule.so mymodule.o``)." -#: faq/extending.rst:283 +#: faq/extending.rst:268 msgid "" "Can I create an object class with some methods implemented in C and others " "in Python (e.g. through inheritance)?" @@ -489,47 +457,88 @@ msgstr "" "Puis-je créer une classe d'objets avec certaines méthodes implémentées en C " "et d'autres en Python (p. ex. en utilisant l'héritage) ?" -#: faq/extending.rst:285 +#: faq/extending.rst:270 msgid "" -"Yes, you can inherit from built-in classes such as :class:`int`, :class:" -"`list`, :class:`dict`, etc." +"Yes, you can inherit from built-in classes such " +"as :class:`int`, :class:`list`, :class:`dict`, etc." msgstr "" -"Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :" -"class:`list`, :class:`dict`, etc." +"Oui, vous pouvez hériter de classes intégrées telles " +"que :class:`int`, :class:`list`, :class:`dict`, etc." -#: faq/extending.rst:288 +#: faq/extending.rst:273 #, fuzzy msgid "" -"The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index." -"html) provides a way of doing this from C++ (i.e. you can inherit from an " -"extension class written in C++ using the BPL)." +"The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/" +"index.html) provides a way of doing this from C++ (i.e. you can inherit from " +"an extension class written in C++ using the BPL)." msgstr "" "La bibliothèque *Boost Python Library* (BPL, http://www.boost.org/libs/" "python/doc/index.html) fournit un moyen de le faire depuis C++ (c.-à-d. que " "vous pouvez hériter d'une classe d'extension écrite en C++ en utilisant BPL)." +#~ msgid "" +#~ "There are a number of alternatives to writing your own C extensions, " +#~ "depending on what you're trying to do." +#~ msgstr "" +#~ "Il y a un certain nombre de solutions existantes qui vous permettent " +#~ "d'écrire vos propres extensions C, selon ce que vous essayez de faire." + +#, fuzzy +#~ msgid "" +#~ "`Cython `_ and its relative `Pyrex `_ are compilers that " +#~ "accept a slightly modified form of Python and generate the corresponding " +#~ "C code. Cython and Pyrex make it possible to write an extension without " +#~ "having to learn Python's C API." +#~ msgstr "" +#~ "`Cython `_ et son cousin `Pyrex `_ sont des " +#~ "compilateurs qui acceptent une forme légèrement modifiée de Python et " +#~ "produisent du code C correspondant. Cython et Pyrex permettent d'écrire " +#~ "une extension sans avoir à connaître l'API C de Python." + +#, fuzzy +#~ msgid "" +#~ "If you need to interface to some C or C++ library for which no Python " +#~ "extension currently exists, you can try wrapping the library's data types " +#~ "and functions with a tool such as `SWIG `_. `SIP " +#~ "`__, `CXX `_ `Boost `_, or " +#~ "`Weave `_ are also alternatives for " +#~ "wrapping C++ libraries." +#~ msgstr "" +#~ "Si vous avez besoin d'accéder à l'interface d'une bibliothèque C ou C++ " +#~ "pour laquelle aucune extension Python n'existe à ce jour, vous pouvez " +#~ "essayer d'encapsuler les types de données et fonctions de la bibliothèque " +#~ "avec un outil tel que `SWIG `_. `SIP `__, `CXX `_, `Boost `_ ou `Weave `_ sont également " +#~ "des alternatives pour encapsuler des bibliothèques C++." + #~ msgid "" #~ "However sometimes you have to run the embedded Python interpreter in the " -#~ "same thread as your rest application and you can't allow the :c:func:" -#~ "`PyRun_InteractiveLoop` to stop while waiting for user input. A solution " -#~ "is trying to compile the received string with :c:func:`Py_CompileString`. " -#~ "If it compiles without errors, try to execute the returned code object by " -#~ "calling :c:func:`PyEval_EvalCode`. Otherwise save the input for later. If " -#~ "the compilation fails, find out if it's an error or just more input is " -#~ "required - by extracting the message string from the exception tuple and " -#~ "comparing it to the string \"unexpected EOF while parsing\". Here is a " -#~ "complete example using the GNU readline library (you may want to ignore " -#~ "**SIGINT** while calling readline())::" +#~ "same thread as your rest application and you can't allow " +#~ "the :c:func:`PyRun_InteractiveLoop` to stop while waiting for user input. " +#~ "A solution is trying to compile the received string " +#~ "with :c:func:`Py_CompileString`. If it compiles without errors, try to " +#~ "execute the returned code object by calling :c:func:`PyEval_EvalCode`. " +#~ "Otherwise save the input for later. If the compilation fails, find out if " +#~ "it's an error or just more input is required - by extracting the message " +#~ "string from the exception tuple and comparing it to the string " +#~ "\"unexpected EOF while parsing\". Here is a complete example using the " +#~ "GNU readline library (you may want to ignore **SIGINT** while calling " +#~ "readline())::" #~ msgstr "" #~ "Cependant, il arrive qu'il soit nécessaire d'exécuter l'interpréteur " #~ "Python embarqué dans le même fil d'exécution que le reste de " #~ "l'application, et que :c:func:`PyRun_InteractiveLoop` ne puisse pas être " #~ "utilisée car elle bloque le fil en attendant l'entrée de l'utilisateur. " -#~ "Une solution est d'essayer de compiler la chaîne reçue avec :c:func:" -#~ "`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter " -#~ "l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, " -#~ "enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez " -#~ "s'il s'agit d'une erreur ou s'il faut juste plus de données — en " +#~ "Une solution est d'essayer de compiler la chaîne reçue " +#~ "avec :c:func:`Py_CompileString`. Si cela se compile sans erreur, essayez " +#~ "d'exécuter l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. " +#~ "Sinon, enregistrez l'entrée pour plus tard. Si la compilation échoue, " +#~ "vérifiez s'il s'agit d'une erreur ou s'il faut juste plus de données — en " #~ "extrayant la chaîne de message du *n*-uplet d'exception et en la " #~ "comparant à la chaîne *\"unexpected EOF while parsing\"*. Voici un " #~ "exemple complet d'utilisation de la bibliothèque *readline* de GNU (il " @@ -538,16 +547,17 @@ msgstr "" #~ msgid "" #~ "However sometimes you have to run the embedded Python interpreter in the " -#~ "same thread as your rest application and you can't allow the :c:func:" -#~ "`PyRun_InteractiveLoop` to stop while waiting for user input. The one " -#~ "solution then is to call :c:func:`PyParser_ParseString` and test for ``e." -#~ "error`` equal to ``E_EOF``, which means the input is incomplete. Here's " -#~ "a sample code fragment, untested, inspired by code from Alex Farber::" +#~ "same thread as your rest application and you can't allow " +#~ "the :c:func:`PyRun_InteractiveLoop` to stop while waiting for user " +#~ "input. The one solution then is to call :c:func:`PyParser_ParseString` " +#~ "and test for ``e.error`` equal to ``E_EOF``, which means the input is " +#~ "incomplete. Here's a sample code fragment, untested, inspired by code " +#~ "from Alex Farber::" #~ msgstr "" #~ "Cependant, vous devez parfois exécuter l'interpréteur Python intégré dans " #~ "le même fil d’exécution que le reste de votre application et vous ne " #~ "pouvez pas laisser :c:func:`PyRun_InteractiveLoop` attendre les entrées " -#~ "utilisateur. La seule solution est alors d'appeler :c:func:" -#~ "`PyParser_ParseString` et de tester si ``e.error`` égale ``E_EOF``, ce " -#~ "qui signifie que l'entrée est incomplète. Voici un exemple de code, non " -#~ "testé, inspiré d'un code écrit par Alex Farber ::" +#~ "utilisateur. La seule solution est alors " +#~ "d'appeler :c:func:`PyParser_ParseString` et de tester si ``e.error`` " +#~ "égale ``E_EOF``, ce qui signifie que l'entrée est incomplète. Voici un " +#~ "exemple de code, non testé, inspiré d'un code écrit par Alex Farber ::" diff --git a/faq/general.po b/faq/general.po index 74ad76e54..b2234f991 100644 --- a/faq/general.po +++ b/faq/general.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-27 16:40+0200\n" "Last-Translator: Mathieu Dupuy\n" "Language-Team: FRENCH \n" @@ -90,8 +90,8 @@ msgstr "" #: faq/general.rst:42 msgid "" "Donations to the PSF are tax-exempt in the US. If you use Python and find " -"it helpful, please contribute via `the PSF donation page `_." +"it helpful, please contribute via `the PSF donation page `_." msgstr "" "Si vous utilisez Python et que vous le trouvez utile, merci de contribuer " "par le biais de `la page de donation de la PSF `_ pour trouver les paquets qui pourraient vous " -"intéresser." +"de fichiers, connecteurs TCP/IP). Regardez la table des " +"matières :ref:`library-index` pour avoir une idée de ce qui est disponible. " +"Une grande variété de greffons tiers existent aussi. Consultez `le sommaire " +"des paquets Python `_ pour trouver les paquets qui " +"pourraient vous intéresser." #: faq/general.rst:128 msgid "How does the Python version numbering scheme work?" @@ -415,9 +415,10 @@ msgid "How do I get documentation on Python?" msgstr "Comment obtenir la documentation de Python ?" #: faq/general.rst:188 +#, fuzzy msgid "" "The standard documentation for the current stable version of Python is " -"available at https://docs.python.org/3/. PDF, plain text, and downloadable " +"available at https://docs.python.org/3/. EPUB, plain text, and downloadable " "HTML versions are also available at https://docs.python.org/3/download.html." msgstr "" "La documentation standard pour la version stable actuelle est disponible à " @@ -467,9 +468,10 @@ msgid "" "There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, " "`python-list `_. The " "newsgroup and mailing list are gatewayed into each other -- if you can read " -"news it's unnecessary to subscribe to the mailing list. :newsgroup:`comp." -"lang.python` is high-traffic, receiving hundreds of postings every day, and " -"Usenet readers are often more able to cope with this volume." +"news it's unnecessary to subscribe to the mailing " +"list. :newsgroup:`comp.lang.python` is high-traffic, receiving hundreds of " +"postings every day, and Usenet readers are often more able to cope with this " +"volume." msgstr "" "Il y a un forum, :newsgroup:`comp.lang.python` et une liste de diffusion, " "`python-list `_. Le " @@ -482,9 +484,9 @@ msgstr "" #: faq/general.rst:217 #, fuzzy msgid "" -"Announcements of new software releases and events can be found in comp.lang." -"python.announce, a low-traffic moderated list that receives about five " -"postings per day. It's available as `the python-announce mailing list " +"Announcements of new software releases and events can be found in " +"comp.lang.python.announce, a low-traffic moderated list that receives about " +"five postings per day. It's available as `the python-announce mailing list " "`_." msgstr "" "Les annonces pour les nouvelles versions et événements peuvent êtres " @@ -508,15 +510,15 @@ msgstr "Comment obtenir une version bêta test de Python ?" #: faq/general.rst:229 msgid "" "Alpha and beta releases are available from https://www.python.org/" -"downloads/. All releases are announced on the comp.lang.python and comp." -"lang.python.announce newsgroups and on the Python home page at https://www." -"python.org/; an RSS feed of news is available." +"downloads/. All releases are announced on the comp.lang.python and " +"comp.lang.python.announce newsgroups and on the Python home page at https://" +"www.python.org/; an RSS feed of news is available." msgstr "" "Les versions alpha et bêta sont disponibles depuis https://www.python.org/" -"downloads/. Toutes les versions sont annoncées sur les *newsgroups* *comp." -"lang.python* et *comp.lang.python.announce* ainsi que sur la page d'accueil " -"de Python à https://www.python.org/; un flux RSS d'actualités y est aussi " -"disponible." +"downloads/. Toutes les versions sont annoncées sur les *newsgroups* " +"*comp.lang.python* et *comp.lang.python.announce* ainsi que sur la page " +"d'accueil de Python à https://www.python.org/; un flux RSS d'actualités y " +"est aussi disponible." #: faq/general.rst:234 msgid "" @@ -533,8 +535,8 @@ msgstr "Comment soumettre un rapport de bogues ou un correctif pour Python ?" #: faq/general.rst:241 msgid "" -"To report a bug or submit a patch, use the issue tracker at https://github." -"com/python/cpython/issues." +"To report a bug or submit a patch, use the issue tracker at https://" +"github.com/python/cpython/issues." msgstr "" "Pour signaler un bogue ou soumettre un correctif, utilisez le système de " "suivi des problèmes à l'adresse https://github.com/python/cpython/issues." @@ -605,8 +607,8 @@ msgstr "Où www.python.org est-il localisé dans le monde ?" #: faq/general.rst:274 msgid "" "The Python project's infrastructure is located all over the world and is " -"managed by the Python Infrastructure Team. Details `here `__." +"managed by the Python Infrastructure Team. Details `here `__." msgstr "" "L'infrastructure du projet Python est située dans le monde entier et est " "gérée par l'équipe de l'infrastructure Python. Plus de détails `ici `__, a BBC comedy series from the 1970s. " +"published scripts from `\"Monty Python's Flying Circus\" `__, a BBC comedy series from the 1970s. " "Van Rossum thought he needed a name that was short, unique, and slightly " "mysterious, so he decided to call the language Python." msgstr "" "Quand il a commencé à implémenter Python, Guido van Rossum a aussi lu le " -"script publié par `\"Monty Python's Flying Circus\" `__, une série comique des années 1970 diffusée par la " -"BBC. Van Rossum a pensé qu'il avait besoin d'un nom court, unique, et un peu " -"mystérieux, donc il a décidé de l'appeler le langage Python." +"script publié par `\"Monty Python's Flying Circus\" `__, une série comique des années 1970 " +"diffusée par la BBC. Van Rossum a pensé qu'il avait besoin d'un nom court, " +"unique, et un peu mystérieux, donc il a décidé de l'appeler le langage " +"Python." #: faq/general.rst:289 msgid "Do I have to like \"Monty Python's Flying Circus\"?" @@ -690,11 +693,11 @@ msgstr "" "largement utilisées. Bien que Python 2 soit encore utilisé, `il n'est " "désormais plus maintenu `_." -#: faq/general.rst:318 +#: faq/general.rst:317 msgid "How many people are using Python?" msgstr "Combien de personnes utilisent Python ?" -#: faq/general.rst:320 +#: faq/general.rst:319 msgid "" "There are probably millions of users, though it's difficult to obtain an " "exact count." @@ -702,7 +705,7 @@ msgstr "" "Il y a probablement des millions d'utilisateurs, bien qu'il soit difficile " "d'en déterminer le nombre exact." -#: faq/general.rst:323 +#: faq/general.rst:322 msgid "" "Python is available for free download, so there are no sales figures, and " "it's available from many different sites and packaged with many Linux " @@ -713,7 +716,7 @@ msgstr "" "il est inclus avec de beaucoup de distributions Linux, donc les statistiques " "de téléchargement ne donnent pas la totalité non plus." -#: faq/general.rst:327 +#: faq/general.rst:326 msgid "" "The comp.lang.python newsgroup is very active, but not all Python users post " "to the group or even read it." @@ -721,15 +724,15 @@ msgstr "" "Le forum *comp.lang.python* est très actif, mais tous les utilisateurs de " "Python ne laissent pas de messages dessus ou même ne le lisent pas." -#: faq/general.rst:332 +#: faq/general.rst:331 msgid "Have any significant projects been done in Python?" msgstr "Y a-t-il un nombre de projets significatif réalisés en Python ?" -#: faq/general.rst:334 +#: faq/general.rst:333 msgid "" "See https://www.python.org/about/success for a list of projects that use " -"Python. Consulting the proceedings for `past Python conferences `_ will reveal contributions from many " +"Python. Consulting the proceedings for `past Python conferences `_ will reveal contributions from many " "different companies and organizations." msgstr "" "Voir https://www.python.org/about/success pour avoir une liste des projets " @@ -738,27 +741,27 @@ msgstr "" "s'avère que les contributions proviennent de nombreux organismes et " "entreprises divers." -#: faq/general.rst:339 +#: faq/general.rst:338 msgid "" "High-profile Python projects include `the Mailman mailing list manager " -"`_ and `the Zope application server `_. Several Linux distributions, most notably `Red Hat `_, have written part or all of their installer and system " -"administration software in Python. Companies that use Python internally " -"include Google, Yahoo, and Lucasfilm Ltd." +"`_ and `the Zope application server `_. Several Linux distributions, most notably `Red Hat " +"`_, have written part or all of their installer and " +"system administration software in Python. Companies that use Python " +"internally include Google, Yahoo, and Lucasfilm Ltd." msgstr "" "Les projets Python les plus connus incluent `Mailman mailing list manager " -"`_ et `l'application serveur Zope `_. Plusieurs distributions Linux, notamment `Red Hat `_, qui a écrit tout ou partie de son installateur et de son " +"`_ et `l'application serveur Zope `_. Plusieurs distributions Linux, notamment `Red Hat `_, qui a écrit tout ou partie de son installateur et de son " "logiciel d'administration système en Python. Les entreprises qui utilisent " "Python en interne comprennent Google, Yahoo, et Lucasfilm Ltd." -#: faq/general.rst:348 +#: faq/general.rst:347 msgid "What new developments are expected for Python in the future?" msgstr "Quelles sont les nouveautés en développement attendues pour Python ?" -#: faq/general.rst:350 +#: faq/general.rst:349 msgid "" "See https://peps.python.org/ for the Python Enhancement Proposals (PEPs). " "PEPs are design documents describing a suggested new feature for Python, " @@ -770,24 +773,24 @@ msgstr "" "Proposals* », ou *PEP*) sur https://peps.python.org/. Les PEP sont des " "documents techniques qui décrivent une nouvelle fonctionnalité qui a été " "suggérée pour Python, en fournissant une spécification technique concise et " -"logique. Recherchez une PEP intitulée \"Python X.Y Release Schedule\", où X." -"Y est la version qui n'a pas encore été publiée." +"logique. Recherchez une PEP intitulée \"Python X.Y Release Schedule\", où " +"X.Y est la version qui n'a pas encore été publiée." -#: faq/general.rst:356 +#: faq/general.rst:355 #, fuzzy msgid "" -"New development is discussed on `the python-dev mailing list `_." +"New development is discussed on `the python-dev mailing list `_." msgstr "" "Le nouveau développement est discuté sur `la liste de diffusion python-dev " "`_." -#: faq/general.rst:361 +#: faq/general.rst:360 msgid "Is it reasonable to propose incompatible changes to Python?" msgstr "" "Est-il raisonnable de proposer des changements incompatibles dans Python ?" -#: faq/general.rst:363 +#: faq/general.rst:362 msgid "" "In general, no. There are already millions of lines of Python code around " "the world, so any change in the language that invalidates more than a very " @@ -804,7 +807,7 @@ msgstr "" "documentations, beaucoup de livres ont été écrits au sujet de Python, et " "nous ne voulons pas les rendre invalides soudainement." -#: faq/general.rst:370 +#: faq/general.rst:369 msgid "" "Providing a gradual upgrade path is necessary if a feature has to be " "changed. :pep:`5` describes the procedure followed for introducing backward-" @@ -813,17 +816,17 @@ msgstr "" "En fournissant un rythme de mise à jour progressif qui est obligatoire si " "une fonctionnalité doit être changée." -#: faq/general.rst:376 +#: faq/general.rst:375 msgid "Is Python a good language for beginning programmers?" msgstr "" "Existe-t-il un meilleur langage de programmation pour les programmeurs " "débutants ?" -#: faq/general.rst:378 +#: faq/general.rst:377 msgid "Yes." msgstr "Oui." -#: faq/general.rst:380 +#: faq/general.rst:379 msgid "" "It is still common to start students with a procedural and statically typed " "language such as Pascal, C, or a subset of C++ or Java. Students may be " @@ -847,7 +850,7 @@ msgstr "" "peuvent même probablement travailler avec des objets définis dans leurs " "premiers cours." -#: faq/general.rst:390 +#: faq/general.rst:389 msgid "" "For a student who has never programmed before, using a statically typed " "language seems unnatural. It presents additional complexity that the " @@ -867,7 +870,7 @@ msgstr "" "terme, ce n'est pas nécessairement la meilleure idée pour s'adresser aux " "étudiants durant leur tout premier cours." -#: faq/general.rst:398 +#: faq/general.rst:397 msgid "" "Many other aspects of Python make it a good first language. Like Java, " "Python has a large standard library so that students can be assigned " @@ -890,7 +893,7 @@ msgstr "" "réutilisation de code. Les modules tiers tels que PyGame sont aussi très " "utiles pour étendre les compétences des étudiants." -#: faq/general.rst:407 +#: faq/general.rst:406 msgid "" "Python's interactive interpreter enables students to test language features " "while they're programming. They can keep a window with the interpreter " @@ -904,7 +907,7 @@ msgstr "" "souvenir des méthodes pour une liste, ils peuvent faire quelque chose comme " "ça ::" -#: faq/general.rst:436 +#: faq/general.rst:435 msgid "" "With the interpreter, documentation is never far from the student as they " "are programming." @@ -912,7 +915,7 @@ msgstr "" "Avec l'interpréteur, la documentation n'est jamais loin des étudiants quand " "ils travaillent." -#: faq/general.rst:439 +#: faq/general.rst:438 msgid "" "There are also good IDEs for Python. IDLE is a cross-platform IDE for " "Python that is written in Python using Tkinter. Emacs users will be happy to " @@ -931,7 +934,7 @@ msgstr "" "Consultez `le wiki Python `_ " "pour une liste complète des environnements de développement intégrés." -#: faq/general.rst:447 +#: faq/general.rst:446 msgid "" "If you want to discuss Python's use in education, you may be interested in " "joining `the edu-sig mailing list `_." #~ msgid "" -#~ "See also the documentation for :data:`sys.version`, :data:`sys." -#~ "hexversion`, and :data:`sys.version_info`." +#~ "See also the documentation " +#~ "for :data:`sys.version`, :data:`sys.hexversion`, " +#~ "and :data:`sys.version_info`." #~ msgstr "" -#~ "Voir aussi la documentation pour for :data:`sys.version`, :data:`sys." -#~ "hexversion`, et :data:`sys.version_info`." +#~ "Voir aussi la documentation pour " +#~ "for :data:`sys.version`, :data:`sys.hexversion`, " +#~ "et :data:`sys.version_info`." #~ msgid "" #~ "Python versions are numbered A.B.C or A.B. A is the major version number " #~ "-- it is only incremented for really major changes in the language. B is " #~ "the minor version number, incremented for less earth-shattering changes. " -#~ "C is the micro-level -- it is incremented for each bugfix release. See :" -#~ "pep:`6` for more information about bugfix releases." +#~ "C is the micro-level -- it is incremented for each bugfix release. " +#~ "See :pep:`6` for more information about bugfix releases." #~ msgstr "" #~ "Les versions de Python sont numérotées A.B.C ou A.B. A est une version " #~ "majeure -- elle est augmentée seulement lorsqu'il y a des changements " @@ -974,9 +979,9 @@ msgstr "" #~ "supplémentaire. Le suffixe pour une version alpha est « aN » où N est un " #~ "petit nombre, le suffixe pour une version *beta* est *bN* où N est un " #~ "petit nombre, et le suffixe pour une *release candidate* est *rcN* où N " -#~ "est un petit nombre. En d'autres mots, toutes les versions nommées *2.0." -#~ "aN* précèdent les versions *2.0.bN*, qui elles-mêmes précèdent 2.0rcN, et " -#~ "*celles-ci* précèdent la version 2.0." +#~ "est un petit nombre. En d'autres mots, toutes les versions nommées " +#~ "*2.0.aN* précèdent les versions *2.0.bN*, qui elles-mêmes précèdent " +#~ "2.0rcN, et *celles-ci* précèdent la version 2.0." #~ msgid "" #~ "You must have a Roundup account to report bugs; this makes it possible " diff --git a/faq/gui.po b/faq/gui.po index 8db809dc0..a2d281be1 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-05-23 21:32+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -37,17 +37,18 @@ msgid "" "widget set, called :ref:`tkinter `. This is probably the easiest " "to install (since it comes included with most `binary distributions `_ of Python) and use. For more info about Tk, " -"including pointers to the source, see the `Tcl/Tk home page `_. Tcl/Tk is fully portable to the macOS, Windows, and Unix platforms." +"including pointers to the source, see the `Tcl/Tk home page `_. Tcl/Tk is fully portable to the macOS, Windows, and Unix " +"platforms." msgstr "" "Les versions standards de Python incluent une interface orientée objet pour " "le jeu d'objets graphiques *Tcl/Tk*, appelée :ref:`tkinter `. " "C'est probablement la plus facile à installer (puisqu'elle est incluse avec " "la plupart des `distributions binaires `_ " "de Python) et à utiliser. Pour plus d'informations sur *Tk*, y compris les " -"liens vers les sources, voir la page d'accueil `Tcl/Tk `_. *Tcl/Tk* est entièrement portable sur les plates-formes macOS, " -"Windows et Unix." +"liens vers les sources, voir la page d'accueil `Tcl/Tk `_. *Tcl/Tk* est entièrement portable sur les plates-formes " +"macOS, Windows et Unix." #: faq/gui.rst:28 msgid "" @@ -166,10 +167,10 @@ msgstr "" #~ "Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link " #~ "with libtclsam and libtksam (you might include the Tix libraries as well)." #~ msgstr "" -#~ "Compilez Tix avec SAM activé, exécutez l'appel approprié à :c:func:" -#~ "`Tclsam_init`, etc. dans le fichier :file:`Modules/tkappinit.c` de " -#~ "Python, et liez avec *libtclsam* et *libtksam* (il est également possible " -#~ "d'inclure les bibliothèques *Tix*)." +#~ "Compilez Tix avec SAM activé, exécutez l'appel approprié " +#~ "à :c:func:`Tclsam_init`, etc. dans le fichier :file:`Modules/tkappinit.c` " +#~ "de Python, et liez avec *libtclsam* et *libtksam* (il est également " +#~ "possible d'inclure les bibliothèques *Tix*)." #~ msgid "What platform-independent GUI toolkits exist for Python?" #~ msgstr "" @@ -234,11 +235,12 @@ msgstr "" #~ msgid "" #~ "There are bindings available for the Qt toolkit (using either `PyQt " #~ "`_ or `PySide " -#~ "`_) and for KDE (`PyKDE4 `__). PyQt is currently more mature " -#~ "than PySide, but you must buy a PyQt license from `Riverbank Computing " -#~ "`_ if you want " -#~ "to write proprietary applications. PySide is free for all applications." +#~ "`_) and for KDE (`PyKDE4 `__). PyQt is currently " +#~ "more mature than PySide, but you must buy a PyQt license from `Riverbank " +#~ "Computing `_ " +#~ "if you want to write proprietary applications. PySide is free for all " +#~ "applications." #~ msgstr "" #~ "Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant " #~ "soit `PyQt `_ ou " @@ -264,8 +266,8 @@ msgstr "" #~ msgid "" #~ "The `GObject introspection bindings `_ for Python allow you to write GTK+ 3 applications. There is " -#~ "also a `Python GTK+ 3 Tutorial `_." +#~ "also a `Python GTK+ 3 Tutorial `_." #~ msgstr "" #~ "Les `GObject introspection bindings `_ pour Python vous permettent d'écrire des applications GTK+ " @@ -276,9 +278,9 @@ msgstr "" #~ "The older PyGtk bindings for the `Gtk+ 2 toolkit `_ " #~ "have been implemented by James Henstridge; see ." #~ msgstr "" -#~ "Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." +#~ "Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." #~ msgid "Kivy" #~ msgstr "*Kivy*" @@ -309,8 +311,8 @@ msgstr "" #~ msgstr "" #~ "Les liaisons Python pour `the FLTK toolkit `_, un " #~ "système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " -#~ "disponibles auprès de `the PyFLTK project `_." +#~ "disponibles auprès de `the PyFLTK project `_." #~ msgid "OpenGL" #~ msgstr "*OpenGL*" @@ -318,8 +320,8 @@ msgstr "" #~ msgid "" #~ "For OpenGL bindings, see `PyOpenGL `_." #~ msgstr "" -#~ "Pour les clients OpenGL, voir `PyOpenGL `_." +#~ "Pour les clients OpenGL, voir `PyOpenGL `_." #~ msgid "" #~ "By installing the `PyObjc Objective-C bridge \n" @@ -44,16 +44,16 @@ msgstr "" #: faq/library.rst:21 msgid "" -"For third-party packages, search the `Python Package Index `_ or try `Google `_ or another web search " +"For third-party packages, search the `Python Package Index `_ or try `Google `_ or another web search " "engine. Searching for \"Python\" plus a keyword or two for your topic of " "interest will usually find something helpful." msgstr "" "Pour des paquets tiers, regardez dans `l'index des paquets Python `_ ou essayez `Google `_ ou un autre moteur " -"de recherche (NDT : comme le moteur français `Qwant `_). Rechercher « Python » accompagné d'un ou deux mots-clés se " -"rapportant à ce qui vous intéresse donne souvent de bons résultats." +"de recherche (NDT : comme le moteur français `Qwant `_). Rechercher « Python » accompagné d'un ou deux mots-clés " +"se rapportant à ce qui vous intéresse donne souvent de bons résultats." #: faq/library.rst:28 msgid "Where is the math.py (socket.py, regex.py, etc.) source file?" @@ -65,9 +65,9 @@ msgstr "" msgid "" "If you can't find a source file for a module it may be a built-in or " "dynamically loaded module implemented in C, C++ or other compiled language. " -"In this case you may not have the source file or it may be something like :" -"file:`mathmodule.c`, somewhere in a C source directory (not on the Python " -"Path)." +"In this case you may not have the source file or it may be something " +"like :file:`mathmodule.c`, somewhere in a C source directory (not on the " +"Python Path)." msgstr "" "Si vous ne parvenez pas à trouver le fichier source d'un module, c'est peut-" "être parce que celui-ci est un module natif ou bien un module implémenté en " @@ -88,8 +88,8 @@ msgstr "les modules écrits en Python (*.py*) ;" msgid "" "modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc);" msgstr "" -"les modules écrits en C et chargés dynamiquement (*.dll*, *.pyd*, *.so*, *." -"sl*, *etc.*) ;" +"les modules écrits en C et chargés dynamiquement (*.dll*, *.pyd*, *.so*, " +"*.sl*, *etc.*) ;" #: faq/library.rst:39 msgid "" @@ -145,8 +145,8 @@ msgstr "" "Pour rendre ce script indépendant de la localisation de l'interpréteur " "Python, il faut utiliser le programme :program:`env`. La ligne ci-dessous " "fonctionne sur la quasi-totalité des dérivés de Unix, à condition que " -"l'interpréteur Python soit dans un dossier référencé dans la variable :" -"envvar:`PATH` de l'utilisateur ::" +"l'interpréteur Python soit dans un dossier référencé dans la " +"variable :envvar:`PATH` de l'utilisateur ::" #: faq/library.rst:71 msgid "" @@ -377,9 +377,10 @@ msgid "" "module. The :mod:`threading` module builds convenient abstractions on top of " "the low-level primitives provided by the :mod:`_thread` module." msgstr "" -"Veillez à bien utiliser le module :mod:`threading` et non le module :mod:" -"`_thread`. Le module :mod:`threading` fournit une abstraction plus facile à " -"manipuler que les primitives de bas-niveau du module :mod:`_thread`." +"Veillez à bien utiliser le module :mod:`threading` et non le " +"module :mod:`_thread`. Le module :mod:`threading` fournit une abstraction " +"plus facile à manipuler que les primitives de bas-niveau du " +"module :mod:`_thread`." #: faq/library.rst:245 msgid "None of my threads seem to run: why?" @@ -422,14 +423,14 @@ msgstr "" #: faq/library.rst:282 msgid "" "Instead of trying to guess a good delay value for :func:`time.sleep`, it's " -"better to use some kind of semaphore mechanism. One idea is to use the :mod:" -"`queue` module to create a queue object, let each thread append a token to " -"the queue when it finishes, and let the main thread read as many tokens from " -"the queue as there are threads." -msgstr "" -"Au lieu d'essayer de trouver une bonne valeur d'attente pour la fonction :" -"func:`time.sleep`, il vaut mieux utiliser un mécanisme basé sur les " -"sémaphores. Une solution consiste à utiliser le module :mod:`queue` pour " +"better to use some kind of semaphore mechanism. One idea is to use " +"the :mod:`queue` module to create a queue object, let each thread append a " +"token to the queue when it finishes, and let the main thread read as many " +"tokens from the queue as there are threads." +msgstr "" +"Au lieu d'essayer de trouver une bonne valeur d'attente pour la " +"fonction :func:`time.sleep`, il vaut mieux utiliser un mécanisme basé sur " +"les sémaphores. Une solution consiste à utiliser le module :mod:`queue` pour " "créer un objet file, faire en sorte que chaque fil ajoute un jeton à la file " "quand il se termine, et que le fil principal retire autant de jetons de la " "file qu'il y a de fils." @@ -445,9 +446,9 @@ msgid "" "The easiest way is to use the :mod:`concurrent.futures` module, especially " "the :mod:`~concurrent.futures.ThreadPoolExecutor` class." msgstr "" -"La manière la plus simple est d'utiliser le module :mod:`concurrent." -"futures`, en particulier la classe :mod:`~concurrent.futures." -"ThreadPoolExecutor`." +"La manière la plus simple est d'utiliser le " +"module :mod:`concurrent.futures`, en particulier la " +"classe :mod:`~concurrent.futures.ThreadPoolExecutor`." #: faq/library.rst:295 msgid "" @@ -460,9 +461,9 @@ msgid "" msgstr "" "Ou bien, si vous désirez contrôler plus finement l'algorithme de " "distribution, vous pouvez écrire votre propre logique « à la main ». " -"Utilisez le module :mod:`queue` pour créer une file de tâches ; la classe :" -"class:`~queue.Queue` gère une liste d'objets et a une méthode ``." -"put(objet)`` pour ajouter un élément à la file, et une méthode ``.get()`` " +"Utilisez le module :mod:`queue` pour créer une file de tâches ; la " +"classe :class:`~queue.Queue` gère une liste d'objets et a une méthode " +"``.put(objet)`` pour ajouter un élément à la file, et une méthode ``.get()`` " "pour les récupérer. La classe s'occupe de gérer les verrous pour que chaque " "tâche soit exécutée une et une seule fois." @@ -476,11 +477,11 @@ msgstr "Quand celui-ci est exécuté, il produit la sortie suivante :" #: faq/library.rst:358 msgid "" -"Consult the module's documentation for more details; the :class:`~queue." -"Queue` class provides a featureful interface." +"Consult the module's documentation for more details; " +"the :class:`~queue.Queue` class provides a featureful interface." msgstr "" -"Consultez la documentation du module pour plus de détails ; la classe :class:" -"`~queue.Queue` fournit une interface pleine de fonctionnalités." +"Consultez la documentation du module pour plus de détails ; la " +"classe :class:`~queue.Queue` fournit une interface pleine de fonctionnalités." #: faq/library.rst:363 msgid "What kinds of global value mutation are thread-safe?" @@ -535,16 +536,16 @@ msgstr "Les suivantes ne le sont pas ::" #: faq/library.rst:399 #, fuzzy msgid "" -"Operations that replace other objects may invoke those other objects' :meth:" -"`~object.__del__` method when their reference count reaches zero, and that " -"can affect things. This is especially true for the mass updates to " -"dictionaries and lists. When in doubt, use a mutex!" +"Operations that replace other objects may invoke those other " +"objects' :meth:`~object.__del__` method when their reference count reaches " +"zero, and that can affect things. This is especially true for the mass " +"updates to dictionaries and lists. When in doubt, use a mutex!" msgstr "" -"Les opérations qui remplacent d'autres objets peuvent invoquer la méthode :" -"meth:`__del__` de ces objets quand leur compteur de référence passe à zéro, " -"et cela peut avoir de l'impact. C'est tout particulièrement vrai pour les " -"changements massifs sur des dictionnaires ou des listes. En cas de doute, il " -"vaut mieux utiliser un mutex !" +"Les opérations qui remplacent d'autres objets peuvent invoquer la " +"méthode :meth:`__del__` de ces objets quand leur compteur de référence passe " +"à zéro, et cela peut avoir de l'impact. C'est tout particulièrement vrai " +"pour les changements massifs sur des dictionnaires ou des listes. En cas de " +"doute, il vaut mieux utiliser un mutex !" #: faq/library.rst:406 msgid "Can't we get rid of the Global Interpreter Lock?" @@ -624,8 +625,8 @@ msgid "" "Judicious use of C extensions will also help; if you use a C extension to " "perform a time-consuming task, the extension can release the GIL while the " "thread of execution is in the C code and allow other threads to get some " -"work done. Some standard library modules such as :mod:`zlib` and :mod:" -"`hashlib` already do this." +"work done. Some standard library modules such as :mod:`zlib` " +"and :mod:`hashlib` already do this." msgstr "" "Des extensions C appropriées peuvent aussi aider ; en utilisant une " "extension C pour effectuer une tâche longue, l'extension peut relâcher le " @@ -655,8 +656,9 @@ msgstr "Comment supprimer un fichier ? (et autres questions sur les fichiers… #: faq/library.rst:467 msgid "" "Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, " -"see the :mod:`os` module. The two functions are identical; :func:`~os." -"unlink` is simply the name of the Unix system call for this function." +"see the :mod:`os` module. The two functions are " +"identical; :func:`~os.unlink` is simply the name of the Unix system call for " +"this function." msgstr "" "Utilisez ``os.remove(filename)`` ou ``os.unlink(filename)`` ; pour la " "documentation, référez-vous au module :mod:`os`. Ces deux fonctions sont " @@ -686,24 +688,26 @@ msgstr "" msgid "" "To truncate a file, open it using ``f = open(filename, \"rb+\")``, and use " "``f.truncate(offset)``; offset defaults to the current seek position. " -"There's also ``os.ftruncate(fd, offset)`` for files opened with :func:`os." -"open`, where *fd* is the file descriptor (a small integer)." +"There's also ``os.ftruncate(fd, offset)`` for files opened " +"with :func:`os.open`, where *fd* is the file descriptor (a small integer)." msgstr "" "Pour supprimer le contenu d'un fichier, ouvrez celui-ci avec ``f = " "open(nom_du_fichier, \"rb+\")``, puis exécutez ``f.truncate(décalage)`` où " "*décalage* est par défaut la position actuelle de la tête de lecture. Il " -"existe aussi ``os.ftruncate(df, décalage)`` pour les fichiers ouverts avec :" -"func:`os.open`, où *df* est le descripteur de fichier (un entier court)." +"existe aussi ``os.ftruncate(df, décalage)`` pour les fichiers ouverts " +"avec :func:`os.open`, où *df* est le descripteur de fichier (un entier " +"court)." #: faq/library.rst:484 msgid "" "The :mod:`shutil` module also contains a number of functions to work on " -"files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" -"func:`~shutil.rmtree`." +"files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, " +"and :func:`~shutil.rmtree`." msgstr "" "Le module :mod:`shutil` propose aussi un grand nombre de fonctions pour " -"effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :" -"func:`~shutil.copytree` et :func:`~shutil.rmtree`." +"effectuer des opérations sur des fichiers " +"comme :func:`~shutil.copyfile`, :func:`~shutil.copytree` " +"et :func:`~shutil.rmtree`." #: faq/library.rst:490 msgid "How do I copy a file?" @@ -726,9 +730,9 @@ msgstr "Comment lire (ou écrire) des données binaires ?" #: faq/library.rst:505 msgid "" -"To read or write complex binary data formats, it's best to use the :mod:" -"`struct` module. It allows you to take a string containing binary data " -"(usually numbers) and convert it to Python objects; and vice versa." +"To read or write complex binary data formats, it's best to use " +"the :mod:`struct` module. It allows you to take a string containing binary " +"data (usually numbers) and convert it to Python objects; and vice versa." msgstr "" "Pour lire ou écrire des formats de données complexes en binaire, il est " "recommandé d'utiliser le module :mod:`struct`. Celui-ci permet de convertir " @@ -759,8 +763,8 @@ msgid "" "you can also use the :mod:`array` module." msgstr "" "Pour une donnée plus régulière (p. ex. une liste homogène d'entiers ou de " -"nombres à virgule flottante), il est possible d'utiliser le module :mod:" -"`array`." +"nombres à virgule flottante), il est possible d'utiliser le " +"module :mod:`array`." #: faq/library.rst:527 msgid "" @@ -770,60 +774,60 @@ msgid "" "will return :class:`str` objects rather than :class:`bytes` objects." msgstr "" "Pour lire et écrire de la donnée binaire, il est obligatoire d'ouvrir le " -"fichier en mode binaire également (ici, en passant ``\"rb\"`` à :func:" -"`open`). En utilisant ``\"r\"`` (valeur par défaut), le fichier est ouvert " -"en mode textuel et ``f.read()`` renvoie des objets :class:`str` au lieu " -"d'objets :class:`bytes`." +"fichier en mode binaire également (ici, en passant ``\"rb\"`` " +"à :func:`open`). En utilisant ``\"r\"`` (valeur par défaut), le fichier est " +"ouvert en mode textuel et ``f.read()`` renvoie des objets :class:`str` au " +"lieu d'objets :class:`bytes`." #: faq/library.rst:535 msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?" msgstr "" -"Il me semble impossible d'utiliser ``os.read()`` sur un tube créé avec ``os." -"popen()`` ; pourquoi ?" +"Il me semble impossible d'utiliser ``os.read()`` sur un tube créé avec " +"``os.popen()`` ; pourquoi ?" #: faq/library.rst:537 msgid "" ":func:`os.read` is a low-level function which takes a file descriptor, a " "small integer representing the opened file. :func:`os.popen` creates a high-" "level file object, the same type returned by the built-in :func:`open` " -"function. Thus, to read *n* bytes from a pipe *p* created with :func:`os." -"popen`, you need to use ``p.read(n)``." +"function. Thus, to read *n* bytes from a pipe *p* created " +"with :func:`os.popen`, you need to use ``p.read(n)``." msgstr "" ":func:`os.read` est une fonction de bas niveau qui prend en paramètre un " -"descripteur de fichier — un entier court qui représente le fichier ouvert. :" -"func:`os.popen` crée un objet fichier de haut niveau, du même type que celui " -"renvoyé par la fonction native :func:`open`. Par conséquent, pour lire *n* " -"octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p." -"read(n)``." +"descripteur de fichier — un entier court qui représente le fichier " +"ouvert. :func:`os.popen` crée un objet fichier de haut niveau, du même type " +"que celui renvoyé par la fonction native :func:`open`. Par conséquent, pour " +"lire *n* octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser " +"``p.read(n)``." -#: faq/library.rst:623 +#: faq/library.rst:545 msgid "How do I access the serial (RS232) port?" msgstr "Comment accéder au port de transmission en série (RS-232) ?" -#: faq/library.rst:625 +#: faq/library.rst:547 msgid "For Win32, OSX, Linux, BSD, Jython, IronPython:" msgstr "Pour Win32, OSX, Linux, BSD, Jython et IronPython :" -#: faq/library.rst:627 +#: faq/library.rst:549 msgid ":pypi:`pyserial`" msgstr "" -#: faq/library.rst:629 +#: faq/library.rst:551 msgid "For Unix, see a Usenet post by Mitch Chapman:" msgstr "" "Pour Unix, référez-vous à une publication sur Usenet de Mitch Chapman :" -#: faq/library.rst:631 +#: faq/library.rst:553 msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" -#: faq/library.rst:635 +#: faq/library.rst:557 msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" msgstr "" "Pourquoi fermer *sys.stdout*, *sys.stdin*, *sys.stderr* ne les ferme pas " "réellement ?" -#: faq/library.rst:637 +#: faq/library.rst:559 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." @@ -831,7 +835,7 @@ msgstr "" "Les :term:`objets fichiers ` en Python sont des abstractions de " "haut niveau sur les descripteurs de fichier C de bas niveau." -#: faq/library.rst:640 +#: faq/library.rst:562 msgid "" "For most file objects you create in Python via the built-in :func:`open` " "function, ``f.close()`` marks the Python file object as being closed from " @@ -839,13 +843,13 @@ msgid "" "descriptor. This also happens automatically in ``f``'s destructor, when " "``f`` becomes garbage." msgstr "" -"Pour la plupart des objets fichiers créés en Python avec la fonction native :" -"func:`open`, ``f.close()`` marque le fichier comme fermé du point de vue de " -"Python et ferme aussi le descripteur C sous-jacent. Le même mécanisme est " -"enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` est " -"recyclé." +"Pour la plupart des objets fichiers créés en Python avec la fonction " +"native :func:`open`, ``f.close()`` marque le fichier comme fermé du point de " +"vue de Python et ferme aussi le descripteur C sous-jacent. Le même mécanisme " +"est enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` " +"est recyclé." -#: faq/library.rst:646 +#: faq/library.rst:568 msgid "" "But stdin, stdout and stderr are treated specially by Python, because of the " "special status also given to them by C. Running ``sys.stdout.close()`` " @@ -853,11 +857,11 @@ msgid "" "associated C file descriptor." msgstr "" "Mais *stdin*, *stdout* et *stderr* ont droit à un traitement spécial en " -"Python, car leur statut en C est lui aussi spécial. Exécuter ``sys.stdout." -"close()`` marque l'objet fichier comme fermé du point de vue de Python, mais " -"le descripteur de fichier C associé n'est *pas* fermé." +"Python, car leur statut en C est lui aussi spécial. Exécuter " +"``sys.stdout.close()`` marque l'objet fichier comme fermé du point de vue de " +"Python, mais le descripteur de fichier C associé n'est *pas* fermé." -#: faq/library.rst:651 +#: faq/library.rst:573 msgid "" "To close the underlying C file descriptor for one of these three, you should " "first be sure that's what you really want to do (e.g., you may confuse " @@ -868,21 +872,21 @@ msgstr "" "exemple, perturber le bon fonctionnement de modules qui font des opérations " "d'entrée-sortie). Si c'est le cas, utilisez :func:`os.close` ::" -#: faq/library.rst:659 +#: faq/library.rst:581 msgid "Or you can use the numeric constants 0, 1 and 2, respectively." msgstr "" "Il est aussi possible de fermer respectivement les constantes numériques 0, " "1 ou 2." -#: faq/library.rst:663 +#: faq/library.rst:585 msgid "Network/Internet Programming" msgstr "Programmation réseau et Internet" -#: faq/library.rst:666 +#: faq/library.rst:588 msgid "What WWW tools are there for Python?" msgstr "Quels sont les outils Python dédiés à au web ?" -#: faq/library.rst:668 +#: faq/library.rst:590 msgid "" "See the chapters titled :ref:`internet` and :ref:`netdata` in the Library " "Reference Manual. Python has many modules that will help you build server-" @@ -892,7 +896,7 @@ msgstr "" "le manuel de référence de la bibliothèque. Python a de nombreux modules pour " "construire des applications web côté client comme côté serveur." -#: faq/library.rst:674 +#: faq/library.rst:596 msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" "wiki.python.org/moin/WebProgramming\\ ." @@ -900,11 +904,11 @@ msgstr "" "Un résumé des cadriciels disponibles est maintenu par Paul Boddie à " "l'adresse https://wiki.python.org/moin/WebProgramming\\ ." -#: faq/library.rst:679 +#: faq/library.rst:601 msgid "What module should I use to help with generating HTML?" msgstr "Quel module utiliser pour générer du HTML ?" -#: faq/library.rst:683 +#: faq/library.rst:605 msgid "" "You can find a collection of useful links on the `Web Programming wiki page " "`_." @@ -912,15 +916,15 @@ msgstr "" "La `page wiki de la programmation web `_ (en anglais) répertorie un ensemble de liens pertinents." -#: faq/library.rst:688 +#: faq/library.rst:610 msgid "How do I send mail from a Python script?" msgstr "Comment envoyer un courriel avec un script Python ?" -#: faq/library.rst:690 +#: faq/library.rst:612 msgid "Use the standard library module :mod:`smtplib`." msgstr "Utilisez le module :mod:`smtplib` de la bibliothèque standard." -#: faq/library.rst:692 +#: faq/library.rst:614 msgid "" "Here's a very simple interactive mail sender that uses it. This method will " "work on any host that supports an SMTP listener. ::" @@ -928,7 +932,7 @@ msgstr "" "Voici un exemple très simple d'un envoyeur de courriel qui l'utilise. Cette " "méthode fonctionne sur tous les serveurs qui implémentent SMTP. ::" -#: faq/library.rst:712 +#: faq/library.rst:634 msgid "" "A Unix-only alternative uses sendmail. The location of the sendmail program " "varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/" @@ -940,13 +944,13 @@ msgstr "" "sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut " "vous aider. Par exemple ::" -#: faq/library.rst:732 +#: faq/library.rst:654 msgid "How do I avoid blocking in the connect() method of a socket?" msgstr "" "Comment éviter de bloquer dans la méthode ``connect()`` d'un connecteur " "réseau ?" -#: faq/library.rst:734 +#: faq/library.rst:656 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." @@ -954,7 +958,7 @@ msgstr "" "Le module :mod:`select` est fréquemment utilisé pour effectuer des entrées-" "sorties asynchrones sur des connecteurs réseaux." -#: faq/library.rst:737 +#: faq/library.rst:659 #, fuzzy msgid "" "To prevent the TCP connect from blocking, you can set the socket to non-" @@ -966,30 +970,31 @@ msgid "" "your system." msgstr "" "Pour empêcher une connexion TCP de se bloquer, il est possible de mettre le " -"connecteur en mode lecture seule. Avec cela, au moment du :meth:`socket." -"connect`, la connexion pourra être immédiate (peu probable) ou bien vous " -"obtiendrez une exception qui contient le numéro d'erreur dans ``.errno``. " -"``errno.EINPROGRESS`` indique que la connexion est en cours, mais qu'elle " -"n'a pas encore aboutie. La valeur dépend du système d'exploitation, donc " -"renseignez-vous sur la valeur utilisée par votre système." - -#: faq/library.rst:745 +"connecteur en mode lecture seule. Avec cela, au moment " +"du :meth:`socket.connect`, la connexion pourra être immédiate (peu probable) " +"ou bien vous obtiendrez une exception qui contient le numéro d'erreur dans " +"``.errno``. ``errno.EINPROGRESS`` indique que la connexion est en cours, " +"mais qu'elle n'a pas encore aboutie. La valeur dépend du système " +"d'exploitation, donc renseignez-vous sur la valeur utilisée par votre " +"système." + +#: faq/library.rst:667 #, fuzzy msgid "" "You can use the :meth:`~socket.socket.connect_ex` method to avoid creating " -"an exception. It will just return the errno value. To poll, you can call :" -"meth:`~socket.socket.connect_ex` again later -- ``0`` or ``errno.EISCONN`` " -"indicate that you're connected -- or you can pass this socket to :meth:" -"`select.select` to check if it's writable." +"an exception. It will just return the errno value. To poll, you can " +"call :meth:`~socket.socket.connect_ex` again later -- ``0`` or " +"``errno.EISCONN`` indicate that you're connected -- or you can pass this " +"socket to :meth:`select.select` to check if it's writable." msgstr "" ":meth:`socket.connect_ex` permet d'éviter la création de l'exception, et de " "ne renvoyer que la valeur de *errno*. Pour vérifier l'état de la connexion, " -"utilisez encore une fois :meth:`socket.connect_ex` — ``0`` ou ``errno." -"EISCONN`` indiquent que la connexion est active — ou passez le connecteur en " -"argument de :meth:`select.select` pour vérifier si le connecteur est prêt à " -"recevoir des entrées." +"utilisez encore une fois :meth:`socket.connect_ex` — ``0`` ou " +"``errno.EISCONN`` indiquent que la connexion est active — ou passez le " +"connecteur en argument de :meth:`select.select` pour vérifier si le " +"connecteur est prêt à recevoir des entrées." -#: faq/library.rst:753 +#: faq/library.rst:675 #, fuzzy msgid "" "The :mod:`asyncio` module provides a general purpose single-threaded and " @@ -1002,32 +1007,32 @@ msgstr "" "`Twisted `_ en est une alternative " "plébiscitée, avec un grand nombre de fonctionnalités." -#: faq/library.rst:761 +#: faq/library.rst:683 msgid "Databases" msgstr "Bases de données" -#: faq/library.rst:764 +#: faq/library.rst:686 msgid "Are there any interfaces to database packages in Python?" msgstr "" "Existe-t-il des modules Python pour s'interfacer avec des bases de données ?" -#: faq/library.rst:766 +#: faq/library.rst:688 msgid "Yes." msgstr "Oui." -#: faq/library.rst:768 +#: faq/library.rst:690 msgid "" "Interfaces to disk-based hashes such as :mod:`DBM ` and :mod:`GDBM " -"` are also included with standard Python. There is also the :mod:" -"`sqlite3` module, which provides a lightweight disk-based relational " -"database." +"` are also included with standard Python. There is also " +"the :mod:`sqlite3` module, which provides a lightweight disk-based " +"relational database." msgstr "" "La distribution standard de Python fournit aussi des interfaces à des bases " "de données comme :mod:`DBM ` ou :mod:`GDBM `. Il existe " "aussi le module :mod:`sqlite3` qui implémente une base de données " "relationnelle légère sur disque." -#: faq/library.rst:773 +#: faq/library.rst:695 msgid "" "Support for most relational databases is available. See the " "`DatabaseProgramming wiki page `_ pour plus de détails." -#: faq/library.rst:779 +#: faq/library.rst:701 msgid "How do you implement persistent objects in Python?" msgstr "Comment implémenter la persistance d'objets en Python ?" -#: faq/library.rst:781 +#: faq/library.rst:703 msgid "" "The :mod:`pickle` library module solves this in a very general way (though " -"you still can't store things like open files, sockets or windows), and the :" -"mod:`shelve` library module uses pickle and (g)dbm to create persistent " +"you still can't store things like open files, sockets or windows), and " +"the :mod:`shelve` library module uses pickle and (g)dbm to create persistent " "mappings containing arbitrary Python objects." msgstr "" "Le module :mod:`pickle` répond à cela de manière large (bien qu'il ne soit " @@ -1053,15 +1058,15 @@ msgstr "" "fenêtres par exemple), et le module :mod:`shelve` de la bibliothèque utilise " "*pickle* et *(g)dbm* pour créer des liens persistants vers des objets Python." -#: faq/library.rst:788 +#: faq/library.rst:710 msgid "Mathematics and Numerics" msgstr "Mathématiques et calcul numérique" -#: faq/library.rst:791 +#: faq/library.rst:713 msgid "How do I generate random numbers in Python?" msgstr "Comment générer des nombres aléatoires en Python ?" -#: faq/library.rst:793 +#: faq/library.rst:715 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" @@ -1069,50 +1074,50 @@ msgstr "" "Le module :mod:`random` de la bibliothèque standard comprend un générateur " "de nombres aléatoires. Son utilisation est simple ::" -#: faq/library.rst:799 +#: faq/library.rst:721 #, fuzzy msgid "This returns a random floating-point number in the range [0, 1)." msgstr "" "Le code précédent renvoie un nombre à virgule flottante aléatoire dans " "l'intervalle [0, 1[." -#: faq/library.rst:801 +#: faq/library.rst:723 msgid "" "There are also many other specialized generators in this module, such as:" msgstr "Ce module fournit beaucoup d'autres générateurs spécialisés comme :" -#: faq/library.rst:803 +#: faq/library.rst:725 msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." msgstr "``randrange(a, b)`` génère un entier dans l'intervalle [a, b[." -#: faq/library.rst:804 +#: faq/library.rst:726 #, fuzzy msgid "``uniform(a, b)`` chooses a floating-point number in the range [a, b)." msgstr "" "``uniform(a, b)`` génère un nombre à virgule flottante aléatoire dans " "l'intervalle [a, b[." -#: faq/library.rst:805 +#: faq/library.rst:727 msgid "" "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." msgstr "``normalvariate(mean, sdev)`` simule la loi normale (Gaussienne)." -#: faq/library.rst:807 +#: faq/library.rst:729 msgid "Some higher-level functions operate on sequences directly, such as:" msgstr "" "Des fonctions de haut niveau opèrent directement sur des séquences comme :" -#: faq/library.rst:809 +#: faq/library.rst:731 msgid "``choice(S)`` chooses a random element from a given sequence." msgstr "``choice(S)`` sélectionne au hasard un élément d'une séquence donnée." -#: faq/library.rst:810 +#: faq/library.rst:732 msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly." msgstr "" "``shuffle(L)`` mélange une liste en-place, c.-à-d. lui applique une " "permutation aléatoire." -#: faq/library.rst:812 +#: faq/library.rst:734 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." @@ -1162,8 +1167,8 @@ msgstr "" #~ msgid "" #~ "Cameron Laird maintains a useful set of pages about Python web " -#~ "technologies at https://web.archive.org/web/20210224183619/http://phaseit." -#~ "net/claird/comp.lang.python/web_python." +#~ "technologies at https://web.archive.org/web/20210224183619/http://" +#~ "phaseit.net/claird/comp.lang.python/web_python." #~ msgstr "" #~ "Cameron Laird maintient un ensemble intéressant d'articles sur les " #~ "technologies Python dédiées au web à l'adresse https://web.archive.org/" diff --git a/faq/programming.po b/faq/programming.po index d900bbba8..526fd321c 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-08 12:37+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -24,28 +24,29 @@ msgid "Contents" msgstr "Sommaire" #: faq/programming.rst:12 -msgid "General Questions" +#, fuzzy +msgid "General questions" msgstr "Questions générales" #: faq/programming.rst:15 +#, fuzzy msgid "" -"Is there a source code level debugger with breakpoints, single-stepping, " -"etc.?" +"Is there a source code-level debugger with breakpoints and single-stepping?" msgstr "" "Existe-t-il un débogueur de code source avec points d'arrêts, exécution pas-" "à-pas, etc. ?" -#: faq/programming.rst:58 +#: faq/programming.rst:56 msgid "Yes." msgstr "Oui." #: faq/programming.rst:19 msgid "" -"Several debuggers for Python are described below, and the built-in function :" -"func:`breakpoint` allows you to drop into any of them." +"Several debuggers for Python are described below, and the built-in " +"function :func:`breakpoint` allows you to drop into any of them." msgstr "" -"Plusieurs débogueurs sont décrits ci-dessous et la fonction native :func:" -"`breakpoint` permet d'utiliser n'importe lequel d'entre eux." +"Plusieurs débogueurs sont décrits ci-dessous et la fonction " +"native :func:`breakpoint` permet d'utiliser n'importe lequel d'entre eux." #: faq/programming.rst:22 msgid "" @@ -60,10 +61,10 @@ msgstr "" "pouvez vous inspirer du code de ``pdb`` pour écrire votre propre débogueur." #: faq/programming.rst:27 +#, fuzzy msgid "" "The IDLE interactive development environment, which is part of the standard " -"Python distribution (normally available as `Tools/scripts/idle3 `_), includes a " +"Python distribution (normally available as :mod:`idlelib`), includes a " "graphical debugger." msgstr "" "L'environnement de développement interactif IDLE, qui est fourni avec la " @@ -71,7 +72,7 @@ msgstr "" "idle3 `_) " "contient un débogueur graphique." -#: faq/programming.rst:32 +#: faq/programming.rst:31 msgid "" "PythonWin is a Python IDE that includes a GUI debugger based on pdb. The " "PythonWin debugger colors breakpoints and has quite a few cool features such " @@ -88,7 +89,7 @@ msgstr "" "github.com/mhammond/pywin32>`_ et fait partie de la distribution " "`ActivePython `_." -#: faq/programming.rst:39 +#: faq/programming.rst:38 msgid "" "`Eric `_ is an IDE built on PyQt and " "the Scintilla editing component." @@ -96,7 +97,7 @@ msgstr "" "`Eric `_ est un EDI basé sur PyQt et " "l'outil d'édition Scintilla." -#: faq/programming.rst:42 +#: faq/programming.rst:41 msgid "" "`trepan3k `_ is a gdb-like " "debugger." @@ -104,7 +105,7 @@ msgstr "" "`trepan3k `_ est un débogueur " "semblable à GDB." -#: faq/programming.rst:44 +#: faq/programming.rst:43 msgid "" "`Visual Studio Code `_ is an IDE with " "debugging tools that integrates with version-control software." @@ -113,7 +114,7 @@ msgstr "" "contient des outils de débogage. Il sait interagir avec les outils de " "gestion de versions." -#: faq/programming.rst:47 +#: faq/programming.rst:46 msgid "" "There are a number of commercial Python IDEs that include graphical " "debuggers. They include:" @@ -121,40 +122,38 @@ msgstr "" "Il existe de nombreux EDI Python propriétaires qui embarquent un débogueur " "graphique, notamment :" -#: faq/programming.rst:50 +#: faq/programming.rst:49 msgid "`Wing IDE `_" msgstr "`Wing IDE `_ ;" -#: faq/programming.rst:51 -msgid "`Komodo IDE `_" -msgstr "`Komodo IDE `_ ;" - -#: faq/programming.rst:52 +#: faq/programming.rst:50 msgid "`PyCharm `_" msgstr "`PyCharm `_ ;" -#: faq/programming.rst:56 +#: faq/programming.rst:54 msgid "Are there tools to help find bugs or perform static analysis?" msgstr "" "Existe-t-il des outils pour aider à trouver des bogues ou faire de l'analyse " "statique de code ?" -#: faq/programming.rst:60 +#: faq/programming.rst:58 +#, fuzzy msgid "" -"`Pylint `_ and `Pyflakes " -"`_ do basic checking that will help you " -"catch bugs sooner." +"`Ruff `__, `Pylint `__ and `Pyflakes `__ do basic checking that will help you catch bugs sooner." msgstr "" "`Pylint `_ et `Pyflakes " "`_ font des vérifications de base et vous " "aideront à trouver des bogues plus tôt." -#: faq/programming.rst:64 +#: faq/programming.rst:63 #, fuzzy msgid "" -"Static type checkers such as `Mypy `_, `Pyre " -"`_, and `Pytype `_ can check type hints in Python source code." +"Static type checkers such as `mypy `__, `ty `__, `Pyrefly `__, and `pytype " +"`__ can check type hints in Python source " +"code." msgstr "" "Les vérificateurs statiques de typage comme `Mypy `_, " "`Pyre `_, et `Pytype `_. It converts Python byte code to C arrays; with a C compiler you " -"can embed all your modules into a new program, which is then linked with the " -"standard Python modules." +"as :source:`Tools/freeze`. It converts Python byte code to C arrays; with a " +"C compiler you can embed all your modules into a new program, which is then " +"linked with the standard Python modules." msgstr "" "Un de ces outils est *freeze*, qui se trouve dans `Tools/freeze `_ de l'arborescence des " @@ -259,13 +258,13 @@ msgstr "" msgid "`py2exe `_ (Windows only)" msgstr "`py2exe `_ (uniquement pour Windows)." -#: faq/programming.rst:107 +#: faq/programming.rst:108 msgid "Are there coding standards or a style guide for Python programs?" msgstr "" "Existe-t-il des normes de développement ou un guide de style pour écrire des " "programmes Python ?" -#: faq/programming.rst:109 +#: faq/programming.rst:110 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." @@ -273,16 +272,17 @@ msgstr "" "Oui. Le style de développement que les modules de la bibliothèque standard " "doivent obligatoirement respecter est documenté dans la :pep:`8`." -#: faq/programming.rst:114 -msgid "Core Language" +#: faq/programming.rst:115 +#, fuzzy +msgid "Core language" msgstr "Fondamentaux" -#: faq/programming.rst:119 +#: faq/programming.rst:120 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "" "Pourquoi une UnboundLocalError est levée alors qu'une variable a une valeur ?" -#: faq/programming.rst:121 +#: faq/programming.rst:122 msgid "" "It can be a surprise to get the :exc:`UnboundLocalError` in previously " "working code when it is modified by adding an assignment statement somewhere " @@ -292,20 +292,20 @@ msgstr "" "code jusqu'à présent correct, quand celui-ci est modifié en ajoutant une " "instruction d'affectation quelque part dans le corps d'une fonction." -#: faq/programming.rst:125 +#: faq/programming.rst:126 msgid "This code:" msgstr "Le code suivant :" -#: faq/programming.rst:134 +#: faq/programming.rst:135 msgid "works, but this code:" msgstr "fonctionne, mais le suivant :" -#: faq/programming.rst:141 +#: faq/programming.rst:142 #, fuzzy msgid "results in an :exc:`!UnboundLocalError`:" msgstr "lève une UnboundLocalError :" -#: faq/programming.rst:148 +#: faq/programming.rst:149 msgid "" "This is because when you make an assignment to a variable in a scope, that " "variable becomes local to that scope and shadows any similarly named " @@ -321,7 +321,7 @@ msgstr "" "nouvelle variable. Par conséquent, quand le ``print(x)`` essaye d'afficher " "la variable non initialisée, une erreur se produit." -#: faq/programming.rst:155 +#: faq/programming.rst:156 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" @@ -329,7 +329,7 @@ msgstr "" "Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " "en la déclarant globale :" -#: faq/programming.rst:167 +#: faq/programming.rst:168 msgid "" "This explicit declaration is required in order to remind you that (unlike " "the superficially analogous situation with class and instance variables) you " @@ -340,20 +340,20 @@ msgstr "" "d'instance), c'est la valeur de la variable du contexte appelant qui est " "modifiée :" -#: faq/programming.rst:174 +#: faq/programming.rst:175 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" msgstr "" -"Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" -"keyword:`nonlocal` :" +"Une alternative dans un contexte imbriqué consiste à utiliser le mot-" +"clé :keyword:`nonlocal` :" -#: faq/programming.rst:192 +#: faq/programming.rst:193 msgid "What are the rules for local and global variables in Python?" msgstr "" "Quelles sont les règles pour les variables locales et globales en Python ?" -#: faq/programming.rst:194 +#: faq/programming.rst:195 msgid "" "In Python, variables that are only referenced inside a function are " "implicitly global. If a variable is assigned a value anywhere within the " @@ -365,7 +365,7 @@ msgstr "" "valeur lui est affectée, elle est considérée locale (sauf si elle est " "explicitement déclarée globale)." -#: faq/programming.rst:198 +#: faq/programming.rst:199 msgid "" "Though a bit surprising at first, a moment's consideration explains this. " "On one hand, requiring :keyword:`global` for assigned variables provides a " @@ -384,7 +384,7 @@ msgstr "" "importé. Le codé serait alors truffé de déclarations ``global``, ce qui " "nuirait à leur raison d'être : identifier les effets de bords." -#: faq/programming.rst:208 +#: faq/programming.rst:209 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" @@ -392,15 +392,16 @@ msgstr "" "Pourquoi des expressions lambda définies dans une boucle avec des valeurs " "différentes retournent-elles le même résultat ?" -#: faq/programming.rst:210 +#: faq/programming.rst:211 +#, fuzzy msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " -"functions), e.g.::" +"functions), for example::" msgstr "" "Supposons que l'on utilise une boucle itérative pour définir des expressions " "lambda (voire des fonctions) différentes, par exemple ::" -#: faq/programming.rst:217 +#: faq/programming.rst:218 msgid "" "This gives you a list that contains 5 lambdas that calculate ``x**2``. You " "might expect that, when called, they would return, respectively, ``0``, " @@ -411,13 +412,15 @@ msgstr "" "chacune ``x**2``. En les exécutant, on pourrait s'attendre à obtenir ``0``, " "``1``, ``4``, ``9`` et ``16``. Elles renvoient en réalité toutes ``16`` ::" -#: faq/programming.rst:227 +#: faq/programming.rst:228 +#, fuzzy msgid "" "This happens because ``x`` is not local to the lambdas, but is defined in " "the outer scope, and it is accessed when the lambda is called --- not when " "it is defined. At the end of the loop, the value of ``x`` is ``4``, so all " -"the functions now return ``4**2``, i.e. ``16``. You can also verify this by " -"changing the value of ``x`` and see how the results of the lambdas change::" +"the functions now return ``4**2``, that is ``16``. You can also verify this " +"by changing the value of ``x`` and see how the results of the lambdas " +"change::" msgstr "" "Ceci s'explique par le fait que ``x`` n'est pas une variable locale aux " "expressions, mais est définie dans le contexte appelant. Elle est lue à " @@ -426,7 +429,7 @@ msgstr "" "renvoient ``4*2``, c.-à-d. ``16``. Ceci se vérifie également en changeant la " "valeur de ``x`` et en constatant que les résultats sont modifiés ::" -#: faq/programming.rst:237 +#: faq/programming.rst:238 msgid "" "In order to avoid this, you need to save the values in variables local to " "the lambdas, so that they don't rely on the value of the global ``x``::" @@ -435,7 +438,7 @@ msgstr "" "variables locales aux expressions lambda pour que celles-ci ne se basent " "plus sur la variable globale ``x`` ::" -#: faq/programming.rst:244 +#: faq/programming.rst:245 msgid "" "Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed " "when the lambda is defined so that it has the same value that ``x`` had at " @@ -450,7 +453,7 @@ msgstr "" "troisième et ainsi de suite. Chaque expression lambda renvoie donc le " "résultat correct ::" -#: faq/programming.rst:255 +#: faq/programming.rst:256 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." @@ -458,11 +461,11 @@ msgstr "" "Ce comportement n'est pas propre aux expressions lambda, mais s'applique " "aussi aux fonctions normales." -#: faq/programming.rst:260 +#: faq/programming.rst:261 msgid "How do I share global variables across modules?" msgstr "Comment partager des variables globales entre modules ?" -#: faq/programming.rst:262 +#: faq/programming.rst:263 msgid "" "The canonical way to share information across modules within a single " "program is to create a special module (often called config or cfg). Just " @@ -478,19 +481,19 @@ msgstr "" "de chaque module, tout changement dans l'instance est propagé partout. Par " "exemple :" -#: faq/programming.rst:268 +#: faq/programming.rst:269 msgid "config.py::" msgstr "*config.py* ::" -#: faq/programming.rst:272 +#: faq/programming.rst:273 msgid "mod.py::" msgstr "*mod.py* ::" -#: faq/programming.rst:277 +#: faq/programming.rst:278 msgid "main.py::" msgstr "*main.py* ::" -#: faq/programming.rst:283 +#: faq/programming.rst:284 msgid "" "Note that using a module is also the basis for implementing the singleton " "design pattern, for the same reason." @@ -498,12 +501,12 @@ msgstr "" "Pour les mêmes raisons, l'utilisation d'un module est aussi à la base de " "l'implémentation du patron de conception singleton." -#: faq/programming.rst:288 +#: faq/programming.rst:289 msgid "What are the \"best practices\" for using import in a module?" msgstr "" "Quelles sont les « bonnes pratiques » pour utiliser import dans un module ?" -#: faq/programming.rst:290 +#: faq/programming.rst:291 msgid "" "In general, don't use ``from modulename import *``. Doing so clutters the " "importer's namespace, and makes it much harder for linters to detect " @@ -513,7 +516,7 @@ msgstr "" "encombre l'espace de nommage de l'importateur et rend la détection de noms " "non-définis beaucoup plus ardue pour les analyseurs de code." -#: faq/programming.rst:294 +#: faq/programming.rst:295 msgid "" "Import modules at the top of a file. Doing so makes it clear what other " "modules your code requires and avoids questions of whether the module name " @@ -526,32 +529,34 @@ msgstr "" "ligne rend l'ajout et la suppression d'une importation de module plus aisé, " "mais importer plusieurs modules sur une même ligne prend moins d'espace." -#: faq/programming.rst:299 +#: faq/programming.rst:300 msgid "It's good practice if you import modules in the following order:" msgstr "Il est recommandé d'importer les modules dans l'ordre suivant :" -#: faq/programming.rst:301 +#: faq/programming.rst:302 +#, fuzzy msgid "" -"standard library modules -- e.g. :mod:`sys`, :mod:`os`, :mod:`argparse`, :" -"mod:`re`" +"standard library modules -- such " +"as :mod:`sys`, :mod:`os`, :mod:`argparse`, :mod:`re`" msgstr "" -"les modules de la bibliothèque standard — p. ex. :mod:`sys`, :mod:`os`, :mod:" -"`getopt`, :mod:`re`" +"les modules de la bibliothèque standard — p. " +"ex. :mod:`sys`, :mod:`os`, :mod:`getopt`, :mod:`re`" -#: faq/programming.rst:302 +#: faq/programming.rst:303 +#, fuzzy msgid "" "third-party library modules (anything installed in Python's site-packages " -"directory) -- e.g. :mod:`!dateutil`, :mod:`!requests`, :mod:`!PIL.Image`" +"directory) -- such as :pypi:`dateutil`, :pypi:`requests`, :pypi:`tzdata`" msgstr "" "les modules externes (tout ce qui est installé dans le dossier *site-" -"packages* de Python) — par exemple :mod:`!dateutil`, :mod:`!requests`, :mod:" -"`!PIL.Image`" +"packages* de Python) — par exemple :mod:`!dateutil`, :mod:`!" +"requests`, :mod:`!PIL.Image`" -#: faq/programming.rst:304 +#: faq/programming.rst:305 msgid "locally developed modules" msgstr "les modules développés en local" -#: faq/programming.rst:306 +#: faq/programming.rst:307 msgid "" "It is sometimes necessary to move imports to a function or class to avoid " "problems with circular imports. Gordon McMillan says:" @@ -560,7 +565,7 @@ msgstr "" "une classe pour éviter les problèmes d'importations circulaires. Comme le " "souligne Gordon McMillan :" -#: faq/programming.rst:309 +#: faq/programming.rst:310 msgid "" "Circular imports are fine where both modules use the \"import \" " "form of import. They fail when the 2nd module wants to grab a name out of " @@ -575,7 +580,7 @@ msgstr "" "fichier. Les noms du premier module ne sont en effet pas encore disponibles " "car le premier module est occupé à importer le second." -#: faq/programming.rst:315 +#: faq/programming.rst:316 msgid "" "In this case, if the second module is only used in one function, then the " "import can easily be moved into that function. By the time the import is " @@ -587,7 +592,7 @@ msgstr "" "où l'importation sera appelée, le premier module aura fini de s'initialiser " "et le second pourra faire son importation." -#: faq/programming.rst:320 +#: faq/programming.rst:321 msgid "" "It may also be necessary to move imports out of the top level of code if " "some of the modules are platform-specific. In that case, it may not even be " @@ -602,7 +607,7 @@ msgstr "" "recommandé d'importer les modules adéquats dans le code spécifique à la " "machine." -#: faq/programming.rst:325 +#: faq/programming.rst:326 msgid "" "Only move imports into a local scope, such as inside a function definition, " "if it's necessary to solve a problem such as avoiding a circular import or " @@ -628,11 +633,11 @@ msgstr "" "dictionnaire. Même si le nom du module est sorti du contexte courant, le " "module est probablement disponible dans :data:`sys.modules`." -#: faq/programming.rst:338 +#: faq/programming.rst:339 msgid "Why are default values shared between objects?" msgstr "Pourquoi les arguments par défaut sont-ils partagés entre les objets ?" -#: faq/programming.rst:340 +#: faq/programming.rst:341 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" @@ -640,7 +645,7 @@ msgstr "" "C'est un problème que rencontrent souvent les programmeurs débutants. " "Examinons la fonction suivante ::" -#: faq/programming.rst:347 +#: faq/programming.rst:348 msgid "" "The first time you call this function, ``mydict`` contains a single item. " "The second time, ``mydict`` contains two items because when ``foo()`` begins " @@ -650,7 +655,7 @@ msgstr "" "élément. Au second appel, ``mydict`` contient deux éléments car quand " "``foo()`` commence son exécution, ``mydict`` contient déjà un élément." -#: faq/programming.rst:351 +#: faq/programming.rst:352 msgid "" "It is often expected that a function call creates new objects for default " "values. This is not what happens. Default values are created exactly once, " @@ -664,7 +669,7 @@ msgstr "" "définie. Si l'objet est modifié, comme le dictionnaire dans cet exemple, les " "appels suivants à cette fonction font référence à l'objet ainsi modifié." -#: faq/programming.rst:356 +#: faq/programming.rst:357 msgid "" "By definition, immutable objects such as numbers, strings, tuples, and " "``None``, are safe from change. Changes to mutable objects such as " @@ -675,7 +680,7 @@ msgstr "" "sur des objets modifiables comme les dictionnaires, les listes et les " "instances de classe peuvent porter à confusion." -#: faq/programming.rst:360 +#: faq/programming.rst:361 msgid "" "Because of this feature, it is good programming practice to not use mutable " "objects as default values. Instead, use ``None`` as the default value and " @@ -688,11 +693,11 @@ msgstr "" "est à ``None`` et créer une nouvelle liste, dictionnaire ou autre, le cas " "échéant. Par exemple, il ne faut pas écrire ::" -#: faq/programming.rst:368 +#: faq/programming.rst:369 msgid "but::" msgstr "mais plutôt ::" -#: faq/programming.rst:374 +#: faq/programming.rst:375 msgid "" "This feature can be useful. When you have a function that's time-consuming " "to compute, a common technique is to cache the parameters and the resulting " @@ -706,7 +711,7 @@ msgstr "" "appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " "s'implémente de la manière suivante ::" -#: faq/programming.rst:389 +#: faq/programming.rst:390 msgid "" "You could use a global variable containing a dictionary instead of the " "default value; it's a matter of taste." @@ -714,13 +719,13 @@ msgstr "" "Il est possible d'utiliser une variable globale contenant un dictionnaire à " "la place de la valeur par défaut ; ce n'est qu'une question de goût." -#: faq/programming.rst:394 +#: faq/programming.rst:395 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" "Comment passer des paramètres optionnels ou nommés d'une fonction à l'autre ?" -#: faq/programming.rst:396 +#: faq/programming.rst:397 msgid "" "Collect the arguments using the ``*`` and ``**`` specifiers in the " "function's parameter list; this gives you the positional arguments as a " @@ -733,17 +738,17 @@ msgstr "" "de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " "utilisant ``*`` et ``**`` ::" -#: faq/programming.rst:415 +#: faq/programming.rst:416 msgid "What is the difference between arguments and parameters?" msgstr "Quelle est la différence entre les arguments et les paramètres ?" -#: faq/programming.rst:417 +#: faq/programming.rst:418 msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " -"actually passed to a function when calling it. Parameters define what :term:" -"`kind of arguments ` a function can accept. For example, given " -"the function definition::" +"actually passed to a function when calling it. Parameters define " +"what :term:`kind of arguments ` a function can accept. For " +"example, given the function definition::" msgstr "" "Les :term:`paramètres ` sont les noms qui apparaissent dans une " "définition de fonction, alors que les :term:`arguments ` sont les " @@ -751,7 +756,7 @@ msgstr "" "ci. Les paramètres définissent les :term:`types d'arguments ` " "qu'une fonction accepte. Ainsi, avec la définition de fonction suivante ::" -#: faq/programming.rst:426 +#: faq/programming.rst:427 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" @@ -759,30 +764,30 @@ msgstr "" "*foo*, *bar* et *kwargs* sont des paramètres de ``func``. Mais à l'appel de " "``func`` avec, par exemple ::" -#: faq/programming.rst:431 +#: faq/programming.rst:432 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "les valeurs ``42``, ``314``, et ``somevar`` sont des arguments." -#: faq/programming.rst:435 +#: faq/programming.rst:436 msgid "Why did changing list 'y' also change list 'x'?" msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" -#: faq/programming.rst:437 +#: faq/programming.rst:438 msgid "If you wrote code like::" msgstr "Si vous avez écrit du code comme ::" -#: faq/programming.rst:447 +#: faq/programming.rst:448 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" "vous vous demandez peut-être pourquoi l'ajout d'un élément à ``y`` a aussi " "changé ``x``." -#: faq/programming.rst:449 +#: faq/programming.rst:450 msgid "There are two factors that produce this result:" msgstr "Il y a deux raisons qui conduisent à ce comportement :" -#: faq/programming.rst:451 +#: faq/programming.rst:452 msgid "" "Variables are simply names that refer to objects. Doing ``y = x`` doesn't " "create a copy of the list -- it creates a new variable ``y`` that refers to " @@ -794,30 +799,30 @@ msgstr "" "variable ``y`` qui pointe sur le même objet que ``x``. Ceci signifie qu'il " "n'existe qu'un seul objet (la liste) auquel ``x`` et ``y`` font référence." -#: faq/programming.rst:455 +#: faq/programming.rst:456 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" "Les listes sont des :term:`mutable`, ce qui signifie que leur contenu peut " "être modifié." -#: faq/programming.rst:457 +#: faq/programming.rst:458 #, fuzzy msgid "" -"After the call to :meth:`!append`, the content of the mutable object has " -"changed from ``[]`` to ``[10]``. Since both the variables refer to the same " -"object, using either name accesses the modified value ``[10]``." +"After the call to :meth:`~sequence.append`, the content of the mutable " +"object has changed from ``[]`` to ``[10]``. Since both the variables refer " +"to the same object, using either name accesses the modified value ``[10]``." msgstr "" "Après l'appel de :meth:`~list.append`, le contenu de l'objet mutable est " "passé de ``[]`` à ``[10]``. Vu que les deux variables font référence au même " "objet, il est possible d'accéder à la valeur modifiée ``[10]`` avec chacun " "des noms." -#: faq/programming.rst:461 +#: faq/programming.rst:462 msgid "If we instead assign an immutable object to ``x``::" msgstr "Si au contraire, on affecte un objet immuable à ``x`` ::" -#: faq/programming.rst:471 +#: faq/programming.rst:472 msgid "" "we can see that in this case ``x`` and ``y`` are not equal anymore. This is " "because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " @@ -836,7 +841,7 @@ msgstr "" "(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " "``5``)." -#: faq/programming.rst:479 +#: faq/programming.rst:480 msgid "" "Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " "object, whereas superficially similar operations (for example ``y = y + " @@ -856,7 +861,7 @@ msgstr "" "obtenir une copie triée de ``y`` donne ``None``, ce qui conduit très souvent " "le programme à générer une erreur facile à diagnostiquer." -#: faq/programming.rst:488 +#: faq/programming.rst:489 msgid "" "However, there is one class of operations where the same operation sometimes " "has different behaviors with different types: the augmented assignment " @@ -872,33 +877,36 @@ msgstr "" "``a_list``, alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` " "créent de nouveaux objets)." -#: faq/programming.rst:495 +#: faq/programming.rst:496 msgid "In other words:" msgstr "En d'autres termes :" -#: faq/programming.rst:497 +#: faq/programming.rst:498 +#, fuzzy msgid "" -"If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " -"etc.), we can use some specific operations to mutate it and all the " -"variables that refer to it will see the change." +"If we have a mutable object (such " +"as :class:`list`, :class:`dict`, :class:`set`), we can use some specific " +"operations to mutate it and all the variables that refer to it will see the " +"change." msgstr "" -"Il est possible d'appliquer des opérations qui modifient un objet mutable (:" -"class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables qui " -"y font référence verront le changement." +"Il est possible d'appliquer des opérations qui modifient un objet mutable " +"(:class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables " +"qui y font référence verront le changement." -#: faq/programming.rst:500 +#: faq/programming.rst:501 +#, fuzzy msgid "" -"If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " -"etc.), all the variables that refer to it will always see the same value, " -"but operations that transform that value into a new value always return a " -"new object." +"If we have an immutable object (such " +"as :class:`str`, :class:`int`, :class:`tuple`), all the variables that refer " +"to it will always see the same value, but operations that transform that " +"value into a new value always return a new object." msgstr "" -"Toutes les variables qui font référence à un objet immuable (:class:`str`, :" -"class:`int`, :class:`tuple`, etc.) renvoient la même valeur, mais les " -"opérations qui transforment cette valeur en une nouvelle valeur renvoient " -"toujours un nouvel objet." +"Toutes les variables qui font référence à un objet immuable " +"(:class:`str`, :class:`int`, :class:`tuple`, etc.) renvoient la même valeur, " +"mais les opérations qui transforment cette valeur en une nouvelle valeur " +"renvoient toujours un nouvel objet." -#: faq/programming.rst:505 +#: faq/programming.rst:506 msgid "" "If you want to know if two variables refer to the same object or not, you " "can use the :keyword:`is` operator, or the built-in function :func:`id`." @@ -906,18 +914,19 @@ msgstr "" "L'opérateur :keyword:`is` ou la fonction native :func:`id` permettent de " "savoir si deux variables font référence au même objet." -#: faq/programming.rst:510 +#: faq/programming.rst:511 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" "Comment écrire une fonction qui modifie ses paramètres ? (passage par " "référence)" -#: faq/programming.rst:512 +#: faq/programming.rst:513 +#, fuzzy msgid "" "Remember that arguments are passed by assignment in Python. Since " "assignment just creates references to objects, there's no alias between an " -"argument name in the caller and callee, and so no call-by-reference per se. " -"You can achieve the desired effect in a number of ways." +"argument name in the caller and callee, and consequently no call-by-" +"reference. You can achieve the desired effect in a number of ways." msgstr "" "En Python, les arguments sont passés comme des affectations de variables. Vu " "qu'une affectation crée des références à des objets, il n'y a pas de lien " @@ -925,15 +934,15 @@ msgstr "" "de passage par référence en soi. Il y a cependant plusieurs façons d'en " "émuler un." -#: faq/programming.rst:517 +#: faq/programming.rst:518 msgid "By returning a tuple of the results::" msgstr "En renvoyant un *n*-uplet de résultats ::" -#: faq/programming.rst:528 +#: faq/programming.rst:529 msgid "This is almost always the clearest solution." msgstr "C'est presque toujours la meilleure solution." -#: faq/programming.rst:530 +#: faq/programming.rst:531 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" @@ -941,33 +950,33 @@ msgstr "" "des contextes à plusieurs fils d'exécution (elle n'est pas *thread-safe*), " "et n'est donc pas recommandée." -#: faq/programming.rst:532 +#: faq/programming.rst:533 msgid "By passing a mutable (changeable in-place) object::" msgstr "En passant un objet mutable (modifiable sur place) ::" -#: faq/programming.rst:543 +#: faq/programming.rst:544 msgid "By passing in a dictionary that gets mutated::" msgstr "En passant un dictionnaire, qui sera modifié ::" -#: faq/programming.rst:554 +#: faq/programming.rst:555 msgid "Or bundle up values in a class instance::" msgstr "Ou regrouper les valeurs dans une instance de classe ::" -#: faq/programming.rst:571 +#: faq/programming.rst:572 msgid "There's almost never a good reason to get this complicated." msgstr "Faire quelque chose d'aussi compliqué est rarement une bonne idée." -#: faq/programming.rst:573 +#: faq/programming.rst:574 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" "La meilleure option reste de renvoyer un *n*-uplet contenant les différents " "résultats." -#: faq/programming.rst:577 +#: faq/programming.rst:578 msgid "How do you make a higher order function in Python?" msgstr "Comment construire une fonction d'ordre supérieur en Python ?" -#: faq/programming.rst:579 +#: faq/programming.rst:580 msgid "" "You have two choices: you can use nested scopes or you can use callable " "objects. For example, suppose you wanted to define ``linear(a,b)`` which " @@ -979,19 +988,19 @@ msgstr "" "``linear(a, b)`` qui renvoie une fonction ``f(x)`` qui calcule la valeur " "``a*x+b``. En utilisant les portées imbriquées ::" -#: faq/programming.rst:588 +#: faq/programming.rst:589 msgid "Or using a callable object::" msgstr "Ou en utilisant un objet appelable ::" -#: faq/programming.rst:598 +#: faq/programming.rst:599 msgid "In both cases, ::" msgstr "Dans les deux cas ::" -#: faq/programming.rst:602 +#: faq/programming.rst:603 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "donne un objet appelable où ``taxes(10e6) == 0.3 * 10e6 + 2``." -#: faq/programming.rst:604 +#: faq/programming.rst:605 msgid "" "The callable object approach has the disadvantage that it is a bit slower " "and results in slightly longer code. However, note that a collection of " @@ -1002,11 +1011,11 @@ msgstr "" "collection d'objet appelables peuvent partager leurs signatures par " "héritage ::" -#: faq/programming.rst:613 +#: faq/programming.rst:614 msgid "Object can encapsulate state for several methods::" msgstr "Les objets peuvent encapsuler un état pour plusieurs méthodes ::" -#: faq/programming.rst:631 +#: faq/programming.rst:632 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." @@ -1014,11 +1023,11 @@ msgstr "" "Ici ``inc()``, ``dec()`` et ``reset()`` agissent comme des fonctions " "partageant une même variable compteur." -#: faq/programming.rst:636 +#: faq/programming.rst:637 msgid "How do I copy an object in Python?" msgstr "Comment copier un objet en Python ?" -#: faq/programming.rst:638 +#: faq/programming.rst:639 msgid "" "In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " "case. Not all objects can be copied, but most can." @@ -1026,37 +1035,38 @@ msgstr "" "En général, essayez :func:`copy.copy` ou :func:`copy.deepcopy`. Tous les " "objets ne peuvent pas être copiés, mais la plupart le peuvent." -#: faq/programming.rst:641 +#: faq/programming.rst:642 msgid "" -"Some objects can be copied more easily. Dictionaries have a :meth:`~dict." -"copy` method::" +"Some objects can be copied more easily. Dictionaries have " +"a :meth:`~dict.copy` method::" msgstr "" "Certains objets peuvent être copiés plus facilement que d'autres. Les " "dictionnaires ont une méthode :meth:`~dict.copy` ::" -#: faq/programming.rst:646 +#: faq/programming.rst:647 msgid "Sequences can be copied by slicing::" msgstr "Les séquences peuvent être copiées via la syntaxe des tranches ::" -#: faq/programming.rst:652 +#: faq/programming.rst:653 msgid "How can I find the methods or attributes of an object?" msgstr "Comment récupérer les méthodes ou les attributs d'un objet ?" -#: faq/programming.rst:654 +#: faq/programming.rst:655 msgid "" "For an instance ``x`` of a user-defined class, :func:`dir(x) ` returns " "an alphabetized list of the names containing the instance attributes and " "methods and attributes defined by its class." msgstr "" -"Pour une instance ``x`` d'une classe définie par un utilisateur, :func:" -"`dir(x) ` renvoie une liste alphabétique des noms contenants les " -"attributs de l'instance, et les attributs et méthodes définies par sa classe." +"Pour une instance ``x`` d'une classe définie par un " +"utilisateur, :func:`dir(x) ` renvoie une liste alphabétique des noms " +"contenants les attributs de l'instance, et les attributs et méthodes " +"définies par sa classe." -#: faq/programming.rst:660 +#: faq/programming.rst:661 msgid "How can my code discover the name of an object?" msgstr "Comment un code peut-il obtenir le nom d'un objet ?" -#: faq/programming.rst:662 +#: faq/programming.rst:663 msgid "" "Generally speaking, it can't, because objects don't really have names. " "Essentially, assignment always binds a name to a value; the same is true of " @@ -1069,7 +1079,7 @@ msgstr "" "différence près que, dans ce cas, la valeur est un appelable. Par exemple, " "dans le code suivant ::" -#: faq/programming.rst:678 +#: faq/programming.rst:679 msgid "" "Arguably the class has a name: even though it is bound to two names and " "invoked through the name ``B`` the created instance is still reported as an " @@ -1083,7 +1093,7 @@ msgstr "" "impossible de dire si le nom de l'instance est ``a`` ou ``b``, les deux noms " "étant attachés à la même valeur." -#: faq/programming.rst:683 +#: faq/programming.rst:684 msgid "" "Generally speaking it should not be necessary for your code to \"know the " "names\" of particular values. Unless you are deliberately writing " @@ -1095,7 +1105,7 @@ msgstr "" "en train d'écrire un programme introspectif, c'est souvent l'indication " "qu'un changement d'approche serait bénéfique." -#: faq/programming.rst:688 +#: faq/programming.rst:689 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" @@ -1103,7 +1113,7 @@ msgstr "" "Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " "analogie pour répondre à cette question :" -#: faq/programming.rst:691 +#: faq/programming.rst:692 msgid "" "The same way as you get the name of that cat you found on your porch: the " "cat (object) itself cannot tell you its name, and it doesn't really care -- " @@ -1115,7 +1125,7 @@ msgstr "" "­– alors le meilleur moyen de savoir comment il s'appelle est de demander à " "tous vos voisins (espaces de nommage) si c'est leur chat (objet)…" -#: faq/programming.rst:696 +#: faq/programming.rst:697 msgid "" "....and don't be surprised if you'll find that it's known by many names, or " "no name at all!" @@ -1123,16 +1133,16 @@ msgstr "" "…et ne soyez pas surpris si vous découvrez qu'il est connu sous plusieurs " "noms, ou s'il n'a pas de nom du tout !" -#: faq/programming.rst:701 +#: faq/programming.rst:702 msgid "What's up with the comma operator's precedence?" msgstr "Qu'en est-il de la précédence de l'opérateur virgule ?" -#: faq/programming.rst:703 +#: faq/programming.rst:704 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" "La virgule n'est pas un opérateur en Python. Observez le code suivant ::" -#: faq/programming.rst:708 +#: faq/programming.rst:709 msgid "" "Since the comma is not an operator, but a separator between expressions the " "above is evaluated as if you had entered::" @@ -1141,29 +1151,30 @@ msgstr "" "expressions, l'expression ci-dessus est évaluée de la même façon que si vous " "aviez écrit ::" -#: faq/programming.rst:713 +#: faq/programming.rst:714 msgid "not::" msgstr "et non ::" -#: faq/programming.rst:717 +#: faq/programming.rst:718 +#, fuzzy msgid "" -"The same is true of the various assignment operators (``=``, ``+=`` etc). " -"They are not truly operators but syntactic delimiters in assignment " +"The same is true of the various assignment operators (``=``, ``+=``, and so " +"on). They are not truly operators but syntactic delimiters in assignment " "statements." msgstr "" "Ceci est vrai pour tous les opérateurs d'affectation (``=``, ``+=`` etc). Ce " "ne sont pas vraiment des opérateurs mais plutôt des délimiteurs syntaxiques " "dans les instructions d'affectation." -#: faq/programming.rst:722 +#: faq/programming.rst:723 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "Existe-t-il un équivalent à l'opérateur ternaire « ?: » du C ?" -#: faq/programming.rst:724 +#: faq/programming.rst:725 msgid "Yes, there is. The syntax is as follows::" msgstr "Oui. Sa syntaxe est la suivante ::" -#: faq/programming.rst:731 +#: faq/programming.rst:732 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" @@ -1171,7 +1182,7 @@ msgstr "" "Avant l'introduction de cette syntaxe dans Python 2.5, il était courant " "d'utiliser les opérateurs de logique ::" -#: faq/programming.rst:736 +#: faq/programming.rst:737 msgid "" "However, this idiom is unsafe, as it can give wrong results when *on_true* " "has a false boolean value. Therefore, it is always better to use the ``... " @@ -1181,33 +1192,33 @@ msgstr "" "la valeur booléenne fausse. Il faut donc toujours utiliser la forme ``... " "if ... else ...``." -#: faq/programming.rst:742 +#: faq/programming.rst:743 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" "Est-il possible d'écrire des programmes obscurcis (*obfuscated*) d'une ligne " "en Python ?" -#: faq/programming.rst:744 +#: faq/programming.rst:745 msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" "lambda`. See the following three examples, slightly adapted from Ulf " "Bartelt::" msgstr "" -"Oui. C'est souvent le cas en imbriquant des :keyword:`lambda` dans des :" -"keyword:`!lambda`. Par exemple les trois morceaux de code suivants, " +"Oui. C'est souvent le cas en imbriquant des :keyword:`lambda` dans " +"des :keyword:`!lambda`. Par exemple les trois morceaux de code suivants, " "légèrement adaptés par Ulf Bartelt ::" -#: faq/programming.rst:771 +#: faq/programming.rst:772 msgid "Don't try this at home, kids!" msgstr "Les enfants, ne faites pas ça chez vous !" -#: faq/programming.rst:777 +#: faq/programming.rst:778 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" "Que signifie la barre oblique (/) dans la liste des paramètres d'une " "fonction ?" -#: faq/programming.rst:779 +#: faq/programming.rst:780 msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " @@ -1225,7 +1236,7 @@ msgstr "" "que des paramètres uniquement positionnels. Sa documentation est la " "suivante ::" -#: faq/programming.rst:792 +#: faq/programming.rst:793 msgid "" "The slash at the end of the parameter list means that both parameters are " "positional-only. Thus, calling :func:`divmod` with keyword arguments would " @@ -1235,15 +1246,15 @@ msgstr "" "paramètres sont uniquement positionnels. Et donc, appeler :func:`divmod` " "avec des arguments nommés provoque une erreur ::" -#: faq/programming.rst:803 +#: faq/programming.rst:804 msgid "Numbers and strings" msgstr "Nombres et chaînes de caractères" -#: faq/programming.rst:806 +#: faq/programming.rst:807 msgid "How do I specify hexadecimal and octal integers?" msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" -#: faq/programming.rst:808 +#: faq/programming.rst:809 msgid "" "To specify an octal digit, precede the octal value with a zero, and then a " "lower or uppercase \"o\". For example, to set the variable \"a\" to the " @@ -1253,7 +1264,7 @@ msgstr "" "puis un \"o\" majuscule ou minuscule. Par exemple pour affecter la valeur " "octale \"10\" (8 en décimal) à la variable \"a\", tapez ::" -#: faq/programming.rst:816 +#: faq/programming.rst:817 msgid "" "Hexadecimal is just as easy. Simply precede the hexadecimal number with a " "zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " @@ -1264,11 +1275,11 @@ msgstr "" "peuvent être écrits en majuscules ou en minuscules. Par exemple, dans " "l'interpréteur Python ::" -#: faq/programming.rst:829 +#: faq/programming.rst:830 msgid "Why does -22 // 10 return -3?" msgstr "Pourquoi ``-22 // 10`` donne-t-il ``-3`` ?" -#: faq/programming.rst:831 +#: faq/programming.rst:832 msgid "" "It's primarily driven by the desire that ``i % j`` have the same sign as " "``j``. If you want that, and also want::" @@ -1276,7 +1287,7 @@ msgstr "" "Cela est principalement dû à la volonté que ``i % j`` ait le même signe que " "j. Si vous voulez en plus que ::" -#: faq/programming.rst:836 +#: faq/programming.rst:837 msgid "" "then integer division has to return the floor. C also requires that " "identity to hold, and then compilers that truncate ``i // j`` need to make " @@ -1286,7 +1297,7 @@ msgstr "" "également que cette égalité soit vérifiée, et donc les compilateurs qui " "tronquent ``i // j`` ont besoin que ``i % j`` ait le même signe que ``i``." -#: faq/programming.rst:840 +#: faq/programming.rst:841 msgid "" "There are few real use cases for ``i % j`` when ``j`` is negative. When " "``j`` is positive, there are many, and in virtually all of them it's more " @@ -1300,22 +1311,22 @@ msgstr "" "10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " "est utile ; ``-190 % 12 == -10`` est un bogue en puissance." -#: faq/programming.rst:848 +#: faq/programming.rst:849 msgid "How do I get int literal attribute instead of SyntaxError?" msgstr "" "Pourquoi ai-je une erreur de syntaxe en essayant de lire un attribut d'un " "entier littéral ?" -#: faq/programming.rst:850 +#: faq/programming.rst:851 msgid "" -"Trying to lookup an ``int`` literal attribute in the normal manner gives a :" -"exc:`SyntaxError` because the period is seen as a decimal point::" +"Trying to lookup an ``int`` literal attribute in the normal manner gives " +"a :exc:`SyntaxError` because the period is seen as a decimal point::" msgstr "" "Essayer d'utiliser l'opérateur d'accès à un attribut sur un entier littéral " "lève une :exc:`SyntaxError` car le point est compris comme un séparateur " "décimal en notation anglo-saxonne ::" -#: faq/programming.rst:859 +#: faq/programming.rst:860 msgid "" "The solution is to separate the literal from the period with either a space " "or parentheses." @@ -1323,22 +1334,22 @@ msgstr "" "Il faut séparer l'entier du point, soit avec une espace, soit avec des " "parenthèses." -#: faq/programming.rst:869 +#: faq/programming.rst:870 msgid "How do I convert a string to a number?" msgstr "Comment convertir une chaîne de caractères en nombre ?" -#: faq/programming.rst:871 +#: faq/programming.rst:872 #, fuzzy msgid "" -"For integers, use the built-in :func:`int` type constructor, e.g. " +"For integers, use the built-in :func:`int` type constructor, for example, " "``int('144') == 144``. Similarly, :func:`float` converts to a floating-" -"point number, e.g. ``float('144') == 144.0``." +"point number, for example, ``float('144') == 144.0``." msgstr "" "Pour les entiers, utilisez le constructeur natif de :func:`int`, par exemple " "``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " "flottante, par exemple ``float('144') == 144.0``." -#: faq/programming.rst:875 +#: faq/programming.rst:876 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -1348,13 +1359,14 @@ msgid "" "octal, and '0x' indicates a hex number." msgstr "" "Par défaut, ces fonctions interprètent les nombres comme des décimaux, de " -"telle façon que ``int('0144') == 144`` et ``int('0x144')`` lève une :exc:" -"`ValueError`. Le second argument (optionnel) de ``int(string, base)`` est la " -"base dans laquelle convertir, donc ``int('0x144', 16) == 324``. Si la base " -"donnée est 0, le nombre est interprété selon les règles Python : un préfixe " -"``0o`` indique de l'octal et ``0x`` indique de l'hexadécimal." +"telle façon que ``int('0144') == 144`` et ``int('0x144')`` lève " +"une :exc:`ValueError`. Le second argument (optionnel) de ``int(string, " +"base)`` est la base dans laquelle convertir, donc ``int('0x144', 16) == " +"324``. Si la base donnée est 0, le nombre est interprété selon les règles " +"Python : un préfixe ``0o`` indique de l'octal et ``0x`` indique de " +"l'hexadécimal." -#: faq/programming.rst:882 +#: faq/programming.rst:883 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -1370,48 +1382,51 @@ msgstr "" "pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " "effacerait votre répertoire personnel." -#: faq/programming.rst:889 +#: faq/programming.rst:890 +#, fuzzy msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " -"expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " -"does not allow leading '0' in a decimal number (except '0')." +"expressions, so that, for example, ``eval('09')`` gives a syntax error " +"because Python does not allow leading '0' in a decimal number (except '0')." msgstr "" ":func:`eval` a aussi pour effet d'interpréter les nombres comme des " "expressions Python. Ainsi ``eval('09')`` produit une erreur de syntaxe, " "parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " "l'exception du nombre '0')." -#: faq/programming.rst:895 +#: faq/programming.rst:896 msgid "How do I convert a number to a string?" msgstr "Comment convertir un nombre en chaîne de caractères ?" -#: faq/programming.rst:897 +#: faq/programming.rst:898 +#, fuzzy msgid "" -"To convert, e.g., the number ``144`` to the string ``'144'``, use the built-" -"in type constructor :func:`str`. If you want a hexadecimal or octal " +"For example, to convert the number ``144`` to the string ``'144'``, use the " +"built-in type constructor :func:`str`. If you want a hexadecimal or octal " "representation, use the built-in functions :func:`hex` or :func:`oct`. For " "fancy formatting, see the :ref:`f-strings` and :ref:`formatstrings` " -"sections, e.g. ``\"{:04d}\".format(144)`` yields ``'0144'`` and ``\"{:.3f}\"." -"format(1.0/3.0)`` yields ``'0.333'``." +"sections. For example, ``\"{:04d}\".format(144)`` yields ``'0144'`` and " +"``\"{:.3f}\".format(1.0/3.0)`` yields ``'0.333'``." msgstr "" "Pour transformer, par exemple, le nombre ``144`` en la chaîne de caractères " "``'144'``, il faut utiliser la fonction native :func:`str`. Pour obtenir la " "représentation hexadécimale ou octale, il faut utiliser les fonctions " "natives :func:`hex` ou :func:`oct`. Pour des représentations non-" -"conventionnelles, se référer aux sections :ref:`f-strings` et :ref:" -"`formatstrings`, par exemple ``\"{:04d}\".format(144)`` produit ``'0144'`` " -"et ``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." +"conventionnelles, se référer aux sections :ref:`f-strings` " +"et :ref:`formatstrings`, par exemple ``\"{:04d}\".format(144)`` produit " +"``'0144'`` et ``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." -#: faq/programming.rst:906 +#: faq/programming.rst:907 msgid "How do I modify a string in place?" msgstr "Comment modifier une chaîne de caractères « sur place » ?" -#: faq/programming.rst:908 +#: faq/programming.rst:909 +#, fuzzy msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " "from. However, if you need an object with the ability to modify in-place " -"unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " +"Unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " "module::" msgstr "" "C'est impossible car les chaînes de caractères sont immuables. Dans la " @@ -1420,17 +1435,17 @@ msgstr "" "capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " "un objet :class:`io.StringIO` ou le module :mod:`array` ::" -#: faq/programming.rst:938 +#: faq/programming.rst:939 msgid "How do I use strings to call functions/methods?" msgstr "" "Comment utiliser des chaînes de caractères pour appeler des fonctions/" "méthodes ?" -#: faq/programming.rst:940 +#: faq/programming.rst:941 msgid "There are various techniques." msgstr "Il y a plusieurs façons de faire." -#: faq/programming.rst:942 +#: faq/programming.rst:943 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -1443,11 +1458,11 @@ msgstr "" "fonctions. C'est aussi la façon principale d'imiter la construction " "\"case\" ::" -#: faq/programming.rst:957 +#: faq/programming.rst:958 msgid "Use the built-in function :func:`getattr`::" msgstr "Utiliser la fonction :func:`getattr` ::" -#: faq/programming.rst:962 +#: faq/programming.rst:963 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -1455,25 +1470,26 @@ msgstr "" "Notez que :func:`getattr` marche sur n'importe quel objet, ceci inclut les " "classes, les instances de classes, les modules et ainsi de suite." -#: faq/programming.rst:965 +#: faq/programming.rst:966 msgid "This is used in several places in the standard library, like this::" msgstr "" "Ceci est utilisé à plusieurs reprises dans la bibliothèque standard, de " "cette façon ::" -#: faq/programming.rst:978 +#: faq/programming.rst:979 msgid "Use :func:`locals` to resolve the function name::" msgstr "Utilisez :func:`locals` pour résoudre le nom de la fonction ::" -#: faq/programming.rst:990 +#: faq/programming.rst:991 +#, fuzzy msgid "" -"Is there an equivalent to Perl's chomp() for removing trailing newlines from " -"strings?" +"Is there an equivalent to Perl's ``chomp()`` for removing trailing newlines " +"from strings?" msgstr "" "Existe-t-il un équivalent à la fonction ``chomp()`` de Perl, pour retirer " "les caractères de fin de ligne d'une chaîne de caractères ?" -#: faq/programming.rst:992 +#: faq/programming.rst:993 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -1487,31 +1503,32 @@ msgstr "" "représente plus d'une ligne, avec plusieurs lignes vides, les marqueurs de " "fin de ligne de chaque ligne vide seront retirés ::" -#: faq/programming.rst:1004 +#: faq/programming.rst:1005 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." msgstr "" -"Vu que cela ne sert presque qu'à lire un texte ligne à ligne, utiliser ``S." -"rstrip()`` de cette manière fonctionne correctement." +"Vu que cela ne sert presque qu'à lire un texte ligne à ligne, utiliser " +"``S.rstrip()`` de cette manière fonctionne correctement." -#: faq/programming.rst:1009 -msgid "Is there a scanf() or sscanf() equivalent?" +#: faq/programming.rst:1010 +#, fuzzy +msgid "Is there a ``scanf()`` or ``sscanf()`` equivalent?" msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" -#: faq/programming.rst:1011 +#: faq/programming.rst:1012 msgid "Not as such." msgstr "Pas exactement." -#: faq/programming.rst:1013 +#: faq/programming.rst:1014 #, fuzzy msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " -"string objects and then convert decimal strings to numeric values using :" -"func:`int` or :func:`float`. :meth:`!split` supports an optional \"sep\" " -"parameter which is useful if the line uses something other than whitespace " -"as a separator." +"string objects and then convert decimal strings to numeric values " +"using :func:`int` or :func:`float`. :meth:`!split` supports an optional " +"\"sep\" parameter which is useful if the line uses something other than " +"whitespace as a separator." msgstr "" "Pour une simple analyse de chaîne, l'approche la plus simple est " "généralement de découper la ligne en mots délimités par des espaces, en " @@ -1521,7 +1538,7 @@ msgstr "" "un paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " "que des espaces comme séparateurs." -#: faq/programming.rst:1019 +#: faq/programming.rst:1020 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's ``sscanf`` and better suited for the task." @@ -1529,44 +1546,45 @@ msgstr "" "Pour des analyses plus compliquées, les expressions rationnelles sont plus " "puissantes que la fonction ``sscanf`` de C et mieux adaptées à la tâche." -#: faq/programming.rst:1024 -msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" +#: faq/programming.rst:1025 +#, fuzzy +msgid "What does ``UnicodeDecodeError`` or ``UnicodeEncodeError`` error mean?" msgstr "" "Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" -#: faq/programming.rst:1026 +#: faq/programming.rst:1027 msgid "See the :ref:`unicode-howto`." msgstr "Voir :ref:`unicode-howto`." -#: faq/programming.rst:1032 +#: faq/programming.rst:1033 msgid "Can I end a raw string with an odd number of backslashes?" msgstr "" -#: faq/programming.rst:1034 +#: faq/programming.rst:1035 msgid "" "A raw string ending with an odd number of backslashes will escape the " "string's quote::" msgstr "" -#: faq/programming.rst:1042 +#: faq/programming.rst:1043 msgid "" "There are several workarounds for this. One is to use regular strings and " "double the backslashes::" msgstr "" -#: faq/programming.rst:1048 +#: faq/programming.rst:1049 msgid "" "Another is to concatenate a regular string containing an escaped backslash " "to the raw string::" msgstr "" -#: faq/programming.rst:1054 +#: faq/programming.rst:1055 msgid "" "It is also possible to use :func:`os.path.join` to append a backslash on " "Windows::" msgstr "" -#: faq/programming.rst:1059 +#: faq/programming.rst:1060 msgid "" "Note that while a backslash will \"escape\" a quote for the purposes of " "determining where the raw string ends, no escaping occurs when interpreting " @@ -1574,27 +1592,28 @@ msgid "" "value of the raw string::" msgstr "" -#: faq/programming.rst:1067 +#: faq/programming.rst:1068 msgid "Also see the specification in the :ref:`language reference `." msgstr "" -#: faq/programming.rst:1070 +#: faq/programming.rst:1072 msgid "Performance" msgstr "Performances" -#: faq/programming.rst:1073 +#: faq/programming.rst:1075 msgid "My program is too slow. How do I speed it up?" msgstr "Mon programme est trop lent. Comment l'accélérer ?" -#: faq/programming.rst:1075 +#: faq/programming.rst:1077 +#, fuzzy msgid "" -"That's a tough one, in general. First, here are a list of things to " -"remember before diving further:" +"That's a tough one, in general. First, here is a list of things to remember " +"before diving further:" msgstr "" "Question difficile en général. Il faut garder en tête les points suivants " "avant d'aller plus loin :" -#: faq/programming.rst:1078 +#: faq/programming.rst:1080 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -1602,7 +1621,7 @@ msgstr "" "Les performances varient en fonction des implémentations de Python. Cette " "FAQ ne traite que de :term:`CPython`." -#: faq/programming.rst:1080 +#: faq/programming.rst:1082 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -1611,16 +1630,16 @@ msgstr "" "tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " "multiples." -#: faq/programming.rst:1082 +#: faq/programming.rst:1084 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." msgstr "" "Il faut toujours essayer de trouver où sont les points de contention d'un " -"programme *avant* d'essayer d'optimiser du code (voir le module :mod:" -"`profile`)." +"programme *avant* d'essayer d'optimiser du code (voir le " +"module :mod:`profile`)." -#: faq/programming.rst:1084 +#: faq/programming.rst:1086 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -1628,7 +1647,7 @@ msgstr "" "Écrire des scripts d'évaluation de performances permet de progresser " "rapidement dans la recherche d'améliorations (voir le module :mod:`timeit`)." -#: faq/programming.rst:1086 +#: faq/programming.rst:1088 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " @@ -1638,7 +1657,7 @@ msgstr "" "des tests unitaires ou autre) avant d'ajouter des erreurs dans des " "optimisations sophistiquées." -#: faq/programming.rst:1090 +#: faq/programming.rst:1092 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " @@ -1648,7 +1667,7 @@ msgstr "" "Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " "de performance satisfaisants :" -#: faq/programming.rst:1094 +#: faq/programming.rst:1096 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " @@ -1658,7 +1677,7 @@ msgstr "" "produire de bien meilleurs résultats que d'optimiser çà et là de petites " "portions du code." -#: faq/programming.rst:1098 +#: faq/programming.rst:1100 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -1666,26 +1685,26 @@ msgstr "" "Utiliser les structures de données adaptées. Se référer à la documentation " "des :ref:`bltin-types` et du module :mod:`collections`." -#: faq/programming.rst:1101 +#: faq/programming.rst:1103 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " "come up with. This is doubly true for primitives written in C, such as " -"builtins and some extension types. For example, be sure to use either the :" -"meth:`list.sort` built-in method or the related :func:`sorted` function to " -"do sorting (and see the :ref:`sortinghowto` for examples of moderately " +"builtins and some extension types. For example, be sure to use either " +"the :meth:`list.sort` built-in method or the related :func:`sorted` function " +"to do sorting (and see the :ref:`sortinghowto` for examples of moderately " "advanced usage)." msgstr "" "Quand la bibliothèque standard fournit une implémentation pour quelque " "chose, il y a de fortes chances (même si ce n'est pas systématique) que " "cette implémentation soit plus rapide que la vôtre. C'est d'autant plus vrai " "pour les routines écrites en C, comme les routines natives et certaines " -"extensions de types. Par exemple, il faut utiliser la méthode native :meth:" -"`list.sort` ou la fonction :func:`sorted` similaire pour classer (et se " -"référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " -"courante)." +"extensions de types. Par exemple, il faut utiliser la méthode " +"native :meth:`list.sort` ou la fonction :func:`sorted` similaire pour " +"classer (et se référer à la section :ref:`sortinghowto` pour des exemples " +"d'utilisation courante)." -#: faq/programming.rst:1109 +#: faq/programming.rst:1111 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -1699,7 +1718,7 @@ msgstr "" "éviter trop d'indirections, en particulier sous la forme de fonctions ou " "méthodes trop petites (qui nuisent aussi souvent à la clarté du code)." -#: faq/programming.rst:1115 +#: faq/programming.rst:1117 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -1720,7 +1739,7 @@ msgstr "" "vous pouvez aussi :ref:`écrire un module d'extension en C` " "vous-même." -#: faq/programming.rst:1125 +#: faq/programming.rst:1127 msgid "" "The wiki page devoted to `performance tips `_." @@ -1728,13 +1747,13 @@ msgstr "" "La page wiki dédiée aux `astuces de performance `_." -#: faq/programming.rst:1131 +#: faq/programming.rst:1134 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" "Quelle est la manière la plus efficace de concaténer un grand nombre de " "chaînes de caractères ?" -#: faq/programming.rst:1133 +#: faq/programming.rst:1136 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1747,7 +1766,7 @@ msgstr "" "général, la complexité est quadratique par rapport à la taille totale de la " "chaîne." -#: faq/programming.rst:1138 +#: faq/programming.rst:1141 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" @@ -1756,13 +1775,14 @@ msgstr "" "recommandée consiste à toutes les mettre dans une liste et appeler la " "méthode :meth:`str.join` à la fin ::" -#: faq/programming.rst:1146 -msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" +#: faq/programming.rst:1149 +#, fuzzy +msgid "(Another reasonably efficient idiom is to use :class:`io.StringIO`.)" msgstr "" -"(une autre technique relativement efficace consiste à utiliser :class:`io." -"StringIO`)" +"(une autre technique relativement efficace consiste à " +"utiliser :class:`io.StringIO`)" -#: faq/programming.rst:1148 +#: faq/programming.rst:1151 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " @@ -1772,15 +1792,16 @@ msgstr "" "recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " "concaténation en-place (l'opérateur ``+=``) ::" -#: faq/programming.rst:1157 -msgid "Sequences (Tuples/Lists)" +#: faq/programming.rst:1160 +#, fuzzy +msgid "Sequences (tuples/lists)" msgstr "Séquences (*n*-uplets / listes)" -#: faq/programming.rst:1160 +#: faq/programming.rst:1163 msgid "How do I convert between tuples and lists?" msgstr "Comment convertir les listes en *n*-uplets et inversement ?" -#: faq/programming.rst:1162 +#: faq/programming.rst:1165 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." @@ -1789,7 +1810,7 @@ msgstr "" "précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " "même ordre." -#: faq/programming.rst:1165 +#: faq/programming.rst:1168 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -1802,7 +1823,7 @@ msgstr "" "fonction économique à appeler quand vous ne savez pas si votre objet est " "déjà un *n*-uplet." -#: faq/programming.rst:1170 +#: faq/programming.rst:1173 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -1815,11 +1836,11 @@ msgstr "" "``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " "même façon que ``seq[:]``." -#: faq/programming.rst:1177 +#: faq/programming.rst:1180 msgid "What's a negative index?" msgstr "Qu'est-ce qu'un indice négatif ?" -#: faq/programming.rst:1179 +#: faq/programming.rst:1182 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -1833,7 +1854,7 @@ msgstr "" "dernier indice, ``-2`` est le pénultième (avant-dernier), et ainsi de suite. " "On peut aussi dire que ``seq[-n]`` est équivalent à ``seq[len(seq)-n]``." -#: faq/programming.rst:1184 +#: faq/programming.rst:1187 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " @@ -1844,15 +1865,15 @@ msgstr "" "caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " "la fin d'une chaîne." -#: faq/programming.rst:1190 +#: faq/programming.rst:1193 msgid "How do I iterate over a sequence in reverse order?" msgstr "Comment itérer à rebours sur une séquence ?" -#: faq/programming.rst:1192 +#: faq/programming.rst:1195 msgid "Use the :func:`reversed` built-in function::" msgstr "Utilisez la fonction native :func:`reversed` ::" -#: faq/programming.rst:1197 +#: faq/programming.rst:1200 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -1860,21 +1881,21 @@ msgstr "" "Cela ne modifie pas la séquence initiale, mais construit à la place une " "copie en ordre inverse pour itérer dessus." -#: faq/programming.rst:1202 +#: faq/programming.rst:1205 msgid "How do you remove duplicates from a list?" msgstr "Comment retirer les doublons d'une liste ?" -#: faq/programming.rst:1204 +#: faq/programming.rst:1207 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" "Lisez le « livre de recettes » Python pour trouver une longue discussion sur " "les nombreuses approches possibles :" -#: faq/programming.rst:1206 +#: faq/programming.rst:1209 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1208 +#: faq/programming.rst:1211 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" @@ -1883,16 +1904,17 @@ msgstr "" "celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " "trouvés en chemin ::" -#: faq/programming.rst:1220 +#: faq/programming.rst:1223 +#, fuzzy msgid "" -"If all elements of the list may be used as set keys (i.e. they are all :term:" -"`hashable`) this is often faster ::" +"If all elements of the list may be used as set keys (that is, they are " +"all :term:`hashable`) this is often faster::" msgstr "" "Si tous les éléments de la liste peuvent être utilisés comme des clés de " "dictionnaire (c'est-à-dire, qu'elles sont toutes :term:`hachables " "`) ceci est souvent plus rapide ::" -#: faq/programming.rst:1225 +#: faq/programming.rst:1228 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -1900,35 +1922,37 @@ msgstr "" "Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " "doublons, puis la transforme à nouveau en liste." -#: faq/programming.rst:1230 -msgid "How do you remove multiple items from a list" +#: faq/programming.rst:1233 +#, fuzzy +msgid "How do you remove multiple items from a list?" msgstr "Comment retirer les doublons d'une liste" -#: faq/programming.rst:1232 +#: faq/programming.rst:1235 +#, fuzzy msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " "replacement with an implicit or explicit forward iteration. Here are three " -"variations.::" +"variations::" msgstr "" "Comme pour supprimer les doublons, il est possible d’itérer explicitement à " "l’envers avec une condition de suppression. Cependant, il est plus facile et " "plus rapide d’utiliser le remplacement des tranches par une itération avant, " "implicite ou explicite. Voici trois variantes ::" -#: faq/programming.rst:1241 +#: faq/programming.rst:1244 msgid "The list comprehension may be fastest." msgstr "La liste en compréhension est peut-être la plus rapide ::" -#: faq/programming.rst:1245 +#: faq/programming.rst:1248 msgid "How do you make an array in Python?" msgstr "Comment construire un tableau en Python ?" -#: faq/programming.rst:1247 +#: faq/programming.rst:1250 msgid "Use a list::" msgstr "Utilisez une liste ::" -#: faq/programming.rst:1251 +#: faq/programming.rst:1254 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " @@ -1938,11 +1962,12 @@ msgstr "" "principale différence est qu'une liste Python peut contenir des objets de " "différents types." -#: faq/programming.rst:1254 +#: faq/programming.rst:1257 +#, fuzzy msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " -"lists. Also note that `NumPy `_ and other third party " +"lists. Also note that `NumPy `_ and other third-party " "packages define array-like structures with various characteristics as well." msgstr "" "Le module ``array`` fournit des méthodes pour créer des tableaux de types " @@ -1951,14 +1976,14 @@ msgstr "" "fournissent différentes structures de type tableaux, avec des " "caractéristiques différentes." -#: faq/programming.rst:1260 +#: faq/programming.rst:1263 msgid "" "To get Lisp-style linked lists, you can emulate *cons cells* using tuples::" msgstr "" "Pour obtenir des listes chaînées à la sauce Lisp, vous pouvez émuler les " "*cons cells* en utilisant des *n*-uplets ::" -#: faq/programming.rst:1264 +#: faq/programming.rst:1267 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of a Lisp *car* is ``lisp_list[0]`` and the analogue of *cdr* is " @@ -1971,26 +1996,26 @@ msgstr "" "ceci que si vous êtes réellement sûr d'en avoir besoin, cette méthode est en " "général bien plus lente que les listes Python." -#: faq/programming.rst:1273 +#: faq/programming.rst:1276 msgid "How do I create a multidimensional list?" msgstr "Comment créer une liste à plusieurs dimensions ?" -#: faq/programming.rst:1275 +#: faq/programming.rst:1278 msgid "You probably tried to make a multidimensional array like this::" msgstr "" "Vous avez probablement essayé de créer une liste à plusieurs dimensions de " "cette façon ::" -#: faq/programming.rst:1279 +#: faq/programming.rst:1282 msgid "This looks correct if you print it:" msgstr "Elle semble correcte si on l'affiche :" -#: faq/programming.rst:1290 +#: faq/programming.rst:1293 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" "Mais quand vous affectez une valeur, celle-ci apparaît à plusieurs endroits :" -#: faq/programming.rst:1302 +#: faq/programming.rst:1305 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -2003,7 +2028,7 @@ msgstr "" "dans une colonne apparaîtra donc dans toutes les colonnes, ce qui n'est très " "probablement pas ce que vous souhaitiez." -#: faq/programming.rst:1307 +#: faq/programming.rst:1310 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" @@ -2011,7 +2036,7 @@ msgstr "" "L'approche suggérée est d'abord de créer une liste de la longueur désirée, " "puis de remplir tous les éléments avec une nouvelle chaîne ::" -#: faq/programming.rst:1314 +#: faq/programming.rst:1317 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -2020,7 +2045,7 @@ msgstr "" "longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " "compréhension ::" -#: faq/programming.rst:1320 +#: faq/programming.rst:1323 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy " "`_ is the best known." @@ -2028,34 +2053,35 @@ msgstr "" "Vous pouvez aussi utiliser une extension qui fournit un type matriciel " "natif ; `NumPy `_ est la plus répandue." -#: faq/programming.rst:1325 +#: faq/programming.rst:1328 msgid "How do I apply a method or function to a sequence of objects?" msgstr "" "Comment appliquer une méthode ou une fonction à une séquence d'objets ?" -#: faq/programming.rst:1327 +#: faq/programming.rst:1330 +#, fuzzy msgid "" -"To call a method or function and accumulate the return values is a list, a :" -"term:`list comprehension` is an elegant solution::" +"To call a method or function and accumulate the return values in a list, " +"a :term:`list comprehension` is an elegant solution::" msgstr "" "Pour appeler une méthode ou une fonction et accumuler les valeurs renvoyées " "dans une liste, une :term:`compréhension de liste ` est " "une solution élégante ::" -#: faq/programming.rst:1334 +#: faq/programming.rst:1337 msgid "" "To just run the method or function without saving the return values, a " "plain :keyword:`for` loop will suffice::" msgstr "" -#: faq/programming.rst:1346 +#: faq/programming.rst:1350 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" "Pourquoi ``a_tuple[i] += ['item']`` lève-t-il une exception alors que " "l'addition fonctionne ?" -#: faq/programming.rst:1348 +#: faq/programming.rst:1352 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " @@ -2065,7 +2091,7 @@ msgstr "" "d'affectation incrémentaux sont des opérateurs d'*affectation* et à la " "différence entre les objets mutables et immuables en Python." -#: faq/programming.rst:1352 +#: faq/programming.rst:1356 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " @@ -2075,11 +2101,11 @@ msgstr "" "incrémentale sont appliqués aux éléments d'un *n*-uplet qui pointe sur des " "objets mutables, mais on prendra ``list`` et ``+=`` comme exemple." -#: faq/programming.rst:1356 +#: faq/programming.rst:1360 msgid "If you wrote::" msgstr "Si vous écrivez ::" -#: faq/programming.rst:1364 +#: faq/programming.rst:1368 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -2093,7 +2119,7 @@ msgstr "" "l'élément ``0`` du *n*-uplet, on obtient une erreur car il est impossible de " "modifier la cible sur laquelle pointe un élément d'un *n*-uplet." -#: faq/programming.rst:1370 +#: faq/programming.rst:1374 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -2101,7 +2127,7 @@ msgstr "" "Sous le capot, une instruction d'affectation incrémentale fait à peu près " "ceci ::" -#: faq/programming.rst:1379 +#: faq/programming.rst:1383 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -2109,11 +2135,11 @@ msgstr "" "C'est la partie de l'affectation de l'opération qui génère l'erreur, vu " "qu'un *n*-uplet est immuable." -#: faq/programming.rst:1382 +#: faq/programming.rst:1386 msgid "When you write something like::" msgstr "Quand vous écrivez un code du style ::" -#: faq/programming.rst:1390 +#: faq/programming.rst:1394 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" @@ -2121,15 +2147,16 @@ msgstr "" "L'exception est un peu plus surprenante et, chose encore plus étrange, " "malgré l'erreur, l'ajout a fonctionné ::" -#: faq/programming.rst:1396 +#: faq/programming.rst:1400 #, fuzzy msgid "" "To see why this happens, you need to know that (a) if an object implements " "an :meth:`~object.__iadd__` magic method, it gets called when the ``+=`` " "augmented assignment is executed, and its return value is what gets used in " "the assignment statement; and (b) for lists, :meth:`!__iadd__` is equivalent " -"to calling :meth:`!extend` on the list and returning the list. That's why " -"we say that for lists, ``+=`` is a \"shorthand\" for :meth:`!list.extend`::" +"to calling :meth:`~sequence.extend` on the list and returning the list. " +"That's why we say that for lists, ``+=`` is a \"shorthand\" " +"for :meth:`list.extend`::" msgstr "" "Pour comprendre ce qui se passe, il faut savoir que, premièrement, si un " "objet implémente la méthode magique :meth:`~object.__iadd__` , celle-ci est " @@ -2139,11 +2166,11 @@ msgstr "" "sur la liste et à renvoyer celle-ci. C'est pour cette raison que l'on dit " "que pour les listes, ``+=`` est un \"raccourci\" pour :meth:`!list.extend` ::" -#: faq/programming.rst:1409 +#: faq/programming.rst:1413 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: faq/programming.rst:1414 +#: faq/programming.rst:1418 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -2155,13 +2182,13 @@ msgstr "" "change rien, puisque c'est un pointeur vers le même objet que sur lequel " "pointait ``a_list``, mais l'affectation a tout de même lieu." -#: faq/programming.rst:1419 +#: faq/programming.rst:1423 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" "Donc, dans notre exemple avec un *n*-uplet, il se passe quelque chose " "équivalent à ::" -#: faq/programming.rst:1427 +#: faq/programming.rst:1431 msgid "" "The :meth:`!__iadd__` succeeds, and thus the list is extended, but even " "though ``result`` points to the same object that ``a_tuple[0]`` already " @@ -2172,7 +2199,7 @@ msgstr "" "``result`` pointe sur le même objet que ``a_tuple[0]``, l'affectation finale " "échoue car les *n*-uplets ne sont pas mutables." -#: faq/programming.rst:1433 +#: faq/programming.rst:1437 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" @@ -2180,7 +2207,7 @@ msgstr "" "Je souhaite faire un classement compliqué : peut-on faire une transformation " "de Schwartz en Python ?" -#: faq/programming.rst:1435 +#: faq/programming.rst:1439 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -2192,27 +2219,28 @@ msgstr "" "chaque élément à sa \"valeur de tri\". En Python, ceci est géré par " "l'argument ``key`` de la méthode :meth:`list.sort` ::" -#: faq/programming.rst:1444 +#: faq/programming.rst:1448 msgid "How can I sort one list by values from another list?" msgstr "Comment ordonner une liste en fonction des valeurs d'une autre liste ?" -#: faq/programming.rst:1446 +#: faq/programming.rst:1450 +#, fuzzy msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " -"pick out the element you want. ::" +"pick out the element you want." msgstr "" "Fusionnez-les dans un itérateur de *n*-uplets, ordonnez la liste obtenue, " "puis choisissez l'élément que vous voulez ::" -#: faq/programming.rst:1461 +#: faq/programming.rst:1465 msgid "Objects" msgstr "Objets" -#: faq/programming.rst:1464 +#: faq/programming.rst:1468 msgid "What is a class?" msgstr "Qu'est-ce qu'une classe ?" -#: faq/programming.rst:1466 +#: faq/programming.rst:1470 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -2224,7 +2252,7 @@ msgstr "" "créer des objets, qui incarnent à la fois les données (attributs) et le code " "(méthodes) spécifiques à un type de données." -#: faq/programming.rst:1470 +#: faq/programming.rst:1474 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -2242,25 +2270,25 @@ msgstr "" "``OutlookMailbox`` qui gèrent les plusieurs formats spécifiques de boîtes " "aux lettres." -#: faq/programming.rst:1479 +#: faq/programming.rst:1483 msgid "What is a method?" msgstr "Qu'est-ce qu'une méthode ?" -#: faq/programming.rst:1481 +#: faq/programming.rst:1485 msgid "" -"A method is a function on some object ``x`` that you normally call as ``x." -"name(arguments...)``. Methods are defined as functions inside the class " +"A method is a function on some object ``x`` that you normally call as " +"``x.name(arguments...)``. Methods are defined as functions inside the class " "definition::" msgstr "" "Une méthode est une fonction sur un objet ``x`` qu'on appelle de manière " "générale sous la forme ``x.name(arguments…)``. Les méthodes sont définies " "comme des fonctions à l'intérieur de la définition de classe ::" -#: faq/programming.rst:1491 +#: faq/programming.rst:1495 msgid "What is self?" msgstr "Qu'est-ce que self ?" -#: faq/programming.rst:1493 +#: faq/programming.rst:1497 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -2273,11 +2301,11 @@ msgstr "" "est définie ; tout se passe comme si la méthode était appelée comme " "``meth(x, a, b, c)``." -#: faq/programming.rst:1498 +#: faq/programming.rst:1502 msgid "See also :ref:`why-self`." msgstr "Voir aussi :ref:`why-self`." -#: faq/programming.rst:1502 +#: faq/programming.rst:1506 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" @@ -2285,14 +2313,15 @@ msgstr "" "Comment vérifier si un objet est une instance d'une classe donnée ou d'une " "sous-classe de celle-ci ?" -#: faq/programming.rst:1504 +#: faq/programming.rst:1508 +#, fuzzy msgid "" "Use the built-in function :func:`isinstance(obj, cls) `. You " "can check if an object is an instance of any of a number of classes by " -"providing a tuple instead of a single class, e.g. ``isinstance(obj, (class1, " -"class2, ...))``, and can also check whether an object is one of Python's " -"built-in types, e.g. ``isinstance(obj, str)`` or ``isinstance(obj, (int, " -"float, complex))``." +"providing a tuple instead of a single class, for example, ``isinstance(obj, " +"(class1, class2, ...))``, and can also check whether an object is one of " +"Python's built-in types, for example, ``isinstance(obj, str)`` or " +"``isinstance(obj, (int, float, complex))``." msgstr "" "Utilisez la fonction native :func:`isinstance(obj, cls) `. Vous " "pouvez vérifier qu'un objet est une instance de plusieurs classes à la fois " @@ -2301,21 +2330,23 @@ msgstr "" "qu'un objet est l'un des types natifs de Python, par exemple " "``isinstance(obj, str)`` ou ``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1511 +#: faq/programming.rst:1515 +#, fuzzy msgid "" -"Note that :func:`isinstance` also checks for virtual inheritance from an :" -"term:`abstract base class`. So, the test will return ``True`` for a " +"Note that :func:`isinstance` also checks for virtual inheritance from " +"an :term:`abstract base class`. So, the test will return ``True`` for a " "registered class even if hasn't directly or indirectly inherited from it. " -"To test for \"true inheritance\", scan the :term:`MRO` of the class:" +"To test for \"true inheritance\", scan the :term:`method resolution order` " +"(MRO) of the class:" msgstr "" -"Notez que :func:`isinstance` prend aussi en compte l'héritage virtuel d'une :" -"term:`classe mère abstraite `, c'est à dire qu'elle " -"renvoie ``True`` pour une classe A enregistrée auprès d'une classe mère " +"Notez que :func:`isinstance` prend aussi en compte l'héritage virtuel " +"d'une :term:`classe abstraite `, c'est à dire " +"qu'elle renvoie ``True`` pour une classe A enregistrée auprès d'une classe " "abstraite B même si A n'est pas directement ou indirectement une classe " "fille de B. Pour vérifier l'héritage dans le sens plus restreint, parcourez " "l'\\ :term:`ordre de résolution des méthodes ` de la classe :" -#: faq/programming.rst:1546 +#: faq/programming.rst:1551 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -2324,14 +2355,15 @@ msgid "" "and doing a different thing based on what class it is. For example, if you " "have a function that does something::" msgstr "" -"Notez que la plupart des programmes n'utilisent que rarement :func:" -"`isInstance` sur les classes définies par l'utilisateur. Si vous développez " -"vous-même des classes, une approche plus orientée-objet consiste définir des " -"méthodes sur les classes qui sont porteuses d'un comportement particulier, " -"plutôt que de vérifier la classe de l'objet et de faire un traitement ad-" -"hoc. Par exemple, si vous avez une fonction qui fait quelque chose ::" +"Notez que la plupart des programmes n'utilisent que " +"rarement :func:`isInstance` sur les classes définies par l'utilisateur. Si " +"vous développez vous-même des classes, une approche plus orientée-objet " +"consiste définir des méthodes sur les classes qui sont porteuses d'un " +"comportement particulier, plutôt que de vérifier la classe de l'objet et de " +"faire un traitement ad-hoc. Par exemple, si vous avez une fonction qui fait " +"quelque chose ::" -#: faq/programming.rst:1560 +#: faq/programming.rst:1565 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -2339,13 +2371,14 @@ msgstr "" "Une meilleure approche est de définir une méthode ``search()`` dans toutes " "les classes et qu'il suffit d'appeler de la manière suivante ::" -#: faq/programming.rst:1575 +#: faq/programming.rst:1580 msgid "What is delegation?" msgstr "Qu'est-ce que la délégation ?" -#: faq/programming.rst:1577 +#: faq/programming.rst:1582 +#, fuzzy msgid "" -"Delegation is an object oriented technique (also called a design pattern). " +"Delegation is an object-oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " "one of its methods. You can create a new class that provides a new " "implementation of the method you're interested in changing and delegates all " @@ -2358,7 +2391,7 @@ msgstr "" "dans l'évolution et qui délègue toute autre méthode à la méthode " "correspondante de ``x``." -#: faq/programming.rst:1583 +#: faq/programming.rst:1588 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " @@ -2368,15 +2401,15 @@ msgstr "" "Par exemple, la classe suivante implémente une classe qui se comporte comme " "un fichier, mais convertit toutes les données écrites en majuscules ::" -#: faq/programming.rst:1598 +#: faq/programming.rst:1603 #, fuzzy msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " -"argument string to uppercase before calling the underlying ``self._outfile." -"write()`` method. All other methods are delegated to the underlying ``self." -"_outfile`` object. The delegation is accomplished via the :meth:`~object." -"__getattr__` method; consult :ref:`the language reference ` for more information about controlling attribute access." +"argument string to uppercase before calling the underlying " +"``self._outfile.write()`` method. All other methods are delegated to the " +"underlying ``self._outfile`` object. The delegation is accomplished via " +"the :meth:`~object.__getattr__` method; consult :ref:`the language reference " +"` for more information about controlling attribute access." msgstr "" "Ici, la classe ``UpperOut`` redéfinit la méthode ``write()`` pour convertir " "la chaîne de caractères donnée en argument en majuscules avant d'appeler la " @@ -2386,38 +2419,39 @@ msgstr "" "` pour plus d'informations sur la personnalisation de " "l’accès aux attributs." -#: faq/programming.rst:1605 +#: faq/programming.rst:1610 #, fuzzy msgid "" "Note that for more general cases delegation can get trickier. When " -"attributes must be set as well as retrieved, the class must define a :meth:" -"`~object.__setattr__` method too, and it must do so carefully. The basic " -"implementation of :meth:`!__setattr__` is roughly equivalent to the " +"attributes must be set as well as retrieved, the class must define " +"a :meth:`~object.__setattr__` method too, and it must do so carefully. The " +"basic implementation of :meth:`!__setattr__` is roughly equivalent to the " "following::" msgstr "" "Notez que pour une utilisation plus générale de la délégation, les choses " "peuvent se compliquer. Lorsque les attributs doivent être définis aussi bien " "que récupérés, la classe doit définir une méthode :meth:`__setattr__` aussi, " -"et il doit le faire avec soin. La mise en œuvre basique de la méthode :meth:" -"`__setattr__` est à peu près équivalent à ce qui suit ::" +"et il doit le faire avec soin. La mise en œuvre basique de la " +"méthode :meth:`__setattr__` est à peu près équivalent à ce qui suit ::" -#: faq/programming.rst:1616 +#: faq/programming.rst:1621 #, fuzzy msgid "" -"Many :meth:`~object.__setattr__` implementations call :meth:`!object." -"__setattr__` to set an attribute on self without causing infinite recursion::" +"Many :meth:`~object.__setattr__` implementations call :meth:`!" +"object.__setattr__` to set an attribute on self without causing infinite " +"recursion::" msgstr "" "La plupart des implémentations de :meth:`__setattr__` doivent modifier " "``self.__dict__`` pour stocker l'état local de self sans provoquer une " "récursion infinie." -#: faq/programming.rst:1624 +#: faq/programming.rst:1629 msgid "" -"Alternatively, it is possible to set attributes by inserting entries into :" -"attr:`self.__dict__ ` directly." +"Alternatively, it is possible to set attributes by inserting entries " +"into :attr:`self.__dict__ ` directly." msgstr "" -#: faq/programming.rst:1629 +#: faq/programming.rst:1634 msgid "" "How do I call a method defined in a base class from a derived class that " "extends it?" @@ -2425,11 +2459,11 @@ msgstr "" "Comment appeler une méthode définie dans une classe mère depuis une classe " "dérivée qui la surcharge ?" -#: faq/programming.rst:1631 +#: faq/programming.rst:1636 msgid "Use the built-in :func:`super` function::" msgstr "Utilisez la fonction native :func:`super` ::" -#: faq/programming.rst:1637 +#: faq/programming.rst:1642 msgid "" "In the example, :func:`super` will automatically determine the instance from " "which it was called (the ``self`` value), look up the :term:`method " @@ -2438,22 +2472,23 @@ msgid "" msgstr "" "Dans cet exemple, :func:`super` détermine automatiquement l'instance dont " "une méthode l'appelle (l'objet ``self``), observe l'\\ :term:`ordre de " -"résolution des méthodes ` obtenu avec ``type(self)." -"__mro__``, et renvoie la classe qui suit ``Derived`` dans cet ordre, donc " -"``Base``." +"résolution des méthodes ` obtenu avec " +"``type(self).__mro__``, et renvoie la classe qui suit ``Derived`` dans cet " +"ordre, donc ``Base``." -#: faq/programming.rst:1644 +#: faq/programming.rst:1649 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" "Comment organiser un code pour permettre de changer la classe mère plus " "facilement ?" -#: faq/programming.rst:1646 +#: faq/programming.rst:1651 +#, fuzzy msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " -"this trick is also handy if you want to decide dynamically (e.g. depending " -"on availability of resources) which base class to use. Example::" +"this trick is also handy if you want to decide dynamically (such as " +"depending on availability of resources) which base class to use. Example::" msgstr "" "Vous pouvez définir un alias pour la classe mère et dériver depuis l'alias. " "Ensuite, tout ce que vous devez changer est la valeur attribuée à cet alias. " @@ -2461,13 +2496,13 @@ msgstr "" "dynamiquement (par exemple en fonction de la disponibilité de certaines " "ressources) la classe mère à utiliser. Exemple ::" -#: faq/programming.rst:1661 +#: faq/programming.rst:1666 msgid "How do I create static class data and static class methods?" msgstr "" "Comment créer des données statiques de classe et des méthodes statiques de " "classe ?" -#: faq/programming.rst:1663 +#: faq/programming.rst:1668 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -2475,7 +2510,7 @@ msgstr "" "Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " "prises en charge en Python." -#: faq/programming.rst:1666 +#: faq/programming.rst:1671 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" @@ -2484,7 +2519,7 @@ msgstr "" "attribuer une nouvelle valeur à l'attribut, vous devez explicitement " "utiliser le nom de classe dans l'affectation ::" -#: faq/programming.rst:1678 +#: faq/programming.rst:1683 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " @@ -2495,7 +2530,7 @@ msgstr "" "une classe sur le chemin de recherche de classe mère de ``c.__class__`` " "jusqu'à ``C``." -#: faq/programming.rst:1682 +#: faq/programming.rst:1687 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " @@ -2508,11 +2543,11 @@ msgstr "" "de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " "d'une méthode ou non ::" -#: faq/programming.rst:1689 +#: faq/programming.rst:1694 msgid "Static methods are possible::" msgstr "Il est possible d'utiliser des méthodes statiques ::" -#: faq/programming.rst:1697 +#: faq/programming.rst:1702 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" @@ -2520,7 +2555,7 @@ msgstr "" "Cependant, d'une manière beaucoup plus simple pour obtenir l'effet d'une " "méthode statique se fait par une simple fonction au niveau du module ::" -#: faq/programming.rst:1703 +#: faq/programming.rst:1708 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." @@ -2529,11 +2564,11 @@ msgstr "" "hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " "souhaitée." -#: faq/programming.rst:1708 +#: faq/programming.rst:1713 msgid "How can I overload constructors (or methods) in Python?" msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" -#: faq/programming.rst:1710 +#: faq/programming.rst:1715 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -2541,11 +2576,12 @@ msgstr "" "Cette réponse s'applique en fait à toutes les méthodes, mais la question se " "pose généralement dans le contexte des constructeurs." -#: faq/programming.rst:1713 -msgid "In C++ you'd write" +#: faq/programming.rst:1718 +#, fuzzy +msgid "In C++ you'd write:" msgstr "En C++, on écrirait" -#: faq/programming.rst:1722 +#: faq/programming.rst:1727 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -2553,29 +2589,30 @@ msgstr "" "En Python, vous devez écrire un constructeur unique qui considère tous les " "cas en utilisant des arguments par défaut. Par exemple ::" -#: faq/programming.rst:1732 +#: faq/programming.rst:1737 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" "Ce n'est pas tout à fait équivalent, mais suffisamment proche dans la " "pratique." -#: faq/programming.rst:1734 -msgid "You could also try a variable-length argument list, e.g. ::" +#: faq/programming.rst:1739 +#, fuzzy +msgid "You could also try a variable-length argument list, for example::" msgstr "" "Vous pouvez aussi utiliser une liste d'arguments de longueur variable, par " "exemple ::" -#: faq/programming.rst:1739 +#: faq/programming.rst:1744 msgid "The same approach works for all method definitions." msgstr "La même approche fonctionne pour toutes les définitions de méthode." -#: faq/programming.rst:1743 +#: faq/programming.rst:1748 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" "J'essaie d'utiliser ``__spam`` et j'obtiens une erreur à propos de " "``_SomeClassName__spam``." -#: faq/programming.rst:1745 +#: faq/programming.rst:1750 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -2591,13 +2628,13 @@ msgstr "" "remplacé par ``_classname__spam``, où ``classname`` est le nom de la classe " "en cours sans les éventuels tirets bas du début." -#: faq/programming.rst:1751 +#: faq/programming.rst:1756 msgid "" "The identifier can be used unchanged within the class, but to access it " "outside the class, the mangled name must be used:" msgstr "" -#: faq/programming.rst:1768 +#: faq/programming.rst:1773 #, fuzzy msgid "" "In particular, this does not guarantee privacy since an outside user can " @@ -2609,46 +2646,48 @@ msgstr "" "privées sont visibles dans l'objet ``__dict__``. De nombreux programmeurs " "Python ne prennent jamais la peine d'utiliser des noms de variable privés." -#: faq/programming.rst:1774 +#: faq/programming.rst:1779 msgid "" "The :ref:`private name mangling specifications ` for " "details and special cases." msgstr "" +"La :ref:`spécification des transformations de noms ` " +"pour les détails et cas particuliers." -#: faq/programming.rst:1778 +#: faq/programming.rst:1784 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" "Ma classe définit ``__del__`` mais elle n'est pas appelée lorsque je " "supprime l'objet." -#: faq/programming.rst:1780 +#: faq/programming.rst:1786 msgid "There are several possible reasons for this." msgstr "Il y a plusieurs explications possibles." -#: faq/programming.rst:1782 +#: faq/programming.rst:1788 #, fuzzy msgid "" -"The :keyword:`del` statement does not necessarily call :meth:`~object." -"__del__` -- it simply decrements the object's reference count, and if this " -"reaches zero :meth:`!__del__` is called." +"The :keyword:`del` statement does not necessarily " +"call :meth:`~object.__del__` -- it simply decrements the object's reference " +"count, and if this reaches zero :meth:`!__del__` is called." msgstr "" "La commande *del* n'appelle pas forcément :meth:`__del__` — elle décrémente " "simplement le compteur de références de l'objet et, si celui-ci arrive à " "zéro, :meth:`__del__` est appelée." -#: faq/programming.rst:1786 +#: faq/programming.rst:1792 #, fuzzy msgid "" -"If your data structures contain circular links (e.g. a tree where each child " -"has a parent reference and each parent has a list of children) the reference " -"counts will never go back to zero. Once in a while Python runs an algorithm " -"to detect such cycles, but the garbage collector might run some time after " -"the last reference to your data structure vanishes, so your :meth:`!__del__` " -"method may be called at an inconvenient and random time. This is " -"inconvenient if you're trying to reproduce a problem. Worse, the order in " -"which object's :meth:`!__del__` methods are executed is arbitrary. You can " -"run :func:`gc.collect` to force a collection, but there *are* pathological " -"cases where objects will never be collected." +"If your data structures contain circular links (for example, a tree where " +"each child has a parent reference and each parent has a list of children) " +"the reference counts will never go back to zero. Once in a while Python " +"runs an algorithm to detect such cycles, but the garbage collector might run " +"some time after the last reference to your data structure vanishes, so " +"your :meth:`!__del__` method may be called at an inconvenient and random " +"time. This is inconvenient if you're trying to reproduce a problem. Worse, " +"the order in which object's :meth:`!__del__` methods are executed is " +"arbitrary. You can run :func:`gc.collect` to force a collection, but there " +"*are* pathological cases where objects will never be collected." msgstr "" "Si la structure de données contient des références circulaires (par exemple " "un arbre dans lequel chaque fils référence son père, et chaque père garde " @@ -2663,7 +2702,7 @@ msgstr "" "miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " "les objets ne seront jamais nettoyés." -#: faq/programming.rst:1797 +#: faq/programming.rst:1803 #, fuzzy msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " @@ -2677,11 +2716,11 @@ msgstr "" "de définir une méthode ``close()`` explicite sur des objets, et de l'appeler " "quand leur cycle de vie s'achève. Cette méthode ``close()`` peut alors " "supprimer les attributs qui référencent des sous-objets. Il vaut mieux ne " -"pas appeler la méthode :meth:`__del__` directement, mais la méthode :meth:" -"`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " -"être appelée plusieurs fois sur le même objet." +"pas appeler la méthode :meth:`__del__` directement, mais la " +"méthode :meth:`__del__` devrait appeler la méthode ``close()`` et " +"``close()`` doit pouvoir être appelée plusieurs fois sur le même objet." -#: faq/programming.rst:1804 +#: faq/programming.rst:1810 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -2694,7 +2733,7 @@ msgstr "" "d'arbres devraient utiliser des références faibles entre pères et fils (si " "nécessaire !)." -#: faq/programming.rst:1817 +#: faq/programming.rst:1823 #, fuzzy msgid "" "Finally, if your :meth:`!__del__` method raises an exception, a warning " @@ -2703,11 +2742,11 @@ msgstr "" "Enfin, si la méthode :meth:`__del__` lève une exception, un message " "d'avertissement s'affiche dans :data:`sys.stderr`." -#: faq/programming.rst:1822 +#: faq/programming.rst:1828 msgid "How do I get a list of all instances of a given class?" msgstr "Comment obtenir toutes les instances d'une classe ?" -#: faq/programming.rst:1824 +#: faq/programming.rst:1830 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " @@ -2718,13 +2757,13 @@ msgstr "" "constructeur de la classe de façon à tenir un tel registre, en maintenant " "une liste de références faibles vers chaque instance." -#: faq/programming.rst:1830 +#: faq/programming.rst:1836 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" "Pourquoi le résultat de ``id()`` peut-il être le même pour deux objets " "différents ?" -#: faq/programming.rst:1832 +#: faq/programming.rst:1838 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -2738,7 +2777,7 @@ msgstr "" "à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " "Comme l'illustre le code suivant :" -#: faq/programming.rst:1843 +#: faq/programming.rst:1849 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -2750,11 +2789,11 @@ msgstr "" "objets dont on veut examiner les identifiants sont toujours en vie, créons " "une nouvelle référence à l'objet :" -#: faq/programming.rst:1856 +#: faq/programming.rst:1864 msgid "When can I rely on identity tests with the *is* operator?" msgstr "Quand puis-je raisonnablement utiliser le test d'identité *is* ?" -#: faq/programming.rst:1858 +#: faq/programming.rst:1866 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." @@ -2762,7 +2801,7 @@ msgstr "" "L'opérateur ``is`` détermine si deux objets sont identiques, c'est-à-dire le " "même objet. Le test ``a is b`` est équivalent à ``id(a) == id(b)``." -#: faq/programming.rst:1861 +#: faq/programming.rst:1869 msgid "" "The most important property of an identity test is that an object is always " "identical to itself, ``a is a`` always returns ``True``. Identity tests are " @@ -2775,7 +2814,7 @@ msgstr "" "qu'un test d'égalité. De plus, contrairement à l'opérateur ``==``, " "l'opérateur ``is`` renvoie toujours un booléen, ``True`` ou ``False``." -#: faq/programming.rst:1866 +#: faq/programming.rst:1874 msgid "" "However, identity tests can *only* be substituted for equality tests when " "object identity is assured. Generally, there are three circumstances where " @@ -2785,18 +2824,20 @@ msgstr "" "si l'identité est garantie. C'est le cas dans les trois situations " "suivantes :" -#: faq/programming.rst:1870 +#: faq/programming.rst:1878 +#, fuzzy msgid "" -"1) Assignments create new names but do not change object identity. After " -"the assignment ``new = old``, it is guaranteed that ``new is old``." +"Assignments create new names but do not change object identity. After the " +"assignment ``new = old``, it is guaranteed that ``new is old``." msgstr "" "1) Les affectations créent de nouvelles variables, mais pas de nouveaux " "objets. Après l'affectation ``nouveau = ancien``, ``nouveau is ancien`` vaut " "toujours ``True``." -#: faq/programming.rst:1873 +#: faq/programming.rst:1881 +#, fuzzy msgid "" -"2) Putting an object in a container that stores object references does not " +"Putting an object in a container that stores object references does not " "change object identity. After the list assignment ``s[0] = x``, it is " "guaranteed that ``s[0] is x``." msgstr "" @@ -2805,17 +2846,18 @@ msgstr "" "de *x* à l'indice 0, ``s[0] = x``, le test ``s[0] is x`` s'évalue forcément " "à ``True``." -#: faq/programming.rst:1877 +#: faq/programming.rst:1885 +#, fuzzy msgid "" -"3) If an object is a singleton, it means that only one instance of that " -"object can exist. After the assignments ``a = None`` and ``b = None``, it " -"is guaranteed that ``a is b`` because ``None`` is a singleton." +"If an object is a singleton, it means that only one instance of that object " +"can exist. After the assignments ``a = None`` and ``b = None``, it is " +"guaranteed that ``a is b`` because ``None`` is a singleton." msgstr "" "3) Les singletons sont des objets spéciaux qui ne sont jamais dupliqués. " "Après les affectations ``a = None`` et ``b = None``, on a forcément ``a is " "b``, puisque ``None`` est un singleton." -#: faq/programming.rst:1881 +#: faq/programming.rst:1889 msgid "" "In most other circumstances, identity tests are inadvisable and equality " "tests are preferred. In particular, identity tests should not be used to " @@ -2828,13 +2870,13 @@ msgstr "" "chaînes de caractères (type :class:`str`) car ces valeurs ne sont pas " "nécessairement des singletons ::" -#: faq/programming.rst:1898 +#: faq/programming.rst:1906 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" "De même, deux instances fraîchement créées d'un type de conteneurs mutables " "ne sont jamais identiques ::" -#: faq/programming.rst:1905 +#: faq/programming.rst:1913 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" @@ -2843,24 +2885,25 @@ msgstr "" "utiliser correctement les tests d'identité dans certaines situations " "particulières :" -#: faq/programming.rst:1908 +#: faq/programming.rst:1916 +#, fuzzy msgid "" -"1) As recommended by :pep:`8`, an identity test is the preferred way to " -"check for ``None``. This reads like plain English in code and avoids " -"confusion with other objects that may have boolean values that evaluate to " -"false." +"As recommended by :pep:`8`, an identity test is the preferred way to check " +"for ``None``. This reads like plain English in code and avoids confusion " +"with other objects that may have boolean values that evaluate to false." msgstr "" "1) Comme recommandé par la :pep:`8`, il est préférable de comparer avec " "``None`` par identité. Le test se lit comme de la prose anglaise (``x is " "None``, ``x is not None``), et cela évite des surprises avec les objets dont " "la valeur booléenne est ``False``." -#: faq/programming.rst:1912 +#: faq/programming.rst:1920 +#, fuzzy msgid "" -"2) Detecting optional arguments can be tricky when ``None`` is a valid input " +"Detecting optional arguments can be tricky when ``None`` is a valid input " "value. In those situations, you can create a singleton sentinel object " "guaranteed to be distinct from other objects. For example, here is how to " -"implement a method that behaves like :meth:`dict.pop`::" +"implement a method that behaves like :meth:`dict.pop`:" msgstr "" "2) Savoir si un paramètre facultatif a été passé ou pas peut nécessiter un " "peu de subtilité lorsque ``None`` est une valeur acceptable pour le " @@ -2868,9 +2911,10 @@ msgstr "" "« sentinelle », distinct de toute valeur acceptable. Voici par exemple " "comment écrire une méthode qui émule :meth:`dict.pop` :" -#: faq/programming.rst:1928 +#: faq/programming.rst:1938 +#, fuzzy msgid "" -"3) Container implementations sometimes need to augment equality tests with " +"Container implementations sometimes need to augment equality tests with " "identity tests. This prevents the code from being confused by objects such " "as ``float('NaN')`` that are not equal to themselves." msgstr "" @@ -2879,22 +2923,22 @@ msgstr "" "souhaité avec les objets comme ``float('NaN')`` qui ne sont pas égaux à eux-" "mêmes." -#: faq/programming.rst:1932 +#: faq/programming.rst:1942 #, fuzzy msgid "" -"For example, here is the implementation of :meth:`!collections.abc.Sequence." -"__contains__`::" +"For example, here is the implementation of :meth:`!" +"collections.abc.Sequence.__contains__`::" msgstr "" -"Par exemple, l'implémentation de :meth:`collections.abc.Sequence." -"__contains__` est ::" +"Par exemple, l'implémentation " +"de :meth:`collections.abc.Sequence.__contains__` est ::" -#: faq/programming.rst:1943 +#: faq/programming.rst:1953 msgid "" "How can a subclass control what data is stored in an immutable instance?" msgstr "" "Comment définir dans une classe fille les attributs d'une instance immuable ?" -#: faq/programming.rst:1945 +#: faq/programming.rst:1955 #, fuzzy msgid "" "When subclassing an immutable type, override the :meth:`~object.__new__` " @@ -2903,12 +2947,12 @@ msgid "" "immutable instance." msgstr "" "Lorsque l'on crée une classe héritant d'une classe d'objets immuables, il " -"faut remplacer la méthode :meth:`__new__`, et non pas la méthode :meth:" -"`__init__`. En effet, cette dernière est exécutée seulement après que " -"l'instance soit créée, donc il y est trop tard pour modifier le contenu " -"d'une instance si elle est immuable." +"faut remplacer la méthode :meth:`__new__`, et non pas la " +"méthode :meth:`__init__`. En effet, cette dernière est exécutée seulement " +"après que l'instance soit créée, donc il y est trop tard pour modifier le " +"contenu d'une instance si elle est immuable." -#: faq/programming.rst:1950 +#: faq/programming.rst:1960 msgid "" "All of these immutable classes have a different signature than their parent " "class:" @@ -2916,36 +2960,38 @@ msgstr "" "Toutes les classes d'objets immuables suivantes ont des signatures de " "constructeur différentes de leur classe mère :" -#: faq/programming.rst:1976 +#: faq/programming.rst:1986 msgid "The classes can be used like this:" msgstr "Ces classes s'utilisent comme ceci :" -#: faq/programming.rst:1993 +#: faq/programming.rst:2003 msgid "How do I cache method calls?" msgstr "Comment mettre en cache le résultat d'une méthode ?" -#: faq/programming.rst:1995 +#: faq/programming.rst:2005 msgid "" -"The two principal tools for caching methods are :func:`functools." -"cached_property` and :func:`functools.lru_cache`. The former stores results " -"at the instance level and the latter at the class level." +"The two principal tools for caching methods " +"are :func:`functools.cached_property` and :func:`functools.lru_cache`. The " +"former stores results at the instance level and the latter at the class " +"level." msgstr "" "Il existe deux outils principaux pour mettre en cache la valeur de retour " "d'une méthode, à savoir :func:`functools.cached_property`, qui stocke les " "valeurs au niveau de l'instance, et :func:`functools.lru_cache`, qui le fait " "au niveau de la classe." -#: faq/programming.rst:2000 +#: faq/programming.rst:2010 +#, fuzzy msgid "" -"The *cached_property* approach only works with methods that do not take any " -"arguments. It does not create a reference to the instance. The cached " +"The ``cached_property`` approach only works with methods that do not take " +"any arguments. It does not create a reference to the instance. The cached " "method result will be kept only as long as the instance is alive." msgstr "" "La fonction ``cached_property`` n'est applicable qu'aux méthodes sans " "argument. Elle n'induit aucune référence vers l'instance. Le cache est " "simplement conservé aussi longtemps que l'instance elle-même." -#: faq/programming.rst:2004 +#: faq/programming.rst:2014 msgid "" "The advantage is that when an instance is no longer used, the cached method " "result will be released right away. The disadvantage is that if instances " @@ -2956,9 +3002,10 @@ msgstr "" "détruite. L'inconvénient est que les caches peuvent s'accumuler avec les " "instances, sans limite de nombre." -#: faq/programming.rst:2009 +#: faq/programming.rst:2019 +#, fuzzy msgid "" -"The *lru_cache* approach works with methods that have :term:`hashable` " +"The ``lru_cache`` approach works with methods that have :term:`hashable` " "arguments. It creates a reference to the instance unless special efforts " "are made to pass in weak references." msgstr "" @@ -2967,7 +3014,7 @@ msgstr "" "l'instance, sauf à passer par des circonvolutions pour que la référence soit " "faible." -#: faq/programming.rst:2013 +#: faq/programming.rst:2023 msgid "" "The advantage of the least recently used algorithm is that the cache is " "bounded by the specified *maxsize*. The disadvantage is that instances are " @@ -2981,14 +3028,15 @@ msgstr "" "l'instance hors de portée du ramasse-miettes jusqu'à ce que l'entrée soit " "effacée du cache ou que le cache soit remis à zéro." -#: faq/programming.rst:2018 +#: faq/programming.rst:2028 msgid "This example shows the various techniques::" msgstr "Voici une démonstration des différentes techniques ::" -#: faq/programming.rst:2042 +#: faq/programming.rst:2052 +#, fuzzy msgid "" "The above example assumes that the *station_id* never changes. If the " -"relevant instance attributes are mutable, the *cached_property* approach " +"relevant instance attributes are mutable, the ``cached_property`` approach " "can't be made to work because it cannot detect changes to the attributes." msgstr "" "Cet exemple suppose que l'attribut *station_id* n'est jamais changé. Si les " @@ -2996,26 +3044,27 @@ msgstr "" "``cached_property`` ne peut pas fonctionner car elle ne peut pas détecter " "les mutations pour invalider le cache." -#: faq/programming.rst:2047 +#: faq/programming.rst:2057 #, fuzzy msgid "" -"To make the *lru_cache* approach work when the *station_id* is mutable, the " -"class needs to define the :meth:`~object.__eq__` and :meth:`~object." -"__hash__` methods so that the cache can detect relevant attribute updates::" +"To make the ``lru_cache`` approach work when the *station_id* is mutable, " +"the class needs to define the :meth:`~object.__eq__` " +"and :meth:`~object.__hash__` methods so that the cache can detect relevant " +"attribute updates::" msgstr "" "En revanche, ``lru_cache`` est utilisable à condition de définir les " "méthodes ``__eq__`` et ``__hash__`` pour que le cache soit à même de " "détecter toute modification des attributs ::" -#: faq/programming.rst:2073 +#: faq/programming.rst:2083 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:2076 +#: faq/programming.rst:2086 msgid "How do I create a .pyc file?" msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:2078 +#: faq/programming.rst:2088 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -3033,7 +3082,7 @@ msgstr "" "centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " "pour de plus amples précisions)." -#: faq/programming.rst:2086 +#: faq/programming.rst:2096 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -3048,26 +3097,28 @@ msgstr "" "utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " "par exemple pour tester un serveur Web." -#: faq/programming.rst:2091 +#: faq/programming.rst:2101 +#, fuzzy msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " -"has the ability (permissions, free space, etc...) to create a " +"has the ability (permissions, free space, and so on) to create a " "``__pycache__`` subdirectory and write the compiled module to that " "subdirectory." msgstr "" "La création du fichier ``.pyc`` est automatique durant l'importation d'un " "module si Python est capable (en termes de droits, d'espace disque, etc) de " "créer un sous-dossier ``__pycache__`` et d'écrire le module ainsi compilé " -"dans ce sous-répertoire, à moins que la variable d'environnement :envvar:" -"`PYTHONDONTWRITEBYTECODE` soit définie." +"dans ce sous-répertoire, à moins que la variable " +"d'environnement :envvar:`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:2096 +#: faq/programming.rst:2106 +#, fuzzy msgid "" -"Running Python on a top level script is not considered an import and no ``." -"pyc`` will be created. For example, if you have a top-level module ``foo." -"py`` that imports another module ``xyz.py``, when you run ``foo`` (by typing " -"``python foo.py`` as a shell command), a ``.pyc`` will be created for " +"Running Python on a top-level script is not considered an import and no " +"``.pyc`` will be created. For example, if you have a top-level module " +"``foo.py`` that imports another module ``xyz.py``, when you run ``foo`` (by " +"typing ``python foo.py`` as a shell command), a ``.pyc`` will be created for " "``xyz`` because ``xyz`` is imported, but no ``.pyc`` file will be created " "for ``foo`` since ``foo.py`` isn't being imported." msgstr "" @@ -3078,17 +3129,17 @@ msgstr "" "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:2103 +#: faq/programming.rst:2113 msgid "" -"If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." -"pyc`` file for a module that is not imported -- you can, using the :mod:" -"`py_compile` and :mod:`compileall` modules." +"If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a " +"``.pyc`` file for a module that is not imported -- you can, using " +"the :mod:`py_compile` and :mod:`compileall` modules." msgstr "" "Pour créer un fichier ``.pyc`` pour ``foo`` — c'est-à-dire créer un fichier " -"``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" -"`py_compile` et :mod:`compileall`." +"``.pyc`` pour un module qui n'est pas importé — il existe les " +"modules :mod:`py_compile` et :mod:`compileall`." -#: faq/programming.rst:2107 +#: faq/programming.rst:2117 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" @@ -3097,17 +3148,18 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:2113 +#: faq/programming.rst:2123 +#, fuzzy msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " -"``cfile``)." +"*cfile*)." msgstr "" "Ces lignes écrivent le ``.pyc`` dans un sous-dossier ``__pycache__`` à côté " "de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " "comportement)." -#: faq/programming.rst:2117 +#: faq/programming.rst:2127 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -3119,11 +3171,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:2126 +#: faq/programming.rst:2136 msgid "How do I find the current module name?" msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:2128 +#: faq/programming.rst:2138 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -3138,51 +3190,51 @@ msgstr "" "interface en ligne de commande ou un test automatique. Ils n'exécutent cette " "portion du code qu'après avoir vérifié la valeur de ``__name__`` ::" -#: faq/programming.rst:2143 +#: faq/programming.rst:2153 msgid "How can I have modules that mutually import each other?" msgstr "Comment avoir des modules qui s'importent mutuellement ?" -#: faq/programming.rst:2145 +#: faq/programming.rst:2155 msgid "Suppose you have the following modules:" msgstr "Considérons les modules suivants :" -#: faq/programming.rst:2147 +#: faq/programming.rst:2157 msgid ":file:`foo.py`::" msgstr ":file:`foo.py` ::" -#: faq/programming.rst:2152 +#: faq/programming.rst:2162 msgid ":file:`bar.py`::" msgstr ":file:`bar.py` ::" -#: faq/programming.rst:2157 +#: faq/programming.rst:2167 msgid "The problem is that the interpreter will perform the following steps:" msgstr "Le problème réside dans les étapes que l'interpréteur va réaliser :" -#: faq/programming.rst:2159 +#: faq/programming.rst:2169 msgid "main imports ``foo``" msgstr "*main* importe *foo* ;" -#: faq/programming.rst:2160 +#: faq/programming.rst:2170 msgid "Empty globals for ``foo`` are created" msgstr "Les variables globales (vides) de *foo* sont créées ;" -#: faq/programming.rst:2161 +#: faq/programming.rst:2171 msgid "``foo`` is compiled and starts executing" msgstr "*foo* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2162 +#: faq/programming.rst:2172 msgid "``foo`` imports ``bar``" msgstr "*foo* importe *bar* ;" -#: faq/programming.rst:2163 +#: faq/programming.rst:2173 msgid "Empty globals for ``bar`` are created" msgstr "Les variables globales (vides) de *bar* sont créées ;" -#: faq/programming.rst:2164 +#: faq/programming.rst:2174 msgid "``bar`` is compiled and starts executing" msgstr "*bar* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2165 +#: faq/programming.rst:2175 msgid "" "``bar`` imports ``foo`` (which is a no-op since there already is a module " "named ``foo``)" @@ -3190,16 +3242,16 @@ msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " "appelé *foo*) ;" -#: faq/programming.rst:2166 +#: faq/programming.rst:2176 msgid "" "The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " "``bar.foo_var = foo.foo_var``" msgstr "" "La mécanique des importations tente de lire *foo_var* dans les variables " -"globales de *foo* pour procéder à l'affectation ``bar.foo_var = foo." -"foo_var``." +"globales de *foo* pour procéder à l'affectation ``bar.foo_var = " +"foo.foo_var``." -#: faq/programming.rst:2168 +#: faq/programming.rst:2178 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." @@ -3207,7 +3259,7 @@ msgstr "" "La dernière étape échoue car Python n'a pas fini d'interpréter ``foo`` et le " "dictionnaire global des symboles de ``foo`` est encore vide." -#: faq/programming.rst:2171 +#: faq/programming.rst:2181 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." @@ -3215,17 +3267,17 @@ msgstr "" "Le même phénomène arrive quand on utilise ``import foo``, et qu'on essaye " "ensuite d'accéder à ``foo.foo_var`` dans le code global." -#: faq/programming.rst:2174 +#: faq/programming.rst:2184 msgid "There are (at least) three possible workarounds for this problem." msgstr "Il y a (au moins) trois façons de contourner ce problème." -#: faq/programming.rst:2176 +#: faq/programming.rst:2186 msgid "" -"Guido van Rossum recommends avoiding all uses of ``from import ..." -"``, and placing all code inside functions. Initializations of global " -"variables and class variables should use constants or built-in functions " -"only. This means everything from an imported module is referenced as " -"``.``." +"Guido van Rossum recommends avoiding all uses of ``from " +"import ...``, and placing all code inside functions. Initializations of " +"global variables and class variables should use constants or built-in " +"functions only. This means everything from an imported module is referenced " +"as ``.``." msgstr "" "Guido van Rossum déconseille d'utiliser ``from import ...`` et de " "mettre tout le code dans des fonctions. L'initialisation des variables " @@ -3233,14 +3285,14 @@ msgstr "" "des fonctions natives. Ceci implique que tout ce qui est fourni par un " "module soit référencé par ``.``." -#: faq/programming.rst:2181 +#: faq/programming.rst:2191 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" "Jim Roskind recommande d'effectuer les étapes suivantes dans cet ordre dans " "chaque module :" -#: faq/programming.rst:2183 +#: faq/programming.rst:2193 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -3248,18 +3300,18 @@ msgstr "" "les exportations (variables globales, fonctions et les classes qui ne " "nécessitent d'importer des classes mères)" -#: faq/programming.rst:2185 +#: faq/programming.rst:2195 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:2186 +#: faq/programming.rst:2196 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" "le code (avec les variables globales qui sont initialisées à partir de " "valeurs importées)." -#: faq/programming.rst:2188 +#: faq/programming.rst:2198 msgid "" "Van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." @@ -3267,7 +3319,7 @@ msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:2191 +#: faq/programming.rst:2201 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -3275,24 +3327,24 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:2194 +#: faq/programming.rst:2204 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:2198 +#: faq/programming.rst:2208 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" "``__import__('x.y.z')`` renvoie ```` ; comment accéder à ``z`` ?" -#: faq/programming.rst:2200 +#: faq/programming.rst:2210 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" msgstr "" -"Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" -"`importlib` ::" +"Utilisez plutôt la fonction :func:`~importlib.import_module` " +"de :mod:`importlib` ::" -#: faq/programming.rst:2207 +#: faq/programming.rst:2217 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -3300,7 +3352,7 @@ msgstr "" "Quand j'édite un module et que je le réimporte, je ne vois pas les " "changements. Pourquoi ?" -#: faq/programming.rst:2209 +#: faq/programming.rst:2219 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -3315,15 +3367,16 @@ msgstr "" "ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " "module, il faut faire ::" -#: faq/programming.rst:2219 +#: faq/programming.rst:2229 +#, fuzzy msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " -"containing statements like ::" +"containing statements like::" msgstr "" "Attention, cette technique ne marche pas systématiquement. En particulier, " "les modules qui contiennent des instructions comme ::" -#: faq/programming.rst:2224 +#: faq/programming.rst:2234 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -3335,7 +3388,7 @@ msgstr "" "celle-ci ne sont *pas* mises à jour avec la nouvelle définition de la " "classe. Ceci peut conduire au comportement paradoxal suivant ::" -#: faq/programming.rst:2237 +#: faq/programming.rst:2247 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" @@ -3343,6 +3396,9 @@ msgstr "" "La nature du problème apparaît clairement en affichant « l'identité » des " "objets de la classe ::" +#~ msgid "`Komodo IDE `_" +#~ msgstr "`Komodo IDE `_ ;" + #~ msgid "argument" #~ msgstr "argument" @@ -3393,8 +3449,8 @@ msgstr "" #~ msgstr "Komodo IDE (https://komodoide.com/)" #~ msgid "" -#~ "Another tool is Anthony Tuininga's `cx_Freeze `_." +#~ "Another tool is Anthony Tuininga's `cx_Freeze `_." #~ msgstr "" #~ "Un autre de ces outils est `cx_Freeze `_ d'Anthony Tuininga." @@ -3458,8 +3514,8 @@ msgstr "" #~ msgstr "" #~ "*PyChecker* est un outil d'analyse statique qui trouve les bogues dans le " #~ "code source Python et émet des avertissements relatifs à la complexité et " -#~ "au style du code. *PyChecker* est disponible sur http://pychecker." -#~ "sourceforge.net/." +#~ "au style du code. *PyChecker* est disponible sur http://" +#~ "pychecker.sourceforge.net/." #~ msgid "" #~ "`Pylint `_ is another tool that checks if a " @@ -3477,5 +3533,5 @@ msgstr "" #~ "En plus de la vérification des bogues effectuée par PyChecker, Pylint " #~ "effectue quelques vérifications supplémentaires comme la longueur des " #~ "lignes, les conventions de nommage des variables, que les interfaces " -#~ "déclarées sont implémentées en totalité, et plus encore. https://docs." -#~ "pylint.org/ fournit la liste complète des fonctionnalités de Pylint." +#~ "déclarées sont implémentées en totalité, et plus encore. https://" +#~ "docs.pylint.org/ fournit la liste complète des fonctionnalités de Pylint." diff --git a/faq/windows.po b/faq/windows.po index 1e838826d..be45c1843 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-03-26 11:57+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -117,26 +117,26 @@ msgstr "" #: faq/windows.rst:84 msgid "" "Many people use the interactive mode as a convenient yet highly programmable " -"calculator. When you want to end your interactive Python session, call the :" -"func:`exit` function or hold the :kbd:`Ctrl` key down while you enter a :kbd:" -"`Z`, then hit the \":kbd:`Enter`\" key to get back to your Windows command " -"prompt." +"calculator. When you want to end your interactive Python session, call " +"the :func:`exit` function or hold the :kbd:`Ctrl` key down while you enter " +"a :kbd:`Z`, then hit the \":kbd:`Enter`\" key to get back to your Windows " +"command prompt." msgstr "" "Beaucoup de gens utilisent le mode interactif comme une calculatrice " "pratique mais néanmoins hautement programmable. Lorsque vous souhaitez " -"mettre fin à votre session Python interactive, appelez la fonction :func:" -"`exit` ou maintenez la touche :kbd:`Ctrl` enfoncée pendant que vous entrez " -"un :kbd:`Z`, puis appuyez sur la touche \":kbd:`Enter`\" pour revenir à " -"votre invite de commande Windows." +"mettre fin à votre session Python interactive, appelez la " +"fonction :func:`exit` ou maintenez la touche :kbd:`Ctrl` enfoncée pendant " +"que vous entrez un :kbd:`Z`, puis appuyez sur la touche \":kbd:`Enter`\" " +"pour revenir à votre invite de commande Windows." #: faq/windows.rst:90 msgid "" -"You may also find that you have a Start-menu entry such as :menuselection:" -"`Start --> Programs --> Python 3.x --> Python (command line)` that results " -"in you seeing the ``>>>`` prompt in a new window. If so, the window will " -"disappear after you call the :func:`exit` function or enter the :kbd:`Ctrl-" -"Z` character; Windows is running a single \"python\" command in the window, " -"and closes it when you terminate the interpreter." +"You may also find that you have a Start-menu entry such " +"as :menuselection:`Start --> Programs --> Python 3.x --> Python (command " +"line)` that results in you seeing the ``>>>`` prompt in a new window. If " +"so, the window will disappear after you call the :func:`exit` function or " +"enter the :kbd:`Ctrl-Z` character; Windows is running a single \"python\" " +"command in the window, and closes it when you terminate the interpreter." msgstr "" "Peut-être avez-vous remarqué une nouvelle entrée dans votre menu Démarrer " "telle que :menuselection:`Démarrer --> Programmes --> Python 3.x --> Python " @@ -186,9 +186,9 @@ msgstr "" "Sous Windows, l'installateur Python associe l'extension *.py* avec un type " "de fichier (Python.File) et une commande qui lance l’interpréteur (``D:" "\\Program Files\\Python\\python.exe \"%1\" %*``). Cela suffit pour pouvoir " -"exécuter les scripts Python depuis la ligne de commande en saisissant *foo." -"py*. Si vous souhaitez pouvoir exécuter les scripts en saisissant simplement " -"*foo* sans l’extension, vous devez ajouter *.py* au paramètre " +"exécuter les scripts Python depuis la ligne de commande en saisissant " +"*foo.py*. Si vous souhaitez pouvoir exécuter les scripts en saisissant " +"simplement *foo* sans l’extension, vous devez ajouter *.py* au paramètre " "d’environnement PATHEXT." #: faq/windows.rst:124 @@ -292,9 +292,10 @@ msgstr "" msgid "" "Do **not** build Python into your .exe file directly. On Windows, Python " "must be a DLL to handle importing modules that are themselves DLL's. (This " -"is the first key undocumented fact.) Instead, link to :file:`python{NN}." -"dll`; it is typically installed in ``C:\\Windows\\System``. *NN* is the " -"Python version, a number such as \"33\" for Python 3.3." +"is the first key undocumented fact.) Instead, link " +"to :file:`python{NN}.dll`; it is typically installed in ``C:" +"\\Windows\\System``. *NN* is the Python version, a number such as \"33\" " +"for Python 3.3." msgstr "" "Ne compilez **pas** Python directement dans votre fichier *.exe*. Sous " "Windows, Python doit être une DLL pour pouvoir importer des modules qui sont " @@ -313,10 +314,10 @@ msgid "" msgstr "" "Vous pouvez créer un lien vers Python de deux manières différentes. Un lien " "au moment du chargement signifie pointer vers :file:`python{NN}.lib`, tandis " -"qu'un lien au moment de l'exécution signifie pointer vers :file:`python{NN}." -"dll`. (Note générale : :file:`python{NN}.lib` est le soi-disant « *import " -"lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " -"liens symboliques pour l'éditeur de liens.)" +"qu'un lien au moment de l'exécution signifie pointer " +"vers :file:`python{NN}.dll`. (Note générale : :file:`python{NN}.lib` est le " +"soi-disant « *import lib* » correspondant à :file:`python{NN}.dll`. Il " +"définit simplement des liens symboliques pour l'éditeur de liens.)" #: faq/windows.rst:182 msgid "" @@ -329,13 +330,14 @@ msgid "" "API." msgstr "" "La liaison en temps réel simplifie grandement les options de liaison ; tout " -"se passe au moment de l'exécution. Votre code doit charger :file:" -"`python{NN}.dll` en utilisant la routine Windows ``LoadLibraryEx()``. Le " -"code doit aussi utiliser des routines d'accès et des données dans :file:" -"`python{NN}.dll` (c'est-à-dire les API C de Python) en utilisant des " -"pointeurs obtenus par la routine Windows ``GetProcAddress()``. Les macros " -"peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " -"appelle des routines dans l'API C de Python." +"se passe au moment de l'exécution. Votre code doit " +"charger :file:`python{NN}.dll` en utilisant la routine Windows " +"``LoadLibraryEx()``. Le code doit aussi utiliser des routines d'accès et " +"des données dans :file:`python{NN}.dll` (c'est-à-dire les API C de Python) " +"en utilisant des pointeurs obtenus par la routine Windows " +"``GetProcAddress()``. Les macros peuvent rendre l'utilisation de ces " +"pointeurs transparente à tout code C qui appelle des routines dans l'API C " +"de Python." #: faq/windows.rst:191 msgid "" @@ -477,10 +479,10 @@ msgstr "" #: faq/windows.rst:262 msgid "" "Under any editor, mixing tabs and spaces is a bad idea. MSVC is no " -"different in this respect, and is easily configured to use spaces: Take :" -"menuselection:`Tools --> Options --> Tabs`, and for file type \"Default\" " -"set \"Tab size\" and \"Indent size\" to 4, and select the \"Insert spaces\" " -"radio button." +"different in this respect, and is easily configured to use spaces: " +"Take :menuselection:`Tools --> Options --> Tabs`, and for file type " +"\"Default\" set \"Tab size\" and \"Indent size\" to 4, and select the " +"\"Insert spaces\" radio button." msgstr "" "Quel que soit votre éditeur, mélanger des tabulations et des espaces est une " "mauvaise idée. *Visual C++*, par exemple, peut être facilement configuré " @@ -491,8 +493,8 @@ msgstr "" #: faq/windows.rst:267 msgid "" "Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and " -"spaces are causing problems in leading whitespace. You may also run the :mod:" -"`tabnanny` module to check a directory tree in batch mode." +"spaces are causing problems in leading whitespace. You may also run " +"the :mod:`tabnanny` module to check a directory tree in batch mode." msgstr "" "Python va lever :exc:`IndentationError` ou :exc:`TabError` si un mélange de " "tabulation et d’indentation pose problème en début de ligne. Vous pouvez " @@ -538,8 +540,8 @@ msgstr "" "l'installation manuelle de la mise à jour du *C Runtime*." #~ msgid "" -#~ "Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." -#~ "exe first." +#~ "Borland note: convert :file:`python{NN}.lib` to OMF format using " +#~ "Coff2Omf.exe first." #~ msgstr "" #~ "Note Borland : convertir :file:`python{NN}.lib` au format OMF en " #~ "utilisant *Coff2Omf.exe* en premier." diff --git a/glossary.po b/glossary.po index 86504ac5c..184d18d21 100644 --- a/glossary.po +++ b/glossary.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2023-10-05 22:23-0600\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2026-10-29 15:28+0100\n" "Last-Translator: James Adjinwa \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.4\n" +"X-Generator: Poedit 3.6\n" #: glossary.rst:5 msgid "Glossary" @@ -24,14 +24,14 @@ msgid "``>>>``" msgstr "``>>>``" #: glossary.rst:12 -#, fuzzy msgid "" "The default Python prompt of the :term:`interactive` shell. Often seen for " "code examples which can be executed interactively in the interpreter." msgstr "" -"L'invite de commande utilisée par défaut dans l'interpréteur interactif. On " -"la voit souvent dans des exemples de code qui peuvent être exécutés " -"interactivement dans l'interpréteur." +"L'invite de commande utilisée par défaut dans " +"l'interpréteur :term:`interactif `. On la voit souvent dans des " +"exemples de code qui peuvent être exécutés interactivement dans " +"l'interpréteur." #: glossary.rst:15 msgid "``...``" @@ -42,94 +42,115 @@ msgid "Can refer to:" msgstr "Peut faire référence à :" #: glossary.rst:19 -#, fuzzy msgid "" "The default Python prompt of the :term:`interactive` shell when entering the " "code for an indented code block, when within a pair of matching left and " "right delimiters (parentheses, square brackets, curly braces or triple " "quotes), or after specifying a decorator." msgstr "" -"L'invite de commande utilisée par défaut dans l'interpréteur interactif " -"lorsqu'on entre un bloc de code indenté, dans des délimiteurs fonctionnant " -"par paires (parenthèses, crochets, accolades, triple guillemets), ou après " -"un avoir spécifié un décorateur." +"L'invite de commande utilisée par défaut dans " +"l'interpréteur :term:`interactif ` lorsqu'on entre un bloc de " +"code indenté, dans des délimiteurs fonctionnant par paires (parenthèses, " +"crochets, accolades, triple guillemets), ou après un avoir spécifié un " +"décorateur." -#: glossary.rst:24 -msgid "The :const:`Ellipsis` built-in constant." -msgstr "La constante :const:`Ellipsis`." +#: glossary.rst:26 +msgid "" +"The three dots form of the :ref:`Ellipsis ` object." +msgstr "" +"La forme en points de suspension de l'objet :ref:`ellipse `." -#: glossary.rst:25 +#: glossary.rst:27 msgid "abstract base class" -msgstr "classe mère abstraite" +msgstr "classe abstraite" -#: glossary.rst:27 +#: glossary.rst:29 msgid "" "Abstract base classes complement :term:`duck-typing` by providing a way to " "define interfaces when other techniques like :func:`hasattr` would be clumsy " "or subtly wrong (for example with :ref:`magic methods `). " "ABCs introduce virtual subclasses, which are classes that don't inherit from " -"a class but are still recognized by :func:`isinstance` and :func:" -"`issubclass`; see the :mod:`abc` module documentation. Python comes with " -"many built-in ABCs for data structures (in the :mod:`collections.abc` " -"module), numbers (in the :mod:`numbers` module), streams (in the :mod:`io` " -"module), import finders and loaders (in the :mod:`importlib.abc` module). " -"You can create your own ABCs with the :mod:`abc` module." -msgstr "" -"Les classes mères abstraites (ABC, suivant l'abréviation anglaise *Abstract " +"a class but are still recognized by :func:`isinstance` " +"and :func:`issubclass`; see the :mod:`abc` module documentation. Python " +"comes with many built-in ABCs for data structures (in " +"the :mod:`collections.abc` module), numbers (in the :mod:`numbers` module), " +"streams (in the :mod:`io` module), import finders and loaders (in " +"the :mod:`importlib.abc` module). You can create your own ABCs with " +"the :mod:`abc` module." +msgstr "" +"Les classes abstraites (ABC, suivant l'abréviation anglaise *Abstract " "Base Class*) complètent le :term:`duck-typing` en fournissant un moyen de " -"définir des interfaces pour les cas où d'autres techniques comme :func:" -"`hasattr` seraient inélégantes ou subtilement fausses (par exemple avec les :" -"ref:`méthodes magiques `). Les ABC introduisent des sous-" -"classes virtuelles qui n'héritent pas d'une classe mais qui sont quand même " -"reconnues par :func:`isinstance` ou :func:`issubclass` (voir la " -"documentation du module :mod:`abc`). Python contient de nombreuses ABC pour " -"les structures de données (dans le module :mod:`collections.abc`), les " -"nombres (dans le module :mod:`numbers`), les flux (dans le module :mod:`io`) " -"et les chercheurs-chargeurs du système d'importation (dans le module :mod:" -"`importlib.abc`). Vous pouvez créer vos propres ABC avec le module :mod:" -"`abc`." - -#: glossary.rst:38 +"définir des interfaces pour les cas où d'autres techniques " +"comme :func:`hasattr` seraient inélégantes ou subtilement fausses (par " +"exemple avec les :ref:`méthodes magiques `). Les ABC " +"introduisent des sous-classes virtuelles qui n'héritent pas d'une classe " +"mais qui sont quand même reconnues par :func:`isinstance` " +"ou :func:`issubclass` (voir la documentation du module :mod:`abc`). Python " +"contient de nombreuses ABC pour les structures de données (dans le " +"module :mod:`collections.abc`), les nombres (dans le module :mod:`numbers`), " +"les flux (dans le module :mod:`io`) et les chercheurs-chargeurs du système " +"d'importation (dans le module :mod:`importlib.abc`). Vous pouvez créer vos " +"propres ABC avec le module :mod:`abc`." + +#: glossary.rst:40 +msgid "annotate function" +msgstr "fonction annotate" + +#: glossary.rst:42 +msgid "" +"A callable that can be called to retrieve the :term:`annotations " +"` of an object. Annotate functions are usually :term:`functions " +"`, automatically generated as the :attr:`~object.__annotate__` " +"attribute of functions, classes, and modules. Annotate functions are a " +"subset of :term:`evaluate functions `." +msgstr "" + +#: glossary.rst:47 msgid "annotation" msgstr "annotation" -#: glossary.rst:40 +#: glossary.rst:49 msgid "" "A label associated with a variable, a class attribute or a function " "parameter or return value, used by convention as a :term:`type hint`." msgstr "" "Étiquette associée à une variable, un attribut de classe, un paramètre de " -"fonction ou une valeur de retour. Elle est utilisée par convention comme :" -"term:`type hint`." +"fonction ou une valeur de retour. Elle est utilisée par convention " +"comme :term:`type hint`." -#: glossary.rst:44 +#: glossary.rst:53 +#, fuzzy msgid "" "Annotations of local variables cannot be accessed at runtime, but " -"annotations of global variables, class attributes, and functions are stored " -"in the :attr:`__annotations__` special attribute of modules, classes, and " -"functions, respectively." +"annotations of global variables, class attributes, and functions can be " +"retrieved by calling :func:`annotationlib.get_annotations` on modules, " +"classes, and functions, respectively." msgstr "" "Les annotations de variables locales ne sont pas accessibles au moment de " "l'exécution, mais les annotations de variables globales, d'attributs de " -"classe et de fonctions sont stockées dans l'attribut spécial :attr:" -"`__annotations__` des modules, classes et fonctions, respectivement." +"classe et de fonctions sont stockées dans l'attribut " +"spécial :attr:`__annotations__` des modules, classes et fonctions, " +"respectivement." -#: glossary.rst:50 +#: glossary.rst:58 +#, fuzzy msgid "" -"See :term:`variable annotation`, :term:`function annotation`, :pep:`484` " -"and :pep:`526`, which describe this functionality. Also see :ref:" -"`annotations-howto` for best practices on working with annotations." +"See :term:`variable annotation`, :term:`function " +"annotation`, :pep:`484`, :pep:`526`, and :pep:`649`, which describe this " +"functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." msgstr "" "Voir :term:`annotation de variable`, :term:`annotation " "de fonction`, les :pep:`484` et :pep:`526`, qui " "décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les " "bonnes pratiques concernant les annotations." -#: glossary.rst:54 +#: glossary.rst:62 msgid "argument" msgstr "argument" -#: glossary.rst:56 +#: glossary.rst:64 msgid "" "A value passed to a :term:`function` (or :term:`method`) when calling the " "function. There are two kinds of argument:" @@ -137,7 +158,7 @@ msgstr "" "Valeur, donnée à une :term:`fonction` ou à une :term:`méthode` lors de son " "appel. Il existe deux types d'arguments :" -#: glossary.rst:59 +#: glossary.rst:67 msgid "" ":dfn:`keyword argument`: an argument preceded by an identifier (e.g. " "``name=``) in a function call or passed as a value in a dictionary preceded " @@ -149,7 +170,7 @@ msgstr "" "fonction. Par exemple, ``3`` et ``5`` sont tous les deux des arguments " "nommés dans l'appel à :func:`complex` ici ::" -#: glossary.rst:67 +#: glossary.rst:75 msgid "" ":dfn:`positional argument`: an argument that is not a keyword argument. " "Positional arguments can appear at the beginning of an argument list and/or " @@ -161,7 +182,7 @@ msgstr "" "forme d'un :term:`itérable` précédé par ``*``. Par exemple, ``3`` et ``5`` " "sont tous les deux des arguments positionnels dans les appels suivants ::" -#: glossary.rst:76 +#: glossary.rst:84 msgid "" "Arguments are assigned to the named local variables in a function body. See " "the :ref:`calls` section for the rules governing this assignment. " @@ -174,36 +195,36 @@ msgstr "" "argument, et c'est la valeur résultante de l'expression qui sera affectée à " "la variable locale." -#: glossary.rst:81 +#: glossary.rst:89 msgid "" "See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " "and :pep:`362`." msgstr "" -"Voir aussi :term:`paramètre` dans le glossaire, la question :ref:" -"`Différence entre argument et paramètre ` de la " -"FAQ et la :pep:`362`." +"Voir aussi :term:`paramètre` dans le glossaire, la " +"question :ref:`Différence entre argument et paramètre ` de la FAQ et la :pep:`362`." -#: glossary.rst:84 +#: glossary.rst:92 msgid "asynchronous context manager" msgstr "gestionnaire de contexte asynchrone" -#: glossary.rst:86 +#: glossary.rst:94 msgid "" "An object which controls the environment seen in an :keyword:`async with` " -"statement by defining :meth:`~object.__aenter__` and :meth:`~object." -"__aexit__` methods. Introduced by :pep:`492`." +"statement by defining :meth:`~object.__aenter__` " +"and :meth:`~object.__aexit__` methods. Introduced by :pep:`492`." msgstr "" "(*asynchronous context manager* en anglais) Objet contrôlant l'environnement " "à l'intérieur d'une instruction :keyword:`async with` en définissant les " "méthodes :meth:`~object.__aenter__` et :meth:`~object.__aexit__`. A été " "Introduit par la :pep:`492`." -#: glossary.rst:89 +#: glossary.rst:97 msgid "asynchronous generator" msgstr "générateur asynchrone" -#: glossary.rst:91 +#: glossary.rst:99 msgid "" "A function which returns an :term:`asynchronous generator iterator`. It " "looks like a coroutine function defined with :keyword:`async def` except " @@ -212,11 +233,11 @@ msgid "" msgstr "" "Fonction qui renvoie un :term:`itérateur de générateur asynchrone " "`. Cela ressemble à une coroutine définie " -"par :keyword:`async def`, sauf qu'elle contient une ou des expressions :" -"keyword:`yield` produisant ainsi uns série de valeurs utilisables dans une " -"boucle :keyword:`async for`." +"par :keyword:`async def`, sauf qu'elle contient une ou des " +"expressions :keyword:`yield` produisant ainsi uns série de valeurs " +"utilisables dans une boucle :keyword:`async for`." -#: glossary.rst:96 +#: glossary.rst:104 msgid "" "Usually refers to an asynchronous generator function, but may refer to an " "*asynchronous generator iterator* in some contexts. In cases where the " @@ -227,7 +248,7 @@ msgstr "" "contextes. Dans les cas où le sens voulu n'est pas clair, utiliser " "l'ensemble des termes lève l’ambiguïté." -#: glossary.rst:100 +#: glossary.rst:108 msgid "" "An asynchronous generator function may contain :keyword:`await` expressions " "as well as :keyword:`async for`, and :keyword:`async with` statements." @@ -235,47 +256,49 @@ msgstr "" "Un générateur asynchrone peut contenir des expressions :keyword:`await` " "ainsi que des instructions :keyword:`async for`, et :keyword:`async with`." -#: glossary.rst:103 +#: glossary.rst:111 msgid "asynchronous generator iterator" msgstr "itérateur de générateur asynchrone" -#: glossary.rst:105 -msgid "An object created by a :term:`asynchronous generator` function." +#: glossary.rst:113 +#, fuzzy +msgid "An object created by an :term:`asynchronous generator` function." msgstr "" "Objet créé par un :term:`générateur asynchrone `." -#: glossary.rst:107 +#: glossary.rst:115 msgid "" -"This is an :term:`asynchronous iterator` which when called using the :meth:" -"`~object.__anext__` method returns an awaitable object which will execute " -"the body of the asynchronous generator function until the next :keyword:" -"`yield` expression." +"This is an :term:`asynchronous iterator` which when called using " +"the :meth:`~object.__anext__` method returns an awaitable object which will " +"execute the body of the asynchronous generator function until the " +"next :keyword:`yield` expression." msgstr "" "C'est un :term:`asynchronous iterator` qui, lorsqu'il est appelé via la " "méthode :meth:`~object.__anext__` renvoie un objet *awaitable* qui exécute " -"le corps de la fonction du générateur asynchrone jusqu'au prochain :keyword:" -"`yield`." +"le corps de la fonction du générateur asynchrone jusqu'au " +"prochain :keyword:`yield`." -#: glossary.rst:112 +#: glossary.rst:120 +#, fuzzy msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " -"location execution state (including local variables and pending try-" -"statements). When the *asynchronous generator iterator* effectively resumes " -"with another awaitable returned by :meth:`~object.__anext__`, it picks up " -"where it left off. See :pep:`492` and :pep:`525`." +"execution state (including local variables and pending try-statements). " +"When the *asynchronous generator iterator* effectively resumes with another " +"awaitable returned by :meth:`~object.__anext__`, it picks up where it left " +"off. See :pep:`492` and :pep:`525`." msgstr "" "Chaque :keyword:`yield` suspend temporairement l'exécution, en gardant en " "mémoire l'emplacement et l'état de l'exécution (ce qui inclut les variables " "locales et les *try* en cours). Lorsque l'exécution de l'itérateur de " -"générateur asynchrone reprend avec un nouvel *awaitable* renvoyé par :meth:" -"`~object.__anext__`, elle repart de là où elle s'était arrêtée. Voir les :" -"pep:`492` et :pep:`525`." +"générateur asynchrone reprend avec un nouvel *awaitable* renvoyé " +"par :meth:`~object.__anext__`, elle repart de là où elle s'était arrêtée. " +"Voir les :pep:`492` et :pep:`525`." -#: glossary.rst:117 +#: glossary.rst:125 msgid "asynchronous iterable" msgstr "itérable asynchrone" -#: glossary.rst:119 +#: glossary.rst:127 msgid "" "An object, that can be used in an :keyword:`async for` statement. Must " "return an :term:`asynchronous iterator` from its :meth:`~object.__aiter__` " @@ -285,30 +308,79 @@ msgstr "" "méthode :meth:`~object.__aiter__` doit renvoyer un :term:`asynchronous " "iterator`. A été introduit par la :pep:`492`." -#: glossary.rst:122 +#: glossary.rst:130 msgid "asynchronous iterator" msgstr "itérateur asynchrone" -#: glossary.rst:124 +#: glossary.rst:132 +msgid "" +"An object that implements the :meth:`~object.__aiter__` " +"and :meth:`~object.__anext__` methods. :meth:`~object.__anext__` must " +"return an :term:`awaitable` object. :keyword:`async for` resolves the " +"awaitables returned by an asynchronous iterator's :meth:`~object.__anext__` " +"method until it raises a :exc:`StopAsyncIteration` exception. Introduced " +"by :pep:`492`." +msgstr "" +"Objet qui implémente les méthodes :meth:`~object.__aiter__` " +"et :meth:`~object.__anext__`. :meth:`~object.__anext__` doit renvoyer un " +"objet :term:`awaitable`. Tant que la méthode :meth:`~object.__anext__` " +"produit des objets *awaitable*, le :keyword:`async for` appelant les " +"consomme. L'itérateur asynchrone lève une " +"exception :exc:`StopAsyncIteration` pour signifier la fin de l'itération. A " +"été introduit par la :pep:`492`." + +#: glossary.rst:137 +msgid "atomic operation" +msgstr "" + +#: glossary.rst:139 msgid "" -"An object that implements the :meth:`~object.__aiter__` and :meth:`~object." -"__anext__` methods. :meth:`~object.__anext__` must return an :term:" -"`awaitable` object. :keyword:`async for` resolves the awaitables returned by " -"an asynchronous iterator's :meth:`~object.__anext__` method until it raises " -"a :exc:`StopAsyncIteration` exception. Introduced by :pep:`492`." +"An operation that appears to execute as a single, indivisible step: no other " +"thread can observe it half-done, and its effects become visible all at " +"once. Python does not guarantee that high-level statements are atomic (for " +"example, ``x += 1`` performs multiple bytecode operations and is not " +"atomic). Atomicity is only guaranteed where explicitly documented. See " +"also :term:`race condition` and :term:`data race`." msgstr "" -"Objet qui implémente les méthodes :meth:`~object.__aiter__` et :meth:" -"`~object.__anext__`. :meth:`~object.__anext__` doit renvoyer un objet :term:" -"`awaitable`. Tant que la méthode :meth:`~object.__anext__` produit des " -"objets *awaitable*, le :keyword:`async for` appelant les consomme. " -"L'itérateur asynchrone lève une exception :exc:`StopAsyncIteration` pour " -"signifier la fin de l'itération. A été introduit par la :pep:`492`." -#: glossary.rst:129 +#: glossary.rst:145 +msgid "attached thread state" +msgstr "" + +#: glossary.rst:148 +msgid "A :term:`thread state` that is active for the current OS thread." +msgstr "" + +#: glossary.rst:150 +msgid "" +"When a :term:`thread state` is attached, the OS thread has access to the " +"full Python C API and can safely invoke the bytecode interpreter." +msgstr "" + +#: glossary.rst:154 +msgid "" +"Unless a function explicitly notes otherwise, attempting to call the C API " +"without an attached thread state will result in a fatal error or undefined " +"behavior. A thread state can be attached and detached explicitly by the " +"user through the C API, or implicitly by the runtime, including during " +"blocking C calls and by the bytecode interpreter in between calls." +msgstr "" + +#: glossary.rst:161 +msgid "" +"On most builds of Python, having an attached thread state implies that the " +"caller holds the :term:`GIL` for the current interpreter, so only one OS " +"thread can have an attached thread state at a given moment. In :term:`free-" +"threaded builds ` of Python, threads can concurrently " +"hold an attached thread state, allowing for true parallelism of the bytecode " +"interpreter." +msgstr "" + +#: glossary.rst:167 msgid "attribute" msgstr "attribut" -#: glossary.rst:131 +#: glossary.rst:169 msgid "" "A value associated with an object which is usually referenced by name using " "dotted expressions. For example, if an object *o* has an attribute *a* it " @@ -318,79 +390,79 @@ msgstr "" "notation utilisant des points. Par exemple, si un objet *o* possède un " "attribut *a*, cet attribut est référencé par *o.a*." -#: glossary.rst:136 +#: glossary.rst:174 msgid "" "It is possible to give an object an attribute whose name is not an " -"identifier as defined by :ref:`identifiers`, for example using :func:" -"`setattr`, if the object allows it. Such an attribute will not be accessible " -"using a dotted expression, and would instead need to be retrieved with :func:" -"`getattr`." +"identifier as defined by :ref:`identifiers`, for example " +"using :func:`setattr`, if the object allows it. Such an attribute will not " +"be accessible using a dotted expression, and would instead need to be " +"retrieved with :func:`getattr`." msgstr "" "Il est possible de donner à un objet un attribut dont le nom n'est pas un " "identifiant tel que défini pour les :ref:`identifiers`, par exemple en " "utilisant :func:`setattr`, si l'objet le permet. Un tel attribut ne sera pas " -"accessible à l'aide d'une expression pointée et on devra y accéder avec :" -"func:`getattr`." +"accessible à l'aide d'une expression pointée et on devra y accéder " +"avec :func:`getattr`." -#: glossary.rst:141 +#: glossary.rst:179 msgid "awaitable" msgstr "attendable (*awaitable*)" -#: glossary.rst:143 +#: glossary.rst:181 msgid "" -"An object that can be used in an :keyword:`await` expression. Can be a :" -"term:`coroutine` or an object with an :meth:`~object.__await__` method. See " -"also :pep:`492`." +"An object that can be used in an :keyword:`await` expression. Can be " +"a :term:`coroutine` or an object with an :meth:`~object.__await__` method. " +"See also :pep:`492`." msgstr "" "Objet pouvant être utilisé dans une expression :keyword:`await`. Ce peut " -"être une :term:`coroutine` ou un objet avec une méthode :meth:`~object." -"__await__`. Voir aussi la :pep:`492`." +"être une :term:`coroutine` ou un objet avec une " +"méthode :meth:`~object.__await__`. Voir aussi la :pep:`492`." -#: glossary.rst:146 +#: glossary.rst:184 msgid "BDFL" msgstr "BDFL" -#: glossary.rst:148 +#: glossary.rst:186 msgid "" -"Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." +"Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." msgstr "" "Dictateur bienveillant à vie (*Benevolent Dictator For Life* en anglais). " "Pseudonyme de `Guido van Rossum `_, le " "créateur de Python." -#: glossary.rst:150 +#: glossary.rst:188 msgid "binary file" msgstr "fichier binaire" -#: glossary.rst:152 +#: glossary.rst:190 #, fuzzy msgid "" "A :term:`file object` able to read and write :term:`bytes-like objects " "`. Examples of binary files are files opened in binary " -"mode (``'rb'``, ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer `, :data:`sys.stdout.buffer `, and instances of :class:`io." -"BytesIO` and :class:`gzip.GzipFile`." +"mode (``'rb'``, ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer " +"`, :data:`sys.stdout.buffer `, and instances " +"of :class:`io.BytesIO` and :class:`gzip.GzipFile`." msgstr "" "Un :term:`file object` capable de lire et d'écrire des :term:`bytes-like " "objects `. Des fichiers binaires sont, par exemple, les " -"fichiers ouverts en mode binaire (``'rb'``, ``'wb'``, ou ``'rb+'``), :data:" -"`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les instances de :class:`io." -"BytesIO` ou de :class:`gzip.GzipFile`." +"fichiers ouverts en mode binaire (``'rb'``, ``'wb'``, ou " +"``'rb+'``), :data:`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les " +"instances de :class:`io.BytesIO` ou de :class:`gzip.GzipFile`." -#: glossary.rst:159 +#: glossary.rst:197 msgid "" -"See also :term:`text file` for a file object able to read and write :class:" -"`str` objects." +"See also :term:`text file` for a file object able to read and " +"write :class:`str` objects." msgstr "" "Consultez :term:`fichier texte`, un objet fichier capable de lire et " "d'écrire des objets :class:`str`." -#: glossary.rst:161 +#: glossary.rst:199 msgid "borrowed reference" msgstr "référence empruntée" -#: glossary.rst:163 +#: glossary.rst:201 #, fuzzy msgid "" "In Python's C API, a borrowed reference is a reference to an object, where " @@ -404,49 +476,49 @@ msgstr "" "qui conduit à la disparition de la dernière :term:`référence forte` vers " "l'objet." -#: glossary.rst:169 +#: glossary.rst:207 msgid "" "Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " "to convert it to a :term:`strong reference` in-place, except when the object " -"cannot be destroyed before the last usage of the borrowed reference. The :c:" -"func:`Py_NewRef` function can be used to create a new :term:`strong " +"cannot be destroyed before the last usage of the borrowed reference. " +"The :c:func:`Py_NewRef` function can be used to create a new :term:`strong " "reference`." msgstr "" "Il est recommandé d'appeler :c:func:`Py_INCREF` sur la :term:`référence " "empruntée`, ce qui la transforme *in situ* en une :term:`référence forte`. " "Vous pouvez faire une exception si vous êtes certain que l'objet ne peut pas " "être supprimé avant la dernière utilisation de la référence empruntée. Voir " -"aussi la fonction :c:func:`Py_NewRef`, qui crée une nouvelle :term:" -"`référence forte`." +"aussi la fonction :c:func:`Py_NewRef`, qui crée une " +"nouvelle :term:`référence forte`." -#: glossary.rst:174 +#: glossary.rst:212 msgid "bytes-like object" msgstr "objet octet-compatible" -#: glossary.rst:176 +#: glossary.rst:214 msgid "" -"An object that supports the :ref:`bufferobjects` and can export a C-:term:" -"`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " -"and :class:`array.array` objects, as well as many common :class:`memoryview` " -"objects. Bytes-like objects can be used for various operations that work " -"with binary data; these include compression, saving to a binary file, and " -"sending over a socket." +"An object that supports the :ref:`bufferobjects` and can export a " +"C-:term:`contiguous` buffer. This includes " +"all :class:`bytes`, :class:`bytearray`, and :class:`array.array` objects, as " +"well as many common :class:`memoryview` objects. Bytes-like objects can be " +"used for various operations that work with binary data; these include " +"compression, saving to a binary file, and sending over a socket." msgstr "" "Un objet gérant le :ref:`protocole tampon ` et pouvant " "exporter un tampon (*buffer* en anglais) C-:term:`contigu `. " -"Cela inclut les objets :class:`bytes`, :class:`bytearray` et :class:`array." -"array`, ainsi que beaucoup d'objets :class:`memoryview`. Les objets octets-" -"compatibles peuvent être utilisés pour diverses opérations sur des données " -"binaires, comme la compression, la sauvegarde dans un fichier binaire ou " -"l'envoi sur le réseau." +"Cela inclut les objets :class:`bytes`, :class:`bytearray` " +"et :class:`array.array`, ainsi que beaucoup d'objets :class:`memoryview`. " +"Les objets octets-compatibles peuvent être utilisés pour diverses opérations " +"sur des données binaires, comme la compression, la sauvegarde dans un " +"fichier binaire ou l'envoi sur le réseau." -#: glossary.rst:183 +#: glossary.rst:221 msgid "" "Some operations need the binary data to be mutable. The documentation often " "refers to these as \"read-write bytes-like objects\". Example mutable " -"buffer objects include :class:`bytearray` and a :class:`memoryview` of a :" -"class:`bytearray`. Other operations require the binary data to be stored in " -"immutable objects (\"read-only bytes-like objects\"); examples of these " +"buffer objects include :class:`bytearray` and a :class:`memoryview` of " +"a :class:`bytearray`. Other operations require the binary data to be stored " +"in immutable objects (\"read-only bytes-like objects\"); examples of these " "include :class:`bytes` and a :class:`memoryview` of a :class:`bytes` object." msgstr "" "Certaines opérations nécessitent de travailler sur des données binaires " @@ -454,14 +526,14 @@ msgstr "" "like objects*. Par exemple, :class:`bytearray` ou une :class:`memoryview` " "d'un :class:`bytearray` en font partie. D'autres opérations nécessitent de " "travailler sur des données binaires stockées dans des objets immuables " -"(« *objets octets-compatibles en lecture seule* »), par exemple des :class:" -"`bytes` ou des :class:`memoryview` d'un objet :class:`bytes`." +"(« *objets octets-compatibles en lecture seule* »), par exemple " +"des :class:`bytes` ou des :class:`memoryview` d'un objet :class:`bytes`." -#: glossary.rst:191 +#: glossary.rst:229 msgid "bytecode" msgstr "code intermédiaire (*bytecode*)" -#: glossary.rst:193 +#: glossary.rst:231 msgid "" "Python source code is compiled into bytecode, the internal representation of " "a Python program in the CPython interpreter. The bytecode is also cached in " @@ -482,19 +554,19 @@ msgstr "" "intermédiaire n'a pas vocation à fonctionner sur différentes machines " "virtuelles Python ou à être stable entre différentes versions de Python." -#: glossary.rst:203 +#: glossary.rst:241 msgid "" -"A list of bytecode instructions can be found in the documentation for :ref:" -"`the dis module `." +"A list of bytecode instructions can be found in the documentation " +"for :ref:`the dis module `." msgstr "" "La documentation du :ref:`module dis ` fournit une liste des " "instructions du code intermédiaire." -#: glossary.rst:205 +#: glossary.rst:243 msgid "callable" msgstr "appelable (*callable*)" -#: glossary.rst:207 +#: glossary.rst:245 msgid "" "A callable is an object that can be called, possibly with a set of arguments " "(see :term:`argument`), with the following syntax::" @@ -502,7 +574,7 @@ msgstr "" "Un appelable est un objet qui peut être appelé, éventuellement avec un " "ensemble d'arguments (voir :term:`argument`), avec la syntaxe suivante ::" -#: glossary.rst:212 +#: glossary.rst:250 msgid "" "A :term:`function`, and by extension a :term:`method`, is a callable. An " "instance of a class that implements the :meth:`~object.__call__` method is " @@ -512,11 +584,11 @@ msgstr "" "`, est un appelable. Une instance d'une classe qui implémente la " "méthode :meth:`~object.__call__` est également un appelable." -#: glossary.rst:215 +#: glossary.rst:253 msgid "callback" msgstr "fonction de rappel (*callback*)" -#: glossary.rst:217 +#: glossary.rst:255 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." @@ -524,11 +596,11 @@ msgstr "" "Une fonction (classique, par opposition à une coroutine) passée en argument " "pour être exécutée plus tard." -#: glossary.rst:219 +#: glossary.rst:257 msgid "class" msgstr "classe" -#: glossary.rst:221 +#: glossary.rst:259 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -537,11 +609,11 @@ msgstr "" "classe (*class*) contient normalement des définitions de méthodes qui " "agissent sur les instances de la classe." -#: glossary.rst:224 +#: glossary.rst:262 msgid "class variable" msgstr "variable de classe" -#: glossary.rst:226 +#: glossary.rst:264 msgid "" "A variable defined in a class and intended to be modified only at class " "level (i.e., not in an instance of the class)." @@ -549,28 +621,28 @@ msgstr "" "Une variable définie dans une classe et destinée à être modifiée uniquement " "au niveau de la classe (c'est-à-dire, pas dans une instance de la classe)." -#: glossary.rst:228 +#: glossary.rst:266 #, fuzzy msgid "closure variable" msgstr "variable de classe" -#: glossary.rst:230 +#: glossary.rst:268 msgid "" "A :term:`free variable` referenced from a :term:`nested scope` that is " "defined in an outer scope rather than being resolved at runtime from the " -"globals or builtin namespaces. May be explicitly defined with the :keyword:" -"`nonlocal` keyword to allow write access, or implicitly defined if the " -"variable is only being read." +"globals or builtin namespaces. May be explicitly defined with " +"the :keyword:`nonlocal` keyword to allow write access, or implicitly defined " +"if the variable is only being read." msgstr "" -#: glossary.rst:235 +#: glossary.rst:273 msgid "" "For example, in the ``inner`` function in the following code, both ``x`` and " "``print`` are :term:`free variables `, but only ``x`` is a " "*closure variable*::" msgstr "" -#: glossary.rst:246 +#: glossary.rst:284 msgid "" "Due to the :attr:`codeobject.co_freevars` attribute (which, despite its " "name, only includes the names of closure variables rather than listing all " @@ -579,11 +651,11 @@ msgid "" "closure variables." msgstr "" -#: glossary.rst:250 +#: glossary.rst:288 msgid "complex number" msgstr "nombre complexe" -#: glossary.rst:252 +#: glossary.rst:290 msgid "" "An extension of the familiar real number system in which all numbers are " "expressed as a sum of a real part and an imaginary part. Imaginary numbers " @@ -606,62 +678,90 @@ msgstr "" "Les nombres complexes sont un concept assez avancé en mathématiques. Si vous " "ne connaissez pas ce concept, vous pouvez tranquillement les ignorer." -#: glossary.rst:262 +#: glossary.rst:300 +msgid "concurrency" +msgstr "" + +#: glossary.rst:302 +msgid "" +"The ability of a computer program to perform multiple tasks at the same " +"time. Python provides libraries for writing programs that make use of " +"different forms of concurrency. :mod:`asyncio` is a library for dealing " +"with asynchronous tasks and coroutines. :mod:`threading` provides access to " +"operating system threads and :mod:`multiprocessing` to operating system " +"processes. Multi-core processors can execute threads and processes on " +"different CPU cores at the same time (see :term:`parallelism`)." +msgstr "" + +#: glossary.rst:310 +msgid "concurrent modification" +msgstr "" + +#: glossary.rst:312 +msgid "" +"When multiple threads modify shared data at the same time. Concurrent " +"modification without proper synchronization can cause :term:`race conditions " +"`, and might also trigger a :term:`data race `, " +"data corruption, or both." +msgstr "" + +#: glossary.rst:316 #, fuzzy msgid "context" msgstr "gestionnaire de contexte" -#: glossary.rst:264 +#: glossary.rst:318 msgid "" "This term has different meanings depending on where and how it is used. Some " "common meanings:" msgstr "" -#: glossary.rst:267 +#: glossary.rst:321 msgid "" "The temporary state or environment established by a :term:`context manager` " "via a :keyword:`with` statement." msgstr "" -#: glossary.rst:269 +#: glossary.rst:323 msgid "" -"The collection of key­value bindings associated with a particular :class:" -"`contextvars.Context` object and accessed via :class:`~contextvars." -"ContextVar` objects. Also see :term:`context variable`." +"The collection of key­value bindings associated with a " +"particular :class:`contextvars.Context` object and accessed " +"via :class:`~contextvars.ContextVar` objects. Also see :term:`context " +"variable`." msgstr "" -#: glossary.rst:273 +#: glossary.rst:327 msgid "" "A :class:`contextvars.Context` object. Also see :term:`current context`." msgstr "" -#: glossary.rst:275 +#: glossary.rst:329 #, fuzzy msgid "context management protocol" msgstr "gestionnaire de contexte" -#: glossary.rst:277 +#: glossary.rst:331 msgid "" "The :meth:`~object.__enter__` and :meth:`~object.__exit__` methods called by " "the :keyword:`with` statement. See :pep:`343`." msgstr "" -#: glossary.rst:279 +#: glossary.rst:333 msgid "context manager" msgstr "gestionnaire de contexte" -#: glossary.rst:281 +#: glossary.rst:335 msgid "" "An object which implements the :term:`context management protocol` and " -"controls the environment seen in a :keyword:`with` statement. See :pep:" -"`343`." +"controls the environment seen in a :keyword:`with` statement. " +"See :pep:`343`." msgstr "" -#: glossary.rst:284 +#: glossary.rst:338 msgid "context variable" msgstr "variable de contexte" -#: glossary.rst:286 +#: glossary.rst:340 msgid "" "A variable whose value depends on which context is the :term:`current " "context`. Values are accessed via :class:`contextvars.ContextVar` objects. " @@ -669,11 +769,11 @@ msgid "" "asynchronous tasks." msgstr "" -#: glossary.rst:290 +#: glossary.rst:344 msgid "contiguous" msgstr "contigu" -#: glossary.rst:294 +#: glossary.rst:348 msgid "" "A buffer is considered contiguous exactly if it is either *C-contiguous* or " "*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " @@ -693,11 +793,11 @@ msgstr "" "leur adresse mémoire. À l'inverse, dans les tableaux Fortran-contigu, c’est " "le premier indice qui doit varier le plus rapidement." -#: glossary.rst:302 +#: glossary.rst:356 msgid "coroutine" msgstr "coroutine" -#: glossary.rst:304 +#: glossary.rst:358 msgid "" "Coroutines are a more generalized form of subroutines. Subroutines are " "entered at one point and exited at another point. Coroutines can be " @@ -710,27 +810,27 @@ msgstr "" "être implémentées en utilisant l'instruction :keyword:`async def`. Voir " "aussi la :pep:`492`." -#: glossary.rst:309 +#: glossary.rst:363 msgid "coroutine function" msgstr "fonction coroutine" -#: glossary.rst:311 +#: glossary.rst:365 msgid "" "A function which returns a :term:`coroutine` object. A coroutine function " -"may be defined with the :keyword:`async def` statement, and may contain :" -"keyword:`await`, :keyword:`async for`, and :keyword:`async with` keywords. " -"These were introduced by :pep:`492`." +"may be defined with the :keyword:`async def` statement, and may " +"contain :keyword:`await`, :keyword:`async for`, and :keyword:`async with` " +"keywords. These were introduced by :pep:`492`." msgstr "" "Fonction qui renvoie un objet :term:`coroutine`. Une fonction coroutine peut " "être définie par l'instruction :keyword:`async def` et peut contenir les " "mots clés :keyword:`await`, :keyword:`async for` ainsi que :keyword:`async " "with`. A été introduit par la :pep:`492`." -#: glossary.rst:316 +#: glossary.rst:370 msgid "CPython" msgstr "CPython" -#: glossary.rst:318 +#: glossary.rst:372 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -742,25 +842,71 @@ msgstr "" "est utilisé dans certains contextes lorsqu'il est nécessaire de distinguer " "cette implémentation des autres comme *Jython* ou *IronPython*." -#: glossary.rst:322 +#: glossary.rst:376 msgid "current context" msgstr "" -#: glossary.rst:324 +#: glossary.rst:378 msgid "" "The :term:`context` (:class:`contextvars.Context` object) that is currently " "used by :class:`~contextvars.ContextVar` objects to access (get or set) the " "values of :term:`context variables `. Each thread has its " -"own current context. Frameworks for executing asynchronous tasks (see :mod:" -"`asyncio`) associate each task with a context which becomes the current " -"context whenever the task starts or resumes execution." +"own current context. Frameworks for executing asynchronous tasks " +"(see :mod:`asyncio`) associate each task with a context which becomes the " +"current context whenever the task starts or resumes execution." +msgstr "" + +#: glossary.rst:384 +msgid "cyclic isolate" +msgstr "" + +#: glossary.rst:386 +msgid "" +"A subgroup of one or more objects that reference each other in a reference " +"cycle, but are not referenced by objects outside the group. The goal of " +"the :term:`cyclic garbage collector ` is to identify " +"these groups and break the reference cycles so that the memory can be " +"reclaimed." +msgstr "" + +#: glossary.rst:390 +msgid "data race" +msgstr "" + +#: glossary.rst:392 +msgid "" +"A situation where multiple threads access the same memory location " +"concurrently, at least one of the accesses is a write, and the threads do " +"not use any synchronization to control their access. Data races lead " +"to :term:`non-deterministic` behavior and can cause data corruption. Proper " +"use of :term:`locks ` and other :term:`synchronization primitives " +"` prevents data races. Note that data races can " +"only happen in native code, but that :term:`native code` might be exposed in " +"a Python API. See also :term:`race condition` and :term:`thread-safe`." +msgstr "" + +#: glossary.rst:401 +msgid "deadlock" +msgstr "" + +#: glossary.rst:403 +msgid "" +"A situation in which two or more tasks (threads, processes, or coroutines) " +"wait indefinitely for each other to release resources or complete actions, " +"preventing any from making progress. For example, if thread A holds lock 1 " +"and waits for lock 2, while thread B holds lock 2 and waits for lock 1, both " +"threads will wait indefinitely. In Python this often arises from acquiring " +"multiple locks in conflicting orders or from circular join/await " +"dependencies. Deadlocks can be avoided by always acquiring " +"multiple :term:`locks ` in a consistent order. See also :term:`lock` " +"and :term:`reentrant`." msgstr "" -#: glossary.rst:330 +#: glossary.rst:412 msgid "decorator" msgstr "décorateur" -#: glossary.rst:332 +#: glossary.rst:414 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -768,10 +914,10 @@ msgid "" msgstr "" "Fonction dont la valeur de retour est une autre fonction. Un décorateur est " "habituellement utilisé pour transformer une fonction via la syntaxe " -"``@wrapper``, dont les exemples typiques sont : :func:`classmethod` et :func:" -"`staticmethod`." +"``@wrapper``, dont les exemples typiques sont : :func:`classmethod` " +"et :func:`staticmethod`." -#: glossary.rst:336 +#: glossary.rst:418 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -779,59 +925,61 @@ msgstr "" "La syntaxe des décorateurs est simplement du sucre syntaxique, les " "définitions des deux fonctions suivantes sont sémantiquement équivalentes ::" -#: glossary.rst:347 +#: glossary.rst:429 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " "definitions ` for more about decorators." msgstr "" "Quoique moins fréquemment utilisé, le même concept existe pour les classes. " -"Consultez la documentation :ref:`définitions de fonctions ` et :" -"ref:`définitions de classes ` pour en savoir plus sur les décorateurs." +"Consultez la documentation :ref:`définitions de fonctions ` " +"et :ref:`définitions de classes ` pour en savoir plus sur les " +"décorateurs." -#: glossary.rst:350 +#: glossary.rst:432 msgid "descriptor" msgstr "descripteur" -#: glossary.rst:352 +#: glossary.rst:434 #, fuzzy msgid "" -"Any object which defines the methods :meth:`~object.__get__`, :meth:`~object." -"__set__`, or :meth:`~object.__delete__`. When a class attribute is a " -"descriptor, its special binding behavior is triggered upon attribute " -"lookup. Normally, using *a.b* to get, set or delete an attribute looks up " -"the object named *b* in the class dictionary for *a*, but if *b* is a " -"descriptor, the respective descriptor method gets called. Understanding " -"descriptors is a key to a deep understanding of Python because they are the " -"basis for many features including functions, methods, properties, class " -"methods, static methods, and reference to super classes." -msgstr "" -"N'importe quel objet définissant les méthodes :meth:`__get__`, :meth:" -"`__set__`, ou :meth:`__delete__`. Lorsque l'attribut d'une classe est un " -"descripteur, son comportement spécial est déclenché lors de la recherche des " -"attributs. Normalement, lorsque vous écrivez *a.b* pour obtenir, affecter ou " -"effacer un attribut, Python recherche l'objet nommé *b* dans le dictionnaire " -"de la classe de *a*. Mais si *b* est un descripteur, c'est la méthode de ce " -"descripteur qui est alors appelée. Comprendre les descripteurs est requis " -"pour avoir une compréhension approfondie de Python, ils sont la base de " -"nombre de ses caractéristiques notamment les fonctions, méthodes, " -"propriétés, méthodes de classes, méthodes statiques et les références aux " -"classes parentes." +"Any object which defines the " +"methods :meth:`~object.__get__`, :meth:`~object.__set__`, " +"or :meth:`~object.__delete__`. When a class attribute is a descriptor, its " +"special binding behavior is triggered upon attribute lookup. Normally, " +"using *a.b* to get, set or delete an attribute looks up the object named *b* " +"in the class dictionary for *a*, but if *b* is a descriptor, the respective " +"descriptor method gets called. Understanding descriptors is a key to a deep " +"understanding of Python because they are the basis for many features " +"including functions, methods, properties, class methods, static methods, and " +"reference to super classes." +msgstr "" +"N'importe quel objet définissant les " +"méthodes :meth:`__get__`, :meth:`__set__`, ou :meth:`__delete__`. Lorsque " +"l'attribut d'une classe est un descripteur, son comportement spécial est " +"déclenché lors de la recherche des attributs. Normalement, lorsque vous " +"écrivez *a.b* pour obtenir, affecter ou effacer un attribut, Python " +"recherche l'objet nommé *b* dans le dictionnaire de la classe de *a*. Mais " +"si *b* est un descripteur, c'est la méthode de ce descripteur qui est alors " +"appelée. Comprendre les descripteurs est requis pour avoir une compréhension " +"approfondie de Python, ils sont la base de nombre de ses caractéristiques " +"notamment les fonctions, méthodes, propriétés, méthodes de classes, méthodes " +"statiques et les références aux classes parentes." -#: glossary.rst:363 +#: glossary.rst:445 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." msgstr "" -"Pour plus d'informations sur les méthodes des descripteurs, consultez :ref:" -"`descriptors` ou le :ref:`guide pour l'utilisation des descripteurs " -"`." +"Pour plus d'informations sur les méthodes des descripteurs, " +"consultez :ref:`descriptors` ou le :ref:`guide pour l'utilisation des " +"descripteurs `." -#: glossary.rst:365 +#: glossary.rst:447 msgid "dictionary" msgstr "dictionnaire" -#: glossary.rst:367 +#: glossary.rst:449 #, fuzzy msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " @@ -839,14 +987,14 @@ msgid "" "methods. Called a hash in Perl." msgstr "" "Structure de donnée associant des clés à des valeurs. Les clés peuvent être " -"n'importe quel objet possédant les méthodes :meth:`__hash__` et :meth:" -"`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." +"n'importe quel objet possédant les méthodes :meth:`__hash__` " +"et :meth:`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." -#: glossary.rst:371 +#: glossary.rst:453 msgid "dictionary comprehension" msgstr "dictionnaire en compréhension (ou dictionnaire en intension)" -#: glossary.rst:373 +#: glossary.rst:455 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " @@ -858,29 +1006,29 @@ msgstr "" "n in range(10)}`` génère un dictionnaire contenant des clés ``n`` liées à " "leurs valeurs ``n ** 2``. Voir :ref:`compréhensions `." -#: glossary.rst:377 +#: glossary.rst:459 msgid "dictionary view" msgstr "vue de dictionnaire" -#: glossary.rst:379 +#: glossary.rst:461 msgid "" -"The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" -"`dict.items` are called dictionary views. They provide a dynamic view on the " -"dictionary’s entries, which means that when the dictionary changes, the view " -"reflects these changes. To force the dictionary view to become a full list " -"use ``list(dictview)``. See :ref:`dict-views`." +"The objects returned from :meth:`dict.keys`, :meth:`dict.values`, " +"and :meth:`dict.items` are called dictionary views. They provide a dynamic " +"view on the dictionary’s entries, which means that when the dictionary " +"changes, the view reflects these changes. To force the dictionary view to " +"become a full list use ``list(dictview)``. See :ref:`dict-views`." msgstr "" -"Objets retournés par les méthodes :meth:`dict.keys`, :meth:`dict.values` et :" -"meth:`dict.items`. Ils fournissent des vues dynamiques des entrées du " +"Objets retournés par les méthodes :meth:`dict.keys`, :meth:`dict.values` " +"et :meth:`dict.items`. Ils fournissent des vues dynamiques des entrées du " "dictionnaire, ce qui signifie que lorsque le dictionnaire change, la vue " "change. Pour transformer une vue en vraie liste, utilisez " "``list(dictview)``. Voir :ref:`dict-views`." -#: glossary.rst:385 +#: glossary.rst:467 msgid "docstring" msgstr "chaîne de documentation (*docstring*)" -#: glossary.rst:387 +#: glossary.rst:469 #, fuzzy msgid "" "A string literal which appears as the first expression in a class, function " @@ -895,21 +1043,21 @@ msgstr "" "fonction ou du module. Comme cette chaîne est disponible par introspection, " "c'est l'endroit idéal pour documenter l'objet." -#: glossary.rst:393 +#: glossary.rst:475 msgid "duck-typing" msgstr "typage canard (*duck-typing*)" -#: glossary.rst:395 +#: glossary.rst:477 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " "called or used (\"If it looks like a duck and quacks like a duck, it must be " "a duck.\") By emphasizing interfaces rather than specific types, well-" "designed code improves its flexibility by allowing polymorphic " -"substitution. Duck-typing avoids tests using :func:`type` or :func:" -"`isinstance`. (Note, however, that duck-typing can be complemented with :" -"term:`abstract base classes `.) Instead, it typically " -"employs :func:`hasattr` tests or :term:`EAFP` programming." +"substitution. Duck-typing avoids tests using :func:`type` " +"or :func:`isinstance`. (Note, however, that duck-typing can be complemented " +"with :term:`abstract base classes `.) Instead, it " +"typically employs :func:`hasattr` tests or :term:`EAFP` programming." msgstr "" "Style de programmation qui ne prend pas en compte le type d'un objet pour " "déterminer s'il respecte une interface, mais qui appelle simplement la " @@ -918,15 +1066,28 @@ msgstr "" "interfaces plutôt que les types, du code bien construit améliore sa " "flexibilité en autorisant des substitutions polymorphiques. Le *duck-typing* " "évite de vérifier les types via :func:`type` ou :func:`isinstance`, Notez " -"cependant que le *duck-typing* peut travailler de pair avec les :term:" -"`classes mère abstraites `. À la place, le *duck-" -"typing* utilise plutôt :func:`hasattr` ou la programmation :term:`EAFP`." +"cependant que le *duck-typing* peut travailler de pair avec " +"les :term:`classes abstraites `. À la place, le " +"*duck-typing* utilise plutôt :func:`hasattr` ou la " +"programmation :term:`EAFP`." + +#: glossary.rst:486 +#, fuzzy +msgid "dunder" +msgstr "chercheur" + +#: glossary.rst:488 +msgid "" +"An informal short-hand for \"double underscore\", used when talking about " +"a :term:`special method`. For example, ``__init__`` is often pronounced " +"\"dunder init\"." +msgstr "" -#: glossary.rst:404 +#: glossary.rst:491 msgid "EAFP" msgstr "EAFP" -#: glossary.rst:406 +#: glossary.rst:493 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " @@ -939,15 +1100,27 @@ msgstr "" "Ask for Forgiveness than Permission* en anglais). Ce style de développement " "Python fait l'hypothèse que le code est valide et traite les exceptions si " "cette hypothèse s'avère fausse. Ce style, propre et efficace, est " -"caractérisé par la présence de beaucoup de mots clés :keyword:`try` et :" -"keyword:`except`. Cette technique de programmation contraste avec le style :" -"term:`LBYL` utilisé couramment dans les langages tels que C." +"caractérisé par la présence de beaucoup de mots clés :keyword:`try` " +"et :keyword:`except`. Cette technique de programmation contraste avec le " +"style :term:`LBYL` utilisé couramment dans les langages tels que C." -#: glossary.rst:412 +#: glossary.rst:499 +#, fuzzy +msgid "evaluate function" +msgstr "fonction clé" + +#: glossary.rst:501 +msgid "" +"A function that can be called to evaluate a lazily evaluated attribute of an " +"object, such as the value of type aliases created with the :keyword:`type` " +"statement." +msgstr "" + +#: glossary.rst:504 msgid "expression" msgstr "expression" -#: glossary.rst:414 +#: glossary.rst:506 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " @@ -962,16 +1135,16 @@ msgstr "" "suite d'éléments tels que des noms, opérateurs, littéraux, accès " "d'attributs, méthodes ou fonctions qui aboutissent à une valeur. " "Contrairement à beaucoup d'autres langages, les différentes constructions du " -"langage ne sont pas toutes des expressions. On trouve également des :term:" -"`instructions ` qui ne peuvent pas être utilisées comme " +"langage ne sont pas toutes des expressions. On trouve également " +"des :term:`instructions ` qui ne peuvent pas être utilisées comme " "expressions, tel que :keyword:`while`. Les affectations sont également des " "instructions et non des expressions." -#: glossary.rst:421 +#: glossary.rst:513 msgid "extension module" msgstr "module d'extension" -#: glossary.rst:423 +#: glossary.rst:515 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -979,25 +1152,31 @@ msgstr "" "Module écrit en C ou C++, utilisant l'API C de Python pour interagir avec " "Python et le code de l'utilisateur." -#: glossary.rst:425 +#: glossary.rst:517 msgid "f-string" msgstr "f-string" -#: glossary.rst:427 +#: glossary.rst:518 +#, fuzzy +msgid "f-strings" +msgstr "f-string" + +#: glossary.rst:520 +#, fuzzy msgid "" -"String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" +"String literals prefixed with ``f`` or ``F`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " "See also :pep:`498`." msgstr "" "Chaîne littérale préfixée de ``'f'`` ou ``'F'``. Les \"f-strings\" sont un " -"raccourci pour :ref:`formatted string literals `. Voir la :pep:" -"`498`." +"raccourci pour :ref:`formatted string literals `. Voir " +"la :pep:`498`." -#: glossary.rst:430 +#: glossary.rst:523 msgid "file object" msgstr "objet fichier" -#: glossary.rst:432 +#: glossary.rst:525 #, fuzzy msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " @@ -1015,7 +1194,7 @@ msgstr "" "réseau…). Les objets fichiers sont aussi appelés :dfn:`file-like-objects` " "ou :dfn:`streams`." -#: glossary.rst:440 +#: glossary.rst:533 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -1023,26 +1202,26 @@ msgid "" "The canonical way to create a file object is by using the :func:`open` " "function." msgstr "" -"Il existe en réalité trois catégories de fichiers objets : les :term:" -"`fichiers binaires ` bruts, les :term:`fichiers binaires " -"` avec tampon (*buffer*) et les :term:`fichiers textes " -"`. Leurs interfaces sont définies dans le module :mod:`io`. " -"Le moyen le plus simple et direct de créer un objet fichier est d'utiliser " -"la fonction :func:`open`." +"Il existe en réalité trois catégories de fichiers objets : " +"les :term:`fichiers binaires ` bruts, les :term:`fichiers " +"binaires ` avec tampon (*buffer*) et les :term:`fichiers " +"textes `. Leurs interfaces sont définies dans le " +"module :mod:`io`. Le moyen le plus simple et direct de créer un objet " +"fichier est d'utiliser la fonction :func:`open`." -#: glossary.rst:445 +#: glossary.rst:538 msgid "file-like object" msgstr "objet fichier-compatible" -#: glossary.rst:447 +#: glossary.rst:540 msgid "A synonym for :term:`file object`." msgstr "Synonyme de :term:`objet fichier`." -#: glossary.rst:448 +#: glossary.rst:541 msgid "filesystem encoding and error handler" msgstr "encodage du système de fichiers et gestionnaire d'erreurs associé" -#: glossary.rst:450 +#: glossary.rst:543 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." @@ -1051,7 +1230,7 @@ msgstr "" "octets fournis par le système d'exploitation et encoder les chaînes de " "caractères Unicode afin de les passer au système." -#: glossary.rst:453 +#: glossary.rst:546 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " @@ -1061,38 +1240,39 @@ msgstr "" "les octets jusqu'à 128. Si ce n'est pas le cas, certaines fonctions de l'API " "lèvent :exc:`UnicodeError`." -#: glossary.rst:457 +#: glossary.rst:550 msgid "" -"The :func:`sys.getfilesystemencoding` and :func:`sys." -"getfilesystemencodeerrors` functions can be used to get the filesystem " -"encoding and error handler." +"The :func:`sys.getfilesystemencoding` " +"and :func:`sys.getfilesystemencodeerrors` functions can be used to get the " +"filesystem encoding and error handler." msgstr "" "Cet encodage et son gestionnaire d'erreur peuvent être obtenus à l'aide des " -"fonctions :func:`sys.getfilesystemencoding` et :func:`sys." -"getfilesystemencodeerrors`." +"fonctions :func:`sys.getfilesystemencoding` " +"et :func:`sys.getfilesystemencodeerrors`." -#: glossary.rst:461 +#: glossary.rst:554 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " -"startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." -"filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" -"c:type:`PyConfig`." +"startup by the :c:func:`PyConfig_Read` function: " +"see :c:member:`~PyConfig.filesystem_encoding` " +"and :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." msgstr "" "L':term:`encodage du système de fichiers et gestionnaire d'erreurs associé " "` sont configurés au démarrage de " -"Python par la fonction :c:func:`PyConfig_Read` : regardez :c:member:" -"`~PyConfig.filesystem_encoding` et :c:member:`~PyConfig.filesystem_errors` " -"dans les membres de :c:type:`PyConfig`." +"Python par la fonction :c:func:`PyConfig_Read` : " +"regardez :c:member:`~PyConfig.filesystem_encoding` " +"et :c:member:`~PyConfig.filesystem_errors` dans les membres " +"de :c:type:`PyConfig`." -#: glossary.rst:466 +#: glossary.rst:559 msgid "See also the :term:`locale encoding`." msgstr "Voir aussi :term:`encodage régional`." -#: glossary.rst:467 +#: glossary.rst:560 msgid "finder" msgstr "chercheur" -#: glossary.rst:469 +#: glossary.rst:562 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1100,29 +1280,29 @@ msgstr "" "Objet qui essaie de trouver un :term:`chargeur ` pour le module en " "cours d'importation." -#: glossary.rst:472 +#: glossary.rst:565 #, fuzzy msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." msgstr "" -"Depuis Python 3.3, il existe deux types de chercheurs : les :term:" -"`chercheurs dans les méta-chemins ` à utiliser avec :data:" -"`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." +"Depuis Python 3.3, il existe deux types de chercheurs : " +"les :term:`chercheurs dans les méta-chemins ` à utiliser " +"avec :data:`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." -#: glossary.rst:476 +#: glossary.rst:569 #, fuzzy msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "Voir les :pep:`302`, :pep:`420` et :pep:`451` pour plus de détails." -#: glossary.rst:477 +#: glossary.rst:570 msgid "floor division" msgstr "division entière" -#: glossary.rst:479 +#: glossary.rst:572 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1133,27 +1313,41 @@ msgstr "" "Division mathématique arrondissant à l'entier inférieur. L'opérateur de la " "division entière est ``//``. Par exemple l'expression ``11 // 4`` vaut " "``2``, contrairement à ``11 / 4`` qui vaut ``2.75``. Notez que ``(-11) // " -"4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir la :pep:" -"`328`." +"4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir " +"la :pep:`328`." -#: glossary.rst:484 +#: glossary.rst:577 msgid "free threading" msgstr "" -#: glossary.rst:486 +#: glossary.rst:579 msgid "" "A threading model where multiple threads can run Python bytecode " -"simultaneously within the same interpreter. This is in contrast to the :" -"term:`global interpreter lock` which allows only one thread to execute " +"simultaneously within the same interpreter. This is in contrast to " +"the :term:`global interpreter lock` which allows only one thread to execute " "Python bytecode at a time. See :pep:`703`." msgstr "" -#: glossary.rst:490 +#: glossary.rst:583 +msgid "free-threaded build" +msgstr "" + +#: glossary.rst:586 +msgid "" +"A build of :term:`CPython` that supports :term:`free threading`, configured " +"using the :option:`--disable-gil` option before compilation." +msgstr "" + +#: glossary.rst:589 +msgid "See :ref:`freethreading-python-howto`." +msgstr "" + +#: glossary.rst:590 #, fuzzy msgid "free variable" msgstr "variable de contexte" -#: glossary.rst:492 +#: glossary.rst:592 msgid "" "Formally, as defined in the :ref:`language execution model `, a " "free variable is any variable used in a namespace which is not a local " @@ -1163,48 +1357,48 @@ msgid "" "variable`." msgstr "" -#: glossary.rst:497 +#: glossary.rst:597 msgid "function" msgstr "fonction" -#: glossary.rst:499 +#: glossary.rst:599 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " -"execution of the body. See also :term:`parameter`, :term:`method`, and the :" -"ref:`function` section." +"execution of the body. See also :term:`parameter`, :term:`method`, and " +"the :ref:`function` section." msgstr "" "Suite d'instructions qui renvoie une valeur à son appelant. On peut lui " "passer des :term:`arguments ` qui pourront être utilisés dans le " -"corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` et :ref:" -"`function`." +"corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` " +"et :ref:`function`." -#: glossary.rst:503 +#: glossary.rst:603 msgid "function annotation" msgstr "annotation de fonction" -#: glossary.rst:505 +#: glossary.rst:605 msgid "An :term:`annotation` of a function parameter or return value." msgstr ":term:`annotation` d'un paramètre de fonction ou valeur de retour." -#: glossary.rst:507 +#: glossary.rst:607 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " "and is also expected to have an :class:`int` return value::" msgstr "" -"Les annotations de fonctions sont généralement utilisées pour des :term:" -"`indications de types ` : par exemple, cette fonction devrait " -"prendre deux arguments :class:`int` et devrait également avoir une valeur de " -"retour de type :class:`int` ::" +"Les annotations de fonctions sont généralement utilisées pour " +"des :term:`indications de types ` : par exemple, cette fonction " +"devrait prendre deux arguments :class:`int` et devrait également avoir une " +"valeur de retour de type :class:`int` ::" -#: glossary.rst:515 +#: glossary.rst:615 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "" -"L'annotation syntaxique de la fonction est expliquée dans la section :ref:" -"`function`." +"L'annotation syntaxique de la fonction est expliquée dans la " +"section :ref:`function`." -#: glossary.rst:517 +#: glossary.rst:617 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1214,16 +1408,16 @@ msgstr "" "qui décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur " "les bonnes pratiques concernant les annotations." -#: glossary.rst:521 +#: glossary.rst:621 msgid "__future__" msgstr "__future__" -#: glossary.rst:523 +#: glossary.rst:623 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " -"that will become standard in a future release of Python. The :mod:" -"`__future__` module documents the possible values of *feature*. By " +"that will become standard in a future release of Python. " +"The :mod:`__future__` module documents the possible values of *feature*. By " "importing this module and evaluating its variables, you can see when a new " "feature was first added to the language and when it will (or did) become the " "default::" @@ -1238,11 +1432,11 @@ msgstr "" "fonctionnalité en question, notamment la version de Python dans laquelle " "elle a été ajoutée, et celle dans laquelle elle deviendra standard ::" -#: glossary.rst:534 +#: glossary.rst:634 msgid "garbage collection" msgstr "ramasse-miettes" -#: glossary.rst:536 +#: glossary.rst:636 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1255,11 +1449,11 @@ msgstr "" "et casser les références circulaires. Le ramasse-miettes peut être contrôlé " "en utilisant le module :mod:`gc`." -#: glossary.rst:542 +#: glossary.rst:642 msgid "generator" msgstr "générateur" -#: glossary.rst:544 +#: glossary.rst:644 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " @@ -1271,7 +1465,7 @@ msgstr "" "expressions :keyword:`yield` produisant une série de valeurs utilisable dans " "une boucle *for* ou récupérées une à une via la fonction :func:`next`." -#: glossary.rst:549 +#: glossary.rst:649 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " @@ -1282,20 +1476,21 @@ msgstr "" "cas où le sens voulu n'est pas clair, utiliser les termes complets lève " "l’ambiguïté." -#: glossary.rst:552 +#: glossary.rst:652 msgid "generator iterator" msgstr "itérateur de générateur" -#: glossary.rst:554 +#: glossary.rst:654 msgid "An object created by a :term:`generator` function." msgstr "Objet créé par une fonction :term:`générateur`." -#: glossary.rst:556 +#: glossary.rst:656 +#, fuzzy msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " -"location execution state (including local variables and pending try-" -"statements). When the *generator iterator* resumes, it picks up where it " -"left off (in contrast to functions which start fresh on every invocation)." +"execution state (including local variables and pending try-statements). " +"When the *generator iterator* resumes, it picks up where it left off (in " +"contrast to functions which start fresh on every invocation)." msgstr "" "Chaque :keyword:`yield` suspend temporairement l'exécution, en se rappelant " "l'endroit et l'état de l'exécution (y compris les variables locales et les " @@ -1303,11 +1498,11 @@ msgstr "" "il en était (contrairement à une fonction qui prendrait un nouveau départ à " "chaque invocation)." -#: glossary.rst:563 +#: glossary.rst:663 msgid "generator expression" msgstr "expression génératrice" -#: glossary.rst:565 +#: glossary.rst:665 #, fuzzy msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " @@ -1320,11 +1515,11 @@ msgstr "" "intervalle et une clause :keyword:`!if` optionnelle. Toute cette expression " "génère des valeurs pour la fonction qui l'entoure ::" -#: glossary.rst:572 +#: glossary.rst:672 msgid "generic function" msgstr "fonction générique" -#: glossary.rst:574 +#: glossary.rst:674 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1334,51 +1529,52 @@ msgstr "" "pour différents types. L'implémentation à utiliser est déterminée lors de " "l'appel par l'algorithme de répartition." -#: glossary.rst:578 +#: glossary.rst:678 msgid "" -"See also the :term:`single dispatch` glossary entry, the :func:`functools." -"singledispatch` decorator, and :pep:`443`." +"See also the :term:`single dispatch` glossary entry, " +"the :func:`functools.singledispatch` decorator, and :pep:`443`." msgstr "" -"Voir aussi :term:`single dispatch`, le décorateur :func:`functools." -"singledispatch` et la :pep:`443`." +"Voir aussi :term:`single dispatch`, le " +"décorateur :func:`functools.singledispatch` et la :pep:`443`." -#: glossary.rst:580 +#: glossary.rst:680 msgid "generic type" msgstr "type générique" -#: glossary.rst:582 +#: glossary.rst:682 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " -"class` such as :class:`list` or :class:`dict`. Used for :" -"term:`type hints ` and :term:`annotations `." +"class` such as :class:`list` or :class:`dict`. Used " +"for :term:`type hints ` and :term:`annotations `." msgstr "" "Un :term:`type` qui peut être paramétré ; généralement un :ref:`conteneur " -"` comme :class:`list` ou :class:`dict`. Utilisé pour les :" -"term:`indications de type ` et les :term:`annotations " +"` comme :class:`list` ou :class:`dict`. Utilisé pour " +"les :term:`indications de type ` et les :term:`annotations " "`." -#: glossary.rst:587 +#: glossary.rst:687 msgid "" -"For more details, see :ref:`generic alias types`, :pep:" -"`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." +"For more details, see :ref:`generic alias types`, :pep:`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` " +"module." msgstr "" "Pour plus de détails, voir :ref:`types alias génériques ` et le module :mod:`typing`. On trouvera l'historique de " "cette fonctionnalité dans les :pep:`483`, :pep:`484` et :pep:`585`." -#: glossary.rst:589 +#: glossary.rst:689 msgid "GIL" msgstr "GIL" -#: glossary.rst:591 +#: glossary.rst:691 msgid "See :term:`global interpreter lock`." msgstr "Voir :term:`global interpreter lock`." -#: glossary.rst:592 +#: glossary.rst:692 msgid "global interpreter lock" msgstr "verrou global de l'interpréteur" -#: glossary.rst:594 +#: glossary.rst:694 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1388,17 +1584,17 @@ msgid "" "multi-threaded, at the expense of much of the parallelism afforded by multi-" "processor machines." msgstr "" -"(*global interpreter lock* en anglais) Mécanisme utilisé par l'interpréteur :" -"term:`CPython` pour s'assurer qu'un seul fil d'exécution (*thread* en " -"anglais) n'exécute le :term:`bytecode` à la fois. Cela simplifie " -"l'implémentation de CPython en rendant le modèle objet (incluant des parties " -"critiques comme la classe native :class:`dict`) implicitement protégé contre " -"les accès concourants. Verrouiller l'interpréteur entier rend plus facile " -"l'implémentation de multiples fils d'exécution (*multi-thread* en anglais), " -"au détriment malheureusement de beaucoup du parallélisme possible sur les " -"machines ayant plusieurs processeurs." +"(*global interpreter lock* en anglais) Mécanisme utilisé par " +"l'interpréteur :term:`CPython` pour s'assurer qu'un seul fil d'exécution " +"(*thread* en anglais) n'exécute le :term:`bytecode` à la fois. Cela " +"simplifie l'implémentation de CPython en rendant le modèle objet (incluant " +"des parties critiques comme la classe native :class:`dict`) implicitement " +"protégé contre les accès concourants. Verrouiller l'interpréteur entier rend " +"plus facile l'implémentation de multiples fils d'exécution (*multi-thread* " +"en anglais), au détriment malheureusement de beaucoup du parallélisme " +"possible sur les machines ayant plusieurs processeurs." -#: glossary.rst:603 +#: glossary.rst:703 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " @@ -1410,7 +1606,7 @@ msgstr "" "compression ou le hachage. De la même manière, le GIL est toujours libéré " "lors des entrées-sorties." -#: glossary.rst:608 +#: glossary.rst:708 msgid "" "As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " "build configuration. After building Python with this option, code must be " @@ -1420,11 +1616,32 @@ msgid "" "core CPUs efficiently. For more details, see :pep:`703`." msgstr "" -#: glossary.rst:614 +#: glossary.rst:715 +msgid "" +"In prior versions of Python's C API, a function might declare that it " +"requires the GIL to be held in order to use it. This refers to having " +"an :term:`attached thread state`." +msgstr "" + +#: glossary.rst:718 +msgid "global state" +msgstr "" + +#: glossary.rst:720 +msgid "" +"Data that is accessible throughout a program, such as module-level " +"variables, class variables, or C static variables in :term:`extension " +"modules `. In multi-threaded programs, global state " +"shared between threads typically requires synchronization to " +"avoid :term:`race conditions ` and :term:`data races `." +msgstr "" + +#: glossary.rst:726 msgid "hash-based pyc" msgstr "*pyc* utilisant le hachage" -#: glossary.rst:616 +#: glossary.rst:728 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1435,11 +1652,11 @@ msgstr "" "source correspondant pour déterminer sa validité. Voir :ref:`pyc-" "invalidation`." -#: glossary.rst:619 +#: glossary.rst:731 msgid "hashable" msgstr "hachable" -#: glossary.rst:621 +#: glossary.rst:733 #, fuzzy msgid "" "An object is *hashable* if it has a hash value which never changes during " @@ -1453,7 +1670,7 @@ msgstr "" "hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " "empreinte." -#: glossary.rst:627 +#: glossary.rst:739 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1462,7 +1679,7 @@ msgstr "" "en tant que membre d'un ensemble (type *set*), car ces structures de données " "utilisent ce *hash*." -#: glossary.rst:630 +#: glossary.rst:742 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1479,48 +1696,57 @@ msgstr "" "considérées différentes (sauf avec elles-mêmes) et leur valeur de hachage " "est calculée à partir de leur :func:`id`." -#: glossary.rst:637 +#: glossary.rst:749 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:639 +#: glossary.rst:751 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " "distribution of Python." msgstr "" -"Environnement d'apprentissage et de développement intégré pour Python. :ref:" -"`IDLE ` est un éditeur basique et un interpréteur livré avec la " -"distribution standard de Python." +"Environnement d'apprentissage et de développement intégré pour " +"Python. :ref:`IDLE ` est un éditeur basique et un interpréteur livré " +"avec la distribution standard de Python." -#: glossary.rst:642 +#: glossary.rst:754 msgid "immortal" msgstr "" -#: glossary.rst:644 +#: glossary.rst:756 msgid "" -"*Immortal objects* are a CPython implementation detail introduced in :pep:" -"`683`." +"*Immortal objects* are a CPython implementation detail introduced " +"in :pep:`683`." msgstr "" -#: glossary.rst:647 +#: glossary.rst:759 msgid "" "If an object is immortal, its :term:`reference count` is never modified, and " "therefore it is never deallocated while the interpreter is running. For " "example, :const:`True` and :const:`None` are immortal in CPython." msgstr "" -#: glossary.rst:650 +#: glossary.rst:763 +msgid "" +"Immortal objects can be identified via :func:`sys._is_immortal`, or " +"via :c:func:`PyUnstable_IsImmortal` in the C API." +msgstr "" + +#: glossary.rst:765 msgid "immutable" msgstr "immuable" -#: glossary.rst:652 +#: glossary.rst:767 +#, fuzzy msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " "created if a different value has to be stored. They play an important role " "in places where a constant hash value is needed, for example as a key in a " -"dictionary." +"dictionary. Immutable objects are inherently :term:`thread-safe` because " +"their state cannot be modified after creation, eliminating concerns about " +"improperly synchronized :term:`concurrent modification`." msgstr "" "Objet dont la valeur ne change pas. Les nombres, les chaînes et les *n*-" "uplets sont immuables. Ils ne peuvent être modifiés. Un nouvel objet doit " @@ -1528,11 +1754,11 @@ msgstr "" "important quand une valeur de *hash* constante est requise, typiquement en " "clé de dictionnaire." -#: glossary.rst:657 +#: glossary.rst:774 msgid "import path" msgstr "chemin des importations" -#: glossary.rst:659 +#: glossary.rst:776 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1545,33 +1771,61 @@ msgstr "" "pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " "paquet parent." -#: glossary.rst:664 +#: glossary.rst:781 msgid "importing" msgstr "importation" -#: glossary.rst:666 +#: glossary.rst:783 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." msgstr "Processus rendant le code Python d'un module disponible dans un autre." -#: glossary.rst:668 +#: glossary.rst:785 msgid "importer" msgstr "importateur" -#: glossary.rst:670 +#: glossary.rst:787 msgid "" -"An object that both finds and loads a module; both a :term:`finder` and :" -"term:`loader` object." +"An object that both finds and loads a module; both a :term:`finder` " +"and :term:`loader` object." msgstr "" "Objet qui trouve et charge un module, en même temps un :term:`chercheur " "` et un :term:`chargeur `." -#: glossary.rst:672 +#: glossary.rst:789 +#, fuzzy +msgid "index" +msgstr "chercheur" + +#: glossary.rst:791 +msgid "" +"A numeric value that represents the position of an element in " +"a :term:`sequence`." +msgstr "" + +#: glossary.rst:794 +msgid "" +"In Python, indexing starts at zero. For example, ``things[0]`` names the " +"*first* element of ``things``; ``things[1]`` names the second one." +msgstr "" + +#: glossary.rst:798 +msgid "" +"In some contexts, Python allows negative indexes for counting from the end " +"of a sequence, and indexing using :term:`slices `." +msgstr "" + +#: glossary.rst:801 +#, fuzzy +msgid "See also :term:`subscript`." +msgstr "Voir aussi :term:`module`." + +#: glossary.rst:802 msgid "interactive" msgstr "interactif" -#: glossary.rst:674 +#: glossary.rst:804 #, fuzzy msgid "" "Python has an interactive interpreter which means you can enter statements " @@ -1581,18 +1835,19 @@ msgid "" "test out new ideas or inspect modules and packages (remember ``help(x)``). " "For more on interactive mode, see :ref:`tut-interac`." msgstr "" -"Python a un interpréteur interactif, ce qui signifie que vous pouvez écrire " -"des expressions et des instructions à l'invite de l'interpréteur. " -"L'interpréteur Python va les exécuter immédiatement et vous en présenter le " -"résultat. Démarrez juste ``python`` (probablement depuis le menu principal " -"de votre ordinateur). C'est un moyen puissant pour tester de nouvelles idées " -"ou étudier de nouveaux modules (souvenez-vous de ``help(x)``)." +"Python a un interpréteur :term:`interactif `, ce qui signifie " +"que vous pouvez écrire des expressions et des instructions à l'invite de " +"l'interpréteur. L'interpréteur Python va les exécuter immédiatement et vous " +"en présenter le résultat. Démarrez juste ``python`` (probablement depuis le " +"menu principal de votre ordinateur). C'est un moyen puissant pour tester de " +"nouvelles idées ou étudier de nouveaux modules (souvenez-vous de " +"``help(x)``)." -#: glossary.rst:681 +#: glossary.rst:811 msgid "interpreted" msgstr "interprété" -#: glossary.rst:683 +#: glossary.rst:813 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1607,22 +1862,23 @@ msgstr "" "exécutés directement, sans avoir à compiler un fichier exécutable " "intermédiaire. Les langages interprétés ont généralement un cycle de " "développement / débogage plus court que les langages compilés. Cependant, " -"ils s'exécutent généralement plus lentement. Voir aussi :term:`interactif`." +"ils s'exécutent généralement plus lentement. Voir aussi :term:`interactif " +"`." -#: glossary.rst:690 +#: glossary.rst:820 msgid "interpreter shutdown" msgstr "arrêt de l'interpréteur" -#: glossary.rst:692 +#: glossary.rst:822 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " -"critical internal structures. It also makes several calls to the :term:" -"`garbage collector `. This can trigger the execution of " -"code in user-defined destructors or weakref callbacks. Code executed during " -"the shutdown phase can encounter various exceptions as the resources it " -"relies on may not function anymore (common examples are library modules or " -"the warnings machinery)." +"critical internal structures. It also makes several calls to " +"the :term:`garbage collector `. This can trigger the " +"execution of code in user-defined destructors or weakref callbacks. Code " +"executed during the shutdown phase can encounter various exceptions as the " +"resources it relies on may not function anymore (common examples are library " +"modules or the warnings machinery)." msgstr "" "Lorsqu'on lui demande de s'arrêter, l'interpréteur Python entre dans une " "phase spéciale où il libère graduellement les ressources allouées, comme les " @@ -1634,7 +1890,7 @@ msgstr "" "fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " "*warning*)." -#: glossary.rst:701 +#: glossary.rst:831 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1642,108 +1898,123 @@ msgstr "" "La principale raison d'arrêt de l'interpréteur est que le module " "``__main__`` ou le script en cours d'exécution a terminé de s'exécuter." -#: glossary.rst:703 +#: glossary.rst:833 msgid "iterable" msgstr "itérable" -#: glossary.rst:705 +#: glossary.rst:835 #, fuzzy msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " -"and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:" -"`file objects `, and objects of any classes you define with an :" -"meth:`~iterator.__iter__` method or with a :meth:`~object.__getitem__` " -"method that implements :term:`sequence` semantics." +"and :class:`tuple`) and some non-sequence types " +"like :class:`dict`, :term:`file objects `, and objects of any " +"classes you define with an :meth:`~object.__iter__` method or with " +"a :meth:`~object.__getitem__` method that implements :term:`sequence` " +"semantics." msgstr "" "Objet capable de renvoyer ses éléments un à un. Par exemple, tous les types " "de séquences (comme :class:`list`, :class:`str`, et :class:`tuple`), " "quelques autres types comme :class:`dict`, les :term:`objets fichiers ` ou tout objet d'une classe ayant une méthode :meth:`__iter__` ou :" -"meth:`__getitem__` qui implémente la sémantique d'une :term:`séquence " +"object>` ou tout objet d'une classe ayant une méthode :meth:`__iter__` " +"ou :meth:`__getitem__` qui implémente la sémantique d'une :term:`séquence " "`." -#: glossary.rst:713 +#: glossary.rst:843 #, fuzzy msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " -"iterable object is passed as an argument to the built-in function :func:" -"`iter`, it returns an iterator for the object. This iterator is good for " -"one pass over the set of values. When using iterables, it is usually not " -"necessary to call :func:`iter` or deal with iterator objects yourself. The :" -"keyword:`for` statement does that automatically for you, creating a " -"temporary unnamed variable to hold the iterator for the duration of the " -"loop. See also :term:`iterator`, :term:`sequence`, and :term:`generator`." +"iterable object is passed as an argument to the built-in " +"function :func:`iter`, it returns an iterator for the object. This iterator " +"is good for one pass over the set of values. When using iterables, it is " +"usually not necessary to call :func:`iter` or deal with iterator objects " +"yourself. The :keyword:`for` statement does that automatically for you, " +"creating a temporary unnamed variable to hold the iterator for the duration " +"of the loop. See also :term:`iterator`, :term:`sequence`, " +"and :term:`generator`." msgstr "" "Les itérables peuvent être utilisés dans des boucles :keyword:`for` et à " -"beaucoup d'autres endroits où une séquence est requise (:func:`zip`, :func:" -"`map`…). Lorsqu'un itérable est passé comme argument à la fonction native :" -"func:`iter`, celle-ci fournit en retour un itérateur sur cet itérable. Cet " -"itérateur n'est valable que pour une seule passe sur le jeu de valeurs. Lors " -"de l'utilisation d'itérables, il n'est habituellement pas nécessaire " -"d'appeler :func:`iter` ou de s'occuper soi-même des objets itérateurs. " -"L'instruction ``for`` le fait automatiquement pour vous, créant une variable " -"temporaire anonyme pour garder l'itérateur durant la boucle. Voir aussi :" -"term:`itérateur`, :term:`séquence` et :term:`générateur`." - -#: glossary.rst:723 +"beaucoup d'autres endroits où une séquence est requise " +"(:func:`zip`, :func:`map`…). Lorsqu'un itérable est passé comme argument à " +"la fonction native :func:`iter`, celle-ci fournit en retour un itérateur sur " +"cet itérable. Cet itérateur n'est valable que pour une seule passe sur le " +"jeu de valeurs. Lors de l'utilisation d'itérables, il n'est habituellement " +"pas nécessaire d'appeler :func:`iter` ou de s'occuper soi-même des objets " +"itérateurs. L'instruction ``for`` le fait automatiquement pour vous, créant " +"une variable temporaire anonyme pour garder l'itérateur durant la boucle. " +"Voir aussi :term:`itérateur`, :term:`séquence` et :term:`générateur`." + +#: glossary.rst:853 msgid "iterator" msgstr "itérateur" -#: glossary.rst:725 +#: glossary.rst:855 #, fuzzy msgid "" -"An object representing a stream of data. Repeated calls to the iterator's :" -"meth:`~iterator.__next__` method (or passing it to the built-in function :" -"func:`next`) return successive items in the stream. When no more data are " -"available a :exc:`StopIteration` exception is raised instead. At this " -"point, the iterator object is exhausted and any further calls to its :meth:`!" -"__next__` method just raise :exc:`StopIteration` again. Iterators are " -"required to have an :meth:`~iterator.__iter__` method that returns the " -"iterator object itself so every iterator is also iterable and may be used in " -"most places where other iterables are accepted. One notable exception is " -"code which attempts multiple iteration passes. A container object (such as " -"a :class:`list`) produces a fresh new iterator each time you pass it to the :" -"func:`iter` function or use it in a :keyword:`for` loop. Attempting this " -"with an iterator will just return the same exhausted iterator object used in " -"the previous iteration pass, making it appear like an empty container." -msgstr "" -"Objet représentant un flux de donnée. Des appels successifs à la méthode :" -"meth:`~iterator.__next__` de l'itérateur (ou le passer à la fonction native :" -"func:`next`) donne successivement les objets du flux. Lorsque plus aucune " -"donnée n'est disponible, une exception :exc:`StopIteration` est levée. À ce " -"point, l'itérateur est épuisé et tous les appels suivants à sa méthode :meth:" -"`__next__` lèveront encore une exception :exc:`StopIteration`. Les " -"itérateurs doivent avoir une méthode :meth:`__iter__` qui renvoie l'objet " -"itérateur lui-même, de façon à ce que chaque itérateur soit aussi itérable " -"et puisse être utilisé dans la plupart des endroits où d'autres itérables " -"sont attendus. Une exception notable est un code qui tente plusieurs " -"itérations complètes. Un objet conteneur, (tel que :class:`list`) produit un " -"nouvel itérateur neuf à chaque fois qu'il est passé à la fonction :func:" -"`iter` ou s'il est utilisé dans une boucle :keyword:`for`. Faire ceci sur un " -"itérateur donnerait simplement le même objet itérateur épuisé utilisé dans " -"son itération précédente, le faisant ressembler à un conteneur vide." - -#: glossary.rst:740 +"An object representing a stream of data. Repeated calls to the " +"iterator's :meth:`~iterator.__next__` method (or passing it to the built-in " +"function :func:`next`) return successive items in the stream. When no more " +"data are available a :exc:`StopIteration` exception is raised instead. At " +"this point, the iterator object is exhausted and any further calls to " +"its :meth:`!__next__` method just raise :exc:`StopIteration` again. " +"Iterators are required to have an :meth:`~iterator.__iter__` method that " +"returns the iterator object itself so every iterator is also iterable and " +"may be used in most places where other iterables are accepted. One notable " +"exception is code which attempts multiple iteration passes. A container " +"object (such as a :class:`list`) produces a fresh new iterator each time you " +"pass it to the :func:`iter` function or use it in a :keyword:`for` loop. " +"Attempting this with an iterator will just return the same exhausted " +"iterator object used in the previous iteration pass, making it appear like " +"an empty container." +msgstr "" +"Objet représentant un flux de donnée. Des appels successifs à la " +"méthode :meth:`~iterator.__next__` de l'itérateur (ou le passer à la " +"fonction native :func:`next`) donne successivement les objets du flux. " +"Lorsque plus aucune donnée n'est disponible, une " +"exception :exc:`StopIteration` est levée. À ce point, l'itérateur est épuisé " +"et tous les appels suivants à sa méthode :meth:`__next__` lèveront encore " +"une exception :exc:`StopIteration`. Les itérateurs doivent avoir une " +"méthode :meth:`__iter__` qui renvoie l'objet itérateur lui-même, de façon à " +"ce que chaque itérateur soit aussi itérable et puisse être utilisé dans la " +"plupart des endroits où d'autres itérables sont attendus. Une exception " +"notable est un code qui tente plusieurs itérations complètes. Un objet " +"conteneur, (tel que :class:`list`) produit un nouvel itérateur neuf à chaque " +"fois qu'il est passé à la fonction :func:`iter` ou s'il est utilisé dans une " +"boucle :keyword:`for`. Faire ceci sur un itérateur donnerait simplement le " +"même objet itérateur épuisé utilisé dans son itération précédente, le " +"faisant ressembler à un conteneur vide." + +#: glossary.rst:870 msgid "More information can be found in :ref:`typeiter`." msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." -#: glossary.rst:744 +#: glossary.rst:874 #, fuzzy msgid "" -"CPython does not consistently apply the requirement that an iterator define :" -"meth:`~iterator.__iter__`. And also please note that the free-threading " -"CPython does not guarantee the thread-safety of iterator operations." +"CPython does not consistently apply the requirement that an iterator " +"define :meth:`~iterator.__iter__`. And also please note that :term:`free-" +"threaded ` CPython does not guarantee :term:`thread-safe` " +"behavior of iterator operations." msgstr "" "CPython n'est pas toujours cohérent sur le fait de demander ou non à un " "itérateur de définir :meth:`__iter__`." -#: glossary.rst:749 +#: glossary.rst:879 +msgid "key" +msgstr "" + +#: glossary.rst:881 +msgid "" +"A value that identifies an entry in a :term:`mapping`. See " +"also :term:`subscript`." +msgstr "" + +#: glossary.rst:883 msgid "key function" msgstr "fonction clé" -#: glossary.rst:751 +#: glossary.rst:885 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1754,51 +2025,53 @@ msgstr "" "utilisée pour générer une clé de classement prenant en compte les " "conventions de classement spécifiques aux paramètres régionaux courants." -#: glossary.rst:756 +#: glossary.rst:890 msgid "" "A number of tools in Python accept key functions to control how elements are " -"ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" -"meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq." -"nlargest`, and :func:`itertools.groupby`." +"ordered or grouped. They " +"include :func:`min`, :func:`max`, :func:`sorted`, :meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest`, " +"and :func:`itertools.groupby`." msgstr "" "Plusieurs outils dans Python acceptent des fonctions clés pour déterminer " -"comment les éléments sont classés ou groupés. On peut citer les fonctions :" -"func:`min`, :func:`max`, :func:`sorted`, :meth:`list.sort`, :func:`heapq." -"merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` et :func:`itertools." -"groupby`." +"comment les éléments sont classés ou groupés. On peut citer les " +"fonctions :func:`min`, :func:`max`, :func:`sorted`, :meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` " +"et :func:`itertools.groupby`." -#: glossary.rst:762 +#: glossary.rst:896 +#, fuzzy msgid "" -"There are several ways to create a key function. For example. the :meth:" -"`str.lower` method can serve as a key function for case insensitive sorts. " -"Alternatively, a key function can be built from a :keyword:`lambda` " -"expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator." -"attrgetter`, :func:`operator.itemgetter`, and :func:`operator.methodcaller` " -"are three key function constructors. See the :ref:`Sorting HOW TO " -"` for examples of how to create and use key functions." +"There are several ways to create a key function. For example. " +"the :meth:`str.casefold` method can serve as a key function for case " +"insensitive sorts. Alternatively, a key function can be built from " +"a :keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. " +"Also, :func:`operator.attrgetter`, :func:`operator.itemgetter`, " +"and :func:`operator.methodcaller` are three key function constructors. See " +"the :ref:`Sorting HOW TO ` for examples of how to create and " +"use key functions." msgstr "" "Il existe plusieurs moyens de créer une fonction clé. Par exemple, la " "méthode :meth:`str.lower` peut servir de fonction clé pour effectuer des " "recherches insensibles à la casse. Aussi, il est possible de créer des " "fonctions clés avec des expressions :keyword:`lambda`, comme ``lambda r: " -"(r[0], r[2])``. Par ailleurs :func:`~operator.attrgetter`, :func:`~operator." -"itemgetter` et :func:`~operator.methodcaller` permettent de créer des " -"fonctions clés. Voir :ref:`le guide pour le tri ` pour des " -"exemples de création et d'utilisation de fonctions clefs." +"(r[0], r[2])``. Par " +"ailleurs :func:`~operator.attrgetter`, :func:`~operator.itemgetter` " +"et :func:`~operator.methodcaller` permettent de créer des fonctions clés. " +"Voir :ref:`le guide pour le tri ` pour des exemples de " +"création et d'utilisation de fonctions clefs." -#: glossary.rst:769 +#: glossary.rst:903 msgid "keyword argument" msgstr "argument nommé" -#: glossary.rst:1075 +#: glossary.rst:1292 msgid "See :term:`argument`." msgstr "Voir :term:`argument`." -#: glossary.rst:772 +#: glossary.rst:906 msgid "lambda" msgstr "lambda" -#: glossary.rst:774 +#: glossary.rst:908 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1809,11 +2082,11 @@ msgstr "" "syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " "expression``" -#: glossary.rst:777 +#: glossary.rst:911 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:779 +#: glossary.rst:913 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1825,13 +2098,15 @@ msgstr "" "appels ou des accès. Ce style contraste avec le style :term:`EAFP` et se " "caractérise par la présence de beaucoup d'instructions :keyword:`if`." -#: glossary.rst:784 +#: glossary.rst:918 +#, fuzzy msgid "" -"In a multi-threaded environment, the LBYL approach can risk introducing a " -"race condition between \"the looking\" and \"the leaping\". For example, " -"the code, ``if key in mapping: return mapping[key]`` can fail if another " -"thread removes *key* from *mapping* after the test, but before the lookup. " -"This issue can be solved with locks or by using the EAFP approach." +"In a multi-threaded environment, the LBYL approach can risk introducing " +"a :term:`race condition` between \"the looking\" and \"the leaping\". For " +"example, the code, ``if key in mapping: return mapping[key]`` can fail if " +"another thread removes *key* from *mapping* after the test, but before the " +"lookup. This issue can be solved with :term:`locks ` or by using " +"the :term:`EAFP` approach. See also :term:`thread-safe`." msgstr "" "Dans un environnement avec plusieurs fils d'exécution (*multi-threaded* en " "anglais), le style *LBYL* peut engendrer un séquencement critique (*race " @@ -1841,11 +2116,19 @@ msgstr "" "l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " "l'approche EAFP." -#: glossary.rst:789 +#: glossary.rst:924 +msgid "lexical analyzer" +msgstr "" + +#: glossary.rst:927 +msgid "Formal name for the *tokenizer*; see :term:`token`." +msgstr "" + +#: glossary.rst:928 msgid "list" msgstr "liste" -#: glossary.rst:791 +#: glossary.rst:930 #, fuzzy msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " @@ -1856,11 +2139,11 @@ msgstr "" "``list`` ressemble plus à un tableau (*array* dans la plupart des langages) " "qu'à une liste chaînée puisque les accès se font en O(1)." -#: glossary.rst:794 +#: glossary.rst:933 msgid "list comprehension" msgstr "liste en compréhension (ou liste en intension)" -#: glossary.rst:796 +#: glossary.rst:935 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1869,122 +2152,163 @@ msgid "" "optional. If omitted, all elements in ``range(256)`` are processed." msgstr "" "Écriture concise pour manipuler tout ou partie des éléments d'une séquence " -"et renvoyer une liste contenant les résultats. ``result = ['{:#04x}'." -"format(x) for x in range(256) if x % 2 == 0]`` génère la liste composée des " -"nombres pairs de 0 à 255 écrits sous formes de chaînes de caractères et en " -"hexadécimal (``0x…``). La clause :keyword:`if` est optionnelle. Si elle est " -"omise, tous les éléments du ``range(256)`` seront utilisés." +"et renvoyer une liste contenant les résultats. ``result = " +"['{:#04x}'.format(x) for x in range(256) if x % 2 == 0]`` génère la liste " +"composée des nombres pairs de 0 à 255 écrits sous formes de chaînes de " +"caractères et en hexadécimal (``0x…``). La clause :keyword:`if` est " +"optionnelle. Si elle est omise, tous les éléments du ``range(256)`` seront " +"utilisés." -#: glossary.rst:802 +#: glossary.rst:941 +msgid "lock" +msgstr "" + +#: glossary.rst:943 +msgid "" +"A :term:`synchronization primitive` that allows only one thread at a time to " +"access a shared resource. A thread must acquire a lock before accessing the " +"protected resource and release it afterward. If a thread attempts to " +"acquire a lock that is already held by another thread, it will block until " +"the lock becomes available. Python's :mod:`threading` module " +"provides :class:`~threading.Lock` (a basic lock) " +"and :class:`~threading.RLock` (a :term:`reentrant` lock). Locks are used to " +"prevent :term:`race conditions ` and ensure :term:`thread-" +"safe` access to shared data. Alternative design patterns to locks exist " +"such as queues, producer/consumer patterns, and thread-local state. See " +"also :term:`deadlock`, and :term:`reentrant`." +msgstr "" + +#: glossary.rst:954 +msgid "lock-free" +msgstr "" + +#: glossary.rst:956 +msgid "" +"An operation that does not acquire any :term:`lock` and uses atomic CPU " +"instructions to ensure correctness. Lock-free operations can execute " +"concurrently without blocking each other and cannot be blocked by operations " +"that hold locks. In :term:`free-threaded ` Python, built-in " +"types like :class:`dict` and :class:`list` provide lock-free read " +"operations, which means other threads may observe intermediate states during " +"multi-step modifications even when those modifications hold the :term:`per-" +"object lock`." +msgstr "" + +#: glossary.rst:964 msgid "loader" msgstr "chargeur" -#: glossary.rst:804 +#: glossary.rst:966 #, fuzzy msgid "" -"An object that loads a module. It must define a method named :meth:" -"`load_module`. A loader is typically returned by a :term:`finder`. See also:" +"An object that loads a module. It must define the :meth:`!exec_module` " +"and :meth:`!create_module` methods to implement " +"the :class:`~importlib.abc.Loader` interface. A loader is typically returned " +"by a :term:`finder`. See also:" msgstr "" -"Objet qui charge un module. Il doit définir une méthode nommée :meth:" -"`load_module`. Un chargeur est typiquement donné par un :term:`chercheur " -"`. Voir la :pep:`302` pour plus de détails et :class:`importlib.ABC." -"Loader` pour sa :term:`classe mère abstraite `." +"Objet qui charge un module. Il doit définir une méthode " +"nommée :meth:`load_module`. Un chargeur est typiquement donné par " +"un :term:`chercheur `. Voir la :pep:`302` pour plus de détails " +"et :class:`importlib.ABC.Loader` pour sa :term:`classe abstraite " +"`." -#: glossary.rst:808 +#: glossary.rst:972 msgid ":ref:`finders-and-loaders`" msgstr "" -#: glossary.rst:809 +#: glossary.rst:973 msgid ":class:`importlib.abc.Loader`" msgstr "" -#: glossary.rst:810 +#: glossary.rst:974 #, fuzzy msgid ":pep:`302`" msgstr "Voir la :pep:`1`." -#: glossary.rst:811 +#: glossary.rst:975 msgid "locale encoding" msgstr "encodage régional" -#: glossary.rst:813 +#: glossary.rst:977 msgid "" -"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" -"`locale.setlocale(locale.LC_CTYPE, new_locale) `." +"On Unix, it is the encoding of the LC_CTYPE locale. It can be set " +"with :func:`locale.setlocale(locale.LC_CTYPE, new_locale) " +"`." msgstr "" "Sous Unix, il est défini par la variable régionale LC_CTYPE. Il peut être " -"modifié par :func:`locale.setlocale(locale.LC_CTYPE, new_locale) `." +"modifié par :func:`locale.setlocale(locale.LC_CTYPE, new_locale) " +"`." -#: glossary.rst:816 +#: glossary.rst:980 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "Sous Windows, c'est un encodage ANSI (par ex. : ``\"cp1252\"``)." -#: glossary.rst:818 +#: glossary.rst:982 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" "Sous Android et VxWorks, Python utilise ``\"utf-8\"`` comme encodage " "régional." -#: glossary.rst:820 +#: glossary.rst:984 #, fuzzy msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "``locale.getencoding()`` permet de récupérer l'encodage régional." -#: glossary.rst:822 +#: glossary.rst:986 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "" "Voir aussi l':term:`encodage du systèmes de fichiers et gestionnaire " "d'erreurs associé `." -#: glossary.rst:823 +#: glossary.rst:987 msgid "magic method" msgstr "méthode magique" -#: glossary.rst:827 +#: glossary.rst:991 msgid "An informal synonym for :term:`special method`." msgstr "Un synonyme informel de :term:`special method`." -#: glossary.rst:828 +#: glossary.rst:992 msgid "mapping" msgstr "tableau de correspondances (*mapping* en anglais)" # Obligé de garder l'ordre des références... -#: glossary.rst:830 +#: glossary.rst:994 msgid "" "A container object that supports arbitrary key lookups and implements the " -"methods specified in the :class:`collections.abc.Mapping` or :class:" -"`collections.abc.MutableMapping` :ref:`abstract base classes `. Examples include :class:`dict`, :class:" -"`collections.defaultdict`, :class:`collections.OrderedDict` and :class:" -"`collections.Counter`." +"methods specified in the :class:`collections.abc.Mapping` " +"or :class:`collections.abc.MutableMapping` :ref:`abstract base classes " +"`. Examples " +"include :class:`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " +"and :class:`collections.Counter`." msgstr "" "Conteneur permettant de rechercher des éléments à partir de clés et " -"implémentant les méthodes spécifiées dans les classes mères abstraites des :" -"class:`tableaux de correspondances ` (immuables) " -"ou :class:`tableaux de correspondances mutables ` (voir les :ref:`classes mères abstraites `). Les classes suivantes sont des exemples de " -"tableaux de correspondances : :class:`dict`, :class:`collections." -"defaultdict`, :class:`collections.OrderedDict` et :class:`collections." -"Counter`." - -#: glossary.rst:836 +"implémentant les méthodes spécifiées dans les classes abstraites " +"des :class:`tableaux de correspondances ` " +"(immuables) ou :class:`tableaux de correspondances mutables " +"` (voir les :ref:`classes abstraites " +"`). Les classes suivantes sont des " +"exemples de tableaux de " +"correspondances : :class:`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " +"et :class:`collections.Counter`." + +#: glossary.rst:1000 msgid "meta path finder" msgstr "chercheur dans les méta-chemins" -#: glossary.rst:838 +#: glossary.rst:1002 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `." msgstr "" -"Un :term:`chercheur ` renvoyé par une recherche dans :data:`sys." -"meta_path`. Les chercheurs dans les méta-chemins ressemblent, mais sont " -"différents des :term:`chercheurs d'entrée dans path `." +"Un :term:`chercheur ` renvoyé par une recherche " +"dans :data:`sys.meta_path`. Les chercheurs dans les méta-chemins " +"ressemblent, mais sont différents des :term:`chercheurs d'entrée dans path " +"`." -#: glossary.rst:842 +#: glossary.rst:1006 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1992,11 +2316,11 @@ msgstr "" "Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " "chercheurs dans les méta-chemins doivent implémenter." -#: glossary.rst:844 +#: glossary.rst:1008 msgid "metaclass" msgstr "métaclasse" -#: glossary.rst:846 +#: glossary.rst:1010 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -2020,31 +2344,31 @@ msgstr "" "*multi-threads*, suivre la création d'objets, implémenter des singletons et " "bien d'autres tâches." -#: glossary.rst:856 +#: glossary.rst:1020 msgid "More information can be found in :ref:`metaclasses`." msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." -#: glossary.rst:857 +#: glossary.rst:1021 msgid "method" msgstr "méthode" -#: glossary.rst:859 +#: glossary.rst:1023 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " -"first :term:`argument` (which is usually called ``self``). See :term:" -"`function` and :term:`nested scope`." +"first :term:`argument` (which is usually called ``self``). " +"See :term:`function` and :term:`nested scope`." msgstr "" "Fonction définie à l'intérieur d'une classe. Lorsqu'elle est appelée comme " "un attribut d'une instance de cette classe, la méthode reçoit l'instance en " "premier :term:`argument` (qui, par convention, est habituellement nommé " "``self``). Voir :term:`function` et :term:`nested scope`." -#: glossary.rst:863 +#: glossary.rst:1027 msgid "method resolution order" msgstr "ordre de résolution des méthodes" -#: glossary.rst:865 +#: glossary.rst:1029 #, fuzzy msgid "" "Method Resolution Order is the order in which base classes are searched for " @@ -2054,15 +2378,15 @@ msgstr "" "L'ordre de résolution des méthodes (*MRO* pour *Method Resolution Order* en " "anglais) est, lors de la recherche d'un attribut dans les classes parentes, " "la façon dont l'interpréteur Python classe ces classes parentes. Voir `The " -"Python 2.3 Method Resolution Order `_ pour plus de détails sur l'algorithme utilisé par " -"l'interpréteur Python depuis la version 2.3." +"Python 2.3 Method Resolution Order `_ pour plus de détails sur l'algorithme utilisé par l'interpréteur " +"Python depuis la version 2.3." -#: glossary.rst:868 +#: glossary.rst:1032 msgid "module" msgstr "module" -#: glossary.rst:870 +#: glossary.rst:1034 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -2072,53 +2396,54 @@ msgstr "" "modules ont un espace de nommage et peuvent contenir n'importe quels objets " "Python. Charger des modules est appelé :term:`importer `." -#: glossary.rst:874 +#: glossary.rst:1038 msgid "See also :term:`package`." msgstr "Voir aussi :term:`paquet`." -#: glossary.rst:875 +#: glossary.rst:1039 msgid "module spec" msgstr "spécificateur de module" -#: glossary.rst:877 +#: glossary.rst:1041 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." msgstr "" "Espace de nommage contenant les informations, relatives à l'importation, " -"utilisées pour charger un module. C'est une instance de la classe :class:" -"`importlib.machinery.ModuleSpec`." +"utilisées pour charger un module. C'est une instance de la " +"classe :class:`importlib.machinery.ModuleSpec`." -#: glossary.rst:880 +#: glossary.rst:1044 #, fuzzy msgid "See also :ref:`module-specs`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:881 +#: glossary.rst:1045 msgid "MRO" msgstr "MRO" -#: glossary.rst:883 +#: glossary.rst:1047 msgid "See :term:`method resolution order`." msgstr "Voir :term:`ordre de résolution des méthodes`." -#: glossary.rst:884 +#: glossary.rst:1048 msgid "mutable" msgstr "mutable" -#: glossary.rst:886 +#: glossary.rst:1050 msgid "" -"Mutable objects can change their value but keep their :func:`id`. See also :" -"term:`immutable`." +"An :term:`object` with state that is allowed to change during the course of " +"the program. In multi-threaded programs, mutable objects that are shared " +"between threads require careful synchronization to avoid :term:`race " +"conditions `. See also :term:`immutable`, :term:`thread-" +"safe`, and :term:`concurrent modification`." msgstr "" -"Un objet mutable peut changer de valeur tout en gardant le même :func:`id`. " -"Voir aussi :term:`immuable`." -#: glossary.rst:888 +#: glossary.rst:1055 msgid "named tuple" msgstr "*n*-uplet nommé" -#: glossary.rst:890 +#: glossary.rst:1057 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -2129,26 +2454,27 @@ msgstr "" "accessibles en utilisant des attributs nommés. Les types et classes peuvent " "avoir aussi d'autres caractéristiques." -#: glossary.rst:894 +#: glossary.rst:1061 msgid "" -"Several built-in types are named tuples, including the values returned by :" -"func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." -"float_info`::" +"Several built-in types are named tuples, including the values returned " +"by :func:`time.localtime` and :func:`os.stat`. Another example " +"is :data:`sys.float_info`::" msgstr "" "Plusieurs types natifs sont appelés n-uplets, y compris les valeurs " "retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " "est :data:`sys.float_info` ::" -#: glossary.rst:905 +#: glossary.rst:1072 #, fuzzy msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " "that inherits from :class:`tuple` and that defines named fields. Such a " -"class can be written by hand, or it can be created by inheriting :class:" -"`typing.NamedTuple`, or with the factory function :func:`collections." -"namedtuple`. The latter techniques also add some extra methods that may not " -"be found in hand-written or built-in named tuples." +"class can be written by hand, or it can be created by " +"inheriting :class:`typing.NamedTuple`, or with the factory " +"function :func:`collections.namedtuple`. The latter techniques also add " +"some extra methods that may not be found in hand-written or built-in named " +"tuples." msgstr "" "Certains *n-uplets nommés* sont des types natifs (comme les exemples ci-" "dessus). Sinon, un *n-uplet nommé* peut être créé à partir d'une définition " @@ -2158,21 +2484,22 @@ msgstr "" "méthodes supplémentaires qui ne seront pas trouvées dans celles écrites à la " "main ni dans les n-uplets nommés natifs." -#: glossary.rst:913 +#: glossary.rst:1080 msgid "namespace" msgstr "espace de nommage" -#: glossary.rst:915 +#: glossary.rst:1082 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " "as nested namespaces in objects (in methods). Namespaces support modularity " -"by preventing naming conflicts. For instance, the functions :func:`builtins." -"open <.open>` and :func:`os.open` are distinguished by their namespaces. " -"Namespaces also aid readability and maintainability by making it clear which " -"module implements a function. For instance, writing :func:`random.seed` or :" -"func:`itertools.islice` makes it clear that those functions are implemented " -"by the :mod:`random` and :mod:`itertools` modules, respectively." +"by preventing naming conflicts. For instance, the " +"functions :func:`builtins.open <.open>` and :func:`os.open` are " +"distinguished by their namespaces. Namespaces also aid readability and " +"maintainability by making it clear which module implements a function. For " +"instance, writing :func:`random.seed` or :func:`itertools.islice` makes it " +"clear that those functions are implemented by the :mod:`random` " +"and :mod:`itertools` modules, respectively." msgstr "" "L'endroit où une variable est stockée. Les espaces de nommage sont " "implémentés avec des dictionnaires. Il existe des espaces de nommage " @@ -2181,36 +2508,62 @@ msgstr "" "conflits de noms. Par exemple, les fonctions :func:`builtins.open <.open>` " "et :func:`os.open` sont différenciées par leurs espaces de nom. Les espaces " "de nommage aident aussi à la lisibilité et la maintenabilité en rendant " -"clair quel module implémente une fonction. Par exemple, écrire :func:`random." -"seed` ou :func:`itertools.islice` affiche clairement que ces fonctions sont " -"implémentées respectivement dans les modules :mod:`random` et :mod:" -"`itertools`." +"clair quel module implémente une fonction. Par exemple, " +"écrire :func:`random.seed` ou :func:`itertools.islice` affiche clairement " +"que ces fonctions sont implémentées respectivement dans les " +"modules :mod:`random` et :mod:`itertools`." -#: glossary.rst:925 +#: glossary.rst:1092 msgid "namespace package" msgstr "paquet-espace de nommage" -#: glossary.rst:927 +#: glossary.rst:1094 +#, fuzzy msgid "" -"A :pep:`420` :term:`package` which serves only as a container for " -"subpackages. Namespace packages may have no physical representation, and " -"specifically are not like a :term:`regular package` because they have no " -"``__init__.py`` file." +"A :term:`package` which serves only as a container for subpackages. " +"Namespace packages may have no physical representation, and specifically are " +"not like a :term:`regular package` because they have no ``__init__.py`` file." msgstr "" "Un :term:`paquet` tel que défini dans la :pep:`421` qui ne sert qu'à " "contenir des sous-paquets. Les paquets-espace de nommage peuvent n'avoir " "aucune représentation physique et, plus spécifiquement, ne sont pas comme " "un :term:`paquet classique` puisqu'ils n'ont pas de fichier ``__init__.py``." -#: glossary.rst:932 +#: glossary.rst:1099 +msgid "" +"Namespace packages allow several individually installable packages to have a " +"common parent package. Otherwise, it is recommended to use a :term:`regular " +"package`." +msgstr "" + +#: glossary.rst:1102 +msgid "" +"For more information, see :pep:`420` and :ref:`reference-namespace-package`." +msgstr "" + +#: glossary.rst:1104 msgid "See also :term:`module`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:933 +#: glossary.rst:1105 +#, fuzzy +msgid "native code" +msgstr "code intermédiaire (*bytecode*)" + +#: glossary.rst:1107 +msgid "" +"Code that is compiled to machine instructions and runs directly on the " +"processor, as opposed to code that is interpreted or runs in a virtual " +"machine. In the context of Python, native code typically refers to C, C++, " +"Rust or Fortran code in :term:`extension modules ` that " +"can be called from Python. See also :term:`extension module`." +msgstr "" + +#: glossary.rst:1112 msgid "nested scope" msgstr "portée imbriquée" -#: glossary.rst:935 +#: glossary.rst:1114 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -2228,29 +2581,45 @@ msgstr "" "dans l'espace de nommage global, le mot clef :keyword:`nonlocal` permet " "d'écrire dans l'espace de nommage dans lequel est déclarée la variable." -#: glossary.rst:942 +#: glossary.rst:1121 msgid "new-style class" msgstr "nouvelle classe" -#: glossary.rst:944 +#: glossary.rst:1123 #, fuzzy msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " -"versatile features like :attr:`~object.__slots__`, descriptors, properties, :" -"meth:`~object.__getattribute__`, class methods, and static methods." +"versatile features like :attr:`~object.__slots__`, descriptors, " +"properties, :meth:`~object.__getattribute__`, class methods, and static " +"methods." msgstr "" "Ancien nom pour l'implémentation actuelle des classes, pour tous les objets. " "Dans les anciennes versions de Python, seules les nouvelles classes " -"pouvaient utiliser les nouvelles fonctionnalités telles que :attr:`~object." -"__slots__`, les descripteurs, les propriétés, :meth:`__getattribute__`, les " -"méthodes de classe et les méthodes statiques." +"pouvaient utiliser les nouvelles fonctionnalités telles " +"que :attr:`~object.__slots__`, les descripteurs, les " +"propriétés, :meth:`__getattribute__`, les méthodes de classe et les méthodes " +"statiques." -#: glossary.rst:949 +#: glossary.rst:1128 +msgid "non-deterministic" +msgstr "" + +#: glossary.rst:1130 +msgid "" +"Behavior where the outcome of a program can vary between executions with the " +"same inputs. In multi-threaded programs, non-deterministic behavior often " +"results from :term:`race conditions ` where the relative " +"timing or interleaving of threads affects the result. Proper synchronization " +"using :term:`locks ` and other :term:`synchronization primitives " +"` helps ensure deterministic behavior." +msgstr "" + +#: glossary.rst:1137 msgid "object" msgstr "objet" -#: glossary.rst:951 +#: glossary.rst:1139 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -2260,12 +2629,12 @@ msgstr "" "l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." -#: glossary.rst:954 +#: glossary.rst:1142 #, fuzzy msgid "optimized scope" msgstr "portée imbriquée" -#: glossary.rst:956 +#: glossary.rst:1144 msgid "" "A scope where target local variable names are reliably known to the compiler " "when the code is compiled, allowing optimization of read and write access to " @@ -2276,11 +2645,30 @@ msgid "" "to optimized scopes." msgstr "" -#: glossary.rst:963 +#: glossary.rst:1151 +#, fuzzy +msgid "optional module" +msgstr "module d'extension" + +#: glossary.rst:1153 +msgid "" +"An :term:`extension module` that is part of the :term:`standard library`, " +"but may be absent in some builds of :term:`CPython`, usually due to missing " +"third-party libraries or because the module is not available for a given " +"platform." +msgstr "" + +#: glossary.rst:1158 +msgid "" +"See :ref:`optional-module-requirements` for a list of optional modules that " +"require third-party libraries." +msgstr "" + +#: glossary.rst:1160 msgid "package" msgstr "paquet" -#: glossary.rst:965 +#: glossary.rst:1162 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " @@ -2290,15 +2678,30 @@ msgstr "" "paquets. Techniquement, un paquet est un module qui possède un attribut " "``__path__``." -#: glossary.rst:969 +#: glossary.rst:1166 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "Voir aussi :term:`paquet classique` et :term:`namespace package`." -#: glossary.rst:970 +#: glossary.rst:1167 +msgid "parallelism" +msgstr "" + +#: glossary.rst:1169 +msgid "" +"Executing multiple operations at the same time (e.g. on multiple CPU " +"cores). In Python builds with the :term:`global interpreter lock (GIL) " +"`, only one thread runs Python bytecode at a time, " +"so taking advantage of multiple CPU cores typically involves multiple " +"processes (e.g. :mod:`multiprocessing`) or native extensions that release " +"the GIL. In :term:`free-threaded ` Python, multiple Python " +"threads can run Python code simultaneously on different cores." +msgstr "" + +#: glossary.rst:1177 msgid "parameter" msgstr "paramètre" -#: glossary.rst:972 +#: glossary.rst:1179 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -2308,19 +2711,19 @@ msgstr "" "décrivant un :term:`argument` (ou dans certains cas des arguments) que la " "fonction accepte. Il existe cinq sortes de paramètres :" -#: glossary.rst:976 +#: glossary.rst:1183 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " "`. This is the default kind of parameter, for example *foo* and " "*bar* in the following::" msgstr "" -":dfn:`positional-or-keyword` : l'argument peut être passé soit par sa :term:" -"`position `, soit en tant que :term:`argument nommé `. " -"C'est le type de paramètre par défaut. Par exemple, *foo* et *bar* dans " -"l'exemple suivant ::" +":dfn:`positional-or-keyword` : l'argument peut être passé soit par " +"sa :term:`position `, soit en tant que :term:`argument nommé " +"`. C'est le type de paramètre par défaut. Par exemple, *foo* et " +"*bar* dans l'exemple suivant ::" -#: glossary.rst:985 +#: glossary.rst:1192 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -2332,7 +2735,7 @@ msgstr "" "un caractère \"/\" dans la liste de paramètres de la définition de fonction " "après eux. Par exemple : *posonly1* et *posonly2* dans le code suivant ::" -#: glossary.rst:994 +#: glossary.rst:1201 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2346,7 +2749,7 @@ msgstr "" "liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " "le code suivant ::" -#: glossary.rst:1002 +#: glossary.rst:1209 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2359,7 +2762,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre peut être défini en préfixant son nom " "par une ``*``. Par exemple *args* ci-après ::" -#: glossary.rst:1010 +#: glossary.rst:1217 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2371,7 +2774,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre est défini en préfixant le nom du " "paramètre par ``**``. Par exemple, *kwargs* ci-dessus." -#: glossary.rst:1016 +#: glossary.rst:1223 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2379,23 +2782,38 @@ msgstr "" "Les paramètres peuvent spécifier des arguments obligatoires ou optionnels, " "ainsi que des valeurs par défaut pour les arguments optionnels." -#: glossary.rst:1019 +#: glossary.rst:1226 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " -"the :class:`inspect.Parameter` class, the :ref:`function` section, and :pep:" -"`362`." +"the :class:`inspect.Parameter` class, the :ref:`function` section, " +"and :pep:`362`." msgstr "" "Voir aussi :term:`argument` dans le glossaire, la question sur :ref:`la " "différence entre les arguments et les paramètres ` dans la FAQ, la classe :class:`inspect.Parameter`, la section :" -"ref:`function` et la :pep:`362`." +"parameter>` dans la FAQ, la classe :class:`inspect.Parameter`, la " +"section :ref:`function` et la :pep:`362`." -#: glossary.rst:1023 +#: glossary.rst:1230 +msgid "per-object lock" +msgstr "" + +#: glossary.rst:1232 +msgid "" +"A :term:`lock` associated with an individual object instance rather than a " +"global lock shared across all objects. In :term:`free-threaded ` Python, built-in types like :class:`dict` and :class:`list` use " +"per-object locks to allow concurrent operations on different objects while " +"serializing operations on the same object. Operations that hold the per-" +"object lock prevent other locking operations on the same object from " +"proceeding, but do not block :term:`lock-free` operations." +msgstr "" + +#: glossary.rst:1240 msgid "path entry" msgstr "entrée de chemin" -#: glossary.rst:1025 +#: glossary.rst:1242 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2404,22 +2822,22 @@ msgstr "" "path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " "chemins ` consulte pour trouver des modules à importer." -#: glossary.rst:1027 +#: glossary.rst:1244 msgid "path entry finder" msgstr "chercheur de chemins" -#: glossary.rst:1029 +#: glossary.rst:1246 msgid "" -"A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" -"term:`path entry hook`) which knows how to locate modules given a :term:" -"`path entry`." +"A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. " +"a :term:`path entry hook`) which knows how to locate modules given " +"a :term:`path entry`." msgstr "" -":term:`chercheur ` renvoyé par un appelable sur un :data:`sys." -"path_hooks` (c'est-à-dire un :term:`point d'entrée pour la recherche dans " -"path `) qui sait où trouver des modules lorsqu'on lui donne " -"une :term:`entrée de path `." +":term:`chercheur ` renvoyé par un appelable sur " +"un :data:`sys.path_hooks` (c'est-à-dire un :term:`point d'entrée pour la " +"recherche dans path `) qui sait où trouver des modules " +"lorsqu'on lui donne une :term:`entrée de path `." -#: glossary.rst:1033 +#: glossary.rst:1250 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2427,11 +2845,11 @@ msgstr "" "Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " "chercheur d'entrée dans *path* doit implémenter." -#: glossary.rst:1035 +#: glossary.rst:1252 msgid "path entry hook" msgstr "point d'entrée pour la recherche dans *path*" -#: glossary.rst:1037 +#: glossary.rst:1254 #, fuzzy msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " @@ -2442,11 +2860,11 @@ msgstr "" "d'entrée dans path ` s'il sait où trouver des modules " "pour une :term:`entrée dans path ` donnée." -#: glossary.rst:1040 +#: glossary.rst:1257 msgid "path based finder" msgstr "chercheur basé sur les chemins" -#: glossary.rst:1042 +#: glossary.rst:1259 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2455,35 +2873,36 @@ msgstr "" "défaut qui cherche des modules dans un :term:`chemin des importations " "`." -#: glossary.rst:1044 +#: glossary.rst:1261 msgid "path-like object" msgstr "objet simili-chemin" -#: glossary.rst:1046 +#: glossary.rst:1263 msgid "" -"An object representing a file system path. A path-like object is either a :" -"class:`str` or :class:`bytes` object representing a path, or an object " -"implementing the :class:`os.PathLike` protocol. An object that supports the :" -"class:`os.PathLike` protocol can be converted to a :class:`str` or :class:" -"`bytes` file system path by calling the :func:`os.fspath` function; :func:" -"`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a :class:" -"`str` or :class:`bytes` result instead, respectively. Introduced by :pep:" -"`519`." +"An object representing a file system path. A path-like object is either " +"a :class:`str` or :class:`bytes` object representing a path, or an object " +"implementing the :class:`os.PathLike` protocol. An object that supports " +"the :class:`os.PathLike` protocol can be converted to a :class:`str` " +"or :class:`bytes` file system path by calling the :func:`os.fspath` " +"function; :func:`os.fsdecode` and :func:`os.fsencode` can be used to " +"guarantee a :class:`str` or :class:`bytes` result instead, respectively. " +"Introduced by :pep:`519`." msgstr "" "Objet représentant un chemin du système de fichiers. Un objet simili-chemin " "est un objet :class:`str` ou un objet :class:`bytes` représentant un chemin " "ou un objet implémentant le protocole :class:`os.PathLike`. Un objet qui " -"accepte le protocole :class:`os.PathLike` peut être converti en un chemin :" -"class:`str` ou :class:`bytes` du système de fichiers en appelant la " +"accepte le protocole :class:`os.PathLike` peut être converti en un " +"chemin :class:`str` ou :class:`bytes` du système de fichiers en appelant la " "fonction :func:`os.fspath`. :func:`os.fsdecode` et :func:`os.fsencode` " -"peuvent être utilisées, respectivement, pour garantir un résultat de type :" -"class:`str` ou :class:`bytes` à la place. A été Introduit par la :pep:`519`." +"peuvent être utilisées, respectivement, pour garantir un résultat de " +"type :class:`str` ou :class:`bytes` à la place. A été Introduit par " +"la :pep:`519`." -#: glossary.rst:1054 +#: glossary.rst:1271 msgid "PEP" msgstr "PEP" -#: glossary.rst:1056 +#: glossary.rst:1273 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2496,7 +2915,7 @@ msgstr "" "processus ou son environnement. Les PEP doivent fournir une spécification " "technique concise et une justification des fonctionnalités proposées." -#: glossary.rst:1062 +#: glossary.rst:1279 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2511,15 +2930,15 @@ msgstr "" "l’établissement d’un consensus au sein de la communauté et de documenter les " "opinions contradictoires." -#: glossary.rst:1068 +#: glossary.rst:1285 msgid "See :pep:`1`." msgstr "Voir la :pep:`1`." -#: glossary.rst:1069 +#: glossary.rst:1286 msgid "portion" msgstr "portion" -#: glossary.rst:1071 +#: glossary.rst:1288 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2528,15 +2947,15 @@ msgstr "" "fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " "dans la :pep:`420`." -#: glossary.rst:1073 +#: glossary.rst:1290 msgid "positional argument" msgstr "argument positionnel" -#: glossary.rst:1076 +#: glossary.rst:1293 msgid "provisional API" msgstr "API provisoire" -#: glossary.rst:1078 +#: glossary.rst:1295 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2555,7 +2974,7 @@ msgstr "" "surviendront que si de sérieux problèmes sont découverts et qu'ils n'avaient " "pas été identifiés avant l'ajout de l'API." -#: glossary.rst:1087 +#: glossary.rst:1304 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2566,29 +2985,29 @@ msgstr "" "possible sera fait pour tenter de résoudre les problèmes en conservant la " "rétrocompatibilité." -#: glossary.rst:1091 +#: glossary.rst:1308 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " "See :pep:`411` for more details." msgstr "" "Ce processus permet à la bibliothèque standard de continuer à évoluer avec " -"le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir la :" -"pep:`411` pour plus de détails." +"le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir " +"la :pep:`411` pour plus de détails." -#: glossary.rst:1094 +#: glossary.rst:1311 msgid "provisional package" msgstr "paquet provisoire" -#: glossary.rst:1096 +#: glossary.rst:1313 msgid "See :term:`provisional API`." msgstr "Voir :term:`provisional API`." -#: glossary.rst:1097 +#: glossary.rst:1314 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:1099 +#: glossary.rst:1316 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2597,11 +3016,11 @@ msgstr "" "Surnom donné à la série des Python 3.x (très vieux surnom donné à l'époque " "où Python 3 représentait un futur lointain). Aussi abrégé *Py3k*." -#: glossary.rst:1102 +#: glossary.rst:1319 msgid "Pythonic" msgstr "*Pythonique*" -#: glossary.rst:1104 +#: glossary.rst:1321 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2612,21 +3031,21 @@ msgid "" msgstr "" "Idée, ou bout de code, qui colle aux idiomes de Python plutôt qu'aux " "concepts communs rencontrés dans d'autres langages. Par exemple, il est " -"idiomatique en Python de parcourir les éléments d'un itérable en utilisant :" -"keyword:`for`. Beaucoup d'autres langages n'ont pas cette possibilité, donc " -"les gens qui ne sont pas habitués à Python utilisent parfois un compteur " -"numérique à la place ::" +"idiomatique en Python de parcourir les éléments d'un itérable en " +"utilisant :keyword:`for`. Beaucoup d'autres langages n'ont pas cette " +"possibilité, donc les gens qui ne sont pas habitués à Python utilisent " +"parfois un compteur numérique à la place ::" -#: glossary.rst:1114 +#: glossary.rst:1331 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" "Plutôt qu'utiliser la méthode, plus propre et élégante, donc *Pythonique* ::" -#: glossary.rst:1118 +#: glossary.rst:1335 msgid "qualified name" msgstr "nom qualifié" -#: glossary.rst:1120 +#: glossary.rst:1337 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2638,22 +3057,40 @@ msgstr "" "module, tel que défini dans la :pep:`3155`. Pour les fonctions et classes de " "premier niveau, le nom qualifié est le même que le nom de l'objet ::" -#: glossary.rst:1137 +#: glossary.rst:1354 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " -"dotted path to the module, including any parent packages, e.g. ``email.mime." -"text``::" +"dotted path to the module, including any parent packages, e.g. " +"``email.mime.text``::" msgstr "" "Lorsqu'il est utilisé pour nommer des modules, le *nom qualifié complet* " "(*fully qualified name - FQN* en anglais) signifie le chemin complet (séparé " "par des points) vers le module, incluant tous les paquets parents. Par " "exemple : ``email.mime.text`` ::" -#: glossary.rst:1144 +#: glossary.rst:1361 +#, fuzzy +msgid "race condition" +msgstr "ramasse-miettes" + +#: glossary.rst:1363 +msgid "" +"A condition of a program where the behavior depends on the relative timing " +"or ordering of events, particularly in multi-threaded programs. Race " +"conditions can lead to :term:`non-deterministic` behavior and bugs that are " +"difficult to reproduce. A :term:`data race` is a specific type of race " +"condition involving unsynchronized access to shared memory. " +"The :term:`LBYL` coding style is particularly susceptible to race conditions " +"in multi-threaded code. Using :term:`locks ` and " +"other :term:`synchronization primitives ` helps " +"prevent race conditions." +msgstr "" + +#: glossary.rst:1373 msgid "reference count" msgstr "nombre de références" -#: glossary.rst:1146 +#: glossary.rst:1375 #, fuzzy msgid "" "The number of references to an object. When the reference count of an " @@ -2671,37 +3108,79 @@ msgstr "" "fonction :func:`sys.getrefcount` pour obtenir le nombre de références à un " "objet donné." -#: glossary.rst:1154 +#: glossary.rst:1384 +msgid "" +"In :term:`CPython`, reference counts are not considered to be stable or well-" +"defined values; the number of references to an object, and how that number " +"is affected by Python code, may be different between versions." +msgstr "" + +#: glossary.rst:1388 msgid "regular package" msgstr "paquet classique" -#: glossary.rst:1156 +#: glossary.rst:1390 msgid "" -"A traditional :term:`package`, such as a directory containing an ``__init__." -"py`` file." +"A traditional :term:`package`, such as a directory containing an " +"``__init__.py`` file." msgstr "" ":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " "``__init__.py``." -#: glossary.rst:1159 +#: glossary.rst:1393 msgid "See also :term:`namespace package`." msgstr "Voir aussi :term:`paquet-espace de nommage `." -#: glossary.rst:1160 -msgid "REPL" +#: glossary.rst:1394 +msgid "reentrant" msgstr "" -#: glossary.rst:1162 +#: glossary.rst:1396 msgid "" -"An acronym for the \"read–eval–print loop\", another name for the :term:" -"`interactive` interpreter shell." +"A property of a function or :term:`lock` that allows it to be called or " +"acquired multiple times by the same thread without causing errors or " +"a :term:`deadlock`." msgstr "" -#: glossary.rst:1164 +#: glossary.rst:1400 +msgid "" +"For functions, reentrancy means the function can be safely called again " +"before a previous invocation has completed, which is important when " +"functions may be called recursively or from signal handlers. Thread-unsafe " +"functions may be :term:`non-deterministic` if they're called reentrantly in " +"a multithreaded program." +msgstr "" + +#: glossary.rst:1406 +msgid "" +"For locks, Python's :class:`threading.RLock` (reentrant lock) is reentrant, " +"meaning a thread that already holds the lock can acquire it again without " +"blocking. In contrast, :class:`threading.Lock` is not reentrant - " +"attempting to acquire it twice from the same thread will cause a deadlock." +msgstr "" + +#: glossary.rst:1412 +#, fuzzy +msgid "See also :term:`lock` and :term:`deadlock`." +msgstr "Voir aussi :term:`paquet classique` et :term:`namespace package`." + +#: glossary.rst:1413 +msgid "REPL" +msgstr "REPL" + +#: glossary.rst:1415 +msgid "" +"An acronym for the \"read–eval–print loop\", another name for " +"the :term:`interactive` interpreter shell." +msgstr "" +"Un acronyme pour \"*read–eval–print loop*\", un autre terme pour " +"l’interpréteur :term:`interactif `." + +#: glossary.rst:1417 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1166 +#: glossary.rst:1419 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2716,69 +3195,71 @@ msgstr "" "nombre d'instances dans une application devient un sujet critique pour la " "mémoire." -#: glossary.rst:1171 +#: glossary.rst:1424 msgid "sequence" msgstr "séquence" -#: glossary.rst:1173 +#: glossary.rst:1426 #, fuzzy msgid "" "An :term:`iterable` which supports efficient element access using integer " -"indices via the :meth:`~object.__getitem__` special method and defines a :" -"meth:`~object.__len__` method that returns the length of the sequence. Some " -"built-in sequence types are :class:`list`, :class:`str`, :class:`tuple`, " -"and :class:`bytes`. Note that :class:`dict` also supports :meth:`~object." -"__getitem__` and :meth:`!__len__`, but is considered a mapping rather than a " -"sequence because the lookups use arbitrary :term:`hashable` keys rather than " -"integers." +"indices via the :meth:`~object.__getitem__` special method and defines " +"a :meth:`~object.__len__` method that returns the length of the sequence. " +"Some built-in sequence types " +"are :class:`list`, :class:`str`, :class:`tuple`, and :class:`bytes`. Note " +"that :class:`dict` also supports :meth:`~object.__getitem__` and :meth:`!" +"__len__`, but is considered a mapping rather than a sequence because the " +"lookups use arbitrary :term:`hashable` keys rather than integers." msgstr "" ":term:`itérable` qui offre un accès efficace à ses éléments par un indice " "sous forme de nombre entier via la méthode spéciale :meth:`__getitem__` et " "qui définit une méthode :meth:`__len__` donnant sa taille. Voici quelques " -"séquences natives : :class:`list`, :class:`str`, :class:`tuple`, et :class:" -"`bytes`. Notez que :class:`dict` possède aussi une méthode :meth:" -"`__getitem__` et une méthode :meth:`__len__`, mais il est considéré comme un " -"*mapping* plutôt qu'une séquence, car ses accès se font par une clé " -"arbitraire :term:`immuable` plutôt qu'un nombre entier." +"séquences natives : :class:`list`, :class:`str`, :class:`tuple`, " +"et :class:`bytes`. Notez que :class:`dict` possède aussi une " +"méthode :meth:`__getitem__` et une méthode :meth:`__len__`, mais il est " +"considéré comme un *mapping* plutôt qu'une séquence, car ses accès se font " +"par une clé arbitraire :term:`immuable` plutôt qu'un nombre entier." -#: glossary.rst:1182 +#: glossary.rst:1435 #, fuzzy msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " -"richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" -"`~object.__len__`, adding :meth:`!count`, :meth:`!index`, :meth:`~object." -"__contains__`, and :meth:`~object.__reversed__`. Types that implement this " -"expanded interface can be registered explicitly using :func:`~abc.ABCMeta." -"register`. For more documentation on sequence methods generally, see :ref:" -"`Common Sequence Operations `." +"richer interface that goes beyond just :meth:`~object.__getitem__` " +"and :meth:`~object.__len__`, " +"adding :meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~object.__contains__`, " +"and :meth:`~object.__reversed__`. Types that implement this expanded " +"interface can be registered explicitly using :func:`~abc.ABCMeta.register`. " +"For more documentation on sequence methods generally, see :ref:`Common " +"Sequence Operations `." msgstr "" "La classe abstraite de base :class:`collections.abc.Sequence` définit une " -"interface plus riche qui va au-delà des simples :meth:`__getitem__` et :meth:" -"`__len__`, en ajoutant :meth:`count`, :meth:`index`, :meth:`__contains__` " +"interface plus riche qui va au-delà des simples :meth:`__getitem__` " +"et :meth:`__len__`, en " +"ajoutant :meth:`count`, :meth:`index`, :meth:`__contains__` " "et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " "peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." -#: glossary.rst:1191 +#: glossary.rst:1445 msgid "set comprehension" msgstr "ensemble en compréhension (ou ensemble en intension)" -#: glossary.rst:1193 +#: glossary.rst:1447 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " -"not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. See :ref:" -"`comprehensions`." +"not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. " +"See :ref:`comprehensions`." msgstr "" "Une façon compacte de traiter tout ou partie des éléments d'un itérable et " "de renvoyer un *set* avec les résultats. ``results = {c for c in " "'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " "« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." -#: glossary.rst:1197 +#: glossary.rst:1451 msgid "single dispatch" msgstr "distribution simple" -#: glossary.rst:1199 +#: glossary.rst:1453 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2787,105 +3268,127 @@ msgstr "" "générique>`, où l'implémentation est choisie en fonction du type d'un seul " "argument." -#: glossary.rst:1201 +#: glossary.rst:1455 msgid "slice" msgstr "tranche" -#: glossary.rst:1203 +#: glossary.rst:1457 msgid "" -"An object usually containing a portion of a :term:`sequence`. A slice is " -"created using the subscript notation, ``[]`` with colons between numbers " -"when several are given, such as in ``variable_name[1:3:5]``. The bracket " -"(subscript) notation uses :class:`slice` objects internally." +"An object of type :class:`slice`, used to describe a portion of " +"a :term:`sequence`. A slice object is created when using the :ref:`slicing " +"` form of :ref:`subscript notation `, with colons " +"inside square brackets, such as in ``variable_name[1:3:5]``." msgstr "" -"(*slice* en anglais), un objet contenant habituellement une portion de :term:" -"`séquence`. Une tranche est créée en utilisant la notation ``[]`` avec des " -"``:`` entre les nombres lorsque plusieurs sont fournis, comme dans " -"``variable_name[1:3:5]``. Cette notation utilise des objets :class:`slice` " -"en interne." -#: glossary.rst:1207 +#: glossary.rst:1462 msgid "soft deprecated" msgstr "" -#: glossary.rst:1209 +#: glossary.rst:1464 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " "will not be enhanced further." msgstr "" -#: glossary.rst:1213 +#: glossary.rst:1468 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "" -#: glossary.rst:1216 +#: glossary.rst:1471 msgid "" "See `PEP 387: Soft Deprecation `_." msgstr "" -#: glossary.rst:1218 +#: glossary.rst:1473 msgid "special method" msgstr "méthode spéciale" -#: glossary.rst:1222 +#: glossary.rst:1477 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " -"with double underscores. Special methods are documented in :ref:" -"`specialnames`." +"with double underscores. Special methods are documented " +"in :ref:`specialnames`." msgstr "" "(*special method* en anglais) Méthode appelée implicitement par Python pour " "exécuter une opération sur un type, comme une addition. De telles méthodes " "ont des noms commençant et terminant par des doubles tirets bas. Les " "méthodes spéciales sont documentées dans :ref:`specialnames`." -#: glossary.rst:1226 +#: glossary.rst:1481 +msgid "standard library" +msgstr "" + +#: glossary.rst:1483 +msgid "" +"The collection of :term:`packages `, :term:`modules ` " +"and :term:`extension modules ` distributed as a part of " +"the official Python interpreter package. The exact membership of the " +"collection may vary based on platform, available system libraries, or other " +"criteria. Documentation can be found at :ref:`library-index`." +msgstr "" + +#: glossary.rst:1489 +msgid "" +"See also :data:`sys.stdlib_module_names` for a list of all possible standard " +"library module names." +msgstr "" + +#: glossary.rst:1491 msgid "statement" msgstr "instruction" -#: glossary.rst:1228 +#: glossary.rst:1493 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " -"an :term:`expression` or one of several constructs with a keyword, such as :" -"keyword:`if`, :keyword:`while` or :keyword:`for`." +"an :term:`expression` or one of several constructs with a keyword, such " +"as :keyword:`if`, :keyword:`while` or :keyword:`for`." msgstr "" "Une instruction (*statement* en anglais) est un composant d'un \"bloc\" de " "code. Une instruction est soit une :term:`expression`, soit une ou plusieurs " "constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " "ou :keyword:`for`." -#: glossary.rst:1231 +#: glossary.rst:1496 msgid "static type checker" msgstr "" -#: glossary.rst:1233 +#: glossary.rst:1498 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " -"such as incorrect types. See also :term:`type hints ` and the :" -"mod:`typing` module." +"such as incorrect types. See also :term:`type hints ` and " +"the :mod:`typing` module." +msgstr "" + +#: glossary.rst:1501 +msgid "stdlib" +msgstr "" + +#: glossary.rst:1503 +msgid "An abbreviation of :term:`standard library`." msgstr "" -#: glossary.rst:1236 +#: glossary.rst:1504 msgid "strong reference" msgstr "référence forte" -#: glossary.rst:1238 +#: glossary.rst:1506 #, fuzzy msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " -"calling :c:func:`Py_INCREF` when the reference is created and released with :" -"c:func:`Py_DECREF` when the reference is deleted." +"calling :c:func:`Py_INCREF` when the reference is created and released " +"with :c:func:`Py_DECREF` when the reference is deleted." msgstr "" "Dans l'API C de Python, une référence forte est une référence vers un objet " "qui incrémente son compteur de références lorsqu'elle est créée et le " "décrémente lorsqu'elle est effacée." -#: glossary.rst:1244 +#: glossary.rst:1512 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -2896,15 +3399,65 @@ msgstr "" "Il faut normalement appeler :c:func:`Py_DECREF` dessus avant de sortir de sa " "portée lexicale, sans quoi il y a une fuite de référence." -#: glossary.rst:1249 +#: glossary.rst:1517 msgid "See also :term:`borrowed reference`." msgstr "Voir aussi :term:`référence empruntée`." -#: glossary.rst:1250 +#: glossary.rst:1518 +#, fuzzy +msgid "subscript" +msgstr "descripteur" + +#: glossary.rst:1520 +msgid "" +"The expression in square brackets of a :ref:`subscription expression " +"`, for example, the ``3`` in ``items[3]``. Usually used to " +"select an element of a container. Also called a :term:`key` when " +"subscripting a :term:`mapping`, or an :term:`index` when subscripting " +"a :term:`sequence`." +msgstr "" + +#: glossary.rst:1526 +msgid "synchronization primitive" +msgstr "" + +#: glossary.rst:1528 +msgid "" +"A basic building block for coordinating (synchronizing) the execution of " +"multiple threads to ensure :term:`thread-safe` access to shared resources. " +"Python's :mod:`threading` module provides several synchronization primitives " +"including :class:`~threading.Lock`, :class:`~threading.RLock`, :class:`~threading.Semaphore`, :class:`~threading.Condition`, :class:`~threading.Event`, " +"and :class:`~threading.Barrier`. Additionally, the :mod:`queue` module " +"provides multi-producer, multi-consumer queues that are especially useful in " +"multithreaded programs. These primitives help prevent :term:`race conditions " +"` and coordinate thread execution. See also :term:`lock`." +msgstr "" + +#: glossary.rst:1538 +#, fuzzy +msgid "t-string" +msgstr "f-string" + +#: glossary.rst:1539 +#, fuzzy +msgid "t-strings" +msgstr "f-string" + +#: glossary.rst:1541 +#, fuzzy +msgid "" +"String literals prefixed with ``t`` or ``T`` are commonly called \"t-" +"strings\" which is short for :ref:`template string literals `." +msgstr "" +"Chaîne littérale préfixée de ``'f'`` ou ``'F'``. Les \"f-strings\" sont un " +"raccourci pour :ref:`formatted string literals `. Voir " +"la :pep:`498`." + +#: glossary.rst:1544 msgid "text encoding" msgstr "encodages de texte" -#: glossary.rst:1252 +#: glossary.rst:1546 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " @@ -2914,7 +3467,7 @@ msgstr "" "(dans l'intervalle ``U+0000``--``U+10FFFF``). Pour stocker ou transmettre " "une chaîne, il est nécessaire de la sérialiser en suite d'octets." -#: glossary.rst:1256 +#: glossary.rst:1550 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." @@ -2923,7 +3476,7 @@ msgstr "" "« encoder » et recréer la chaîne à partir de la suite d'octets s'appelle " "« décoder »." -#: glossary.rst:1259 +#: glossary.rst:1553 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -2932,39 +3485,116 @@ msgstr "" "sérialisation de texte, que l'on regroupe sous l'expression « encodages de " "texte »." -#: glossary.rst:1262 +#: glossary.rst:1556 msgid "text file" msgstr "fichier texte" -#: glossary.rst:1264 +#: glossary.rst:1558 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " -"text file actually accesses a byte-oriented datastream and handles the :term:" -"`text encoding` automatically. Examples of text files are files opened in " -"text mode (``'r'`` or ``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, and " -"instances of :class:`io.StringIO`." -msgstr "" -":term:`Objet fichier ` capable de lire et d'écrire des objets :" -"class:`str`. Souvent, un fichier texte (*text file* en anglais) accède en " -"fait à un flux de donnée en octets et gère l':term:`encodage de texte ` automatiquement. Des exemples de fichiers textes sont les " -"fichiers ouverts en mode texte (``'r'`` ou ``'w'``), :data:`sys.stdin`, :" -"data:`sys.stdout` et les instances de :class:`io.StringIO`." +"text file actually accesses a byte-oriented datastream and handles " +"the :term:`text encoding` automatically. Examples of text files are files " +"opened in text mode (``'r'`` or " +"``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, and instances " +"of :class:`io.StringIO`." +msgstr "" +":term:`Objet fichier ` capable de lire et d'écrire des " +"objets :class:`str`. Souvent, un fichier texte (*text file* en anglais) " +"accède en fait à un flux de donnée en octets et gère l':term:`encodage de " +"texte ` automatiquement. Des exemples de fichiers textes sont " +"les fichiers ouverts en mode texte (``'r'`` ou " +"``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances " +"de :class:`io.StringIO`." -#: glossary.rst:1271 +#: glossary.rst:1565 msgid "" -"See also :term:`binary file` for a file object able to read and write :term:" -"`bytes-like objects `." +"See also :term:`binary file` for a file object able to read and " +"write :term:`bytes-like objects `." msgstr "" "Voir aussi :term:`fichier binaire ` pour un objet fichier " "capable de lire et d'écrire des :term:`objets octets-compatibles `." -#: glossary.rst:1273 +#: glossary.rst:1567 +msgid "thread state" +msgstr "" + +#: glossary.rst:1570 +msgid "" +"The information used by the :term:`CPython` runtime to run in an OS thread. " +"For example, this includes the current exception, if any, and the state of " +"the bytecode interpreter." +msgstr "" + +#: glossary.rst:1574 +msgid "" +"Each thread state is bound to a single OS thread, but threads may have many " +"thread states available. At most, one of them may be :term:`attached " +"` at once." +msgstr "" + +#: glossary.rst:1578 +msgid "" +"An :term:`attached thread state` is required to call most of Python's C API, " +"unless a function explicitly documents otherwise. The bytecode interpreter " +"only runs under an attached thread state." +msgstr "" + +#: glossary.rst:1582 +msgid "" +"Each thread state belongs to a single interpreter, but each interpreter may " +"have many thread states, including multiple for the same OS thread. Thread " +"states from multiple interpreters may be bound to the same thread, but only " +"one can be :term:`attached ` in that thread at any " +"given moment." +msgstr "" + +#: glossary.rst:1588 +msgid "" +"See :ref:`Thread State and the Global Interpreter Lock ` for more " +"information." +msgstr "" + +#: glossary.rst:1590 +msgid "thread-safe" +msgstr "" + +#: glossary.rst:1592 +msgid "" +"A module, function, or class that behaves correctly when used by multiple " +"threads concurrently. Thread-safe code uses " +"appropriate :term:`synchronization primitives ` " +"like :term:`locks ` to protect shared mutable state, or is designed to " +"avoid shared mutable state entirely. In the :term:`free-threaded ` build, built-in types like :class:`dict`, :class:`list`, " +"and :class:`set` use internal locking to make many operations thread-safe, " +"although thread safety is not necessarily guaranteed. Code that is not " +"thread-safe may experience :term:`race conditions ` " +"and :term:`data races ` when used in multi-threaded programs." +msgstr "" + +#: glossary.rst:1603 +msgid "token" +msgstr "" + +#: glossary.rst:1606 +msgid "" +"A small unit of source code, generated by the :ref:`lexical analyzer " +"` (also called the *tokenizer*). Names, numbers, strings, " +"operators, newlines and similar are represented by tokens." +msgstr "" + +#: glossary.rst:1611 +msgid "" +"The :mod:`tokenize` module exposes Python's lexical analyzer. " +"The :mod:`token` module contains information on the various types of tokens." +msgstr "" + +#: glossary.rst:1614 msgid "triple-quoted string" msgstr "chaîne entre triple guillemets" -#: glossary.rst:1275 +#: glossary.rst:1616 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2983,30 +3613,31 @@ msgstr "" "``\\``. Elle est ainsi particulièrement utile pour les chaînes de " "documentation (*docstrings*)." -#: glossary.rst:1282 +#: glossary.rst:1623 msgid "type" msgstr "type" -#: glossary.rst:1284 +#: glossary.rst:1625 #, fuzzy msgid "" "The type of a Python object determines what kind of object it is; every " -"object has a type. An object's type is accessible as its :attr:`~object." -"__class__` attribute or can be retrieved with ``type(obj)``." +"object has a type. An object's type is accessible as " +"its :attr:`~object.__class__` attribute or can be retrieved with " +"``type(obj)``." msgstr "" "Le type d'un objet Python détermine quel genre d'objet c'est. Tous les " -"objets ont un type. Le type d'un objet peut être obtenu via son attribut :" -"attr:`~instance.__class__` ou via ``type(obj)``." +"objets ont un type. Le type d'un objet peut être obtenu via son " +"attribut :attr:`~instance.__class__` ou via ``type(obj)``." -#: glossary.rst:1288 +#: glossary.rst:1629 msgid "type alias" msgstr "alias de type" -#: glossary.rst:1290 +#: glossary.rst:1631 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "Synonyme d'un type, créé en affectant le type à un identifiant." -#: glossary.rst:1292 +#: glossary.rst:1633 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -3014,20 +3645,20 @@ msgstr "" "Les alias de types sont utiles pour simplifier les :term:`indications de " "types `. Par exemple ::" -#: glossary.rst:1299 +#: glossary.rst:1640 msgid "could be made more readable like this::" msgstr "pourrait être rendu plus lisible comme ceci ::" -#: glossary.rst:1320 +#: glossary.rst:1661 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "" "Voir :mod:`typing` et la :pep:`484`, qui décrivent cette fonctionnalité." -#: glossary.rst:1307 +#: glossary.rst:1648 msgid "type hint" msgstr "indication de type" -#: glossary.rst:1309 +#: glossary.rst:1650 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -3036,7 +3667,7 @@ msgstr "" "variable, un attribut de classe, un paramètre de fonction ou une valeur de " "retour." -#: glossary.rst:1312 +#: glossary.rst:1653 #, fuzzy msgid "" "Type hints are optional and are not enforced by Python but they are useful " @@ -3048,7 +3679,7 @@ msgstr "" "statique et aident les IDE à compléter et à réusiner (*code refactoring* en " "anglais) le code." -#: glossary.rst:1316 +#: glossary.rst:1657 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -3057,69 +3688,70 @@ msgstr "" "fonctions, mais pas de variables locales, peuvent être consultées en " "utilisant :func:`typing.get_type_hints`." -#: glossary.rst:1321 +#: glossary.rst:1662 msgid "universal newlines" msgstr "retours à la ligne universels" -#: glossary.rst:1323 +#: glossary.rst:1664 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " "Windows convention ``'\\r\\n'``, and the old Macintosh convention " -"``'\\r'``. See :pep:`278` and :pep:`3116`, as well as :func:`bytes." -"splitlines` for an additional use." +"``'\\r'``. See :pep:`278` and :pep:`3116`, as well " +"as :func:`bytes.splitlines` for an additional use." msgstr "" "Une manière d'interpréter des flux de texte dans lesquels sont reconnues " "toutes les fins de ligne suivantes : la convention Unix ``'\\n'``, la " "convention Windows ``'\\r\\n'`` et l'ancienne convention Macintosh " -"``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la fonction :func:" -"`bytes.splitlines` pour d'autres usages." +"``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la " +"fonction :func:`bytes.splitlines` pour d'autres usages." -#: glossary.rst:1328 +#: glossary.rst:1669 msgid "variable annotation" msgstr "annotation de variable" -#: glossary.rst:1330 +#: glossary.rst:1671 msgid "An :term:`annotation` of a variable or a class attribute." msgstr ":term:`annotation` d'une variable ou d'un attribut de classe." -#: glossary.rst:1332 +#: glossary.rst:1673 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" "Lorsque vous annotez une variable ou un attribut de classe, l'affectation " "est facultative ::" -#: glossary.rst:1337 +#: glossary.rst:1678 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" msgstr "" -"Les annotations de variables sont généralement utilisées pour des :term:" -"`indications de types ` : par exemple, cette variable devrait " -"prendre des valeurs de type :class:`int` ::" +"Les annotations de variables sont généralement utilisées pour " +"des :term:`indications de types ` : par exemple, cette variable " +"devrait prendre des valeurs de type :class:`int` ::" -#: glossary.rst:1343 +#: glossary.rst:1684 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" -"La syntaxe d'annotation de variable est expliquée dans la section :ref:" -"`annassign`." +"La syntaxe d'annotation de variable est expliquée dans la " +"section :ref:`annassign`." -#: glossary.rst:1345 +#: glossary.rst:1686 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" -"Reportez-vous à :term:`annotation de fonction`, à la :" -"pep:`484` et à la :pep:`526` qui décrivent cette fonctionnalité. Voir aussi :" -"ref:`annotations-howto` sur les bonnes pratiques concernant les annotations." +"Reportez-vous à :term:`annotation de fonction`, à " +"la :pep:`484` et à la :pep:`526` qui décrivent cette fonctionnalité. Voir " +"aussi :ref:`annotations-howto` sur les bonnes pratiques concernant les " +"annotations." -#: glossary.rst:1349 +#: glossary.rst:1690 msgid "virtual environment" msgstr "environnement virtuel" -#: glossary.rst:1351 +#: glossary.rst:1692 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3131,15 +3763,15 @@ msgstr "" "des paquets sans interférer avec d'autres applications Python fonctionnant " "sur le même système." -#: glossary.rst:1356 +#: glossary.rst:1697 msgid "See also :mod:`venv`." msgstr "Voir aussi :mod:`venv`." -#: glossary.rst:1357 +#: glossary.rst:1698 msgid "virtual machine" msgstr "machine virtuelle" -#: glossary.rst:1359 +#: glossary.rst:1700 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3148,11 +3780,23 @@ msgstr "" "(*virtual machine*) de Python exécute le :term:`code intermédiaire " "` produit par le compilateur de *bytecode*." -#: glossary.rst:1361 +#: glossary.rst:1702 +#, fuzzy +msgid "walrus operator" +msgstr "itérateur asynchrone" + +#: glossary.rst:1704 +msgid "" +"A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " +"turn your head." +msgstr "" + +#: glossary.rst:1707 msgid "Zen of Python" msgstr "Le zen de Python" -#: glossary.rst:1363 +#: glossary.rst:1709 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -3162,11 +3806,33 @@ msgstr "" "langage. Cette liste peut être obtenue en tapant \"``import this``\" dans " "une invite Python interactive." +#~ msgid "" +#~ "Mutable objects can change their value but keep their :func:`id`. See " +#~ "also :term:`immutable`." +#~ msgstr "" +#~ "Un objet mutable peut changer de valeur tout en gardant le " +#~ "même :func:`id`. Voir aussi :term:`immuable`." + +#~ msgid "" +#~ "An object usually containing a portion of a :term:`sequence`. A slice is " +#~ "created using the subscript notation, ``[]`` with colons between numbers " +#~ "when several are given, such as in ``variable_name[1:3:5]``. The bracket " +#~ "(subscript) notation uses :class:`slice` objects internally." +#~ msgstr "" +#~ "(*slice* en anglais), un objet contenant habituellement une portion " +#~ "de :term:`séquence`. Une tranche est créée en utilisant la notation " +#~ "``[]`` avec des ``:`` entre les nombres lorsque plusieurs sont fournis, " +#~ "comme dans ``variable_name[1:3:5]``. Cette notation utilise des " +#~ "objets :class:`slice` en interne." + +#~ msgid "The :const:`Ellipsis` built-in constant." +#~ msgstr "La constante :const:`Ellipsis`." + #, fuzzy #~ msgid "" #~ "An object which controls the environment seen in a :keyword:`with` " -#~ "statement by defining :meth:`~object.__enter__` and :meth:`~object." -#~ "__exit__` methods. See :pep:`343`." +#~ "statement by defining :meth:`~object.__enter__` " +#~ "and :meth:`~object.__exit__` methods. See :pep:`343`." #~ msgstr "" #~ "Objet contrôlant l'environnement à l'intérieur d'un bloc :keyword:`with` " #~ "en définissant les méthodes :meth:`__enter__` et :meth:`__exit__`. " @@ -3186,8 +3852,8 @@ msgstr "" #~ "une valeur différente pour une variable. Toutefois, avec les variables de " #~ "contexte, il peut y avoir plusieurs contextes dans un fil d’exécution et " #~ "l’utilisation principale pour les variables de contexte est de garder une " -#~ "trace des variables dans les tâches asynchrones concourantes. Voir :mod:" -#~ "`contextvars`." +#~ "trace des variables dans les tâches asynchrones concourantes. " +#~ "Voir :mod:`contextvars`." #, fuzzy #~ msgid "C-contiguous" @@ -3218,9 +3884,9 @@ msgstr "" #~ "entry point is provided as :file:`Tools/scripts/2to3`. See :ref:`2to3-" #~ "reference`." #~ msgstr "" -#~ "*2to3* est disponible dans la bibliothèque standard sous le nom de :mod:" -#~ "`lib2to3` ; un point d’entrée indépendant est fourni via :file:`Tools/" -#~ "scripts/2to3`. Cf. :ref:`2to3-reference`." +#~ "*2to3* est disponible dans la bibliothèque standard sous le nom " +#~ "de :mod:`lib2to3` ; un point d’entrée indépendant est fourni " +#~ "via :file:`Tools/scripts/2to3`. Cf. :ref:`2to3-reference`." #~ msgid "" #~ "Past efforts to create a \"free-threaded\" interpreter (one which locks " diff --git a/howto/a-conceptual-overview-of-asyncio.po b/howto/a-conceptual-overview-of-asyncio.po new file mode 100644 index 000000000..878910a84 --- /dev/null +++ b/howto/a-conceptual-overview-of-asyncio.po @@ -0,0 +1,547 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: howto/a-conceptual-overview-of-asyncio.rst:5 +msgid "A conceptual overview of :mod:`!asyncio`" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:7 +msgid "" +"This :ref:`HOWTO ` article seeks to help you build a sturdy mental " +"model of how :mod:`asyncio` fundamentally works, helping you understand the " +"how and why behind the recommended patterns." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:11 +msgid "" +"You might be curious about some key :mod:`!asyncio` concepts. By the end of " +"this article, you'll be able to comfortably answer these questions:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:14 +msgid "What's happening behind the scenes when an object is awaited?" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:15 +msgid "" +"How does :mod:`!asyncio` differentiate between a task which doesn't need CPU " +"time (such as a network request or file read) as opposed to a task that does " +"(such as computing n-factorial)?" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:18 +msgid "" +"How to write an asynchronous variant of an operation, such as an async sleep " +"or database request." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:23 +msgid "" +"The `guide `_ that inspired this HOWTO article, by Alexander Nordin." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:25 +msgid "" +"This in-depth `YouTube tutorial series `_ on ``asyncio`` " +"created by Python core team member, Łukasz Langa." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:28 +msgid "" +"`500 Lines or Less: A Web Crawler With asyncio Coroutines `_ by A. " +"Jesse Jiryu Davis and Guido van Rossum." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:34 +msgid "A conceptual overview part 1: the high-level" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:36 +msgid "" +"In part 1, we'll cover the main, high-level building blocks of :mod:`!" +"asyncio`: the event loop, coroutine functions, coroutine objects, tasks, and " +"``await``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:41 +#, fuzzy +msgid "Event loop" +msgstr "Boucle d'évènements" + +#: howto/a-conceptual-overview-of-asyncio.rst:43 +msgid "" +"Everything in :mod:`!asyncio` happens relative to the event loop. It's the " +"star of the show, but prefers to work behind the scenes, managing and " +"coordinating resources. It's like an orchestra conductor. Some power is " +"explicitly granted to it, but a lot of its ability to get things done comes " +"from the respect and cooperation of its band members." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:50 +msgid "" +"In more technical terms, the event loop contains a collection of jobs to be " +"run. Some jobs are added directly by you, and some indirectly by :mod:`!" +"asyncio`. The event loop takes a job from its backlog of work and invokes it " +"(or \"gives it control\"), similar to calling a function, and then that job " +"runs. Once it pauses or completes, it returns control to the event loop. The " +"event loop will then select another job from its pool and invoke it. You can " +"*roughly* think of the collection of jobs as a queue: jobs are added and " +"then processed one at a time, generally (but not always) in order. This " +"process repeats indefinitely, with the event loop cycling endlessly onwards. " +"If there are no more jobs pending execution, the event loop is smart enough " +"to rest and avoid needlessly wasting CPU cycles, and will come back when " +"there's more work to be done, such as when I/O operations complete or timers " +"expire." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:64 +msgid "" +"Effective execution relies on jobs sharing well and cooperating; a greedy " +"job could hog control and leave the other jobs to starve, rendering the " +"overall event loop approach rather useless." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:79 +msgid "Asynchronous functions and coroutines" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:81 +msgid "This is a basic, boring Python function::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:90 +msgid "Calling a regular function invokes its logic or body::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:96 +msgid "" +"The :ref:`async def `, as opposed to just a plain ``def``, makes " +"this an asynchronous function (or \"coroutine function\"). Calling it " +"creates and returns a :ref:`coroutine ` object." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:108 +msgid "" +"Calling the async function, ``loudmouth_penguin``, does not execute the " +"print statement; instead, it creates a coroutine object::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:114 +msgid "" +"The terms \"coroutine function\" and \"coroutine object\" are often " +"conflated as coroutine. That can be confusing! In this article, coroutine " +"specifically refers to a coroutine object, or more precisely, an instance " +"of :class:`types.CoroutineType` (native coroutine). Note that coroutines can " +"also exist as instances of :class:`collections.abc.Coroutine` -- a " +"distinction that matters for type checking." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:123 +msgid "" +"A coroutine represents the function's body or logic. A coroutine has to be " +"explicitly started; again, merely creating the coroutine does not start it. " +"Notably, the coroutine can be paused and resumed at various points within " +"the function's body. That pausing and resuming ability is what allows for " +"asynchronous behavior!" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:130 +msgid "" +"Coroutines and coroutine functions were built by leveraging the " +"functionality of :term:`generators ` " +"and :term:`generator functions `. Recall, a generator function is " +"a function that :keyword:`yield`\\s, like this one::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:146 +msgid "" +"Similar to a coroutine function, calling a generator function does not run " +"it. Instead, it creates a generator object::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:152 +msgid "" +"You can proceed to the next ``yield`` of a generator by using the built-in " +"function :func:`next`. In other words, the generator runs, then pauses. For " +"example::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:167 +msgid "Tasks" +msgstr "Tâches" + +#: howto/a-conceptual-overview-of-asyncio.rst:169 +msgid "" +"Roughly speaking, :ref:`tasks ` are coroutines (not " +"coroutine functions) tied to an event loop. A task also maintains a list of " +"callback functions whose importance will become clear in a moment when we " +"discuss :keyword:`await`." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:174 +msgid "" +"Creating a task automatically schedules it for execution (by adding a " +"callback to run it in the event loop's to-do list, that is, collection of " +"jobs). The recommended way to create tasks is " +"via :func:`asyncio.create_task`." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:178 +msgid "" +":mod:`!asyncio` automatically associates tasks with the event loop for you. " +"This automatic association was purposely designed into :mod:`!asyncio` for " +"the sake of simplicity. Without it, you'd have to keep track of the event " +"loop object and pass it to any coroutine function that wants to create " +"tasks, adding redundant clutter to your code." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:191 +msgid "" +"Earlier, we manually created the event loop and set it to run forever. In " +"practice, it's recommended to use (and common to see) :func:`asyncio.run`, " +"which takes care of managing the event loop and ensuring the provided " +"coroutine finishes before advancing. For example, many async programs follow " +"this setup::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:209 +msgid "" +"It's important to be aware that the task itself is not added to the event " +"loop, only a callback to the task is. This matters if the task object you " +"created is garbage collected before it's called by the event loop. For " +"example, consider this program:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:229 +msgid "" +"Because there's no reference to the task object created on line 5, it " +"*might* be garbage collected before the event loop invokes it. Later " +"instructions in the coroutine ``main()`` hand control back to the event loop " +"so it can invoke other jobs. When the event loop eventually tries to run the " +"task, it might fail and discover the task object does not exist! This can " +"also happen even if a coroutine keeps a reference to a task but completes " +"before that task finishes. When the coroutine exits, local variables go out " +"of scope and may be subject to garbage collection. In practice, ``asyncio`` " +"and Python's garbage collector work pretty hard to ensure this sort of thing " +"doesn't happen. But that's no reason to be reckless!" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:245 +msgid "await" +msgstr "await" + +#: howto/a-conceptual-overview-of-asyncio.rst:247 +msgid "" +":keyword:`await` is a Python keyword that's commonly used in one of two " +"different ways::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:253 +msgid "" +"In a crucial way, the behavior of ``await`` depends on the type of object " +"being awaited." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:258 +msgid "Awaiting tasks" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:260 +msgid "" +"Awaiting a task will cede control from the current task or coroutine to the " +"event loop. In the process of relinquishing control, a few important things " +"happen. We'll use the following code example to illustrate::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:272 +msgid "" +"In this example, imagine the event loop has passed control to the start of " +"the coroutine ``plant_a_tree()``. As seen above, the coroutine creates a " +"task and then awaits it. The ``await dig_the_hole_task`` instruction adds a " +"callback (which will resume ``plant_a_tree()``) to the ``dig_the_hole_task`` " +"object's list of callbacks. And then, the instruction cedes control to the " +"event loop. Some time later, the event loop will pass control to " +"``dig_the_hole_task`` and the task will finish whatever it needs to do. Once " +"the task finishes, it will add its various callbacks to the event loop, in " +"this case, a call to resume ``plant_a_tree()``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:283 +msgid "" +"Generally speaking, when the awaited task finishes (``dig_the_hole_task``), " +"the original task or coroutine (``plant_a_tree()``) is added back to the " +"event loop's to-do list to be resumed." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:287 +msgid "" +"This is a basic, yet reliable mental model. In practice, the control " +"handoffs are slightly more complex, but not by much. In part 2, we'll walk " +"through the details that make this possible." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:293 +msgid "Awaiting coroutines" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:295 +msgid "" +"**Unlike tasks, awaiting a coroutine does not hand control back to the event " +"loop!** Wrapping a coroutine in a task first, then awaiting that would cede " +"control. The behavior of ``await coroutine`` is effectively the same as " +"invoking a regular, synchronous Python function. Consider this program::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:320 +msgid "" +"The first statement in the coroutine ``main()`` creates ``task_b`` and " +"schedules it for execution via the event loop. Then, ``coro_a()`` is " +"repeatedly awaited. Control never cedes to the event loop, which is why we " +"see the output of all three ``coro_a()`` invocations before ``coro_b()``'s " +"output:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:333 +msgid "" +"If we change ``await coro_a()`` to ``await asyncio.create_task(coro_a())``, " +"the behavior changes. The coroutine ``main()`` cedes control to the event " +"loop with that statement. The event loop then proceeds through its backlog " +"of work, calling ``task_b`` and then the task which wraps ``coro_a()`` " +"before resuming the coroutine ``main()``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:347 +msgid "" +"This behavior of ``await coroutine`` can trip a lot of people up! That " +"example highlights how using only ``await coroutine`` could unintentionally " +"hog control from other tasks and effectively stall the event " +"loop. :func:`asyncio.run` can help you detect such occurrences via the " +"``debug=True`` flag, which enables :ref:`debug mode `. " +"Among other things, it will log any coroutines that monopolize execution for " +"100ms or longer." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:357 +msgid "" +"The design intentionally trades off some conceptual clarity around usage of " +"``await`` for improved performance. Each time a task is awaited, control " +"needs to be passed all the way up the call stack to the event loop. Then, " +"the event loop needs to manage its internal state and work through its " +"processing logic to resume the next job. That might sound minor, but in a " +"large program with many ``await``\\ s, that overhead can add up to a non-" +"negligible performance drag." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:368 +msgid "A conceptual overview part 2: the nuts and bolts" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:370 +msgid "" +"Part 2 goes into detail on the mechanisms :mod:`!asyncio` uses to manage " +"control flow. This is where the magic happens. You'll come away from this " +"section knowing what ``await`` does behind the scenes and how to make your " +"own asynchronous operators." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:378 +msgid "The inner workings of coroutines" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:380 +msgid "" +":mod:`!asyncio` leverages four components of Python to pass around control." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:383 +msgid "" +":meth:`coroutine.send(arg) ` is the method used to start or " +"resume a coroutine. If the coroutine was paused and is now being resumed, " +"the argument ``arg`` will be sent in as the return value of the ``yield`` " +"statement which originally paused it. If the coroutine is being used for the " +"first time (as opposed to being resumed), ``arg`` must be ``None``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:419 +msgid "" +":ref:`yield `, as usual, pauses execution and returns control to " +"the caller. In the example above, the ``yield``, on line 3, is called by " +"``... = await rock`` on line 11. More broadly speaking, ``await`` calls " +"the :meth:`~object.__await__` method of the given object. ``await`` also " +"does one more very special thing: it propagates (or \"passes along\") any " +"``yield``\\ s it receives up the call chain. In this case, that's back to " +"``... = coroutine.send(None)`` on line 16." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:429 +msgid "" +"The coroutine is resumed via the ``coroutine.send(42)`` call on line 21. The " +"coroutine picks back up from where it ``yield``\\ ed (or paused) on line 3 " +"and executes the remaining statements in its body. When a coroutine " +"finishes, it raises a :exc:`StopIteration` exception with the return value " +"attached in the :attr:`~StopIteration.value` attribute." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:435 +msgid "That snippet produces this output:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:447 +msgid "" +"It's worth pausing for a moment here and making sure you followed the " +"various ways that control flow and values were passed. A lot of important " +"ideas were covered and it's worth ensuring your understanding is firm." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:451 +msgid "" +"The only way to yield (or effectively cede control) from a coroutine is to " +"``await`` an object that ``yield``\\ s in its ``__await__`` method. That " +"might sound odd to you. You might be thinking:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:455 +msgid "" +"1. What about a ``yield`` directly within the coroutine function? The " +"coroutine function becomes an :ref:`async generator function `, a different beast entirely." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:460 +msgid "" +"2. What about a :ref:`yield from ` within the coroutine function " +"to a (plain) generator? That causes the error: ``SyntaxError: yield from not " +"allowed in a coroutine.`` This was intentionally designed for the sake of " +"simplicity -- mandating only one way of using coroutines. Despite that, " +"``yield from`` and ``await`` effectively do the same thing. Initially " +"``yield`` was barred as well, but was re-accepted to allow for async " +"generators." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:471 +msgid "Futures" +msgstr "Futurs" + +#: howto/a-conceptual-overview-of-asyncio.rst:473 +msgid "" +"A :ref:`future ` is an object meant to represent a " +"computation's status and result. The term is a nod to the idea of something " +"still to come or not yet happened, and the object is a way to keep an eye on " +"that something." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:478 +msgid "" +"A future has a few important attributes. One is its state, which can be " +"either \"pending\", \"cancelled\", or \"done\". Another is its result, which " +"is set when the state transitions to done. Unlike a coroutine, a future does " +"not represent the actual computation to be done; instead, it represents the " +"status and result of that computation, kind of like a status light (red, " +"yellow, or green) or indicator." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:485 +msgid "" +":class:`asyncio.Task` subclasses :class:`asyncio.Future` in order to gain " +"these various capabilities. The prior section said tasks store a list of " +"callbacks, which wasn't entirely accurate. It's actually the ``Future`` " +"class that implements this logic, which ``Task`` inherits." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:492 +msgid "" +"Futures may also be used directly (not via tasks). Tasks mark themselves as " +"done when their coroutine is complete. Futures are much more versatile and " +"will be marked as done when you say so. In this way, they're the flexible " +"interface for you to make your own conditions for waiting and resuming." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:500 +msgid "A homemade asyncio.sleep" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:502 +msgid "" +"We'll go through an example of how you could leverage a future to create " +"your own variant of asynchronous sleep (``async_sleep``) which " +"mimics :func:`asyncio.sleep`." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:506 +msgid "" +"This snippet registers a few tasks with the event loop and then awaits the " +"task created by ``asyncio.create_task``, which wraps the ``async_sleep(3)`` " +"coroutine. We want that task to finish only after three seconds have " +"elapsed, but without preventing other tasks from running." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:537 +msgid "" +"Below, we use a future to enable custom control over when that task will be " +"marked as done. If :meth:`future.set_result() ` " +"(the method responsible for marking that future as done) is never called, " +"then this task will never finish. We've also enlisted the help of another " +"task, which we'll see in a moment, that will monitor how much time has " +"elapsed and, accordingly, call ``future.set_result()``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:556 +msgid "" +"Below, we use a rather bare ``YieldToEventLoop()`` object to ``yield`` from " +"its ``__await__`` method, ceding control to the event loop. This is " +"effectively the same as calling ``asyncio.sleep(0)``, but this approach " +"offers more clarity, not to mention it's somewhat cheating to use " +"``asyncio.sleep`` when showcasing how to implement it!" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:562 +msgid "" +"As usual, the event loop cycles through its tasks, giving them control and " +"receiving control back when they pause or finish. The ``watcher_task``, " +"which runs the coroutine ``_sleep_watcher(...)``, will be invoked once per " +"full cycle of the event loop. On each resumption, it'll check the time and " +"if not enough has elapsed, then it'll pause once again and hand control back " +"to the event loop. Once enough time has elapsed, ``_sleep_watcher(...)`` " +"marks the future as done and completes by exiting its infinite ``while`` " +"loop. Given this helper task is only invoked once per cycle of the event " +"loop, you'd be correct to note that this asynchronous sleep will sleep *at " +"least* three seconds, rather than exactly three seconds. Note this is also " +"true of ``asyncio.sleep``." +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:591 +msgid "Here is the full program's output:" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:602 +msgid "" +"You might feel this implementation of asynchronous sleep was unnecessarily " +"convoluted. And, well, it was. The example was meant to showcase the " +"versatility of futures with a simple example that could be mimicked for more " +"complex needs. For reference, you could implement it without futures, like " +"so::" +msgstr "" + +#: howto/a-conceptual-overview-of-asyncio.rst:617 +msgid "" +"But that's all for now. Hopefully you're ready to more confidently dive into " +"some async programming or check out advanced topics in the :mod:`rest of the " +"documentation `." +msgstr "" diff --git a/howto/abi3t-migration.po b/howto/abi3t-migration.po new file mode 100644 index 000000000..f89f363c2 --- /dev/null +++ b/howto/abi3t-migration.po @@ -0,0 +1,766 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: howto/abi3t-migration.rst:7 +msgid "Migrating to Stable ABI for free threading (``abi3t``)" +msgstr "" + +#: howto/abi3t-migration.rst:9 +msgid "" +"Starting with the 3.15 release, CPython supports a variant of the Stable ABI " +"that supports :term:`free-threaded ` Python: Stable ABI for " +"Free-Threaded Builds, or ``abi3t`` for short. This document describes how to " +"adapt C API extensions to support free threading." +msgstr "" + +#: howto/abi3t-migration.rst:15 +msgid "Why do this" +msgstr "" + +#: howto/abi3t-migration.rst:17 +msgid "" +"The typical reason to use Stable ABI is to reduce the number of artifacts " +"that you need to build and distribute for each version of your library." +msgstr "" + +#: howto/abi3t-migration.rst:20 +msgid "" +"Without the Stable ABI, you must build a separate shared library, and " +"typically a *wheel* distribution, for each feature version of CPython you " +"wish to support. For example, each tag in the following table represents a " +"separate library/wheel:" +msgstr "" + +#: howto/abi3t-migration.rst:49 howto/abi3t-migration.rst:69 +msgid "CPython version" +msgstr "" + +#: howto/abi3t-migration.rst:49 howto/abi3t-migration.rst:69 +msgid "Non-free-threaded" +msgstr "" + +#: howto/abi3t-migration.rst:49 howto/abi3t-migration.rst:69 +msgid "Free-threaded" +msgstr "" + +#: howto/abi3t-migration.rst:51 howto/abi3t-migration.rst:71 +msgid "3.12" +msgstr "" + +#: howto/abi3t-migration.rst:29 +msgid "``cpython-312``" +msgstr "" + +#: howto/abi3t-migration.rst:51 howto/abi3t-migration.rst:71 +msgid "---" +msgstr "" + +#: howto/abi3t-migration.rst:53 howto/abi3t-migration.rst:73 +msgid "3.13" +msgstr "" + +#: howto/abi3t-migration.rst:31 +msgid "``cpython-313``" +msgstr "" + +#: howto/abi3t-migration.rst:53 howto/abi3t-migration.rst:73 +msgid "``cpython-313t``" +msgstr "" + +#: howto/abi3t-migration.rst:55 howto/abi3t-migration.rst:75 +msgid "3.14" +msgstr "" + +#: howto/abi3t-migration.rst:33 +msgid "``cpython-314``" +msgstr "" + +#: howto/abi3t-migration.rst:55 howto/abi3t-migration.rst:75 +msgid "``cpython-314t``" +msgstr "" + +#: howto/abi3t-migration.rst:57 howto/abi3t-migration.rst:77 +msgid "3.15" +msgstr "" + +#: howto/abi3t-migration.rst:35 +msgid "``cpython-315``" +msgstr "" + +#: howto/abi3t-migration.rst:57 +msgid "``cpython-315t``" +msgstr "" + +#: howto/abi3t-migration.rst:59 howto/abi3t-migration.rst:79 +msgid "3.16" +msgstr "" + +#: howto/abi3t-migration.rst:37 +msgid "``cpython-316``" +msgstr "" + +#: howto/abi3t-migration.rst:59 +msgid "``cpython-316t``" +msgstr "" + +#: howto/abi3t-migration.rst:61 howto/abi3t-migration.rst:81 +msgid "Later versions" +msgstr "" + +#: howto/abi3t-migration.rst:39 +msgid ":samp:`cpython-3{XX}`" +msgstr "" + +#: howto/abi3t-migration.rst:61 +msgid ":samp:`cpython-3{XX}t`" +msgstr "" + +#: howto/abi3t-migration.rst:42 +msgid "" +"That's a lot of builds, especially when multiplied by the number of " +"supported platforms." +msgstr "" + +#: howto/abi3t-migration.rst:45 +msgid "" +"With the Stable ABI (``abi3``, introduced in CPython 3.2), a single " +"extension (per platform) can cover all *non-free-threaded* builds of CPython:" +msgstr "" + +#: howto/abi3t-migration.rst:51 +msgid "``abi3``" +msgstr "" + +#: howto/abi3t-migration.rst:64 +msgid "" +"The Stable ABI for free-threaded builds (``abi3t``), introduced in CPython " +"3.15, does the same for free-threaded builds. And it's compatible with non-" +"free-threaded ones as well:" +msgstr "" + +#: howto/abi3t-migration.rst:71 +msgid "``abi3`` *" +msgstr "" + +#: howto/abi3t-migration.rst:77 +msgid "``abi3t``" +msgstr "" + +#: howto/abi3t-migration.rst:84 +msgid "" +"\\* (As above, the ``abi3`` extension is compatible with all non-free-" +"threaded builds; even the 3.15+ ones that this table \"attributes\" to " +"``abi3t``.)" +msgstr "" + +#: howto/abi3t-migration.rst:88 +msgid "Why *not* do this" +msgstr "" + +#: howto/abi3t-migration.rst:90 +msgid "There are two main downsides to Stable ABI." +msgstr "" + +#: howto/abi3t-migration.rst:92 +msgid "" +"First, you extension may become slower, since Stable ABI prioritizes " +"compatibility over performance. The difference is usually not noticeable, " +"and often can be mitigated by using the same source to build both a Stable " +"ABI build and a few version-specific ones for \"tier 1\" CPython versions." +msgstr "" + +#: howto/abi3t-migration.rst:98 +msgid "" +"Second, not all of the C API is available. Extensions need to be ported to " +"build for Stable ABI, which may be difficult or, in rare cases, impossible." +msgstr "" + +#: howto/abi3t-migration.rst:102 +msgid "" +"Specifically, ``abi3t`` requires APIs added in CPython 3.15. If you want to " +"build your extension for older versions of CPython from the same source, you " +"have two main options:" +msgstr "" + +#: howto/abi3t-migration.rst:106 +msgid "Use preprocessor conditionals." +msgstr "" + +#: howto/abi3t-migration.rst:108 +msgid "" +"When following this guide, use ``#ifdef Py_TARGET_ABI3T`` blocks whenever " +"you are told to do a change that breaks the build on CPython versions you " +"care about. Keep the pre-existing code in ``#else`` blocks." +msgstr "" + +#: howto/abi3t-migration.rst:112 +msgid "" +"For hand-written C extensions, this approach is reasonable down to CPython " +"3.12, due to additions introduced in :pep:`697`. Keeping compatibility with " +"3.11 and below may be worth it for code generators (for example, Cython)." +msgstr "" + +#: howto/abi3t-migration.rst:117 +msgid "" +"Do not port to ``abi3t``, and continue building separate extensions for each " +"version of CPython, until you can drop support for the older versions." +msgstr "" + +#: howto/abi3t-migration.rst:120 +msgid "" +"This is a valid approach. Not all extensions need to switch to ``abi3t`` " +"right now." +msgstr "" + +#: howto/abi3t-migration.rst:125 +msgid "Prerequisites" +msgstr "" + +#: howto/abi3t-migration.rst:127 +msgid "" +"This guide assumes that you have an extension written directly in C (or C+" +"+), which you want to port to ``abi3t``." +msgstr "" + +#: howto/abi3t-migration.rst:130 +msgid "" +"If your extenstion uses a code generator (like Cython) or language binding " +"(like PyO3), it's best to wait until that tool has support for ``abi3t``. If " +"you maintain such a tool, you might be able to adapt the instructions here " +"for your tool." +msgstr "" + +#: howto/abi3t-migration.rst:136 +msgid "Non-free-threaded Stable ABI" +msgstr "" + +#: howto/abi3t-migration.rst:138 +msgid "" +"Your extension should support the Stable ABI (``abi3t``). If not, either " +"port it first, or follow this guide but be prepared to fix issues it does " +"not mention." +msgstr "" + +#: howto/abi3t-migration.rst:143 +msgid "Free-threading support" +msgstr "" + +#: howto/abi3t-migration.rst:145 +msgid "" +"While it's technically not a hard prerequisite, you will most likely want to " +"prepare your extension for free threading before you port it to ``abi3t``. " +"See :ref:`freethreading-extensions-howto` for instructions." +msgstr "" + +#: howto/abi3t-migration.rst:151 +msgid "" +"`Porting Extension Modules to Support Free-Threading `__: A community-maintained porting guide for " +"extension authors." +msgstr "" + +#: howto/abi3t-migration.rst:156 +msgid "Isolating extension modules" +msgstr "" + +#: howto/abi3t-migration.rst:158 +msgid "" +"Your module should use :ref:`multi-phase initialization `, and it should either be isolated or limit itself to be " +"loaded at most once per process. If it is not your case, " +"follow :ref:`isolating-extensions-howto` first. (See the :ref:`opt-out " +"section ` for a shortcut.)" +msgstr "" + +#: howto/abi3t-migration.rst:165 +msgid "Avoiding variable-sized types" +msgstr "" + +#: howto/abi3t-migration.rst:167 +msgid "" +"If your extension defines variable-sized types " +"(using :c:macro:`Py_tp_itemsize` or :c:member:`PyTypeObject.tp_itemsize`), " +"it cannot be ported to ``abi3t`` 3.15." +msgstr "" + +#: howto/abi3t-migration.rst:173 +msgid "Setting up the build" +msgstr "" + +#: howto/abi3t-migration.rst:175 +msgid "" +"If you use a build tool (such as setuptools, meson-python, scikit-build-" +"core), search its documentation for a way to select ``abi3t``. At the time " +"of writing, not all of them have this; but if your tool does, use it. You " +"may want to verify that it set the right flag by temporarily adding the " +"following just after ``#include ``::" +msgstr "" + +#: howto/abi3t-migration.rst:186 +msgid "" +"This should result in a different error than \"``abt3t`` define is not set\"." +msgstr "" + +#: howto/abi3t-migration.rst:190 +msgid "" +"If your build tool doesn't support ``abi3t`` yet, set the following macro " +"before including ``Python.h``::" +msgstr "" + +#: howto/abi3t-migration.rst:195 +msgid "or specify it as a compiler flag, for example::" +msgstr "" + +#: howto/abi3t-migration.rst:199 +msgid "" +"Once your extension builds with this setting, it will be compatible with " +"CPython 3.15 and above." +msgstr "" + +#: howto/abi3t-migration.rst:202 +msgid "" +"If you set this macro manually, you will later need to name and tag the " +"resulting extension manually as well. This is covered in :ref:`abi3t-" +"migration-tagging` below." +msgstr "" + +#: howto/abi3t-migration.rst:206 +msgid "" +"This guide will ask you to make a series of changes. After each one, verify " +"that your extension still builds in the original (non-``abi3t``) " +"configuration, and ideally run tests on all Python versions you support. " +"This will ensure that nothing breaks as you are porting." +msgstr "" + +#: howto/abi3t-migration.rst:214 +msgid "Module export hook" +msgstr "" + +#: howto/abi3t-migration.rst:216 +msgid "" +"Unless you've done this step already, your extension module defines " +"a :ref:`module initialization function ` " +"named :samp:`PyInit_{}`. You will need to port it to " +"a :ref:`module export hook `, :samp:`PyModExport_{}`, a feature added in CPython 3.15 " +"in :pep:`793`." +msgstr "" + +#: howto/abi3t-migration.rst:223 +msgid "" +"Your existing init function should look like this (with your own names for " +"```` and ````):" +msgstr "" + +#: howto/abi3t-migration.rst:235 +msgid "" +"If there is some code before the ``return``, move it to " +"a :c:macro:`Py_mod_create` or :c:macro:`Py_mod_exec` slot function. See " +"the :ref:`PyInit documentation ` for related information." +msgstr "" + +#: howto/abi3t-migration.rst:239 +msgid "" +"The function references a ``PyModuleDef`` object (```` in the code " +"above). Its definition should be similar to the following, with different " +"values and perhaps some fields unnnamed or left out:" +msgstr "" + +#: howto/abi3t-migration.rst:259 +msgid "" +"Remove this definition and the ``PyInit`` function (or put them in an " +"``#ifndef Py_TARGET_ABI3T`` block, to retain backwards compatibility), and " +"replace them with the following:" +msgstr "" + +#: howto/abi3t-migration.rst:287 +msgid "" +"Leave out any fields that were missing (except the " +"new :c:macro:`Py_mod_abi`), and substitute your own values." +msgstr "" + +#: howto/abi3t-migration.rst:290 +msgid "" +"See the :c:type:`PySlot` and :c:ref:`export hook ` " +"documentation for details on this API." +msgstr "" + +#: howto/abi3t-migration.rst:294 +msgid "Associated ``PyModuleDef``" +msgstr "" + +#: howto/abi3t-migration.rst:296 +msgid "" +"Since the new API does not use a :c:type:`!PyModuleDef` structure, a " +"definition will not be associated with the resulting module. This changes " +"the behavior of the following functions:" +msgstr "" + +#: howto/abi3t-migration.rst:300 +msgid ":c:func:`PyModule_GetDef`" +msgstr "" + +#: howto/abi3t-migration.rst:301 +msgid ":c:func:`PyType_GetModuleByDef`" +msgstr "" + +#: howto/abi3t-migration.rst:303 +msgid "" +"Check your code for these. If you do not use them, you can skip this section." +msgstr "" + +#: howto/abi3t-migration.rst:306 +msgid "These functions are typically used for two purposes:" +msgstr "" + +#: howto/abi3t-migration.rst:308 +msgid "" +"To get the definition the module was created with. This is no longer " +"possible using the new API. Modules no longer keep a reference to the " +"definition, so you will need to figure out a different way to pass the " +"relevant data around." +msgstr "" + +#: howto/abi3t-migration.rst:315 +msgid "" +"To check if a given module object is “yours”. This use case is now served " +"by :ref:`module tokens ` -- opaque pointers that identify " +"a module. To use a token, declare (or reuse) a unique static variable, for " +"example:" +msgstr "" + +#: howto/abi3t-migration.rst:325 +msgid "" +"and add a pointer to it in a new entry to your module's ``PySlot`` array:" +msgstr "" + +#: howto/abi3t-migration.rst:337 +msgid "Then, switch from :c:func:`PyModule_GetDef` calls such as:" +msgstr "" + +#: howto/abi3t-migration.rst:344 +msgid "" +"to :c:func:`PyModule_GetToken` (which uses an output argument and may fail " +"with an exception):" +msgstr "" + +#: howto/abi3t-migration.rst:355 +msgid "and from :c:func:`PyType_GetModuleByDef` calls such as:" +msgstr "" + +#: howto/abi3t-migration.rst:363 +msgid "" +"to :c:func:`PyType_GetModuleByToken` (which returns a strong reference):" +msgstr "" + +#: howto/abi3t-migration.rst:373 +msgid "``PyObject`` opaqueness" +msgstr "" + +#: howto/abi3t-migration.rst:375 +msgid "" +"The :c:type:`PyObject` and :c:type:`PyVarObject` structures are opaque in " +"``abi3t``." +msgstr "" + +#: howto/abi3t-migration.rst:378 +msgid "" +"Accessing their members is prohibited. If you do this, switch to getter/" +"setter functions mentioned in their documentation:" +msgstr "" + +#: howto/abi3t-migration.rst:382 +msgid ":c:member:`PyObject.ob_type`" +msgstr "" + +#: howto/abi3t-migration.rst:383 +msgid ":c:member:`PyObject.ob_refcnt`" +msgstr "" + +#: howto/abi3t-migration.rst:384 +msgid ":c:member:`PyVarObject.ob_size`" +msgstr "" + +#: howto/abi3t-migration.rst:386 +msgid "" +"Also, the *size* of the :c:type:`PyObject` structures is unknown to the " +"compiler. It can -- and *does* -- change between different CPython builds." +msgstr "" + +#: howto/abi3t-migration.rst:392 +msgid "" +"While the size is available at runtime (for example as " +"``sys.getsizeof(object())`` in Python code), you should resist the " +"temptation to calculate pointer offsets from it. The object memory layout is " +"subject to change in future ``abi3t`` implementations." +msgstr "" + +#: howto/abi3t-migration.rst:400 +msgid "Custom type definitions" +msgstr "" + +#: howto/abi3t-migration.rst:402 +msgid "" +"Since :c:type:`!PyObject` is opaque, the traditional way of defining custom " +"types no longer works:" +msgstr "" + +#: howto/abi3t-migration.rst:420 +msgid "" +"Most likely, all your class definitions, *and* all code that accesses your " +"classes' data, will need to be rewritten. This will probably be the biggest " +"change you need to support ``abi3t``." +msgstr "" + +#: howto/abi3t-migration.rst:424 +msgid "" +"For each such type, instead of defining a ``struct`` for the entire " +"instance, define one with only the “additional” fields -- ones specific to " +"your class, not its superclasses:" +msgstr "" + +#: howto/abi3t-migration.rst:435 +msgid "" +"Change the name. Almost all code that uses the struct will need to change " +"(notably, pointers to the new structure cannot be cast to/from " +"``PyObject*``), and changing the name will highlight the usages as compiler " +"errors. (If you use ``typeof``, C++ ``auto``, or similar ways to avoid " +"typing the type name, this won't work. Be extra careful, and consider " +"running tools to detect undefined behavior.)" +msgstr "" + +#: howto/abi3t-migration.rst:443 +msgid "" +"Then, to create the class, use *negative* ``basicsize`` to indicate “extra” " +"storage space rather than *total* instance size:" +msgstr "" + +#: howto/abi3t-migration.rst:455 +msgid "" +"If you use :c:macro:`Py_tp_members`, set the :c:macro:`Py_RELATIVE_OFFSET` " +"flag on each member and specify the :c:member:`~PyMemberDef.offset` relative " +"to your new struct." +msgstr "" + +#: howto/abi3t-migration.rst:461 +msgid "Custom type data access" +msgstr "" + +#: howto/abi3t-migration.rst:463 +msgid "" +"Then comes the hard part: in all code that needs to access this struct, you " +"will need an additional :c:func:`PyObject_GetTypeData` call to retrieve a " +"``CustomObjectData *`` pointer from ``PyObject *``:" +msgstr "" + +#: howto/abi3t-migration.rst:473 +msgid "" +"Note that this call requires the *type object* for your class (``cls``)." +msgstr "" + +#: howto/abi3t-migration.rst:475 +msgid "" +"If your class is not subclassable (that is, it does not use " +"the :c:macro:`Py_TPFLAGS_BASETYPE` flag), ``cls`` will be ``Py_TYPE(obj)``. " +"Otherwise, **DO NOT USE** ``Py_TYPE`` with :c:func:`!PyObject_GetTypeData`: " +"it might return memory reserved to an unrelated subclass! For example, if a " +"user makes a subclass like this:" +msgstr "" + +#: howto/abi3t-migration.rst:486 +msgid "" +"then ``Py_TYPE(obj)`` is ``YourCustomClass``, and the underlying memory may " +"look like this:" +msgstr "" + +#: howto/abi3t-migration.rst:499 +msgid "" +"(Ellipses indicate possible padding. Note that this memory layout is not " +"guaranteed: future versions of Python may add different padding or even " +"switch the order of the structures.)" +msgstr "" + +#: howto/abi3t-migration.rst:503 +msgid "There are two main ways to get the right class:" +msgstr "" + +#: howto/abi3t-migration.rst:505 +msgid "" +"In instance methods, your implementation may use the :c:type:`PyCMethod` " +"signature (and the :c:macro:`METH_METHOD` bit " +"in :c:member:`PyMethodDef.ml_flags`), and get the class as the " +"``defining_class`` argument." +msgstr "" + +#: howto/abi3t-migration.rst:509 +msgid "" +"Otherwise, give your class a unique static token using " +"the :c:macro:`Py_tp_token` slot, and use:" +msgstr "" + +#: howto/abi3t-migration.rst:521 +msgid "" +"Type tokens work similarly to module tokens covered :ref:`earlier in this " +"guide `." +msgstr "" + +#: howto/abi3t-migration.rst:527 +msgid "Avoid build-time conditionals" +msgstr "" + +#: howto/abi3t-migration.rst:529 +msgid "" +"Check your code for API that identifies the version of Python used to " +"*build* your extension. This no longer corresponds to the Python your " +"extension runs on, so code that uses this information often needs changing. " +"The macros to check for are:" +msgstr "" + +#: howto/abi3t-migration.rst:535 +msgid ":c:macro:`PY_VERSION_HEX`, :c:macro:`PY_MAJOR_VERSION`, :c:macro:`PY_MINOR_VERSION`:" +msgstr "" + +#: howto/abi3t-migration.rst:538 +msgid "to get the run-time version, use :c:data:`Py_Version`;" +msgstr "" + +#: howto/abi3t-migration.rst:539 +msgid "" +"to determine what C API is available, use :c:macro:`Py_TARGET_ABI3T`. This " +"macro is set to the minimum supported version." +msgstr "" + +#: howto/abi3t-migration.rst:542 +msgid "" +":c:macro:`Py_GIL_DISABLED`: under ``abi3t``, this macro is always defined. " +"Code that works with free-threaded Python *should* also work with the GIL " +"enabled (since the GIL can be enabled at run time), and usually *does* " +"(unless it, for some reason, requires more than one :term:`attached thread " +"state ` at one time)." +msgstr "" + +#: howto/abi3t-migration.rst:550 +msgid "Further code changes" +msgstr "" + +#: howto/abi3t-migration.rst:552 +msgid "" +"If you are still left with compiler errors or warnings, find a way to fix " +"them. Alas, this guide is limited, and cannot cover all possible code " +"changes extensions may need." +msgstr "" + +#: howto/abi3t-migration.rst:556 +msgid "" +"If you find a problem that other extension authors might run into, " +"consider :ref:`reporting an issue ` (or " +"sending a pull request) for this guide." +msgstr "" + +#: howto/abi3t-migration.rst:560 +msgid "" +"It is possible your issue cannot be fixed for the current version of " +"``abi3t``. In that case, reporting it may help it get prioritized for the " +"next version of CPython." +msgstr "" + +#: howto/abi3t-migration.rst:568 +msgid "Tagging and distribution" +msgstr "" + +#: howto/abi3t-migration.rst:570 +msgid "" +"If you are using a build tool with ``abi3t`` support, your extension is " +"ready, but you might want to check that it was built correctly." +msgstr "" + +#: howto/abi3t-migration.rst:573 +msgid "Extensions built with ``abi3t`` should have the following extension:" +msgstr "" + +#: howto/abi3t-migration.rst:575 +msgid "On Windows: ``.pyd`` (like any other extension);" +msgstr "" + +#: howto/abi3t-migration.rst:576 +msgid "" +"Linux, macOS, and other systems that use the ``.so`` suffix: ``.abi3t.so`` " +"(**not** ``.cpython-315t.so`` or ``.abi3.so``). Note that both free-threaded " +"and non-free-threaded builds will load ``.abi3t.so`` extensions;" +msgstr "" + +#: howto/abi3t-migration.rst:580 +msgid "Other systems: consult your distributor, and perhaps update this guide." +msgstr "" + +#: howto/abi3t-migration.rst:582 +msgid "If you distribute the extension as a *wheel*, use the following tags:" +msgstr "" + +#: howto/abi3t-migration.rst:584 +msgid "" +"Python tag: :samp:`cp3{XX}`, where *XX* is the minimum Python version the " +"extension is built for. (For example, ``cp315`` if you set " +"``Py_TARGET_ABI3T`` to ``0x30f0000``. See :ref:`abi3-compiling` for more " +"values.)" +msgstr "" + +#: howto/abi3t-migration.rst:588 +msgid "" +"ABI tag: ``abi3.abi3t``. This is a *compressed tag set* that indicates " +"support for both non-free-threaded and free-threaded builds." +msgstr "" + +#: howto/abi3t-migration.rst:591 +msgid "For example, the wheel filename may look like this:" +msgstr "" + +#: howto/abi3t-migration.rst:597 +msgid "" +"`Platform Compatibility Tags `__ in the PyPA package " +"distribution metadata." +msgstr "" + +#: howto/abi3t-migration.rst:599 +msgid "If the filename or tags are incorrect, fix them." +msgstr "" + +#: howto/abi3t-migration.rst:603 +msgid "Testing" +msgstr "" + +#: howto/abi3t-migration.rst:605 +msgid "" +"Note that when you build an extension compatible with multiple versions of " +"CPython, you should always *test* it with each version it supports (for " +"example, 3.15, 3.16, and so on). Stable ABI only guarantees *ABI* " +"compatibility; there may also be behavior changes -- both intentional ones " +"(covered by :pep:`387`) and bugs." +msgstr "" + +#: howto/abi3t-migration.rst:611 +msgid "" +"Be sure to run tests on both free-threaded and non-free-threaded builds of " +"CPython." +msgstr "" + +#: howto/abi3t-migration.rst:614 +msgid "If they pass, congratulations! You have an ``abi3t`` extension." +msgstr "" diff --git a/howto/annotations.po b/howto/annotations.po index 6c37306b7..a347bbc25 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-02-17 10:44+0100\n" "Last-Translator: CédricM \n" "Language-Team: FRENCH \n" @@ -27,7 +27,7 @@ msgstr "auteur" msgid "Larry Hastings" msgstr "Larry Hastings" -#: howto/annotations.rst:-1 +#: howto/annotations.rst:9 msgid "Abstract" msgstr "Résumé" @@ -61,8 +61,8 @@ msgstr "" msgid "" "Note that this document is specifically about working with " "``__annotations__``, not uses *for* annotations. If you're looking for " -"information on how to use \"type hints\" in your code, please see the :mod:" -"`typing` module." +"information on how to use \"type hints\" in your code, please see " +"the :mod:`typing` module." msgstr "" "Notez que ce document traite spécifiquement du traitement des " "``__annotations__``, et non de l'*utilisation* des annotations. Si vous " @@ -76,26 +76,35 @@ msgstr "" "récent" #: howto/annotations.rst:35 +#, fuzzy msgid "" -"Python 3.10 adds a new function to the standard library: :func:`inspect." -"get_annotations`. In Python versions 3.10 and newer, calling this function " -"is the best practice for accessing the annotations dict of any object that " -"supports annotations. This function can also \"un-stringize\" stringized " -"annotations for you." +"Python 3.10 adds a new function to the standard " +"library: :func:`inspect.get_annotations`. In Python versions 3.10 through " +"3.13, calling this function is the best practice for accessing the " +"annotations dict of any object that supports annotations. This function can " +"also \"un-stringize\" stringized annotations for you." msgstr "" -"Python 3.10 ajoute une nouvelle fonction à la bibliothèque standard : :func:" -"`inspect.get_annotations`. Dans les versions Python 3.10 et plus récentes, " -"l'appel à cette fonction est la meilleure pratique pour accéder au " -"dictionnaire d'annotations de tout objet qui prend en charge les " +"Python 3.10 ajoute une nouvelle fonction à la bibliothèque " +"standard : :func:`inspect.get_annotations`. Dans les versions Python 3.10 " +"et plus récentes, l'appel à cette fonction est la meilleure pratique pour " +"accéder au dictionnaire d'annotations de tout objet qui prend en charge les " "annotations. Cette fonction peut également convertir pour vous les " "annotations contenues dans des chaînes de caractères en objets." #: howto/annotations.rst:42 msgid "" +"In Python 3.14, there is a new :mod:`annotationlib` module with " +"functionality for working with annotations. This includes " +"a :func:`annotationlib.get_annotations` function, which " +"supersedes :func:`inspect.get_annotations`." +msgstr "" + +#: howto/annotations.rst:47 +msgid "" "If for some reason :func:`inspect.get_annotations` isn't viable for your use " "case, you may access the ``__annotations__`` data member manually. Best " -"practice for this changed in Python 3.10 as well: as of Python 3.10, ``o." -"__annotations__`` is guaranteed to *always* work on Python functions, " +"practice for this changed in Python 3.10 as well: as of Python 3.10, " +"``o.__annotations__`` is guaranteed to *always* work on Python functions, " "classes, and modules. If you're certain the object you're examining is one " "of these three *specific* objects, you may simply use ``o.__annotations__`` " "to get at the object's annotations dict." @@ -106,26 +115,27 @@ msgstr "" "également changé en Python 3.10 : à partir de Python 3.10, le fonctionnement " "de ``o.__annotations__`` est *toujours* garanti sur les fonctions, classes " "et modules Python. Si vous êtes certain que l'objet que vous examinez est " -"l'un de ces trois objets *spécifiques*, vous pouvez simplement utiliser ``o." -"__annotations__`` pour accéder au dictionnaire d'annotations de l'objet." +"l'un de ces trois objets *spécifiques*, vous pouvez simplement utiliser " +"``o.__annotations__`` pour accéder au dictionnaire d'annotations de l'objet." -#: howto/annotations.rst:52 +#: howto/annotations.rst:57 msgid "" -"However, other types of callables--for example, callables created by :func:" -"`functools.partial`--may not have an ``__annotations__`` attribute defined. " -"When accessing the ``__annotations__`` of a possibly unknown object, best " -"practice in Python versions 3.10 and newer is to call :func:`getattr` with " -"three arguments, for example ``getattr(o, '__annotations__', None)``." +"However, other types of callables--for example, callables created " +"by :func:`functools.partial`--may not have an ``__annotations__`` attribute " +"defined. When accessing the ``__annotations__`` of a possibly unknown " +"object, best practice in Python versions 3.10 and newer is to " +"call :func:`getattr` with three arguments, for example ``getattr(o, " +"'__annotations__', None)``." msgstr "" "Cependant, d'autres types d'objets appelables – par exemple, les objets " "appelables créés par :func:`functools.partial` – peuvent ne pas avoir " "d'attribut ``__annotations__`` défini. Pour accéder à l'attribut " "``__annotations__`` d'un objet éventuellement inconnu, la meilleure " -"pratique, à partir de la version 3.10 de Python, est d'appeler :func:" -"`getattr` avec trois arguments, par exemple ``getattr(o, '__annotations__', " -"None)``." +"pratique, à partir de la version 3.10 de Python, est " +"d'appeler :func:`getattr` avec trois arguments, par exemple ``getattr(o, " +"'__annotations__', None)``." -#: howto/annotations.rst:60 +#: howto/annotations.rst:65 msgid "" "Before Python 3.10, accessing ``__annotations__`` on a class that defines no " "annotations but that has a parent class with annotations would return the " @@ -138,12 +148,12 @@ msgstr "" "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:73 msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" msgstr "" "Accès au dictionnaire des annotations d'un objet en Python 3.9 et antérieur" -#: howto/annotations.rst:70 +#: howto/annotations.rst:75 msgid "" "In Python 3.9 and older, accessing the annotations dict of an object is much " "more complicated than in newer versions. The problem is a design flaw in " @@ -154,7 +164,7 @@ msgstr "" "problème est dû à un défaut de conception de ces anciennes versions de " "Python, notamment en ce qui concerne les annotations de classe." -#: howto/annotations.rst:75 +#: howto/annotations.rst:80 msgid "" "Best practice for accessing the annotations dict of other objects--" "functions, other callables, and modules--is the same as best practice for " @@ -168,7 +178,7 @@ msgstr "" "vous devez utiliser la forme à trois arguments de :func:`getattr` pour " "accéder à l'attribut ``__annotations__`` de l'objet." -#: howto/annotations.rst:82 +#: howto/annotations.rst:87 msgid "" "Unfortunately, this isn't best practice for classes. The problem is that, " "since ``__annotations__`` is optional on classes, and because classes can " @@ -182,12 +192,12 @@ msgstr "" "accéder à l'attribut ``__annotations__`` d'une classe peut par inadvertance " "renvoyer le dictionnaire d'annotations d'une *classe de base.* Par exemple ::" -#: howto/annotations.rst:98 +#: howto/annotations.rst:103 msgid "This will print the annotations dict from ``Base``, not ``Derived``." msgstr "" "Ceci affiche le dictionnaire d'annotations de ``Base``, pas de ``Derived``." -#: howto/annotations.rst:101 +#: howto/annotations.rst:106 #, fuzzy msgid "" "Your code will have to have a separate code path if the object you're " @@ -205,7 +215,7 @@ msgstr "" "annotations définies, la bonne pratique est d'appeler la méthode ``get`` sur " "le dictionnaire de la classe." -#: howto/annotations.rst:109 +#: howto/annotations.rst:114 msgid "" "To put it all together, here is some sample code that safely accesses the " "``__annotations__`` attribute on an arbitrary object in Python 3.9 and " @@ -215,33 +225,33 @@ msgstr "" "l'attribut ``__annotations__`` d'un objet quelconque en Python 3.9 et " "antérieur ::" -#: howto/annotations.rst:118 +#: howto/annotations.rst:123 msgid "" "After running this code, ``ann`` should be either a dictionary or ``None``. " -"You're encouraged to double-check the type of ``ann`` using :func:" -"`isinstance` before further examination." +"You're encouraged to double-check the type of ``ann`` " +"using :func:`isinstance` before further examination." msgstr "" "Après avoir exécuté ce code, ``ann`` pourra être soit un dictionnaire, soit " "``None``. Nous vous conseillons de vérifier le type de ``ann`` en " "utilisant :func:`isinstance` avant de poursuivre l'analyse." -#: howto/annotations.rst:123 +#: howto/annotations.rst:128 #, fuzzy msgid "" -"Note that some exotic or malformed type objects may not have a :attr:`~type." -"__dict__` attribute, so for extra safety you may also wish to use :func:" -"`getattr` to access :attr:`!__dict__`." +"Note that some exotic or malformed type objects may not have " +"a :attr:`~type.__dict__` attribute, so for extra safety you may also wish to " +"use :func:`getattr` to access :attr:`!__dict__`." msgstr "" "Notez que certains objets de type exotique ou malformé peuvent ne pas avoir " "d'attribut ``__dict__`` donc, pour plus de sécurité, vous pouvez également " "utiliser :func:`getattr` pour accéder à ``__dict__``." -#: howto/annotations.rst:129 +#: howto/annotations.rst:134 msgid "Manually Un-Stringizing Stringized Annotations" msgstr "" "Conversion manuelle des annotations contenues dans une chaîne de caractères" -#: howto/annotations.rst:131 +#: howto/annotations.rst:136 msgid "" "In situations where some annotations may be \"stringized\", and you wish to " "evaluate those strings to produce the Python values they represent, it " @@ -254,12 +264,13 @@ msgstr "" "préférable d'appeler :func:`inspect.get_annotations` pour faire ce travail à " "votre place." -#: howto/annotations.rst:137 +#: howto/annotations.rst:142 msgid "" -"If you're using Python 3.9 or older, or if for some reason you can't use :" -"func:`inspect.get_annotations`, you'll need to duplicate its logic. You're " -"encouraged to examine the implementation of :func:`inspect.get_annotations` " -"in the current Python version and follow a similar approach." +"If you're using Python 3.9 or older, or if for some reason you can't " +"use :func:`inspect.get_annotations`, you'll need to duplicate its logic. " +"You're encouraged to examine the implementation " +"of :func:`inspect.get_annotations` in the current Python version and follow " +"a similar approach." msgstr "" "Si vous utilisez Python 3.9 ou antérieur ou, si pour une raison quelconque, " "vous ne pouvez pas utiliser :func:`inspect.get_annotations`, vous devrez " @@ -267,7 +278,7 @@ msgstr "" "l'implémentation de :func:`inspect.get_annotations` dans la version actuelle " "de Python et à suivre une approche similaire." -#: howto/annotations.rst:143 +#: howto/annotations.rst:148 msgid "" "In a nutshell, if you wish to evaluate a stringized annotation on an " "arbitrary object ``o``:" @@ -275,46 +286,48 @@ msgstr "" "En bref, si vous souhaitez évaluer une annotation empaquetée en chaîne de " "caractères sur un objet arbitraire ``o`` :" -#: howto/annotations.rst:146 +#: howto/annotations.rst:151 msgid "" -"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" -"func:`eval`." +"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when " +"calling :func:`eval`." msgstr "" "Si ``o`` est un module, utilisez ``o.__dict__`` pour accéder aux noms " "``globals`` lors de l'appel à :func:`eval`." -#: howto/annotations.rst:148 +#: howto/annotations.rst:153 msgid "" "If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` as the " -"``globals``, and ``dict(vars(o))`` as the ``locals``, when calling :func:" -"`eval`." +"``globals``, and ``dict(vars(o))`` as the ``locals``, when " +"calling :func:`eval`." msgstr "" "Si ``o`` est une classe, utilisez ``sys.modules[o.__module__].__dict__`` " "pour désigner les noms ``globals``, et ``dict(vars(o))`` pour désigner les " "``locals``, lorsque vous appelez :func:`eval`." -#: howto/annotations.rst:151 +#: howto/annotations.rst:156 msgid "" -"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :func:" -"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " -"accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you " -"have found the root unwrapped function." +"If ``o`` is a wrapped callable " +"using :func:`functools.update_wrapper`, :func:`functools.wraps`, " +"or :func:`functools.partial`, iteratively unwrap it by accessing either " +"``o.__wrapped__`` or ``o.func`` as appropriate, until you have found the " +"root unwrapped function." msgstr "" -"Si ``o`` est un appelable encapsulé à l'aide de :func:`functools." -"update_wrapper`, :func:`functools.wraps`, ou :func:`functools.partial`, dés-" -"encapsulez-le itérativement en accédant à ``o.__wrapped__`` ou ``o.func`` " -"selon le cas, jusqu'à ce que vous ayez trouvé la fonction racine." +"Si ``o`` est un appelable encapsulé à l'aide " +"de :func:`functools.update_wrapper`, :func:`functools.wraps`, " +"ou :func:`functools.partial`, dés-encapsulez-le itérativement en accédant à " +"``o.__wrapped__`` ou ``o.func`` selon le cas, jusqu'à ce que vous ayez " +"trouvé la fonction racine." -#: howto/annotations.rst:155 +#: howto/annotations.rst:160 #, fuzzy msgid "" -"If ``o`` is a callable (but not a class), use :attr:`o.__globals__ ` as the globals when calling :func:`eval`." +"If ``o`` is a callable (but not a class), use :attr:`o.__globals__ " +"` as the globals when calling :func:`eval`." msgstr "" -"Si ``o`` est un objet appelable (mais pas une classe), utilisez ``o." -"__globals__`` pour désigner les globales lors de l'appel de :func:`eval`." +"Si ``o`` est un objet appelable (mais pas une classe), utilisez " +"``o.__globals__`` pour désigner les globales lors de l'appel de :func:`eval`." -#: howto/annotations.rst:159 +#: howto/annotations.rst:164 msgid "" "However, not all string values used as annotations can be successfully " "turned into Python values by :func:`eval`. String values could theoretically " @@ -323,13 +336,13 @@ msgid "" "be evaluated. For example:" msgstr "" "Cependant, toutes les valeurs de chaîne utilisées comme annotations ne " -"peuvent pas être transformées avec succès en valeurs Python par :func:" -"`eval`. Les valeurs de chaîne peuvent théoriquement contenir des chaînes " -"valides et, en pratique, il existe des cas d'utilisation valables pour les " -"indications de type qui nécessitent d'annoter avec des valeurs de chaîne qui " -"*ne peuvent pas* être évaluées. Par exemple :" +"peuvent pas être transformées avec succès en valeurs Python " +"par :func:`eval`. Les valeurs de chaîne peuvent théoriquement contenir des " +"chaînes valides et, en pratique, il existe des cas d'utilisation valables " +"pour les indications de type qui nécessitent d'annoter avec des valeurs de " +"chaîne qui *ne peuvent pas* être évaluées. Par exemple :" -#: howto/annotations.rst:166 +#: howto/annotations.rst:171 msgid "" ":pep:`604` union types using ``|``, before support for this was added to " "Python 3.10." @@ -337,15 +350,15 @@ msgstr "" "Les types d'union de style :pep:`604` avec ``|``, avant que cette prise en " "charge ne soit ajoutée à Python 3.10." -#: howto/annotations.rst:168 +#: howto/annotations.rst:173 msgid "" -"Definitions that aren't needed at runtime, only imported when :const:`typing." -"TYPE_CHECKING` is true." +"Definitions that aren't needed at runtime, only imported " +"when :const:`typing.TYPE_CHECKING` is true." msgstr "" "Les définitions qui ne sont pas nécessaires à l'exécution, importées " "uniquement lorsque :const:`typing.TYPE_CHECKING` est vrai." -#: howto/annotations.rst:171 +#: howto/annotations.rst:176 msgid "" "If :func:`eval` attempts to evaluate such values, it will fail and raise an " "exception. So, when designing a library API that works with annotations, " @@ -357,12 +370,12 @@ msgstr "" "fonctionnant avec des annotations, il est recommandé de ne tenter d'évaluer " "des valeurs de type chaîne que si l'appelant le demande explicitement." -#: howto/annotations.rst:179 +#: howto/annotations.rst:184 msgid "Best Practices For ``__annotations__`` In Any Python Version" msgstr "" "Bonnes pratiques pour ``__annotations__`` dans toutes les versions de Python" -#: howto/annotations.rst:181 +#: howto/annotations.rst:186 msgid "" "You should avoid assigning to the ``__annotations__`` member of objects " "directly. Let Python manage setting ``__annotations__``." @@ -370,7 +383,7 @@ msgstr "" "Évitez d'assigner directement des objets à l'élément ``__annotations__``. " "Laissez Python gérer le paramétrage de ``__annotations__``." -#: howto/annotations.rst:184 +#: howto/annotations.rst:189 msgid "" "If you do assign directly to the ``__annotations__`` member of an object, " "you should always set it to a ``dict`` object." @@ -378,9 +391,17 @@ msgstr "" "Si vous assignez directement à l'élément ``__annotations__`` d'un objet, " "vous devez toujours le définir comme un ``dict``." -#: howto/annotations.rst:187 +#: howto/annotations.rst:192 msgid "" -"If you directly access the ``__annotations__`` member of an object, you " +"You should avoid accessing ``__annotations__`` directly on any object. " +"Instead, use :func:`annotationlib.get_annotations` (Python 3.14+) " +"or :func:`inspect.get_annotations` (Python 3.10+)." +msgstr "" + +#: howto/annotations.rst:196 +#, fuzzy +msgid "" +"If you do directly access the ``__annotations__`` member of an object, you " "should ensure that it's a dictionary before attempting to examine its " "contents." msgstr "" @@ -388,20 +409,20 @@ msgstr "" "devez vous assurer qu'il s'agit d'un dictionnaire avant de tenter d'examiner " "son contenu." -#: howto/annotations.rst:191 +#: howto/annotations.rst:200 msgid "You should avoid modifying ``__annotations__`` dicts." msgstr "Évitez de modifier les dictionnaires ``__annotations__``." -#: howto/annotations.rst:193 +#: howto/annotations.rst:202 msgid "" "You should avoid deleting the ``__annotations__`` attribute of an object." msgstr "Évitez de supprimer l'attribut ``__annotations__`` d'un objet." -#: howto/annotations.rst:198 +#: howto/annotations.rst:207 msgid "``__annotations__`` Quirks" msgstr "Les curiosités concernant ``__annotations__``" -#: howto/annotations.rst:200 +#: howto/annotations.rst:209 msgid "" "In all versions of Python 3, function objects lazy-create an annotations " "dict if no annotations are defined on that object. You can delete the " @@ -415,15 +436,15 @@ msgstr "" "Dans toutes les versions de Python 3, les fonctions créent paresseusement un " "dictionnaire d'annotations si aucune annotation n'est définie sur cet " "objet. Vous pouvez supprimer l'attribut ``__annotations__`` en utilisant " -"``del fn.__annotations__``, mais si vous accédez ensuite à ``fn." -"__annotations__``, l'objet créera un nouveau dictionnaire vide qu'il " +"``del fn.__annotations__``, mais si vous accédez ensuite à " +"``fn.__annotations__``, l'objet créera un nouveau dictionnaire vide qu'il " "stockera et renverra quand on lui demande ses annotations. Si vous " "supprimez les annotations d'une fonction avant qu'elle n'ait créé " "paresseusement son dictionnaire d'annotations, vous obtiendrez une exception " "``AttributeError`` ; si vous utilisez ``del fn.__annotations__`` deux fois " "de suite, vous êtes sûr de toujours obtenir ``AttributeError``." -#: howto/annotations.rst:210 +#: howto/annotations.rst:219 msgid "" "Everything in the above paragraph also applies to class and module objects " "in Python 3.10 and newer." @@ -431,7 +452,7 @@ msgstr "" "Tout ce qui est dit dans le paragraphe précédent s'applique également aux " "objets de type classe et module en Python 3.10 et suivants." -#: howto/annotations.rst:213 +#: howto/annotations.rst:222 msgid "" "In all versions of Python 3, you can set ``__annotations__`` on a function " "object to ``None``. However, subsequently accessing the annotations on that " @@ -443,14 +464,14 @@ msgid "" msgstr "" "Dans toutes les versions de Python 3, vous pouvez définir à ``None`` " "l'élément ``__annotations__`` sur un objet fonction. Cependant, si vous " -"accédez ensuite aux annotations de cet objet en utilisant ``fn." -"__annotations__``, un dictionnaire vide sera créé paresseusement, comme " +"accédez ensuite aux annotations de cet objet en utilisant " +"``fn.__annotations__``, un dictionnaire vide sera créé paresseusement, comme " "indiqué dans le premier paragraphe de cette section. Ce *n'est pas* le cas " "des modules et des classes, quelle que soit la version de Python ; ces " "objets permettent de définir ``__annotations__`` à n'importe quelle valeur " "Python, et conserveront la valeur définie." -#: howto/annotations.rst:221 +#: howto/annotations.rst:230 msgid "" "If Python stringizes your annotations for you (using ``from __future__ " "import annotations``), and you specify a string as an annotation, the string " @@ -462,7 +483,7 @@ msgstr "" "caractères comme annotation, la chaîne sera elle-même entre guillemets. En " "fait, l'annotation est mise entre guillemets *deux fois*. Par exemple ::" -#: howto/annotations.rst:232 +#: howto/annotations.rst:241 msgid "" "This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a " "\"quirk\"; it's mentioned here simply because it might be surprising." @@ -470,3 +491,24 @@ msgstr "" "Ceci renvoie : ``{'a': \"'str'\"}``. Cela ne devrait pas vraiment être " "considéré comme une « bizarrerie » ; nous le mentionnons ici simplement " "parce que cela peut être surprenant." + +#: howto/annotations.rst:244 +msgid "" +"If you use a class with a custom metaclass and access ``__annotations__`` on " +"the class, you may observe unexpected behavior; see :pep:`749 <749#pep749-" +"metaclasses>` for some examples. You can avoid these quirks by " +"using :func:`annotationlib.get_annotations` on Python 3.14+ " +"or :func:`inspect.get_annotations` on Python 3.10+. On earlier versions of " +"Python, you can avoid these bugs by accessing the annotations from the " +"class's :attr:`~type.__dict__` (for example, " +"``cls.__dict__.get('__annotations__', None)``)." +msgstr "" + +#: howto/annotations.rst:253 +msgid "" +"In some versions of Python, instances of classes may have an " +"``__annotations__`` attribute. However, this is not supported functionality. " +"If you need the annotations of an instance, you can use :func:`type` to " +"access its class (for example, " +"``annotationlib.get_annotations(type(myinstance))`` on Python 3.14+)." +msgstr "" diff --git a/howto/argparse-optparse.po b/howto/argparse-optparse.po index da00b4bc3..50a99dde6 100644 --- a/howto/argparse-optparse.po +++ b/howto/argparse-optparse.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,89 +15,106 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/howto/argparse-optparse.rst:7 -msgid "Upgrading optparse code" +#: howto/argparse-optparse.rst:8 +#, fuzzy +msgid "Migrating ``optparse`` code to ``argparse``" msgstr "Mettre à jour du code ``optparse``" -#: ../Doc/howto/argparse-optparse.rst:9 +#: howto/argparse-optparse.rst:10 msgid "" -"Originally, the :mod:`argparse` module had attempted to maintain " -"compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " -"to extend transparently, particularly with the changes required to support " -"``nargs=`` specifiers and better usage messages. When most everything in :" -"mod:`optparse` had either been copy-pasted over or monkey-patched, it no " -"longer seemed practical to try to maintain the backwards compatibility." +"The :mod:`argparse` module offers several higher level features not natively " +"provided by the :mod:`optparse` module, including:" msgstr "" -#: ../Doc/howto/argparse-optparse.rst:16 -msgid "" -"The :mod:`argparse` module improves on the :mod:`optparse` module in a " -"number of ways including:" -msgstr "" - -#: ../Doc/howto/argparse-optparse.rst:19 +#: howto/argparse-optparse.rst:13 msgid "Handling positional arguments." msgstr "gère les arguments positionnels ;" -#: ../Doc/howto/argparse-optparse.rst:20 +#: howto/argparse-optparse.rst:14 msgid "Supporting subcommands." msgstr "" -#: ../Doc/howto/argparse-optparse.rst:21 +#: howto/argparse-optparse.rst:15 msgid "Allowing alternative option prefixes like ``+`` and ``/``." msgstr "" "permet d'utiliser les alternatives ``+`` ou ``/`` comme préfixes d'option ;" -#: ../Doc/howto/argparse-optparse.rst:22 +#: howto/argparse-optparse.rst:16 msgid "Handling zero-or-more and one-or-more style arguments." msgstr "prend en charge la répétition de valeurs (zéro ou plus, un ou plus) ;" -#: ../Doc/howto/argparse-optparse.rst:23 +#: howto/argparse-optparse.rst:17 msgid "Producing more informative usage messages." msgstr "fournit des messages d'aide plus complets ;" -#: ../Doc/howto/argparse-optparse.rst:24 +#: howto/argparse-optparse.rst:18 msgid "Providing a much simpler interface for custom ``type`` and ``action``." msgstr "" "fournit une interface plus simple pour les types et les actions " "personnalisés." -#: ../Doc/howto/argparse-optparse.rst:26 -msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" -msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" +#: howto/argparse-optparse.rst:20 +msgid "" +"Originally, the :mod:`argparse` module attempted to maintain compatibility " +"with :mod:`optparse`. However, the fundamental design differences between " +"supporting declarative command line option processing (while leaving " +"positional argument processing to application code), and supporting both " +"named options and positional arguments in the declarative interface mean " +"that the API has diverged from that of ``optparse`` over time." +msgstr "" + +#: howto/argparse-optparse.rst:27 +msgid "" +"As described in :ref:`choosing-an-argument-parser`, applications that are " +"currently using :mod:`optparse` and are happy with the way it works can just " +"continue to use ``optparse``." +msgstr "" + +#: howto/argparse-optparse.rst:31 +msgid "" +"Application developers that are considering migrating should also review the " +"list of intrinsic behavioural differences described in that section before " +"deciding whether or not migration is desirable." +msgstr "" -#: ../Doc/howto/argparse-optparse.rst:28 +#: howto/argparse-optparse.rst:35 msgid "" -"Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" -"`ArgumentParser.add_argument` calls." +"For applications that do choose to migrate from :mod:`optparse` " +"to :mod:`argparse`, the following suggestions should be helpful:" +msgstr "" + +#: howto/argparse-optparse.rst:38 +msgid "" +"Replace all :meth:`optparse.OptionParser.add_option` calls " +"with :meth:`ArgumentParser.add_argument` calls." msgstr "" "remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " "appels à :meth:`ArgumentParser.add_argument` ;" -#: ../Doc/howto/argparse-optparse.rst:31 +#: howto/argparse-optparse.rst:41 msgid "" -"Replace ``(options, args) = parser.parse_args()`` with ``args = parser." -"parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " -"for the positional arguments. Keep in mind that what was previously called " -"``options``, now in the :mod:`argparse` context is called ``args``." -msgstr "" -"remplacer ``(options, args) = parser.parse_args()`` par ``args = parser." -"parse_args()`` et ajouter des appels à :meth:`ArgumentParser.add_argument` " -"pour les arguments positionnels. Prenez note que les valeurs précédemment " -"appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" -"`argparse` ;" - -#: ../Doc/howto/argparse-optparse.rst:36 +"Replace ``(options, args) = parser.parse_args()`` with ``args = " +"parser.parse_args()`` and add additional :meth:`ArgumentParser.add_argument` " +"calls for the positional arguments. Keep in mind that what was previously " +"called ``options``, now in the :mod:`argparse` context is called ``args``." +msgstr "" +"remplacer ``(options, args) = parser.parse_args()`` par ``args = " +"parser.parse_args()`` et ajouter des appels " +"à :meth:`ArgumentParser.add_argument` pour les arguments positionnels. " +"Prenez note que les valeurs précédemment appelées ``options`` sont appelées " +"``args`` dans le contexte d':mod:`argparse` ;" + +#: howto/argparse-optparse.rst:46 msgid "" -"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" -"meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" -"`~ArgumentParser.parse_args`." +"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by " +"using :meth:`~ArgumentParser.parse_intermixed_args` instead " +"of :meth:`~ArgumentParser.parse_args`." msgstr "" "remplacer :meth:`optparse.OptionParser.disable_interspersed_args` en " -"appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" -"`~ArgumentParser.parse_args` ;" +"appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt " +"que :meth:`~ArgumentParser.parse_args` ;" -#: ../Doc/howto/argparse-optparse.rst:40 +#: howto/argparse-optparse.rst:50 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." @@ -107,7 +122,7 @@ msgstr "" "remplacer les actions de rappel (*callback actions* en anglais) et les " "arguments nommés ``callback_*`` par des arguments ``type`` et ``actions`` ;" -#: ../Doc/howto/argparse-optparse.rst:43 +#: howto/argparse-optparse.rst:53 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." @@ -116,16 +131,17 @@ msgstr "" "``type`` par les objets types correspondants (par exemple : ``int``, " "``float``, ``complex``, etc) ;" -#: ../Doc/howto/argparse-optparse.rst:46 +#: howto/argparse-optparse.rst:56 msgid "" -"Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." -"OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." +"Replace :class:`optparse.Values` with :class:`Namespace` " +"and :exc:`optparse.OptionError` and :exc:`optparse.OptionValueError` " +"with :exc:`ArgumentError`." msgstr "" -"remplacer :class:`optparse.Values` par :class:`Namespace` ; et :exc:" -"`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" -"`ArgumentError` ;" +"remplacer :class:`optparse.Values` par :class:`Namespace` ; " +"et :exc:`optparse.OptionError` et :exc:`optparse.OptionValueError` " +"par :exc:`ArgumentError` ;" -#: ../Doc/howto/argparse-optparse.rst:50 +#: howto/argparse-optparse.rst:60 msgid "" "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " "with the standard Python syntax to use dictionaries to format strings, that " @@ -136,7 +152,7 @@ msgstr "" "l'interpolation d'un dictionnaire dans les chaînes de formatage (c'est-à-" "dire ``%(default)s`` et ``%(prog)s``) ;" -#: ../Doc/howto/argparse-optparse.rst:54 +#: howto/argparse-optparse.rst:64 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='version', version='\n" "Language-Team: FRENCH \n" @@ -32,28 +32,29 @@ msgid "" "This tutorial is intended to be a gentle introduction to :mod:`argparse`, " "the recommended command-line parsing module in the Python standard library." msgstr "" -"Ce tutoriel est destiné à être une introduction en douceur à :mod:" -"`argparse`, le module d'analyse de ligne de commande recommandé dans la " -"bibliothèque standard de Python." +"Ce tutoriel est destiné à être une introduction en douceur " +"à :mod:`argparse`, le module d'analyse de ligne de commande recommandé dans " +"la bibliothèque standard de Python." #: howto/argparse.rst:16 -#, fuzzy msgid "" -"There are two other modules that fulfill the same task, namely :mod:`getopt` " -"(an equivalent for ``getopt()`` from the C language) and the deprecated :mod:" -"`optparse`. Note also that :mod:`argparse` is based on :mod:`optparse`, and " -"therefore very similar in terms of usage." +"The standard library includes two other libraries directly related to " +"command-line parameter processing: the lower level :mod:`optparse` module " +"(which may require more code to configure for a given application, but also " +"allows an application to request behaviors that ``argparse`` doesn't " +"support), and the very low level :mod:`getopt` (which specifically serves as " +"an equivalent to the :c:func:`!getopt` family of functions available to C " +"programmers). While neither of those modules is covered directly in this " +"guide, many of the core concepts in ``argparse`` first originated in " +"``optparse``, so some aspects of this tutorial will also be relevant to " +"``optparse`` users." msgstr "" -"Il y a deux autres modules qui remplissent le même rôle : :mod:`getopt` (un " -"équivalent de :c:func:`getopt` du langage C) et :mod:`optparse` qui est " -"obsolète. Il faut noter que :mod:`argparse` est basé sur :mod:`optparse` et " -"donc s'utilise de manière très similaire." -#: howto/argparse.rst:24 +#: howto/argparse.rst:29 msgid "Concepts" msgstr "Concepts" -#: howto/argparse.rst:26 +#: howto/argparse.rst:31 msgid "" "Let's show the sort of functionality that we are going to explore in this " "introductory tutorial by making use of the :command:`ls` command:" @@ -61,11 +62,11 @@ msgstr "" "Commençons par l'utilisation de la commande :command:`ls` pour voir le type " "de fonctionnalité que nous allons étudier dans ce tutoriel d'introduction :" -#: howto/argparse.rst:48 +#: howto/argparse.rst:53 msgid "A few concepts we can learn from the four commands:" msgstr "Quelques concepts que l'on peut apprendre avec les quatre commandes :" -#: howto/argparse.rst:50 +#: howto/argparse.rst:55 msgid "" "The :command:`ls` command is useful when run without any options at all. It " "defaults to displaying the contents of the current directory." @@ -73,7 +74,7 @@ msgstr "" "La commande :command:`ls` est utile quand elle est exécutée sans aucun " "paramètre. Elle affiche par défaut le contenu du dossier courant." -#: howto/argparse.rst:53 +#: howto/argparse.rst:58 msgid "" "If we want beyond what it provides by default, we tell it a bit more. In " "this case, we want it to display a different directory, ``pypy``. What we " @@ -93,7 +94,7 @@ msgstr "" "est ``cp SRC DEST``. Le premier argument est *ce que vous voulez copier* et " "le second est *où vous voulez le copier*." -#: howto/argparse.rst:62 +#: howto/argparse.rst:67 msgid "" "Now, say we want to change behaviour of the program. In our example, we " "display more info for each file instead of just showing the file names. The " @@ -103,7 +104,7 @@ msgstr "" "agit. Dans notre exemple, on affiche plus d'information pour chaque ficher " "que simplement leur nom. Dans ce cas, ``-l`` est un argument facultatif." -#: howto/argparse.rst:66 +#: howto/argparse.rst:71 msgid "" "That's a snippet of the help text. It's very useful in that you can come " "across a program you have never used before, and can figure out how it works " @@ -113,23 +114,23 @@ msgstr "" "sur un programme que l'on à jamais utilisé auparavant car on peut comprendre " "son fonctionnement simplement en lisant l'aide associée." -#: howto/argparse.rst:72 +#: howto/argparse.rst:77 msgid "The basics" msgstr "Les bases" -#: howto/argparse.rst:74 +#: howto/argparse.rst:79 msgid "Let us start with a very simple example which does (almost) nothing::" msgstr "Commençons par un exemple très simple qui ne fait (quasiment) rien ::" -#: howto/argparse.rst:188 howto/argparse.rst:209 +#: howto/argparse.rst:193 howto/argparse.rst:214 msgid "Following is a result of running the code:" msgstr "Ce qui suit est le résultat de l'exécution du code :" -#: howto/argparse.rst:254 howto/argparse.rst:298 +#: howto/argparse.rst:259 howto/argparse.rst:303 msgid "Here is what is happening:" msgstr "Voilà ce qu'il se passe :" -#: howto/argparse.rst:99 +#: howto/argparse.rst:104 msgid "" "Running the script without any options results in nothing displayed to " "stdout. Not so useful." @@ -137,7 +138,7 @@ msgstr "" "Exécuter le script sans aucun paramètre a pour effet de ne rien afficher sur " "la sortie d'erreur. Ce n'est pas très utile." -#: howto/argparse.rst:102 +#: howto/argparse.rst:107 msgid "" "The second one starts to display the usefulness of the :mod:`argparse` " "module. We have done almost nothing, but already we get a nice help message." @@ -145,7 +146,7 @@ msgstr "" "Le deuxième commence à montrer l'intérêt du module :mod:`argparse`. On n'a " "quasiment rien fait mais on a déjà un beau message d'aide." -#: howto/argparse.rst:105 +#: howto/argparse.rst:110 msgid "" "The ``--help`` option, which can also be shortened to ``-h``, is the only " "option we get for free (i.e. no need to specify it). Specifying anything " @@ -157,23 +158,23 @@ msgstr "" "que ce soit d'autre entraîne une erreur. Mais même dans ce cas, on reçoit " "aussi un message utile, toujours gratuitement." -#: howto/argparse.rst:112 +#: howto/argparse.rst:117 msgid "Introducing Positional arguments" msgstr "Introduction aux arguments positionnels" -#: howto/argparse.rst:114 +#: howto/argparse.rst:119 msgid "An example::" msgstr "Un exemple ::" -#: howto/argparse.rst:122 +#: howto/argparse.rst:127 msgid "And running the code:" msgstr "On exécute le code :" -#: howto/argparse.rst:140 +#: howto/argparse.rst:145 msgid "Here is what's happening:" msgstr "Voilà ce qu'il se passe :" -#: howto/argparse.rst:142 +#: howto/argparse.rst:147 #, fuzzy msgid "" "We've added the :meth:`~ArgumentParser.add_argument` method, which is what " @@ -185,12 +186,12 @@ msgstr "" "quels paramètre de lignes de commandes le programme peut accepter. Dans le " "cas présent, je l'ai appelé ``echo`` pour que cela corresponde à sa fonction." -#: howto/argparse.rst:146 +#: howto/argparse.rst:151 msgid "Calling our program now requires us to specify an option." msgstr "" "Utiliser le programme nécessite maintenant que l'on précise un paramètre." -#: howto/argparse.rst:148 +#: howto/argparse.rst:153 #, fuzzy msgid "" "The :meth:`~ArgumentParser.parse_args` method actually returns some data " @@ -199,7 +200,7 @@ msgstr "" "La méthode :meth:`parse_args` renvoie en réalité certaines données des " "paramètres précisés, dans le cas présent : ``echo``." -#: howto/argparse.rst:151 +#: howto/argparse.rst:156 msgid "" "The variable is some form of 'magic' that :mod:`argparse` performs for free " "(i.e. no need to specify which variable that value is stored in). You will " @@ -211,7 +212,7 @@ msgstr "" "est stockée). Vous aurez aussi remarqué que le nom est le même que " "l'argument en chaîne de caractères donné à la méthode : ``echo``." -#: howto/argparse.rst:156 +#: howto/argparse.rst:161 msgid "" "Note however that, although the help display looks nice and all, it " "currently is not as helpful as it can be. For example we see that we got " @@ -225,27 +226,27 @@ msgstr "" "autrement qu'en le devinant ou en lisant le code source. Donc, rendons-le un " "peu plus utile ::" -#: howto/argparse.rst:167 +#: howto/argparse.rst:172 msgid "And we get:" msgstr "Et on obtient :" -#: howto/argparse.rst:180 +#: howto/argparse.rst:185 msgid "Now, how about doing something even more useful::" msgstr "" "À présent, que diriez-vous de faire quelque chose d'encore plus utile ::" -#: howto/argparse.rst:198 +#: howto/argparse.rst:203 msgid "" "That didn't go so well. That's because :mod:`argparse` treats the options we " -"give it as strings, unless we tell it otherwise. So, let's tell :mod:" -"`argparse` to treat that input as an integer::" +"give it as strings, unless we tell it otherwise. So, let's " +"tell :mod:`argparse` to treat that input as an integer::" msgstr "" "Cela n'a pas très bien fonctionné. C'est parce que :mod:`argparse` traite " "les paramètres que l'on donne comme des chaînes de caractères à moins qu'on " "ne lui indique de faire autrement. Donc, disons à :mod:`argparse` de traiter " "cette entrée comme un entier ::" -#: howto/argparse.rst:219 +#: howto/argparse.rst:224 msgid "" "That went well. The program now even helpfully quits on bad illegal input " "before proceeding." @@ -253,11 +254,11 @@ msgstr "" "Cela a bien fonctionné. Maintenant le programme va même s'arrêter si " "l'entrée n'est pas légale avant de procéder à l'exécution." -#: howto/argparse.rst:224 +#: howto/argparse.rst:229 msgid "Introducing Optional arguments" msgstr "Introduction aux arguments optionnels" -#: howto/argparse.rst:226 +#: howto/argparse.rst:231 msgid "" "So far we have been playing with positional arguments. Let us have a look on " "how to add optional ones::" @@ -265,11 +266,11 @@ msgstr "" "Jusqu'à maintenant, on a joué avec les arguments positionnels. Regardons " "comment ajouter des paramètres optionnels ::" -#: howto/argparse.rst:282 howto/argparse.rst:432 +#: howto/argparse.rst:287 howto/argparse.rst:437 msgid "And the output:" msgstr "Et le résultat :" -#: howto/argparse.rst:256 +#: howto/argparse.rst:261 msgid "" "The program is written so as to display something when ``--verbosity`` is " "specified and display nothing when not." @@ -277,26 +278,26 @@ msgstr "" "Le programme est écrit de sorte qu'il n'affiche rien sauf si l'option ``--" "verbosity`` est précisée." -#: howto/argparse.rst:259 +#: howto/argparse.rst:264 #, fuzzy msgid "" "To show that the option is actually optional, there is no error when running " "the program without it. Note that by default, if an optional argument isn't " "used, the relevant variable, in this case ``args.verbosity``, is given " -"``None`` as a value, which is the reason it fails the truth test of the :" -"keyword:`if` statement." +"``None`` as a value, which is the reason it fails the truth test of " +"the :keyword:`if` statement." msgstr "" "Pour montrer que l'option est bien optionnelle il n'y aura pas d'erreur s'il " "on exécute le programme sans celle-ci. Notez que par défaut, si une option " -"n'est pas utilisée, la variable associée, dans le cas présent : :attr:`args." -"verbosity`, prend la valeur ``None`` c'est pourquoi elle échoue le test de " -"vérité de l'assertion :keyword:`if`." +"n'est pas utilisée, la variable associée, dans le cas " +"présent : :attr:`args.verbosity`, prend la valeur ``None`` c'est pourquoi " +"elle échoue le test de vérité de l'assertion :keyword:`if`." -#: howto/argparse.rst:265 +#: howto/argparse.rst:270 msgid "The help message is a bit different." msgstr "Le message d'aide est quelque peu différent." -#: howto/argparse.rst:267 +#: howto/argparse.rst:272 msgid "" "When using the ``--verbosity`` option, one must also specify some value, any " "value." @@ -304,7 +305,7 @@ msgstr "" "Quand on utilise l'option ``--verbosity`` on doit aussi préciser une valeur, " "n'importe laquelle." -#: howto/argparse.rst:270 +#: howto/argparse.rst:275 msgid "" "The above example accepts arbitrary integer values for ``--verbosity``, but " "for our simple program, only two values are actually useful, ``True`` or " @@ -315,7 +316,7 @@ msgstr "" "réellement utiles : ``True`` et ``False``. Modifions le code en accord avec " "cela ::" -#: howto/argparse.rst:300 +#: howto/argparse.rst:305 #, fuzzy msgid "" "The option is now more of a flag than something that requires a value. We " @@ -328,10 +329,10 @@ msgstr "" "une valeur. On a même changé le nom du paramètre pour qu'il corresponde à " "cette idée. Notez que maintenant on précise une nouvelle ``action`` clavier " "et qu'on lui donne la valeur ``\"store_true\"``. Cela signifie que si " -"l'option est précisée la valeur ``True`` est assignée à :data:`args." -"verbose`. Ne rien préciser implique la valeur ``False``." +"l'option est précisée la valeur ``True`` est assignée " +"à :data:`args.verbose`. Ne rien préciser implique la valeur ``False``." -#: howto/argparse.rst:307 +#: howto/argparse.rst:312 msgid "" "It complains when you specify a value, in true spirit of what flags actually " "are." @@ -339,15 +340,15 @@ msgstr "" "Dans l'esprit de ce que sont vraiment les options, pas des paramètres, il se " "plaint quand vous tentez de préciser une valeur." -#: howto/argparse.rst:310 +#: howto/argparse.rst:315 msgid "Notice the different help text." msgstr "Notez que l'aide est différente." -#: howto/argparse.rst:314 +#: howto/argparse.rst:319 msgid "Short options" msgstr "Les paramètres raccourcis" -#: howto/argparse.rst:316 +#: howto/argparse.rst:321 msgid "" "If you are familiar with command line usage, you will notice that I haven't " "yet touched on the topic of short versions of the options. It's quite " @@ -357,35 +358,35 @@ msgstr "" "dû remarquer que je n'ai pour l'instant rien dit au sujet des versions " "raccourcies des paramètres. C'est très simple ::" -#: howto/argparse.rst:328 +#: howto/argparse.rst:333 msgid "And here goes:" msgstr "Et voilà :" -#: howto/argparse.rst:341 +#: howto/argparse.rst:346 msgid "Note that the new ability is also reflected in the help text." msgstr "Notez que la nouvelle option est aussi indiquée dans l'aide." -#: howto/argparse.rst:345 +#: howto/argparse.rst:350 msgid "Combining Positional and Optional arguments" msgstr "Combinaison d'arguments positionnels et optionnels" -#: howto/argparse.rst:347 +#: howto/argparse.rst:352 msgid "Our program keeps growing in complexity::" msgstr "Notre programme continue de croître en complexité ::" -#: howto/argparse.rst:362 +#: howto/argparse.rst:367 msgid "And now the output:" msgstr "Et voilà le résultat :" -#: howto/argparse.rst:376 +#: howto/argparse.rst:381 msgid "We've brought back a positional argument, hence the complaint." msgstr "Nous avons ajouté un argument nommé, d'où le message d'erreur." -#: howto/argparse.rst:378 +#: howto/argparse.rst:383 msgid "Note that the order does not matter." msgstr "Notez que l'ordre importe peu." -#: howto/argparse.rst:380 +#: howto/argparse.rst:385 msgid "" "How about we give this program of ours back the ability to have multiple " "verbosity values, and actually get to use them::" @@ -393,7 +394,7 @@ msgstr "" "Qu'en est-il si nous donnons à ce programme la possibilité d'avoir plusieurs " "niveaux de verbosité, et que celui-ci les prend en compte ::" -#: howto/argparse.rst:414 +#: howto/argparse.rst:419 msgid "" "These all look good except the last one, which exposes a bug in our program. " "Let's fix it by restricting the values the ``--verbosity`` option can " @@ -403,7 +404,7 @@ msgstr "" "bogue. Corrigeons cela en restreignant les valeurs que ``--verbosity`` " "accepte ::" -#: howto/argparse.rst:450 +#: howto/argparse.rst:455 msgid "" "Note that the change also reflects both in the error message as well as the " "help string." @@ -411,7 +412,7 @@ msgstr "" "Notez que ce changement est pris en compte à la fois dans le message " "d'erreur et dans le texte d'aide." -#: howto/argparse.rst:453 +#: howto/argparse.rst:458 msgid "" "Now, let's use a different approach of playing with verbosity, which is " "pretty common. It also matches the way the CPython executable handles its " @@ -422,7 +423,7 @@ msgstr "" "CPython gère ses propres paramètres de verbosité (jetez un œil sur la sortie " "de la commande ``python --help``) ::" -#: howto/argparse.rst:472 +#: howto/argparse.rst:477 msgid "" "We have introduced another action, \"count\", to count the number of " "occurrences of specific options." @@ -430,7 +431,7 @@ msgstr "" "Nous avons introduit une autre action, ``\"count\"``, pour compter le nombre " "d’occurrences d'une option en particulier :" -#: howto/argparse.rst:501 +#: howto/argparse.rst:506 msgid "" "Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the " "previous version of our script. That should explain the complaint." @@ -439,11 +440,11 @@ msgstr "" "``action=\"store_true\"``) de la version précédente de notre script. Cela " "devrait expliquer le message d'erreur." -#: howto/argparse.rst:504 +#: howto/argparse.rst:509 msgid "It also behaves similar to \"store_true\" action." msgstr "Cela se comporte de la même manière que l'action ``\"store_true\"``." -#: howto/argparse.rst:506 +#: howto/argparse.rst:511 msgid "" "Now here's a demonstration of what the \"count\" action gives. You've " "probably seen this sort of usage before." @@ -451,7 +452,7 @@ msgstr "" "Maintenant voici une démonstration de ce que l'action ``\"count\"`` fait. " "Vous avez sûrement vu ce genre d'utilisation auparavant." -#: howto/argparse.rst:509 +#: howto/argparse.rst:514 msgid "" "And if you don't specify the ``-v`` flag, that flag is considered to have " "``None`` value." @@ -459,7 +460,7 @@ msgstr "" "Et si vous ne spécifiez pas l'option ``-v``, cette option prendra la valeur " "``None``." -#: howto/argparse.rst:512 +#: howto/argparse.rst:517 msgid "" "As should be expected, specifying the long form of the flag, we should get " "the same output." @@ -467,7 +468,7 @@ msgstr "" "Comme on s'y attend, en spécifiant l'option dans sa forme longue, on devrait " "obtenir la même sortie." -#: howto/argparse.rst:515 +#: howto/argparse.rst:520 msgid "" "Sadly, our help output isn't very informative on the new ability our script " "has acquired, but that can always be fixed by improving the documentation " @@ -477,19 +478,19 @@ msgstr "" "nouvelles possibilités de notre programme, mais cela peut toujours être " "corrigé en améliorant sa documentation (en utilisant l'argument ``help``)." -#: howto/argparse.rst:519 +#: howto/argparse.rst:524 msgid "That last output exposes a bug in our program." msgstr "La dernière sortie du programme montre que celui-ci contient un bogue." -#: howto/argparse.rst:522 +#: howto/argparse.rst:527 msgid "Let's fix::" msgstr "Corrigeons ::" -#: howto/argparse.rst:541 +#: howto/argparse.rst:546 msgid "And this is what it gives:" msgstr "Et c'est ce que ça donne :" -#: howto/argparse.rst:556 +#: howto/argparse.rst:561 msgid "" "First output went well, and fixes the bug we had before. That is, we want " "any value >= 2 to be as verbose as possible." @@ -498,21 +499,21 @@ msgstr "" "avons eu est corrigé. Cela dit, nous voulons que n'importe quelle valeur >= " "2 rende le programme aussi verbeux que possible." -#: howto/argparse.rst:559 +#: howto/argparse.rst:564 msgid "Third output not so good." msgstr "La troisième sortie de programme n'est pas si bien que ça." -#: howto/argparse.rst:561 +#: howto/argparse.rst:566 msgid "Let's fix that bug::" msgstr "Corrigeons ce bogue ::" -#: howto/argparse.rst:578 +#: howto/argparse.rst:583 msgid "" "We've just introduced yet another keyword, ``default``. We've set it to " "``0`` in order to make it comparable to the other int values. Remember that " "by default, if an optional argument isn't specified, it gets the ``None`` " -"value, and that cannot be compared to an int value (hence the :exc:" -"`TypeError` exception)." +"value, and that cannot be compared to an int value (hence " +"the :exc:`TypeError` exception)." msgstr "" "Nous venons juste d'introduire un nouveau mot clef, ``default``. Nous " "l'avons définit à ``0`` pour le rendre comparable aux autres valeurs. " @@ -520,11 +521,11 @@ msgstr "" "il sera définit à ``None``, et ne pourra pas être comparé à une valeur de " "type entier (une erreur :exc:`TypeError` serait alors levée)." -#: howto/argparse.rst:585 +#: howto/argparse.rst:590 msgid "And:" msgstr "Et :" -#: howto/argparse.rst:592 +#: howto/argparse.rst:597 msgid "" "You can go quite far just with what we've learned so far, and we have only " "scratched the surface. The :mod:`argparse` module is very powerful, and " @@ -535,11 +536,11 @@ msgstr "" "est très puissant, et nous allons l'explorer un peu plus avant la fin de ce " "tutoriel." -#: howto/argparse.rst:599 +#: howto/argparse.rst:604 msgid "Getting a little more advanced" msgstr "Aller un peu plus loin" -#: howto/argparse.rst:601 +#: howto/argparse.rst:606 msgid "" "What if we wanted to expand our tiny program to perform other powers, not " "just squares::" @@ -547,11 +548,11 @@ msgstr "" "Qu'en est-il si nous souhaitons étendre notre mini programme pour le rendre " "capable de calculer d'autres puissances, et pas seulement des carrés ::" -#: howto/argparse.rst:656 howto/argparse.rst:872 +#: howto/argparse.rst:661 howto/argparse.rst:877 msgid "Output:" msgstr "Sortie :" -#: howto/argparse.rst:639 +#: howto/argparse.rst:644 msgid "" "Notice that so far we've been using verbosity level to *change* the text " "that gets displayed. The following example instead uses verbosity level to " @@ -561,40 +562,41 @@ msgstr "" "pour *changer* le texte qui est affiché. L'exemple suivant au contraire " "utilise le niveau de verbosité pour afficher *plus* de texte à la place ::" -#: howto/argparse.rst:672 +#: howto/argparse.rst:677 msgid "Specifying ambiguous arguments" msgstr "" -#: howto/argparse.rst:674 +#: howto/argparse.rst:679 msgid "" "When there is ambiguity in deciding whether an argument is positional or for " "an argument, ``--`` can be used to tell :meth:`~ArgumentParser.parse_args` " "that everything after that is a positional argument::" msgstr "" -#: howto/argparse.rst:699 +#: howto/argparse.rst:704 msgid "Conflicting options" msgstr "Paramètres en conflit" -#: howto/argparse.rst:701 +#: howto/argparse.rst:706 #, fuzzy msgid "" -"So far, we have been working with two methods of an :class:`argparse." -"ArgumentParser` instance. Let's introduce a third one, :meth:" -"`~ArgumentParser.add_mutually_exclusive_group`. It allows for us to specify " -"options that conflict with each other. Let's also change the rest of the " -"program so that the new functionality makes more sense: we'll introduce the " -"``--quiet`` option, which will be the opposite of the ``--verbose`` one::" +"So far, we have been working with two methods of " +"an :class:`argparse.ArgumentParser` instance. Let's introduce a third " +"one, :meth:`~ArgumentParser.add_mutually_exclusive_group`. It allows for us " +"to specify options that conflict with each other. Let's also change the rest " +"of the program so that the new functionality makes more sense: we'll " +"introduce the ``--quiet`` option, which will be the opposite of the ``--" +"verbose`` one::" msgstr "" -"Jusque là, nous avons travaillé avec deux méthodes d'une instance de :class:" -"`argparse.ArgumentParser`. En voici une troisième, :meth:" -"`add_mutually_exclusive_group`. Elle nous permet de spécifier des paramètres " -"qui sont en conflit entre eux. Changeons aussi le reste du programme de " -"telle sorte que la nouvelle fonctionnalité fasse sens : nous allons " -"introduire l'option ``--quiet``, qui va avoir l'effet opposé de l'option ``--" -"verbose`` ::" +"Jusque là, nous avons travaillé avec deux méthodes d'une instance " +"de :class:`argparse.ArgumentParser`. En voici une " +"troisième, :meth:`add_mutually_exclusive_group`. Elle nous permet de " +"spécifier des paramètres qui sont en conflit entre eux. Changeons aussi le " +"reste du programme de telle sorte que la nouvelle fonctionnalité fasse " +"sens : nous allons introduire l'option ``--quiet``, qui va avoir l'effet " +"opposé de l'option ``--verbose`` ::" -#: howto/argparse.rst:727 +#: howto/argparse.rst:732 msgid "" "Our program is now simpler, and we've lost some functionality for the sake " "of demonstration. Anyways, here's the output:" @@ -603,7 +605,7 @@ msgstr "" "fonctionnalités pour faire cette démonstration. Peu importe, voici la sortie " "du programme :" -#: howto/argparse.rst:745 +#: howto/argparse.rst:750 msgid "" "That should be easy to follow. I've added that last output so you can see " "the sort of flexibility you get, i.e. mixing long form options with short " @@ -613,7 +615,7 @@ msgstr "" "que vous puissiez voir le genre de flexibilité que vous pouvez avoir, par " "exemple pour faire un mélange entre des paramètres courts et longs." -#: howto/argparse.rst:749 +#: howto/argparse.rst:754 msgid "" "Before we conclude, you probably want to tell your users the main purpose of " "your program, just in case they don't know::" @@ -622,7 +624,7 @@ msgstr "" "le but principal de votre programme, juste dans le cas ou ils ne le " "sauraient pas ::" -#: howto/argparse.rst:770 +#: howto/argparse.rst:775 msgid "" "Note that slight difference in the usage text. Note the ``[-v | -q]``, which " "tells us that we can either use ``-v`` or ``-q``, but not both at the same " @@ -632,11 +634,11 @@ msgstr "" "nous disent que nous pouvons utiliser au choix ``-v`` ou ``-q``, mais pas " "les deux ensemble :" -#: howto/argparse.rst:792 +#: howto/argparse.rst:797 msgid "How to translate the argparse output" msgstr "" -#: howto/argparse.rst:794 +#: howto/argparse.rst:799 msgid "" "The output of the :mod:`argparse` module such as its help text and error " "messages are all made translatable using the :mod:`gettext` module. This " @@ -644,54 +646,54 @@ msgid "" "See also :ref:`i18n-howto`." msgstr "" -#: howto/argparse.rst:799 +#: howto/argparse.rst:804 msgid "For instance, in this :mod:`argparse` output:" msgstr "" -#: howto/argparse.rst:817 +#: howto/argparse.rst:822 msgid "" "The strings ``usage:``, ``positional arguments:``, ``options:`` and ``show " "this help message and exit`` are all translatable." msgstr "" -#: howto/argparse.rst:820 +#: howto/argparse.rst:825 msgid "" -"In order to translate these strings, they must first be extracted into a ``." -"po`` file. For example, using `Babel `__, run this " -"command:" +"In order to translate these strings, they must first be extracted into a " +"``.po`` file. For example, using `Babel `__, run " +"this command:" msgstr "" -#: howto/argparse.rst:828 +#: howto/argparse.rst:833 msgid "" "This command will extract all translatable strings from the :mod:`argparse` " "module and output them into a file named ``messages.po``. This command " "assumes that your Python installation is in ``/usr/lib``." msgstr "" -#: howto/argparse.rst:832 +#: howto/argparse.rst:837 msgid "" "You can find out the location of the :mod:`argparse` module on your system " "using this script::" msgstr "" -#: howto/argparse.rst:838 +#: howto/argparse.rst:843 msgid "" "Once the messages in the ``.po`` file are translated and the translations " "are installed using :mod:`gettext`, :mod:`argparse` will be able to display " "the translated messages." msgstr "" -#: howto/argparse.rst:842 +#: howto/argparse.rst:847 msgid "" -"To translate your own strings in the :mod:`argparse` output, use :mod:" -"`gettext`." +"To translate your own strings in the :mod:`argparse` output, " +"use :mod:`gettext`." msgstr "" -#: howto/argparse.rst:845 +#: howto/argparse.rst:850 msgid "Custom type converters" msgstr "" -#: howto/argparse.rst:847 +#: howto/argparse.rst:852 msgid "" "The :mod:`argparse` module allows you to specify custom type converters for " "your command-line arguments. This allows you to modify user input before " @@ -699,7 +701,7 @@ msgid "" "need to pre-process the input before it is used in your program." msgstr "" -#: howto/argparse.rst:852 +#: howto/argparse.rst:857 msgid "" "When using a custom type converter, you can use any callable that takes a " "single string argument (the argument value) and returns the converted value. " @@ -707,31 +709,31 @@ msgid "" "action class with the **action** parameter instead." msgstr "" -#: howto/argparse.rst:857 +#: howto/argparse.rst:862 msgid "" "For example, let's say you want to handle arguments with different prefixes " "and process them accordingly::" msgstr "" -#: howto/argparse.rst:879 +#: howto/argparse.rst:884 #, fuzzy msgid "In this example, we:" msgstr "Un exemple ::" -#: howto/argparse.rst:881 +#: howto/argparse.rst:886 msgid "" "Created a parser with custom prefix characters using the ``prefix_chars`` " "parameter." msgstr "" -#: howto/argparse.rst:884 +#: howto/argparse.rst:889 msgid "" "Defined two arguments, ``-a`` and ``+a``, which used the ``type`` parameter " "to create custom type converters to store the value in a tuple with the " "prefix." msgstr "" -#: howto/argparse.rst:887 +#: howto/argparse.rst:892 msgid "" "Without the custom type converters, the arguments would have treated the ``-" "a`` and ``+a`` as the same argument, which would have been undesirable. By " @@ -739,11 +741,11 @@ msgid "" "arguments." msgstr "" -#: howto/argparse.rst:892 +#: howto/argparse.rst:897 msgid "Conclusion" msgstr "Conclusion" -#: howto/argparse.rst:894 +#: howto/argparse.rst:899 msgid "" "The :mod:`argparse` module offers a lot more than shown here. Its docs are " "quite detailed and thorough, and full of examples. Having gone through this " @@ -754,5 +756,17 @@ msgstr "" "accompli ce tutoriel, vous pourrez facilement comprendre cette documentation " "sans vous sentir dépassé." +#, fuzzy +#~ msgid "" +#~ "There are two other modules that fulfill the same task, " +#~ "namely :mod:`getopt` (an equivalent for ``getopt()`` from the C language) " +#~ "and the deprecated :mod:`optparse`. Note also that :mod:`argparse` is " +#~ "based on :mod:`optparse`, and therefore very similar in terms of usage." +#~ msgstr "" +#~ "Il y a deux autres modules qui remplissent le même rôle : :mod:`getopt` " +#~ "(un équivalent de :c:func:`getopt` du langage C) et :mod:`optparse` qui " +#~ "est obsolète. Il faut noter que :mod:`argparse` est basé " +#~ "sur :mod:`optparse` et donc s'utilise de manière très similaire." + #~ msgid "Tshepang Lekhonkhobe" #~ msgstr "Tshepang Lekhonkhobe" diff --git a/howto/clinic.po b/howto/clinic.po index 33f37305a..3d7349c66 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2022-10-18 12:29+0200\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" @@ -304,15 +304,15 @@ msgstr "" #~ "code de CPython." #~ msgid "" -#~ "Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :c:" -#~ "func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work " -#~ "with Argument Clinic yet. For my example I'm using ``_pickle.Pickler." -#~ "dump()``." -#~ msgstr "" -#~ "Trouvez une fonction native de Python qui fait appel à :c:func:" -#~ "`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords`, et n'a pas " -#~ "encore été convertie par Argument Clinic. Pour cet exemple, j'utilise " +#~ "Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` " +#~ "or :c:func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to " +#~ "work with Argument Clinic yet. For my example I'm using " #~ "``_pickle.Pickler.dump()``." +#~ msgstr "" +#~ "Trouvez une fonction native de Python qui fait appel " +#~ "à :c:func:`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords`, et " +#~ "n'a pas encore été convertie par Argument Clinic. Pour cet exemple, " +#~ "j'utilise ``_pickle.Pickler.dump()``." #~ msgid "" #~ "If the call to the ``PyArg_Parse`` function uses any of the following " @@ -337,11 +337,12 @@ msgstr "" #~ "for conversion to Argument Clinic. Argument Clinic doesn't support " #~ "generic functions or polymorphic parameters." #~ msgstr "" -#~ "Par ailleurs, si la fonction a des appels multiples à :c:func:" -#~ "`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` dans lesquels " -#~ "elle permet différents types pour les mêmes arguments, il n'est " -#~ "probablement pas possible de la convertir pour Argument Clinic. Argument " -#~ "Clinic ne gère pas les fonctions génériques ou les paramètres polymorphes." +#~ "Par ailleurs, si la fonction a des appels multiples " +#~ "à :c:func:`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` " +#~ "dans lesquels elle permet différents types pour les mêmes arguments, il " +#~ "n'est probablement pas possible de la convertir pour Argument Clinic. " +#~ "Argument Clinic ne gère pas les fonctions génériques ou les paramètres " +#~ "polymorphes." #~ msgid "" #~ "Add the following boilerplate above the function, creating our block::" @@ -426,12 +427,12 @@ msgstr "" #~ msgid "" #~ "The name of the class and module should be the same as the one seen by " -#~ "Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:" -#~ "`PyTypeObject` as appropriate." +#~ "Python. Check the name defined in the :c:type:`PyModuleDef` " +#~ "or :c:type:`PyTypeObject` as appropriate." #~ msgstr "" #~ "Le nom de la classe et du module doivent être les mêmes que ceux vus par " -#~ "Python. Selon le cas, référez-vous à :c:type:`PyModuleDef` ou :c:type:" -#~ "`PyTypeObject`" +#~ "Python. Selon le cas, référez-vous à :c:type:`PyModuleDef` " +#~ "ou :c:type:`PyTypeObject`" #~ msgid "" #~ "When you declare a class, you must also specify two aspects of its type " @@ -440,8 +441,8 @@ msgstr "" #~ msgstr "" #~ "Quand vous déclarez une classe, vous devez aussi spécifier deux aspects " #~ "de son type en C : la déclaration de type que vous utiliseriez pour un " -#~ "pointeur vers une instance de cette classe et un pointeur vers le :c:type:" -#~ "`PyTypeObject` de cette classe." +#~ "pointeur vers une instance de cette classe et un pointeur vers " +#~ "le :c:type:`PyTypeObject` de cette classe." #~ msgid "" #~ "Declare each of the parameters to the function. Each parameter should " @@ -538,8 +539,8 @@ msgstr "" #~ "to :c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are " #~ "positional-only." #~ msgstr "" -#~ "Si la fonction C existante appelle :c:func:`PyArg_ParseTuple` (et pas :c:" -#~ "func:`PyArg_ParseTupleAndKeywords`), alors tous ses arguments sont " +#~ "Si la fonction C existante appelle :c:func:`PyArg_ParseTuple` (et " +#~ "pas :c:func:`PyArg_ParseTupleAndKeywords`), alors tous ses arguments sont " #~ "uniquement positionnels." #~ msgid "" @@ -588,8 +589,8 @@ msgstr "" #~ "luck everything worked---your block now has output, and a ``.c.h`` file " #~ "has been generated! Reopen the file in your text editor to see::" #~ msgstr "" -#~ "Enregistrez puis fermez le fichier, puis exécutez ``Tools/clinic/clinic." -#~ "py`` dessus. Avec un peu de chance tout a fonctionné, votre bloc a " +#~ "Enregistrez puis fermez le fichier, puis exécutez ``Tools/clinic/" +#~ "clinic.py`` dessus. Avec un peu de chance tout a fonctionné, votre bloc a " #~ "maintenant une sortie, et un fichier ``.c.h`` a été généré ! Ré-ouvrez le " #~ "fichier dans votre éditeur pour voir ::" @@ -620,25 +621,26 @@ msgstr "" #~ msgid "" #~ "First, ensure both places use the same argument-parsing function. The " -#~ "existing code must call either :c:func:`PyArg_ParseTuple` or :c:func:" -#~ "`PyArg_ParseTupleAndKeywords`; ensure that the code generated by Argument " -#~ "Clinic calls the *exact* same function." +#~ "existing code must call either :c:func:`PyArg_ParseTuple` " +#~ "or :c:func:`PyArg_ParseTupleAndKeywords`; ensure that the code generated " +#~ "by Argument Clinic calls the *exact* same function." #~ msgstr "" #~ "Assurez vous premièrement que les deux codes utilisent la même fonction " -#~ "pour analyser les arguments. Le code existant doit appeler soit :c:func:" -#~ "`PyArg_ParseTuple` soit :c:func:`PyArg_ParseTupleAndKeywords` ; assurez " -#~ "vous que le code généré par Argument Clinic appelle *exactement* la même " -#~ "fonction." +#~ "pour analyser les arguments. Le code existant doit appeler " +#~ "soit :c:func:`PyArg_ParseTuple` " +#~ "soit :c:func:`PyArg_ParseTupleAndKeywords` ; assurez vous que le code " +#~ "généré par Argument Clinic appelle *exactement* la même fonction." #~ msgid "" -#~ "Second, the format string passed in to :c:func:`PyArg_ParseTuple` or :c:" -#~ "func:`PyArg_ParseTupleAndKeywords` should be *exactly* the same as the " -#~ "hand-written one in the existing function, up to the colon or semi-colon." +#~ "Second, the format string passed in to :c:func:`PyArg_ParseTuple` " +#~ "or :c:func:`PyArg_ParseTupleAndKeywords` should be *exactly* the same as " +#~ "the hand-written one in the existing function, up to the colon or semi-" +#~ "colon." #~ msgstr "" -#~ "Deuxièmement, la chaîne de caractère du format passée dans :c:func:" -#~ "`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` doit être " -#~ "*exactement* la même que celle écrite à la main, jusqu'aux deux points ou " -#~ "au point virgule." +#~ "Deuxièmement, la chaîne de caractère du format passée " +#~ "dans :c:func:`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` " +#~ "doit être *exactement* la même que celle écrite à la main, jusqu'aux deux " +#~ "points ou au point virgule." #~ msgid "" #~ "(Argument Clinic always generates its format strings with a ``:`` " @@ -669,8 +671,8 @@ msgstr "" #~ "this builtin::" #~ msgstr "" #~ "Quatrièmement, à l'intérieur de la section sortie du bloc, vous trouverez " -#~ "une macro pré-processeur qui définit les structures statiques :c:type:" -#~ "`PyMethodDef` appropriées pour ce module natif ::" +#~ "une macro pré-processeur qui définit les structures " +#~ "statiques :c:type:`PyMethodDef` appropriées pour ce module natif ::" #~ msgid "" #~ "This static structure should be *exactly* the same as the existing " @@ -762,9 +764,9 @@ msgstr "" #~ "Well, except for one difference: ``inspect.signature()`` run on your " #~ "function should now provide a valid signature!" #~ msgstr "" -#~ "Enfin, à part pour une différence : si vous exécutez ``inspect." -#~ "signature()`` sur votre fonction, vous obtiendrez maintenant une " -#~ "signature valide !" +#~ "Enfin, à part pour une différence : si vous exécutez " +#~ "``inspect.signature()`` sur votre fonction, vous obtiendrez maintenant " +#~ "une signature valide !" #~ msgid "" #~ "Congratulations, you've ported your first function to work with Argument " @@ -838,16 +840,16 @@ msgstr "" #~ msgstr "Conversion des fonctions en utilisant *PyArg_UnpackTuple*" #~ msgid "" -#~ "To convert a function parsing its arguments with :c:func:" -#~ "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each " -#~ "as an ``object``. You may specify the ``type`` argument to cast the type " -#~ "as appropriate. All arguments should be marked positional-only (add a ``/" -#~ "`` on a line by itself after the last argument)." +#~ "To convert a function parsing its arguments " +#~ "with :c:func:`PyArg_UnpackTuple`, simply write out all the arguments, " +#~ "specifying each as an ``object``. You may specify the ``type`` argument " +#~ "to cast the type as appropriate. All arguments should be marked " +#~ "positional-only (add a ``/`` on a line by itself after the last argument)." #~ msgstr "" -#~ "Afin de convertir une fonction analysant ses arguments via :c:func:" -#~ "`PyArg_UnpackTuple`, écrivez simplement tous les arguments, en les " -#~ "spécifiant comme des ``object``. Vous pouvez spécifier également le " -#~ "``type`` d'argument afin de le forcer au type approprié. Tous les " +#~ "Afin de convertir une fonction analysant ses arguments " +#~ "via :c:func:`PyArg_UnpackTuple`, écrivez simplement tous les arguments, " +#~ "en les spécifiant comme des ``object``. Vous pouvez spécifier également " +#~ "le ``type`` d'argument afin de le forcer au type approprié. Tous les " #~ "arguments devraient être marqués comme seulement positionnels (ajoutez un " #~ "``/`` seul sur la ligne après le dernier argument)." @@ -868,8 +870,8 @@ msgstr "" #~ "statement to call one of several different :c:func:`PyArg_ParseTuple` " #~ "calls depending on how many positional arguments there are. (These " #~ "functions cannot accept keyword-only arguments.) This approach was used " -#~ "to simulate optional arguments back before :c:func:" -#~ "`PyArg_ParseTupleAndKeywords` was created." +#~ "to simulate optional arguments back " +#~ "before :c:func:`PyArg_ParseTupleAndKeywords` was created." #~ msgstr "" #~ "Certaines fonctions de base ont une approche particulière pour analyser " #~ "leurs arguments : elles comptent le nombre d'arguments positionnels, puis " @@ -881,29 +883,30 @@ msgstr "" #~ "soit créée." #~ msgid "" -#~ "While functions using this approach can often be converted to use :c:func:" -#~ "`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, " -#~ "it's not always possible. Some of these legacy functions have behaviors :" -#~ "c:func:`PyArg_ParseTupleAndKeywords` doesn't directly support. The most " -#~ "obvious example is the builtin function ``range()``, which has an " -#~ "optional argument on the *left* side of its required argument! Another " -#~ "example is ``curses.window.addch()``, which has a group of two arguments " -#~ "that must always be specified together. (The arguments are called ``x`` " -#~ "and ``y``; if you call the function passing in ``x``, you must also pass " -#~ "in ``y``—and if you don't pass in ``x`` you may not pass in ``y`` either.)" +#~ "While functions using this approach can often be converted to " +#~ "use :c:func:`PyArg_ParseTupleAndKeywords`, optional arguments, and " +#~ "default values, it's not always possible. Some of these legacy functions " +#~ "have behaviors :c:func:`PyArg_ParseTupleAndKeywords` doesn't directly " +#~ "support. The most obvious example is the builtin function ``range()``, " +#~ "which has an optional argument on the *left* side of its required " +#~ "argument! Another example is ``curses.window.addch()``, which has a group " +#~ "of two arguments that must always be specified together. (The arguments " +#~ "are called ``x`` and ``y``; if you call the function passing in ``x``, " +#~ "you must also pass in ``y``—and if you don't pass in ``x`` you may not " +#~ "pass in ``y`` either.)" #~ msgstr "" #~ "Alors que les fonctions utilisant cette approche peuvent normalement être " #~ "converties pour utiliser :c:func:`PyArg_ParseTupleAndKeywords`, des " #~ "arguments optionnels et des valeurs par défaut, ce n'est pas toujours " -#~ "possible. Certaines fonctions classiques ne peuvent pas être gérées par :" -#~ "c:func:`PyArg_ParseTupleAndKeywords`. L'exemple le plus évident est la " -#~ "fonction native ``range()``, qui possède un argument optionnel à *gauche* " -#~ "de ses arguments requis ! Un autre exemple est la fonction ``curses." -#~ "window.addch()``, qui possède un groupe de deux arguments qui doivent " -#~ "toujours être spécifiés ensemble (ces arguments s'appellent ``x`` et " -#~ "``y`` ; si vous appelez la fonction en passant ``x``, vous devez passer " -#~ "``y`` et si vous ne passez pas ``x``, vous ne devez pas passer ``y`` non " -#~ "plus)." +#~ "possible. Certaines fonctions classiques ne peuvent pas être gérées " +#~ "par :c:func:`PyArg_ParseTupleAndKeywords`. L'exemple le plus évident est " +#~ "la fonction native ``range()``, qui possède un argument optionnel à " +#~ "*gauche* de ses arguments requis ! Un autre exemple est la fonction " +#~ "``curses.window.addch()``, qui possède un groupe de deux arguments qui " +#~ "doivent toujours être spécifiés ensemble (ces arguments s'appellent ``x`` " +#~ "et ``y`` ; si vous appelez la fonction en passant ``x``, vous devez " +#~ "passer ``y`` et si vous ne passez pas ``x``, vous ne devez pas passer " +#~ "``y`` non plus)." #~ msgid "" #~ "In any case, the goal of Argument Clinic is to support argument parsing " @@ -944,9 +947,9 @@ msgstr "" #~ msgid "" #~ "To specify an optional group, add a ``[`` on a line by itself before the " #~ "parameters you wish to group together, and a ``]`` on a line by itself " -#~ "after these parameters. As an example, here's how ``curses.window." -#~ "addch`` uses optional groups to make the first two parameters and the " -#~ "last parameter optional::" +#~ "after these parameters. As an example, here's how " +#~ "``curses.window.addch`` uses optional groups to make the first two " +#~ "parameters and the last parameter optional::" #~ msgstr "" #~ "Afin de signaler un groupe optionnel, ajoutez un ``[`` seul sur une ligne " #~ "avant les paramètres que vous souhaitez inclure dans le groupe, puis un " @@ -1107,8 +1110,9 @@ msgstr "" #~ "The annotation value for this parameter. Not currently supported, " #~ "because :pep:`8` mandates that the Python library may not use annotations." #~ msgstr "" -#~ "La valeur annotée pour ce paramètre. Actuellement non géré, car la :pep:" -#~ "`8` exige que les bibliothèques Python n'utilisent pas d'annotations." +#~ "La valeur annotée pour ce paramètre. Actuellement non géré, car " +#~ "la :pep:`8` exige que les bibliothèques Python n'utilisent pas " +#~ "d'annotations." #~ msgid "" #~ "In addition, some converters accept additional arguments. Here is a list " @@ -1150,13 +1154,13 @@ msgstr "" #~ msgstr "``converter``" #~ msgid "" -#~ "Only supported by the ``object`` converter. Specifies the name of a :ref:" -#~ "`C \"converter function\" ` to use to convert this object to " -#~ "a native type." +#~ "Only supported by the ``object`` converter. Specifies the name of " +#~ "a :ref:`C \"converter function\" ` to use to convert this " +#~ "object to a native type." #~ msgstr "" -#~ "Autorisé seulement pour l'adaptateur ``object``. Spécifie le nom d'une :" -#~ "ref:`« fonction de conversion » depuis C ` à utiliser pour " -#~ "convertir cet objet en type natif." +#~ "Autorisé seulement pour l'adaptateur ``object``. Spécifie le nom " +#~ "d'une :ref:`« fonction de conversion » depuis C ` à utiliser " +#~ "pour convertir cet objet en type natif." #~ msgid "``encoding``" #~ msgstr "``encoding``" @@ -1520,9 +1524,9 @@ msgstr "" #~ msgid "" #~ "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, " -#~ "``'*y'``, or ``'z*'`` legacy converters), you *must* not call :c:func:" -#~ "`PyBuffer_Release` on the provided buffer. Argument Clinic generates code " -#~ "that does it for you (in the parsing function)." +#~ "``'*y'``, or ``'z*'`` legacy converters), you *must* not " +#~ "call :c:func:`PyBuffer_Release` on the provided buffer. Argument Clinic " +#~ "generates code that does it for you (in the parsing function)." #~ msgstr "" #~ "Lorsque vous utilisez l'adaptateur ``Py_buffer`` (ou bien les adaptateurs " #~ "de base ``'s*'``, ``'w*'``, ``'*y'``, ou ``'z*'``), vous *ne devez pas* " @@ -1589,9 +1593,9 @@ msgstr "" #~ "Mentionnons un problème potentiel d'utiliser *Argument Clinic* : cela " #~ "retire la flexibilité des spécifications de format commençant par ``e``. " #~ "Lorsque vous faites un appel à ``PyArg_Parse`` à la main, vous pourriez " -#~ "théoriquement décider quelle chaîne d'encodage passer à :c:func:" -#~ "`PyArg_ParseTuple`. Mais désormais cette chaîne doit être codée en dur au " -#~ "moment du pré-processus d'Argument-Clinic. Cette limitation est " +#~ "théoriquement décider quelle chaîne d'encodage passer " +#~ "à :c:func:`PyArg_ParseTuple`. Mais désormais cette chaîne doit être codée " +#~ "en dur au moment du pré-processus d'Argument-Clinic. Cette limitation est " #~ "délibérée ; elle permet une gestion plus simple de cette spécification de " #~ "format, et peut permettre de futures optimisations. Cette restriction ne " #~ "semble pas déraisonnable ; CPython lui-même utilise toujours des chaînes " diff --git a/howto/cporting.po b/howto/cporting.po index d8ee0c83e..00384a3ec 100644 --- a/howto/cporting.po +++ b/howto/cporting.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2021-04-27 15:29+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -46,11 +46,12 @@ msgstr "" "avec le code correspondant." #: howto/cporting.rst:17 +#, fuzzy msgid "" -"The `Cython`_ and `CFFI`_ libraries offer abstractions over Python's C API. " -"Extensions generally need to be re-written to use one of them, but the " -"library then handles differences between various Python versions and " -"implementations." +":ref:`Recommended third party tools ` offer abstractions over " +"the Python's C API. Extensions generally need to be re-written to use one of " +"them, but the library then handles differences between various Python " +"versions and implementations." msgstr "" "Les bibliothèques `Cython`_ et `CFFI`_ fournissent des abstractions de l'API " "C de Python. Les extensions ont généralement besoin d'être réécrites pour " diff --git a/howto/curses.po b/howto/curses.po index 34a41ae8c..06b0e3d27 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-12-16 14:42+0100\n" "Last-Translator: Khaïs COLIN \n" "Language-Team: FRENCH \n" @@ -35,7 +35,7 @@ msgstr "Version" msgid "2.04" msgstr "2.04" -#: howto/curses.rst:-1 +#: howto/curses.rst:13 msgid "Abstract" msgstr "Résumé" @@ -164,9 +164,10 @@ msgstr "" "fournies par *curses* ; si vous êtes déjà familier avec la programmation " "*curses* en C, il est très facile de transférer cette connaissance à Python. " "La plus grande différence est que l'interface Python simplifie les choses en " -"fusionnant différentes fonctions C telles que :c:func:`addstr`, :c:func:" -"`mvaddstr` et :c:func:`mvwaddstr` en une seule méthode :meth:`~curses.window." -"addstr`. Nous voyons cela plus en détail ci-après." +"fusionnant différentes fonctions C telles " +"que :c:func:`addstr`, :c:func:`mvaddstr` et :c:func:`mvwaddstr` en une seule " +"méthode :meth:`~curses.window.addstr`. Nous voyons cela plus en détail ci-" +"après." #: howto/curses.rst:73 msgid "" @@ -210,8 +211,8 @@ msgid "" msgstr "" "Habituellement, les applications *curses* désactivent l'écho automatique des " "touches à l'écran, afin de pouvoir lire les touches et ne les afficher que " -"dans certaines circonstances. Cela nécessite d'appeler la fonction :func:" -"`~curses.noecho`. ::" +"dans certaines circonstances. Cela nécessite d'appeler la " +"fonction :func:`~curses.noecho`. ::" #: howto/curses.rst:100 msgid "" @@ -229,9 +230,9 @@ msgid "" "Terminals usually return special keys, such as the cursor keys or navigation " "keys such as Page Up and Home, as a multibyte escape sequence. While you " "could write your application to expect such sequences and process them " -"accordingly, curses can do it for you, returning a special value such as :" -"const:`curses.KEY_LEFT`. To get curses to do the job, you'll have to enable " -"keypad mode. ::" +"accordingly, curses can do it for you, returning a special value such " +"as :const:`curses.KEY_LEFT`. To get curses to do the job, you'll have to " +"enable keypad mode. ::" msgstr "" "Les terminaux renvoient généralement les touches spéciales, telles que les " "touches de curseur ou les touches de navigation (Page précédente et Accueil " @@ -251,9 +252,9 @@ msgstr "" #: howto/curses.rst:122 msgid "" -"to reverse the curses-friendly terminal settings. Then call the :func:" -"`~curses.endwin` function to restore the terminal to its original operating " -"mode. ::" +"to reverse the curses-friendly terminal settings. Then call " +"the :func:`~curses.endwin` function to restore the terminal to its original " +"operating mode. ::" msgstr "" "pour inverser les réglages du terminal mis en place pour *curses*. Ensuite, " "appelez la fonction :func:`~curses.enddwin` pour restaurer le terminal dans " @@ -290,27 +291,27 @@ msgid "" "initializations described above, also initializing colors if color support " "is present. :func:`!wrapper` then runs your provided callable. Once the " "callable returns, :func:`!wrapper` will restore the original state of the " -"terminal. The callable is called inside a :keyword:`try`...\\ :keyword:" -"`except` that catches exceptions, restores the state of the terminal, and " -"then re-raises the exception. Therefore your terminal won't be left in a " -"funny state on exception and you'll be able to read the exception's message " -"and traceback." +"terminal. The callable is called inside a :keyword:`try`..." +"\\ :keyword:`except` that catches exceptions, restores the state of the " +"terminal, and then re-raises the exception. Therefore your terminal won't " +"be left in a funny state on exception and you'll be able to read the " +"exception's message and traceback." msgstr "" "La fonction :func:`~curses.wrapper` prend un objet appelable et fait les " "initialisations décrites ci-dessus, initialisant également les couleurs si " "la gestion des couleurs est possible. :func:`wrapper` lance l'appelable " "fourni. Une fois que l'appelable termine, :func:`wrapper` restaure l'état " -"d'origine du terminal. L'appelable est appelé à l'intérieur d'un :keyword:" -"`try`…\\ :keyword:`except` qui capture les exceptions, restaure l'état du " -"terminal, puis relève l'exception. Par conséquent, votre terminal ne reste " -"pas dans un drôle d'état au moment de l'exception et vous pourrez lire le " -"message de l'exception et la trace de la pile d'appels." +"d'origine du terminal. L'appelable est appelé à l'intérieur " +"d'un :keyword:`try`…\\ :keyword:`except` qui capture les exceptions, " +"restaure l'état du terminal, puis relève l'exception. Par conséquent, votre " +"terminal ne reste pas dans un drôle d'état au moment de l'exception et vous " +"pourrez lire le message de l'exception et la trace de la pile d'appels." -#: howto/curses.rst:165 +#: howto/curses.rst:167 msgid "Windows and Pads" msgstr "Fenêtres et tampons (*pads* en anglais)" -#: howto/curses.rst:167 +#: howto/curses.rst:169 msgid "" "Windows are the basic abstraction in curses. A window object represents a " "rectangular area of the screen, and supports methods to display text, erase " @@ -321,14 +322,14 @@ msgstr "" "afficher du texte, l'effacer, permettre à l'utilisateur de saisir des " "chaînes, etc." -#: howto/curses.rst:171 +#: howto/curses.rst:173 msgid "" "The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " "window object that covers the entire screen. Many programs may need only " "this single window, but you might wish to divide the screen into smaller " -"windows, in order to redraw or clear them separately. The :func:`~curses." -"newwin` function creates a new window of a given size, returning the new " -"window object. ::" +"windows, in order to redraw or clear them separately. " +"The :func:`~curses.newwin` function creates a new window of a given size, " +"returning the new window object. ::" msgstr "" "L'objet ``stdscr`` renvoyé par la fonction :func:`~curses.initscr` est un " "objet fenêtre qui couvre l'écran entier. De nombreux programmes peuvent " @@ -337,7 +338,7 @@ msgstr "" "séparément. La fonction :func:`~curses.newwin` crée une nouvelle fenêtre " "d'une taille donnée, renvoyant le nouvel objet fenêtre. ::" -#: howto/curses.rst:182 +#: howto/curses.rst:184 msgid "" "Note that the coordinate system used in curses is unusual. Coordinates are " "always passed in the order *y,x*, and the top-left corner of a window is " @@ -354,36 +355,38 @@ msgstr "" "applications informatiques, mais elle fait partie de *curses* depuis qu'il a " "été écrit et il est trop tard pour changer les choses maintenant." -#: howto/curses.rst:190 +#: howto/curses.rst:192 msgid "" -"Your application can determine the size of the screen by using the :data:" -"`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " -"sizes. Legal coordinates will then extend from ``(0,0)`` to ``(curses.LINES " -"- 1, curses.COLS - 1)``." +"Your application can determine the size of the screen by using " +"the :data:`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* " +"and *x* sizes. Legal coordinates will then extend from ``(0,0)`` to " +"``(curses.LINES - 1, curses.COLS - 1)``." msgstr "" "Votre application peut déterminer la taille de l'écran en utilisant les " "variables :data:`curses.LINES` et :data:`curses.COLS` pour obtenir les " "tailles *y* et *x*. Les coordonnées licites s'étendent alors de ``(0,0)`` à " "``(curses.LINES - 1, curses.COLS - 1)``." -#: howto/curses.rst:195 +#: howto/curses.rst:197 msgid "" "When you call a method to display or erase text, the effect doesn't " -"immediately show up on the display. Instead you must call the :meth:" -"`~curses.window.refresh` method of window objects to update the screen." +"immediately show up on the display. Instead you must call " +"the :meth:`~curses.window.refresh` method of window objects to update the " +"screen." msgstr "" "Quand vous appelez une méthode pour afficher ou effacer du texte, " -"l'affichage ne le reflète pas immédiatement. Vous devez appeler la méthode :" -"meth:`~curses.window.refresh` des objets fenêtre pour mettre à jour l'écran." +"l'affichage ne le reflète pas immédiatement. Vous devez appeler la " +"méthode :meth:`~curses.window.refresh` des objets fenêtre pour mettre à jour " +"l'écran." -#: howto/curses.rst:200 +#: howto/curses.rst:202 #, fuzzy msgid "" "This is because curses was originally written with slow 300-baud terminal " "connections in mind; with these terminals, minimizing the time required to " "redraw the screen was very important. Instead curses accumulates changes to " -"the screen and displays them in the most efficient manner when you call :" -"meth:`!refresh`. For example, if your program displays some text in a " +"the screen and displays them in the most efficient manner when you " +"call :meth:`!refresh`. For example, if your program displays some text in a " "window and then clears the window, there's no need to send the original text " "because they're never visible." msgstr "" @@ -396,7 +399,7 @@ msgstr "" "fenêtre, il n'est pas nécessaire de l'afficher puisqu'il ne sera jamais " "visible." -#: howto/curses.rst:209 +#: howto/curses.rst:211 #, fuzzy msgid "" "In practice, explicitly telling curses to redraw a window doesn't really " @@ -415,7 +418,7 @@ msgstr "" "appelant d'abord ``stdscr.refresh()`` ou la méthode :meth:`refresh` de la " "fenêtre adéquate." -#: howto/curses.rst:217 +#: howto/curses.rst:219 msgid "" "A pad is a special case of a window; it can be larger than the actual " "display screen, and only a portion of the pad displayed at a time. Creating " @@ -430,7 +433,7 @@ msgstr "" "devez fournir les coordonnées de la zone de l'écran où une partie du tampon " "sera affichée. ::" -#: howto/curses.rst:238 +#: howto/curses.rst:240 #, fuzzy msgid "" "The :meth:`!refresh` call displays a section of the pad in the rectangle " @@ -445,7 +448,7 @@ msgstr "" "tampon. À part cette différence, les tampons sont exactement comme les " "fenêtres ordinaires et gèrent les mêmes méthodes." -#: howto/curses.rst:244 +#: howto/curses.rst:246 #, fuzzy msgid "" "If you have multiple windows and pads on screen there is a more efficient " @@ -456,7 +459,7 @@ msgstr "" "plus efficace pour rafraîchir l'écran et éviter des scintillements agaçants " "à chaque mise à jour. :meth:`refresh` effectue en fait deux choses :" -#: howto/curses.rst:249 +#: howto/curses.rst:251 msgid "" "Calls the :meth:`~curses.window.noutrefresh` method of each window to update " "an underlying data structure representing the desired state of the screen." @@ -465,7 +468,7 @@ msgstr "" "pour mettre à jour les données sous-jacentes qui permettent d'obtenir " "l'affichage voulu ;" -#: howto/curses.rst:252 +#: howto/curses.rst:254 msgid "" "Calls the function :func:`~curses.doupdate` function to change the physical " "screen to match the desired state recorded in the data structure." @@ -473,7 +476,7 @@ msgstr "" "elle appelle la fonction :func:`~curses.doupdate` pour modifier l'écran " "physique afin de correspondre à l'état défini par les données sous-jacentes." -#: howto/curses.rst:255 +#: howto/curses.rst:257 #, fuzzy msgid "" "Instead you can call :meth:`!noutrefresh` on a number of windows to update " @@ -483,11 +486,11 @@ msgstr "" "voulez mettre à jour des données, puis :func:`doupdate` pour mettre à jour " "l'écran." -#: howto/curses.rst:261 +#: howto/curses.rst:263 msgid "Displaying Text" msgstr "Affichage de texte" -#: howto/curses.rst:263 +#: howto/curses.rst:265 #, fuzzy msgid "" "From a C programmer's point of view, curses may sometimes look like a twisty " @@ -500,47 +503,48 @@ msgid "" "coordinate." msgstr "" "D'un point de vue de programmeur C, *curses* peut parfois ressembler à un " -"enchevêtrement de fonctions, chacune ayant sa subtilité. Par exemple, :c:" -"func:`addstr` affiche une chaîne à la position actuelle du curseur de la " -"fenêtre ``stdscr``, alors que :c:func:`mvaddstr` se déplace d'abord " -"jusqu'aux coordonnées (y,x) avant d'afficher la chaîne. :c:func:`waddstr` " -"est comme :c:func:`addstr`, mais permet de spécifier la fenêtre au lieu " -"d'utiliser ``stdscr`` par défaut. :c:func:`mvwaddstr` permet de spécifier à " -"la fois les coordonnées et la fenêtre." +"enchevêtrement de fonctions, chacune ayant sa subtilité. Par " +"exemple, :c:func:`addstr` affiche une chaîne à la position actuelle du " +"curseur de la fenêtre ``stdscr``, alors que :c:func:`mvaddstr` se déplace " +"d'abord jusqu'aux coordonnées (y,x) avant d'afficher la " +"chaîne. :c:func:`waddstr` est comme :c:func:`addstr`, mais permet de " +"spécifier la fenêtre au lieu d'utiliser ``stdscr`` par " +"défaut. :c:func:`mvwaddstr` permet de spécifier à la fois les coordonnées et " +"la fenêtre." -#: howto/curses.rst:272 +#: howto/curses.rst:274 msgid "" "Fortunately the Python interface hides all these details. ``stdscr`` is a " -"window object like any other, and methods such as :meth:`~curses.window." -"addstr` accept multiple argument forms. Usually there are four different " -"forms." +"window object like any other, and methods such " +"as :meth:`~curses.window.addstr` accept multiple argument forms. Usually " +"there are four different forms." msgstr "" "Heureusement, l'interface Python masque tous ces détails. ``stdscr`` est un " -"objet fenêtre comme les autres et les méthodes telles que :meth:`~curses." -"window.addstr` acceptent leurs arguments sous de multiples formes, " -"habituellement quatre." +"objet fenêtre comme les autres et les méthodes telles " +"que :meth:`~curses.window.addstr` acceptent leurs arguments sous de " +"multiples formes, habituellement quatre." -#: howto/curses.rst:278 +#: howto/curses.rst:280 msgid "Form" msgstr "Forme" -#: howto/curses.rst:346 +#: howto/curses.rst:348 msgid "Description" msgstr "Description" -#: howto/curses.rst:280 +#: howto/curses.rst:282 msgid "*str* or *ch*" msgstr "*str* ou *ch*" -#: howto/curses.rst:280 +#: howto/curses.rst:282 msgid "Display the string *str* or character *ch* at the current position" msgstr "Affiche la chaîne *str* ou le caractère *ch* à la position actuelle" -#: howto/curses.rst:283 +#: howto/curses.rst:285 msgid "*str* or *ch*, *attr*" msgstr "*str* ou *ch*, *attr*" -#: howto/curses.rst:283 +#: howto/curses.rst:285 msgid "" "Display the string *str* or character *ch*, using attribute *attr* at the " "current position" @@ -548,21 +552,21 @@ msgstr "" "Affiche la chaîne *str* ou le caractère *ch*, en utilisant l'attribut *attr* " "à la position actuelle" -#: howto/curses.rst:287 +#: howto/curses.rst:289 msgid "*y*, *x*, *str* or *ch*" msgstr "*y*, *x*, *str* ou *ch*" -#: howto/curses.rst:287 +#: howto/curses.rst:289 msgid "Move to position *y,x* within the window, and display *str* or *ch*" msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch*" -#: howto/curses.rst:290 +#: howto/curses.rst:292 msgid "*y*, *x*, *str* or *ch*, *attr*" msgstr "*y*, *x*, *str* ou *ch*, *attr*" -#: howto/curses.rst:290 +#: howto/curses.rst:292 msgid "" "Move to position *y,x* within the window, and display *str* or *ch*, using " "attribute *attr*" @@ -570,7 +574,7 @@ msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch* en utilisant l'attribut *attr*" -#: howto/curses.rst:294 +#: howto/curses.rst:296 msgid "" "Attributes allow displaying text in highlighted forms such as boldface, " "underline, reverse code, or in color. They'll be explained in more detail " @@ -580,7 +584,7 @@ msgstr "" "vidéo inversé ou en couleur. Nous les voyons plus en détail dans la section " "suivante." -#: howto/curses.rst:299 +#: howto/curses.rst:301 #, fuzzy msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " @@ -595,7 +599,7 @@ msgstr "" "valeur de l'attribut :attr:`encoding` de la fenêtre ; c'est par défaut " "l'encodage du système tel que renvoyé par :func:`locale.getencoding`." -#: howto/curses.rst:305 +#: howto/curses.rst:307 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." @@ -604,7 +608,7 @@ msgstr "" "la forme d'une chaîne de longueur 1, d'une chaîne d'octets de longueur 1 ou " "d'un entier." -#: howto/curses.rst:308 +#: howto/curses.rst:310 msgid "" "Constants are provided for extension characters; these constants are " "integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " @@ -617,7 +621,7 @@ msgstr "" "haut et à gauche d'une boîte (utile pour dessiner des encadrements). Vous " "pouvez aussi utiliser les caractères Unicode adéquats." -#: howto/curses.rst:314 +#: howto/curses.rst:316 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -636,12 +640,12 @@ msgstr "" "l'utilisateur (il peut être déroutant d'avoir un curseur qui clignote à des " "endroits apparemment aléatoires)." -#: howto/curses.rst:322 +#: howto/curses.rst:324 msgid "" "If your application doesn't need a blinking cursor at all, you can call " "``curs_set(False)`` to make it invisible. For compatibility with older " -"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" -"func:`~curses.curs_set`. When *bool* is true, the curses library will " +"curses versions, there's a ``leaveok(bool)`` function that's a synonym " +"for :func:`~curses.curs_set`. When *bool* is true, the curses library will " "attempt to suppress the flashing cursor, and you won't need to worry about " "leaving it in odd locations." msgstr "" @@ -653,11 +657,11 @@ msgstr "" "curseur clignotant et vous n'avez plus besoin de vous soucier de le laisser " "trainer à des endroits bizarres." -#: howto/curses.rst:331 +#: howto/curses.rst:333 msgid "Attributes and Color" msgstr "Attributs et couleurs" -#: howto/curses.rst:333 +#: howto/curses.rst:335 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -670,7 +674,7 @@ msgstr "" "À ces fins, *curses* vous permet de spécifier un attribut pour chaque " "caractère à l'écran." -#: howto/curses.rst:338 +#: howto/curses.rst:340 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -687,59 +691,59 @@ msgstr "" "se cantonner aux attributs les plus communément utilisés, dont la liste est " "fournie ci-dessous." -#: howto/curses.rst:346 +#: howto/curses.rst:348 msgid "Attribute" msgstr "Attribut" -#: howto/curses.rst:348 +#: howto/curses.rst:350 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: howto/curses.rst:348 +#: howto/curses.rst:350 msgid "Blinking text" msgstr "Texte clignotant" -#: howto/curses.rst:350 +#: howto/curses.rst:352 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: howto/curses.rst:350 +#: howto/curses.rst:352 msgid "Extra bright or bold text" msgstr "Texte en surbrillance ou en gras" -#: howto/curses.rst:352 +#: howto/curses.rst:354 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: howto/curses.rst:352 +#: howto/curses.rst:354 msgid "Half bright text" msgstr "Texte en demi-ton" -#: howto/curses.rst:354 +#: howto/curses.rst:356 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: howto/curses.rst:354 +#: howto/curses.rst:356 msgid "Reverse-video text" msgstr "Texte en mode vidéo inversé" -#: howto/curses.rst:356 +#: howto/curses.rst:358 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: howto/curses.rst:356 +#: howto/curses.rst:358 msgid "The best highlighting mode available" msgstr "Le meilleur mode de mis en valeur pour le texte" -#: howto/curses.rst:358 +#: howto/curses.rst:360 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: howto/curses.rst:358 +#: howto/curses.rst:360 msgid "Underlined text" msgstr "Texte souligné" -#: howto/curses.rst:361 +#: howto/curses.rst:363 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" @@ -747,7 +751,7 @@ msgstr "" "Ainsi, pour mettre la ligne de statut située en haut de l'écran en mode " "vidéo inversé, vous pouvez coder ::" -#: howto/curses.rst:368 +#: howto/curses.rst:370 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " @@ -757,7 +761,7 @@ msgstr "" "compatibles. Le plus répandu de ces terminaux est sûrement la console Linux, " "suivie par *xterm* en couleurs." -#: howto/curses.rst:372 +#: howto/curses.rst:374 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -768,23 +772,24 @@ msgid "" "to the British spelling, you'll have to resign yourself to misspelling it " "for the sake of these functions.)" msgstr "" -"Pour utiliser les couleurs, vous devez d'abord appeler la fonction :func:" -"`~curses.start_color` juste après avoir appelé :func:`~curses.initscr` afin " -"d'initialiser (la fonction :func:`curses.wrapper` le fait automatiquement). " -"Ensuite, la fonction :func:`~curses.has_colors` renvoie ``True`` si le " -"terminal utilisé gère les couleurs (note : *curses* utilise l'orthographe " -"américaine *color* et non pas l'orthographe britannique ou canadienne " -"*colour* ; si vous êtes habitué à l'orthographe britannique, vous devrez " -"vous résigner à mal l'orthographier tant que vous utilisez *curses*)." +"Pour utiliser les couleurs, vous devez d'abord appeler la " +"fonction :func:`~curses.start_color` juste après avoir " +"appelé :func:`~curses.initscr` afin d'initialiser (la " +"fonction :func:`curses.wrapper` le fait automatiquement). Ensuite, la " +"fonction :func:`~curses.has_colors` renvoie ``True`` si le terminal utilisé " +"gère les couleurs (note : *curses* utilise l'orthographe américaine *color* " +"et non pas l'orthographe britannique ou canadienne *colour* ; si vous êtes " +"habitué à l'orthographe britannique, vous devrez vous résigner à mal " +"l'orthographier tant que vous utilisez *curses*)." -#: howto/curses.rst:382 +#: howto/curses.rst:384 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " -"attribute value corresponding to a color pair with the :func:`~curses." -"color_pair` function; this can be bitwise-OR'ed with other attributes such " -"as :const:`A_REVERSE`, but again, such combinations are not guaranteed to " -"work on all terminals." +"attribute value corresponding to a color pair with " +"the :func:`~curses.color_pair` function; this can be bitwise-OR'ed with " +"other attributes such as :const:`A_REVERSE`, but again, such combinations " +"are not guaranteed to work on all terminals." msgstr "" "La bibliothèque *curses* maintient un nombre restreint de paires de " "couleurs, constituées d'une couleur de texte (*foreground*) et de fond " @@ -794,13 +799,13 @@ msgstr "" "autres attributs tels que :const:`A_REVERSE`,mais là encore, de telles " "combinaisons risquent de ne pas fonctionner sur tous les terminaux." -#: howto/curses.rst:389 +#: howto/curses.rst:391 msgid "An example, which displays a line of text using color pair 1::" msgstr "" "Un exemple d'affichage d'une ligne de texte en utilisant la paire de couleur " "1 ::" -#: howto/curses.rst:394 +#: howto/curses.rst:396 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -813,30 +818,31 @@ msgstr "" "texte à *f* et la couleur de fond à *b*. La paire de couleurs 0 est codée en " "dur à blanc sur noir et ne peut être modifiée." -#: howto/curses.rst:399 +#: howto/curses.rst:401 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " -"it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" -"blue, 5:magenta, 6:cyan, and 7:white. The :mod:`curses` module defines " -"named constants for each of these colors: :const:`curses.COLOR_BLACK`, :" -"const:`curses.COLOR_RED`, and so forth." +"it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, " +"4:blue, 5:magenta, 6:cyan, and 7:white. The :mod:`curses` module defines " +"named constants for each of these " +"colors: :const:`curses.COLOR_BLACK`, :const:`curses.COLOR_RED`, and so forth." msgstr "" "Les couleurs sont numérotées et :func:`start_color` initialise 8 couleurs " "basiques lors de l'activation du mode en couleurs. Ce sont : 0 pour noir " "(*black*), 1 pour rouge (*red*), 2 pour vert (*green*), 3 pour jaune " "(*yellow*), 4 pour bleu *(blue*), 5 pour magenta, 6 pour cyan et 7 pour " "blanc (*white*). Le module :mod:`curses` définit des constantes nommées pour " -"chacune de ces couleurs : :const:`curses.COLOR_BLACK`, :const:`curses." -"COLOR_RED` et ainsi de suite." +"chacune de ces " +"couleurs : :const:`curses.COLOR_BLACK`, :const:`curses.COLOR_RED` et ainsi " +"de suite." -#: howto/curses.rst:405 +#: howto/curses.rst:407 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" "Testons tout ça. Pour changer la couleur 1 à rouge sur fond blanc, appelez ::" -#: howto/curses.rst:410 +#: howto/curses.rst:412 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " @@ -846,48 +852,49 @@ msgstr "" "utilise cette paire de couleur voit les nouvelles couleurs s'appliquer à " "lui. Vous pouvez aussi afficher du nouveau texte dans cette couleur avec ::" -#: howto/curses.rst:416 +#: howto/curses.rst:418 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " "purple or blue or any other color you like. Unfortunately, the Linux " "console doesn't support this, so I'm unable to try it out, and can't provide " -"any examples. You can check if your terminal can do this by calling :func:" -"`~curses.can_change_color`, which returns ``True`` if the capability is " -"there. If you're lucky enough to have such a talented terminal, consult " -"your system's man pages for more information." +"any examples. You can check if your terminal can do this by " +"calling :func:`~curses.can_change_color`, which returns ``True`` if the " +"capability is there. If you're lucky enough to have such a talented " +"terminal, consult your system's man pages for more information." msgstr "" "Les terminaux « de luxe » peuvent définir les couleurs avec des valeurs " "*RGB*. Cela vous permet de modifier la couleur 1, habituellement rouge, en " "violet ou bleu voire toute autre couleur selon votre goût. Malheureusement, " "la console Linux ne gère pas cette fonctionnalité, je suis donc bien " "incapable de la tester et de vous en fournir un exemple. Vous pouvez " -"vérifier si votre terminal la prend en charge en appelant :func:`~curses." -"can_change_color`, qui renvoie ``True`` en cas de succès. Si vous avez la " -"chance d'avoir un terminal aussi perfectionné, consultez les pages du manuel " -"de votre système pour obtenir plus d'informations." +"vérifier si votre terminal la prend en charge en " +"appelant :func:`~curses.can_change_color`, qui renvoie ``True`` en cas de " +"succès. Si vous avez la chance d'avoir un terminal aussi perfectionné, " +"consultez les pages du manuel de votre système pour obtenir plus " +"d'informations." -#: howto/curses.rst:427 +#: howto/curses.rst:429 msgid "User Input" msgstr "Entrées de l'utilisateur" -#: howto/curses.rst:429 +#: howto/curses.rst:431 #, fuzzy msgid "" -"The C curses library offers only very simple input mechanisms. Python's :mod:" -"`curses` module adds a basic text-input widget. (Other libraries such as :" -"pypi:`Urwid` have more extensive collections of widgets.)" +"The C curses library offers only very simple input mechanisms. " +"Python's :mod:`curses` module adds a basic text-input widget. (Other " +"libraries such as :pypi:`Urwid` have more extensive collections of widgets.)" msgstr "" "La bibliothèque C *curses* ne propose que quelques mécanismes très simples " "pour les entrées. Le module :mod:`curses` y ajoute un *widget* basique " -"d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." +"d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." -#: howto/curses.rst:433 +#: howto/curses.rst:435 msgid "There are two methods for getting input from a window:" msgstr "Il y a deux méthodes pour obtenir des entrées dans une fenêtre :" -#: howto/curses.rst:435 +#: howto/curses.rst:437 msgid "" ":meth:`~curses.window.getch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " @@ -899,7 +906,7 @@ msgstr "" "appelé auparavant. Vous pouvez en option spécifier des coordonnées où " "positionner le curseur avant la mise en pause ;" -#: howto/curses.rst:440 +#: howto/curses.rst:442 msgid "" ":meth:`~curses.window.getkey` does the same thing but converts the integer " "to a string. Individual characters are returned as 1-character strings, and " @@ -912,17 +919,18 @@ msgstr "" "renvoient des chaînes plus longues contenant le nom de la touche (tel que " "``KEY_UP`` ou ``^G``)." -#: howto/curses.rst:445 +#: howto/curses.rst:447 #, fuzzy msgid "" -"It's possible to not wait for the user using the :meth:`~curses.window." -"nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" -"getkey` for the window become non-blocking. To signal that no input is " -"ready, :meth:`!getch` returns ``curses.ERR`` (a value of -1) and :meth:`!" -"getkey` raises an exception. There's also a :func:`~curses.halfdelay` " -"function, which can be used to (in effect) set a timer on each :meth:`!" -"getch`; if no input becomes available within a specified delay (measured in " -"tenths of a second), curses raises an exception." +"It's possible to not wait for the user using " +"the :meth:`~curses.window.nodelay` window method. After " +"``nodelay(True)``, :meth:`!getch` and :meth:`!getkey` for the window become " +"non-blocking. To signal that no input is ready, :meth:`!getch` returns " +"``curses.ERR`` (a value of -1) and :meth:`!getkey` raises an exception. " +"There's also a :func:`~curses.halfdelay` function, which can be used to (in " +"effect) set a timer on each :meth:`!getch`; if no input becomes available " +"within a specified delay (measured in tenths of a second), curses raises an " +"exception." msgstr "" "Il est possible de ne pas attendre l'utilisateur en utilisant la méthode de " "fenêtre :meth:`~curses.window.nodelay`. Après ``nodelay(True)``, les " @@ -934,25 +942,26 @@ msgstr "" "aucune entrée n'est disponible dans le délai spécifié (mesuré en dixièmes de " "seconde), *curses* lève une exception." -#: howto/curses.rst:455 +#: howto/curses.rst:457 #, fuzzy msgid "" "The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " "represents the ASCII code of the key pressed. Values greater than 255 are " "special keys such as Page Up, Home, or the cursor keys. You can compare the " -"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" -"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " -"program may look something like this::" +"value returned to constants such " +"as :const:`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, " +"or :const:`curses.KEY_LEFT`. The main loop of your program may look " +"something like this::" msgstr "" "La méthode :meth:`getch` renvoie un entier ; s'il est entre 0 et 255, c'est " "le code ASCII de la touche pressée. Les valeurs supérieures à 255 sont des " "touches spéciales telles que Page Précédente, Accueil ou les touches du " -"curseur. Vous pouvez comparer la valeur renvoyée aux constantes :const:" -"`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, :const:`curses.KEY_LEFT`, etc. " -"La boucle principale de votre programme pourrait ressembler à quelque chose " -"comme ::" +"curseur. Vous pouvez comparer la valeur renvoyée aux " +"constantes :const:`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, :const:`curses.KEY_LEFT`, " +"etc. La boucle principale de votre programme pourrait ressembler à quelque " +"chose comme ::" -#: howto/curses.rst:471 +#: howto/curses.rst:473 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -966,29 +975,31 @@ msgstr "" "classe ASCII ; elles peuvent s'avérer utile pour écrire du code plus lisible " "dans ce genre de boucles. Il fournit également des fonctions de conversion " "qui prennent un entier ou une chaîne de longueur 1 en entrée et renvoient le " -"type correspondant au nom de la fonction. Par exemple, :func:`curses.ascii." -"ctrl` renvoie le caractère de contrôle correspondant à son paramètre." +"type correspondant au nom de la fonction. Par " +"exemple, :func:`curses.ascii.ctrl` renvoie le caractère de contrôle " +"correspondant à son paramètre." -#: howto/curses.rst:478 +#: howto/curses.rst:480 msgid "" -"There's also a method to retrieve an entire string, :meth:`~curses.window." -"getstr`. It isn't used very often, because its functionality is quite " -"limited; the only editing keys available are the backspace key and the Enter " -"key, which terminates the string. It can optionally be limited to a fixed " -"number of characters. ::" +"There's also a method to retrieve an entire " +"string, :meth:`~curses.window.getstr`. It isn't used very often, because " +"its functionality is quite limited; the only editing keys available are the " +"backspace key and the Enter key, which terminates the string. It can " +"optionally be limited to a fixed number of characters. ::" msgstr "" -"Il existe aussi une méthode pour récupérer une chaîne entière, :meth:" -"`~curses.window.getstr`. Elle n'est pas beaucoup utilisée car son utilité " -"est limitée : les seules touches d'édition disponibles sont le retour " -"arrière et la touche Entrée, qui termine la chaîne. Elle peut, en option, " -"être limitée à un nombre fixé de caractères. ::" +"Il existe aussi une méthode pour récupérer une chaîne " +"entière, :meth:`~curses.window.getstr`. Elle n'est pas beaucoup utilisée car " +"son utilité est limitée : les seules touches d'édition disponibles sont le " +"retour arrière et la touche Entrée, qui termine la chaîne. Elle peut, en " +"option, être limitée à un nombre fixé de caractères. ::" -#: howto/curses.rst:489 +#: howto/curses.rst:491 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" -"like set of keybindings. Various methods of the :class:`~curses.textpad." -"Textbox` class support editing with input validation and gathering the edit " -"results either with or without trailing spaces. Here's an example::" +"like set of keybindings. Various methods of " +"the :class:`~curses.textpad.Textbox` class support editing with input " +"validation and gathering the edit results either with or without trailing " +"spaces. Here's an example::" msgstr "" "Le module :mod:`curses.textpad` fournit un type de boîte texte qui gère des " "touches de fonctions à la façon d'\\ *Emacs*. Plusieurs méthodes de la " @@ -996,18 +1007,18 @@ msgstr "" "des entrées et le regroupement de l'entrée avec ou sans les espaces de début " "et de fin. Par exemple ::" -#: howto/curses.rst:513 +#: howto/curses.rst:515 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" -"Consultez la documentation de la bibliothèque pour plus de détails sur :mod:" -"`curses.textpad`." +"Consultez la documentation de la bibliothèque pour plus de détails " +"sur :mod:`curses.textpad`." -#: howto/curses.rst:517 +#: howto/curses.rst:519 msgid "For More Information" msgstr "Pour aller plus loin" -#: howto/curses.rst:519 +#: howto/curses.rst:521 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -1016,18 +1027,18 @@ msgid "" msgstr "" "Ce guide pratique ne couvre pas certains sujets avancés, tels que la lecture " "du contenu de l'écran ou la capture des événements relatifs à la souris dans " -"une instance *xterm*, mais la page de la bibliothèque Python du module :mod:" -"`curses` est maintenant suffisamment complète. Nous vous encourageons à la " -"parcourir." +"une instance *xterm*, mais la page de la bibliothèque Python du " +"module :mod:`curses` est maintenant suffisamment complète. Nous vous " +"encourageons à la parcourir." -#: howto/curses.rst:524 +#: howto/curses.rst:526 #, fuzzy msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " "ncurses or a proprietary Unix vendor's. The manual pages will document any " -"quirks, and provide complete lists of all the functions, attributes, and :" -"ref:`ACS_\\* ` characters available to you." +"quirks, and provide complete lists of all the functions, attributes, " +"and :ref:`ACS_\\* ` characters available to you." msgstr "" "Si vous vous posez des questions sur le fonctionnement précis de fonctions " "*curses*, consultez les pages de manuel de l'implémentation *curses* de " @@ -1036,14 +1047,14 @@ msgstr "" "listes complètes des fonctions, attributs et codes :const:`ACS_\\*` des " "caractères disponibles." -#: howto/curses.rst:531 +#: howto/curses.rst:533 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " "but because no one has needed them yet. Also, Python doesn't yet support " "the menu library associated with ncurses. Patches adding support for these " -"would be welcome; see `the Python Developer's Guide `_ to learn more about submitting patches to Python." +"would be welcome; see `the Python Developer's Guide `_ to learn more about submitting patches to Python." msgstr "" "Étant donné que l'API *curses* est si volumineuse, certaines fonctions ne " "sont pas prises en charge dans l'interface Python. Souvent, ce n'est pas " @@ -1054,7 +1065,7 @@ msgstr "" "du développeur Python `_ pour apprendre " "comment soumettre des améliorations à Python." -#: howto/curses.rst:539 +#: howto/curses.rst:541 #, fuzzy msgid "" "`Writing Programs with NCURSES `_ : un long tutoriel pour les programmeurs C (ressource en " "anglais)." -#: howto/curses.rst:541 +#: howto/curses.rst:543 msgid "`The ncurses man page `_" msgstr "`La page de manuel ncurses `_" -#: howto/curses.rst:542 +#: howto/curses.rst:544 #, fuzzy msgid "" "`The ncurses FAQ `_" @@ -1076,7 +1087,7 @@ msgstr "" "`La FAQ ncurses `_ " "(ressource en anglais)" -#: howto/curses.rst:543 +#: howto/curses.rst:545 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " @@ -1086,7 +1097,7 @@ msgstr "" "v=eN1eZtjLEnU>`_ : vidéo d'une conférence lors de la PyCon 2013 sur la " "gestion des terminaux à l'aide de *curses* et *Urwid* (vidéo en anglais)." -#: howto/curses.rst:545 +#: howto/curses.rst:547 #, fuzzy msgid "" "`\"Console Applications with Urwid\" \n" @@ -87,14 +87,16 @@ msgstr "" msgid "" "The last section has pure Python equivalents for built-in descriptors that " "are written in C. Read this if you're curious about how functions turn into " -"bound methods or about the implementation of common tools like :func:" -"`classmethod`, :func:`staticmethod`, :func:`property`, and :term:`__slots__`." +"bound methods or about the implementation of common tools " +"like :func:`classmethod`, :func:`staticmethod`, :func:`property`, " +"and :term:`__slots__`." msgstr "" "la dernière partie contient des équivalents en pur Python des descripteurs " "natifs écrits en C. Lisez ceci si vous êtes curieux de savoir comment les " "fonctions se transforment en méthodes liées ou si vous voulez connaître " -"l'implémentation d'outils courants comme :func:`classmethod`, :func:" -"`staticmethod`, :func:`property` et :term:`__slots__`." +"l'implémentation d'outils courants " +"comme :func:`classmethod`, :func:`staticmethod`, :func:`property` " +"et :term:`__slots__`." #: howto/descriptor.rst:36 msgid "Primer" @@ -113,9 +115,10 @@ msgid "Simple example: A descriptor that returns a constant" msgstr "Un exemple simple : un descripteur qui renvoie une constante" #: howto/descriptor.rst:45 +#, fuzzy msgid "" -"The :class:`Ten` class is a descriptor whose :meth:`__get__` method always " -"returns the constant ``10``:" +"The :class:`!Ten` class is a descriptor whose :meth:`~object.__get__` method " +"always returns the constant ``10``:" msgstr "" "La classe :class:`Ten` est un descripteur dont la méthode :meth:`__get__` " "renvoie toujours la constante ``10`` :" @@ -194,13 +197,14 @@ msgstr "" "des réponses différentes, mises à jour à chaque fois ::" #: howto/descriptor.rst:122 +#, fuzzy msgid "" "Besides showing how descriptors can run computations, this example also " -"reveals the purpose of the parameters to :meth:`__get__`. The *self* " -"parameter is *size*, an instance of *DirectorySize*. The *obj* parameter is " -"either *g* or *s*, an instance of *Directory*. It is the *obj* parameter " -"that lets the :meth:`__get__` method learn the target directory. The " -"*objtype* parameter is the class *Directory*." +"reveals the purpose of the parameters to :meth:`~object.__get__`. The " +"*self* parameter is *size*, an instance of *DirectorySize*. The *obj* " +"parameter is either *g* or *s*, an instance of *Directory*. It is the *obj* " +"parameter that lets the :meth:`~object.__get__` method learn the target " +"directory. The *objtype* parameter is the class *Directory*." msgstr "" "En plus de montrer comment les descripteurs peuvent exécuter des calculs, " "cet exemple révèle également le but des paramètres de :meth:`__get__`. Le " @@ -214,19 +218,21 @@ msgid "Managed attributes" msgstr "Attributs gérés" #: howto/descriptor.rst:133 +#, fuzzy msgid "" "A popular use for descriptors is managing access to instance data. The " "descriptor is assigned to a public attribute in the class dictionary while " "the actual data is stored as a private attribute in the instance " -"dictionary. The descriptor's :meth:`__get__` and :meth:`__set__` methods " -"are triggered when the public attribute is accessed." +"dictionary. The descriptor's :meth:`~object.__get__` " +"and :meth:`~object.__set__` methods are triggered when the public attribute " +"is accessed." msgstr "" "Une utilisation courante des descripteurs est la gestion de l'accès aux " "données d'instances. Le descripteur est affecté à un attribut public dans le " "dictionnaire de classe tandis que les données réelles sont stockées en tant " -"qu'attribut privé dans le dictionnaire d'instance. Les méthodes :meth:" -"`__get__` et :meth:`__set__` du descripteur sont déclenchées lors de l'accès " -"à l'attribut public." +"qu'attribut privé dans le dictionnaire d'instance. Les " +"méthodes :meth:`__get__` et :meth:`__set__` du descripteur sont déclenchées " +"lors de l'accès à l'attribut public." #: howto/descriptor.rst:139 msgid "" @@ -272,11 +278,12 @@ msgstr "" "descripteur du nom de variable utilisé." #: howto/descriptor.rst:218 +#, fuzzy msgid "" -"In this example, the :class:`Person` class has two descriptor instances, " -"*name* and *age*. When the :class:`Person` class is defined, it makes a " -"callback to :meth:`__set_name__` in *LoggedAccess* so that the field names " -"can be recorded, giving each descriptor its own *public_name* and " +"In this example, the :class:`!Person` class has two descriptor instances, " +"*name* and *age*. When the :class:`!Person` class is defined, it makes a " +"callback to :meth:`~object.__set_name__` in *LoggedAccess* so that the field " +"names can be recorded, giving each descriptor its own *public_name* and " "*private_name*:" msgstr "" "Dans cet exemple, la classe :class:`Person` a deux instances de " @@ -286,14 +293,17 @@ msgstr "" "donnant à chaque descripteur ses propres *public_name* et *private_name* :" #: howto/descriptor.rst:256 +#, fuzzy msgid "" -"An interactive session shows that the :class:`Person` class has called :meth:" -"`__set_name__` so that the field names would be recorded. Here we call :" -"func:`vars` to look up the descriptor without triggering it:" +"An interactive session shows that the :class:`!Person` class has " +"called :meth:`~object.__set_name__` so that the field names would be " +"recorded. Here we call :func:`vars` to look up the descriptor without " +"triggering it:" msgstr "" -"Une session interactive montre que la classe :class:`Person` a appelé :meth:" -"`__set_name__` pour que les noms des champs soient enregistrés. Ici, nous " -"appelons :func:`vars` pour rechercher le descripteur sans le déclencher :" +"Une session interactive montre que la classe :class:`Person` a " +"appelé :meth:`__set_name__` pour que les noms des champs soient enregistrés. " +"Ici, nous appelons :func:`vars` pour rechercher le descripteur sans le " +"déclencher :" #: howto/descriptor.rst:267 msgid "The new class now logs access to both *name* and *age*:" @@ -309,25 +319,29 @@ msgid "Closing thoughts" msgstr "Réflexions finales" #: howto/descriptor.rst:297 +#, fuzzy msgid "" -"A :term:`descriptor` is what we call any object that defines :meth:" -"`__get__`, :meth:`__set__`, or :meth:`__delete__`." +"A :term:`descriptor` is what we call any object that " +"defines :meth:`~object.__get__`, :meth:`~object.__set__`, " +"or :meth:`~object.__delete__`." msgstr "" -"Nous appelons :term:`descripteur ` tout objet qui définit :meth:" -"`__get__`, :meth:`__set__` ou :meth:`__delete__`." +"Nous appelons :term:`descripteur ` tout objet qui " +"définit :meth:`__get__`, :meth:`__set__` ou :meth:`__delete__`." #: howto/descriptor.rst:300 +#, fuzzy msgid "" -"Optionally, descriptors can have a :meth:`__set_name__` method. This is " -"only used in cases where a descriptor needs to know either the class where " -"it was created or the name of class variable it was assigned to. (This " -"method, if present, is called even if the class is not a descriptor.)" +"Optionally, descriptors can have a :meth:`~object.__set_name__` method. " +"This is only used in cases where a descriptor needs to know either the class " +"where it was created or the name of class variable it was assigned to. " +"(This method, if present, is called even if the class is not a descriptor.)" msgstr "" -"Facultativement, les descripteurs peuvent avoir une méthode :meth:" -"`__set_name__`. Elle n'est utile que dans les cas où un descripteur doit " -"connaître soit la classe dans laquelle il a été créé, soit le nom de la " -"variable de classe à laquelle il a été affecté (cette méthode, si elle est " -"présente, est appelée même si la classe n'est pas un descripteur)." +"Facultativement, les descripteurs peuvent avoir une " +"méthode :meth:`__set_name__`. Elle n'est utile que dans les cas où un " +"descripteur doit connaître soit la classe dans laquelle il a été créé, soit " +"le nom de la variable de classe à laquelle il a été affecté (cette méthode, " +"si elle est présente, est appelée même si la classe n'est pas un " +"descripteur)." #: howto/descriptor.rst:305 msgid "" @@ -371,14 +385,15 @@ msgstr "" #: howto/descriptor.rst:319 msgid "" "Descriptors are used throughout the language. It is how functions turn into " -"bound methods. Common tools like :func:`classmethod`, :func:" -"`staticmethod`, :func:`property`, and :func:`functools.cached_property` are " -"all implemented as descriptors." +"bound methods. Common tools " +"like :func:`classmethod`, :func:`staticmethod`, :func:`property`, " +"and :func:`functools.cached_property` are all implemented as descriptors." msgstr "" "Les descripteurs sont utilisés partout dans le langage. C'est ainsi que les " -"fonctions se transforment en méthodes liées. Les outils courants tels que :" -"func:`classmethod`, :func:`staticmethod`, :func:`property` et :func:" -"`functools.cached_property` sont tous implémentés en tant que descripteurs." +"fonctions se transforment en méthodes liées. Les outils courants tels " +"que :func:`classmethod`, :func:`staticmethod`, :func:`property` " +"et :func:`functools.cached_property` sont tous implémentés en tant que " +"descripteurs." #: howto/descriptor.rst:326 msgid "Complete Practical Example" @@ -410,17 +425,19 @@ msgstr "" "la source." #: howto/descriptor.rst:340 +#, fuzzy msgid "" -"This :class:`Validator` class is both an :term:`abstract base class` and a " +"This :class:`!Validator` class is both an :term:`abstract base class` and a " "managed attribute descriptor:" msgstr "" "Cette classe :class:`Validator` est à la fois une :term:`classe mère " "abstraite ` et un descripteur d'attributs gérés :" #: howto/descriptor.rst:363 +#, fuzzy msgid "" -"Custom validators need to inherit from :class:`Validator` and must supply a :" -"meth:`validate` method to test various restrictions as needed." +"Custom validators need to inherit from :class:`!Validator` and must supply " +"a :meth:`!validate` method to test various restrictions as needed." msgstr "" "Les validateurs personnalisés doivent hériter de :class:`Validator` et " "doivent fournir une méthode :meth:`validate` pour tester diverses " @@ -435,25 +452,28 @@ msgid "Here are three practical data validation utilities:" msgstr "Voici trois utilitaires concrets de validation de données :" #: howto/descriptor.rst:372 +#, fuzzy msgid "" -":class:`OneOf` verifies that a value is one of a restricted set of options." +":class:`!OneOf` verifies that a value is one of a restricted set of options." msgstr "" ":class:`OneOf` vérifie qu'une valeur fait partie d'un ensemble limité de " "valeurs ;" #: howto/descriptor.rst:374 +#, fuzzy msgid "" -":class:`Number` verifies that a value is either an :class:`int` or :class:" -"`float`. Optionally, it verifies that a value is between a given minimum or " -"maximum." +":class:`!Number` verifies that a value is either an :class:`int` " +"or :class:`float`. Optionally, it verifies that a value is between a given " +"minimum or maximum." msgstr "" -":class:`Number` vérifie qu'une valeur est soit un :class:`int` soit un :" -"class:`float`. Facultativement, il vérifie qu'une valeur se situe entre un " -"minimum ou un maximum donnés ;" +":class:`Number` vérifie qu'une valeur est soit un :class:`int` soit " +"un :class:`float`. Facultativement, il vérifie qu'une valeur se situe entre " +"un minimum ou un maximum donnés ;" #: howto/descriptor.rst:378 +#, fuzzy msgid "" -":class:`String` verifies that a value is a :class:`str`. Optionally, it " +":class:`!String` verifies that a value is a :class:`str`. Optionally, it " "validates a given minimum or maximum length. It can validate a user-defined " "`predicate `_ " "as well." @@ -516,16 +536,18 @@ msgid "Definition and introduction" msgstr "Définition et introduction" #: howto/descriptor.rst:503 +#, fuzzy msgid "" "In general, a descriptor is an attribute value that has one of the methods " -"in the descriptor protocol. Those methods are :meth:`__get__`, :meth:" -"`__set__`, and :meth:`__delete__`. If any of those methods are defined for " -"an attribute, it is said to be a :term:`descriptor`." +"in the descriptor protocol. Those methods " +"are :meth:`~object.__get__`, :meth:`~object.__set__`, " +"and :meth:`~object.__delete__`. If any of those methods are defined for an " +"attribute, it is said to be a :term:`descriptor`." msgstr "" "En général, un descripteur est la valeur d'un attribut qui possède une des " -"méthodes définies dans le « protocole descripteur ». Ces méthodes sont : :" -"meth:`__get__`, :meth:`__set__` et :meth:`__delete__`. Si l'une de ces " -"méthodes est définie pour un attribut, il s'agit d'un :term:`descripteur " +"méthodes définies dans le « protocole descripteur ». Ces méthodes " +"sont : :meth:`__get__`, :meth:`__set__` et :meth:`__delete__`. Si l'une de " +"ces méthodes est définie pour un attribut, il s'agit d'un :term:`descripteur " "`." #: howto/descriptor.rst:508 @@ -541,22 +563,22 @@ msgid "" msgstr "" "Le comportement par défaut pour l'accès aux attributs consiste à obtenir, " "définir ou supprimer l'attribut dans le dictionnaire d'un objet. Par " -"exemple, pour chercher ``a.x`` Python commence par chercher ``a." -"__dict__['x']``, puis ``type(a).__dict__['x']``, et continue la recherche en " -"utilisant la MRO (l'ordre de résolution des méthodes) de ``type(a)``. Si la " -"valeur recherchée est un objet définissant l'une des méthodes de " -"descripteur, Python remplace le comportement par défaut par un appel à la " -"méthode du descripteur. Le moment où cela se produit dans la chaîne de " -"recherche dépend des méthodes définies par le descripteur." +"exemple, pour chercher ``a.x`` Python commence par chercher " +"``a.__dict__['x']``, puis ``type(a).__dict__['x']``, et continue la " +"recherche en utilisant la MRO (l'ordre de résolution des méthodes) de " +"``type(a)``. Si la valeur recherchée est un objet définissant l'une des " +"méthodes de descripteur, Python remplace le comportement par défaut par un " +"appel à la méthode du descripteur. Le moment où cela se produit dans la " +"chaîne de recherche dépend des méthodes définies par le descripteur." #: howto/descriptor.rst:517 #, fuzzy msgid "" "Descriptors are a powerful, general purpose protocol. They are the " -"mechanism behind properties, methods, static methods, class methods, and :" -"func:`super`. They are used throughout Python itself. Descriptors simplify " -"the underlying C code and offer a flexible set of new tools for everyday " -"Python programs." +"mechanism behind properties, methods, static methods, class methods, " +"and :func:`super`. They are used throughout Python itself. Descriptors " +"simplify the underlying C code and offer a flexible set of new tools for " +"everyday Python programs." msgstr "" "Les descripteurs sont un protocole puissant et à usage général. Ils " "constituent le mécanisme qui met en œuvre les propriétés, les méthodes, les " @@ -596,16 +618,18 @@ msgstr "" "qu'attribut." #: howto/descriptor.rst:537 +#, fuzzy msgid "" -"If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered " -"a data descriptor. Descriptors that only define :meth:`__get__` are called " -"non-data descriptors (they are often used for methods but other uses are " -"possible)." +"If an object defines :meth:`~object.__set__` or :meth:`~object.__delete__`, " +"it is considered a data descriptor. Descriptors that only " +"define :meth:`~object.__get__` are called non-data descriptors (they are " +"often used for methods but other uses are possible)." msgstr "" "Si un objet définit :meth:`__set__` ou :meth:`__delete__`, il est considéré " -"comme un descripteur de données. Les descripteurs qui ne définissent que :" -"meth:`__get__` sont appelés descripteurs hors-données (ils sont généralement " -"utilisés pour des méthodes mais d'autres utilisations sont possibles)." +"comme un descripteur de données. Les descripteurs qui ne définissent " +"que :meth:`__get__` sont appelés descripteurs hors-données (ils sont " +"généralement utilisés pour des méthodes mais d'autres utilisations sont " +"possibles)." #: howto/descriptor.rst:542 msgid "" @@ -624,17 +648,19 @@ msgstr "" "données, l'entrée du dictionnaire a la priorité." #: howto/descriptor.rst:548 +#, fuzzy msgid "" -"To make a read-only data descriptor, define both :meth:`__get__` and :meth:" -"`__set__` with the :meth:`__set__` raising an :exc:`AttributeError` when " -"called. Defining the :meth:`__set__` method with an exception raising " -"placeholder is enough to make it a data descriptor." +"To make a read-only data descriptor, define both :meth:`~object.__get__` " +"and :meth:`~object.__set__` with the :meth:`~object.__set__` raising " +"an :exc:`AttributeError` when called. Defining the :meth:`~object.__set__` " +"method with an exception raising placeholder is enough to make it a data " +"descriptor." msgstr "" -"Pour créer un descripteur de données en lecture seule, définissez à la fois :" -"meth:`__get__` et :meth:`__set__` avec :meth:`__set__` levant une erreur :" -"exc:`AttributeError` quand elle est appelée. Définir la méthode :meth:" -"`__set__` ne faisant que lever cette exception est suffisant pour en faire " -"un descripteur de données." +"Pour créer un descripteur de données en lecture seule, définissez à la " +"fois :meth:`__get__` et :meth:`__set__` avec :meth:`__set__` levant une " +"erreur :exc:`AttributeError` quand elle est appelée. Définir la " +"méthode :meth:`__set__` ne faisant que lever cette exception est suffisant " +"pour en faire un descripteur de données." #: howto/descriptor.rst:555 msgid "Overview of descriptor invocation" @@ -642,8 +668,8 @@ msgstr "Présentation de l'appel de descripteur" #: howto/descriptor.rst:557 msgid "" -"A descriptor can be called directly with ``desc.__get__(obj)`` or ``desc." -"__get__(None, cls)``." +"A descriptor can be called directly with ``desc.__get__(obj)`` or " +"``desc.__get__(None, cls)``." msgstr "" "Un descripteur peut être appelé directement par ``desc.__get__(obj)`` ou " "``desc.__get__(None, cls)``." @@ -682,11 +708,12 @@ msgid "Invocation from an instance" msgstr "Appel depuis une instance" #: howto/descriptor.rst:575 +#, fuzzy msgid "" "Instance lookup scans through a chain of namespaces giving data descriptors " "the highest priority, followed by instance variables, then non-data " -"descriptors, then class variables, and lastly :meth:`__getattr__` if it is " -"provided." +"descriptors, then class variables, and lastly :meth:`~object.__getattr__` if " +"it is provided." msgstr "" "La recherche d'instance consiste à parcourir la liste d'espaces de noms en " "donnant aux descripteurs de données la priorité la plus élevée, suivis des " @@ -695,57 +722,62 @@ msgstr "" #: howto/descriptor.rst:580 msgid "" -"If a descriptor is found for ``a.x``, then it is invoked with: ``desc." -"__get__(a, type(a))``." +"If a descriptor is found for ``a.x``, then it is invoked with: " +"``desc.__get__(a, type(a))``." msgstr "" -"Si un descripteur est trouvé pour ``a.x``, alors il est appelé par ``desc." -"__get__(a, type(a))``." +"Si un descripteur est trouvé pour ``a.x``, alors il est appelé par " +"``desc.__get__(a, type(a))``." #: howto/descriptor.rst:583 msgid "" "The logic for a dotted lookup is in :meth:`object.__getattribute__`. Here " "is a pure Python equivalent:" msgstr "" -"La logique d'une recherche « après un point » se trouve dans :meth:`object." -"__getattribute__`. Voici un équivalent en Python pur :" +"La logique d'une recherche « après un point » se trouve " +"dans :meth:`object.__getattribute__`. Voici un équivalent en Python pur :" #: howto/descriptor.rst:722 +#, fuzzy msgid "" -"Note, there is no :meth:`__getattr__` hook in the :meth:`__getattribute__` " -"code. That is why calling :meth:`__getattribute__` directly or with " -"``super().__getattribute__`` will bypass :meth:`__getattr__` entirely." +"Note, there is no :meth:`~object.__getattr__` hook in " +"the :meth:`~object.__getattribute__` code. That is why " +"calling :meth:`~object.__getattribute__` directly or with " +"``super().__getattribute__`` will bypass :meth:`~object.__getattr__` " +"entirely." msgstr "" -"Notez qu'il n'y a pas d'appel vers :meth:`__getattr__` dans le code de :meth:" -"`__getattribute__`. C'est pourquoi appeler :meth:`__getattribute__` " -"directement ou avec ``super().__getattribute__`` contourne entièrement :meth:" -"`__getattr__`." +"Notez qu'il n'y a pas d'appel vers :meth:`__getattr__` dans le code " +"de :meth:`__getattribute__`. C'est pourquoi appeler :meth:`__getattribute__` " +"directement ou avec ``super().__getattribute__`` contourne " +"entièrement :meth:`__getattr__`." #: howto/descriptor.rst:726 +#, fuzzy msgid "" "Instead, it is the dot operator and the :func:`getattr` function that are " -"responsible for invoking :meth:`__getattr__` whenever :meth:" -"`__getattribute__` raises an :exc:`AttributeError`. Their logic is " -"encapsulated in a helper function:" +"responsible for invoking :meth:`~object.__getattr__` " +"whenever :meth:`~object.__getattribute__` raises an :exc:`AttributeError`. " +"Their logic is encapsulated in a helper function:" msgstr "" "Au lieu, c'est l'opérateur « point » et la fonction :func:`getattr` qui sont " -"responsables de l'appel de :meth:`__getattr__` chaque fois que :meth:" -"`__getattribute__` déclenche une :exc:`AttributeError`. Cette logique est " -"présentée encapsulée dans une fonction utilitaire :" +"responsables de l'appel de :meth:`__getattr__` chaque fois " +"que :meth:`__getattribute__` déclenche une :exc:`AttributeError`. Cette " +"logique est présentée encapsulée dans une fonction utilitaire :" #: howto/descriptor.rst:776 msgid "Invocation from a class" msgstr "Appel depuis une classe" #: howto/descriptor.rst:778 +#, fuzzy msgid "" -"The logic for a dotted lookup such as ``A.x`` is in :meth:`type." -"__getattribute__`. The steps are similar to those for :meth:`object." -"__getattribute__` but the instance dictionary lookup is replaced by a search " -"through the class's :term:`method resolution order`." +"The logic for a dotted lookup such as ``A.x`` is in :meth:`!" +"type.__getattribute__`. The steps are similar to those for :meth:`!" +"object.__getattribute__` but the instance dictionary lookup is replaced by a " +"search through the class's :term:`method resolution order`." msgstr "" "La logique pour une recherche « après un point » telle que ``A.x`` se trouve " -"dans :meth:`type.__getattribute__`. Les étapes sont similaires à celles de :" -"meth:`object.__getattribute__` mais la recherche dans le dictionnaire " +"dans :meth:`type.__getattribute__`. Les étapes sont similaires à celles " +"de :meth:`object.__getattribute__` mais la recherche dans le dictionnaire " "d'instance est remplacée par une recherche suivant l':term:`ordre de " "résolution des méthodes ` de la classe." @@ -757,8 +789,8 @@ msgstr "" #: howto/descriptor.rst:785 #, fuzzy msgid "" -"The full C implementation can be found in :c:func:`!type_getattro` and :c:" -"func:`!_PyType_Lookup` in :source:`Objects/typeobject.c`." +"The full C implementation can be found in :c:func:`!type_getattro` " +"and :c:func:`!_PyType_Lookup` in :source:`Objects/typeobject.c`." msgstr "" "L'implémentation C complète peut être trouvée dans :c:func:`type_getattro()` " "et :c:func:`_PyType_Lookup()` dans :source:`Objects/typeobject.c`." @@ -770,36 +802,37 @@ msgstr "Appel depuis super" #: howto/descriptor.rst:792 #, fuzzy msgid "" -"The logic for super's dotted lookup is in the :meth:`__getattribute__` " -"method for object returned by :func:`super`." +"The logic for super's dotted lookup is in " +"the :meth:`~object.__getattribute__` method for object returned " +"by :func:`super`." msgstr "" "La logique de la recherche « après un point » de super se trouve dans la " "méthode :meth:`__getattribute__` de l'objet renvoyé par :class:`super()`." #: howto/descriptor.rst:795 msgid "" -"A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__." -"__mro__`` for the base class ``B`` immediately following ``A`` and then " -"returns ``B.__dict__['m'].__get__(obj, A)``. If not a descriptor, ``m`` is " -"returned unchanged." +"A dotted lookup such as ``super(A, obj).m`` searches " +"``obj.__class__.__mro__`` for the base class ``B`` immediately following " +"``A`` and then returns ``B.__dict__['m'].__get__(obj, A)``. If not a " +"descriptor, ``m`` is returned unchanged." msgstr "" -"La recherche d'attribut ``super(A, obj).m`` recherche dans ``obj.__class__." -"__mro__`` la classe ``B`` qui suit immédiatement A, et renvoie ``B." -"__dict__['m'].__get__(obj, A)``. Si ce n'est pas un descripteur, ``m`` est " -"renvoyé inchangé." +"La recherche d'attribut ``super(A, obj).m`` recherche dans " +"``obj.__class__.__mro__`` la classe ``B`` qui suit immédiatement A, et " +"renvoie ``B.__dict__['m'].__get__(obj, A)``. Si ce n'est pas un descripteur, " +"``m`` est renvoyé inchangé." #: howto/descriptor.rst:800 #, fuzzy msgid "" -"The full C implementation can be found in :c:func:`!super_getattro` in :" -"source:`Objects/typeobject.c`. A pure Python equivalent can be found in " +"The full C implementation can be found in :c:func:`!super_getattro` " +"in :source:`Objects/typeobject.c`. A pure Python equivalent can be found in " "`Guido's Tutorial `_." msgstr "" -"L'implémentation C complète est dans :c:func:`super_getattro()` dans :source:" -"`Objects/typeobject.c`. Un équivalent Python pur peut être trouvé dans " -"`Guido's Tutorial `_ (page en anglais)." +"L'implémentation C complète est dans :c:func:`super_getattro()` " +"dans :source:`Objects/typeobject.c`. Un équivalent Python pur peut être " +"trouvé dans `Guido's Tutorial `_ (page en anglais)." #: howto/descriptor.rst:807 msgid "Summary of invocation logic" @@ -808,43 +841,48 @@ msgstr "Résumé de la logique d'appel" #: howto/descriptor.rst:809 #, fuzzy msgid "" -"The mechanism for descriptors is embedded in the :meth:`__getattribute__` " -"methods for :class:`object`, :class:`type`, and :func:`super`." +"The mechanism for descriptors is embedded in " +"the :meth:`~object.__getattribute__` methods " +"for :class:`object`, :class:`type`, and :func:`super`." msgstr "" -"Le fonctionnement des descripteurs se trouve dans les méthodes :meth:" -"`__getattribute__()` de :class:`object`, :class:`type` et :func:`super`." +"Le fonctionnement des descripteurs se trouve dans les " +"méthodes :meth:`__getattribute__()` de :class:`object`, :class:`type` " +"et :func:`super`." #: howto/descriptor.rst:812 msgid "The important points to remember are:" msgstr "Les points importants à retenir sont :" #: howto/descriptor.rst:814 -msgid "Descriptors are invoked by the :meth:`__getattribute__` method." +#, fuzzy +msgid "Descriptors are invoked by the :meth:`~object.__getattribute__` method." msgstr "" "les descripteurs sont appelés par la méthode :meth:`__getattribute__` ;" #: howto/descriptor.rst:816 msgid "" -"Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" -"`super`." +"Classes inherit this machinery from :class:`object`, :class:`type`, " +"or :func:`super`." msgstr "" -"les classes héritent ce mécanisme de :class:`object`, :class:`type` ou :func:" -"`super` ;" +"les classes héritent ce mécanisme de :class:`object`, :class:`type` " +"ou :func:`super` ;" #: howto/descriptor.rst:819 +#, fuzzy msgid "" -"Overriding :meth:`__getattribute__` prevents automatic descriptor calls " -"because all the descriptor logic is in that method." +"Overriding :meth:`~object.__getattribute__` prevents automatic descriptor " +"calls because all the descriptor logic is in that method." msgstr "" "redéfinir :meth:`__getattribute____` empêche les appels automatiques de " "descripteur car toute la logique des descripteurs est dans cette méthode ;" #: howto/descriptor.rst:822 +#, fuzzy msgid "" -":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " -"different calls to :meth:`__get__`. The first includes the instance and may " -"include the class. The second puts in ``None`` for the instance and always " -"includes the class." +":meth:`!object.__getattribute__` and :meth:`!type.__getattribute__` make " +"different calls to :meth:`~object.__get__`. The first includes the instance " +"and may include the class. The second puts in ``None`` for the instance and " +"always includes the class." msgstr "" ":meth:`objet.__getattribute__` et :meth:`type.__getattribute__` font " "différents appels à :meth:`__get__`. La première inclut l'instance et peut " @@ -868,21 +906,23 @@ msgid "Automatic name notification" msgstr "Notification automatique des noms" #: howto/descriptor.rst:835 +#, fuzzy msgid "" "Sometimes it is desirable for a descriptor to know what class variable name " "it was assigned to. When a new class is created, the :class:`type` " "metaclass scans the dictionary of the new class. If any of the entries are " -"descriptors and if they define :meth:`__set_name__`, that method is called " -"with two arguments. The *owner* is the class where the descriptor is used, " -"and the *name* is the class variable the descriptor was assigned to." +"descriptors and if they define :meth:`~object.__set_name__`, that method is " +"called with two arguments. The *owner* is the class where the descriptor is " +"used, and the *name* is the class variable the descriptor was assigned to." msgstr "" "Il est parfois souhaitable qu'un descripteur sache à quel nom de variable de " "classe il a été affecté. Lorsqu'une nouvelle classe est créée, la " "métaclasse :class:`type` parcourt le dictionnaire de la nouvelle classe. Si " -"l'une des entrées est un descripteur et si elle définit :meth:" -"`__set_name__`, cette méthode est appelée avec deux arguments : *owner* " -"(propriétaire) est la classe où le descripteur est utilisé, et *name* est la " -"variable de classe à laquelle le descripteur a été assigné." +"l'une des entrées est un descripteur et si elle " +"définit :meth:`__set_name__`, cette méthode est appelée avec deux " +"arguments : *owner* (propriétaire) est la classe où le descripteur est " +"utilisé, et *name* est la variable de classe à laquelle le descripteur a été " +"assigné." #: howto/descriptor.rst:842 #, fuzzy @@ -890,14 +930,15 @@ msgid "" "The implementation details are in :c:func:`!type_new` and :c:func:`!" "set_names` in :source:`Objects/typeobject.c`." msgstr "" -"Les détails d'implémentation sont dans :c:func:`type_new()` et :c:func:" -"`set_names()` dans :source:`Objects/typeobject.c`." +"Les détails d'implémentation sont dans :c:func:`type_new()` " +"et :c:func:`set_names()` dans :source:`Objects/typeobject.c`." #: howto/descriptor.rst:845 +#, fuzzy msgid "" -"Since the update logic is in :meth:`type.__new__`, notifications only take " +"Since the update logic is in :meth:`!type.__new__`, notifications only take " "place at the time of class creation. If descriptors are added to the class " -"afterwards, :meth:`__set_name__` will need to be called manually." +"afterwards, :meth:`~object.__set_name__` will need to be called manually." msgstr "" "Comme la logique de mise à jour est dans :meth:`type.__new__`, les " "notifications n'ont lieu qu'au moment de la création de la classe. Si des " @@ -911,8 +952,8 @@ msgstr "Exemple d'ORM" #: howto/descriptor.rst:853 msgid "" "The following code is a simplified skeleton showing how data descriptors " -"could be used to implement an `object relational mapping `_." +"could be used to implement an `object relational mapping `_." msgstr "" "Le code suivant est une ossature simplifiée montrant comment les " "descripteurs de données peuvent être utilisés pour implémenter une " @@ -931,10 +972,11 @@ msgstr "" "mises à jour :" #: howto/descriptor.rst:876 +#, fuzzy msgid "" -"We can use the :class:`Field` class to define `models `_ that describe the schema for each table in a " -"database:" +"We can use the :class:`!Field` class to define `models `_ that describe the schema for each " +"table in a database:" msgstr "" "Nous pouvons utiliser la classe :class:`Field` pour définir des `modèles " "`_ qui décrivent le schéma de " @@ -1028,8 +1070,9 @@ msgstr "" "l'attribut *value* dans un descripteur de données :" #: howto/descriptor.rst:1143 +#, fuzzy msgid "" -"Either the built-in :func:`property` or our :func:`Property` equivalent " +"Either the built-in :func:`property` or our :func:`!Property` equivalent " "would work in this example." msgstr "" "Soit la :func:`property` native, soit notre équivalent :func:`Property` " @@ -1067,15 +1110,16 @@ msgid "" "Methods can be created manually with :class:`types.MethodType` which is " "roughly equivalent to:" msgstr "" -"Les méthodes peuvent être créées manuellement avec :class:`types." -"MethodType`, qui équivaut à peu près à :" +"Les méthodes peuvent être créées manuellement " +"avec :class:`types.MethodType`, qui équivaut à peu près à :" #: howto/descriptor.rst:1189 +#, fuzzy msgid "" -"To support automatic creation of methods, functions include the :meth:" -"`__get__` method for binding methods during attribute access. This means " -"that functions are non-data descriptors that return bound methods during " -"dotted lookup from an instance. Here's how it works:" +"To support automatic creation of methods, functions include " +"the :meth:`~object.__get__` method for binding methods during attribute " +"access. This means that functions are non-data descriptors that return " +"bound methods during dotted lookup from an instance. Here's how it works:" msgstr "" "Pour prendre en charge la création automatique des méthodes, les fonctions " "incluent la méthode :meth:`__get__` pour lier les méthodes pendant l'accès " @@ -1099,26 +1143,31 @@ msgstr "" "qualifié`) pour prendre en charge l'introspection :" #: howto/descriptor.rst:1233 +#, fuzzy msgid "" -"Accessing the function through the class dictionary does not invoke :meth:" -"`__get__`. Instead, it just returns the underlying function object::" +"Accessing the function through the class dictionary does not " +"invoke :meth:`~object.__get__`. Instead, it just returns the underlying " +"function object::" msgstr "" -"L'accès à la fonction *via* le dictionnaire de classe n'invoque pas :meth:" -"`__get__`. À la place, il renvoie simplement l'objet de fonction sous-" -"jacent ::" +"L'accès à la fonction *via* le dictionnaire de classe n'invoque " +"pas :meth:`__get__`. À la place, il renvoie simplement l'objet de fonction " +"sous-jacent ::" #: howto/descriptor.rst:1239 +#, fuzzy msgid "" -"Dotted access from a class calls :meth:`__get__` which just returns the " -"underlying function unchanged::" +"Dotted access from a class calls :meth:`~object.__get__` which just returns " +"the underlying function unchanged::" msgstr "" "La recherche d'attribut depuis une classe appelle :meth:`__get__`, qui " "renvoie simplement la fonction sous-jacente inchangée ::" #: howto/descriptor.rst:1245 +#, fuzzy msgid "" "The interesting behavior occurs during dotted access from an instance. The " -"dotted lookup calls :meth:`__get__` which returns a bound method object::" +"dotted lookup calls :meth:`~object.__get__` which returns a bound method " +"object::" msgstr "" "Le comportement intéressant se produit lors d'une recherche d'attribut à " "partir d'une instance. La recherche d'attribut appelle :meth:`__get__` qui " @@ -1153,11 +1202,12 @@ msgstr "" "modèle usuel de transformation des fonctions en méthodes." #: howto/descriptor.rst:1271 +#, fuzzy msgid "" -"To recap, functions have a :meth:`__get__` method so that they can be " -"converted to a method when accessed as attributes. The non-data descriptor " -"transforms an ``obj.f(*args)`` call into ``f(obj, *args)``. Calling ``cls." -"f(*args)`` becomes ``f(*args)``." +"To recap, functions have a :meth:`~object.__get__` method so that they can " +"be converted to a method when accessed as attributes. The non-data " +"descriptor transforms an ``obj.f(*args)`` call into ``f(obj, *args)``. " +"Calling ``cls.f(*args)`` becomes ``f(*args)``." msgstr "" "Pour résumer, les fonctions ont une méthode :meth:`__get__` pour qu'elles " "puissent être converties en méthodes lorsqu'on y accède comme attributs. Le " @@ -1217,10 +1267,10 @@ msgstr "Méthodes statiques" #: howto/descriptor.rst:1293 msgid "" "Static methods return the underlying function without changes. Calling " -"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object." -"__getattribute__(c, \"f\")`` or ``object.__getattribute__(C, \"f\")``. As a " -"result, the function becomes identically accessible from either an object or " -"a class." +"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into " +"``object.__getattribute__(c, \"f\")`` or ``object.__getattribute__(C, " +"\"f\")``. As a result, the function becomes identically accessible from " +"either an object or a class." msgstr "" "Les méthodes statiques renvoient la fonction sous-jacente sans modification. " "Appeler ``c.f`` ou ``C.f`` est l'équivalent d'une recherche directe dans " @@ -1256,8 +1306,8 @@ msgstr "" "dépendent pas des données. Par exemple, la fonction d'erreur ``erf(x)`` est " "souvent utile lorsqu'on travaille en statistique mais elle ne dépend pas " "directement d'un ensemble de données particulier. Elle peut être appelée à " -"partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou ``Sample." -"erf(1.5) --> .9332``." +"partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou " +"``Sample.erf(1.5) --> .9332``." #: howto/descriptor.rst:1311 msgid "" @@ -1269,26 +1319,26 @@ msgstr "" #: howto/descriptor.rst:1328 msgid "" -"Using the non-data descriptor protocol, a pure Python version of :func:" -"`staticmethod` would look like this:" +"Using the non-data descriptor protocol, a pure Python version " +"of :func:`staticmethod` would look like this:" msgstr "" "En utilisant le protocole de descripteur hors-données, une version Python " "pure de :func:`staticmethod` ressemblerait à ceci :" -#: howto/descriptor.rst:1348 +#: howto/descriptor.rst:1352 msgid "" "The :func:`functools.update_wrapper` call adds a ``__wrapped__`` attribute " "that refers to the underlying function. Also it carries forward the " -"attributes necessary to make the wrapper look like the wrapped function: :" -"attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function." -"__doc__`, and :attr:`~function.__annotations__`." +"attributes necessary to make the wrapper look like the wrapped function, " +"including :attr:`~function.__name__`, :attr:`~function.__qualname__`, " +"and :attr:`~function.__doc__`." msgstr "" -#: howto/descriptor.rst:1417 +#: howto/descriptor.rst:1421 msgid "Class methods" msgstr "Méthodes de classe" -#: howto/descriptor.rst:1419 +#: howto/descriptor.rst:1423 msgid "" "Unlike static methods, class methods prepend the class reference to the " "argument list before calling the function. This format is the same for " @@ -1298,7 +1348,7 @@ msgstr "" "référence de classe en tête de la liste d'arguments, avant d'appeler la " "fonction. C'est le même format que l'appelant soit un objet ou une classe :" -#: howto/descriptor.rst:1437 +#: howto/descriptor.rst:1441 msgid "" "This behavior is useful whenever the method only needs to have a class " "reference and does not rely on data stored in a specific instance. One use " @@ -1309,39 +1359,39 @@ msgstr "" "Ce comportement est utile lorsque la fonction n'a besoin que d'une référence " "de classe et ne se soucie pas des données propres à une instance " "particulière. Une des utilisations des méthodes de classe est de créer des " -"constructeurs de classe personnalisés. Par exemple, la méthode de classe :" -"func:`dict.fromkeys` crée un nouveau dictionnaire à partir d'une liste de " -"clés. L'équivalent Python pur est :" +"constructeurs de classe personnalisés. Par exemple, la méthode de " +"classe :func:`dict.fromkeys` crée un nouveau dictionnaire à partir d'une " +"liste de clés. L'équivalent Python pur est :" -#: howto/descriptor.rst:1454 +#: howto/descriptor.rst:1458 msgid "Now a new dictionary of unique keys can be constructed like this:" msgstr "" "Maintenant un nouveau dictionnaire de clés uniques peut être construit comme " "ceci :" -#: howto/descriptor.rst:1464 +#: howto/descriptor.rst:1468 msgid "" -"Using the non-data descriptor protocol, a pure Python version of :func:" -"`classmethod` would look like this:" +"Using the non-data descriptor protocol, a pure Python version " +"of :func:`classmethod` would look like this:" msgstr "" "En utilisant le protocole de descripteur hors-données, une version Python " "pure de :func:`classmethod` ressemblerait à ceci :" -#: howto/descriptor.rst:1529 +#: howto/descriptor.rst:1533 msgid "" "The :func:`functools.update_wrapper` call in ``ClassMethod`` adds a " "``__wrapped__`` attribute that refers to the underlying function. Also it " "carries forward the attributes necessary to make the wrapper look like the " -"wrapped function: :attr:`~function.__name__`, :attr:`~function." -"__qualname__`, :attr:`~function.__doc__`, and :attr:`~function." -"__annotations__`." +"wrapped " +"function: :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__`, " +"and :attr:`~function.__annotations__`." msgstr "" -#: howto/descriptor.rst:1538 +#: howto/descriptor.rst:1542 msgid "Member objects and __slots__" msgstr "Objets membres et *__slots__*" -#: howto/descriptor.rst:1540 +#: howto/descriptor.rst:1544 msgid "" "When a class defines ``__slots__``, it replaces instance dictionaries with a " "fixed-length array of slot values. From a user point of view that has " @@ -1351,7 +1401,7 @@ msgstr "" "d'instance par un tableau de longueur fixe de créneaux prédéfinis. D'un " "point de vue utilisateur, cela :" -#: howto/descriptor.rst:1544 +#: howto/descriptor.rst:1548 msgid "" "1. Provides immediate detection of bugs due to misspelled attribute " "assignments. Only attribute names specified in ``__slots__`` are allowed:" @@ -1360,7 +1410,7 @@ msgstr "" "d'attributs mal orthographiés. Seuls les noms d'attribut spécifiés dans " "``__slots__`` sont autorisés :" -#: howto/descriptor.rst:1560 +#: howto/descriptor.rst:1564 msgid "" "2. Helps create immutable objects where descriptors manage access to private " "attributes stored in ``__slots__``:" @@ -1368,7 +1418,7 @@ msgstr "" "2/ aide à créer des objets immuables où les descripteurs gèrent l'accès aux " "attributs privés stockés dans ``__slots__`` :" -#: howto/descriptor.rst:1595 +#: howto/descriptor.rst:1599 msgid "" "3. Saves memory. On a 64-bit Linux build, an instance with two attributes " "takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight " @@ -1381,7 +1431,7 @@ msgstr "" "mouche_(patron_de_conception)>`_ n'a probablement d'importance que si un " "grand nombre d'instances doivent être créées ;" -#: howto/descriptor.rst:1600 +#: howto/descriptor.rst:1604 msgid "" "4. Improves speed. Reading instance variables is 35% faster with " "``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." @@ -1390,7 +1440,7 @@ msgstr "" "rapide avec ``__slots__`` (mesure effectuée avec Python 3.10 sur un " "processeur Apple M1) ;" -#: howto/descriptor.rst:1603 +#: howto/descriptor.rst:1607 msgid "" "5. Blocks tools like :func:`functools.cached_property` which require an " "instance dictionary to function correctly:" @@ -1398,7 +1448,7 @@ msgstr "" "5/ bloque les outils comme :func:`functools.cached_property` qui nécessitent " "un dictionnaire d'instance pour fonctionner correctement :" -#: howto/descriptor.rst:1625 +#: howto/descriptor.rst:1629 msgid "" "It is not possible to create an exact drop-in pure Python version of " "``__slots__`` because it requires direct access to C structures and control " @@ -1415,15 +1465,16 @@ msgstr "" "écritures dans cette structure privée sont gérées par des descripteurs de " "membres :" -#: howto/descriptor.rst:1670 +#: howto/descriptor.rst:1674 +#, fuzzy msgid "" -"The :meth:`type.__new__` method takes care of adding member objects to class " -"variables:" +"The :meth:`!type.__new__` method takes care of adding member objects to " +"class variables:" msgstr "" "La méthode :meth:`type.__new__` s'occupe d'ajouter des objets membres aux " "variables de classe :" -#: howto/descriptor.rst:1686 +#: howto/descriptor.rst:1690 msgid "" "The :meth:`object.__new__` method takes care of creating instances that have " "slots instead of an instance dictionary. Here is a rough simulation in pure " @@ -1433,22 +1484,23 @@ msgstr "" "des *slots* au lieu d'un dictionnaire d'instances. Voici une simulation " "approximative en Python pur :" -#: howto/descriptor.rst:1721 +#: howto/descriptor.rst:1725 +#, fuzzy msgid "" -"To use the simulation in a real class, just inherit from :class:`Object` and " -"set the :term:`metaclass` to :class:`Type`:" +"To use the simulation in a real class, just inherit from :class:`!Object` " +"and set the :term:`metaclass` to :class:`Type`:" msgstr "" -"Pour utiliser la simulation dans une classe réelle, héritez simplement de :" -"class:`Object` et définissez la :term:`métaclasse ` à :class:" -"`Type` :" +"Pour utiliser la simulation dans une classe réelle, héritez simplement " +"de :class:`Object` et définissez la :term:`métaclasse ` " +"à :class:`Type` :" -#: howto/descriptor.rst:1735 +#: howto/descriptor.rst:1739 msgid "" "At this point, the metaclass has loaded member objects for *x* and *y*::" msgstr "" "À ce stade, la métaclasse a chargé des objets membres pour *x* et *y* ::" -#: howto/descriptor.rst:1756 +#: howto/descriptor.rst:1760 msgid "" "When instances are created, they have a ``slot_values`` list where the " "attributes are stored:" @@ -1456,7 +1508,7 @@ msgstr "" "Lorsque les instances sont créées, elles ont une liste ``slot_values`` où " "les attributs sont stockés :" -#: howto/descriptor.rst:1768 +#: howto/descriptor.rst:1772 msgid "Misspelled or unassigned attributes will raise an exception:" msgstr "" "Les attributs mal orthographiés ou non attribués lèvent une exception :" @@ -1493,9 +1545,9 @@ msgstr "" #~ msgid "" #~ "Alternatively, it is more common for a descriptor to be invoked " #~ "automatically upon attribute access. For example, ``obj.d`` looks up " -#~ "``d`` in the dictionary of ``obj``. If ``d`` defines the method :meth:" -#~ "`__get__`, then ``d.__get__(obj)`` is invoked according to the precedence " -#~ "rules listed below." +#~ "``d`` in the dictionary of ``obj``. If ``d`` defines the " +#~ "method :meth:`__get__`, then ``d.__get__(obj)`` is invoked according to " +#~ "the precedence rules listed below." #~ msgstr "" #~ "Alternativement, il est plus courant qu'un descripteur soit invoqué " #~ "automatiquement lors de l'accès aux attributs. Par exemple, ``obj.d`` " @@ -1508,9 +1560,10 @@ msgstr "" #~ "transforms ``b.x`` into ``type(b).__dict__['x'].__get__(b, type(b))``. " #~ "The implementation works through a precedence chain that gives data " #~ "descriptors priority over instance variables, instance variables priority " -#~ "over non-data descriptors, and assigns lowest priority to :meth:" -#~ "`__getattr__` if provided. The full C implementation can be found in :c:" -#~ "func:`PyObject_GenericGetAttr()` in :source:`Objects/object.c`." +#~ "over non-data descriptors, and assigns lowest priority " +#~ "to :meth:`__getattr__` if provided. The full C implementation can be " +#~ "found in :c:func:`PyObject_GenericGetAttr()` in :source:`Objects/" +#~ "object.c`." #~ msgstr "" #~ "Pour les objets, la machinerie est dans :meth:`object.__getattribute__` " #~ "qui transforme ``b.x`` en ``type(b).__dict__['x'].__get__(b, type(b)]``. " @@ -1518,8 +1571,8 @@ msgstr "" #~ "priorité aux descripteurs de données sur les variables d'instance, la " #~ "priorité aux variables d'instance sur les descripteurs *non-data*, et " #~ "attribue la priorité la plus faible à :meth:`__getattr__` si fourni. " -#~ "L'implémentation complète en C peut être trouvée dans :c:func:" -#~ "`PyObject_GenericGetAttr()` dans :source:`Objects/object.c`." +#~ "L'implémentation complète en C peut être trouvée " +#~ "dans :c:func:`PyObject_GenericGetAttr()` dans :source:`Objects/object.c`." #~ msgid "" #~ "For classes, the machinery is in :meth:`type.__getattribute__` which " @@ -1532,29 +1585,29 @@ msgstr "" #~ msgid "" #~ "The details above show that the mechanism for descriptors is embedded in " -#~ "the :meth:`__getattribute__()` methods for :class:`object`, :class:" -#~ "`type`, and :func:`super`. Classes inherit this machinery when they " -#~ "derive from :class:`object` or if they have a meta-class providing " -#~ "similar functionality. Likewise, classes can turn-off descriptor " -#~ "invocation by overriding :meth:`__getattribute__()`." +#~ "the :meth:`__getattribute__()` methods " +#~ "for :class:`object`, :class:`type`, and :func:`super`. Classes inherit " +#~ "this machinery when they derive from :class:`object` or if they have a " +#~ "meta-class providing similar functionality. Likewise, classes can turn-" +#~ "off descriptor invocation by overriding :meth:`__getattribute__()`." #~ msgstr "" #~ "Les détails ci-dessus montrent que le mécanisme des descripteurs est " -#~ "intégré dans les méthodes :meth:`__getattribute__()` pour :class:" -#~ "`object`, :class:`type` et :func:`super`. Les classes héritent de cette " -#~ "machinerie lorsqu'elles dérivent de :class:`object` ou si elles ont une " -#~ "méta-classe fournissant des fonctionnalités similaires. De même, les " -#~ "classes peuvent désactiver l'appel de descripteurs en remplaçant :meth:" -#~ "`__getattribute__()`." +#~ "intégré dans les méthodes :meth:`__getattribute__()` " +#~ "pour :class:`object`, :class:`type` et :func:`super`. Les classes " +#~ "héritent de cette machinerie lorsqu'elles dérivent de :class:`object` ou " +#~ "si elles ont une méta-classe fournissant des fonctionnalités similaires. " +#~ "De même, les classes peuvent désactiver l'appel de descripteurs en " +#~ "remplaçant :meth:`__getattribute__()`." #~ msgid "Descriptor Example" #~ msgstr "Exemple de descripteur" #~ msgid "" #~ "The following code creates a class whose objects are data descriptors " -#~ "which print a message for each get or set. Overriding :meth:" -#~ "`__getattribute__` is alternate approach that could do this for every " -#~ "attribute. However, this descriptor is useful for monitoring just a few " -#~ "chosen attributes::" +#~ "which print a message for each get or set. " +#~ "Overriding :meth:`__getattribute__` is alternate approach that could do " +#~ "this for every attribute. However, this descriptor is useful for " +#~ "monitoring just a few chosen attributes::" #~ msgstr "" #~ "Le code suivant crée une classe dont les objets sont des descripteurs de " #~ "données qui affichent un message pour chaque lecture ou écriture. " diff --git a/howto/enum.po b/howto/enum.po index 353051885..ce022e601 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-21 12:47+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -97,47 +97,52 @@ msgstr "" "appartient ::" #: howto/enum.rst:67 -msgid "Enum members have an attribute that contains just their :attr:`name`::" +#, fuzzy +msgid "Enum members have an attribute that contains just their :attr:`!name`::" msgstr "" "Les membres d'une énumération possèdent un attribut :attr:`name` qui " "contient leur nom ::" #: howto/enum.rst:72 -msgid "Likewise, they have an attribute for their :attr:`value`::" +#, fuzzy +msgid "Likewise, they have an attribute for their :attr:`!value`::" msgstr "De même, ils ont un attribut :attr:`value` pour leur valeur ::" #: howto/enum.rst:78 +#, fuzzy msgid "" "Unlike many languages that treat enumerations solely as name/value pairs, " "Python Enums can have behavior added. For example, :class:`datetime.date` " -"has two methods for returning the weekday: :meth:`weekday` and :meth:" -"`isoweekday`. The difference is that one of them counts from 0-6 and the " -"other from 1-7. Rather than keep track of that ourselves we can add a method " -"to the :class:`Weekday` enum to extract the day from the :class:`date` " -"instance and return the matching enum member::" +"has two methods for returning the weekday: :meth:`~datetime.date.weekday` " +"and :meth:`~datetime.date.isoweekday`. The difference is that one of them " +"counts from 0-6 and the other from 1-7. Rather than keep track of that " +"ourselves we can add a method to the :class:`!Weekday` enum to extract the " +"day from the :class:`~datetime.date` instance and return the matching enum " +"member::" msgstr "" "Contrairement à de nombreux langages qui traitent les énumérations " "uniquement comme des paires nom-valeur, le comportement des énumérations " "Python peut être augmenté. Par exemple, :class:`datetime.date` a deux " -"méthodes pour renvoyer le jour de la semaine : :meth:`weekday` et :meth:" -"`isoweekday`. La différence est que la première compte de 0 à 6 et la " -"seconde de 1 à 7. Plutôt que d'avoir à nous en rappeler nous-mêmes, nous " +"méthodes pour renvoyer le jour de la semaine : :meth:`weekday` " +"et :meth:`isoweekday`. La différence est que la première compte de 0 à 6 et " +"la seconde de 1 à 7. Plutôt que d'avoir à nous en rappeler nous-mêmes, nous " "pouvons ajouter une méthode à l'énumération :class:`Weekday` pour extraire " "le jour d'une instance :class:`date` et renvoyer le membre correspondant de " "l'énumération ::" -#: howto/enum.rst:90 -msgid "The complete :class:`Weekday` enum now looks like this::" +#: howto/enum.rst:91 +#, fuzzy +msgid "The complete :class:`!Weekday` enum now looks like this::" msgstr "" "L'énumération :class:`Weekday` en entier ressemble maintenant à ceci ::" -#: howto/enum.rst:105 +#: howto/enum.rst:106 msgid "Now we can find out what today is! Observe::" msgstr "" "Maintenant, nous pouvons découvrir quel jour nous sommes aujourd'hui ! " "Regardez ::" -#: howto/enum.rst:111 +#: howto/enum.rst:112 msgid "" "Of course, if you're reading this on some other day, you'll see that day " "instead." @@ -145,9 +150,10 @@ msgstr "" "Bien sûr, si vous lisez cette page un autre jour, vous verrez ce jour-là à " "la place." -#: howto/enum.rst:113 +#: howto/enum.rst:114 +#, fuzzy msgid "" -"This :class:`Weekday` enum is great if our variable only needs one day, but " +"This :class:`!Weekday` enum is great if our variable only needs one day, but " "what if we need several? Maybe we're writing a function to plot chores " "during a week, and don't want to use a :class:`list` -- we could use a " "different type of :class:`Enum`::" @@ -158,7 +164,7 @@ msgstr "" "pendant une semaine, et que nous ne voulons pas utiliser une :class:`list` — " "nous pouvons utiliser un autre type :class:`Enum` ::" -#: howto/enum.rst:128 +#: howto/enum.rst:129 msgid "" "We've changed two things: we're inherited from :class:`Flag`, and the values " "are all powers of 2." @@ -166,15 +172,16 @@ msgstr "" "Nous avons changé deux choses : nous héritons de :class:`Flag` et les " "valeurs sont toutes des puissances de 2." -#: howto/enum.rst:131 +#: howto/enum.rst:132 +#, fuzzy msgid "" -"Just like the original :class:`Weekday` enum above, we can have a single " +"Just like the original :class:`!Weekday` enum above, we can have a single " "selection::" msgstr "" "De la même manière que pour l'énumération originale :class:`Weekday` ci-" "dessus, nous pouvons sélectionner un seul élément ::" -#: howto/enum.rst:137 +#: howto/enum.rst:138 msgid "" "But :class:`Flag` also allows us to combine several members into a single " "variable::" @@ -182,19 +189,19 @@ msgstr "" "Mais :class:`Flag` nous permet aussi de combiner plusieurs membres en une " "seule variable ::" -#: howto/enum.rst:144 +#: howto/enum.rst:145 msgid "You can even iterate over a :class:`Flag` variable::" msgstr "Nous pouvons même itérer sur une variable :class:`Flag` ::" -#: howto/enum.rst:151 +#: howto/enum.rst:152 msgid "Okay, let's get some chores set up::" msgstr "Bien, préparons quelques corvées ::" -#: howto/enum.rst:159 +#: howto/enum.rst:160 msgid "And a function to display the chores for a given day::" msgstr "Et une fonction pour afficher les corvées d'un jour donné ::" -#: howto/enum.rst:169 +#: howto/enum.rst:170 #, fuzzy msgid "" "In cases where the actual values of the members do not matter, you can save " @@ -204,14 +211,14 @@ msgstr "" "pouvons nous épargner du travail et utiliser :func:`auto()` pour les " "valeurs ::" -#: howto/enum.rst:188 +#: howto/enum.rst:189 msgid "Programmatic access to enumeration members and their attributes" msgstr "Accès par programme aux membres de l'énumération et à leurs attributs" -#: howto/enum.rst:190 +#: howto/enum.rst:191 msgid "" -"Sometimes it's useful to access members in enumerations programmatically (i." -"e. situations where ``Color.RED`` won't do because the exact color is not " +"Sometimes it's useful to access members in enumerations programmatically " +"(i.e. situations where ``Color.RED`` won't do because the exact color is not " "known at program-writing time). ``Enum`` allows such access::" msgstr "" "Il est parfois utile d'accéder aux membres d'une énumération " @@ -219,29 +226,32 @@ msgstr "" "la couleur exacte n'est pas connue au moment de l'écriture du programme). " "``Enum`` permet de tels accès ::" -#: howto/enum.rst:199 +#: howto/enum.rst:200 msgid "If you want to access enum members by *name*, use item access::" msgstr "" "Si vous souhaitez accéder aux membres d'une énumération par leur nom, " "utilisez l'accès par indice ::" -#: howto/enum.rst:206 -msgid "If you have an enum member and need its :attr:`name` or :attr:`value`::" +#: howto/enum.rst:207 +#, fuzzy +msgid "" +"If you have an enum member and need its :attr:`!name` or :attr:`!value`::" msgstr "" -"Si vous avez un membre d'une énumération et que vous avez besoin de son :" -"attr:`nom ` ou de sa :attr:`valeur `, utilisez ses attributs ::" +"Si vous avez un membre d'une énumération et que vous avez besoin de " +"son :attr:`nom ` ou de sa :attr:`valeur `, utilisez ses " +"attributs ::" -#: howto/enum.rst:216 +#: howto/enum.rst:217 msgid "Duplicating enum members and values" msgstr "Duplication des membres et des valeurs d'une énumération" -#: howto/enum.rst:218 +#: howto/enum.rst:219 msgid "Having two enum members with the same name is invalid::" msgstr "" "Il n'est pas licite d'avoir deux membres d'une énumération avec le même " "nom ::" -#: howto/enum.rst:228 +#: howto/enum.rst:229 msgid "" "However, an enum member can have other names associated with it. Given two " "entries ``A`` and ``B`` with the same value (and ``A`` defined first), ``B`` " @@ -257,7 +267,7 @@ msgstr "" "également le membre ``A`` ::" # suit un : -#: howto/enum.rst:249 +#: howto/enum.rst:250 msgid "" "Attempting to create a member with the same name as an already defined " "attribute (another member, a method, etc.) or attempting to create an " @@ -267,11 +277,11 @@ msgstr "" "autre membre, une méthode, etc.) ou tenter de créer un attribut portant le " "même nom qu'un membre n'est pas autorisé." -#: howto/enum.rst:255 +#: howto/enum.rst:256 msgid "Ensuring unique enumeration values" msgstr "Garantie de valeurs d'énumération uniques" -#: howto/enum.rst:257 +#: howto/enum.rst:258 msgid "" "By default, enumerations allow multiple names as aliases for the same value. " "When this behavior isn't desired, you can use the :func:`unique` decorator::" @@ -280,47 +290,50 @@ msgstr "" "la même valeur. Lorsque ce comportement n'est pas souhaité, vous pouvez " "utiliser le décorateur :func:`unique` ::" -#: howto/enum.rst:274 +#: howto/enum.rst:275 msgid "Using automatic values" msgstr "Utilisation de valeurs automatiques" -#: howto/enum.rst:276 +#: howto/enum.rst:277 msgid "If the exact value is unimportant you can use :class:`auto`::" msgstr "" -"Si la valeur exacte n'est pas importante, vous pouvez utiliser :class:" -"`auto` ::" +"Si la valeur exacte n'est pas importante, vous pouvez " +"utiliser :class:`auto` ::" -#: howto/enum.rst:287 +#: howto/enum.rst:288 +#, fuzzy msgid "" -"The values are chosen by :func:`_generate_next_value_`, which can be " +"The values are chosen by :func:`~Enum._generate_next_value_`, which can be " "overridden::" msgstr "" "Les valeurs sont choisies par :func:`_generate_next_value_`, qui peut être " "surchargée ::" # suit un : -#: howto/enum.rst:306 +#: howto/enum.rst:307 +#, fuzzy msgid "" -"The :meth:`_generate_next_value_` method must be defined before any members." +"The :meth:`~Enum._generate_next_value_` method must be defined before any " +"members." msgstr "" "la méthode :meth:`_generate_next_value_` doit être définie avant tout membre." -#: howto/enum.rst:309 +#: howto/enum.rst:310 msgid "Iteration" msgstr "Itération" -#: howto/enum.rst:311 +#: howto/enum.rst:312 msgid "Iterating over the members of an enum does not provide the aliases::" msgstr "" "L'itération sur les membres d'une énumération ne fournit pas les synonymes ::" -#: howto/enum.rst:318 +#: howto/enum.rst:319 msgid "" "Note that the aliases ``Shape.ALIAS_FOR_SQUARE`` and ``Weekday.WEEKEND`` " "aren't shown." msgstr "" -#: howto/enum.rst:320 +#: howto/enum.rst:321 msgid "" "The special attribute ``__members__`` is a read-only ordered mapping of " "names to members. It includes all names defined in the enumeration, " @@ -330,7 +343,7 @@ msgstr "" "en lecture seule des noms vers les membres. Il inclut tous les noms définis " "dans l'énumération, y compris les synonymes ::" -#: howto/enum.rst:332 +#: howto/enum.rst:333 msgid "" "The ``__members__`` attribute can be used for detailed programmatic access " "to the enumeration members. For example, finding all the aliases::" @@ -339,21 +352,21 @@ msgstr "" "détaillé aux membres de l'énumération. Par exemple, trouver tous les " "synonymes ::" -#: howto/enum.rst:340 +#: howto/enum.rst:341 msgid "" "Aliases for flags include values with multiple flags set, such as ``3``, and " "no flags set, i.e. ``0``." msgstr "" -#: howto/enum.rst:345 +#: howto/enum.rst:346 msgid "Comparisons" msgstr "Comparaisons" -#: howto/enum.rst:347 +#: howto/enum.rst:348 msgid "Enumeration members are compared by identity::" msgstr "Les membres de l'énumération sont comparés par identité ::" -#: howto/enum.rst:356 +#: howto/enum.rst:357 msgid "" "Ordered comparisons between enumeration values are *not* supported. Enum " "members are not integers (but see `IntEnum`_ below)::" @@ -362,32 +375,33 @@ msgstr "" "prises en charge. Les membres d'une énumération ne sont pas des entiers " "(mais voir `IntEnum`_ plus bas) ::" -#: howto/enum.rst:364 +#: howto/enum.rst:365 msgid "Equality comparisons are defined though::" msgstr "Les comparaisons d'égalité sont cependant définies ::" -#: howto/enum.rst:373 +#: howto/enum.rst:374 +#, fuzzy msgid "" -"Comparisons against non-enumeration values will always compare not equal " -"(again, :class:`IntEnum` was explicitly designed to behave differently, see " -"below)::" +"Equality comparisons against non-enumeration values will always return " +"``False`` (again, :class:`IntEnum` was explicitly designed to behave " +"differently, see below)::" msgstr "" "Les comparaisons avec des valeurs en dehors de l'énumération sont toujours " "fausses (encore une fois, :class:`IntEnum` a été explicitement conçue pour " "se comporter différemment, voir ci-dessous) ::" -#: howto/enum.rst:382 +#: howto/enum.rst:383 msgid "" "It is possible to reload modules -- if a reloaded module contains enums, " "they will be recreated, and the new members may not compare identical/equal " "to the original members." msgstr "" -#: howto/enum.rst:387 +#: howto/enum.rst:388 msgid "Allowed members and attributes of enumerations" msgstr "Membres et attributs autorisés des énumérations" -#: howto/enum.rst:389 +#: howto/enum.rst:390 msgid "" "Most of the examples above use integers for enumeration values. Using " "integers is short and handy (and provided by default by the `Functional " @@ -402,7 +416,7 @@ msgstr "" "valeur réelle des membres d'une énumération. Mais si la valeur *est* " "importante, les énumérations peuvent avoir des valeurs arbitraires." -#: howto/enum.rst:395 +#: howto/enum.rst:396 msgid "" "Enumerations are Python classes, and can have methods and special methods as " "usual. If we have this enumeration::" @@ -410,66 +424,69 @@ msgstr "" "Les énumérations sont des classes Python et peuvent avoir des méthodes ainsi " "que des méthodes spéciales comme d'habitude. Prenons cette énumération ::" -#: howto/enum.rst:415 +#: howto/enum.rst:416 msgid "Then::" msgstr "alors ::" -#: howto/enum.rst:424 +#: howto/enum.rst:425 +#, fuzzy msgid "" "The rules for what is allowed are as follows: names that start and end with " "a single underscore are reserved by enum and cannot be used; all other " "attributes defined within an enumeration will become members of this " -"enumeration, with the exception of special methods (:meth:`__str__`, :meth:" -"`__add__`, etc.), descriptors (methods are also descriptors), and variable " -"names listed in :attr:`_ignore_`." +"enumeration, with the exception of special methods " +"(:meth:`~object.__str__`, :meth:`~object.__add__`, etc.), descriptors " +"(methods are also descriptors), and variable names listed " +"in :attr:`~Enum._ignore_`." msgstr "" "Les règles concernant ce qui est autorisé ou pas sont les suivantes : les " "noms qui commencent et se terminent par un seul caractère de soulignement " "sont réservés par l'énumération et ne peuvent pas être utilisés ; tous les " "autres attributs définis dans une énumération deviendront membres de cette " -"énumération, à l'exception des méthodes spéciales (:meth:`__str__`, :meth:" -"`__add__`, etc.), des descripteurs (les méthodes sont aussi des " -"descripteurs) et des noms de variables listés dans :attr:`_ignore_`." +"énumération, à l'exception des méthodes spéciales " +"(:meth:`__str__`, :meth:`__add__`, etc.), des descripteurs (les méthodes " +"sont aussi des descripteurs) et des noms de variables listés " +"dans :attr:`_ignore_`." -#: howto/enum.rst:431 +#: howto/enum.rst:432 #, fuzzy msgid "" -"Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__`, " -"any value(s) given to the enum member will be passed into those methods. See " -"`Planet`_ for an example." +"Note: if your enumeration defines :meth:`~object.__new__` and/" +"or :meth:`~object.__init__`, any value(s) given to the enum member will be " +"passed into those methods. See `Planet`_ for an example." msgstr "" "Remarque : si votre énumération définit :meth:`__new__` ou :meth:`__init__`, " "alors toute valeur donnée à un membre de l'énumération sera passée à ces " "méthodes. Voir `Planète`_ pour un exemple." -#: howto/enum.rst:437 +#: howto/enum.rst:438 #, fuzzy msgid "" -"The :meth:`__new__` method, if defined, is used during creation of the Enum " -"members; it is then replaced by Enum's :meth:`__new__` which is used after " -"class creation for lookup of existing members. See :ref:`new-vs-init` for " -"more details." +"The :meth:`~object.__new__` method, if defined, is used during creation of " +"the Enum members; it is then replaced by Enum's :meth:`~object.__new__` " +"which is used after class creation for lookup of existing members. " +"See :ref:`new-vs-init` for more details." msgstr "" "la méthode :meth:`__new__`, si elle est définie, est utilisée lors de la " -"création des membres de l'énumération ; elle est ensuite remplacée par :meth:" -"`__new__` de l'*Enum* qui est utilisée après la création de la classe pour " -"la recherche des membres existants." +"création des membres de l'énumération ; elle est ensuite remplacée " +"par :meth:`__new__` de l'*Enum* qui est utilisée après la création de la " +"classe pour la recherche des membres existants." -#: howto/enum.rst:444 +#: howto/enum.rst:445 msgid "Restricted Enum subclassing" msgstr "Restrictions sur la dérivation d'énumérations" -#: howto/enum.rst:446 +#: howto/enum.rst:447 msgid "" "A new :class:`Enum` class must have one base enum class, up to one concrete " "data type, and as many :class:`object`-based mixin classes as needed. The " "order of these base classes is::" msgstr "" "Une nouvelle classe :class:`Enum` doit avoir une classe mère *Enum*, jusqu'à " -"un type de données concret, et autant de classes mélangées filles de :class:" -"`object` que nécessaire. L'ordre de ces classes mères est ::" +"un type de données concret, et autant de classes mélangées filles " +"de :class:`object` que nécessaire. L'ordre de ces classes mères est ::" -#: howto/enum.rst:453 +#: howto/enum.rst:454 msgid "" "Also, subclassing an enumeration is allowed only if the enumeration does not " "define any members. So this is forbidden::" @@ -477,11 +494,11 @@ msgstr "" "De plus, la dérivation d'une énumération n'est autorisée que si " "l'énumération ne définit aucun membre. Donc ceci est interdit ::" -#: howto/enum.rst:463 +#: howto/enum.rst:464 msgid "But this is allowed::" msgstr "Mais ceci est autorisé ::" -#: howto/enum.rst:474 +#: howto/enum.rst:475 msgid "" "Allowing subclassing of enums that define members would lead to a violation " "of some important invariants of types and instances. On the other hand, it " @@ -494,29 +511,29 @@ msgstr "" "comportement commun entre un groupe d'énumérations (voir `OrderedEnum`_ pour " "un exemple)." -#: howto/enum.rst:483 +#: howto/enum.rst:484 msgid "Dataclass support" msgstr "" -#: howto/enum.rst:485 +#: howto/enum.rst:486 msgid "" -"When inheriting from a :class:`~dataclasses.dataclass`, the :meth:`~Enum." -"__repr__` omits the inherited class' name. For example::" +"When inheriting from a :class:`~dataclasses.dataclass`, " +"the :meth:`~Enum.__repr__` omits the inherited class' name. For example::" msgstr "" -#: howto/enum.rst:502 +#: howto/enum.rst:503 msgid "" "Use the :func:`~dataclasses.dataclass` argument ``repr=False`` to use the " "standard :func:`repr`." msgstr "" -#: howto/enum.rst:505 +#: howto/enum.rst:506 msgid "" "Only the dataclass fields are shown in the value area, not the dataclass' " "name." msgstr "" -#: howto/enum.rst:511 +#: howto/enum.rst:512 msgid "" "Adding :func:`~dataclasses.dataclass` decorator to :class:`Enum` and its " "subclasses is not supported. It will not raise any errors, but it will " @@ -524,15 +541,15 @@ msgid "" "other::" msgstr "" -#: howto/enum.rst:528 +#: howto/enum.rst:529 msgid "Pickling" msgstr "Sérialisation" -#: howto/enum.rst:530 +#: howto/enum.rst:531 msgid "Enumerations can be pickled and unpickled::" msgstr "Les énumérations peuvent être sérialisées et désérialisées ::" -#: howto/enum.rst:537 +#: howto/enum.rst:538 msgid "" "The usual restrictions for pickling apply: picklable enums must be defined " "in the top level of a module, since unpickling requires them to be " @@ -544,7 +561,7 @@ msgstr "" "partir de ce module." # suit un : -#: howto/enum.rst:543 +#: howto/enum.rst:544 msgid "" "With pickle protocol version 4 it is possible to easily pickle enums nested " "in other classes." @@ -552,44 +569,46 @@ msgstr "" "avec la version 4 du protocole *pickle*, il est possible de sérialiser " "facilement les énumérations imbriquées dans d'autres classes." -#: howto/enum.rst:546 +#: howto/enum.rst:547 #, fuzzy msgid "" -"It is possible to modify how enum members are pickled/unpickled by defining :" -"meth:`__reduce_ex__` in the enumeration class. The default method is by-" -"value, but enums with complicated values may want to use by-name::" +"It is possible to modify how enum members are pickled/unpickled by " +"defining :meth:`~object.__reduce_ex__` in the enumeration class. The " +"default method is by-value, but enums with complicated values may want to " +"use by-name::" msgstr "" "Il est possible de modifier la manière dont les membres de l'énumération " "sont sérialisés-désérialisés en définissant :meth:`__reduce_ex__` dans la " "classe d'énumération." -#: howto/enum.rst:556 +#: howto/enum.rst:557 msgid "" "Using by-name for flags is not recommended, as unnamed aliases will not " "unpickle." msgstr "" -#: howto/enum.rst:561 +#: howto/enum.rst:562 msgid "Functional API" msgstr "API fonctionnelle" -#: howto/enum.rst:563 +#: howto/enum.rst:564 msgid "" "The :class:`Enum` class is callable, providing the following functional API::" msgstr "" "La classe :class:`Enum` est appelable, elle fournit l'API fonctionnelle " "suivante ::" -#: howto/enum.rst:573 +#: howto/enum.rst:574 msgid "" "The semantics of this API resemble :class:`~collections.namedtuple`. The " "first argument of the call to :class:`Enum` is the name of the enumeration." msgstr "" -"La sémantique de cette API ressemble à celle des :class:`~collections." -"namedtuple`. Le premier argument de l'appel à :class:`Enum` est le nom de " -"l'énumération." +"La sémantique de cette API ressemble à celle " +"des :class:`~collections.namedtuple`. Le premier argument de l'appel " +"à :class:`Enum` est le nom de l'énumération." -#: howto/enum.rst:576 +#: howto/enum.rst:577 +#, fuzzy msgid "" "The second argument is the *source* of enumeration member names. It can be " "a whitespace-separated string of names, a sequence of names, a sequence of 2-" @@ -598,7 +617,7 @@ msgid "" "enumerations; the others auto-assign increasing integers starting with 1 " "(use the ``start`` parameter to specify a different starting value). A new " "class derived from :class:`Enum` is returned. In other words, the above " -"assignment to :class:`Animal` is equivalent to::" +"assignment to :class:`!Animal` is equivalent to::" msgstr "" "Le deuxième argument est la *source* des noms des membres de l'énumération. " "Il peut s'agir d'une chaîne de noms séparés par des espaces, d'une séquence " @@ -611,7 +630,7 @@ msgstr "" "renvoyée. En d'autres termes, l'affectation ci-dessus à :class:`Animal` est " "équivalente à ::" -#: howto/enum.rst:592 +#: howto/enum.rst:593 msgid "" "The reason for defaulting to ``1`` as the starting number and not ``0`` is " "that ``0`` is ``False`` in a boolean sense, but by default enum members all " @@ -621,7 +640,7 @@ msgstr "" "``0`` est que le sens booléen de ``0`` est ``False``. Or, par défaut, les " "membres d'une énumération s'évaluent tous à ``True``." -#: howto/enum.rst:596 +#: howto/enum.rst:597 msgid "" "Pickling enums created with the functional API can be tricky as frame stack " "implementation details are used to try and figure out which module the " @@ -637,7 +656,7 @@ msgstr "" "La solution consiste à spécifier explicitement le nom du module comme suit ::" # suit un : -#: howto/enum.rst:606 +#: howto/enum.rst:607 msgid "" "If ``module`` is not supplied, and Enum cannot determine what it is, the new " "Enum members will not be unpicklable; to keep errors closer to the source, " @@ -648,13 +667,13 @@ msgstr "" "pour garder les erreurs au plus près de la source, la sérialisation est " "désactivée." -#: howto/enum.rst:610 +#: howto/enum.rst:611 #, fuzzy msgid "" -"The new pickle protocol 4 also, in some circumstances, relies on :attr:" -"`~type.__qualname__` being set to the location where pickle will be able to " -"find the class. For example, if the class was made available in class " -"SomeData in the global scope::" +"The new pickle protocol 4 also, in some circumstances, relies " +"on :attr:`~type.__qualname__` being set to the location where pickle will be " +"able to find the class. For example, if the class was made available in " +"class SomeData in the global scope::" msgstr "" "Le nouveau protocole *pickle* 4 s'appuie également, dans certaines " "circonstances, sur :attr:`~definition.__qualname__` qui définit " @@ -662,18 +681,18 @@ msgstr "" "classe a été rendue disponible dans la classe *SomeData* avec une portée " "globale ::" -#: howto/enum.rst:617 +#: howto/enum.rst:618 msgid "The complete signature is::" msgstr "La signature complète est ::" # suit un : -#: howto/enum.rst:629 +#: howto/enum.rst:630 #, fuzzy msgid "*value*: What the new enum class will record as its name." msgstr "ce que la nouvelle classe *enum* enregistre comme nom." # suit un : -#: howto/enum.rst:631 +#: howto/enum.rst:632 #, fuzzy msgid "" "*names*: The enum members. This can be a whitespace- or comma-separated " @@ -683,66 +702,66 @@ msgstr "" "espaces ou des virgules (les valeurs commencent à 1 sauf indication " "contraire) ::" -#: howto/enum.rst:636 +#: howto/enum.rst:637 msgid "or an iterator of names::" msgstr "ou un itérateur sur des noms ::" -#: howto/enum.rst:640 +#: howto/enum.rst:641 msgid "or an iterator of (name, value) pairs::" msgstr "ou un itérateur sur des paires (nom, valeur) ::" -#: howto/enum.rst:644 +#: howto/enum.rst:645 msgid "or a mapping::" msgstr "ou un tableau de correspondances ::" -#: howto/enum.rst:648 +#: howto/enum.rst:649 #, fuzzy msgid "*module*: name of module where new enum class can be found." msgstr "nom du module où la nouvelle classe *enum* peut être trouvée." -#: howto/enum.rst:650 +#: howto/enum.rst:651 #, fuzzy msgid "*qualname*: where in module new enum class can be found." msgstr "" "à quel endroit dans le module la nouvelle classe *enum* peut être trouvée." -#: howto/enum.rst:652 +#: howto/enum.rst:653 #, fuzzy msgid "*type*: type to mix in to new enum class." msgstr "types à mélanger avec la nouvelle classe *enum*." -#: howto/enum.rst:654 +#: howto/enum.rst:655 #, fuzzy msgid "*start*: number to start counting at if only names are passed in." msgstr "" "nombre à partir duquel commencer à compter si seuls les noms sont transmis." # suit un : -#: howto/enum.rst:656 +#: howto/enum.rst:657 msgid "The *start* parameter was added." msgstr "le paramètre *start* a été ajouté." -#: howto/enum.rst:661 +#: howto/enum.rst:662 msgid "Derived Enumerations" msgstr "Déclinaisons d'énumérations" -#: howto/enum.rst:664 +#: howto/enum.rst:665 msgid "IntEnum" msgstr "*IntEnum*" -#: howto/enum.rst:666 +#: howto/enum.rst:667 msgid "" -"The first variation of :class:`Enum` that is provided is also a subclass of :" -"class:`int`. Members of an :class:`IntEnum` can be compared to integers; by " -"extension, integer enumerations of different types can also be compared to " -"each other::" +"The first variation of :class:`Enum` that is provided is also a subclass " +"of :class:`int`. Members of an :class:`IntEnum` can be compared to " +"integers; by extension, integer enumerations of different types can also be " +"compared to each other::" msgstr "" "La première variante de :class:`Enum` fournie est également une sous-classe " "de :class:`int`. Les membres d'une :class:`IntEnum` peuvent être comparés à " "des entiers ; par extension, des énumérations *IntEnum* de différents types " "peuvent aussi être comparées ::" -#: howto/enum.rst:687 +#: howto/enum.rst:688 msgid "" "However, they still can't be compared to standard :class:`Enum` " "enumerations::" @@ -750,18 +769,18 @@ msgstr "" "Cependant, elles ne peuvent toujours pas être comparées aux énumérations " "classiques :class:`Enum` ::" -#: howto/enum.rst:700 +#: howto/enum.rst:701 msgid "" ":class:`IntEnum` values behave like integers in other ways you'd expect::" msgstr "" "Les valeurs :class:`IntEnum` se comportent comme des entiers, comme vous " "pouvez vous y attendre ::" -#: howto/enum.rst:711 +#: howto/enum.rst:712 msgid "StrEnum" msgstr "*StrEnum*" -#: howto/enum.rst:713 +#: howto/enum.rst:714 msgid "" "The second variation of :class:`Enum` that is provided is also a subclass " "of :class:`str`. Members of a :class:`StrEnum` can be compared to strings; " @@ -773,28 +792,28 @@ msgstr "" "des chaînes ; par extension, les énumérations *StrEnum* de différents types " "peuvent également être comparées les unes aux autres." -#: howto/enum.rst:722 +#: howto/enum.rst:723 msgid "IntFlag" msgstr "*IntFlag*" -#: howto/enum.rst:724 +#: howto/enum.rst:725 msgid "" "The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " "based on :class:`int`. The difference being :class:`IntFlag` members can be " "combined using the bitwise operators (&, \\|, ^, ~) and the result is still " -"an :class:`IntFlag` member, if possible. Like :class:`IntEnum`, :class:" -"`IntFlag` members are also integers and can be used wherever an :class:`int` " -"is used." +"an :class:`IntFlag` member, if possible. " +"Like :class:`IntEnum`, :class:`IntFlag` members are also integers and can be " +"used wherever an :class:`int` is used." msgstr "" "La variante suivante fournie d':class:`Enum` est :class:`IntFlag`, également " "basée sur :class:`int`. La différence étant que les membres :class:`IntFlag` " "peuvent être combinés à l'aide des opérateurs bit-à-bit (&, \\|, ^, ~) et le " -"résultat est toujours un membre :class:`IntFlag`, si possible. Comme :class:" -"`IntEnum`, les membres de :class:`IntFlag` sont aussi des entiers et peuvent " -"être utilisés partout où on utilise un :class:`int`." +"résultat est toujours un membre :class:`IntFlag`, si possible. " +"Comme :class:`IntEnum`, les membres de :class:`IntFlag` sont aussi des " +"entiers et peuvent être utilisés partout où on utilise un :class:`int`." # suit un : -#: howto/enum.rst:732 +#: howto/enum.rst:733 msgid "" "Any operation on an :class:`IntFlag` member besides the bit-wise operations " "will lose the :class:`IntFlag` membership." @@ -802,25 +821,25 @@ msgstr "" "toute opération sur un membre :class:`IntFlag`, en dehors des opérations bit-" "à-bit, fait perdre l'appartenance à :class:`IntFlag`." -#: howto/enum.rst:735 +#: howto/enum.rst:736 msgid "" "Bit-wise operations that result in invalid :class:`IntFlag` values will lose " "the :class:`IntFlag` membership. See :class:`FlagBoundary` for details." msgstr "" "Les opérations bit-à-bit qui entraînent des valeurs :class:`IntFlag` " -"invalides font perdre l'appartenance à :class:`IntFlag`. Voir :class:" -"`FlagBoundary` pour plus de détails." +"invalides font perdre l'appartenance à :class:`IntFlag`. " +"Voir :class:`FlagBoundary` pour plus de détails." -#: howto/enum.rst:742 +#: howto/enum.rst:743 msgid "Sample :class:`IntFlag` class::" msgstr "Classe exemple dérivée d':class:`Intflag` ::" -#: howto/enum.rst:758 +#: howto/enum.rst:759 msgid "It is also possible to name the combinations::" msgstr "Il est également possible de nommer les combinaisons ::" # suit un : -#: howto/enum.rst:775 +#: howto/enum.rst:776 msgid "" "Named combinations are considered aliases. Aliases do not show up during " "iteration, but can be returned from by-value lookups." @@ -829,27 +848,27 @@ msgstr "" "synonymes n'apparaissent pas dans une itération, mais peuvent être renvoyés " "à partir de recherches par valeur." -#: howto/enum.rst:780 +#: howto/enum.rst:781 msgid "" "Another important difference between :class:`IntFlag` and :class:`Enum` is " -"that if no flags are set (the value is 0), its boolean evaluation is :data:" -"`False`::" +"that if no flags are set (the value is 0), its boolean evaluation " +"is :data:`False`::" msgstr "" "Une autre différence importante entre :class:`IntFlag` et :class:`Enum` est " "que si aucun indicateur n'est défini (la valeur est 0), son évaluation " "booléenne est :data:`False` ::" -#: howto/enum.rst:788 +#: howto/enum.rst:789 msgid "" "Because :class:`IntFlag` members are also subclasses of :class:`int` they " "can be combined with them (but may lose :class:`IntFlag` membership::" msgstr "" -"Comme les membres d'une :class:`IntFlag` sont aussi des sous-classes de :" -"class:`int`, ils peuvent être combinés avec eux (mais peuvent alors perdre " -"l'appartenance à :class:`IntFlag`) ::" +"Comme les membres d'une :class:`IntFlag` sont aussi des sous-classes " +"de :class:`int`, ils peuvent être combinés avec eux (mais peuvent alors " +"perdre l'appartenance à :class:`IntFlag`) ::" # suit un : -#: howto/enum.rst:799 +#: howto/enum.rst:800 msgid "" "The negation operator, ``~``, always returns an :class:`IntFlag` member with " "a positive value::" @@ -857,21 +876,21 @@ msgstr "" "l'opérateur de négation, ``~``, renvoie toujours un membre :class:`IntFlag` " "avec une valeur positive ::" -#: howto/enum.rst:805 +#: howto/enum.rst:806 msgid ":class:`IntFlag` members can also be iterated over::" msgstr "On peut aussi itérer sur les membres d'une :class:`IntFlag` ::" -#: howto/enum.rst:814 +#: howto/enum.rst:815 msgid "Flag" msgstr "*Flag*" -#: howto/enum.rst:816 +#: howto/enum.rst:817 msgid "" "The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:`Flag` " -"members can be combined using the bitwise operators (&, \\|, ^, ~). Unlike :" -"class:`IntFlag`, they cannot be combined with, nor compared against, any " -"other :class:`Flag` enumeration, nor :class:`int`. While it is possible to " -"specify the values directly it is recommended to use :class:`auto` as the " +"members can be combined using the bitwise operators (&, \\|, ^, ~). " +"Unlike :class:`IntFlag`, they cannot be combined with, nor compared against, " +"any other :class:`Flag` enumeration, nor :class:`int`. While it is possible " +"to specify the values directly it is recommended to use :class:`auto` as the " "value and let :class:`Flag` select an appropriate value." msgstr "" "La dernière variante est :class:`Flag`. Comme :class:`IntFlag`, les membres " @@ -882,16 +901,16 @@ msgstr "" "recommandé d'utiliser :class:`auto` comme valeur et de laisser :class:`Flag` " "sélectionner une valeur appropriée." -#: howto/enum.rst:825 +#: howto/enum.rst:826 msgid "" "Like :class:`IntFlag`, if a combination of :class:`Flag` members results in " "no flags being set, the boolean evaluation is :data:`False`::" msgstr "" "Comme pour :class:`IntFlag`, si une combinaison de membres :class:`Flag` " -"entraîne qu'aucun indicateur n'est défini, l'évaluation booléenne est :data:" -"`False` ::" +"entraîne qu'aucun indicateur n'est défini, l'évaluation booléenne " +"est :data:`False` ::" -#: howto/enum.rst:839 +#: howto/enum.rst:840 #, fuzzy msgid "" "Individual flags should have values that are powers of two (1, 2, 4, " @@ -901,7 +920,7 @@ msgstr "" "puissances de deux (1, 2, 4, 8…), tandis que les combinaisons d'indicateurs " "ne le sont pas ::" -#: howto/enum.rst:851 +#: howto/enum.rst:852 msgid "" "Giving a name to the \"no flags set\" condition does not change its boolean " "value::" @@ -909,20 +928,20 @@ msgstr "" "Donner un nom à la condition « aucun indicateur défini » ne change pas sa " "valeur booléenne ::" -#: howto/enum.rst:865 +#: howto/enum.rst:866 msgid ":class:`Flag` members can also be iterated over::" msgstr "On peut aussi itérer sur les membres d'une :class:`Flag` ::" # suit un : -#: howto/enum.rst:875 +#: howto/enum.rst:876 msgid "" "For the majority of new code, :class:`Enum` and :class:`Flag` are strongly " "recommended, since :class:`IntEnum` and :class:`IntFlag` break some semantic " "promises of an enumeration (by being comparable to integers, and thus by " -"transitivity to other unrelated enumerations). :class:`IntEnum` and :class:" -"`IntFlag` should be used only in cases where :class:`Enum` and :class:`Flag` " -"will not do; for example, when integer constants are replaced with " -"enumerations, or for interoperability with other systems." +"transitivity to other unrelated enumerations). :class:`IntEnum` " +"and :class:`IntFlag` should be used only in cases where :class:`Enum` " +"and :class:`Flag` will not do; for example, when integer constants are " +"replaced with enumerations, or for interoperability with other systems." msgstr "" "pour la majorité du code nouveau, :class:`Enum` et :class:`Flag` sont " "fortement recommandées, car :class:`IntEnum` et :class:`IntFlag` brisent " @@ -933,11 +952,11 @@ msgstr "" "exemple, lorsque des constantes entières sont remplacées par des " "énumérations, ou pour l'interopérabilité avec d'autres systèmes." -#: howto/enum.rst:885 +#: howto/enum.rst:886 msgid "Others" msgstr "Autres énumérations" -#: howto/enum.rst:887 +#: howto/enum.rst:888 msgid "" "While :class:`IntEnum` is part of the :mod:`enum` module, it would be very " "simple to implement independently::" @@ -945,48 +964,49 @@ msgstr "" "Bien que :class:`IntEnum` fasse partie du module :mod:`enum`, il serait très " "simple de l'implémenter indépendamment ::" -#: howto/enum.rst:893 +#: howto/enum.rst:894 +#, fuzzy msgid "" "This demonstrates how similar derived enumerations can be defined; for " -"example a :class:`FloatEnum` that mixes in :class:`float` instead of :class:" -"`int`." +"example a :class:`!FloatEnum` that mixes in :class:`float` instead " +"of :class:`int`." msgstr "" "Ceci montre comment définir des énumérations dérivées similaires ; par " -"exemple une :class:`FloatEnum` qui utilise :class:`float` au lieu de :class:" -"`int`." +"exemple une :class:`FloatEnum` qui utilise :class:`float` au lieu " +"de :class:`int`." -#: howto/enum.rst:896 +#: howto/enum.rst:897 msgid "Some rules:" msgstr "Quelques règles :" -#: howto/enum.rst:898 +#: howto/enum.rst:899 #, fuzzy msgid "" -"When subclassing :class:`Enum`, mix-in types must appear before the :class:" -"`Enum` class itself in the sequence of bases, as in the :class:`IntEnum` " -"example above." +"When subclassing :class:`Enum`, mix-in types must appear before " +"the :class:`Enum` class itself in the sequence of bases, as in " +"the :class:`IntEnum` example above." msgstr "" "Lorsque vous dérivez :class:`Enum`, les classes mères mélangées doivent " "apparaître avant :class:`Enum` elle-même dans la liste des classes mères, " "comme dans l'exemple :class:`IntEnum` ci-dessus." -#: howto/enum.rst:901 +#: howto/enum.rst:902 msgid "" -"Mix-in types must be subclassable. For example, :class:`bool` and :class:" -"`range` are not subclassable and will throw an error during Enum creation if " -"used as the mix-in type." +"Mix-in types must be subclassable. For example, :class:`bool` " +"and :class:`range` are not subclassable and will throw an error during Enum " +"creation if used as the mix-in type." msgstr "" -"Les types mélangés doivent pouvoir être sous-classés. Par exemple, :class:" -"`bool` et :class:`range` ne peuvent pas être sous-classés et génèrent une " -"erreur lors de la création d'une énumération s'ils sont utilisés comme type " -"de mélange." +"Les types mélangés doivent pouvoir être sous-classés. Par " +"exemple, :class:`bool` et :class:`range` ne peuvent pas être sous-classés et " +"génèrent une erreur lors de la création d'une énumération s'ils sont " +"utilisés comme type de mélange." -#: howto/enum.rst:904 +#: howto/enum.rst:905 msgid "" "While :class:`Enum` can have members of any type, once you mix in an " -"additional type, all the members must have values of that type, e.g. :class:" -"`int` above. This restriction does not apply to mix-ins which only add " -"methods and don't specify another type." +"additional type, all the members must have values of that type, " +"e.g. :class:`int` above. This restriction does not apply to mix-ins which " +"only add methods and don't specify another type." msgstr "" "Alors qu':class:`Enum` peut avoir des membres de n'importe quel type, une " "fois que vous avez mélangé un type supplémentaire, tous les membres doivent " @@ -994,70 +1014,78 @@ msgstr "" "restriction ne s'applique pas aux classes de mélange qui ajoutent uniquement " "des méthodes et ne spécifient pas d'autre type." -#: howto/enum.rst:908 +#: howto/enum.rst:909 +#, fuzzy msgid "" -"When another data type is mixed in, the :attr:`value` attribute is *not the " -"same* as the enum member itself, although it is equivalent and will compare " -"equal." +"When another data type is mixed in, the :attr:`~Enum.value` attribute is " +"*not the same* as the enum member itself, although it is equivalent and will " +"compare equal." msgstr "" "Lorsqu'un autre type de données est mélangé, l'attribut :attr:`value` n'est " "*pas le même* que le membre de l'énumération en tant que tel, bien qu'il " "soit équivalent et renvoie égal lors d'une comparaison." -#: howto/enum.rst:911 +#: howto/enum.rst:912 msgid "" -"A ``data type`` is a mixin that defines :meth:`__new__`, or a :class:" -"`~dataclasses.dataclass`" +"A ``data type`` is a mixin that defines :meth:`~object.__new__`, or " +"a :class:`~dataclasses.dataclass`" msgstr "" -#: howto/enum.rst:913 +#: howto/enum.rst:914 +#, fuzzy msgid "" -"%-style formatting: ``%s`` and ``%r`` call the :class:`Enum` class's :meth:" -"`__str__` and :meth:`__repr__` respectively; other codes (such as ``%i`` or " -"``%h`` for IntEnum) treat the enum member as its mixed-in type." +"%-style formatting: ``%s`` and ``%r`` call the :class:`Enum` " +"class's :meth:`~object.__str__` and :meth:`~object.__repr__` respectively; " +"other codes (such as ``%i`` or ``%h`` for IntEnum) treat the enum member as " +"its mixed-in type." msgstr "" "Formatage de style % : ``%s`` et ``%r`` appellent respectivement les " "méthodes :meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; " "d'autres codes (tels que ``%i`` ou ``%h`` pour *IntEnum*) traitent le membre " "de l’énumération comme son type mélangé." -#: howto/enum.rst:916 +#: howto/enum.rst:917 +#, fuzzy msgid "" -":ref:`Formatted string literals `, :meth:`str.format`, and :func:" -"`format` will use the enum's :meth:`__str__` method." +":ref:`Formatted string literals `, :meth:`str.format`, " +"and :func:`format` will use the enum's :meth:`~object.__str__` method." msgstr "" -":ref:`Les littéraux de chaîne formatés `, :meth:`str.format` et :" -"func:`format` utilisent la méthode :meth:`__str__` de l'énumération." +":ref:`Les littéraux de chaîne formatés `, :meth:`str.format` " +"et :func:`format` utilisent la méthode :meth:`__str__` de l'énumération." # suit un : -#: howto/enum.rst:921 +#: howto/enum.rst:922 #, fuzzy msgid "" "Because :class:`IntEnum`, :class:`IntFlag`, and :class:`StrEnum` are " -"designed to be drop-in replacements for existing constants, their :meth:" -"`__str__` method has been reset to their data types' :meth:`__str__` method." +"designed to be drop-in replacements for existing constants, " +"their :meth:`~object.__str__` method has been reset to their data " +"types' :meth:`~object.__str__` method." msgstr "" "étant donné que :class:`IntEnum`, :class:`IntFlag` et :class:`StrEnum` sont " -"conçus pour remplacer des constantes existantes, leur méthode :meth:" -"`__str__` a été réinitialisée à la méthode :meth:`__str__` de leur type de " -"donnée." +"conçus pour remplacer des constantes existantes, leur " +"méthode :meth:`__str__` a été réinitialisée à la méthode :meth:`__str__` de " +"leur type de donnée." -#: howto/enum.rst:929 -msgid "When to use :meth:`__new__` vs. :meth:`__init__`" +#: howto/enum.rst:930 +#, fuzzy +msgid "When to use :meth:`~object.__new__` vs. :meth:`~object.__init__`" msgstr "Utilisation de :meth:`__new__` ou de :meth:`__init__`" -#: howto/enum.rst:931 +#: howto/enum.rst:932 +#, fuzzy msgid "" -":meth:`__new__` must be used whenever you want to customize the actual value " -"of the :class:`Enum` member. Any other modifications may go in either :meth:" -"`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred." +":meth:`~object.__new__` must be used whenever you want to customize the " +"actual value of the :class:`Enum` member. Any other modifications may go in " +"either :meth:`~object.__new__` or :meth:`~object.__init__`, " +"with :meth:`~object.__init__` being preferred." msgstr "" ":meth:`__new__` doit être utilisée chaque fois que vous souhaitez " "personnaliser la valeur réelle des membres d'une :class:`Enum`. Pour les " "autres personnalisations, elles peuvent être définies dans :meth:`__new__` " "ou :meth:`__init__`, avec une préférence pour :meth:`__init__`." -#: howto/enum.rst:935 +#: howto/enum.rst:936 msgid "" "For example, if you want to pass several items to the constructor, but only " "want one of them to be the value::" @@ -1065,158 +1093,32 @@ msgstr "" "Par exemple, si vous souhaitez passer plusieurs éléments au constructeur, " "mais que vous souhaitez qu'un seul d'entre eux soit la valeur ::" -#: howto/enum.rst:962 +#: howto/enum.rst:963 msgid "" "*Do not* call ``super().__new__()``, as the lookup-only ``__new__`` is the " "one that is found; instead, use the data type directly." msgstr "" -#: howto/enum.rst:967 +#: howto/enum.rst:968 msgid "Finer Points" msgstr "Approfondissements" -#: howto/enum.rst:970 -msgid "Supported ``__dunder__`` names" -msgstr "Noms de la forme ``__dunder__`` disponibles" - -#: howto/enum.rst:972 -msgid "" -":attr:`__members__` is a read-only ordered mapping of ``member_name``:" -"``member`` items. It is only available on the class." -msgstr "" -":attr:`__members__` est un dictionnaire ordonné d'éléments en lecture seule " -"de la forme ``nom_du_membre`` : ``membre``. Il n'est disponible que dans la " -"classe." - -#: howto/enum.rst:975 -msgid "" -":meth:`__new__`, if specified, must create and return the enum members; it " -"is also a very good idea to set the member's :attr:`_value_` appropriately. " -"Once all the members are created it is no longer used." -msgstr "" -"La méthode :meth:`__new__`, si elle est définie, doit créer et renvoyer les " -"membres de l'énumération ; affecter correctement l'attribut :attr:`_value_` " -"du membre est également conseillé. Une fois que tous les membres ont été " -"créés, cette méthode n'est plus utilisée." - -#: howto/enum.rst:981 -msgid "Supported ``_sunder_`` names" -msgstr "Noms de la forme ``_sunder_`` disponibles" - -#: howto/enum.rst:983 +#: howto/enum.rst:971 #, fuzzy -msgid ":attr:`~Enum._name_` -- name of the member" -msgstr "``_name_`` — nom du membre" - -#: howto/enum.rst:984 -#, fuzzy -msgid ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" -msgstr "" -"``_value_`` — valeur du membre ; il est possible d'y accéder et de la " -"modifier dans ``__new__``" - -#: howto/enum.rst:985 -#, fuzzy -msgid "" -":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " -"may be overridden" -msgstr "" -"``_missing_`` — fonction de recherche qui est appelée quand la valeur n'est " -"pas trouvée ; elle peut être surchargée" - -#: howto/enum.rst:987 -#, fuzzy -msgid "" -":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a :" -"class:`str`, that will not be transformed into members, and will be removed " -"from the final class" -msgstr "" -"``_ignore_`` — liste de noms, sous la forme d'une :func:`list` ou d'une :" -"func:`str`, qui ne sont pas convertis en membres et sont supprimés de la " -"classe résultante" - -#: howto/enum.rst:990 -#, fuzzy -msgid "" -":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " -"an enum member; may be overridden" -msgstr "" -"``_generate_next_value_`` — utilisé par l'`API fonctionnelle`_ et par :class:" -"`auto` pour obtenir une valeur appropriée pour un membre de l'énumération ; " -"elle peut être surchargée" - -#: howto/enum.rst:992 -msgid "" -":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " -"member." -msgstr "" - -#: howto/enum.rst:994 -msgid "" -":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " -"existing member. See `MultiValueEnum`_ for an example." -msgstr "" - -# suit un : -#: howto/enum.rst:999 -#, fuzzy -msgid "" -"For standard :class:`Enum` classes the next value chosen is the highest " -"value seen incremented by one." -msgstr "" -"pour les classes standard :class:`Enum`, la valeur choisie suivante est la " -"dernière valeur vue incrémentée de un." - -#: howto/enum.rst:1002 -#, fuzzy -msgid "" -"For :class:`Flag` classes the next value chosen will be the next highest " -"power-of-two." -msgstr "" -"Pour les classes :class:`Flag`, la valeur choisie suivante est la prochaine " -"puissance de deux la plus élevée, quelle que soit la dernière valeur vue." - -#: howto/enum.rst:1005 -msgid "" -"Prior versions would use the last seen value instead of the highest value." -msgstr "" - -#: howto/enum.rst:1008 -msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" -msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" - -#: howto/enum.rst:1009 -msgid "``_ignore_``" -msgstr "``_ignore_``" - -#: howto/enum.rst:1010 -msgid "``_add_alias_``, ``_add_value_alias_``" -msgstr "" - -#: howto/enum.rst:1012 -msgid "" -"To help keep Python 2 / Python 3 code in sync an :attr:`_order_` attribute " -"can be provided. It will be checked against the actual order of the " -"enumeration and raise an error if the two do not match::" -msgstr "" -"Pour aider à garder le code Python 2 / Python 3 synchronisé, un attribut :" -"attr:`_order_` peut être fourni. Il est vérifié par rapport à l'ordre réel " -"de l'énumération et lève une erreur si les deux ne correspondent pas ::" +msgid "Supported ``__dunder__`` and ``_sunder_`` names" +msgstr "Noms de la forme ``__dunder__`` disponibles" -# suit un : -#: howto/enum.rst:1030 +#: howto/enum.rst:973 msgid "" -"In Python 2 code the :attr:`_order_` attribute is necessary as definition " -"order is lost before it can be recorded." +"The supported ``__dunder__`` and ``_sunder_`` names can be found in " +"the :ref:`Enum API documentation `." msgstr "" -"dans le code Python 2, l'attribut :attr:`_order_` est nécessaire car l'ordre " -"de définition est perdu avant de pouvoir être enregistré." -#: howto/enum.rst:1035 +#: howto/enum.rst:977 msgid "_Private__names" msgstr "*_Private__names*" -#: howto/enum.rst:1037 +#: howto/enum.rst:979 msgid "" ":ref:`Private names ` are not converted to enum " "members, but remain normal attributes." @@ -1224,11 +1126,11 @@ msgstr "" ":ref:`Les noms privés ` ne sont pas convertis en " "membres de l'énumération, mais restent des attributs normaux." -#: howto/enum.rst:1044 +#: howto/enum.rst:986 msgid "``Enum`` member type" msgstr "Types des membres d'une ``Enum``" -#: howto/enum.rst:1046 +#: howto/enum.rst:988 #, fuzzy msgid "" "Enum members are instances of their enum class, and are normally accessed as " @@ -1244,62 +1146,62 @@ msgstr "" "partir d'autres membres — cette pratique était déconseillée et dans " "``3.11`` :class:`Enum` ne l'autorise pas ::" -#: howto/enum.rst:1057 +#: howto/enum.rst:999 msgid "Creating members that are mixed with other data types" msgstr "Création de membres mélangés avec d'autres types de données" -#: howto/enum.rst:1059 +#: howto/enum.rst:1001 msgid "" "When subclassing other data types, such as :class:`int` or :class:`str`, " "with an :class:`Enum`, all values after the ``=`` are passed to that data " "type's constructor. For example::" msgstr "" -"Lorsque vous dérivez d'autres types de données, tels que :class:`int` ou :" -"class:`str`, avec une :class:`Enum`, toutes les valeurs après ``=`` sont " +"Lorsque vous dérivez d'autres types de données, tels que :class:`int` " +"ou :class:`str`, avec une :class:`Enum`, toutes les valeurs après ``=`` sont " "passées au constructeur de ce type de données. Par exemple ::" -#: howto/enum.rst:1071 +#: howto/enum.rst:1013 msgid "Boolean value of ``Enum`` classes and members" msgstr "Valeur booléenne des classes et membres ``Enum``" -#: howto/enum.rst:1073 +#: howto/enum.rst:1015 msgid "" -"Enum classes that are mixed with non-:class:`Enum` types (such as :class:" -"`int`, :class:`str`, etc.) are evaluated according to the mixed-in type's " -"rules; otherwise, all members evaluate as :data:`True`. To make your own " -"enum's boolean evaluation depend on the member's value add the following to " -"your class::" +"Enum classes that are mixed with non-:class:`Enum` types (such " +"as :class:`int`, :class:`str`, etc.) are evaluated according to the mixed-in " +"type's rules; otherwise, all members evaluate as :data:`True`. To make your " +"own enum's boolean evaluation depend on the member's value add the following " +"to your class::" msgstr "" -"Les classes *Enum* mélangées avec des types non-:class:`Enum` (tels que :" -"class:`int`, :class:`str`, etc.) sont évaluées selon les règles du type " +"Les classes *Enum* mélangées avec des types non-:class:`Enum` (tels " +"que :class:`int`, :class:`str`, etc.) sont évaluées selon les règles du type " "mélangé ; sinon, tous les membres sont évalués comme :data:`True`. Pour que " "l'évaluation booléenne de votre propre énumération dépende de la valeur du " "membre, ajoutez ce qui suit à votre classe ::" -#: howto/enum.rst:1082 +#: howto/enum.rst:1024 msgid "Plain :class:`Enum` classes always evaluate as :data:`True`." msgstr "" "Les classes simples :class:`Enum` sont toujours évaluées comme :data:`True`." -#: howto/enum.rst:1086 +#: howto/enum.rst:1028 msgid "``Enum`` classes with methods" msgstr "Méthodes dans les classes ``Enum``" -#: howto/enum.rst:1088 +#: howto/enum.rst:1030 msgid "" "If you give your enum subclass extra methods, like the `Planet`_ class " "below, those methods will show up in a :func:`dir` of the member, but not of " "the class::" msgstr "" "Si vous dotez votre sous-classe énumération de méthodes supplémentaires, " -"comme la classe `Planet`_ ci-dessous, ces méthodes apparaissent dans le :" -"func:`dir` des membres, mais pas dans celui de la classe ::" +"comme la classe `Planet`_ ci-dessous, ces méthodes apparaissent dans " +"le :func:`dir` des membres, mais pas dans celui de la classe ::" -#: howto/enum.rst:1099 +#: howto/enum.rst:1041 msgid "Combining members of ``Flag``" msgstr "Combinaisons de membres de ``Flag``" -#: howto/enum.rst:1101 +#: howto/enum.rst:1043 msgid "" "Iterating over a combination of :class:`Flag` members will only return the " "members that are comprised of a single bit::" @@ -1307,31 +1209,31 @@ msgstr "" "L'itération sur une combinaison de membres :class:`Flag` ne renvoie que les " "membres dont un seul bit est à 1 ::" -#: howto/enum.rst:1119 +#: howto/enum.rst:1061 msgid "``Flag`` and ``IntFlag`` minutia" msgstr "Précisions sur ``Flag`` et ``IntFlag``" -#: howto/enum.rst:1121 +#: howto/enum.rst:1063 msgid "Using the following snippet for our examples::" msgstr "En utilisant l'extrait suivant pour nos exemples ::" -#: howto/enum.rst:1132 +#: howto/enum.rst:1074 msgid "the following are true:" msgstr "ce qui suit est vrai :" -#: howto/enum.rst:1134 +#: howto/enum.rst:1076 msgid "single-bit flags are canonical" msgstr "les membres dont un seul bit est à 1 sont canoniques ;" -#: howto/enum.rst:1135 +#: howto/enum.rst:1077 msgid "multi-bit and zero-bit flags are aliases" msgstr "ceux qui ont plusieurs bits à 1 ou aucun bit à 1 sont des synonymes ;" -#: howto/enum.rst:1136 +#: howto/enum.rst:1078 msgid "only canonical flags are returned during iteration::" msgstr "seuls les membres canoniques sont renvoyés pendant une itération ::" -#: howto/enum.rst:1141 +#: howto/enum.rst:1083 msgid "" "negating a flag or flag set returns a new flag/flag set with the " "corresponding positive integer value::" @@ -1340,19 +1242,19 @@ msgstr "" "membre (ou composition de membres) avec la valeur entière positive " "correspondante ::" -#: howto/enum.rst:1150 +#: howto/enum.rst:1092 msgid "names of pseudo-flags are constructed from their members' names::" msgstr "" "les noms des pseudo-membres sont construits à partir des noms de leurs " "membres ::" -#: howto/enum.rst:1163 +#: howto/enum.rst:1105 msgid "multi-bit flags, aka aliases, can be returned from operations::" msgstr "" "les membres avec plusieurs bits à 1 (des alias) peuvent être renvoyés par " "les opérations ::" -#: howto/enum.rst:1174 +#: howto/enum.rst:1116 msgid "" "membership / containment checking: zero-valued flags are always considered " "to be contained::" @@ -1360,7 +1262,7 @@ msgstr "" "pour la vérification d'appartenance, les membres dont la valeur est 0 sont " "toujours considérés comme étant membres ::" -#: howto/enum.rst:1180 +#: howto/enum.rst:1122 msgid "" "otherwise, only if all bits of one flag are in the other flag will True be " "returned::" @@ -1368,7 +1270,7 @@ msgstr "" "sinon, seulement si tous les bits à 1 d'un membre sont aussi à 1 dans " "l'autre membre, renvoie *True* ::" -#: howto/enum.rst:1189 +#: howto/enum.rst:1131 msgid "" "There is a new boundary mechanism that controls how out-of-range / invalid " "bits are handled: ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP``:" @@ -1377,110 +1279,114 @@ msgstr "" "les bits hors plage/invalides sont gérés : ``STRICT``, ``CONFORM``, " "``EJECT`` et ``KEEP`` :" -#: howto/enum.rst:1192 +#: howto/enum.rst:1134 msgid "STRICT --> raises an exception when presented with invalid values" msgstr "" "*STRICT* --> lève une exception lorsqu'on lui présente des valeurs invalides" -#: howto/enum.rst:1193 +#: howto/enum.rst:1135 msgid "CONFORM --> discards any invalid bits" msgstr "*CONFORM* --> ignore les bits invalides" -#: howto/enum.rst:1194 +#: howto/enum.rst:1136 msgid "EJECT --> lose Flag status and become a normal int with the given value" msgstr "" "*EJECT* --> la valeur présentée perd le statut de membre et devient un " "entier normal" -#: howto/enum.rst:1195 +#: howto/enum.rst:1137 msgid "KEEP --> keep the extra bits" msgstr "*KEEP* --> garde les bits supplémentaires" -#: howto/enum.rst:1197 +#: howto/enum.rst:1139 msgid "keeps Flag status and extra bits" msgstr "garde le statut de membre avec les bits supplémentaires" -#: howto/enum.rst:1198 +#: howto/enum.rst:1140 msgid "extra bits do not show up in iteration" msgstr "les bits supplémentaires ne sont pas produits dans une itération" -#: howto/enum.rst:1199 +#: howto/enum.rst:1141 msgid "extra bits do show up in repr() and str()" msgstr "" "les bits supplémentaires ne sont pas représentés par *repr()* et *str()*" -#: howto/enum.rst:1201 +#: howto/enum.rst:1143 msgid "" "The default for Flag is ``STRICT``, the default for ``IntFlag`` is " -"``EJECT``, and the default for ``_convert_`` is ``KEEP`` (see ``ssl." -"Options`` for an example of when ``KEEP`` is needed)." +"``EJECT``, and the default for ``_convert_`` is ``KEEP`` (see " +"``ssl.Options`` for an example of when ``KEEP`` is needed)." msgstr "" "La valeur par défaut pour *Flag* est ``STRICT``, la valeur par défaut pour " "``IntFlag`` est ``EJECT`` et la valeur par défaut pour ``_convert_`` est " "``KEEP`` (voir ``ssl.Options`` pour un exemple de cas où ``KEEP`` est " "nécessaire)." -#: howto/enum.rst:1209 +#: howto/enum.rst:1151 #, fuzzy msgid "How are Enums and Flags different?" msgstr "En quoi les énumérations sont-elles différentes ?" -#: howto/enum.rst:1211 +#: howto/enum.rst:1153 msgid "" -"Enums have a custom metaclass that affects many aspects of both derived :" -"class:`Enum` classes and their instances (members)." +"Enums have a custom metaclass that affects many aspects of both " +"derived :class:`Enum` classes and their instances (members)." msgstr "" "Les énumérations ont une métaclasse personnalisée qui modifie de nombreux " "aspects des classes dérivées d':class:`Enum` et de leurs instances (membres)." -#: howto/enum.rst:1216 +#: howto/enum.rst:1158 msgid "Enum Classes" msgstr "Classes *Enum*" -#: howto/enum.rst:1218 +#: howto/enum.rst:1160 #, fuzzy msgid "" -"The :class:`EnumType` metaclass is responsible for providing the :meth:" -"`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " -"allow one to do things with an :class:`Enum` class that fail on a typical " -"class, such as ``list(Color)`` or ``some_enum_var in Color``. :class:" -"`EnumType` is responsible for ensuring that various other methods on the " -"final :class:`Enum` class are correct (such as :meth:`__new__`, :meth:" -"`__getnewargs__`, :meth:`__str__` and :meth:`__repr__`)." -msgstr "" -"La métaclasse :class:`EnumType` est chargée de fournir :meth:" -"`__contains__`, :meth:`__dir__`, :meth:`__iter__` et d'autres méthodes qui " -"permettent de faire des choses avec une classe :class:`Enum` et qui échouent " -"sur une classe typique, telle que ``list(Color)`` ou ``une_variable_enum in " -"Color``. :class:`EnumType` est chargée de s'assurer que diverses autres " -"méthodes de la classe finale :class:`Enum` sont correctes (telles que :meth:" -"`__new__`, :meth:`__getnewargs__`, :meth:`__str__` et :meth:`__repr__`)." - -#: howto/enum.rst:1227 +"The :class:`EnumType` metaclass is responsible for providing " +"the :meth:`~object.__contains__`, :meth:`~object.__dir__`, :meth:`~object.__iter__` " +"and other methods that allow one to do things with an :class:`Enum` class " +"that fail on a typical class, such as ``list(Color)`` or ``some_enum_var in " +"Color``. :class:`EnumType` is responsible for ensuring that various other " +"methods on the final :class:`Enum` class are correct (such " +"as :meth:`~object.__new__`, :meth:`~object.__getnewargs__`, :meth:`~object.__str__` " +"and :meth:`~object.__repr__`)." +msgstr "" +"La métaclasse :class:`EnumType` est chargée de " +"fournir :meth:`__contains__`, :meth:`__dir__`, :meth:`__iter__` et d'autres " +"méthodes qui permettent de faire des choses avec une classe :class:`Enum` et " +"qui échouent sur une classe typique, telle que ``list(Color)`` ou " +"``une_variable_enum in Color``. :class:`EnumType` est chargée de s'assurer " +"que diverses autres méthodes de la classe finale :class:`Enum` sont " +"correctes (telles " +"que :meth:`__new__`, :meth:`__getnewargs__`, :meth:`__str__` " +"et :meth:`__repr__`)." + +#: howto/enum.rst:1169 #, fuzzy msgid "Flag Classes" msgstr "Classes *Enum*" -#: howto/enum.rst:1229 +#: howto/enum.rst:1171 msgid "" "Flags have an expanded view of aliasing: to be canonical, the value of a " "flag needs to be a power-of-two value, and not a duplicate name. So, in " -"addition to the :class:`Enum` definition of alias, a flag with no value (a.k." -"a. ``0``) or with more than one power-of-two value (e.g. ``3``) is " +"addition to the :class:`Enum` definition of alias, a flag with no value " +"(a.k.a. ``0``) or with more than one power-of-two value (e.g. ``3``) is " "considered an alias." msgstr "" -#: howto/enum.rst:1235 +#: howto/enum.rst:1177 msgid "Enum Members (aka instances)" msgstr "Membres d'une *Enum* (les instances)" -#: howto/enum.rst:1237 +#: howto/enum.rst:1179 +#, fuzzy msgid "" -"The most interesting thing about enum members is that they are singletons. :" -"class:`EnumType` creates them all while it is creating the enum class " -"itself, and then puts a custom :meth:`__new__` in place to ensure that no " -"new ones are ever instantiated by returning only the existing member " -"instances." +"The most interesting thing about enum members is that they are " +"singletons. :class:`EnumType` creates them all while it is creating the enum " +"class itself, and then puts a custom :meth:`~object.__new__` in place to " +"ensure that no new ones are ever instantiated by returning only the existing " +"member instances." msgstr "" "Le plus intéressant à propos des membres d'une énumération est que ce sont " "des singletons. :class:`EnumType` les crée tous pendant qu'il crée la classe " @@ -1488,54 +1394,55 @@ msgstr "" "personnalisée pour s'assurer qu'aucun nouveau membre n'est jamais instancié " "(en renvoyant uniquement les instances de membres existantes)." -#: howto/enum.rst:1243 +#: howto/enum.rst:1185 msgid "Flag Members" msgstr "" -#: howto/enum.rst:1245 +#: howto/enum.rst:1187 msgid "" "Flag members can be iterated over just like the :class:`Flag` class, and " "only the canonical members will be returned. For example::" msgstr "" -#: howto/enum.rst:1251 +#: howto/enum.rst:1193 msgid "(Note that ``BLACK``, ``PURPLE``, and ``WHITE`` do not show up.)" msgstr "" -#: howto/enum.rst:1253 +#: howto/enum.rst:1195 msgid "" "Inverting a flag member returns the corresponding positive value, rather " "than a negative value --- for example::" msgstr "" -#: howto/enum.rst:1259 +#: howto/enum.rst:1201 msgid "" "Flag members have a length corresponding to the number of power-of-two " "values they contain. For example::" msgstr "" -#: howto/enum.rst:1269 +#: howto/enum.rst:1211 msgid "Enum Cookbook" msgstr "" -#: howto/enum.rst:1272 +#: howto/enum.rst:1214 msgid "" -"While :class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, and :" -"class:`IntFlag` are expected to cover the majority of use-cases, they cannot " -"cover them all. Here are recipes for some different types of enumerations " -"that can be used directly, or as examples for creating one's own." +"While :class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, " +"and :class:`IntFlag` are expected to cover the majority of use-cases, they " +"cannot cover them all. Here are recipes for some different types of " +"enumerations that can be used directly, or as examples for creating one's " +"own." msgstr "" -":class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag` et :class:" -"`IntFlag` sont censées couvrir la majorité des cas d'utilisation, mais elles " -"ne peuvent pas tout couvrir. Voici quelques recettes pour différents types " -"d'énumérations qui peuvent être utilisées directement, ou pour servir " -"d'exemples afin de créer les vôtres." +":class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag` " +"et :class:`IntFlag` sont censées couvrir la majorité des cas d'utilisation, " +"mais elles ne peuvent pas tout couvrir. Voici quelques recettes pour " +"différents types d'énumérations qui peuvent être utilisées directement, ou " +"pour servir d'exemples afin de créer les vôtres." -#: howto/enum.rst:1279 +#: howto/enum.rst:1221 msgid "Omitting values" msgstr "Omission de valeurs" -#: howto/enum.rst:1281 +#: howto/enum.rst:1223 msgid "" "In many use-cases, one doesn't care what the actual value of an enumeration " "is. There are several ways to define this type of simple enumeration:" @@ -1544,27 +1451,28 @@ msgstr "" "d'une énumération. Il existe plusieurs manières de définir ce type " "d'énumération simple :" -#: howto/enum.rst:1284 +#: howto/enum.rst:1226 msgid "use instances of :class:`auto` for the value" msgstr "utilisez des instances d':class:`auto` pour la valeur ;" -#: howto/enum.rst:1285 +#: howto/enum.rst:1227 msgid "use instances of :class:`object` as the value" msgstr "utilisez des instances d':class:`object` comme valeur ;" -#: howto/enum.rst:1286 +#: howto/enum.rst:1228 msgid "use a descriptive string as the value" msgstr "utilisez une chaîne de caractères descriptive comme valeur ;" -#: howto/enum.rst:1287 +#: howto/enum.rst:1229 +#, fuzzy msgid "" -"use a tuple as the value and a custom :meth:`__new__` to replace the tuple " -"with an :class:`int` value" +"use a tuple as the value and a custom :meth:`~object.__new__` to replace the " +"tuple with an :class:`int` value" msgstr "" "utilisez un *n*-uplet comme valeur et une :meth:`__new__` personnalisée pour " "remplacer le *n*-uplet par une valeur :class:`int`." -#: howto/enum.rst:1290 +#: howto/enum.rst:1232 msgid "" "Using any of these methods signifies to the user that these values are not " "important, and also enables one to add, remove, or reorder members without " @@ -1574,47 +1482,50 @@ msgstr "" "ne sont pas importantes et permet également d'ajouter, de supprimer ou de " "réorganiser des membres sans avoir à renuméroter les autres membres." -#: howto/enum.rst:1296 +#: howto/enum.rst:1238 msgid "Using :class:`auto`" msgstr "Utilisation d':class:`auto`" -#: howto/enum.rst:1298 +#: howto/enum.rst:1240 msgid "Using :class:`auto` would look like::" msgstr "Voici un exemple où nous utilisons :class:`auto` ::" -#: howto/enum.rst:1310 +#: howto/enum.rst:1252 msgid "Using :class:`object`" msgstr "Utilisation d':class:`object`" -#: howto/enum.rst:1312 +#: howto/enum.rst:1254 msgid "Using :class:`object` would look like::" msgstr "Voici un exemple où nous utilisons :class:`object` ::" -#: howto/enum.rst:1322 +#: howto/enum.rst:1264 +#, fuzzy msgid "" -"This is also a good example of why you might want to write your own :meth:" -"`__repr__`::" +"This is also a good example of why you might want to write your " +"own :meth:`~object.__repr__`::" msgstr "" -"Voici un bon exemple montrant pourquoi vouloir écrire sa propre :meth:" -"`__repr__` ::" +"Voici un bon exemple montrant pourquoi vouloir écrire sa " +"propre :meth:`__repr__` ::" -#: howto/enum.rst:1338 +#: howto/enum.rst:1280 msgid "Using a descriptive string" msgstr "Utilisation d'une chaîne de caractères descriptive" -#: howto/enum.rst:1340 +#: howto/enum.rst:1282 msgid "Using a string as the value would look like::" msgstr "Voici un exemple où nous utilisons une chaîne de caractères ::" -#: howto/enum.rst:1352 -msgid "Using a custom :meth:`__new__`" +#: howto/enum.rst:1294 +#, fuzzy +msgid "Using a custom :meth:`~object.__new__`" msgstr "Utilisation d'une méthode :meth:`__new__` personnalisée" -#: howto/enum.rst:1354 -msgid "Using an auto-numbering :meth:`__new__` would look like::" +#: howto/enum.rst:1296 +#, fuzzy +msgid "Using an auto-numbering :meth:`~object.__new__` would look like::" msgstr "Cette méthode :meth:`__new__` numérote automatiquement ::" -#: howto/enum.rst:1371 +#: howto/enum.rst:1313 msgid "" "To make a more general purpose ``AutoNumber``, add ``*args`` to the " "signature::" @@ -1622,7 +1533,7 @@ msgstr "" "Pour créer une ``AutoNumber`` plus générale, ajoutons ``*args`` à la " "signature ::" -#: howto/enum.rst:1381 +#: howto/enum.rst:1323 msgid "" "Then when you inherit from ``AutoNumber`` you can write your own " "``__init__`` to handle any extra arguments::" @@ -1630,28 +1541,29 @@ msgstr "" "Ensuite, lorsque nous héritons de ``AutoNumber``, nous pouvons écrire notre " "propre ``__init__`` pour gérer les arguments supplémentaires ::" -#: howto/enum.rst:1400 +#: howto/enum.rst:1342 +#, fuzzy msgid "" -"The :meth:`__new__` method, if defined, is used during creation of the Enum " -"members; it is then replaced by Enum's :meth:`__new__` which is used after " -"class creation for lookup of existing members." +"The :meth:`~object.__new__` method, if defined, is used during creation of " +"the Enum members; it is then replaced by Enum's :meth:`~object.__new__` " +"which is used after class creation for lookup of existing members." msgstr "" "la méthode :meth:`__new__`, si elle est définie, est utilisée lors de la " -"création des membres de l'énumération ; elle est ensuite remplacée par :meth:" -"`__new__` de l'*Enum* qui est utilisée après la création de la classe pour " -"la recherche des membres existants." +"création des membres de l'énumération ; elle est ensuite remplacée " +"par :meth:`__new__` de l'*Enum* qui est utilisée après la création de la " +"classe pour la recherche des membres existants." -#: howto/enum.rst:1406 +#: howto/enum.rst:1348 msgid "" "*Do not* call ``super().__new__()``, as the lookup-only ``__new__`` is the " "one that is found; instead, use the data type directly -- e.g.::" msgstr "" -#: howto/enum.rst:1413 +#: howto/enum.rst:1355 msgid "OrderedEnum" msgstr "Énumération ordonnée" -#: howto/enum.rst:1415 +#: howto/enum.rst:1357 msgid "" "An ordered enumeration that is not based on :class:`IntEnum` and so " "maintains the normal :class:`Enum` invariants (such as not being comparable " @@ -1661,12 +1573,12 @@ msgstr "" "maintient donc les invariants normaux d':class:`Enum` (comme ne pas pouvoir " "être comparée à d'autres énumérations) ::" -#: howto/enum.rst:1449 +#: howto/enum.rst:1391 msgid "DuplicateFreeEnum" msgstr "Énumération sans doublon" # name est bien corrigé par value dans upstream -#: howto/enum.rst:1451 +#: howto/enum.rst:1393 #, fuzzy msgid "" "Raises an error if a duplicate member value is found instead of creating an " @@ -1676,7 +1588,7 @@ msgstr "" "synonyme ::" # suit un : -#: howto/enum.rst:1476 +#: howto/enum.rst:1418 msgid "" "This is a useful example for subclassing Enum to add or change other " "behaviors as well as disallowing aliases. If the only desired change is " @@ -1684,42 +1596,44 @@ msgid "" msgstr "" "c'est un exemple utile de dérivation d'*Enum* pour ajouter ou modifier " "d'autres comportements ainsi que pour interdire les synonymes. Si le seul " -"changement souhaité est l'interdiction des synonymes, le décorateur :func:" -"`unique` peut être utilisé à la place." +"changement souhaité est l'interdiction des synonymes, le " +"décorateur :func:`unique` peut être utilisé à la place." -#: howto/enum.rst:1482 +#: howto/enum.rst:1425 msgid "MultiValueEnum" msgstr "" -#: howto/enum.rst:1484 +#: howto/enum.rst:1427 msgid "Supports having more than one value per member::" msgstr "" -#: howto/enum.rst:1505 +#: howto/enum.rst:1448 msgid "Planet" msgstr "Planète" -#: howto/enum.rst:1507 +#: howto/enum.rst:1450 +#, fuzzy msgid "" -"If :meth:`__new__` or :meth:`__init__` is defined, the value of the enum " -"member will be passed to those methods::" +"If :meth:`~object.__new__` or :meth:`~object.__init__` is defined, the value " +"of the enum member will be passed to those methods::" msgstr "" "Si :meth:`__new__` ou :meth:`__init__` est définie, la valeur du membre de " "l'énumération est passée à ces méthodes ::" -#: howto/enum.rst:1536 +#: howto/enum.rst:1479 msgid "TimePeriod" msgstr "Intervalle de temps" -#: howto/enum.rst:1538 -msgid "An example to show the :attr:`_ignore_` attribute in use::" +#: howto/enum.rst:1481 +#, fuzzy +msgid "An example to show the :attr:`~Enum._ignore_` attribute in use::" msgstr "Exemple pour montrer l'utilisation de l'attribut :attr:`_ignore_` ::" -#: howto/enum.rst:1557 +#: howto/enum.rst:1500 msgid "Subclassing EnumType" msgstr "Dérivations d'*EnumType*" -#: howto/enum.rst:1559 +#: howto/enum.rst:1502 msgid "" "While most enum needs can be met by customizing :class:`Enum` subclasses, " "either with class decorators or custom functions, :class:`EnumType` can be " @@ -1730,6 +1644,112 @@ msgstr "" "personnalisées, :class:`EnumType` peut être dérivée pour créer des " "énumérations vraiment différentes." +#, fuzzy +#~ msgid "" +#~ ":attr:`~enum.EnumType.__members__` is a read-only ordered mapping of " +#~ "``member_name``:``member`` items. It is only available on the class." +#~ msgstr "" +#~ ":attr:`__members__` est un dictionnaire ordonné d'éléments en lecture " +#~ "seule de la forme ``nom_du_membre`` : ``membre``. Il n'est disponible que " +#~ "dans la classe." + +#, fuzzy +#~ msgid "" +#~ ":meth:`~object.__new__`, if specified, must create and return the enum " +#~ "members; it is also a very good idea to set the " +#~ "member's :attr:`~Enum._value_` appropriately. Once all the members are " +#~ "created it is no longer used." +#~ msgstr "" +#~ "La méthode :meth:`__new__`, si elle est définie, doit créer et renvoyer " +#~ "les membres de l'énumération ; affecter correctement " +#~ "l'attribut :attr:`_value_` du membre est également conseillé. Une fois " +#~ "que tous les membres ont été créés, cette méthode n'est plus utilisée." + +#~ msgid "Supported ``_sunder_`` names" +#~ msgstr "Noms de la forme ``_sunder_`` disponibles" + +#, fuzzy +#~ msgid ":attr:`~Enum._name_` -- name of the member" +#~ msgstr "``_name_`` — nom du membre" + +#, fuzzy +#~ msgid "" +#~ ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" +#~ msgstr "" +#~ "``_value_`` — valeur du membre ; il est possible d'y accéder et de la " +#~ "modifier dans ``__new__``" + +#, fuzzy +#~ msgid "" +#~ ":meth:`~Enum._missing_` -- a lookup function used when a value is not " +#~ "found; may be overridden" +#~ msgstr "" +#~ "``_missing_`` — fonction de recherche qui est appelée quand la valeur " +#~ "n'est pas trouvée ; elle peut être surchargée" + +#, fuzzy +#~ msgid "" +#~ ":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or " +#~ "a :class:`str`, that will not be transformed into members, and will be " +#~ "removed from the final class" +#~ msgstr "" +#~ "``_ignore_`` — liste de noms, sous la forme d'une :func:`list` ou " +#~ "d'une :func:`str`, qui ne sont pas convertis en membres et sont supprimés " +#~ "de la classe résultante" + +#, fuzzy +#~ msgid "" +#~ ":meth:`~Enum._generate_next_value_` -- used to get an appropriate value " +#~ "for an enum member; may be overridden" +#~ msgstr "" +#~ "``_generate_next_value_`` — utilisé par l'`API fonctionnelle`_ et " +#~ "par :class:`auto` pour obtenir une valeur appropriée pour un membre de " +#~ "l'énumération ; elle peut être surchargée" + +# suit un : +#, fuzzy +#~ msgid "" +#~ "For standard :class:`Enum` classes the next value chosen is the highest " +#~ "value seen incremented by one." +#~ msgstr "" +#~ "pour les classes standard :class:`Enum`, la valeur choisie suivante est " +#~ "la dernière valeur vue incrémentée de un." + +#, fuzzy +#~ msgid "" +#~ "For :class:`Flag` classes the next value chosen will be the next highest " +#~ "power-of-two." +#~ msgstr "" +#~ "Pour les classes :class:`Flag`, la valeur choisie suivante est la " +#~ "prochaine puissance de deux la plus élevée, quelle que soit la dernière " +#~ "valeur vue." + +#~ msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" +#~ msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" + +#~ msgid "``_ignore_``" +#~ msgstr "``_ignore_``" + +#, fuzzy +#~ msgid "" +#~ "To help keep Python 2 / Python 3 code in sync an :attr:`~Enum._order_` " +#~ "attribute can be provided. It will be checked against the actual order " +#~ "of the enumeration and raise an error if the two do not match::" +#~ msgstr "" +#~ "Pour aider à garder le code Python 2 / Python 3 synchronisé, un " +#~ "attribut :attr:`_order_` peut être fourni. Il est vérifié par rapport à " +#~ "l'ordre réel de l'énumération et lève une erreur si les deux ne " +#~ "correspondent pas ::" + +# suit un : +#, fuzzy +#~ msgid "" +#~ "In Python 2 code the :attr:`~Enum._order_` attribute is necessary as " +#~ "definition order is lost before it can be recorded." +#~ msgstr "" +#~ "dans le code Python 2, l'attribut :attr:`_order_` est nécessaire car " +#~ "l'ordre de définition est perdu avant de pouvoir être enregistré." + #~ msgid "" #~ "``_order_`` -- used in Python 2/3 code to ensure member order is " #~ "consistent (class attribute, removed during class creation)" diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index 873b27f2f..a683f3439 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -23,8 +21,8 @@ msgstr "" #: howto/free-threading-extensions.rst:9 msgid "" -"Starting with the 3.13 release, CPython has experimental support for running " -"with the :term:`global interpreter lock` (GIL) disabled in a configuration " +"Starting with the 3.13 release, CPython has support for running with " +"the :term:`global interpreter lock` (GIL) disabled in a configuration " "called :term:`free threading`. This document describes how to adapt C API " "extensions to support free threading." msgstr "" @@ -41,71 +39,86 @@ msgid "" "threaded build::" msgstr "" -#: howto/free-threading-extensions.rst:27 +#: howto/free-threading-extensions.rst:28 +msgid "" +"On Windows, this macro is not defined automatically, but must be specified " +"to the compiler when building. The :func:`sysconfig.get_config_var` function " +"can be used to determine whether the current running interpreter had the " +"macro defined." +msgstr "" + +#: howto/free-threading-extensions.rst:35 msgid "Module Initialization" msgstr "" -#: howto/free-threading-extensions.rst:29 +#: howto/free-threading-extensions.rst:37 msgid "" "Extension modules need to explicitly indicate that they support running with " "the GIL disabled; otherwise importing the extension will raise a warning and " "enable the GIL at runtime." msgstr "" -#: howto/free-threading-extensions.rst:33 +#: howto/free-threading-extensions.rst:41 msgid "" "There are two ways to indicate that an extension module supports running " "with the GIL disabled depending on whether the extension uses multi-phase or " "single-phase initialization." msgstr "" -#: howto/free-threading-extensions.rst:38 +#: howto/free-threading-extensions.rst:46 msgid "Multi-Phase Initialization" msgstr "" -#: howto/free-threading-extensions.rst:40 +#: howto/free-threading-extensions.rst:48 msgid "" -"Extensions that use multi-phase initialization (i.e., :c:func:" -"`PyModuleDef_Init`) should add a :c:data:`Py_mod_gil` slot in the module " -"definition. If your extension supports older versions of CPython, you " -"should guard the slot with a :c:data:`PY_VERSION_HEX` check." +"Extensions that use :ref:`multi-phase initialization ` (functions " +"like :c:func:`PyModuleDef_Init`, :c:func:`PyModExport_* " +"` export hook, :c:func:`PyModule_FromSlotsAndSpec`) " +"should add a :c:data:`Py_mod_gil` slot in the module definition. If your " +"extension supports older versions of CPython, you should guard the slot with " +"a :c:data:`PY_VERSION_HEX` check." msgstr "" -#: howto/free-threading-extensions.rst:63 +#: howto/free-threading-extensions.rst:68 msgid "Single-Phase Initialization" msgstr "" -#: howto/free-threading-extensions.rst:65 +#: howto/free-threading-extensions.rst:70 msgid "" -"Extensions that use single-phase initialization (i.e., :c:func:" -"`PyModule_Create`) should call :c:func:`PyUnstable_Module_SetGIL` to " -"indicate that they support running with the GIL disabled. The function is " -"only defined in the free-threaded build, so you should guard the call with " -"``#ifdef Py_GIL_DISABLED`` to avoid compilation errors in the regular build." +"Extensions that use legacy :ref:`single-phase initialization ` (that is, :c:func:`PyModule_Create`) should " +"call :c:func:`PyUnstable_Module_SetGIL` to indicate that they support " +"running with the GIL disabled. The function is only defined in the free-" +"threaded build, so you should guard the call with ``#ifdef Py_GIL_DISABLED`` " +"to avoid compilation errors in the regular build." msgstr "" -#: howto/free-threading-extensions.rst:93 +#: howto/free-threading-extensions.rst:98 msgid "General API Guidelines" msgstr "" -#: howto/free-threading-extensions.rst:95 +#: howto/free-threading-extensions.rst:100 msgid "Most of the C API is thread-safe, but there are some exceptions." msgstr "" -#: howto/free-threading-extensions.rst:97 +#: howto/free-threading-extensions.rst:102 msgid "" "**Struct Fields**: Accessing fields in Python C API objects or structs " "directly is not thread-safe if the field may be concurrently modified." msgstr "" -#: howto/free-threading-extensions.rst:99 +#: howto/free-threading-extensions.rst:104 msgid "" -"**Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM` and :c:macro:" -"`PyList_SET_ITEM` do not perform any error checking or locking. These macros " -"are not thread-safe if the container object may be modified concurrently." +"**Macros**: Accessor macros " +"like :c:macro:`PyList_GET_ITEM`, :c:macro:`PyList_SET_ITEM`, and macros " +"like :c:macro:`PySequence_Fast_GET_SIZE` that use the object returned " +"by :c:func:`PySequence_Fast` do not perform any error checking or locking. " +"These macros are not thread-safe if the container object may be modified " +"concurrently." msgstr "" -#: howto/free-threading-extensions.rst:103 +#: howto/free-threading-extensions.rst:110 msgid "" "**Borrowed References**: C API functions that return :term:`borrowed " "references ` may not be thread-safe if the containing " @@ -113,23 +126,23 @@ msgid "" "references ` for more information." msgstr "" -#: howto/free-threading-extensions.rst:110 +#: howto/free-threading-extensions.rst:117 msgid "Container Thread Safety" msgstr "" -#: howto/free-threading-extensions.rst:112 +#: howto/free-threading-extensions.rst:119 msgid "" -"Containers like :c:struct:`PyListObject`, :c:struct:`PyDictObject`, and :c:" -"struct:`PySetObject` perform internal locking in the free-threaded build. " -"For example, the :c:func:`PyList_Append` will lock the list before appending " -"an item." +"Containers like :c:struct:`PyListObject`, :c:struct:`PyDictObject`, " +"and :c:struct:`PySetObject` perform internal locking in the free-threaded " +"build. For example, the :c:func:`PyList_Append` will lock the list before " +"appending an item." msgstr "" -#: howto/free-threading-extensions.rst:120 +#: howto/free-threading-extensions.rst:127 msgid "``PyDict_Next``" msgstr "" -#: howto/free-threading-extensions.rst:122 +#: howto/free-threading-extensions.rst:129 msgid "" "A notable exception is :c:func:`PyDict_Next`, which does not lock the " "dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect " @@ -137,195 +150,216 @@ msgid "" "modified::" msgstr "" -#: howto/free-threading-extensions.rst:137 +#: howto/free-threading-extensions.rst:144 msgid "Borrowed References" msgstr "" -#: howto/free-threading-extensions.rst:141 +#: howto/free-threading-extensions.rst:148 msgid "" "Some C API functions return :term:`borrowed references `. These APIs are not thread-safe if the containing object is " -"modified concurrently. For example, it's not safe to use :c:func:" -"`PyList_GetItem` if the list may be modified concurrently." +"modified concurrently. For example, it's not safe to " +"use :c:func:`PyList_GetItem` if the list may be modified concurrently." msgstr "" -#: howto/free-threading-extensions.rst:146 +#: howto/free-threading-extensions.rst:153 msgid "" "The following table lists some borrowed reference APIs and their " "replacements that return :term:`strong references `." msgstr "" -#: howto/free-threading-extensions.rst:150 +#: howto/free-threading-extensions.rst:157 msgid "Borrowed reference API" msgstr "" -#: howto/free-threading-extensions.rst:150 +#: howto/free-threading-extensions.rst:157 msgid "Strong reference API" msgstr "" -#: howto/free-threading-extensions.rst:152 +#: howto/free-threading-extensions.rst:159 msgid ":c:func:`PyList_GetItem`" msgstr "" -#: howto/free-threading-extensions.rst:152 +#: howto/free-threading-extensions.rst:159 +#: howto/free-threading-extensions.rst:161 msgid ":c:func:`PyList_GetItemRef`" msgstr "" -#: howto/free-threading-extensions.rst:154 +#: howto/free-threading-extensions.rst:161 +msgid ":c:func:`PyList_GET_ITEM`" +msgstr "" + +#: howto/free-threading-extensions.rst:163 msgid ":c:func:`PyDict_GetItem`" msgstr "" -#: howto/free-threading-extensions.rst:154 -#: howto/free-threading-extensions.rst:156 +#: howto/free-threading-extensions.rst:163 +#: howto/free-threading-extensions.rst:165 msgid ":c:func:`PyDict_GetItemRef`" msgstr "" -#: howto/free-threading-extensions.rst:156 +#: howto/free-threading-extensions.rst:165 msgid ":c:func:`PyDict_GetItemWithError`" msgstr "" -#: howto/free-threading-extensions.rst:158 +#: howto/free-threading-extensions.rst:167 msgid ":c:func:`PyDict_GetItemString`" msgstr "" -#: howto/free-threading-extensions.rst:158 +#: howto/free-threading-extensions.rst:167 msgid ":c:func:`PyDict_GetItemStringRef`" msgstr "" -#: howto/free-threading-extensions.rst:160 +#: howto/free-threading-extensions.rst:169 msgid ":c:func:`PyDict_SetDefault`" msgstr "" -#: howto/free-threading-extensions.rst:160 +#: howto/free-threading-extensions.rst:169 msgid ":c:func:`PyDict_SetDefaultRef`" msgstr "" -#: howto/free-threading-extensions.rst:162 +#: howto/free-threading-extensions.rst:171 msgid ":c:func:`PyDict_Next`" msgstr "" -#: howto/free-threading-extensions.rst:162 +#: howto/free-threading-extensions.rst:171 msgid "none (see :ref:`PyDict_Next`)" msgstr "" -#: howto/free-threading-extensions.rst:164 -msgid ":c:func:`PyWeakref_GetObject`" +#: howto/free-threading-extensions.rst:173 +msgid ":c:func:`!PyWeakref_GetObject`" msgstr "" -#: howto/free-threading-extensions.rst:164 -#: howto/free-threading-extensions.rst:166 +#: howto/free-threading-extensions.rst:173 +#: howto/free-threading-extensions.rst:175 msgid ":c:func:`PyWeakref_GetRef`" msgstr "" -#: howto/free-threading-extensions.rst:166 -msgid ":c:func:`PyWeakref_GET_OBJECT`" +#: howto/free-threading-extensions.rst:175 +msgid ":c:func:`!PyWeakref_GET_OBJECT`" msgstr "" -#: howto/free-threading-extensions.rst:168 +#: howto/free-threading-extensions.rst:177 msgid ":c:func:`PyImport_AddModule`" msgstr "" -#: howto/free-threading-extensions.rst:168 +#: howto/free-threading-extensions.rst:177 msgid ":c:func:`PyImport_AddModuleRef`" msgstr "" -#: howto/free-threading-extensions.rst:171 -msgid "" -"Not all APIs that return borrowed references are problematic. For example, :" -"c:func:`PyTuple_GetItem` is safe because tuples are immutable. Similarly, " -"not all uses of the above APIs are problematic. For example, :c:func:" -"`PyDict_GetItem` is often used for parsing keyword argument dictionaries in " -"function calls; those keyword argument dictionaries are effectively private " -"(not accessible by other threads), so using borrowed references in that " -"context is safe." +#: howto/free-threading-extensions.rst:179 +msgid ":c:func:`PyCell_GET`" msgstr "" #: howto/free-threading-extensions.rst:179 +msgid ":c:func:`PyCell_Get`" +msgstr "" + +#: howto/free-threading-extensions.rst:182 +msgid "" +"Not all APIs that return borrowed references are problematic. For " +"example, :c:func:`PyTuple_GetItem` is safe because tuples are immutable. " +"Similarly, not all uses of the above APIs are problematic. For " +"example, :c:func:`PyDict_GetItem` is often used for parsing keyword argument " +"dictionaries in function calls; those keyword argument dictionaries are " +"effectively private (not accessible by other threads), so using borrowed " +"references in that context is safe." +msgstr "" + +#: howto/free-threading-extensions.rst:190 msgid "" "Some of these functions were added in Python 3.13. You can use the " "`pythoncapi-compat `_ package " "to provide implementations of these functions for older Python versions." msgstr "" -#: howto/free-threading-extensions.rst:187 +#: howto/free-threading-extensions.rst:198 msgid "Memory Allocation APIs" msgstr "" -#: howto/free-threading-extensions.rst:189 +#: howto/free-threading-extensions.rst:200 msgid "" -"Python's memory management C API provides functions in three different :ref:" -"`allocation domains `: \"raw\", \"mem\", and \"object\". " -"For thread-safety, the free-threaded build requires that only Python objects " -"are allocated using the object domain, and that all Python object are " -"allocated using that domain. This differs from the prior Python versions, " -"where this was only a best practice and not a hard requirement." +"Python's memory management C API provides functions in three " +"different :ref:`allocation domains `: \"raw\", \"mem\", " +"and \"object\". For thread-safety, the free-threaded build requires that " +"only Python objects are allocated using the object domain, and that all " +"Python objects are allocated using that domain. This differs from the prior " +"Python versions, where this was only a best practice and not a hard " +"requirement." msgstr "" -#: howto/free-threading-extensions.rst:198 +#: howto/free-threading-extensions.rst:209 msgid "" "Search for uses of :c:func:`PyObject_Malloc` in your extension and check " -"that the allocated memory is used for Python objects. Use :c:func:" -"`PyMem_Malloc` to allocate buffers instead of :c:func:`PyObject_Malloc`." +"that the allocated memory is used for Python objects. " +"Use :c:func:`PyMem_Malloc` to allocate buffers instead " +"of :c:func:`PyObject_Malloc`." msgstr "" -#: howto/free-threading-extensions.rst:205 +#: howto/free-threading-extensions.rst:216 msgid "Thread State and GIL APIs" msgstr "" -#: howto/free-threading-extensions.rst:207 +#: howto/free-threading-extensions.rst:218 msgid "" "Python provides a set of functions and macros to manage thread state and the " "GIL, such as:" msgstr "" -#: howto/free-threading-extensions.rst:210 +#: howto/free-threading-extensions.rst:221 +msgid "" +":c:func:`PyThreadState_Ensure`, :c:func:`PyThreadState_EnsureFromView`, " +"and :c:func:`PyThreadState_Release`" +msgstr "" + +#: howto/free-threading-extensions.rst:223 msgid ":c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`" msgstr "" -#: howto/free-threading-extensions.rst:211 +#: howto/free-threading-extensions.rst:224 msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`" msgstr "" -#: howto/free-threading-extensions.rst:212 +#: howto/free-threading-extensions.rst:225 msgid ":c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS`" msgstr "" -#: howto/free-threading-extensions.rst:214 +#: howto/free-threading-extensions.rst:227 msgid "" "These functions should still be used in the free-threaded build to manage " "thread state even when the :term:`GIL` is disabled. For example, if you " -"create a thread outside of Python, you must call :c:func:`PyGILState_Ensure` " -"before calling into the Python API to ensure that the thread has a valid " -"Python thread state." +"create a thread outside of Python, you must " +"call :c:func:`PyThreadState_Ensure` before calling into the Python API to " +"ensure that the thread has a valid Python thread state." msgstr "" -#: howto/free-threading-extensions.rst:220 +#: howto/free-threading-extensions.rst:233 msgid "" -"You should continue to call :c:func:`PyEval_SaveThread` or :c:macro:" -"`Py_BEGIN_ALLOW_THREADS` around blocking operations, such as I/O or lock " -"acquisitions, to allow other threads to run the :term:`cyclic garbage " -"collector `." +"You should continue to call :c:func:`PyEval_SaveThread` " +"or :c:macro:`Py_BEGIN_ALLOW_THREADS` around blocking operations, such as I/O " +"or lock acquisitions, to allow other threads to run the :term:`cyclic " +"garbage collector `." msgstr "" -#: howto/free-threading-extensions.rst:227 +#: howto/free-threading-extensions.rst:240 msgid "Protecting Internal Extension State" msgstr "" -#: howto/free-threading-extensions.rst:229 +#: howto/free-threading-extensions.rst:242 msgid "" "Your extension may have internal state that was previously protected by the " "GIL. You may need to add locking to protect this state. The approach will " "depend on your extension, but some common patterns include:" msgstr "" -#: howto/free-threading-extensions.rst:233 +#: howto/free-threading-extensions.rst:246 msgid "" "**Caches**: global caches are a common source of shared state. Consider " "using a lock to protect the cache or disabling it in the free-threaded build " "if the cache is not critical for performance." msgstr "" -#: howto/free-threading-extensions.rst:236 +#: howto/free-threading-extensions.rst:249 msgid "" "**Global State**: global state may need to be protected by a lock or moved " "to thread local storage. C11 and C++11 provide the ``thread_local`` or " @@ -333,34 +367,264 @@ msgid "" "language/storage_duration>`_." msgstr "" -#: howto/free-threading-extensions.rst:243 +#: howto/free-threading-extensions.rst:256 +msgid "Critical Sections" +msgstr "" + +#: howto/free-threading-extensions.rst:260 +msgid "" +"In the free-threaded build, CPython provides a mechanism called \"critical " +"sections\" to protect data that would otherwise be protected by the GIL. " +"While extension authors may not interact with the internal critical section " +"implementation directly, understanding their behavior is crucial when using " +"certain C API functions or managing shared state in the free-threaded build." +msgstr "" + +#: howto/free-threading-extensions.rst:267 +msgid "What Are Critical Sections?" +msgstr "" + +#: howto/free-threading-extensions.rst:269 +msgid "" +"Conceptually, critical sections act as a deadlock avoidance layer built on " +"top of simple mutexes. Each thread maintains a stack of active critical " +"sections. When a thread needs to acquire a lock associated with a critical " +"section (e.g., implicitly when calling a thread-safe C API function " +"like :c:func:`PyDict_SetItem`, or explicitly using macros), it attempts to " +"acquire the underlying mutex." +msgstr "" + +#: howto/free-threading-extensions.rst:277 +msgid "Using Critical Sections" +msgstr "" + +#: howto/free-threading-extensions.rst:279 +msgid "The primary APIs for using critical sections are:" +msgstr "" + +#: howto/free-threading-extensions.rst:281 +msgid "" +":c:macro:`Py_BEGIN_CRITICAL_SECTION` and :c:macro:`Py_END_CRITICAL_SECTION` " +"- For locking a single object" +msgstr "" + +#: howto/free-threading-extensions.rst:284 +msgid "" +":c:macro:`Py_BEGIN_CRITICAL_SECTION2` " +"and :c:macro:`Py_END_CRITICAL_SECTION2` - For locking two objects " +"simultaneously" +msgstr "" + +#: howto/free-threading-extensions.rst:287 +msgid "" +"These macros must be used in matching pairs and must appear in the same C " +"scope, since they establish a new local scope. These macros are no-ops in " +"non-free-threaded builds, so they can be safely added to code that needs to " +"support both build types." +msgstr "" + +#: howto/free-threading-extensions.rst:292 +msgid "" +"A common use of a critical section would be to lock an object while " +"accessing an internal attribute of it. For example, if an extension type " +"has an internal count field, you could use a critical section while reading " +"or writing that field::" +msgstr "" + +#: howto/free-threading-extensions.rst:311 +msgid "How Critical Sections Work" +msgstr "" + +#: howto/free-threading-extensions.rst:313 +msgid "" +"Unlike traditional locks, critical sections do not guarantee exclusive " +"access throughout their entire duration. If a thread would block while " +"holding a critical section (e.g., by acquiring another lock or performing I/" +"O), the critical section is temporarily suspended—all locks are released—and " +"then resumed when the blocking operation completes." +msgstr "" + +#: howto/free-threading-extensions.rst:319 +msgid "" +"This behavior is similar to what happens with the GIL when a thread makes a " +"blocking call. The key differences are:" +msgstr "" + +#: howto/free-threading-extensions.rst:322 +msgid "Critical sections operate on a per-object basis rather than globally" +msgstr "" + +#: howto/free-threading-extensions.rst:324 +msgid "" +"Critical sections follow a stack discipline within each thread (the " +"\"begin\" and \"end\" macros enforce this since they must be paired and " +"within the same scope)" +msgstr "" + +#: howto/free-threading-extensions.rst:327 +msgid "" +"Critical sections automatically release and reacquire locks around potential " +"blocking operations" +msgstr "" + +#: howto/free-threading-extensions.rst:331 +msgid "Deadlock Avoidance" +msgstr "" + +#: howto/free-threading-extensions.rst:333 +msgid "Critical sections help avoid deadlocks in two ways:" +msgstr "" + +#: howto/free-threading-extensions.rst:335 +msgid "" +"If a thread tries to acquire a lock that's already held by another thread, " +"it first suspends all of its active critical sections, temporarily releasing " +"their locks" +msgstr "" + +#: howto/free-threading-extensions.rst:339 +msgid "" +"When the blocking operation completes, only the top-most critical section is " +"reacquired first" +msgstr "" + +#: howto/free-threading-extensions.rst:342 +msgid "" +"This means you cannot rely on nested critical sections to lock multiple " +"objects at once, as the inner critical section may suspend the outer ones. " +"Instead, use :c:macro:`Py_BEGIN_CRITICAL_SECTION2` to lock two objects " +"simultaneously." +msgstr "" + +#: howto/free-threading-extensions.rst:346 +msgid "" +"Note that the locks described above are only :c:type:`PyMutex` based locks. " +"The critical section implementation does not know about or affect other " +"locking mechanisms that might be in use, like POSIX mutexes. Also note that " +"while blocking on any :c:type:`PyMutex` causes the critical sections to be " +"suspended, only the mutexes that are part of the critical sections are " +"released. If :c:type:`PyMutex` is used without a critical section, it will " +"not be released and therefore does not get the same deadlock avoidance." +msgstr "" + +#: howto/free-threading-extensions.rst:355 +msgid "Important Considerations" +msgstr "" + +#: howto/free-threading-extensions.rst:357 +msgid "" +"Critical sections may temporarily release their locks, allowing other " +"threads to modify the protected data. Be careful about making assumptions " +"about the state of the data after operations that might block." +msgstr "" + +#: howto/free-threading-extensions.rst:361 +msgid "" +"Because locks can be temporarily released (suspended), entering a critical " +"section does not guarantee exclusive access to the protected resource " +"throughout the section's duration. If code within a critical section calls " +"another function that blocks (e.g., acquires another lock, performs blocking " +"I/O), all locks held by the thread via critical sections will be released. " +"This is similar to how the GIL can be released during blocking calls." +msgstr "" + +#: howto/free-threading-extensions.rst:368 +msgid "" +"Only the lock(s) associated with the most recently entered (top-most) " +"critical section are guaranteed to be held at any given time. Locks for " +"outer, nested critical sections might have been suspended." +msgstr "" + +#: howto/free-threading-extensions.rst:372 +msgid "" +"You can lock at most two objects simultaneously with these APIs. If you need " +"to lock more objects, you'll need to restructure your code." +msgstr "" + +#: howto/free-threading-extensions.rst:375 +msgid "" +"While critical sections will not deadlock if you attempt to lock the same " +"object twice, they are less efficient than purpose-built reentrant locks for " +"this use case." +msgstr "" + +#: howto/free-threading-extensions.rst:379 +msgid "" +"When using :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, the order of the objects " +"doesn't affect correctness (the implementation handles deadlock avoidance), " +"but it's good practice to always lock objects in a consistent order." +msgstr "" + +#: howto/free-threading-extensions.rst:383 +msgid "" +"Remember that the critical section macros are primarily for protecting " +"access to *Python objects* that might be involved in internal CPython " +"operations susceptible to the deadlock scenarios described above. For " +"protecting purely internal extension state, standard mutexes or other " +"synchronization primitives might be more appropriate." +msgstr "" + +#: howto/free-threading-extensions.rst:392 +msgid "Per-Object Locks (``ob_mutex``)" +msgstr "" + +#: howto/free-threading-extensions.rst:394 +msgid "" +"In the free-threaded build, each Python object contains " +"a :c:member:`~PyObject.ob_mutex` field of type :c:type:`PyMutex`. This " +"mutex is **reserved for use by the critical section API** " +"(:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`)." +msgstr "" + +#: howto/free-threading-extensions.rst:401 +msgid "" +"Do **not** lock ``ob_mutex`` directly with ``PyMutex_Lock(&obj->ob_mutex)``. " +"Mixing direct ``PyMutex_Lock`` calls with the critical section API on the " +"same mutex can cause deadlocks." +msgstr "" + +#: howto/free-threading-extensions.rst:405 +msgid "" +"Even if your own code never uses critical sections on a particular object " +"type, **CPython internals may use the critical section API on any Python " +"object**." +msgstr "" + +#: howto/free-threading-extensions.rst:408 +msgid "" +"If your extension type needs its own lock, add a separate :c:type:`PyMutex` " +"field (or another synchronization primitive) to your object " +"struct. :c:type:`PyMutex` is very lightweight, so there is negligible cost " +"to having an additional one." +msgstr "" + +#: howto/free-threading-extensions.rst:415 msgid "Building Extensions for the Free-Threaded Build" msgstr "" -#: howto/free-threading-extensions.rst:245 +#: howto/free-threading-extensions.rst:417 msgid "" "C API extensions need to be built specifically for the free-threaded build. " "The wheels, shared libraries, and binaries are indicated by a ``t`` suffix." msgstr "" -#: howto/free-threading-extensions.rst:248 +#: howto/free-threading-extensions.rst:420 msgid "" "`pypa/manylinux `_ supports the free-" -"threaded build, with the ``t`` suffix, such as ``python3.13t``." +"threaded build, with the ``t`` suffix, such as ``python3.14t``." msgstr "" -#: howto/free-threading-extensions.rst:250 +#: howto/free-threading-extensions.rst:422 msgid "" -"`pypa/cibuildwheel `_ supports the " -"free-threaded build if you set `CIBW_FREE_THREADED_SUPPORT `_." +"`pypa/cibuildwheel `_ supports " +"building wheels for the free-threaded build of Python 3.14 and newer." msgstr "" -#: howto/free-threading-extensions.rst:255 +#: howto/free-threading-extensions.rst:426 msgid "Limited C API and Stable ABI" msgstr "" -#: howto/free-threading-extensions.rst:257 +#: howto/free-threading-extensions.rst:428 msgid "" "The free-threaded build does not currently support the :ref:`Limited C API " "` or the stable ABI. If you use `setuptools `_: A community-maintained porting guide for " diff --git a/howto/free-threading-python.po b/howto/free-threading-python.po index 5cf5abedc..247ef6de7 100644 --- a/howto/free-threading-python.po +++ b/howto/free-threading-python.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,77 +15,78 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Doc/howto/free-threading-python.rst:5 -msgid "Python experimental support for free threading" +#: howto/free-threading-python.rst:5 +msgid "Python support for free threading" msgstr "" -#: ../Doc/howto/free-threading-python.rst:7 +#: howto/free-threading-python.rst:7 msgid "" -"Starting with the 3.13 release, CPython has experimental support for a build " -"of Python called :term:`free threading` where the :term:`global interpreter " -"lock` (GIL) is disabled. Free-threaded execution allows for full " -"utilization of the available processing power by running threads in parallel " -"on available CPU cores. While not all software will benefit from this " -"automatically, programs designed with threading in mind will run faster on " -"multi-core hardware." +"Starting with the 3.13 release, CPython has support for a build of Python " +"called :term:`free threading` where the :term:`global interpreter lock` " +"(GIL) is disabled. Free-threaded execution allows for full utilization of " +"the available processing power by running threads in parallel on available " +"CPU cores. While not all software will benefit from this automatically, " +"programs designed with threading in mind will run faster on multi-core " +"hardware." msgstr "" -#: ../Doc/howto/free-threading-python.rst:14 +#: howto/free-threading-python.rst:14 msgid "" -"**The free-threaded mode is experimental** and work is ongoing to improve " -"it: expect some bugs and a substantial single-threaded performance hit." +"Some third-party packages, in particular ones with an :term:`extension " +"module`, may not be ready for use in a free-threaded build, and will re-" +"enable the :term:`GIL`." msgstr "" -#: ../Doc/howto/free-threading-python.rst:17 +#: howto/free-threading-python.rst:18 msgid "" "This document describes the implications of free threading for Python code. " "See :ref:`freethreading-extensions-howto` for information on how to write C " "extensions that support the free-threaded build." msgstr "" -#: ../Doc/howto/free-threading-python.rst:23 +#: howto/free-threading-python.rst:24 msgid "" ":pep:`703` – Making the Global Interpreter Lock Optional in CPython for an " "overall description of free-threaded Python." msgstr "" -#: ../Doc/howto/free-threading-python.rst:28 +#: howto/free-threading-python.rst:29 msgid "Installation" msgstr "" -#: ../Doc/howto/free-threading-python.rst:30 +#: howto/free-threading-python.rst:31 msgid "" "Starting with Python 3.13, the official macOS and Windows installers " "optionally support installing free-threaded Python binaries. The installers " "are available at https://www.python.org/downloads/." msgstr "" -#: ../Doc/howto/free-threading-python.rst:34 +#: howto/free-threading-python.rst:35 msgid "" "For information on other platforms, see the `Installing a Free-Threaded " -"Python `_, a " +"Python `_, a " "community-maintained installation guide for installing free-threaded Python." msgstr "" -#: ../Doc/howto/free-threading-python.rst:38 +#: howto/free-threading-python.rst:39 msgid "" "When building CPython from source, the :option:`--disable-gil` configure " "option should be used to build a free-threaded Python interpreter." msgstr "" -#: ../Doc/howto/free-threading-python.rst:43 +#: howto/free-threading-python.rst:44 msgid "Identifying free-threaded Python" msgstr "" -#: ../Doc/howto/free-threading-python.rst:45 +#: howto/free-threading-python.rst:46 msgid "" "To check if the current interpreter supports free-threading, :option:`python " -"-VV <-V>` and :attr:`sys.version` contain \"experimental free-threading " -"build\". The new :func:`sys._is_gil_enabled` function can be used to check " -"whether the GIL is actually disabled in the running process." +"-VV <-V>` and :data:`sys.version` contain \"free-threading build\". The " +"new :func:`sys._is_gil_enabled` function can be used to check whether the " +"GIL is actually disabled in the running process." msgstr "" -#: ../Doc/howto/free-threading-python.rst:50 +#: howto/free-threading-python.rst:51 msgid "" "The ``sysconfig.get_config_var(\"Py_GIL_DISABLED\")`` configuration variable " "can be used to determine whether the build supports free threading. If the " @@ -95,43 +94,43 @@ msgid "" "the recommended mechanism for decisions related to the build configuration." msgstr "" -#: ../Doc/howto/free-threading-python.rst:57 +#: howto/free-threading-python.rst:58 msgid "The global interpreter lock in free-threaded Python" msgstr "" -#: ../Doc/howto/free-threading-python.rst:59 +#: howto/free-threading-python.rst:60 msgid "" "Free-threaded builds of CPython support optionally running with the GIL " "enabled at runtime using the environment variable :envvar:`PYTHON_GIL` or " "the command-line option :option:`-X gil`." msgstr "" -#: ../Doc/howto/free-threading-python.rst:63 +#: howto/free-threading-python.rst:64 msgid "" "The GIL may also automatically be enabled when importing a C-API extension " "module that is not explicitly marked as supporting free threading. A " "warning will be printed in this case." msgstr "" -#: ../Doc/howto/free-threading-python.rst:67 +#: howto/free-threading-python.rst:68 msgid "" "In addition to individual package documentation, the following websites " "track the status of popular packages support for free threading:" msgstr "" -#: ../Doc/howto/free-threading-python.rst:70 +#: howto/free-threading-python.rst:71 msgid "https://py-free-threading.github.io/tracking/" msgstr "" -#: ../Doc/howto/free-threading-python.rst:71 +#: howto/free-threading-python.rst:72 msgid "https://hugovk.github.io/free-threaded-wheels/" msgstr "" -#: ../Doc/howto/free-threading-python.rst:75 +#: howto/free-threading-python.rst:76 msgid "Thread safety" msgstr "" -#: ../Doc/howto/free-threading-python.rst:77 +#: howto/free-threading-python.rst:78 msgid "" "The free-threaded build of CPython aims to provide similar thread-safety " "behavior at the Python level to the default GIL-enabled build. Built-in " @@ -143,115 +142,312 @@ msgid "" "current or future behavior." msgstr "" -#: ../Doc/howto/free-threading-python.rst:88 +#: howto/free-threading-python.rst:89 msgid "" "It's recommended to use the :class:`threading.Lock` or other synchronization " "primitives instead of relying on the internal locks of built-in types, when " "possible." msgstr "" -#: ../Doc/howto/free-threading-python.rst:94 +#: howto/free-threading-python.rst:95 msgid "Known limitations" msgstr "" -#: ../Doc/howto/free-threading-python.rst:96 +#: howto/free-threading-python.rst:97 msgid "" "This section describes known limitations of the free-threaded CPython build." msgstr "" -#: ../Doc/howto/free-threading-python.rst:99 +#: howto/free-threading-python.rst:100 msgid "Immortalization" msgstr "" -#: ../Doc/howto/free-threading-python.rst:101 +#: howto/free-threading-python.rst:102 msgid "" -"The free-threaded build of the 3.13 release makes some objects :term:" -"`immortal`. Immortal objects are not deallocated and have reference counts " -"that are never modified. This is done to avoid reference count contention " -"that would prevent efficient multi-threaded scaling." +"In the free-threaded build, some objects are :term:`immortal`. Immortal " +"objects are not deallocated and have reference counts that are never " +"modified. This is done to avoid reference count contention that would " +"prevent efficient multi-threaded scaling." msgstr "" -#: ../Doc/howto/free-threading-python.rst:106 +#: howto/free-threading-python.rst:107 +msgid "As of the 3.14 release, immortalization is limited to:" +msgstr "" + +#: howto/free-threading-python.rst:109 msgid "" -"An object will be made immortal when a new thread is started for the first " -"time after the main thread is running. The following objects are " -"immortalized:" +"Code constants: numeric literals, string literals, and tuple literals " +"composed of other constants." msgstr "" -#: ../Doc/howto/free-threading-python.rst:109 +#: howto/free-threading-python.rst:111 +msgid "Strings interned by :func:`sys.intern`." +msgstr "" + +#: howto/free-threading-python.rst:115 +msgid "Frame objects" +msgstr "Objets cadres" + +#: howto/free-threading-python.rst:117 msgid "" -":ref:`function ` objects declared at the module level" +"It is not safe to access :attr:`frame.f_locals` from a :ref:`frame ` object if that frame is currently executing in another thread, and " +"doing so may crash the interpreter." msgstr "" -#: ../Doc/howto/free-threading-python.rst:110 -msgid ":ref:`method ` descriptors" +#: howto/free-threading-python.rst:123 +msgid "Iterators" +msgstr "Itérateurs" + +#: howto/free-threading-python.rst:125 +msgid "" +"It is generally not thread-safe to access the same iterator object from " +"multiple threads concurrently, and threads may see duplicate or missing " +"elements." msgstr "" -#: ../Doc/howto/free-threading-python.rst:111 -msgid ":ref:`code ` objects" +#: howto/free-threading-python.rst:131 +msgid "Single-threaded performance" msgstr "" -#: ../Doc/howto/free-threading-python.rst:112 -msgid ":term:`module` objects and their dictionaries" +#: howto/free-threading-python.rst:133 +msgid "" +"The free-threaded build has additional overhead when executing Python code " +"compared to the default GIL-enabled build. The amount of overhead depends " +"on the workload and hardware. On the pyperformance benchmark suite, the " +"average overhead ranges from about 1% on macOS aarch64 to 8% on x86-64 Linux " +"systems." msgstr "" -#: ../Doc/howto/free-threading-python.rst:113 -msgid ":ref:`classes ` (type objects)" +#: howto/free-threading-python.rst:141 +msgid "Behavioral changes" msgstr "" -#: ../Doc/howto/free-threading-python.rst:115 +#: howto/free-threading-python.rst:143 msgid "" -"Because immortal objects are never deallocated, applications that create " -"many objects of these types may see increased memory usage. This is " -"expected to be addressed in the 3.14 release." +"This section describes CPython behavioural changes with the free-threaded " +"build." +msgstr "" + +#: howto/free-threading-python.rst:148 +msgid "Context variables" msgstr "" -#: ../Doc/howto/free-threading-python.rst:119 +#: howto/free-threading-python.rst:150 msgid "" -"Additionally, numeric and string literals in the code as well as strings " -"returned by :func:`sys.intern` are also immortalized. This behavior is " -"expected to remain in the 3.14 free-threaded build." +"In the free-threaded build, the " +"flag :data:`~sys.flags.thread_inherit_context` is set to true by default " +"which causes threads created with :class:`threading.Thread` to start with a " +"copy of the :class:`~contextvars.Context()` of the caller " +"of :meth:`~threading.Thread.start`. In the default GIL-enabled build, the " +"flag defaults to false so threads start with an " +"empty :class:`~contextvars.Context()`." msgstr "" -#: ../Doc/howto/free-threading-python.rst:125 -msgid "Frame objects" +#: howto/free-threading-python.rst:160 +msgid "Warning filters" +msgstr "" + +#: howto/free-threading-python.rst:162 +msgid "" +"In the free-threaded build, the " +"flag :data:`~sys.flags.context_aware_warnings` is set to true by default. " +"In the default GIL-enabled build, the flag defaults to false. If the flag " +"is true then the :class:`warnings.catch_warnings` context manager uses a " +"context variable for warning filters. If the flag is false " +"then :class:`~warnings.catch_warnings` modifies the global filters list, " +"which is not thread-safe. See the :mod:`warnings` module for more details." +msgstr "" + +#: howto/free-threading-python.rst:171 +msgid "Increased memory usage" +msgstr "" + +#: howto/free-threading-python.rst:173 +msgid "" +"The free-threaded build will typically use more memory compared to the " +"default build. There are multiple reasons for this, mostly due to design " +"decisions." +msgstr "" + +#: howto/free-threading-python.rst:178 +msgid "All interned strings are immortal" +msgstr "" + +#: howto/free-threading-python.rst:180 +msgid "" +"For modern Python versions (since version 2.3), interning a string (e.g. " +"with :func:`sys.intern`) does not cause it to become immortal. Instead, if " +"the last reference to that string disappears, it will be removed from the " +"interned string table. This is not the case for the free-threaded build and " +"any interned string will become immortal, surviving until interpreter " +"shutdown." +msgstr "" + +#: howto/free-threading-python.rst:188 +msgid "Non-GC objects have a larger object header" +msgstr "" + +#: howto/free-threading-python.rst:190 +msgid "" +"The free-threaded build uses a different :c:type:`PyObject` structure. " +"Instead of having the GC related information allocated before " +"the :c:type:`PyObject` structure, like in the default build, the GC related " +"info is part of the normal object header. For example, on the AMD64 " +"platform, ``None`` uses 32 bytes on the free-threaded build vs 16 bytes for " +"the default build. GC objects (such as dicts and lists) are the same size " +"for both builds since the free-threaded build does not use additional space " +"for the GC info." +msgstr "" + +#: howto/free-threading-python.rst:200 +msgid "QSBR can delay freeing of memory" +msgstr "" + +#: howto/free-threading-python.rst:202 +msgid "" +"In order to safely implement lock-free data structures, a safe memory " +"reclamation (SMR) scheme is used, known as quiescent state-based reclamation " +"(QSBR). This means that the memory backing data structures allowing lock-" +"free access will use QSBR, which defers the free operation, rather than " +"immediately freeing the memory. Two examples of these data structures are " +"the list object and the dictionary keys object. See ``InternalDocs/" +"qsbr.md`` in the CPython source tree for more details on how QSBR is " +"implemented. Running :func:`gc.collect` should cause all memory being held " +"by QSBR to be actually freed. Note that even when QSBR frees the memory, " +"the underlying memory allocator may not immediately return that memory to " +"the OS and so the resident set size (RSS) of the process might not decrease." +msgstr "" + +#: howto/free-threading-python.rst:216 +msgid "mimalloc allocator vs pymalloc" +msgstr "" + +#: howto/free-threading-python.rst:218 +msgid "" +"The default build will normally use the \"pymalloc\" memory allocator for " +"small allocations (512 bytes or smaller). The free-threaded build does not " +"use pymalloc and allocates all Python objects using the \"mimalloc\" " +"allocator. The pymalloc allocator has the following properties that help " +"keep memory usage low: small per-allocated-block overhead, effective memory " +"fragmentation prevention, and quick return of free memory to the operating " +"system. The mimalloc allocator does quite well in these respects as well " +"but can have some more overhead." +msgstr "" + +#: howto/free-threading-python.rst:227 +msgid "" +"In the free-threaded build, mimalloc manages memory in a number of separate " +"heaps (currently four). For example, all GC supporting objects are " +"allocated from their own heap. Using separate heaps means that free memory " +"in one heap cannot be used for an allocation that uses another heap. Also, " +"some heaps are configured to use QSBR (quiescent-state based reclamation) " +"when freeing the memory that backs up the heap (known as \"pages\" in " +"mimalloc terminology). The use of QSBR creates a delay between all memory " +"blocks for a page being freed and the memory page being released, either for " +"new allocations or back to the OS." +msgstr "" + +#: howto/free-threading-python.rst:237 +msgid "" +"The mimalloc allocator also defers returning freed memory back to the OS. " +"You can reduce that delay by setting the environment variable :envvar:`!" +"MIMALLOC_PURGE_DELAY` to ``0``. Note that this will likely reduce the " +"performance of the allocator." +msgstr "" + +#: howto/free-threading-python.rst:244 +msgid "Free-threaded reference counting can cause objects to live longer" +msgstr "" + +#: howto/free-threading-python.rst:246 +msgid "" +"In the default build, when an object's reference count reaches zero, it is " +"normally deallocated. The free-threaded build uses \"biased reference " +"counting\", with a fast-path for objects \"owned\" by the current thread and " +"a slow path for other objects. See :pep:`703` for additional details. Any " +"time an object's reference count ends up in a \"queued\" state, deallocation " +"can be deferred. The queued state is cleared from the \"eval breaker\" " +"section of the bytecode evaluator." +msgstr "" + +#: howto/free-threading-python.rst:254 +msgid "" +"The free-threaded build also allows a different mode of reference counting, " +"known as \"deferred reference counting\". This mode is enabled by setting a " +"flag on a per-object basis. Deferred reference counting is enabled for the " +"following types:" +msgstr "" + +#: howto/free-threading-python.rst:259 +#, fuzzy +msgid "module objects" msgstr "Objets cadres" -#: ../Doc/howto/free-threading-python.rst:127 +#: howto/free-threading-python.rst:260 +msgid "module top-level functions" +msgstr "" + +#: howto/free-threading-python.rst:261 +msgid "class methods defined in the class scope" +msgstr "" + +#: howto/free-threading-python.rst:262 +msgid "descriptor objects" +msgstr "" + +#: howto/free-threading-python.rst:263 +msgid "thread-local objects, created by :class:`threading.local`" +msgstr "" + +#: howto/free-threading-python.rst:265 msgid "" -"It is not safe to access :ref:`frame ` objects from other " -"threads and doing so may cause your program to crash . This means that :" -"func:`sys._current_frames` is generally not safe to use in a free-threaded " -"build. Functions like :func:`inspect.currentframe` and :func:`sys." -"_getframe` are generally safe as long as the resulting frame object is not " -"passed to another thread." +"When deferred reference counting is enabled, references from Python function " +"stacks are not added to the reference count. This scheme reduces the " +"overhead of reference counting, especially for objects used from multiple " +"threads. Because the stack references are not counted, objects with deferred " +"reference counting are not immediately freed when their internal reference " +"count goes to zero. Instead, they are examined by the next GC run and, if " +"no stack references to them are found, they are freed. This means these " +"objects are freed by the GC and not when their reference count goes to zero, " +"as is typical." msgstr "" -#: ../Doc/howto/free-threading-python.rst:135 -msgid "Iterators" -msgstr "Itérateurs" +#: howto/free-threading-python.rst:276 +msgid "Per-thread reference counting can delay freeing objects" +msgstr "" -#: ../Doc/howto/free-threading-python.rst:137 +#: howto/free-threading-python.rst:278 msgid "" -"Sharing the same iterator object between multiple threads is generally not " -"safe and threads may see duplicate or missing elements when iterating or " -"crash the interpreter." +"To avoid contention on the reference count fields of frequently shared " +"objects, the free-threaded build also uses \"per-thread reference counting\" " +"for a few selected object types. Rather than updating a single shared " +"reference count, each thread maintains its own local reference count array, " +"indexed by a unique id assigned to the object. The true reference count is " +"only computed by summing the per-thread counts when the object's local count " +"drops to zero. Per-thread reference counting is currently used for:" msgstr "" -#: ../Doc/howto/free-threading-python.rst:143 -msgid "Single-threaded performance" +#: howto/free-threading-python.rst:286 +msgid "heap type objects (classes created in Python)" msgstr "" -#: ../Doc/howto/free-threading-python.rst:145 +#: howto/free-threading-python.rst:287 +#, fuzzy +msgid "code objects" +msgstr "Objets cadres" + +#: howto/free-threading-python.rst:288 +msgid "the ``__dict__`` of module objects" +msgstr "" + +#: howto/free-threading-python.rst:290 msgid "" -"The free-threaded build has additional overhead when executing Python code " -"compared to the default GIL-enabled build. In 3.13, this overhead is about " -"40% on the `pyperformance `_ suite. " -"Programs that spend most of their time in C extensions or I/O will see less " -"of an impact. The largest impact is because the specializing adaptive " -"interpreter (:pep:`659`) is disabled in the free-threaded build. We expect " -"to re-enable it in a thread-safe way in the 3.14 release. This overhead is " -"expected to be reduced in upcoming Python release. We are aiming for an " -"overhead of 10% or less on the pyperformance suite compared to the default " -"GIL-enabled build." +"Because the per-thread counts must be merged back to the object before it " +"can be deallocated, objects using per-thread reference counting are " +"typically freed later than they would be in the default build. In " +"particular, such an object is usually not freed until the thread that " +"referenced it reaches a safe point (for example, in the \"eval breaker\" " +"section of the bytecode evaluator) or exits. Running :func:`gc.collect` " +"will merge the per-thread counts and allow these objects to be freed." msgstr "" diff --git a/howto/functional.po b/howto/functional.po index 55defd8cd..8f094ef06 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2022-05-12 09:39+0200\n" -"Last-Translator: Jean Abou Samra \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 13:54+0200\n" +"Last-Translator: Julien Palard \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.6\n" #: howto/functional.rst:5 msgid "Functional Programming HOWTO" @@ -24,7 +24,8 @@ msgid "Author" msgstr "Auteur" #: howto/functional.rst:7 -msgid "A. M. Kuchling" +#, fuzzy +msgid "\\A. M. Kuchling" msgstr "A. M. Kuchling" #: howto/functional.rst:0 @@ -39,8 +40,8 @@ msgstr "0.32" msgid "" "In this document, we'll take a tour of Python's features suitable for " "implementing programs in a functional style. After an introduction to the " -"concepts of functional programming, we'll look at language features such as :" -"term:`iterator`\\s and :term:`generator`\\s and relevant library modules " +"concepts of functional programming, we'll look at language features such " +"as :term:`iterator`\\s and :term:`generator`\\s and relevant library modules " "such as :mod:`itertools` and :mod:`functools`." msgstr "" "Dans ce document, nous allons faire un tour des fonctionnalités de Python " @@ -273,7 +274,7 @@ msgid "" "A theoretical benefit is that it's easier to construct a mathematical proof " "that a functional program is correct." msgstr "" -"Un avantage théorique est qu'il plus facile de construire une preuve " +"Un avantage théorique est qu'il est plus facile de construire une preuve " "mathématique de l'exactitude d'un programme fonctionnel." #: howto/functional.rst:106 @@ -382,9 +383,9 @@ msgid "" msgstr "" "Déboguer est plus simple car les fonctions sont généralement petites et bien " "spécifiées. Lorsqu'un programme ne fonctionne pas, chaque fonction constitue " -"une étape intermédiaire au niveau de laquelle vous pouvez vérifier que les " -"valeurs sont justes. Vous pouvez observer les entrées intermédiaires et les " -"sorties afin d'isoler rapidement la fonction qui est à l'origine du bogue." +"une étape au niveau de laquelle vous pouvez vérifier que les valeurs sont " +"justes. Vous pouvez observer les entrées intermédiaires et les sorties afin " +"d'isoler rapidement la fonction qui est à l'origine du bogue." #: howto/functional.rst:156 msgid "" @@ -393,7 +394,7 @@ msgid "" "before running a test; instead you only have to synthesize the right input " "and then check that the output matches expectations." msgstr "" -"Les tests sont plus faciles car chaque fonction est désormais un sujet " +"Les tests sont plus faciles, car chaque fonction est désormais un sujet " "potentiel pour un test unitaire. Les fonctions ne dépendent pas d'un état " "particulier du système qui devrait être répliqué avant d'exécuter un test ; " "à la place vous n'avez qu'à produire une entrée synthétique et vérifier que " @@ -458,10 +459,10 @@ msgstr "" "Un itérateur est un objet qui représente un flux de données ; cet objet " "renvoie les données un élément à la fois. Un itérateur Python doit posséder " "une méthode :meth:`~iterator.__next__` qui ne prend pas d'argument et " -"renvoie toujours l'élément suivant du flux. S'il n'y plus d'élément dans le " -"flux, :meth:`~iterator.__next__` doit lever une exception :exc:" -"`StopIteration`. Toutefois, ce n'est pas indispensable ; il est envisageable " -"d'écrire un itérateur qui produit un flux infini de données." +"renvoie toujours l'élément suivant du flux. S'il n'y a plus d'élément dans " +"le flux, :meth:`~iterator.__next__` doit lever une " +"exception :exc:`StopIteration`. Toutefois, ce n'est pas indispensable ; il " +"est envisageable d'écrire un itérateur qui produit un flux infini de données." #: howto/functional.rst:193 msgid "" @@ -476,8 +477,8 @@ msgstr "" "construire un itérateur qui renvoie le contenu de l'objet (ou ses éléments) " "en levant une exception :exc:`TypeError` si l'objet ne gère pas l'itération. " "Plusieurs types de données natifs à Python gèrent l'itération, notamment les " -"listes et les dictionnaires. On appelle :term:`iterable` un objet pour " -"lequel il est possible de construire un itérateur." +"listes et les dictionnaires. On appelle :term:`itérable ` un objet " +"pour lequel il est possible de construire un itérateur." #: howto/functional.rst:200 msgid "You can experiment with the iteration interface manually:" @@ -492,8 +493,9 @@ msgid "" msgstr "" "Python s'attend à travailler sur des objets itérables dans divers contextes " "et tout particulièrement dans une boucle :keyword:`for`. Dans l'expression " -"``for X in Y``, Y doit être un itérateur ou un objet pour lequel :func:" -"`iter` peut générer un itérateur. Ces deux expressions sont équivalentes ::" +"``for X in Y``, Y doit être un itérateur ou un objet pour " +"lequel :func:`iter` peut générer un itérateur. Ces deux expressions sont " +"équivalentes ::" #: howto/functional.rst:230 msgid "" @@ -518,9 +520,10 @@ msgid "" "iterator argument and will return the largest or smallest element. The " "``\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " "iterator`` is true if X is found in the stream returned by the iterator. " -"You'll run into obvious problems if the iterator is infinite; :func:`max`, :" -"func:`min` will never return, and if the element X never appears in the " -"stream, the ``\"in\"`` and ``\"not in\"`` operators won't return either." +"You'll run into obvious problems if the iterator is " +"infinite; :func:`max`, :func:`min` will never return, and if the element X " +"never appears in the stream, the ``\"in\"`` and ``\"not in\"`` operators " +"won't return either." msgstr "" "Certaines fonctions natives telles que :func:`max` et :func:`min` prennent " "un itérateur en argument et en renvoie le plus grand ou le plus petit " @@ -587,14 +590,16 @@ msgstr "" msgid "" "Applying :func:`iter` to a dictionary always loops over the keys, but " "dictionaries have methods that return other iterators. If you want to " -"iterate over values or key/value pairs, you can explicitly call the :meth:" -"`~dict.values` or :meth:`~dict.items` methods to get an appropriate iterator." +"iterate over values or key/value pairs, you can explicitly call " +"the :meth:`~dict.values` or :meth:`~dict.items` methods to get an " +"appropriate iterator." msgstr "" -"Appliquer :func:`iter` sur un dictionnaire produit un itérateur sur ses clés " -"mais il est possible d'obtenir d'autres itérateurs par d'autres méthodes. Si " -"vous souhaitez itérer sur les valeurs ou les paires clé/valeur du " -"dictionnaire, vous pouvez explicitement appeler les méthodes :meth:`~dict." -"values` ou :meth:`~dict.items` pour obtenir l'itérateur idoine." +"Appliquer :func:`iter` sur un dictionnaire produit un itérateur sur ses " +"clés, mais il est possible d'obtenir d'autres itérateurs par d'autres " +"méthodes. Si vous souhaitez itérer sur les valeurs ou les paires clé/valeur " +"du dictionnaire, vous pouvez explicitement appeler les " +"méthodes :meth:`~dict.values` ou :meth:`~dict.items` pour obtenir " +"l'itérateur idoine." #: howto/functional.rst:302 msgid "" @@ -610,10 +615,10 @@ msgid "" "method until there are no more lines in the file. This means you can read " "each line of a file like this::" msgstr "" -"Les fichiers gèrent aussi l'itération en appelant la méthode :meth:`~io." -"TextIOBase.readline` jusqu'à ce qu'il n'y ait plus d'autre ligne dans le " -"fichier. Cela signifie que vous pouvez lire l'intégralité d'un fichier de la " -"façon suivante ::" +"Les fichiers gèrent aussi l'itération en appelant la " +"méthode :meth:`~io.TextIOBase.readline` jusqu'à ce qu'il n'y ait plus " +"d'autre ligne dans le fichier. Cela signifie que vous pouvez lire " +"l'intégralité d'un fichier de la façon suivante ::" #: howto/functional.rst:317 msgid "" @@ -730,8 +735,8 @@ msgid "" "``sequence2``." msgstr "" "Les clauses ``for ... in`` indiquent les séquences sur lesquelles itérer. " -"Celles-ci peuvent être de longueurs différentes car l'itération est réalisée " -"de gauche à droite et non en parallèle. ``sequence2`` est parcourue " +"Celles-ci peuvent être de longueurs différentes, car l'itération est " +"réalisée de gauche à droite et non en parallèle. ``sequence2`` est parcourue " "entièrement pour chaque élément de ``sequence1``. ``sequence3`` est ensuite " "parcourue dans son intégralité pour chaque paire d'éléments de ``sequence1`` " "et ``sequence2``." @@ -838,8 +843,9 @@ msgstr "" "renvoie la valeur de ``i``, d'une façon similaire à un ``return``. La " "différence principale entre ``yield`` et ``return`` est qu'en atteignant " "l'instruction ``yield``, l'état du générateur est suspendu et les variables " -"locales sont conservées. Lors de l'appel suivant à la méthode :meth:" -"`~generator.__next__` du générateur, la fonction reprend son exécution." +"locales sont conservées. Lors de l'appel suivant à la " +"méthode :meth:`~generator.__next__` du générateur, la fonction reprend son " +"exécution." #: howto/functional.rst:473 msgid "Here's a sample usage of the ``generate_ints()`` generator:" @@ -861,10 +867,10 @@ msgid "" "procession of values ends and the generator cannot yield any further values." msgstr "" "Dans une fonction génératrice, une instruction ``return value`` entraîne la " -"levée d'une exception ``StopIteration(value)`` dans la méthode :meth:" -"`~generator.__next__`. Lorsque cela se produit (ou que la fin de la fonction " -"est atteinte), le flot de nouvelles valeurs s'arrête et le générateur ne " -"peut plus rien produire." +"levée d'une exception ``StopIteration(value)`` dans la " +"méthode :meth:`~generator.__next__`. Lorsque cela se produit (ou que la fin " +"de la fonction est atteinte), le flot de nouvelles valeurs s'arrête et le " +"générateur ne peut plus rien produire." #: howto/functional.rst:498 msgid "" @@ -878,10 +884,10 @@ msgstr "" "Vous pouvez obtenir le même comportement que celui des générateurs en " "écrivant votre propre classe qui stocke les variables locales du générateur " "comme variables d'instance. Pour renvoyer une liste d'entiers, par exemple, " -"vous pouvez initialiser ``self.count`` à 0 et écrire la méthode :meth:" -"`~iterator.__next__` de telle sorte qu'elle incrémente ``self.count`` puis " -"le renvoie. Cependant, cela devient beaucoup plus complexe pour des " -"générateurs relativement sophistiqués." +"vous pouvez initialiser ``self.count`` à 0 et écrire la " +"méthode :meth:`~iterator.__next__` de telle sorte qu'elle incrémente " +"``self.count`` puis le renvoie. Cependant, cela devient beaucoup plus " +"complexe pour des générateurs relativement sophistiqués." #: howto/functional.rst:506 msgid "" @@ -932,9 +938,9 @@ msgstr "" #: howto/functional.rst:539 msgid "" -"In Python 2.5 there's a simple way to pass values into a generator. :keyword:" -"`yield` became an expression, returning a value that can be assigned to a " -"variable or otherwise operated on::" +"In Python 2.5 there's a simple way to pass values into a " +"generator. :keyword:`yield` became an expression, returning a value that can " +"be assigned to a variable or otherwise operated on::" msgstr "" "À partir de Python 2.5, il existe une méthode simple pour transmettre des " "valeurs à un générateur. Le mot-clé :keyword:`yield` est devenu une " @@ -963,7 +969,7 @@ msgid "" "write ``val = yield i`` but have to use parentheses when there's an " "operation, as in ``val = (yield i) + 12``.)" msgstr "" -"(Les règles exactes de parenthésage sont spécifies dans la :pep:`342` : une " +"(Les règles exactes de parenthésage sont spécifiées dans la :pep:`342` : une " "expression ``yield`` doit toujours être parenthésée sauf s'il s'agit de " "l'expression la plus externe du côté droit d'une assignation. Cela signifie " "que vous pouvez écrire ``val = yield i`` mais que les parenthèses sont " @@ -973,14 +979,15 @@ msgstr "" msgid "" "Values are sent into a generator by calling its :meth:`send(value) " "` method. This method resumes the generator's code and the " -"``yield`` expression returns the specified value. If the regular :meth:" -"`~generator.__next__` method is called, the ``yield`` returns ``None``." +"``yield`` expression returns the specified value. If the " +"regular :meth:`~generator.__next__` method is called, the ``yield`` returns " +"``None``." msgstr "" -"Des valeurs peuvent être transmises à un générateur en appelant sa méthode :" -"meth:`send(value) `. Celle-ci reprend l'exécution du " -"générateur et l'expression ``yield`` renvoie la valeur spécifiée. Si c'est " -"la méthode :meth:`~generator.__next__` habituelle qui est appelée, alors " -"``yield`` renvoie ``None``." +"Des valeurs peuvent être transmises à un générateur en appelant sa " +"méthode :meth:`send(value) `. Celle-ci reprend l'exécution " +"du générateur et l'expression ``yield`` renvoie la valeur spécifiée. Si " +"c'est la méthode :meth:`~generator.__next__` habituelle qui est appelée, " +"alors ``yield`` renvoie ``None``." #: howto/functional.rst:561 msgid "" @@ -1026,32 +1033,33 @@ msgstr "" "l'exécution a été mise en pause." #: howto/functional.rst:605 +#, fuzzy msgid "" -":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " +":meth:`~generator.close` sends a :exc:`GeneratorExit` exception to the " "generator to terminate the iteration. On receiving this exception, the " -"generator's code must either raise :exc:`GeneratorExit` or :exc:" -"`StopIteration`; catching the exception and doing anything else is illegal " -"and will trigger a :exc:`RuntimeError`. :meth:`~generator.close` will also " -"be called by Python's garbage collector when the generator is garbage-" -"collected." +"generator's code must either raise :exc:`GeneratorExit` " +"or :exc:`StopIteration`; catching the exception and doing anything else is " +"illegal and will trigger a :exc:`RuntimeError`. :meth:`~generator.close` " +"will also be called by Python's garbage collector when the generator is " +"garbage-collected." msgstr "" ":meth:`~generator.close` lève une exception :exc:`GeneratorExit` dans le " "générateur afin de terminer l'itération. Le code du générateur qui reçoit " -"cette exception doit lever à son tour :exc:`GeneratorExit` ou :exc:" -"`StopIteration`. Il est illégal d'attraper cette exception et de faire quoi " -"que ce soit d'autre, ceci déclenche une erreur :exc:`RuntimeError`. Lorsque " -"le ramasse-miette de Python collecte le générateur, il appelle sa méthode :" -"meth:`~generator.close`." +"cette exception doit lever à son tour :exc:`GeneratorExit` " +"ou :exc:`StopIteration`. Il est illégal d'attraper cette exception et de " +"faire quoi que ce soit d'autre, ceci déclenche une " +"erreur :exc:`RuntimeError`. Lorsque le ramasse-miette de Python collecte le " +"générateur, il appelle sa méthode :meth:`~generator.close`." #: howto/functional.rst:613 msgid "" "If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " -"suggest using a ``try: ... finally:`` suite instead of catching :exc:" -"`GeneratorExit`." +"suggest using a ``try: ... finally:`` suite instead of " +"catching :exc:`GeneratorExit`." msgstr "" -"Si vous devez exécuter du code pour faire le ménage lors d'une :exc:" -"`GeneratorExit`, nous vous suggérons d'utiliser une structure ``try: ... " -"finally`` plutôt que d'attraper :exc:`GeneratorExit`." +"Si vous devez exécuter du code pour faire le ménage lors " +"d'une :exc:`GeneratorExit`, nous vous suggérons d'utiliser une structure " +"``try: ... finally`` plutôt que d'attraper :exc:`GeneratorExit`." #: howto/functional.rst:616 msgid "" @@ -1161,15 +1169,15 @@ msgid "" msgstr "" ":func:`sorted(iterable, key=None, reverse=False) ` rassemble tous " "les éléments de l'itérable dans une liste, les classe et renvoie le résultat " -"classé. Les arguments *key* et *reverse* sont passés à la méthode :meth:" -"`~list.sort` de la liste ainsi construite. ::" +"classé. Les arguments *key* et *reverse* sont passés à la " +"méthode :meth:`~list.sort` de la liste ainsi construite. ::" #: howto/functional.rst:698 msgid "" "(For a more detailed discussion of sorting, see the :ref:`sortinghowto`.)" msgstr "" -"(Pour plus de détails sur les algorithmes de tri, se référer à :ref:" -"`sortinghowto`.)" +"(Pour plus de détails sur les algorithmes de tri, se référer " +"à :ref:`sortinghowto`.)" #: howto/functional.rst:701 msgid "" @@ -1179,10 +1187,10 @@ msgid "" "``True`` if all of the elements are true values:" msgstr "" "Les fonctions natives :func:`any(iter) ` et :func:`all(iter) ` " -"permettent d'observer les valeurs de vérité des éléments d'un itérable. :" -"func:`any` renvoie ``True`` si au moins un élément de l'itérable s'évalue " -"comme vrai et :func:`all` renvoie ``True`` si tous les éléments s'évaluent " -"comme vrai :" +"permettent d'observer les valeurs de vérité des éléments d'un " +"itérable. :func:`any` renvoie ``True`` si au moins un élément de l'itérable " +"s'évalue comme vrai et :func:`all` renvoie ``True`` si tous les éléments " +"s'évaluent comme vrai :" #: howto/functional.rst:720 msgid "" @@ -1232,14 +1240,13 @@ msgid "The itertools module" msgstr "Le module *itertools*" #: howto/functional.rst:746 -#, fuzzy msgid "" "The :mod:`itertools` module contains a number of commonly used iterators as " "well as functions for combining several iterators. This section will " "introduce the module's contents by showing small examples." msgstr "" "Le module :mod:`itertools` contient de nombreux itérateurs très utilisés, " -"ainsi que des fonctions pour combiner différents itérateurs. Cette section " +"ainsi que des fonctions pour combiner plusieurs itérateurs. Cette section " "présente le contenu du module au travers de quelques exemples." #: howto/functional.rst:750 @@ -1360,16 +1367,18 @@ msgstr "Appliquer des fonctions au contenu des itérateurs" #: howto/functional.rst:829 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " -"Python's operators. Some examples are :func:`operator.add(a, b) ` (adds two values), :func:`operator.ne(a, b) ` (same as " -"``a != b``), and :func:`operator.attrgetter('id') ` " -"(returns a callable that fetches the ``.id`` attribute)." +"Python's operators. Some examples are :func:`operator.add(a, b) " +"` (adds two values), :func:`operator.ne(a, b) ` " +"(same as ``a != b``), and :func:`operator.attrgetter('id') " +"` (returns a callable that fetches the ``.id`` " +"attribute)." msgstr "" "Le module :mod:`operator` rassemble des fonctions équivalentes aux " "opérateurs Python. Par exemple, :func:`operator.add(a,b) ` " "additionne deux valeurs, :func:`operator.ne(a, b) ` est " -"équivalent à ``a != b`` et :func:`operator.attrgetter('id') ` renvoie un objet appelable qui récupère l'attribut ``.id``." +"équivalent à ``a != b`` et :func:`operator.attrgetter('id') " +"` renvoie un objet appelable qui récupère l'attribut " +"``.id``." #: howto/functional.rst:835 msgid "" @@ -1453,16 +1462,17 @@ msgstr "" msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " -"the examples above. A similar function, :func:`itertools." -"permutations(iterable, r=None) `, removes this " -"constraint on the order, returning all possible arrangements of length *r*::" +"the examples above. A similar " +"function, :func:`itertools.permutations(iterable, r=None) " +"`, removes this constraint on the order, returning " +"all possible arrangements of length *r*::" msgstr "" "Les éléments de chaque *n*-uplet sont ordonnés dans le même ordre que leur " "apparition dans *iterable*. Ainsi, dans les exemples ci-dessus, le nombre 1 " -"se trouve toujours avant 2, 3, 4 ou 5. La fonction :func:`itertools." -"permutations(iterable, r=None) ` supprime la " -"contrainte sur l'ordre et renvoie tous les arrangements possibles de " -"longueur *r* ::" +"se trouve toujours avant 2, 3, 4 ou 5. La " +"fonction :func:`itertools.permutations(iterable, r=None) " +"` supprime la contrainte sur l'ordre et renvoie tous " +"les arrangements possibles de longueur *r* ::" #: howto/functional.rst:927 msgid "" @@ -1492,11 +1502,11 @@ msgstr "" #: howto/functional.rst:940 msgid "" -"The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " -"elements can be repeated within a single tuple. Conceptually an element is " -"selected for the first position of each tuple and then is replaced before " -"the second element is selected. ::" +"The :func:`itertools.combinations_with_replacement(iterable, r) " +"` function relaxes a different " +"constraint: elements can be repeated within a single tuple. Conceptually an " +"element is selected for the first position of each tuple and then is " +"replaced before the second element is selected. ::" msgstr "" "La fonction :func:`itertools.combinations_with_replacement(iterable, r) " "` assouplit une autre contrainte : " @@ -1553,17 +1563,16 @@ msgid "The functools module" msgstr "Le module *functools*" #: howto/functional.rst:999 -#, fuzzy msgid "" "The :mod:`functools` module contains some higher-order functions. A **higher-" "order function** takes one or more functions as input and returns a new " -"function. The most useful tool in this module is the :func:`functools." -"partial` function." +"function. The most useful tool in this module is " +"the :func:`functools.partial` function." msgstr "" -"Le module :mod:`functools` introduit par Python 2.5 contient diverses " -"fonctions d'ordre supérieur. Une **fonction d'ordre supérieur** prend une ou " -"plusieurs fonctions en entrée et renvoie une fonction. L'outil le plus " -"important de ce module est la fonction :func:`functools.partial`." +"Le module :mod:`functools` contient quelques fonctions d'ordre supérieur. " +"Une **fonction d'ordre supérieur** prend une ou plusieurs fonctions en " +"entrée et renvoie une nouvelle fonction. L'outil le plus important de ce " +"module est la fonction :func:`functools.partial`." #: howto/functional.rst:1004 msgid "" @@ -1601,26 +1610,27 @@ msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " "therefore, can't be applied to infinite iterables. *func* must be a function " -"that takes two elements and returns a single value. :func:`functools." -"reduce` takes the first two elements A and B returned by the iterator and " -"calculates ``func(A, B)``. It then requests the third element, C, " -"calculates ``func(func(A, B), C)``, combines this result with the fourth " -"element returned, and continues until the iterable is exhausted. If the " -"iterable returns no values at all, a :exc:`TypeError` exception is raised. " -"If the initial value is supplied, it's used as a starting point and " -"``func(initial_value, A)`` is the first calculation. ::" +"that takes two elements and returns a single " +"value. :func:`functools.reduce` takes the first two elements A and B " +"returned by the iterator and calculates ``func(A, B)``. It then requests " +"the third element, C, calculates ``func(func(A, B), C)``, combines this " +"result with the fourth element returned, and continues until the iterable is " +"exhausted. If the iterable returns no values at all, a :exc:`TypeError` " +"exception is raised. If the initial value is supplied, it's used as a " +"starting point and ``func(initial_value, A)`` is the first calculation. ::" msgstr "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "applique une opération cumulative à tous les éléments d'un itérable et ne " "peut donc être appliquée à des itérables infinis. *func* doit être une " -"fonction qui prend deux éléments et renvoie une seule valeur. :func:" -"`functools.reduce` prend les deux premiers éléments A et B renvoyés par " -"l'itérateur et calcule ``func(A, B)``. Elle extrait ensuite le troisième " -"élément C et calcule ``func(func(A, B), C)`` puis combine ce résultat avec " -"le quatrième élément renvoyé etc. jusqu'à épuisement de l'itérable. Une " -"exception :exc:`TypeError` est levée si l'itérable ne renvoie aucune valeur. " -"La valeur initiale *initial_value*, si spécifiée, est utilisée comme point " -"de départ et le premier calcul est alors ``func(inital_value, A)``. ::" +"fonction qui prend deux éléments et renvoie une seule " +"valeur. :func:`functools.reduce` prend les deux premiers éléments A et B " +"renvoyés par l'itérateur et calcule ``func(A, B)``. Elle extrait ensuite le " +"troisième élément C et calcule ``func(func(A, B), C)`` puis combine ce " +"résultat avec le quatrième élément renvoyé etc. jusqu'à épuisement de " +"l'itérable. Une exception :exc:`TypeError` est levée si l'itérable ne " +"renvoie aucune valeur. La valeur initiale *initial_value*, si spécifiée, est " +"utilisée comme point de départ et le premier calcul est alors " +"``func(inital_value, A)``. ::" #: howto/functional.rst:1051 msgid "" @@ -1639,22 +1649,22 @@ msgid "" "write the obvious :keyword:`for` loop::" msgstr "" "Cependant, il peut être plus lisible dans de nombreuses situations " -"impliquant :func:`functools.reduce` de simplement écrire la boucle :keyword:" -"`for` ::" +"impliquant :func:`functools.reduce` de simplement écrire la " +"boucle :keyword:`for` ::" #: howto/functional.rst:1075 -#, fuzzy msgid "" -"A related function is :func:`itertools.accumulate(iterable, func=operator." -"add) `. It performs the same calculation, but instead " -"of returning only the final result, :func:`~itertools.accumulate` returns an " -"iterator that also yields each partial result::" +"A related function is :func:`itertools.accumulate(iterable, " +"func=operator.add) `. It performs the same " +"calculation, but instead of returning only the final " +"result, :func:`~itertools.accumulate` returns an iterator that also yields " +"each partial result::" msgstr "" -":func:`itertools.accumulate(iterable, func=operator.add) ` est une fonction similaire qui réalise le même calcul mais, " -"plutôt que de renvoyer seulement le résultat final, :func:`accumulate` " -"renvoie un itérateur qui génère la séquence de tous les résultats " -"intermédiaires ::" +":func:`itertools.accumulate(iterable, func=operator.add) " +"` est une fonction similaire qui réalise le même " +"calcul mais, plutôt que de renvoyer seulement le résultat " +"final, :func:`~itertools.accumulate` renvoie un itérateur qui génère la " +"séquence de tous les résultats intermédiaires ::" #: howto/functional.rst:1088 msgid "The operator module" @@ -1744,10 +1754,10 @@ msgid "" "expression::" msgstr "" "Si la fonction dont vous avez besoin n'existe pas, vous devez l'écrire. Une " -"façon d'écrire des fonctions courtes consiste à utiliser les expressions :" -"keyword:`lambda`. ``lambda`` prend plusieurs paramètres et une expression " -"combinant ces derniers afin de créer une fonction anonyme qui renvoie la " -"valeur de cette expression ::" +"façon d'écrire des fonctions courtes consiste à utiliser les " +"expressions :keyword:`lambda`. ``lambda`` prend plusieurs paramètres et une " +"expression combinant ces derniers afin de créer une fonction anonyme qui " +"renvoie la valeur de cette expression ::" #: howto/functional.rst:1127 msgid "" @@ -1808,8 +1818,8 @@ msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." msgstr "" -"Les boucles ``for`` sont souvent plus lisibles que la fonction :func:" -"`functools.reduce`." +"Les boucles ``for`` sont souvent plus lisibles que la " +"fonction :func:`functools.reduce`." #: howto/functional.rst:1171 msgid "" @@ -1833,7 +1843,7 @@ msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." msgstr "" -"Scruter le commentaire pendant quelques temps et réfléchir à un nom qui " +"Scruter le commentaire pendant quelque temps et réfléchir à un nom qui " "synthétise son essence." #: howto/functional.rst:1178 @@ -1913,7 +1923,6 @@ msgid "General" msgstr "Général" #: howto/functional.rst:1212 -#, fuzzy msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. The book can be found at https://" @@ -1925,20 +1934,19 @@ msgid "" msgstr "" "**Structure and Interpretation of Computer Programs** par Harold Abelson et " "Gerald Jay Sussman avec Julie Sussman. Disponible à l'adresse https://" -"mitpress.mit.edu/sicp/. Ce livre est un classique en informatique. Les " -"chapitres 2 et 3 présentent l'utilisation des séquences et des flux pour " -"organiser le flot de données dans un programme. Les exemples du livre " -"utilisent le langage Scheme mais la plupart des approches décrites dans ces " -"chapitres s'appliquent au style fonctionnel de Python." +"mitpress.mit.edu/sicp. Les chapitres 2 et 3 de ce classique en informatique " +"décrivent l'utilisation des séquences et des flux pour organiser le flot de " +"données dans un programme. Les exemples du livre utilisent le langage Scheme " +"mais la plupart des approches décrites dans ces chapitres s'appliquent au " +"style fonctionnel de Python." #: howto/functional.rst:1220 -#, fuzzy msgid "" -"https://www.defmacro.org/ramblings/fp.html: A general introduction to " +"https://defmacro.org/2006/06/19/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" -"http://www.defmacro.org/ramblings/fp.html : une présentation générale à la " +"https://defmacro.org/2006/06/19/fp.html : une présentation générale de la " "programmation fonctionnelle avec une longue introduction historique et des " "exemples en Java." @@ -1956,13 +1964,12 @@ msgstr "" "https://fr.wikipedia.org/wiki/Coroutine : l'entrée pour les coroutines." #: howto/functional.rst:1228 -#, fuzzy msgid "" "https://en.wikipedia.org/wiki/Partial_application: Entry for the concept of " "partial function application." msgstr "" -"https://fr.wikipedia.org/wiki/Curryfication : l'entrée pour le concept de " -"curryfication (création d'applications partielles)." +"https://fr.wikipedia.org/wiki/Curryfication : l'entrée pour le concept de " +"*curryfication* (application partielle de fonctions)." #: howto/functional.rst:1230 msgid "" @@ -1976,17 +1983,16 @@ msgid "Python-specific" msgstr "Spécifique à Python" #: howto/functional.rst:1235 -#, fuzzy msgid "" "https://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " "text processing, in the section titled \"Utilizing Higher-Order Functions in " "Text Processing\"." msgstr "" -"http://gnosis.cx/TPiP/ : le premier chapitre du livre de David Mertz :title-" +"https://gnosis.cx/TPiP/ : le premier chapitre du livre de David Mertz :title-" "reference:`Text Processing in Python` présente l'utilisation de la " "programmation fonctionnelle pour le traitement de texte dans la section " -"« Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." +"« Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." #: howto/functional.rst:1240 msgid "" @@ -1998,8 +2004,8 @@ msgstr "" "Mertz a également écrit une série de 3 articles (en anglais) sur la " "programmation fonctionnelle pour le site DeveloperWorks d'IBM. Voir `partie " "1 `__, `partie 2 `__ et `partie 3 `__," +"developer.ibm.com/tutorials/l-prog2/>`__ et `partie 3 `__," #: howto/functional.rst:1248 msgid "Python documentation" diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index 380bd2890..fd7bef82f 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -54,8 +52,8 @@ msgstr "" #: howto/gdb_helpers.rst:29 msgid "" "This document assumes that you are familiar with the basics of GDB and the " -"CPython C API. It consolidates guidance from the `devguide `_ and the `Python wiki `_ and the `Python wiki `_." msgstr "" @@ -222,13 +220,7 @@ msgstr "" #: howto/gdb_helpers.rst:183 msgid "" "The internal structure can be revealed with a cast to :c:expr:`PyLongObject " -"*`:" -msgstr "" - -#: howto/gdb_helpers.rst:185 -msgid "" -"(gdb) p *(PyLongObject*)some_python_integer $5 = {ob_base = {ob_base = " -"{ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size = 1}, ob_digit = {42}}" +"*`::" msgstr "" #: howto/gdb_helpers.rst:189 @@ -246,8 +238,8 @@ msgstr "" #: howto/gdb_helpers.rst:202 msgid "" -"Again, the implementation details can be revealed with a cast to :c:expr:" -"`PyUnicodeObject *`::" +"Again, the implementation details can be revealed with a cast " +"to :c:expr:`PyUnicodeObject *`::" msgstr "" #: howto/gdb_helpers.rst:210 diff --git a/howto/index.po b/howto/index.po index edf5b21cb..9d9cfb3b7 100644 --- a/howto/index.po +++ b/howto/index.po @@ -5,135 +5,148 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 13:56+0200\n" +"Last-Translator: Julien Palard \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.6\n" -#: howto/index.rst:3 +#: howto/index.rst:5 msgid "Python HOWTOs" -msgstr "Les HOWTOs de Python" +msgstr "Les guides pratiques (*Howto*) de Python" -#: howto/index.rst:5 -#, fuzzy +#: howto/index.rst:7 msgid "" "Python HOWTOs are documents that cover a specific topic in-depth. Modeled on " "the Linux Documentation Project's HOWTO collection, this collection is an " "effort to foster documentation that's more detailed than the Python Library " "Reference." msgstr "" -"les Guides Pratique Python sont des documents couvrant chacun un sujet " -"unique et spécifique de la manière la plus complète possible. Créés à partir " -"de la suite Documentation Project's HOWTO Linux, cette suite essaie de " -"promouvoir les documentations plus détaillées que la Python Library " -"Reference." +"Les Guides pratiques de Python sont des documents traitant un sujet " +"spécifique de la manière la plus complète possible. Inspirés des guides " +"pratiques de *The Linux Documentation Project* (projet de documentation de " +"Linux), cette section essaie de promouvoir des documentations plus " +"détaillées que la référence de la bibliothèque Python." -#: howto/index.rst:38 +#: howto/index.rst:43 msgid "General:" +msgstr "Général :" + +#: howto/index.rst:45 +msgid ":ref:`a-conceptual-overview-of-asyncio`" msgstr "" -#: howto/index.rst:40 +#: howto/index.rst:46 msgid ":ref:`annotations-howto`" -msgstr "" +msgstr ":ref:`annotations-howto`" -#: howto/index.rst:41 +#: howto/index.rst:47 msgid ":ref:`argparse-tutorial`" -msgstr "" +msgstr ":ref:`argparse-tutorial`" -#: howto/index.rst:42 +#: howto/index.rst:48 msgid ":ref:`descriptorhowto`" -msgstr "" +msgstr ":ref:`descriptorhowto`" -#: howto/index.rst:43 +#: howto/index.rst:49 msgid ":ref:`enum-howto`" -msgstr "" +msgstr ":ref:`enum-howto`" -#: howto/index.rst:44 +#: howto/index.rst:50 msgid ":ref:`functional-howto`" -msgstr "" +msgstr ":ref:`functional-howto`" -#: howto/index.rst:45 +#: howto/index.rst:51 msgid ":ref:`ipaddress-howto`" -msgstr "" +msgstr ":ref:`ipaddress-howto`" -#: howto/index.rst:46 +#: howto/index.rst:52 msgid ":ref:`logging-howto`" -msgstr "" +msgstr ":ref:`logging-howto`" -#: howto/index.rst:47 +#: howto/index.rst:53 msgid ":ref:`logging-cookbook`" -msgstr "" +msgstr ":ref:`logging-cookbook`" -#: howto/index.rst:48 +#: howto/index.rst:54 msgid ":ref:`regex-howto`" -msgstr "" +msgstr ":ref:`regex-howto`" -#: howto/index.rst:49 +#: howto/index.rst:55 msgid ":ref:`sortinghowto`" -msgstr "" +msgstr ":ref:`sortinghowto`" -#: howto/index.rst:50 +#: howto/index.rst:56 msgid ":ref:`unicode-howto`" -msgstr "" +msgstr ":ref:`unicode-howto`" -#: howto/index.rst:51 +#: howto/index.rst:57 msgid ":ref:`urllib-howto`" -msgstr "" +msgstr ":ref:`urllib-howto`" -#: howto/index.rst:53 +#: howto/index.rst:59 msgid "Advanced development:" -msgstr "" +msgstr "Développement avancé :" -#: howto/index.rst:55 +#: howto/index.rst:61 msgid ":ref:`curses-howto`" msgstr ":ref:`curses-howto`" -#: howto/index.rst:56 +#: howto/index.rst:62 msgid ":ref:`freethreading-python-howto`" -msgstr "" +msgstr ":ref:`freethreading-python-howto`" -#: howto/index.rst:57 +#: howto/index.rst:63 msgid ":ref:`freethreading-extensions-howto`" -msgstr "" +msgstr ":ref:`freethreading-extensions-howto`" -#: howto/index.rst:58 +#: howto/index.rst:64 msgid ":ref:`isolating-extensions-howto`" -msgstr "" +msgstr ":ref:`isolating-extensions-howto`" -#: howto/index.rst:59 +#: howto/index.rst:65 +#, fuzzy +msgid ":ref:`abi3t-migration-howto`" +msgstr ":ref:`annotations-howto`" + +#: howto/index.rst:66 msgid ":ref:`python_2.3_mro`" -msgstr "" +msgstr ":ref:`isolating-extensions-howto`" -#: howto/index.rst:60 +#: howto/index.rst:67 msgid ":ref:`socket-howto`" -msgstr "" +msgstr ":ref:`socket-howto`" -#: howto/index.rst:61 +#: howto/index.rst:68 msgid ":ref:`timerfd-howto`" -msgstr "" +msgstr ":ref:`timerfd-howto`" -#: howto/index.rst:62 +#: howto/index.rst:69 msgid ":ref:`cporting-howto`" -msgstr "" +msgstr ":ref:`cporting-howto`" -#: howto/index.rst:64 +#: howto/index.rst:71 msgid "Debugging and profiling:" -msgstr "" +msgstr "Débogage et profilage :" -#: howto/index.rst:66 +#: howto/index.rst:73 msgid ":ref:`gdb`" -msgstr "" +msgstr ":ref:`gdb`" -#: howto/index.rst:67 +#: howto/index.rst:74 msgid ":ref:`instrumentation`" -msgstr "" +msgstr ":ref:`instrumentation`" -#: howto/index.rst:68 +#: howto/index.rst:75 msgid ":ref:`perf_profiling`" +msgstr ":ref:`perf_profiling`" + +#: howto/index.rst:76 +msgid ":ref:`remote-debugging`" msgstr "" #~ msgid "Currently, the HOWTOs are:" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index b9c94f13d..897ff71d9 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 19:31+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -241,11 +241,11 @@ msgstr "" "(en supposant une version de CPython 3.6 compilée avec le :ref:`débogage " "` activé)" -#: howto/instrumentation.rst:273 +#: howto/instrumentation.rst:275 msgid "Available static markers" msgstr "Marqueurs statiques disponibles" -#: howto/instrumentation.rst:277 +#: howto/instrumentation.rst:279 msgid "" "This marker indicates that execution of a Python function has begun. It is " "only triggered for pure-Python (bytecode) functions." @@ -253,7 +253,7 @@ msgstr "" "Ce marqueur indique que l'exécution d'une fonction Python a commencé. Il " "n'est déclenché que pour les fonctions en Python pur (code intermédiaire)." -#: howto/instrumentation.rst:280 +#: howto/instrumentation.rst:282 msgid "" "The filename, function name, and line number are provided back to the " "tracing script as positional arguments, which must be accessed using " @@ -263,7 +263,7 @@ msgstr "" "au script de traçage sous forme d'arguments positionnels, auxquels il faut " "accéder en utilisant ``$arg1``, ``$arg2``, ``$arg3`` :" -#: howto/instrumentation.rst:284 +#: howto/instrumentation.rst:286 msgid "" "``$arg1`` : ``(const char *)`` filename, accessible using " "``user_string($arg1)``" @@ -271,7 +271,7 @@ msgstr "" "``$arg1`` : ``(const char *)`` nom de fichier, accessible via " "``user_string($arg1)``" -#: howto/instrumentation.rst:286 +#: howto/instrumentation.rst:288 msgid "" "``$arg2`` : ``(const char *)`` function name, accessible using " "``user_string($arg2)``" @@ -279,11 +279,11 @@ msgstr "" "``$arg2`` : ``(const char *)`` nom de la fonction, accessible via " "``user_string($arg2)``" -#: howto/instrumentation.rst:289 +#: howto/instrumentation.rst:291 msgid "``$arg3`` : ``int`` line number" msgstr "``$arg3`` : numéro de ligne ``int``" -#: howto/instrumentation.rst:293 +#: howto/instrumentation.rst:295 #, fuzzy msgid "" "This marker is the converse of :c:func:`!function__entry`, and indicates " @@ -295,12 +295,12 @@ msgstr "" "via une exception). Il n'est déclenché que pour les fonctions en Python pur " "(code intermédiaire)." -#: howto/instrumentation.rst:297 +#: howto/instrumentation.rst:299 #, fuzzy msgid "The arguments are the same as for :c:func:`!function__entry`" msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`" -#: howto/instrumentation.rst:301 +#: howto/instrumentation.rst:303 msgid "" "This marker indicates a Python line is about to be executed. It is the " "equivalent of line-by-line tracing with a Python profiler. It is not " @@ -310,22 +310,22 @@ msgstr "" "C'est l'équivalent du traçage ligne par ligne avec un profileur Python. Il " "n'est pas déclenché dans les fonctions C." -#: howto/instrumentation.rst:305 +#: howto/instrumentation.rst:307 #, fuzzy msgid "The arguments are the same as for :c:func:`!function__entry`." msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`." -#: howto/instrumentation.rst:309 +#: howto/instrumentation.rst:311 #, fuzzy msgid "" "Fires when the Python interpreter starts a garbage collection cycle. " "``arg0`` is the generation to scan, like :func:`gc.collect`." msgstr "" "Fonction appelée lorsque l'interpréteur Python lance un cycle de collecte du " -"ramasse-miettes. ``arg0`` est la génération à scanner, comme :func:`gc." -"collect()`." +"ramasse-miettes. ``arg0`` est la génération à scanner, " +"comme :func:`gc.collect()`." -#: howto/instrumentation.rst:314 +#: howto/instrumentation.rst:316 msgid "" "Fires when the Python interpreter finishes a garbage collection cycle. " "``arg0`` is the number of collected objects." @@ -333,7 +333,7 @@ msgstr "" "Fonction appelée lorsque l'interpréteur Python termine un cycle de collecte " "du ramasse-miettes. ``Arg0`` est le nombre d'objets collectés." -#: howto/instrumentation.rst:319 +#: howto/instrumentation.rst:321 msgid "" "Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` " "is the module name." @@ -341,31 +341,131 @@ msgstr "" "Fonction appelée avant que :mod:`importlib` essaye de trouver et de charger " "le module. ``arg0`` est le nom du module." -#: howto/instrumentation.rst:326 +#: howto/instrumentation.rst:328 msgid "" "Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is " "the module name, ``arg1`` indicates if module was successfully loaded." msgstr "" -"Fonction appelée après que la fonction ``find_and_load`` du module :mod:" -"`importlib` soit appelée. ``arg0`` est le nom du module, ``arg1`` indique si " -"le module a été chargé avec succès." +"Fonction appelée après que la fonction ``find_and_load`` du " +"module :mod:`importlib` soit appelée. ``arg0`` est le nom du module, " +"``arg1`` indique si le module a été chargé avec succès." -#: howto/instrumentation.rst:335 +#: howto/instrumentation.rst:337 msgid "" "Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is " "the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a " "tuple object." msgstr "" -"Fonction appelée quand les fonctions :func:`sys.audit` ou :c:func:" -"`PySys_Audit` sont appelées. ``arg0`` est le nom de l'évènement de type " -"chaîne de caractère C. ``arg1`` est un pointeur sur un *n*-uplet d'objet de " -"type :c:type:`PyObject`." +"Fonction appelée quand les fonctions :func:`sys.audit` " +"ou :c:func:`PySys_Audit` sont appelées. ``arg0`` est le nom de l'évènement " +"de type chaîne de caractère C. ``arg1`` est un pointeur sur un *n*-uplet " +"d'objet de type :c:type:`PyObject`." + +#: howto/instrumentation.rst:345 +msgid "C Entry Points" +msgstr "" + +#: howto/instrumentation.rst:347 +msgid "" +"To simplify triggering of DTrace markers, Python's C API comes with a number " +"of helper functions that mirror each static marker. On builds of Python " +"without DTrace enabled, these do nothing." +msgstr "" + +#: howto/instrumentation.rst:351 +msgid "" +"In general, it is not necessary to call these yourself, as Python will do it " +"for you." +msgstr "" + +#: howto/instrumentation.rst:358 +msgid "C API Function" +msgstr "" + +#: howto/instrumentation.rst:359 +#, fuzzy +msgid "Static Marker" +msgstr "Marqueurs statiques *SystemTap*" + +#: howto/instrumentation.rst:360 +msgid "Notes" +msgstr "" + +#: howto/instrumentation.rst:362 +msgid ":c:func:`!line`" +msgstr "" + +#: howto/instrumentation.rst:365 +#, fuzzy +msgid ":c:func:`!function__entry`" +msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`" + +#: howto/instrumentation.rst:368 +msgid ":c:func:`!function__return`" +msgstr "" + +#: howto/instrumentation.rst:371 +msgid ":c:func:`!gc__start`" +msgstr "" + +#: howto/instrumentation.rst:374 +msgid ":c:func:`!gc__done`" +msgstr "" + +#: howto/instrumentation.rst:377 +msgid ":c:func:`!instance__new__start`" +msgstr "" + +#: howto/instrumentation.rst:381 howto/instrumentation.rst:387 +msgid "Not used by Python" +msgstr "" + +#: howto/instrumentation.rst:380 +msgid ":c:func:`!instance__new__done`" +msgstr "" + +#: howto/instrumentation.rst:383 +msgid ":c:func:`!instance__delete__start`" +msgstr "" + +#: howto/instrumentation.rst:386 +msgid ":c:func:`!instance__delete__done`" +msgstr "" + +#: howto/instrumentation.rst:389 +msgid ":c:func:`!import__find__load__start`" +msgstr "" -#: howto/instrumentation.rst:343 +#: howto/instrumentation.rst:392 +msgid ":c:func:`!import__find__load__done`" +msgstr "" + +#: howto/instrumentation.rst:395 +msgid ":c:func:`!audit`" +msgstr "" + +#: howto/instrumentation.rst:400 +msgid "C Probing Checks" +msgstr "" + +#: howto/instrumentation.rst:415 +msgid "" +"All calls to ``PyDTrace`` functions must be guarded by a call to one of " +"these functions. This allows Python to minimize performance impact when " +"probing is disabled." +msgstr "" + +#: howto/instrumentation.rst:419 +msgid "" +"On builds without DTrace enabled, these functions do nothing and return " +"``0``." +msgstr "" + +#: howto/instrumentation.rst:423 msgid "SystemTap Tapsets" msgstr "*Tapsets* de *SystemTap*" -#: howto/instrumentation.rst:345 +#: howto/instrumentation.rst:425 msgid "" "The higher-level way to use the SystemTap integration is to use a " "\"tapset\": SystemTap's equivalent of a library, which hides some of the " @@ -375,13 +475,13 @@ msgstr "" "un *« tapset »*. L'équivalent pour *SystemTap* d'une bibliothèque, qui " "permet de masquer les détails de niveau inférieur des marqueurs statiques." -#: howto/instrumentation.rst:349 +#: howto/instrumentation.rst:429 msgid "Here is a tapset file, based on a non-shared build of CPython:" msgstr "" "Voici un fichier *tapset*, basé sur une version non partagée compilée de " "CPython :" -#: howto/instrumentation.rst:372 +#: howto/instrumentation.rst:452 msgid "" "If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" "systemtap/tapset``), then these additional probepoints become available:" @@ -390,7 +490,7 @@ msgstr "" "exemple ``/usr/share/systemtap/tapset``), alors ces sondes supplémentaires " "deviennent disponibles :" -#: howto/instrumentation.rst:378 +#: howto/instrumentation.rst:458 msgid "" "This probe point indicates that execution of a Python function has begun. It " "is only triggered for pure-Python (bytecode) functions." @@ -398,7 +498,7 @@ msgstr "" "Cette sonde indique que l'exécution d'une fonction Python a commencé. Elle " "n'est déclenchée que pour les fonctions en Python pur (code intermédiaire)." -#: howto/instrumentation.rst:383 +#: howto/instrumentation.rst:463 msgid "" "This probe point is the converse of ``python.function.return``, and " "indicates that execution of a Python function has ended (either via " @@ -410,11 +510,11 @@ msgstr "" "via une exception). Elle est uniquement déclenchée pour les fonctions en " "Python pur (code intermédiaire ou *bytecode*)." -#: howto/instrumentation.rst:390 +#: howto/instrumentation.rst:470 msgid "Examples" msgstr "Exemples" -#: howto/instrumentation.rst:391 +#: howto/instrumentation.rst:471 msgid "" "This SystemTap script uses the tapset above to more cleanly implement the " "example given above of tracing the Python function-call hierarchy, without " @@ -425,7 +525,7 @@ msgstr "" "fonctions Python, sans avoir besoin de nommer directement les marqueurs " "statiques :" -#: howto/instrumentation.rst:410 +#: howto/instrumentation.rst:490 #, fuzzy msgid "" "The following script uses the tapset above to provide a top-like view of all " diff --git a/howto/ipaddress.po b/howto/ipaddress.po index 85ba2d3b8..625f2df79 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-05-12 09:42+0200\n" "Last-Translator: BAILLY Geoffroy \n" "Language-Team: FRENCH \n" @@ -31,7 +31,7 @@ msgstr "Peter Moody" msgid "Nick Coghlan" msgstr "Nick Coghlan" -#: howto/ipaddress.rst:-1 +#: howto/ipaddress.rst:14 msgid "Overview" msgstr "Aperçu" @@ -43,11 +43,11 @@ msgid "" "an overview of how :mod:`ipaddress` represents IP network addressing " "concepts." msgstr "" -"Ce document vise à fournir une introduction rapide au module :mod:" -"`ipaddress`. Il est destiné aux utilisateurs qui ne sont pas familiers avec " -"la terminologie des réseaux IP, mais il peut aussi être utile aux ingénieurs " -"réseaux qui cherchent un aperçu de la représentation des concepts " -"d'adressage IP avec le module :mod:`ipaddress`." +"Ce document vise à fournir une introduction rapide au " +"module :mod:`ipaddress`. Il est destiné aux utilisateurs qui ne sont pas " +"familiers avec la terminologie des réseaux IP, mais il peut aussi être utile " +"aux ingénieurs réseaux qui cherchent un aperçu de la représentation des " +"concepts d'adressage IP avec le module :mod:`ipaddress`." #: howto/ipaddress.rst:24 msgid "Creating Address/Network/Interface objects" @@ -112,10 +112,10 @@ msgid "" msgstr "" "Les adresses, souvent dénommées \"adresses hôtes\" sont les unités les plus " "basiques quand on travaille avec l'adressage IP. Le moyen le plus simple de " -"créer des adresses est d'utiliser la fonction de fabrication :func:" -"`ipaddress.ip_address` qui va automatiquement déterminer quoi créer entre " -"une adresse IPv4 ou une adresse IPv6 en fonction de la valeur qui est " -"transmise :" +"créer des adresses est d'utiliser la fonction de " +"fabrication :func:`ipaddress.ip_address` qui va automatiquement déterminer " +"quoi créer entre une adresse IPv4 ou une adresse IPv6 en fonction de la " +"valeur qui est transmise :" #: howto/ipaddress.rst:61 msgid "" @@ -142,8 +142,8 @@ msgstr "Définir des réseaux" #: howto/ipaddress.rst:84 msgid "" -"Host addresses are usually grouped together into IP networks, so :mod:" -"`ipaddress` provides a way to create, inspect and manipulate network " +"Host addresses are usually grouped together into IP networks, " +"so :mod:`ipaddress` provides a way to create, inspect and manipulate network " "definitions. IP network objects are constructed from strings that define the " "range of host addresses that are part of that network. The simplest form for " "that information is a \"network address/network prefix\" pair, where the " @@ -151,9 +151,9 @@ msgid "" "whether or not an address is part of the network and the network address " "defines the expected value of those bits." msgstr "" -"Les adresses hôtes sont souvent regroupées dans des réseaux IP, donc :mod:" -"`ipaddress` fournit un moyen de créer, d'inspecter et de manipuler les " -"définitions des réseaux. Les objets correspondants aux réseaux IP sont " +"Les adresses hôtes sont souvent regroupées dans des réseaux IP, " +"donc :mod:`ipaddress` fournit un moyen de créer, d'inspecter et de manipuler " +"les définitions des réseaux. Les objets correspondants aux réseaux IP sont " "construits à partir de chaînes de caractères qui définissent le périmètre " "des adresses hôtes qui font partie de ce réseau. La forme la plus simple de " "cette information est un couple \"adresse réseau/préfixe réseau\" , où le " @@ -228,11 +228,11 @@ msgid "" "network, neither the address nor the network classes are sufficient. " "Notation like ``192.0.2.1/24`` is commonly used by network engineers and the " "people who write tools for firewalls and routers as shorthand for \"the host " -"``192.0.2.1`` on the network ``192.0.2.0/24``\", Accordingly, :mod:" -"`ipaddress` provides a set of hybrid classes that associate an address with " -"a particular network. The interface for creation is identical to that for " -"defining network objects, except that the address portion isn't constrained " -"to being a network address." +"``192.0.2.1`` on the network ``192.0.2.0/24``\", " +"Accordingly, :mod:`ipaddress` provides a set of hybrid classes that " +"associate an address with a particular network. The interface for creation " +"is identical to that for defining network objects, except that the address " +"portion isn't constrained to being a network address." msgstr "" "Comme mentionné ci-dessus, si vous avez besoin de décrire une adresse sur un " "réseau particulier, ni l'adresse ni les classes réseaux ne sont suffisantes. " @@ -261,8 +261,8 @@ msgstr "Inspecter les objets Address/Network/Interface" #: howto/ipaddress.rst:159 msgid "" "You've gone to the trouble of creating an IPv(4|6)(Address|Network|" -"Interface) object, so you probably want to get information about it. :mod:" -"`ipaddress` tries to make doing this easy and intuitive." +"Interface) object, so you probably want to get information about " +"it. :mod:`ipaddress` tries to make doing this easy and intuitive." msgstr "" "Vous vous êtes donné la peine de créer un objet (adresse|réseau|" "interface)IPv(4|6), donc vous voudrez probablement des informations sur " @@ -395,16 +395,16 @@ msgstr "" #: howto/ipaddress.rst:305 msgid "" "To support use cases where it is useful to have access to this additional " -"detail, the individual class constructors actually raise the :exc:" -"`ValueError` subclasses :exc:`ipaddress.AddressValueError` and :exc:" -"`ipaddress.NetmaskValueError` to indicate exactly which part of the " +"detail, the individual class constructors actually raise " +"the :exc:`ValueError` subclasses :exc:`ipaddress.AddressValueError` " +"and :exc:`ipaddress.NetmaskValueError` to indicate exactly which part of the " "definition failed to parse correctly." msgstr "" "Pour gérer les cas d'usage où il est utile d'avoir accès à ces détails, les " "constructeurs individuels des classes lèvent actuellement les sous-classes " -"de :exc:`ValueError`, :exc:`ipaddress.AddressValueError` et :exc:`ipaddress." -"NetmaskValueError` pour indiquer précisément quelle partie de la définition " -"n'a pas pu être correctement traitée." +"de :exc:`ValueError`, :exc:`ipaddress.AddressValueError` " +"et :exc:`ipaddress.NetmaskValueError` pour indiquer précisément quelle " +"partie de la définition n'a pas pu être correctement traitée." #: howto/ipaddress.rst:311 msgid "" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 0e02739b8..ea7127869 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +18,7 @@ msgstr "" msgid "Isolating Extension Modules" msgstr "" -#: howto/isolating-extensions.rst:-1 +#: howto/isolating-extensions.rst:9 msgid "Abstract" msgstr "Résumé" @@ -73,8 +73,8 @@ msgstr "" #: howto/isolating-extensions.rst:42 msgid "" -"in parallel, managing \"sub-interpreters\" using :c:func:" -"`Py_NewInterpreter`/:c:func:`Py_EndInterpreter`." +"in parallel, managing \"sub-interpreters\" " +"using :c:func:`Py_NewInterpreter`/:c:func:`Py_EndInterpreter`." msgstr "" #: howto/isolating-extensions.rst:45 @@ -226,8 +226,8 @@ msgstr "" msgid "" "If it is necessary to use process-global state, the simplest way to avoid " "issues with multiple interpreters is to explicitly prevent a module from " -"being loaded more than once per process—see `Opt-Out: Limiting to One Module " -"Object per Process`_." +"being loaded more than once per process—see :ref:`isolating-extensions-" +"optout`." msgstr "" #: howto/isolating-extensions.rst:175 @@ -279,15 +279,16 @@ msgstr "" #: howto/isolating-extensions.rst:205 msgid "" "An example of a module with per-module state is currently available as " -"`xxlimited `__; example module initialization shown at the bottom of the file." +"`xxlimited `__; example module initialization shown at the bottom of the " +"file." msgstr "" -#: howto/isolating-extensions.rst:211 +#: howto/isolating-extensions.rst:213 msgid "Opt-Out: Limiting to One Module Object per Process" msgstr "" -#: howto/isolating-extensions.rst:213 +#: howto/isolating-extensions.rst:215 msgid "" "A non-negative ``PyModuleDef.m_size`` signals that a module supports " "multiple interpreters correctly. If this is not yet the case for your " @@ -295,36 +296,45 @@ msgid "" "For example::" msgstr "" -#: howto/isolating-extensions.rst:234 +#: howto/isolating-extensions.rst:242 +msgid "" +"If your module's :c:member:`PyModuleDef.m_clear` function is able to prepare " +"for future re-initialization, it should clear the ``loaded`` flag. In this " +"case, your module won't support multiple instances existing *concurrently*, " +"but it will, for example, support being loaded after Python runtime shutdown " +"(:c:func:`Py_FinalizeEx`) and re-initialization (:c:func:`Py_Initialize`)." +msgstr "" + +#: howto/isolating-extensions.rst:251 msgid "Module State Access from Functions" msgstr "" -#: howto/isolating-extensions.rst:236 +#: howto/isolating-extensions.rst:253 msgid "" "Accessing the state from module-level functions is straightforward. " "Functions get the module object as their first argument; for extracting the " "state, you can use ``PyModule_GetState``::" msgstr "" -#: howto/isolating-extensions.rst:251 +#: howto/isolating-extensions.rst:268 msgid "" "``PyModule_GetState`` may return ``NULL`` without setting an exception if " "there is no module state, i.e. ``PyModuleDef.m_size`` was zero. In your own " "module, you're in control of ``m_size``, so this is easy to prevent." msgstr "" -#: howto/isolating-extensions.rst:258 +#: howto/isolating-extensions.rst:275 msgid "Heap Types" msgstr "" -#: howto/isolating-extensions.rst:260 +#: howto/isolating-extensions.rst:277 msgid "" "Traditionally, types defined in C code are *static*; that is, ``static " "PyTypeObject`` structures defined directly in code and initialized using " "``PyType_Ready()``." msgstr "" -#: howto/isolating-extensions.rst:264 +#: howto/isolating-extensions.rst:281 msgid "" "Such types are necessarily shared across the process. Sharing them between " "module objects requires paying attention to any state they own or access. To " @@ -332,7 +342,7 @@ msgid "" "for example, you can't set ``str.myattribute = 123``." msgstr "" -#: howto/isolating-extensions.rst:270 +#: howto/isolating-extensions.rst:287 msgid "" "Sharing truly immutable objects between interpreters is fine, as long as " "they don't provide access to mutable objects. However, in CPython, every " @@ -342,7 +352,7 @@ msgid "" "process-wide GIL." msgstr "" -#: howto/isolating-extensions.rst:277 +#: howto/isolating-extensions.rst:294 msgid "" "Because they are immutable and process-global, static types cannot access " "\"their\" module state. If any method of such a type requires access to " @@ -351,15 +361,15 @@ msgid "" "Python's ``class`` statement." msgstr "" -#: howto/isolating-extensions.rst:284 +#: howto/isolating-extensions.rst:301 msgid "For new modules, using heap types by default is a good rule of thumb." msgstr "" -#: howto/isolating-extensions.rst:288 +#: howto/isolating-extensions.rst:305 msgid "Changing Static Types to Heap Types" msgstr "" -#: howto/isolating-extensions.rst:290 +#: howto/isolating-extensions.rst:307 msgid "" "Static types can be converted to heap types, but note that the heap type API " "was not designed for \"lossless\" conversion from static types—that is, " @@ -369,235 +379,235 @@ msgid "" "slots). Always test the details that are important to you." msgstr "" -#: howto/isolating-extensions.rst:299 +#: howto/isolating-extensions.rst:316 msgid "" "Watch out for the following two points in particular (but note that this is " "not a comprehensive list):" msgstr "" -#: howto/isolating-extensions.rst:302 +#: howto/isolating-extensions.rst:319 msgid "" -"Unlike static types, heap type objects are mutable by default. Use the :c:" -"macro:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." +"Unlike static types, heap type objects are mutable by default. Use " +"the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." msgstr "" -#: howto/isolating-extensions.rst:304 +#: howto/isolating-extensions.rst:321 msgid "" "Heap types inherit :c:member:`~PyTypeObject.tp_new` by default, so it may " "become possible to instantiate them from Python code. You can prevent this " "with the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." msgstr "" -#: howto/isolating-extensions.rst:310 +#: howto/isolating-extensions.rst:327 msgid "Defining Heap Types" msgstr "" -#: howto/isolating-extensions.rst:312 +#: howto/isolating-extensions.rst:329 msgid "" "Heap types can be created by filling a :c:struct:`PyType_Spec` structure, a " -"description or \"blueprint\" of a class, and calling :c:func:" -"`PyType_FromModuleAndSpec` to construct a new class object." +"description or \"blueprint\" of a class, and " +"calling :c:func:`PyType_FromModuleAndSpec` to construct a new class object." msgstr "" -#: howto/isolating-extensions.rst:317 +#: howto/isolating-extensions.rst:334 msgid "" "Other functions, like :c:func:`PyType_FromSpec`, can also create heap types, " "but :c:func:`PyType_FromModuleAndSpec` associates the module with the class, " "allowing access to the module state from methods." msgstr "" -#: howto/isolating-extensions.rst:321 +#: howto/isolating-extensions.rst:338 msgid "" "The class should generally be stored in *both* the module state (for safe " "access from C) and the module's ``__dict__`` (for access from Python code)." msgstr "" -#: howto/isolating-extensions.rst:327 +#: howto/isolating-extensions.rst:344 msgid "Garbage-Collection Protocol" msgstr "" -#: howto/isolating-extensions.rst:329 +#: howto/isolating-extensions.rst:346 msgid "" "Instances of heap types hold a reference to their type. This ensures that " "the type isn't destroyed before all its instances are, but may result in " "reference cycles that need to be broken by the garbage collector." msgstr "" -#: howto/isolating-extensions.rst:334 +#: howto/isolating-extensions.rst:351 msgid "" "To avoid memory leaks, instances of heap types must implement the garbage " "collection protocol. That is, heap types should:" msgstr "" -#: howto/isolating-extensions.rst:338 +#: howto/isolating-extensions.rst:355 msgid "Have the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: howto/isolating-extensions.rst:339 +#: howto/isolating-extensions.rst:356 msgid "" -"Define a traverse function using ``Py_tp_traverse``, which visits the type " -"(e.g. using ``Py_VISIT(Py_TYPE(self))``)." +"Define a traverse function using :c:data:`Py_tp_traverse`, which visits the " +"type (e.g. using ``Py_VISIT(Py_TYPE(self))``)." msgstr "" -#: howto/isolating-extensions.rst:342 +#: howto/isolating-extensions.rst:359 msgid "" -"Please refer to the documentation of :c:macro:`Py_TPFLAGS_HAVE_GC` and :c:" -"member:`~PyTypeObject.tp_traverse` for additional considerations." +"Please refer to the documentation of :c:macro:`Py_TPFLAGS_HAVE_GC` " +"and :c:member:`~PyTypeObject.tp_traverse` for additional considerations." msgstr "" -#: howto/isolating-extensions.rst:346 +#: howto/isolating-extensions.rst:363 msgid "" "The API for defining heap types grew organically, leaving it somewhat " "awkward to use in its current state. The following sections will guide you " "through common issues." msgstr "" -#: howto/isolating-extensions.rst:352 +#: howto/isolating-extensions.rst:369 msgid "``tp_traverse`` in Python 3.8 and lower" msgstr "" -#: howto/isolating-extensions.rst:354 +#: howto/isolating-extensions.rst:371 msgid "" "The requirement to visit the type from ``tp_traverse`` was added in Python " "3.9. If you support Python 3.8 and lower, the traverse function must *not* " "visit the type, so it must be more complicated::" msgstr "" -#: howto/isolating-extensions.rst:366 +#: howto/isolating-extensions.rst:383 msgid "" "Unfortunately, :c:data:`Py_Version` was only added in Python 3.11. As a " "replacement, use:" msgstr "" -#: howto/isolating-extensions.rst:369 +#: howto/isolating-extensions.rst:386 msgid ":c:macro:`PY_VERSION_HEX`, if not using the stable ABI, or" msgstr "" -#: howto/isolating-extensions.rst:370 +#: howto/isolating-extensions.rst:387 msgid "" -":py:data:`sys.version_info` (via :c:func:`PySys_GetObject` and :c:func:" -"`PyArg_ParseTuple`)." +":py:data:`sys.version_info` (via :c:func:`PySys_GetObject` " +"and :c:func:`PyArg_ParseTuple`)." msgstr "" -#: howto/isolating-extensions.rst:375 +#: howto/isolating-extensions.rst:392 msgid "Delegating ``tp_traverse``" msgstr "" -#: howto/isolating-extensions.rst:377 +#: howto/isolating-extensions.rst:394 msgid "" -"If your traverse function delegates to the :c:member:`~PyTypeObject." -"tp_traverse` of its base class (or another type), ensure that " -"``Py_TYPE(self)`` is visited only once. Note that only heap type are " -"expected to visit the type in ``tp_traverse``." +"If your traverse function delegates to " +"the :c:member:`~PyTypeObject.tp_traverse` of its base class (or another " +"type), ensure that ``Py_TYPE(self)`` is visited only once. Note that only " +"heap type are expected to visit the type in ``tp_traverse``." msgstr "" -#: howto/isolating-extensions.rst:382 +#: howto/isolating-extensions.rst:399 msgid "For example, if your traverse function includes::" msgstr "" -#: howto/isolating-extensions.rst:386 +#: howto/isolating-extensions.rst:403 msgid "...and ``base`` may be a static type, then it should also include::" msgstr "" -#: howto/isolating-extensions.rst:396 +#: howto/isolating-extensions.rst:413 msgid "" -"It is not necessary to handle the type's reference count in :c:member:" -"`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_clear`." +"It is not necessary to handle the type's reference count " +"in :c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: howto/isolating-extensions.rst:401 +#: howto/isolating-extensions.rst:418 msgid "Defining ``tp_dealloc``" msgstr "" -#: howto/isolating-extensions.rst:403 +#: howto/isolating-extensions.rst:420 msgid "" "If your type has a custom :c:member:`~PyTypeObject.tp_dealloc` function, it " "needs to:" msgstr "" -#: howto/isolating-extensions.rst:406 +#: howto/isolating-extensions.rst:423 msgid "" "call :c:func:`PyObject_GC_UnTrack` before any fields are invalidated, and" msgstr "" -#: howto/isolating-extensions.rst:407 +#: howto/isolating-extensions.rst:424 msgid "decrement the reference count of the type." msgstr "" -#: howto/isolating-extensions.rst:409 +#: howto/isolating-extensions.rst:426 msgid "" "To keep the type valid while ``tp_free`` is called, the type's refcount " "needs to be decremented *after* the instance is deallocated. For example::" msgstr "" -#: howto/isolating-extensions.rst:421 +#: howto/isolating-extensions.rst:438 msgid "" "The default ``tp_dealloc`` function does this, so if your type does *not* " "override ``tp_dealloc`` you don't need to add it." msgstr "" -#: howto/isolating-extensions.rst:427 +#: howto/isolating-extensions.rst:444 msgid "Not overriding ``tp_free``" msgstr "" -#: howto/isolating-extensions.rst:429 +#: howto/isolating-extensions.rst:446 msgid "" -"The :c:member:`~PyTypeObject.tp_free` slot of a heap type must be set to :c:" -"func:`PyObject_GC_Del`. This is the default; do not override it." +"The :c:member:`~PyTypeObject.tp_free` slot of a heap type must be set " +"to :c:func:`PyObject_GC_Del`. This is the default; do not override it." msgstr "" -#: howto/isolating-extensions.rst:435 +#: howto/isolating-extensions.rst:452 msgid "Avoiding ``PyObject_New``" msgstr "" -#: howto/isolating-extensions.rst:437 +#: howto/isolating-extensions.rst:454 msgid "GC-tracked objects need to be allocated using GC-aware functions." msgstr "" -#: howto/isolating-extensions.rst:439 -msgid "If you use use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:" +#: howto/isolating-extensions.rst:456 +msgid "If you use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:" msgstr "" -#: howto/isolating-extensions.rst:441 +#: howto/isolating-extensions.rst:458 msgid "" "Get and call type's :c:member:`~PyTypeObject.tp_alloc` slot, if possible. " "That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` with::" msgstr "" -#: howto/isolating-extensions.rst:446 +#: howto/isolating-extensions.rst:463 msgid "" "Replace ``o = PyObject_NewVar(TYPE, typeobj, size)`` with the same, but use " "size instead of the 0." msgstr "" -#: howto/isolating-extensions.rst:449 +#: howto/isolating-extensions.rst:466 msgid "" -"If the above is not possible (e.g. inside a custom ``tp_alloc``), call :c:" -"func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`::" +"If the above is not possible (e.g. inside a custom ``tp_alloc``), " +"call :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`::" msgstr "" -#: howto/isolating-extensions.rst:458 +#: howto/isolating-extensions.rst:475 msgid "Module State Access from Classes" msgstr "" -#: howto/isolating-extensions.rst:460 +#: howto/isolating-extensions.rst:477 msgid "" "If you have a type object defined with :c:func:`PyType_FromModuleAndSpec`, " "you can call :c:func:`PyType_GetModule` to get the associated module, and " "then :c:func:`PyModule_GetState` to get the module's state." msgstr "" -#: howto/isolating-extensions.rst:464 +#: howto/isolating-extensions.rst:481 msgid "" "To save a some tedious error-handling boilerplate code, you can combine " "these two steps with :c:func:`PyType_GetModuleState`, resulting in::" msgstr "" -#: howto/isolating-extensions.rst:474 +#: howto/isolating-extensions.rst:491 msgid "Module State Access from Regular Methods" msgstr "" -#: howto/isolating-extensions.rst:476 +#: howto/isolating-extensions.rst:493 msgid "" "Accessing the module-level state from methods of a class is somewhat more " "complicated, but is possible thanks to API introduced in Python 3.9. To get " @@ -605,77 +615,78 @@ msgid "" "module state from it." msgstr "" -#: howto/isolating-extensions.rst:481 +#: howto/isolating-extensions.rst:498 msgid "" "The largest roadblock is getting *the class a method was defined in*, or " "that method's \"defining class\" for short. The defining class can have a " "reference to the module it is part of." msgstr "" -#: howto/isolating-extensions.rst:485 +#: howto/isolating-extensions.rst:502 msgid "" "Do not confuse the defining class with ``Py_TYPE(self)``. If the method is " "called on a *subclass* of your type, ``Py_TYPE(self)`` will refer to that " "subclass, which may be defined in different module than yours." msgstr "" -#: howto/isolating-extensions.rst:490 +#: howto/isolating-extensions.rst:507 msgid "" -"The following Python code can illustrate the concept. ``Base." -"get_defining_class`` returns ``Base`` even if ``type(self) == Sub``:" +"The following Python code can illustrate the concept. " +"``Base.get_defining_class`` returns ``Base`` even if ``type(self) == Sub``:" msgstr "" -#: howto/isolating-extensions.rst:506 +#: howto/isolating-extensions.rst:523 msgid "" -"For a method to get its \"defining class\", it must use the :ref:" -"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS ` :c:type:`calling convention ` and the " -"corresponding :c:type:`PyCMethod` signature::" +"For a method to get its \"defining class\", it must use " +"the :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS ` :c:type:`calling convention ` and " +"the corresponding :c:type:`PyCMethod` signature::" msgstr "" -#: howto/isolating-extensions.rst:518 +#: howto/isolating-extensions.rst:535 msgid "" "Once you have the defining class, call :c:func:`PyType_GetModuleState` to " "get the state of its associated module." msgstr "" -#: howto/isolating-extensions.rst:521 +#: howto/isolating-extensions.rst:538 msgid "For example::" msgstr "Par exemple ::" -#: howto/isolating-extensions.rst:549 +#: howto/isolating-extensions.rst:566 msgid "Module State Access from Slot Methods, Getters and Setters" msgstr "" -#: howto/isolating-extensions.rst:553 +#: howto/isolating-extensions.rst:570 msgid "This is new in Python 3.11." msgstr "" -#: howto/isolating-extensions.rst:561 +#: howto/isolating-extensions.rst:578 msgid "" -"Slot methods—the fast C equivalents for special methods, such as :c:member:" -"`~PyNumberMethods.nb_add` for :py:attr:`~object.__add__` or :c:member:" -"`~PyTypeObject.tp_new` for initialization—have a very simple API that " -"doesn't allow passing in the defining class, unlike with :c:type:" -"`PyCMethod`. The same goes for getters and setters defined with :c:type:" -"`PyGetSetDef`." +"Slot methods—the fast C equivalents for special methods, such " +"as :c:member:`~PyNumberMethods.nb_add` for :py:attr:`~object.__add__` " +"or :c:member:`~PyTypeObject.tp_new` for initialization—have a very simple " +"API that doesn't allow passing in the defining class, unlike " +"with :c:type:`PyCMethod`. The same goes for getters and setters defined " +"with :c:type:`PyGetSetDef`." msgstr "" -#: howto/isolating-extensions.rst:568 +#: howto/isolating-extensions.rst:585 msgid "" -"To access the module state in these cases, use the :c:func:" -"`PyType_GetModuleByDef` function, and pass in the module definition. Once " -"you have the module, call :c:func:`PyModule_GetState` to get the state::" +"To access the module state in these cases, use " +"the :c:func:`PyType_GetModuleByDef` function, and pass in the module " +"definition. Once you have the module, call :c:func:`PyModule_GetState` to " +"get the state::" msgstr "" -#: howto/isolating-extensions.rst:579 +#: howto/isolating-extensions.rst:596 msgid "" ":c:func:`!PyType_GetModuleByDef` works by searching the :term:`method " "resolution order` (i.e. all superclasses) for the first superclass that has " "a corresponding module." msgstr "" -#: howto/isolating-extensions.rst:585 +#: howto/isolating-extensions.rst:602 msgid "" "In very exotic cases (inheritance chains spanning multiple modules created " "from the same definition), :c:func:`!PyType_GetModuleByDef` might not return " @@ -683,46 +694,45 @@ msgid "" "module with the same definition, ensuring a compatible C memory layout." msgstr "" -#: howto/isolating-extensions.rst:593 +#: howto/isolating-extensions.rst:610 msgid "Lifetime of the Module State" msgstr "" -#: howto/isolating-extensions.rst:595 +#: howto/isolating-extensions.rst:612 msgid "" "When a module object is garbage-collected, its module state is freed. For " "each pointer to (a part of) the module state, you must hold a reference to " "the module object." msgstr "" -#: howto/isolating-extensions.rst:599 +#: howto/isolating-extensions.rst:616 msgid "" -"Usually this is not an issue, because types created with :c:func:" -"`PyType_FromModuleAndSpec`, and their instances, hold a reference to the " -"module. However, you must be careful in reference counting when you " -"reference module state from other places, such as callbacks for external " -"libraries." +"Usually this is not an issue, because types created " +"with :c:func:`PyType_FromModuleAndSpec`, and their instances, hold a " +"reference to the module. However, you must be careful in reference counting " +"when you reference module state from other places, such as callbacks for " +"external libraries." msgstr "" -#: howto/isolating-extensions.rst:608 +#: howto/isolating-extensions.rst:625 msgid "Open Issues" msgstr "" -#: howto/isolating-extensions.rst:610 +#: howto/isolating-extensions.rst:627 msgid "Several issues around per-module state and heap types are still open." msgstr "" -#: howto/isolating-extensions.rst:612 +#: howto/isolating-extensions.rst:629 msgid "" -"Discussions about improving the situation are best held on the `capi-sig " -"mailing list `__." +"Discussions about improving the situation are best held on the `discuss " +"forum under c-api tag `__." msgstr "" -#: howto/isolating-extensions.rst:617 +#: howto/isolating-extensions.rst:633 msgid "Per-Class Scope" msgstr "" -#: howto/isolating-extensions.rst:619 +#: howto/isolating-extensions.rst:635 msgid "" "It is currently (as of Python 3.11) not possible to attach state to " "individual *types* without relying on CPython implementation details (which " @@ -730,11 +740,11 @@ msgid "" "per-class scope)." msgstr "" -#: howto/isolating-extensions.rst:626 +#: howto/isolating-extensions.rst:642 msgid "Lossless Conversion to Heap Types" msgstr "" -#: howto/isolating-extensions.rst:628 +#: howto/isolating-extensions.rst:644 msgid "" "The heap type API was not designed for \"lossless\" conversion from static " "types; that is, creating a type that works exactly like a given static type." diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 47627b215..eade5938b 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-02-01 22:16+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -243,8 +243,8 @@ msgstr "" #: howto/logging-cookbook.rst:291 msgid "Send messages of severity ``DEBUG`` and above to file ``app.log``" msgstr "" -"envoyer les messages de niveau ``DEBUG`` et au-dessus vers le fichier ``app." -"log``." +"envoyer les messages de niveau ``DEBUG`` et au-dessus vers le fichier " +"``app.log``." #: howto/logging-cookbook.rst:293 msgid "Suppose you configure logging with the following JSON:" @@ -262,9 +262,9 @@ msgid "" "it to the relevant handler. This can be configured by adding a ``filters`` " "section parallel to ``formatters`` and ``handlers``:" msgstr "" -"Cette configuration fait *presque* ce que nous voulons, sauf que ``sys." -"stdout`` affiche les messages de gravité ``ERROR`` et supérieurs ainsi que " -"les messages ``INFO`` et ``WARNING``. Pour éviter cela, nous pouvons " +"Cette configuration fait *presque* ce que nous voulons, sauf que " +"``sys.stdout`` affiche les messages de gravité ``ERROR`` et supérieurs ainsi " +"que les messages ``INFO`` et ``WARNING``. Pour éviter cela, nous pouvons " "configurer un filtre qui exclut ces messages et l'ajouter au gestionnaire " "approprié. Effectuons la configuration en ajoutant une section ``filters`` " "parallèle à ``formatters`` et ``handlers`` :" @@ -289,9 +289,9 @@ msgid "" "a function which only returns ``True`` if the level of the passed in record " "is at or below the specified level. Note that in this example I have defined " "the ``filter_maker`` in a test script ``main.py`` that I run from the " -"command line, so its module will be ``__main__`` - hence the ``__main__." -"filter_maker`` in the filter configuration. You will need to change that if " -"you define it in a different module." +"command line, so its module will be ``__main__`` - hence the " +"``__main__.filter_maker`` in the filter configuration. You will need to " +"change that if you define it in a different module." msgstr "" "Elle convertit la chaîne transmise en argument vers un niveau numérique puis " "renvoie une fonction qui ne renvoie ``True`` que si le niveau de " @@ -354,13 +354,13 @@ msgstr "" #: howto/logging-cookbook.rst:555 msgid "" -"A common culprit which demonstrates sluggish behaviour is the :class:" -"`SMTPHandler`: sending emails can take a long time, for a number of reasons " -"outside the developer's control (for example, a poorly performing mail or " -"network infrastructure). But almost any network-based handler can block: " -"Even a :class:`SocketHandler` operation may do a DNS query under the hood " -"which is too slow (and this query can be deep in the socket library code, " -"below the Python layer, and outside your control)." +"A common culprit which demonstrates sluggish behaviour is " +"the :class:`SMTPHandler`: sending emails can take a long time, for a number " +"of reasons outside the developer's control (for example, a poorly performing " +"mail or network infrastructure). But almost any network-based handler can " +"block: Even a :class:`SocketHandler` operation may do a DNS query under the " +"hood which is too slow (and this query can be deep in the socket library " +"code, below the Python layer, and outside your control)." msgstr "" "Un gestionnaire classiquement lent est le :class:`SMTPHandler` : l’envoi d’e-" "mails peut prendre beaucoup de temps, pour un certain nombre de raisons " @@ -401,12 +401,12 @@ msgstr "" #: howto/logging-cookbook.rst:574 msgid "" "The second part of the solution is :class:`QueueListener`, which has been " -"designed as the counterpart to :class:`QueueHandler`. A :class:" -"`QueueListener` is very simple: it's passed a queue and some handlers, and " -"it fires up an internal thread which listens to its queue for LogRecords " -"sent from ``QueueHandlers`` (or any other source of ``LogRecords``, for that " -"matter). The ``LogRecords`` are removed from the queue and passed to the " -"handlers for processing." +"designed as the counterpart to :class:`QueueHandler`. " +"A :class:`QueueListener` is very simple: it's passed a queue and some " +"handlers, and it fires up an internal thread which listens to its queue for " +"LogRecords sent from ``QueueHandlers`` (or any other source of " +"``LogRecords``, for that matter). The ``LogRecords`` are removed from the " +"queue and passed to the handlers for processing." msgstr "" "La deuxième partie de la solution est la classe :class:`QueueListener`, " "conçue comme l’homologue de :class:`QueueHandler`. Un :class:`QueueListener` " @@ -445,10 +445,10 @@ msgid "" "Although the earlier discussion wasn't specifically talking about async " "code, but rather about slow logging handlers, it should be noted that when " "logging from async code, network and even file handlers could lead to " -"problems (blocking the event loop) because some logging is done from :mod:" -"`asyncio` internals. It might be best, if any async code is used in an " -"application, to use the above approach for logging, so that any blocking " -"code runs only in the ``QueueListener`` thread." +"problems (blocking the event loop) because some logging is done " +"from :mod:`asyncio` internals. It might be best, if any async code is used " +"in an application, to use the above approach for logging, so that any " +"blocking code runs only in the ``QueueListener`` thread." msgstr "" "bien que la discussion précédente n'aborde pas spécifiquement l'utilisation " "de code asynchrone, mais concerne les gestionnaires de journalisation lents, " @@ -482,30 +482,36 @@ msgstr "" "``QueueListener`` compare le niveau de chaque message avec le niveau défini " "dans chaque gestionnaire et ne transmet le message que si c’est opportun." -#: howto/logging-cookbook.rst:632 +#: howto/logging-cookbook.rst:629 +msgid "" +"The :class:`QueueListener` can be started (and stopped) via " +"the :keyword:`with` statement. For example:" +msgstr "" + +#: howto/logging-cookbook.rst:645 msgid "Sending and receiving logging events across a network" msgstr "Envoi et réception d’événements de journalisation à travers le réseau" -#: howto/logging-cookbook.rst:634 +#: howto/logging-cookbook.rst:647 msgid "" "Let's say you want to send logging events across a network, and handle them " -"at the receiving end. A simple way of doing this is attaching a :class:" -"`SocketHandler` instance to the root logger at the sending end::" +"at the receiving end. A simple way of doing this is attaching " +"a :class:`SocketHandler` instance to the root logger at the sending end::" msgstr "" "Supposons que vous souhaitiez envoyer des événements de journalisation sur " "un réseau et les traiter à la réception. Une façon simple de faire est " "d’attacher une instance :class:`SocketHandler` à la journalisation racine de " "l’émetteur ::" -#: howto/logging-cookbook.rst:662 +#: howto/logging-cookbook.rst:675 msgid "" -"At the receiving end, you can set up a receiver using the :mod:" -"`socketserver` module. Here is a basic working example::" +"At the receiving end, you can set up a receiver using " +"the :mod:`socketserver` module. Here is a basic working example::" msgstr "" -"Vous pouvez configurer le récepteur en utilisant le module :mod:" -"`socketserver`. Voici un exemple élémentaire ::" +"Vous pouvez configurer le récepteur en utilisant le " +"module :mod:`socketserver`. Voici un exemple élémentaire ::" -#: howto/logging-cookbook.rst:750 +#: howto/logging-cookbook.rst:763 msgid "" "First run the server, and then the client. On the client side, nothing is " "printed on the console; on the server side, you should see something like:" @@ -513,7 +519,7 @@ msgstr "" "Lancez d’abord le serveur, puis le client. Côté client, rien ne s’affiche " "sur la console ; côté serveur, vous devez voir quelque chose comme ça :" -#: howto/logging-cookbook.rst:762 +#: howto/logging-cookbook.rst:775 #, fuzzy msgid "" "Note that there are some security issues with pickle in some scenarios. If " @@ -524,16 +530,17 @@ msgid "" msgstr "" "Notez que ``pickle`` introduit des problèmes de sécurité dans certains " "scénarios. Si vous êtes concerné, vous pouvez utiliser une sérialisation " -"alternative en surchargeant la méthode :meth:`~handlers.SocketHandler." -"makePickle` par votre propre implémentation, ainsi qu’en adaptant le script " -"ci-dessus pour utiliser votre sérialisation." +"alternative en surchargeant la " +"méthode :meth:`~handlers.SocketHandler.makePickle` par votre propre " +"implémentation, ainsi qu’en adaptant le script ci-dessus pour utiliser votre " +"sérialisation." -#: howto/logging-cookbook.rst:770 +#: howto/logging-cookbook.rst:783 msgid "Running a logging socket listener in production" msgstr "" "Journalisation en production à l’aide d’un connecteur en écoute sur le réseau" -#: howto/logging-cookbook.rst:774 +#: howto/logging-cookbook.rst:787 msgid "" "To run a logging listener in production, you may need to use a process-" "management tool such as `Supervisor `_. `Here is a " @@ -546,27 +553,27 @@ msgstr "" "dans ce `Gist `__ des gabarits pour assurer cette " "fonction avec *Supervisor*. Il est composé des fichiers suivants :" -#: howto/logging-cookbook.rst:781 +#: howto/logging-cookbook.rst:794 msgid "File" msgstr "Fichier" -#: howto/logging-cookbook.rst:781 +#: howto/logging-cookbook.rst:794 msgid "Purpose" msgstr "Objectif" -#: howto/logging-cookbook.rst:783 +#: howto/logging-cookbook.rst:796 msgid ":file:`prepare.sh`" msgstr ":file:`prepare.sh`" -#: howto/logging-cookbook.rst:783 +#: howto/logging-cookbook.rst:796 msgid "A Bash script to prepare the environment for testing" msgstr "Script Bash pour préparer l'environnement de test" -#: howto/logging-cookbook.rst:786 +#: howto/logging-cookbook.rst:799 msgid ":file:`supervisor.conf`" msgstr ":file:`supervisor.conf`" -#: howto/logging-cookbook.rst:786 +#: howto/logging-cookbook.rst:799 msgid "" "The Supervisor configuration file, which has entries for the listener and a " "multi-process web application" @@ -574,11 +581,11 @@ 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:790 +#: howto/logging-cookbook.rst:803 msgid ":file:`ensure_app.sh`" msgstr ":file:`ensure_app.sh`" -#: howto/logging-cookbook.rst:790 +#: howto/logging-cookbook.rst:803 msgid "" "A Bash script to ensure that Supervisor is running with the above " "configuration" @@ -586,11 +593,11 @@ msgstr "" "Script Bash pour s'assurer que *Supervisor* fonctionne bien avec la " "configuration ci-dessus" -#: howto/logging-cookbook.rst:793 +#: howto/logging-cookbook.rst:806 msgid ":file:`log_listener.py`" msgstr ":file:`log_listener.py`" -#: howto/logging-cookbook.rst:793 +#: howto/logging-cookbook.rst:806 msgid "" "The socket listener program which receives log events and records them to a " "file" @@ -598,35 +605,35 @@ 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:796 +#: howto/logging-cookbook.rst:809 msgid ":file:`main.py`" msgstr ":file:`main.py`" -#: howto/logging-cookbook.rst:796 +#: howto/logging-cookbook.rst:809 msgid "" "A simple web application which performs logging via a socket connected to " "the listener" msgstr "Application web simple qui journalise *via* un connecteur réseau" -#: howto/logging-cookbook.rst:799 +#: howto/logging-cookbook.rst:812 msgid ":file:`webapp.json`" msgstr ":file:`webapp.json`" -#: howto/logging-cookbook.rst:799 +#: howto/logging-cookbook.rst:812 msgid "A JSON configuration file for the web application" msgstr "Fichier JSON de configuration de l'application web" -#: howto/logging-cookbook.rst:801 +#: howto/logging-cookbook.rst:814 msgid ":file:`client.py`" msgstr ":file:`client.py`" -#: howto/logging-cookbook.rst:801 +#: howto/logging-cookbook.rst:814 msgid "A Python script to exercise the web application" msgstr "" "Script Python qui interagit avec l'application web pour effectuer des appels " "à la journalisation" -#: howto/logging-cookbook.rst:804 +#: howto/logging-cookbook.rst:817 msgid "" "The web application uses `Gunicorn `_, which is a " "popular web application server that starts multiple worker processes to " @@ -641,25 +648,25 @@ msgstr "" "conflit les uns avec les autres — ils passent tous par le connecteur en " "écoute." -#: howto/logging-cookbook.rst:809 +#: howto/logging-cookbook.rst:822 msgid "To test these files, do the following in a POSIX environment:" msgstr "" "Pour tester ces fichiers, suivez cette procédure dans un environnement " "POSIX :" -#: howto/logging-cookbook.rst:811 +#: howto/logging-cookbook.rst:824 msgid "" -"Download `the Gist `__ as a ZIP archive using the :" -"guilabel:`Download ZIP` button." +"Download `the Gist `__ as a ZIP archive using " +"the :guilabel:`Download ZIP` button." msgstr "" "Téléchargez l'archive ZIP du `Gist `__ à l'aide du " "bouton :guilabel:`Download ZIP`." -#: howto/logging-cookbook.rst:814 +#: howto/logging-cookbook.rst:827 msgid "Unzip the above files from the archive into a scratch directory." msgstr "Décompressez les fichiers de l'archive dans un répertoire de travail." -#: howto/logging-cookbook.rst:816 +#: howto/logging-cookbook.rst:829 msgid "" "In the scratch directory, run ``bash prepare.sh`` to get things ready. This " "creates a :file:`run` subdirectory to contain Supervisor-related and log " @@ -672,7 +679,7 @@ msgstr "" "répertoire :file:`venv` pour contenir un environnement virtuel dans lequel " "``bottle``, ``gunicorn`` et ``supervisor`` sont installés." -#: howto/logging-cookbook.rst:821 +#: howto/logging-cookbook.rst:834 msgid "" "Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the " "above configuration." @@ -680,7 +687,7 @@ msgstr "" "Exécutez ``bash ensure_app.sh`` pour vous assurer que *Supervisor* s'exécute " "avec la configuration ci-dessus." -#: howto/logging-cookbook.rst:824 +#: howto/logging-cookbook.rst:837 msgid "" "Run ``venv/bin/python client.py`` to exercise the web application, which " "will lead to records being written to the log." @@ -688,7 +695,7 @@ 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:827 +#: howto/logging-cookbook.rst:840 msgid "" "Inspect the log files in the :file:`run` subdirectory. You should see the " "most recent log lines in files matching the pattern :file:`app.log*`. They " @@ -701,7 +708,7 @@ msgstr "" "ont été traités par les différents processus de travail de manière non " "déterministe." -#: howto/logging-cookbook.rst:832 +#: howto/logging-cookbook.rst:845 msgid "" "You can shut down the listener and the web application by running ``venv/bin/" "supervisorctl -c supervisor.conf shutdown``." @@ -709,7 +716,7 @@ 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:835 +#: howto/logging-cookbook.rst:848 msgid "" "You may need to tweak the configuration files in the unlikely event that the " "configured ports clash with something else in your test environment." @@ -718,12 +725,33 @@ msgstr "" "probable où les ports configurés entrent en conflit avec autre chose dans " "votre environnement de test." -#: howto/logging-cookbook.rst:843 +#: howto/logging-cookbook.rst:851 +msgid "" +"The default configuration uses a TCP socket on port 9020. You can use a Unix " +"Domain socket instead of a TCP socket by doing the following:" +msgstr "" + +#: howto/logging-cookbook.rst:854 +msgid "" +"In :file:`listener.json`, add a ``socket`` key with the path to the domain " +"socket you want to use. If this key is present, the listener listens on the " +"corresponding domain socket and not on a TCP socket (the ``port`` key is " +"ignored)." +msgstr "" + +#: howto/logging-cookbook.rst:859 +msgid "" +"In :file:`webapp.json`, change the socket handler configuration dictionary " +"so that the ``host`` value is the path to the domain socket, and set the " +"``port`` value to ``null``." +msgstr "" + +#: howto/logging-cookbook.rst:869 msgid "Adding contextual information to your logging output" msgstr "Ajout d’informations contextuelles dans la journalisation" # #no-qa -#: howto/logging-cookbook.rst:845 +#: howto/logging-cookbook.rst:871 msgid "" "Sometimes you want logging output to contain contextual information in " "addition to the parameters passed to the logging call. For example, in a " @@ -735,8 +763,8 @@ msgid "" "is not a good idea because these instances are not garbage collected. While " "this is not a problem in practice, when the number of :class:`Logger` " "instances is dependent on the level of granularity you want to use in " -"logging an application, it could be hard to manage if the number of :class:" -"`Logger` instances becomes effectively unbounded." +"logging an application, it could be hard to manage if the number " +"of :class:`Logger` instances becomes effectively unbounded." msgstr "" "Dans certains cas, vous pouvez souhaiter que la journalisation contienne des " "informations contextuelles en plus des paramètres transmis à l’appel de " @@ -745,48 +773,48 @@ msgstr "" "journal (par exemple, le nom d’utilisateur ou l’adresse IP du client " "distant). Bien que vous puissiez utiliser le paramètre *extra* pour y " "parvenir, il n’est pas toujours pratique de transmettre les informations de " -"cette manière. Il peut être aussi tentant de créer des instances :class:" -"`Logger` connexion par connexion, mais ce n’est pas une bonne idée car ces " -"instances :class:`Logger` ne sont pas éliminées par le ramasse-miettes. Même " -"si ce point n’est pas problématique en soi si la journalisation est " -"configurée avec plusieurs niveaux de granularité, cela peut devenir " -"difficile de gérer un nombre potentiellement illimité d’instances de :class:" -"`Logger`." - -#: howto/logging-cookbook.rst:860 +"cette manière. Il peut être aussi tentant de créer des " +"instances :class:`Logger` connexion par connexion, mais ce n’est pas une " +"bonne idée car ces instances :class:`Logger` ne sont pas éliminées par le " +"ramasse-miettes. Même si ce point n’est pas problématique en soi si la " +"journalisation est configurée avec plusieurs niveaux de granularité, cela " +"peut devenir difficile de gérer un nombre potentiellement illimité " +"d’instances de :class:`Logger`." + +#: howto/logging-cookbook.rst:886 msgid "Using LoggerAdapters to impart contextual information" msgstr "" "Utilisation d’adaptateurs de journalisation pour transmettre des " "informations contextuelles" -#: howto/logging-cookbook.rst:862 +#: howto/logging-cookbook.rst:888 msgid "" "An easy way in which you can pass contextual information to be output along " "with logging event information is to use the :class:`LoggerAdapter` class. " -"This class is designed to look like a :class:`Logger`, so that you can call :" -"meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:" -"`exception`, :meth:`critical` and :meth:`log`. These methods have the same " -"signatures as their counterparts in :class:`Logger`, so you can use the two " -"types of instances interchangeably." +"This class is designed to look like a :class:`Logger`, so that you can " +"call :meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` " +"and :meth:`log`. These methods have the same signatures as their " +"counterparts in :class:`Logger`, so you can use the two types of instances " +"interchangeably." msgstr "" "Un moyen simple de transmettre des informations contextuelles accompagnant " -"les informations de journalisation consiste à utiliser la classe :class:" -"`LoggerAdapter`. Cette classe est conçue pour ressembler à un :class:" -"`Logger`, de sorte que vous pouvez appeler :meth:`debug`, :meth:`info`, :" -"meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` et :meth:" -"`log`. Ces méthodes ont les mêmes signatures que leurs homologues dans :" -"class:`Logger`, vous pouvez donc utiliser les deux types d’instances de " -"manière interchangeable." - -#: howto/logging-cookbook.rst:870 -msgid "" -"When you create an instance of :class:`LoggerAdapter`, you pass it a :class:" -"`Logger` instance and a dict-like object which contains your contextual " -"information. When you call one of the logging methods on an instance of :" -"class:`LoggerAdapter`, it delegates the call to the underlying instance of :" -"class:`Logger` passed to its constructor, and arranges to pass the " -"contextual information in the delegated call. Here's a snippet from the code " -"of :class:`LoggerAdapter`::" +"les informations de journalisation consiste à utiliser la " +"classe :class:`LoggerAdapter`. Cette classe est conçue pour ressembler à " +"un :class:`Logger`, de sorte que vous pouvez " +"appeler :meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` " +"et :meth:`log`. Ces méthodes ont les mêmes signatures que leurs homologues " +"dans :class:`Logger`, vous pouvez donc utiliser les deux types d’instances " +"de manière interchangeable." + +#: howto/logging-cookbook.rst:896 +msgid "" +"When you create an instance of :class:`LoggerAdapter`, you pass it " +"a :class:`Logger` instance and a dict-like object which contains your " +"contextual information. When you call one of the logging methods on an " +"instance of :class:`LoggerAdapter`, it delegates the call to the underlying " +"instance of :class:`Logger` passed to its constructor, and arranges to pass " +"the contextual information in the delegated call. Here's a snippet from the " +"code of :class:`LoggerAdapter`::" msgstr "" "Lorsque vous créez une instance de :class:`LoggerAdapter`, vous lui " "transmettez une instance de :class:`Logger` et un objet dictionnaire qui " @@ -796,7 +824,7 @@ msgstr "" "constructeur et s’arrange pour intégrer les informations contextuelles dans " "l’appel délégué. Voici un extrait du code de :class:`LoggerAdapter` ::" -#: howto/logging-cookbook.rst:886 +#: howto/logging-cookbook.rst:912 msgid "" "The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " "the contextual information is added to the logging output. It's passed the " @@ -808,41 +836,42 @@ msgid "" "had passed an 'extra' keyword argument in the call to the adapter, it will " "be silently overwritten." msgstr "" -"Les informations contextuelles sont ajoutées dans la méthode :meth:" -"`~LoggerAdapter.process` de :class:`LoggerAdapter`. On lui passe le message " -"et les arguments par mot-clé de l’appel de journalisation, et elle en " -"renvoie des versions (potentiellement) modifiées à utiliser pour la " -"journalisation sous-jacente. L’implémentation par défaut de cette méthode " +"Les informations contextuelles sont ajoutées dans la " +"méthode :meth:`~LoggerAdapter.process` de :class:`LoggerAdapter`. On lui " +"passe le message et les arguments par mot-clé de l’appel de journalisation, " +"et elle en renvoie des versions (potentiellement) modifiées à utiliser pour " +"la journalisation sous-jacente. L’implémentation par défaut de cette méthode " "laisse le message seul, mais insère une clé ``extra`` dans l’argument par " "mot-clé dont la valeur est l’objet dictionnaire passé au constructeur. Bien " "sûr, si vous avez passé un argument par mot-clé ``extra`` dans l’appel à " "l’adaptateur, il est écrasé silencieusement." -#: howto/logging-cookbook.rst:895 +#: howto/logging-cookbook.rst:921 msgid "" "The advantage of using 'extra' is that the values in the dict-like object " "are merged into the :class:`LogRecord` instance's __dict__, allowing you to " "use customized strings with your :class:`Formatter` instances which know " "about the keys of the dict-like object. If you need a different method, e.g. " "if you want to prepend or append the contextual information to the message " -"string, you just need to subclass :class:`LoggerAdapter` and override :meth:" -"`~LoggerAdapter.process` to do what you need. Here is a simple example::" +"string, you just need to subclass :class:`LoggerAdapter` and " +"override :meth:`~LoggerAdapter.process` to do what you need. Here is a " +"simple example::" msgstr "" "L’avantage d’utiliser ``extra`` est que les valeurs de l’objet dictionnaire " "sont fusionnées dans le ``__dict__`` de l’instance :class:`LogRecord`, ce " -"qui vous permet d’utiliser des chaînes personnalisées avec vos instances :" -"class:`Formatter` qui connaissent les clés de l’objet dictionnaire. Si vous " -"avez besoin d’une méthode différente, par exemple si vous souhaitez ajouter " -"des informations contextuelles avant ou après la chaîne de message, il vous " -"suffit de surcharger :class:`LoggerAdapter` et de remplacer :meth:" -"`~LoggerAdapter.process` pour faire ce dont vous avez besoin. Voici un " -"exemple simple ::" - -#: howto/logging-cookbook.rst:911 +"qui vous permet d’utiliser des chaînes personnalisées avec vos " +"instances :class:`Formatter` qui connaissent les clés de l’objet " +"dictionnaire. Si vous avez besoin d’une méthode différente, par exemple si " +"vous souhaitez ajouter des informations contextuelles avant ou après la " +"chaîne de message, il vous suffit de surcharger :class:`LoggerAdapter` et de " +"remplacer :meth:`~LoggerAdapter.process` pour faire ce dont vous avez " +"besoin. Voici un exemple simple ::" + +#: howto/logging-cookbook.rst:937 msgid "which you can use like this::" msgstr "que vous pouvez utiliser comme ceci ::" -#: howto/logging-cookbook.rst:916 +#: howto/logging-cookbook.rst:942 msgid "" "Then any events that you log to the adapter will have the value of " "``some_conn_id`` prepended to the log messages." @@ -850,13 +879,13 @@ msgstr "" "Ainsi, tout événement journalisé aura la valeur de ``some_conn_id`` insérée " "en début de message de journalisation." -#: howto/logging-cookbook.rst:920 +#: howto/logging-cookbook.rst:946 msgid "Using objects other than dicts to pass contextual information" msgstr "" "Utilisation d’objets autres que les dictionnaires pour passer des " "informations contextuelles" -#: howto/logging-cookbook.rst:922 +#: howto/logging-cookbook.rst:948 msgid "" "You don't need to pass an actual dict to a :class:`LoggerAdapter` - you " "could pass an instance of a class which implements ``__getitem__`` and " @@ -864,24 +893,24 @@ msgid "" "if you want to generate values dynamically (whereas the values in a dict " "would be constant)." msgstr "" -"Il n’est pas obligatoire de passer un dictionnaire réel à un :class:" -"`LoggerAdapter`, vous pouvez passer une instance d’une classe qui implémente " -"``__getitem__`` et ``__iter__`` pour qu’il ressemble à un dictionnaire du " -"point de vue de la journalisation. C’est utile si vous souhaitez générer des " -"valeurs de manière dynamique (alors que les valeurs d’un dictionnaire " -"seraient constantes)." +"Il n’est pas obligatoire de passer un dictionnaire réel à " +"un :class:`LoggerAdapter`, vous pouvez passer une instance d’une classe qui " +"implémente ``__getitem__`` et ``__iter__`` pour qu’il ressemble à un " +"dictionnaire du point de vue de la journalisation. C’est utile si vous " +"souhaitez générer des valeurs de manière dynamique (alors que les valeurs " +"d’un dictionnaire seraient constantes)." -#: howto/logging-cookbook.rst:931 +#: howto/logging-cookbook.rst:957 msgid "Using Filters to impart contextual information" msgstr "Utilisation de filtres pour transmettre des informations contextuelles" -#: howto/logging-cookbook.rst:933 +#: howto/logging-cookbook.rst:959 msgid "" -"You can also add contextual information to log output using a user-defined :" -"class:`Filter`. ``Filter`` instances are allowed to modify the " +"You can also add contextual information to log output using a user-" +"defined :class:`Filter`. ``Filter`` instances are allowed to modify the " "``LogRecords`` passed to them, including adding additional attributes which " -"can then be output using a suitable format string, or if needed a custom :" -"class:`Formatter`." +"can then be output using a suitable format string, or if needed a " +"custom :class:`Formatter`." msgstr "" "Un :class:`Filter` défini par l’utilisateur peut aussi ajouter des " "informations contextuelles à la journalisation. Les instances de ``Filter`` " @@ -890,16 +919,16 @@ msgstr "" "intégrés à la journalisation en utilisant une chaîne de formatage appropriée " "ou, si nécessaire, un :class:`Formatter` personnalisé." -#: howto/logging-cookbook.rst:938 +#: howto/logging-cookbook.rst:964 msgid "" "For example in a web application, the request being processed (or at least, " -"the interesting parts of it) can be stored in a threadlocal (:class:" -"`threading.local`) variable, and then accessed from a ``Filter`` to add, " -"say, information from the request - say, the remote IP address and remote " -"user's username - to the ``LogRecord``, using the attribute names 'ip' and " -"'user' as in the ``LoggerAdapter`` example above. In that case, the same " -"format string can be used to get similar output to that shown above. Here's " -"an example script::" +"the interesting parts of it) can be stored in a threadlocal " +"(:class:`threading.local`) variable, and then accessed from a ``Filter`` to " +"add, say, information from the request - say, the remote IP address and " +"remote user's username - to the ``LogRecord``, using the attribute names " +"'ip' and 'user' as in the ``LoggerAdapter`` example above. In that case, the " +"same format string can be used to get similar output to that shown above. " +"Here's an example script::" msgstr "" "Par exemple, dans une application Web, la requête en cours de traitement (ou " "du moins ce qu’elle contient d’intéressant) peut être stockée dans une " @@ -911,15 +940,15 @@ msgstr "" "formatage peut être utilisée pour obtenir une sortie similaire à celle " "indiquée ci-dessus. Voici un exemple de script ::" -#: howto/logging-cookbook.rst:984 +#: howto/logging-cookbook.rst:1010 msgid "which, when run, produces something like:" msgstr "qui, à l’exécution, produit quelque chose comme ça :" -#: howto/logging-cookbook.rst:1002 +#: howto/logging-cookbook.rst:1028 msgid "Use of ``contextvars``" msgstr "" -#: howto/logging-cookbook.rst:1004 +#: howto/logging-cookbook.rst:1030 msgid "" "Since Python 3.7, the :mod:`contextvars` module has provided context-local " "storage which works for both :mod:`threading` and :mod:`asyncio` processing " @@ -929,7 +958,7 @@ msgid "" "attributes handled by web applications." msgstr "" -#: howto/logging-cookbook.rst:1010 +#: howto/logging-cookbook.rst:1036 msgid "" "For the purposes of illustration, say that you have different web " "applications, each independent of the other but running in the same Python " @@ -940,18 +969,18 @@ msgid "" "information such as client IP, HTTP request method and client username?" msgstr "" -#: howto/logging-cookbook.rst:1017 +#: howto/logging-cookbook.rst:1043 msgid "Let's assume that the library can be simulated by the following code:" msgstr "" -#: howto/logging-cookbook.rst:1033 +#: howto/logging-cookbook.rst:1059 msgid "" "We can simulate the multiple web applications by means of two simple " "classes, ``Request`` and ``WebApp``. These simulate how real threaded web " "applications work - each request is handled by a thread:" msgstr "" -#: howto/logging-cookbook.rst:1177 +#: howto/logging-cookbook.rst:1203 msgid "" "If you run the above, you should find that roughly half the requests go " "into :file:`app1.log` and the rest into :file:`app2.log`, and the all the " @@ -962,11 +991,11 @@ msgid "" "illustrated by the following shell output:" msgstr "" -#: howto/logging-cookbook.rst:1224 +#: howto/logging-cookbook.rst:1250 msgid "Imparting contextual information in handlers" msgstr "Ajout d'informations contextuelles dans la journalisation" -#: howto/logging-cookbook.rst:1226 +#: howto/logging-cookbook.rst:1252 msgid "" "Each :class:`~Handler` has its own chain of filters. If you want to add " "contextual information to a :class:`LogRecord` without leaking it to other " @@ -979,11 +1008,11 @@ msgstr "" "renvoie un nouveau :class:`~LogRecord` au lieu de le modifier sur place, " "comme dans le script suivant ::" -#: howto/logging-cookbook.rst:1253 +#: howto/logging-cookbook.rst:1279 msgid "Logging to a single file from multiple processes" msgstr "Journalisation vers un fichier unique à partir de plusieurs processus" -#: howto/logging-cookbook.rst:1255 +#: howto/logging-cookbook.rst:1281 msgid "" "Although logging is thread-safe, and logging to a single file from multiple " "threads in a single process *is* supported, logging to a single file from " @@ -993,10 +1022,10 @@ msgid "" "this is to have all the processes log to a :class:`~handlers.SocketHandler`, " "and have a separate process which implements a socket server which reads " "from the socket and logs to file. (If you prefer, you can dedicate one " -"thread in one of the existing processes to perform this function.) :ref:" -"`This section ` documents this approach in more detail and " -"includes a working socket receiver which can be used as a starting point for " -"you to adapt in your own applications." +"thread in one of the existing processes to perform this " +"function.) :ref:`This section ` documents this approach in " +"more detail and includes a working socket receiver which can be used as a " +"starting point for you to adapt in your own applications." msgstr "" "La journalisation est fiable avec les programmes à fils d’exécution " "multiples (*thread-safe*) : rien n’empêche plusieurs fils d’exécution de " @@ -1013,26 +1042,25 @@ msgstr "" "en détail et inclut un connecteur en écoute réseau fonctionnel qui peut être " "utilisé comme point de départ pour l’adapter à vos propres applications." -#: howto/logging-cookbook.rst:1268 +#: howto/logging-cookbook.rst:1294 +#, fuzzy msgid "" -"You could also write your own handler which uses the :class:" -"`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " -"serialize access to the file from your processes. The existing :class:" -"`FileHandler` and subclasses do not make use of :mod:`multiprocessing` at " -"present, though they may do so in the future. Note that at present, the :mod:" -"`multiprocessing` module does not provide working lock functionality on all " -"platforms (see https://bugs.python.org/issue3770)." +"You could also write your own handler which uses " +"the :class:`~multiprocessing.Lock` class from the :mod:`multiprocessing` " +"module to serialize access to the file from your processes. The " +"stdlib :class:`FileHandler` and subclasses do not make use " +"of :mod:`multiprocessing`." msgstr "" "Vous pouvez également écrire votre propre gestionnaire en utilisant la " "classe :class:`~multiprocessing.Lock` du module :mod:`multiprocessing` pour " -"sérialiser l’accès au fichier depuis vos processus. Les actuels :class:" -"`FileHandler` et sous-classes n’utilisent pas :mod:`multiprocessing` pour le " -"moment, même s’ils pourraient le faire à l’avenir. Notez qu’à l’heure " -"actuelle, le module :mod:`multiprocessing` ne fournit pas un verrouillage " -"fonctionnel pour toutes les plates-formes (voir https://bugs.python.org/" -"issue3770)." +"sérialiser l’accès au fichier depuis vos processus. Les " +"actuels :class:`FileHandler` et sous-classes n’utilisent " +"pas :mod:`multiprocessing` pour le moment, même s’ils pourraient le faire à " +"l’avenir. Notez qu’à l’heure actuelle, le module :mod:`multiprocessing` ne " +"fournit pas un verrouillage fonctionnel pour toutes les plates-formes (voir " +"https://bugs.python.org/issue3770)." -#: howto/logging-cookbook.rst:1278 +#: howto/logging-cookbook.rst:1301 msgid "" "Alternatively, you can use a ``Queue`` and a :class:`QueueHandler` to send " "all logging events to one of the processes in your multi-process " @@ -1059,7 +1087,7 @@ msgstr "" "les autres processus de votre application, et peut être utilisé comme base " "pour répondre à vos propres exigences ::" -#: howto/logging-cookbook.rst:1394 +#: howto/logging-cookbook.rst:1417 msgid "" "A variant of the above script keeps the logging in the main process, in a " "separate thread::" @@ -1067,7 +1095,7 @@ msgstr "" "Une variante du script ci-dessus conserve la journalisation dans le " "processus principal, dans un fil séparé ::" -#: howto/logging-cookbook.rst:1489 +#: howto/logging-cookbook.rst:1512 msgid "" "This variant shows how you can e.g. apply configuration for particular " "loggers - e.g. the ``foo`` logger has a special handler which stores all " @@ -1084,11 +1112,11 @@ msgstr "" "journalisation sont générés dans les processus de travail) pour diriger les " "messages vers les destinations appropriées." -#: howto/logging-cookbook.rst:1496 +#: howto/logging-cookbook.rst:1519 msgid "Using concurrent.futures.ProcessPoolExecutor" msgstr "Utilisation de concurrent.futures.ProcessPoolExecutor" -#: howto/logging-cookbook.rst:1498 +#: howto/logging-cookbook.rst:1521 msgid "" "If you want to use :class:`concurrent.futures.ProcessPoolExecutor` to start " "your worker processes, you need to create the queue slightly differently. " @@ -1098,29 +1126,31 @@ msgstr "" "pour démarrer vos processus de travail, vous devez créer la file d’attente " "légèrement différemment. À la place de" -#: howto/logging-cookbook.rst:1506 +#: howto/logging-cookbook.rst:1529 msgid "you should use" msgstr "vous devez écrire" -#: howto/logging-cookbook.rst:1512 +#: howto/logging-cookbook.rst:1535 msgid "and you can then replace the worker creation from this::" msgstr "" "et vous pouvez alors remplacer la création du processus de travail telle " "que ::" -#: howto/logging-cookbook.rst:1523 +#: howto/logging-cookbook.rst:1546 msgid "to this (remembering to first import :mod:`concurrent.futures`)::" msgstr "" -"par celle-ci (souvenez-vous d’importer au préalable :mod:`concurrent." -"futures`) ::" +"par celle-ci (souvenez-vous d’importer au " +"préalable :mod:`concurrent.futures`) ::" -#: howto/logging-cookbook.rst:1530 -msgid "Deploying Web applications using Gunicorn and uWSGI" +#: howto/logging-cookbook.rst:1553 +#, fuzzy +msgid "Deploying web applications using Gunicorn and uWSGI" msgstr "Déploiement d’applications Web avec *Gunicorn* et *uWSGI*" -#: howto/logging-cookbook.rst:1532 +#: howto/logging-cookbook.rst:1555 +#, fuzzy msgid "" -"When deploying Web applications using `Gunicorn `_ or " +"When deploying web applications using `Gunicorn `_ or " "`uWSGI `_ (or similar), " "multiple worker processes are created to handle client requests. In such " "environments, avoid creating file-based handlers directly in your web " @@ -1140,11 +1170,11 @@ msgstr "" "tel que *Supervisor* (voir `Journalisation en production à l’aide d’un " "connecteur en écoute sur le réseau`_ pour plus de détails)." -#: howto/logging-cookbook.rst:1542 +#: howto/logging-cookbook.rst:1565 msgid "Using file rotation" msgstr "Utilisation du roulement de fichiers" -#: howto/logging-cookbook.rst:1547 +#: howto/logging-cookbook.rst:1567 #, fuzzy msgid "" "Sometimes you want to let a log file grow to a certain size, then open a new " @@ -1158,10 +1188,11 @@ msgstr "" "les nouveaux événements. Vous souhaitez peut-être conserver un certain " "nombre de ces fichiers et, lorsque ce nombre de fichiers aura été créé, " "faire rouler les fichiers afin que le nombre de fichiers et la taille des " -"fichiers restent tous deux limités. Pour ce cas d’usage, :class:`~handlers." -"RotatingFileHandler` est inclus dans le paquet de journalisation ::" +"fichiers restent tous deux limités. Pour ce cas " +"d’usage, :class:`~handlers.RotatingFileHandler` est inclus dans le paquet de " +"journalisation ::" -#: howto/logging-cookbook.rst:1579 +#: howto/logging-cookbook.rst:1599 msgid "" "The result should be 6 separate files, each with part of the log history for " "the application:" @@ -1169,20 +1200,20 @@ msgstr "" "Vous devez obtenir 6 fichiers séparés, chacun contenant une partie de " "l’historique de journalisation de l’application :" -#: howto/logging-cookbook.rst:1591 +#: howto/logging-cookbook.rst:1611 msgid "" "The most current file is always :file:`logging_rotatingfile_example.out`, " "and each time it reaches the size limit it is renamed with the suffix " "``.1``. Each of the existing backup files is renamed to increment the suffix " "(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased." msgstr "" -"Le fichier de journalisation actuel est toujours :file:" -"`logging_rotatingfile_example.out`, et chaque fois qu’il atteint la taille " -"limite, il est renommé avec le suffixe ``.1``. Chacun des fichiers de " -"sauvegarde existants est renommé pour incrémenter le suffixe (``.1`` devient " -"``.2``, etc.) et le fichier ``.6`` est effacé." +"Le fichier de journalisation actuel est " +"toujours :file:`logging_rotatingfile_example.out`, et chaque fois qu’il " +"atteint la taille limite, il est renommé avec le suffixe ``.1``. Chacun des " +"fichiers de sauvegarde existants est renommé pour incrémenter le suffixe " +"(``.1`` devient ``.2``, etc.) et le fichier ``.6`` est effacé." -#: howto/logging-cookbook.rst:1596 +#: howto/logging-cookbook.rst:1616 msgid "" "Obviously this example sets the log length much too small as an extreme " "example. You would want to set *maxBytes* to an appropriate value." @@ -1190,17 +1221,17 @@ msgstr "" "De toute évidence, la longueur du journal définie dans cet exemple est " "beaucoup trop petite. À vous de définir *maxBytes* à une valeur appropriée." -#: howto/logging-cookbook.rst:1604 +#: howto/logging-cookbook.rst:1624 msgid "Use of alternative formatting styles" msgstr "Utilisation d’autres styles de formatage" -#: howto/logging-cookbook.rst:1606 +#: howto/logging-cookbook.rst:1626 msgid "" "When logging was added to the Python standard library, the only way of " "formatting messages with variable content was to use the %-formatting " -"method. Since then, Python has gained two new formatting approaches: :class:" -"`string.Template` (added in Python 2.4) and :meth:`str.format` (added in " -"Python 2.6)." +"method. Since then, Python has gained two new formatting " +"approaches: :class:`string.Template` (added in Python 2.4) " +"and :meth:`str.format` (added in Python 2.6)." msgstr "" "Lorsque la journalisation a été ajoutée à la bibliothèque standard Python, " "la seule façon de formater les messages avec un contenu variable était " @@ -1208,7 +1239,7 @@ msgstr "" "de deux nouvelles méthode de formatage : :class:`string.Template` (ajouté " "dans Python 2.4) et :meth:`str.format` (ajouté dans Python 2.6)." -#: howto/logging-cookbook.rst:1612 +#: howto/logging-cookbook.rst:1632 msgid "" "Logging (as of 3.2) provides improved support for these two additional " "formatting styles. The :class:`Formatter` class been enhanced to take an " @@ -1216,23 +1247,23 @@ msgid "" "``'%'``, but other possible values are ``'{'`` and ``'$'``, which correspond " "to the other two formatting styles. Backwards compatibility is maintained by " "default (as you would expect), but by explicitly specifying a style " -"parameter, you get the ability to specify format strings which work with :" -"meth:`str.format` or :class:`string.Template`. Here's an example console " -"session to show the possibilities:" +"parameter, you get the ability to specify format strings which work " +"with :meth:`str.format` or :class:`string.Template`. Here's an example " +"console session to show the possibilities:" msgstr "" "La journalisation (à partir de la version 3.2) offre une meilleure prise en " -"charge de ces deux styles de formatage supplémentaires. La classe :class:" -"`Formatter` a été améliorée pour accepter un paramètre par mot-clé " -"facultatif supplémentaire nommé ``style``. La valeur par défaut est ``'%'``, " -"les autres valeurs possibles étant ``'{'`` et ``'$'``, qui correspondent aux " -"deux autres styles de formatage. La rétrocompatibilité est maintenue par " -"défaut (comme vous vous en doutez) mais, en spécifiant explicitement un " -"paramètre de style, vous avez la possibilité de spécifier des chaînes de " -"format qui fonctionnent avec :meth:`str.format` ou :class:`string.Template`. " -"Voici un exemple de session interactive en console pour montrer les " -"possibilités :" - -#: howto/logging-cookbook.rst:1646 +"charge de ces deux styles de formatage supplémentaires. La " +"classe :class:`Formatter` a été améliorée pour accepter un paramètre par mot-" +"clé facultatif supplémentaire nommé ``style``. La valeur par défaut est " +"``'%'``, les autres valeurs possibles étant ``'{'`` et ``'$'``, qui " +"correspondent aux deux autres styles de formatage. La rétrocompatibilité est " +"maintenue par défaut (comme vous vous en doutez) mais, en spécifiant " +"explicitement un paramètre de style, vous avez la possibilité de spécifier " +"des chaînes de format qui fonctionnent avec :meth:`str.format` " +"ou :class:`string.Template`. Voici un exemple de session interactive en " +"console pour montrer les possibilités :" + +#: howto/logging-cookbook.rst:1666 msgid "" "Note that the formatting of logging messages for final output to logs is " "completely independent of how an individual logging message is constructed. " @@ -1243,7 +1274,7 @@ msgstr "" "individuel est construit. Vous pouvez toujours utiliser formatage *via* " "« % », comme ici ::" -#: howto/logging-cookbook.rst:1654 +#: howto/logging-cookbook.rst:1674 msgid "" "Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1251,12 +1282,12 @@ msgid "" "logging call (e.g. the ``exc_info`` keyword parameter to indicate that " "traceback information should be logged, or the ``extra`` keyword parameter " "to indicate additional contextual information to be added to the log). So " -"you cannot directly make logging calls using :meth:`str.format` or :class:" -"`string.Template` syntax, because internally the logging package uses %-" -"formatting to merge the format string and the variable arguments. There " -"would be no changing this while preserving backward compatibility, since all " -"logging calls which are out there in existing code will be using %-format " -"strings." +"you cannot directly make logging calls using :meth:`str.format` " +"or :class:`string.Template` syntax, because internally the logging package " +"uses %-formatting to merge the format string and the variable arguments. " +"There would be no changing this while preserving backward compatibility, " +"since all logging calls which are out there in existing code will be using %-" +"format strings." msgstr "" "Les appels de journalisation (``logger.debug()``, ``logger.info()`` etc.) ne " "prennent que des paramètres positionnels pour le message de journalisation " @@ -1265,14 +1296,15 @@ msgstr "" "clé ``exc_info`` indique que les informations de trace doivent être " "enregistrées, ou le paramètre par mot-clé ``extra`` indique des informations " "contextuelles supplémentaires à ajouter au journal). Vous ne pouvez donc pas " -"inclure dans les appels de journalisation à l’aide de la syntaxe :meth:`str." -"format` ou :class:`string.Template`, car le paquet de journalisation utilise " -"le formatage via « % » en interne pour fusionner la chaîne de format et les " -"arguments de variables. Il n’est pas possible de changer ça tout en " -"préservant la rétrocompatibilité puisque tous les appels de journalisation " -"dans le code pré-existant utilisent des chaînes au format « % »." +"inclure dans les appels de journalisation à l’aide de la " +"syntaxe :meth:`str.format` ou :class:`string.Template`, car le paquet de " +"journalisation utilise le formatage via « % » en interne pour fusionner la " +"chaîne de format et les arguments de variables. Il n’est pas possible de " +"changer ça tout en préservant la rétrocompatibilité puisque tous les appels " +"de journalisation dans le code pré-existant utilisent des chaînes au format " +"« % »." -#: howto/logging-cookbook.rst:1667 +#: howto/logging-cookbook.rst:1687 msgid "" "There is, however, a way that you can use {}- and $- formatting to construct " "your individual log messages. Recall that for a message you can use an " @@ -1286,7 +1318,7 @@ msgstr "" "et que le package de journalisation appelle ``str()`` sur cet objet pour " "fabriquer la chaîne finale. Considérez les deux classes suivantes ::" -#: howto/logging-cookbook.rst:1691 +#: howto/logging-cookbook.rst:1711 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1296,16 +1328,16 @@ msgid "" "__ (double underscore --- not to be confused with _, the single underscore " "used as a synonym/alias for :func:`gettext.gettext` or its brethren)." msgstr "" -"L’une ou l’autre peut être utilisée à la place d’une chaîne de format " -"\"%(message)s\" ou \"{message}\" ou \"$message\", afin de mettre en forme " -"*via* « { } » ou « $ » la partie « message réel » qui apparaît dans la " -"sortie de journal formatée. Il est un peu lourd d’utiliser les noms de " -"classe chaque fois que vous voulez journaliser quelque chose, mais ça " -"devient acceptable si vous utilisez un alias tel que __ (double trait de " -"soulignement — à ne pas confondre avec _, le trait de soulignement unique " -"utilisé comme alias pour :func:`gettext.gettext` ou ses homologues)." +"L’une ou l’autre peut être utilisée à la place d’une chaîne de format \"%" +"(message)s\" ou \"{message}\" ou \"$message\", afin de mettre en forme *via* " +"« { } » ou « $ » la partie « message réel » qui apparaît dans la sortie de " +"journal formatée. Il est un peu lourd d’utiliser les noms de classe chaque " +"fois que vous voulez journaliser quelque chose, mais ça devient acceptable " +"si vous utilisez un alias tel que __ (double trait de soulignement — à ne " +"pas confondre avec _, le trait de soulignement unique utilisé comme alias " +"pour :func:`gettext.gettext` ou ses homologues)." -#: howto/logging-cookbook.rst:1699 +#: howto/logging-cookbook.rst:1719 msgid "" "The above classes are not included in Python, though they're easy enough to " "copy and paste into your own code. They can be used as follows (assuming " @@ -1316,7 +1348,7 @@ msgstr "" "utilisées comme suit (en supposant qu’elles soient déclarées dans un module " "appelé ``wherever``) :" -#: howto/logging-cookbook.rst:1721 +#: howto/logging-cookbook.rst:1741 msgid "" "While the above examples use ``print()`` to show how the formatting works, " "you would of course use ``logger.debug()`` or similar to actually log using " @@ -1326,7 +1358,7 @@ msgstr "" "fonctionne le formatage, utilisez bien sûr ``logger.debug()`` ou similaire " "pour journaliser avec cette approche." -#: howto/logging-cookbook.rst:1725 +#: howto/logging-cookbook.rst:1745 #, fuzzy msgid "" "One thing to note is that you pay no significant performance penalty with " @@ -1347,7 +1379,7 @@ msgstr "" "n’est que du sucre syntaxique pour un appel de constructeur à l’une des " "classes ``XXXMessage``." -#: howto/logging-cookbook.rst:1733 +#: howto/logging-cookbook.rst:1753 msgid "" "If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar " "effect to the above, as in the following example::" @@ -1355,7 +1387,7 @@ msgstr "" "Si vous préférez, vous pouvez utiliser un :class:`LoggerAdapter` pour " "obtenir un effet similaire à ce qui précède, comme dans l’exemple suivant ::" -#: howto/logging-cookbook.rst:1762 +#: howto/logging-cookbook.rst:1782 #, fuzzy msgid "" "The above script should log the message ``Hello, world!`` when run with " @@ -1364,29 +1396,30 @@ msgstr "" "Le script ci-dessus journalise le message ``Hello, world!`` quand il est " "lancé avec Python 3.2 ou ultérieur." -#: howto/logging-cookbook.rst:1771 +#: howto/logging-cookbook.rst:1791 msgid "Customizing ``LogRecord``" msgstr "Personnalisation de ``LogRecord``" -#: howto/logging-cookbook.rst:1773 +#: howto/logging-cookbook.rst:1793 msgid "" "Every logging event is represented by a :class:`LogRecord` instance. When an " -"event is logged and not filtered out by a logger's level, a :class:" -"`LogRecord` is created, populated with information about the event and then " -"passed to the handlers for that logger (and its ancestors, up to and " -"including the logger where further propagation up the hierarchy is " +"event is logged and not filtered out by a logger's level, " +"a :class:`LogRecord` is created, populated with information about the event " +"and then passed to the handlers for that logger (and its ancestors, up to " +"and including the logger where further propagation up the hierarchy is " "disabled). Before Python 3.2, there were only two places where this creation " "was done:" msgstr "" -"Chaque événement de journalisation est représenté par une instance :class:" -"`LogRecord`. Lorsqu’un événement est enregistré et non filtré en raison du " -"niveau d’un enregistreur, un :class:`LogRecord` est créé, rempli avec les " -"informations de l’événement, puis transmis aux gestionnaires de cet " -"enregistreur (et ses ancêtres, jusqu’à et y compris l’enregistreur où la " -"propagation vers le haut de la hiérarchie est désactivée). Avant Python 3.2, " -"il n’y avait que deux endroits où cette création était effectuée :" +"Chaque événement de journalisation est représenté par une " +"instance :class:`LogRecord`. Lorsqu’un événement est enregistré et non " +"filtré en raison du niveau d’un enregistreur, un :class:`LogRecord` est " +"créé, rempli avec les informations de l’événement, puis transmis aux " +"gestionnaires de cet enregistreur (et ses ancêtres, jusqu’à et y compris " +"l’enregistreur où la propagation vers le haut de la hiérarchie est " +"désactivée). Avant Python 3.2, il n’y avait que deux endroits où cette " +"création était effectuée :" -#: howto/logging-cookbook.rst:1780 +#: howto/logging-cookbook.rst:1800 msgid "" ":meth:`Logger.makeRecord`, which is called in the normal process of logging " "an event. This invoked :class:`LogRecord` directly to create an instance." @@ -1395,13 +1428,13 @@ msgstr "" "journalisation d’un événement. Elle appelait :class:`LogRecord` directement " "pour créer une instance." -#: howto/logging-cookbook.rst:1783 +#: howto/logging-cookbook.rst:1803 msgid "" ":func:`makeLogRecord`, which is called with a dictionary containing " "attributes to be added to the LogRecord. This is typically invoked when a " "suitable dictionary has been received over the network (e.g. in pickle form " -"via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:" -"`~handlers.HTTPHandler`)." +"via a :class:`~handlers.SocketHandler`, or in JSON form via " +"an :class:`~handlers.HTTPHandler`)." msgstr "" ":func:`makeLogRecord`, qui est appelée avec un dictionnaire contenant des " "attributs à ajouter au *LogRecord*. Elle est généralement invoquée lorsqu’un " @@ -1409,26 +1442,28 @@ msgstr "" "*pickle* *via* un :class:`~handlers.SocketHandler`, ou sous format JSON " "*via* un :class:`~handlers.HTTPHandler`)." -#: howto/logging-cookbook.rst:1789 +#: howto/logging-cookbook.rst:1809 msgid "" -"This has usually meant that if you need to do anything special with a :class:" -"`LogRecord`, you've had to do one of the following." +"This has usually meant that if you need to do anything special with " +"a :class:`LogRecord`, you've had to do one of the following." msgstr "" "Cela signifiait généralement que, si vous deviez faire quelque chose de " "spécial avec un :class:`LogRecord`, vous deviez faire l’une des choses " "suivantes." -#: howto/logging-cookbook.rst:1792 +#: howto/logging-cookbook.rst:1812 msgid "" -"Create your own :class:`Logger` subclass, which overrides :meth:`Logger." -"makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " -"loggers that you care about are instantiated." +"Create your own :class:`Logger` subclass, which " +"overrides :meth:`Logger.makeRecord`, and set it " +"using :func:`~logging.setLoggerClass` before any loggers that you care about " +"are instantiated." msgstr "" -"Créer votre propre sous-classe :class:`Logger`, surchargeant :meth:`Logger." -"makeRecord`, et la personnaliser à l’aide de :func:`~logging.setLoggerClass` " -"avant que les enregistreurs qui vous intéressaient ne soient instanciés." +"Créer votre propre sous-classe :class:`Logger`, " +"surchargeant :meth:`Logger.makeRecord`, et la personnaliser à l’aide " +"de :func:`~logging.setLoggerClass` avant que les enregistreurs qui vous " +"intéressaient ne soient instanciés." -#: howto/logging-cookbook.rst:1795 +#: howto/logging-cookbook.rst:1815 msgid "" "Add a :class:`Filter` to a logger or handler, which does the necessary " "special manipulation you need when its :meth:`~Filter.filter` method is " @@ -1438,7 +1473,7 @@ msgstr "" "effectuait la manipulation spéciale nécessaire dont vous aviez besoin " "lorsque sa méthode :meth:`~Filter.filter` était appelée." -#: howto/logging-cookbook.rst:1799 +#: howto/logging-cookbook.rst:1819 msgid "" "The first approach would be a little unwieldy in the scenario where (say) " "several different libraries wanted to do different things. Each would " @@ -1450,7 +1485,7 @@ msgstr "" "Chacun essaie de définir sa propre sous-classe :class:`Logger`, et celui qui " "l’a fait en dernier gagne." -#: howto/logging-cookbook.rst:1804 +#: howto/logging-cookbook.rst:1824 msgid "" "The second approach works reasonably well for many cases, but does not allow " "you to e.g. use a specialized subclass of :class:`LogRecord`. Library " @@ -1465,7 +1500,7 @@ msgstr "" "faire chaque fois qu’ils introduisent un nouvel enregistreur (ce qu’ils font " "simplement en ajoutant de nouveaux paquets ou modules et en écrivant ::" -#: howto/logging-cookbook.rst:1812 +#: howto/logging-cookbook.rst:1832 msgid "" "at module level). It's probably one too many things to think about. " "Developers could also add the filter to a :class:`~logging.NullHandler` " @@ -1475,31 +1510,31 @@ msgid "" "developer." msgstr "" "au niveau des modules). C’est probablement trop de choses auxquelles penser. " -"Les développeurs pourraient également ajouter le filtre à un :class:" -"`~logging.NullHandler` attaché à leur enregistreur de niveau supérieur, mais " -"cela ne serait pas invoqué si un développeur d’application attachait un " -"gestionnaire à un enregistreur de bibliothèque de niveau inférieur — donc la " -"sortie de ce gestionnaire ne refléterait pas les intentions du développeur " -"de la bibliothèque." +"Les développeurs pourraient également ajouter le filtre à " +"un :class:`~logging.NullHandler` attaché à leur enregistreur de niveau " +"supérieur, mais cela ne serait pas invoqué si un développeur d’application " +"attachait un gestionnaire à un enregistreur de bibliothèque de niveau " +"inférieur — donc la sortie de ce gestionnaire ne refléterait pas les " +"intentions du développeur de la bibliothèque." -#: howto/logging-cookbook.rst:1818 +#: howto/logging-cookbook.rst:1838 msgid "" "In Python 3.2 and later, :class:`~logging.LogRecord` creation is done " "through a factory, which you can specify. The factory is just a callable you " -"can set with :func:`~logging.setLogRecordFactory`, and interrogate with :" -"func:`~logging.getLogRecordFactory`. The factory is invoked with the same " -"signature as the :class:`~logging.LogRecord` constructor, as :class:" -"`LogRecord` is the default setting for the factory." +"can set with :func:`~logging.setLogRecordFactory`, and interrogate " +"with :func:`~logging.getLogRecordFactory`. The factory is invoked with the " +"same signature as the :class:`~logging.LogRecord` constructor, " +"as :class:`LogRecord` is the default setting for the factory." msgstr "" "Dans Python 3.2 et ultérieurs, la création de :class:`~logging.LogRecord` " "est effectuée via une fabrique, que vous pouvez spécifier. La fabrique est " -"juste un appelable que vous pouvez définir avec :func:`~logging." -"setLogRecordFactory`, et interroger avec :func:`~logging." -"getLogRecordFactory`. La fabrique est invoquée avec la même signature que le " -"constructeur :class:`~logging.LogRecord`, car :class:`LogRecord` est le " -"paramètre par défaut de la fabrique." +"juste un appelable que vous pouvez définir " +"avec :func:`~logging.setLogRecordFactory`, et interroger " +"avec :func:`~logging.getLogRecordFactory`. La fabrique est invoquée avec la " +"même signature que le constructeur :class:`~logging.LogRecord`, " +"car :class:`LogRecord` est le paramètre par défaut de la fabrique." -#: howto/logging-cookbook.rst:1825 +#: howto/logging-cookbook.rst:1845 msgid "" "This approach allows a custom factory to control all aspects of LogRecord " "creation. For example, you could return a subclass, or just add some " @@ -1512,7 +1547,7 @@ msgstr "" "l’enregistrement une fois créé, en utilisant un modèle similaire à celui-" "ci ::" -#: howto/logging-cookbook.rst:1838 +#: howto/logging-cookbook.rst:1858 msgid "" "This pattern allows different libraries to chain factories together, and as " "long as they don't overwrite each other's attributes or unintentionally " @@ -1530,17 +1565,17 @@ msgstr "" "l’utilisation d’un :class:`Filter` ne permet pas d’obtenir le résultat " "souhaité." -#: howto/logging-cookbook.rst:1850 +#: howto/logging-cookbook.rst:1870 #, fuzzy msgid "Subclassing QueueHandler and QueueListener- a ZeroMQ example" msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1853 howto/logging-cookbook.rst:1986 +#: howto/logging-cookbook.rst:1873 howto/logging-cookbook.rst:2006 #, fuzzy msgid "Subclass ``QueueHandler``" msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1855 +#: howto/logging-cookbook.rst:1875 msgid "" "You can use a :class:`QueueHandler` subclass to send messages to other kinds " "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " @@ -1551,7 +1586,7 @@ msgstr "" "*ZeroMQ publish*. Dans l’exemple ci-dessous, le connecteur est créé " "séparément et transmis au gestionnaire (en tant que file d’attente) ::" -#: howto/logging-cookbook.rst:1874 +#: howto/logging-cookbook.rst:1894 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" @@ -1559,12 +1594,12 @@ msgstr "" "Bien sûr, il existe d’autres manières de faire, par exemple en transmettant " "les données nécessaires au gestionnaire pour créer le connecteur ::" -#: howto/logging-cookbook.rst:1892 howto/logging-cookbook.rst:1922 +#: howto/logging-cookbook.rst:1912 howto/logging-cookbook.rst:1942 #, fuzzy msgid "Subclass ``QueueListener``" msgstr "Dérivation de *QueueListener* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1894 +#: howto/logging-cookbook.rst:1914 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" @@ -1573,51 +1608,51 @@ msgstr "" "messages d’autres types de files d’attente, par exemple un connecteur " "*ZeroMQ subscribe*. Voici un exemple ::" -#: howto/logging-cookbook.rst:1912 +#: howto/logging-cookbook.rst:1932 #, fuzzy msgid "Subclassing QueueHandler and QueueListener- a ``pynng`` example" msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1914 +#: howto/logging-cookbook.rst:1934 msgid "" "In a similar way to the above section, we can implement a listener and " -"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The following " -"snippets illustrate -- you can test them in an environment which has " -"``pynng`` installed. Just for variety, we present the listener first." +"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The " +"following snippets illustrate -- you can test them in an environment which " +"has ``pynng`` installed. Just for variety, we present the listener first." msgstr "" -#: howto/logging-cookbook.rst:2037 +#: howto/logging-cookbook.rst:2057 msgid "" "You can run the above two snippets in separate command shells. If we run the " "listener in one shell and run the sender in two separate shells, we should " "see something like the following. In the first sender shell:" msgstr "" -#: howto/logging-cookbook.rst:2054 +#: howto/logging-cookbook.rst:2074 msgid "In the second sender shell:" msgstr "" -#: howto/logging-cookbook.rst:2069 +#: howto/logging-cookbook.rst:2089 msgid "In the listener shell:" msgstr "" -#: howto/logging-cookbook.rst:2093 +#: howto/logging-cookbook.rst:2113 msgid "" "As you can see, the logging from the two sender processes is interleaved in " "the listener's output." msgstr "" -#: howto/logging-cookbook.rst:2098 +#: howto/logging-cookbook.rst:2118 msgid "An example dictionary-based configuration" msgstr "Exemple de configuration basée sur un dictionnaire" -#: howto/logging-cookbook.rst:2100 +#: howto/logging-cookbook.rst:2120 msgid "" "Below is an example of a logging configuration dictionary - it's taken from " "the `documentation on the Django project `_. This dictionary is passed to :" -"func:`~config.dictConfig` to put the configuration into effect::" +"stable/topics/logging/#configuring-logging>`_. This dictionary is passed " +"to :func:`~config.dictConfig` to put the configuration into effect::" msgstr "" "Vous trouverez ci-dessous un exemple de dictionnaire de configuration de " "journalisation ­– il est tiré de la `documentation du projet Django `_ de la documentation de *Django*." -#: howto/logging-cookbook.rst:2160 +#: howto/logging-cookbook.rst:2180 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" "Utilisation d’un rotateur et d’un nom pour personnaliser la rotation des " "journaux" -#: howto/logging-cookbook.rst:2162 +#: howto/logging-cookbook.rst:2182 msgid "" "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::" @@ -1649,18 +1684,18 @@ msgstr "" "L’extrait 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:2193 +#: howto/logging-cookbook.rst:2213 msgid "" "After running this, you will see six new files, five of which are compressed:" msgstr "" "Après l'avoir exécuté, vous verrez six nouveaux fichiers, dont cinq sont " "compressés :" -#: howto/logging-cookbook.rst:2206 +#: howto/logging-cookbook.rst:2226 msgid "A more elaborate multiprocessing example" msgstr "Exemple plus élaboré avec traitement en parallèle" -#: howto/logging-cookbook.rst:2208 +#: howto/logging-cookbook.rst:2228 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " @@ -1673,7 +1708,7 @@ msgstr "" "simples, mais servent à illustrer comment des configurations plus complexes " "pourraient être implémentées dans un scénario multi-processus réel." -#: howto/logging-cookbook.rst:2213 +#: howto/logging-cookbook.rst:2233 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -1698,7 +1733,7 @@ msgstr "" "sont purement illustratives, mais vous devriez pouvoir adapter cet exemple à " "votre propre scénario." -#: howto/logging-cookbook.rst:2223 +#: howto/logging-cookbook.rst:2243 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" @@ -1706,11 +1741,11 @@ msgstr "" "Voici le script – les chaines de documentation et les commentaires " "expliquent (en anglais), le principe de fonctionnement ::" -#: howto/logging-cookbook.rst:2435 +#: howto/logging-cookbook.rst:2455 msgid "Inserting a BOM into messages sent to a SysLogHandler" msgstr "Insertion d’une *BOM* dans les messages envoyés à un *SysLogHandler*" -#: howto/logging-cookbook.rst:2437 +#: howto/logging-cookbook.rst:2457 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -1724,19 +1759,20 @@ msgstr "" "pour *Byte Order Mark* en anglais) UTF-8, suivie de contenu Unicode UTF-8 " "(voir la :rfc:`la spécification correspondante <5424#section-6>`)." -#: howto/logging-cookbook.rst:2443 +#: howto/logging-cookbook.rst:2463 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " "incorrectly, with the BOM appearing at the beginning of the message and " "hence not allowing any pure-ASCII component to appear before it." msgstr "" -"Dans Python 3.1, du code a été ajouté à :class:`~logging.handlers." -"SysLogHandler` pour insérer une *BOM* dans le message mais, malheureusement, " -"il a été implémenté de manière incorrecte, la *BOM* apparaissant au début du " -"message et n’autorisant donc aucun composant ASCII pur à être placé devant." +"Dans Python 3.1, du code a été ajouté " +"à :class:`~logging.handlers.SysLogHandler` pour insérer une *BOM* dans le " +"message mais, malheureusement, il a été implémenté de manière incorrecte, la " +"*BOM* apparaissant au début du message et n’autorisant donc aucun composant " +"ASCII pur à être placé devant." -#: howto/logging-cookbook.rst:2449 +#: howto/logging-cookbook.rst:2469 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -1751,15 +1787,17 @@ msgstr "" "Unicode arbitraire après, encodé en UTF-8, alors vous devez appliquer ce qui " "suit :" -#: howto/logging-cookbook.rst:2455 +#: howto/logging-cookbook.rst:2475 msgid "" -"Attach a :class:`~logging.Formatter` instance to your :class:`~logging." -"handlers.SysLogHandler` instance, with a format string such as::" +"Attach a :class:`~logging.Formatter` instance to " +"your :class:`~logging.handlers.SysLogHandler` instance, with a format string " +"such as::" msgstr "" -"Adjoignez une instance :class:`~logging.Formatter` à votre instance :class:" -"`~logging.handlers.SysLogHandler`, avec une chaîne de format telle que ::" +"Adjoignez une instance :class:`~logging.Formatter` à votre " +"instance :class:`~logging.handlers.SysLogHandler`, avec une chaîne de format " +"telle que ::" -#: howto/logging-cookbook.rst:2461 +#: howto/logging-cookbook.rst:2481 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." @@ -1767,7 +1805,7 @@ msgstr "" "Le point de code Unicode U+FEFF, lorsqu’il est encodé en UTF-8, est encodé " "comme une *BOM* UTF-8 – la chaîne d’octets ``b'\\xef\\xbb\\xbf'``." -#: howto/logging-cookbook.rst:2464 +#: howto/logging-cookbook.rst:2484 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " @@ -1777,7 +1815,7 @@ msgstr "" "vous que les données qui y apparaissent après la substitution sont toujours " "ASCII (ainsi elles resteront inchangées après l’encodage UTF-8)." -#: howto/logging-cookbook.rst:2468 +#: howto/logging-cookbook.rst:2488 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " @@ -1788,7 +1826,7 @@ msgstr "" "dehors de la plage ASCII, c’est pris en charge – elles seront encodées en " "UTF-8." -#: howto/logging-cookbook.rst:2472 +#: howto/logging-cookbook.rst:2492 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -1802,11 +1840,11 @@ msgstr "" "se plaindra peut-être pas, mais vos messages ne seront pas conformes à la " "RFC 5424 et votre démon *syslog* est susceptible de se plaindre." -#: howto/logging-cookbook.rst:2479 +#: howto/logging-cookbook.rst:2499 msgid "Implementing structured logging" msgstr "Journalisation structurée" -#: howto/logging-cookbook.rst:2481 +#: howto/logging-cookbook.rst:2501 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -1826,11 +1864,11 @@ msgstr "" "plusieurs façons d’y parvenir et voici une approche simple qui utilise JSON " "pour sérialiser l’événement de manière à être analysable par une machine ::" -#: howto/logging-cookbook.rst:2505 +#: howto/logging-cookbook.rst:2525 msgid "If the above script is run, it prints:" msgstr "Si vous lancez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:2511 howto/logging-cookbook.rst:2553 +#: howto/logging-cookbook.rst:2531 howto/logging-cookbook.rst:2573 msgid "" "Note that the order of items might be different according to the version of " "Python used." @@ -1838,7 +1876,7 @@ msgstr "" "Notez que l’ordre des éléments peut être différent en fonction de la version " "de Python utilisée." -#: howto/logging-cookbook.rst:2514 +#: howto/logging-cookbook.rst:2534 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" @@ -1846,15 +1884,15 @@ msgstr "" "Si vous avez besoin d’un traitement plus spécifique, vous pouvez utiliser un " "encodeur JSON personnalisé, comme dans l’exemple complet suivant ::" -#: howto/logging-cookbook.rst:2547 +#: howto/logging-cookbook.rst:2567 msgid "When the above script is run, it prints:" msgstr "Quand vous exécutez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:2562 +#: howto/logging-cookbook.rst:2582 msgid "Customizing handlers with :func:`dictConfig`" msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" -#: howto/logging-cookbook.rst:2564 +#: howto/logging-cookbook.rst:2584 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -1867,21 +1905,23 @@ msgstr "" "d’une manière particulière et, en utilisant :func:`dictConfig`, vous pourrez " "peut-être le faire sans avoir à dériver les classes mères. Par exemple, " "supposons que vous souhaitiez définir le propriétaire d’un fichier journal. " -"Dans un environnement POSIX, cela se fait facilement en utilisant :func:" -"`shutil.chown`, mais les gestionnaires de fichiers de la bibliothèque " -"standard n’offrent pas cette gestion nativement. Vous pouvez personnaliser " -"la création du gestionnaire à l’aide d’une fonction simple telle que ::" +"Dans un environnement POSIX, cela se fait facilement en " +"utilisant :func:`shutil.chown`, mais les gestionnaires de fichiers de la " +"bibliothèque standard n’offrent pas cette gestion nativement. Vous pouvez " +"personnaliser la création du gestionnaire à l’aide d’une fonction simple " +"telle que ::" -#: howto/logging-cookbook.rst:2578 +#: howto/logging-cookbook.rst:2598 msgid "" -"You can then specify, in a logging configuration passed to :func:" -"`dictConfig`, that a logging handler be created by calling this function::" +"You can then specify, in a logging configuration passed " +"to :func:`dictConfig`, that a logging handler be created by calling this " +"function::" msgstr "" "Vous pouvez ensuite spécifier, dans une configuration de journalisation " "transmise à :func:`dictConfig`, qu’un gestionnaire de journalisation soit " "créé en appelant cette fonction ::" -#: howto/logging-cookbook.rst:2611 +#: howto/logging-cookbook.rst:2631 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " @@ -1891,27 +1931,27 @@ msgstr "" "groupe ``pulse``, uniquement à des fins d’illustration. Rassemblons le tout " "dans un script ``chowntest.py`` ::" -#: howto/logging-cookbook.rst:2658 +#: howto/logging-cookbook.rst:2678 msgid "To run this, you will probably need to run as ``root``:" msgstr "" "Pour l’exécuter, vous devrez probablement le faire en tant que ``root`` :" -#: howto/logging-cookbook.rst:2668 +#: howto/logging-cookbook.rst:2688 msgid "" -"Note that this example uses Python 3.3 because that's where :func:`shutil." -"chown` makes an appearance. This approach should work with any Python " -"version that supports :func:`dictConfig` - namely, Python 2.7, 3.2 or later. " -"With pre-3.3 versions, you would need to implement the actual ownership " -"change using e.g. :func:`os.chown`." +"Note that this example uses Python 3.3 because that's " +"where :func:`shutil.chown` makes an appearance. This approach should work " +"with any Python version that supports :func:`dictConfig` - namely, Python " +"2.7, 3.2 or later. With pre-3.3 versions, you would need to implement the " +"actual ownership change using e.g. :func:`os.chown`." msgstr "" -"Notez que cet exemple utilise Python 3.3 car c’est là que :func:`shutil." -"chown` fait son apparition. Cette approche devrait fonctionner avec " -"n’importe quelle version de Python prenant en charge :func:`dictConfig` – à " -"savoir, Python 2.7, 3.2 ou version ultérieure. Avec les versions antérieures " -"à la 3.3, vous devrez implémenter le changement de propriétaire réel en " -"utilisant par exemple :func:`os.chown`." +"Notez que cet exemple utilise Python 3.3 car c’est là " +"que :func:`shutil.chown` fait son apparition. Cette approche devrait " +"fonctionner avec n’importe quelle version de Python prenant en " +"charge :func:`dictConfig` – à savoir, Python 2.7, 3.2 ou version ultérieure. " +"Avec les versions antérieures à la 3.3, vous devrez implémenter le " +"changement de propriétaire réel en utilisant par exemple :func:`os.chown`." -#: howto/logging-cookbook.rst:2674 +#: howto/logging-cookbook.rst:2694 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" @@ -1920,11 +1960,11 @@ msgstr "" "un module utilitaire ailleurs dans votre projet. Au lieu de cette ligne dans " "la configuration ::" -#: howto/logging-cookbook.rst:2679 +#: howto/logging-cookbook.rst:2699 msgid "you could use e.g.::" msgstr "vous pouvez écrire par exemple ::" -#: howto/logging-cookbook.rst:2683 +#: howto/logging-cookbook.rst:2703 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" @@ -1937,7 +1977,7 @@ msgstr "" "l’appelable réel est résolu par :func:`dictConfig` à partir de la " "spécification ``ext://``." -#: howto/logging-cookbook.rst:2688 +#: howto/logging-cookbook.rst:2708 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " @@ -1947,7 +1987,7 @@ msgstr "" "types de modification de fichier – par ex. définir des bits d’autorisation " "POSIX spécifiques – de la même manière, en utilisant :func:`os.chmod`." -#: howto/logging-cookbook.rst:2692 +#: howto/logging-cookbook.rst:2712 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " @@ -1958,11 +1998,11 @@ msgstr "" "des gestionnaires à roulement de fichiers ou un autre type de gestionnaire " "complètement différent." -#: howto/logging-cookbook.rst:2702 +#: howto/logging-cookbook.rst:2722 msgid "Using particular formatting styles throughout your application" msgstr "" -#: howto/logging-cookbook.rst:2704 +#: howto/logging-cookbook.rst:2724 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1973,7 +2013,7 @@ msgid "" "is constructed." msgstr "" -#: howto/logging-cookbook.rst:2711 +#: howto/logging-cookbook.rst:2731 #, fuzzy msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " @@ -1982,11 +2022,12 @@ msgid "" "call (e.g. the ``exc_info`` keyword parameter to indicate that traceback " "information should be logged, or the ``extra`` keyword parameter to indicate " "additional contextual information to be added to the log). So you cannot " -"directly make logging calls using :meth:`str.format` or :class:`string." -"Template` syntax, because internally the logging package uses %-formatting " -"to merge the format string and the variable arguments. There would be no " -"changing this while preserving backward compatibility, since all logging " -"calls which are out there in existing code will be using %-format strings." +"directly make logging calls using :meth:`str.format` " +"or :class:`string.Template` syntax, because internally the logging package " +"uses %-formatting to merge the format string and the variable arguments. " +"There would be no changing this while preserving backward compatibility, " +"since all logging calls which are out there in existing code will be using %-" +"format strings." msgstr "" "Les appels de journalisation (``logger.debug()``, ``logger.info()`` etc.) ne " "prennent que des paramètres positionnels pour le message de journalisation " @@ -1995,14 +2036,15 @@ msgstr "" "clé ``exc_info`` indique que les informations de trace doivent être " "enregistrées, ou le paramètre par mot-clé ``extra`` indique des informations " "contextuelles supplémentaires à ajouter au journal). Vous ne pouvez donc pas " -"inclure dans les appels de journalisation à l’aide de la syntaxe :meth:`str." -"format` ou :class:`string.Template`, car le paquet de journalisation utilise " -"le formatage via « % » en interne pour fusionner la chaîne de format et les " -"arguments de variables. Il n’est pas possible de changer ça tout en " -"préservant la rétrocompatibilité puisque tous les appels de journalisation " -"dans le code pré-existant utilisent des chaînes au format « % »." +"inclure dans les appels de journalisation à l’aide de la " +"syntaxe :meth:`str.format` ou :class:`string.Template`, car le paquet de " +"journalisation utilise le formatage via « % » en interne pour fusionner la " +"chaîne de format et les arguments de variables. Il n’est pas possible de " +"changer ça tout en préservant la rétrocompatibilité puisque tous les appels " +"de journalisation dans le code pré-existant utilisent des chaînes au format " +"« % »." -#: howto/logging-cookbook.rst:2723 +#: howto/logging-cookbook.rst:2743 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -2010,7 +2052,7 @@ msgid "" "formatting." msgstr "" -#: howto/logging-cookbook.rst:2727 +#: howto/logging-cookbook.rst:2747 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -2018,11 +2060,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: howto/logging-cookbook.rst:2734 +#: howto/logging-cookbook.rst:2754 msgid "Using LogRecord factories" msgstr "" -#: howto/logging-cookbook.rst:2736 +#: howto/logging-cookbook.rst:2756 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -2037,27 +2079,27 @@ msgid "" "implementation does." msgstr "" -#: howto/logging-cookbook.rst:2747 +#: howto/logging-cookbook.rst:2767 msgid "" -"Refer to the reference documentation on :func:`setLogRecordFactory` and :" -"class:`LogRecord` for more information." +"Refer to the reference documentation on :func:`setLogRecordFactory` " +"and :class:`LogRecord` for more information." msgstr "" -#: howto/logging-cookbook.rst:2752 +#: howto/logging-cookbook.rst:2772 msgid "Using custom message objects" msgstr "" -#: howto/logging-cookbook.rst:2754 +#: howto/logging-cookbook.rst:2774 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " -"to construct your individual log messages. You may recall (from :ref:" -"`arbitrary-object-messages`) that when logging you can use an arbitrary " -"object as a message format string, and that the logging package will call :" -"func:`str` on that object to get the actual format string. Consider the " -"following two classes::" +"to construct your individual log messages. You may recall " +"(from :ref:`arbitrary-object-messages`) that when logging you can use an " +"arbitrary object as a message format string, and that the logging package " +"will call :func:`str` on that object to get the actual format string. " +"Consider the following two classes::" msgstr "" -#: howto/logging-cookbook.rst:2779 +#: howto/logging-cookbook.rst:2799 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -2068,17 +2110,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: howto/logging-cookbook.rst:2787 +#: howto/logging-cookbook.rst:2807 msgid "" -"Examples of this approach are given below. Firstly, formatting with :meth:" -"`str.format`::" +"Examples of this approach are given below. Firstly, formatting " +"with :meth:`str.format`::" msgstr "" -#: howto/logging-cookbook.rst:2801 +#: howto/logging-cookbook.rst:2821 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: howto/logging-cookbook.rst:2808 +#: howto/logging-cookbook.rst:2828 #, fuzzy msgid "" "One thing to note is that you pay no significant performance penalty with " @@ -2100,41 +2142,41 @@ msgstr "" "n’est que du sucre syntaxique pour un appel de constructeur à l’une des " "classes ``XXXMessage``." -#: howto/logging-cookbook.rst:2822 +#: howto/logging-cookbook.rst:2842 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:2824 +#: howto/logging-cookbook.rst:2844 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " "Since :class:`~logging.Filter` is the only filter class included in the " "standard library, and it is unlikely to cater to many requirements (it's " -"only there as a base class), you will typically need to define your own :" -"class:`~logging.Filter` subclass with an overridden :meth:`~logging.Filter." -"filter` method. To do this, specify the ``()`` key in the configuration " -"dictionary for the filter, specifying a callable which will be used to " -"create the filter (a class is the most obvious, but you can provide any " -"callable which returns a :class:`~logging.Filter` instance). Here is a " -"complete example::" +"only there as a base class), you will typically need to define your " +"own :class:`~logging.Filter` subclass with an " +"overridden :meth:`~logging.Filter.filter` method. To do this, specify the " +"``()`` key in the configuration dictionary for the filter, specifying a " +"callable which will be used to create the filter (a class is the most " +"obvious, but you can provide any callable which returns " +"a :class:`~logging.Filter` instance). Here is a complete example::" msgstr "" -#: howto/logging-cookbook.rst:2877 +#: howto/logging-cookbook.rst:2897 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: howto/logging-cookbook.rst:2885 +#: howto/logging-cookbook.rst:2905 msgid "which shows that the filter is working as configured." msgstr "" -#: howto/logging-cookbook.rst:2887 +#: howto/logging-cookbook.rst:2907 msgid "A couple of extra points to note:" msgstr "" -#: howto/logging-cookbook.rst:2889 +#: howto/logging-cookbook.rst:2909 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -2144,7 +2186,7 @@ msgid "" "the above example." msgstr "" -#: howto/logging-cookbook.rst:2896 +#: howto/logging-cookbook.rst:2916 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -2153,11 +2195,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2905 +#: howto/logging-cookbook.rst:2925 msgid "Customized exception formatting" msgstr "" -#: howto/logging-cookbook.rst:2907 +#: howto/logging-cookbook.rst:2927 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -2165,56 +2207,56 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: howto/logging-cookbook.rst:2948 +#: howto/logging-cookbook.rst:2968 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: howto/logging-cookbook.rst:2955 +#: howto/logging-cookbook.rst:2975 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: howto/logging-cookbook.rst:2962 +#: howto/logging-cookbook.rst:2982 msgid "Speaking logging messages" msgstr "" -#: howto/logging-cookbook.rst:2964 +#: howto/logging-cookbook.rst:2984 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " "you have text-to-speech (TTS) functionality available in your system, even " "if it doesn't have a Python binding. Most TTS systems have a command line " -"program you can run, and this can be invoked from a handler using :mod:" -"`subprocess`. It's assumed here that TTS command line programs won't expect " -"to interact with users or take a long time to complete, and that the " -"frequency of logged messages will be not so high as to swamp the user with " -"messages, and that it's acceptable to have the messages spoken one at a time " -"rather than concurrently, The example implementation below waits for one " -"message to be spoken before the next is processed, and this might cause " -"other handlers to be kept waiting. Here is a short example showing the " +"program you can run, and this can be invoked from a handler " +"using :mod:`subprocess`. It's assumed here that TTS command line programs " +"won't expect to interact with users or take a long time to complete, and " +"that the frequency of logged messages will be not so high as to swamp the " +"user with messages, and that it's acceptable to have the messages spoken one " +"at a time rather than concurrently, The example implementation below waits " +"for one message to be spoken before the next is processed, and this might " +"cause other handlers to be kept waiting. Here is a short example showing the " "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: howto/logging-cookbook.rst:3006 +#: howto/logging-cookbook.rst:3026 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: howto/logging-cookbook.rst:3008 +#: howto/logging-cookbook.rst:3028 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: howto/logging-cookbook.rst:3016 +#: howto/logging-cookbook.rst:3036 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: howto/logging-cookbook.rst:3018 +#: howto/logging-cookbook.rst:3038 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -2224,7 +2266,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: howto/logging-cookbook.rst:3025 +#: howto/logging-cookbook.rst:3045 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -2237,7 +2279,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: howto/logging-cookbook.rst:3035 +#: howto/logging-cookbook.rst:3055 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -2246,53 +2288,54 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: howto/logging-cookbook.rst:3041 +#: howto/logging-cookbook.rst:3061 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " "parameter and attaches a memory handler for the duration of the call to the " "decorated function. The decorator can be additionally parameterised using a " "target handler, a level at which flushing should occur, and a capacity for " -"the buffer (number of records buffered). These default to a :class:`~logging." -"StreamHandler` which writes to ``sys.stderr``, ``logging.ERROR`` and ``100`` " -"respectively." +"the buffer (number of records buffered). These default to " +"a :class:`~logging.StreamHandler` which writes to ``sys.stderr``, " +"``logging.ERROR`` and ``100`` respectively." msgstr "" -#: howto/logging-cookbook.rst:3049 +#: howto/logging-cookbook.rst:3069 msgid "Here's the script::" msgstr "" -#: howto/logging-cookbook.rst:3112 +#: howto/logging-cookbook.rst:3132 msgid "When this script is run, the following output should be observed:" msgstr "" -#: howto/logging-cookbook.rst:3142 +#: howto/logging-cookbook.rst:3162 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: howto/logging-cookbook.rst:3146 +#: howto/logging-cookbook.rst:3166 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: howto/logging-cookbook.rst:3156 +#: howto/logging-cookbook.rst:3176 msgid "Sending logging messages to email, with buffering" msgstr "" -#: howto/logging-cookbook.rst:3158 +#: howto/logging-cookbook.rst:3178 msgid "" "To illustrate how you can send log messages via email, so that a set number " -"of messages are sent per email, you can subclass :class:`~logging.handlers." -"BufferingHandler`. In the following example, which you can adapt to suit " -"your specific needs, a simple test harness is provided which allows you to " -"run the script with command line arguments specifying what you typically " -"need to send things via SMTP. (Run the downloaded script with the ``-h`` " -"argument to see the required and optional arguments.)" +"of messages are sent per email, you can " +"subclass :class:`~logging.handlers.BufferingHandler`. In the following " +"example, which you can adapt to suit your specific needs, a simple test " +"harness is provided which allows you to run the script with command line " +"arguments specifying what you typically need to send things via SMTP. (Run " +"the downloaded script with the ``-h`` argument to see the required and " +"optional arguments.)" msgstr "" -#: howto/logging-cookbook.rst:3230 +#: howto/logging-cookbook.rst:3250 msgid "" "If you run this script and your SMTP server is correctly set up, you should " "find that it sends eleven emails to the addressee you specify. The first ten " @@ -2300,39 +2343,39 @@ msgid "" "messages. That makes up 102 messages as specified in the script." msgstr "" -#: howto/logging-cookbook.rst:3238 +#: howto/logging-cookbook.rst:3258 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: howto/logging-cookbook.rst:3240 +#: howto/logging-cookbook.rst:3260 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as ``UTCFormatter``, shown below::" msgstr "" -#: howto/logging-cookbook.rst:3249 +#: howto/logging-cookbook.rst:3269 msgid "" -"and you can then use the ``UTCFormatter`` in your code instead of :class:" -"`~logging.Formatter`. If you want to do that via configuration, you can use " -"the :func:`~logging.config.dictConfig` API with an approach illustrated by " -"the following complete example::" +"and you can then use the ``UTCFormatter`` in your code instead " +"of :class:`~logging.Formatter`. If you want to do that via configuration, " +"you can use the :func:`~logging.config.dictConfig` API with an approach " +"illustrated by the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:3292 +#: howto/logging-cookbook.rst:3312 msgid "When this script is run, it should print something like:" msgstr "" -#: howto/logging-cookbook.rst:3299 +#: howto/logging-cookbook.rst:3319 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: howto/logging-cookbook.rst:3306 +#: howto/logging-cookbook.rst:3326 msgid "Using a context manager for selective logging" msgstr "" -#: howto/logging-cookbook.rst:3308 +#: howto/logging-cookbook.rst:3328 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -2342,7 +2385,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: howto/logging-cookbook.rst:3341 +#: howto/logging-cookbook.rst:3361 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -2351,13 +2394,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: howto/logging-cookbook.rst:3347 +#: howto/logging-cookbook.rst:3367 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: howto/logging-cookbook.rst:3365 +#: howto/logging-cookbook.rst:3385 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -2370,121 +2413,121 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: howto/logging-cookbook.rst:3375 +#: howto/logging-cookbook.rst:3395 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: howto/logging-cookbook.rst:3386 +#: howto/logging-cookbook.rst:3406 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: howto/logging-cookbook.rst:3394 +#: howto/logging-cookbook.rst:3414 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: howto/logging-cookbook.rst:3404 +#: howto/logging-cookbook.rst:3424 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: howto/logging-cookbook.rst:3406 +#: howto/logging-cookbook.rst:3426 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: howto/logging-cookbook.rst:3414 +#: howto/logging-cookbook.rst:3434 msgid "A CLI application starter template" msgstr "" -#: howto/logging-cookbook.rst:3416 +#: howto/logging-cookbook.rst:3436 msgid "Here's an example which shows how you can:" msgstr "" -#: howto/logging-cookbook.rst:3418 +#: howto/logging-cookbook.rst:3438 msgid "Use a logging level based on command-line arguments" msgstr "" -#: howto/logging-cookbook.rst:3419 +#: howto/logging-cookbook.rst:3439 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: howto/logging-cookbook.rst:3421 +#: howto/logging-cookbook.rst:3441 msgid "Make use of simple, minimal configuration" msgstr "" -#: howto/logging-cookbook.rst:3423 +#: howto/logging-cookbook.rst:3443 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " "illustration as a file ``app.py`` that is the main script for the " -"application, with individual commands implemented in ``start.py``, ``stop." -"py`` and ``restart.py``. Suppose further that we want to control the " +"application, with individual commands implemented in ``start.py``, " +"``stop.py`` and ``restart.py``. Suppose further that we want to control the " "verbosity of the application via a command-line argument, defaulting to " "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: howto/logging-cookbook.rst:3472 +#: howto/logging-cookbook.rst:3492 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: howto/logging-cookbook.rst:3485 +#: howto/logging-cookbook.rst:3505 msgid "and thus for stopping::" msgstr "" -#: howto/logging-cookbook.rst:3506 +#: howto/logging-cookbook.rst:3526 msgid "and similarly for restarting::" msgstr "" -#: howto/logging-cookbook.rst:3527 +#: howto/logging-cookbook.rst:3547 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: howto/logging-cookbook.rst:3540 +#: howto/logging-cookbook.rst:3560 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: howto/logging-cookbook.rst:3543 +#: howto/logging-cookbook.rst:3563 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: howto/logging-cookbook.rst:3560 +#: howto/logging-cookbook.rst:3580 msgid "And if we want less:" msgstr "" -#: howto/logging-cookbook.rst:3568 +#: howto/logging-cookbook.rst:3588 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: howto/logging-cookbook.rst:3574 +#: howto/logging-cookbook.rst:3594 msgid "A Qt GUI for logging" msgstr "" -#: howto/logging-cookbook.rst:3576 +#: howto/logging-cookbook.rst:3596 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt `_ framework is a popular cross-" -"platform UI framework with Python bindings using :pypi:`PySide2` or :pypi:" -"`PyQt5` libraries." +"platform UI framework with Python bindings using :pypi:`PySide2` " +"or :pypi:`PyQt5` libraries." msgstr "" -#: howto/logging-cookbook.rst:3581 +#: howto/logging-cookbook.rst:3601 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -2494,14 +2537,14 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: howto/logging-cookbook.rst:3588 +#: howto/logging-cookbook.rst:3608 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: howto/logging-cookbook.rst:3592 +#: howto/logging-cookbook.rst:3612 msgid "" "The code should work with recent releases of any of ``PySide6``, ``PyQt6``, " "``PySide2`` or ``PyQt5``. You should be able to adapt the approach to " @@ -2509,28 +2552,29 @@ msgid "" "more detailed information." msgstr "" -#: howto/logging-cookbook.rst:3829 +#: howto/logging-cookbook.rst:3848 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: howto/logging-cookbook.rst:3831 +#: howto/logging-cookbook.rst:3850 msgid "" "Although :rfc:`5424` dates from 2009, most syslog servers are configured by " "default to use the older :rfc:`3164`, which hails from 2001. When " "``logging`` was added to Python in 2003, it supported the earlier (and only " -"existing) protocol at the time. Since RFC5424 came out, as there has not " -"been widespread deployment of it in syslog servers, the :class:`~logging." -"handlers.SysLogHandler` functionality has not been updated." +"existing) protocol at the time. Since RFC 5424 came out, as there has not " +"been widespread deployment of it in syslog servers, " +"the :class:`~logging.handlers.SysLogHandler` functionality has not been " +"updated." msgstr "" -#: howto/logging-cookbook.rst:3838 +#: howto/logging-cookbook.rst:3857 msgid "" "RFC 5424 contains some useful features such as support for structured data, " "and if you need to be able to log to a syslog server with support for it, " "you can do so with a subclassed handler which looks something like this::" msgstr "" -#: howto/logging-cookbook.rst:3904 +#: howto/logging-cookbook.rst:3923 msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " @@ -2539,11 +2583,11 @@ msgid "" "using something like this::" msgstr "" -#: howto/logging-cookbook.rst:3918 +#: howto/logging-cookbook.rst:3937 msgid "How to treat a logger like an output stream" msgstr "" -#: howto/logging-cookbook.rst:3920 +#: howto/logging-cookbook.rst:3939 msgid "" "Sometimes, you need to interface to a third-party API which expects a file-" "like object to write to, but you want to direct the API's output to a " @@ -2551,43 +2595,43 @@ msgid "" "API. Here's a short script illustrating such a class:" msgstr "" -#: howto/logging-cookbook.rst:3960 +#: howto/logging-cookbook.rst:3979 msgid "When this script is run, it prints" msgstr "" -#: howto/logging-cookbook.rst:3967 +#: howto/logging-cookbook.rst:3986 msgid "" -"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." -"stderr`` by doing something like this:" +"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and " +"``sys.stderr`` by doing something like this:" msgstr "" -#: howto/logging-cookbook.rst:3977 +#: howto/logging-cookbook.rst:3996 msgid "" "You should do this *after* configuring logging for your needs. In the above " -"example, the :func:`~logging.basicConfig` call does this (using the ``sys." -"stderr`` value *before* it is overwritten by a ``LoggerWriter`` instance). " -"Then, you'd get this kind of result:" +"example, the :func:`~logging.basicConfig` call does this (using the " +"``sys.stderr`` value *before* it is overwritten by a ``LoggerWriter`` " +"instance). Then, you'd get this kind of result:" msgstr "" -#: howto/logging-cookbook.rst:3990 +#: howto/logging-cookbook.rst:4009 msgid "" -"Of course, the examples above show output according to the format used by :" -"func:`~logging.basicConfig`, but you can use a different formatter when you " -"configure logging." +"Of course, the examples above show output according to the format used " +"by :func:`~logging.basicConfig`, but you can use a different formatter when " +"you configure logging." msgstr "" -#: howto/logging-cookbook.rst:3994 +#: howto/logging-cookbook.rst:4013 msgid "" "Note that with the above scheme, you are somewhat at the mercy of buffering " "and the sequence of write calls which you are intercepting. For example, " "with the definition of ``LoggerWriter`` above, if you have the snippet" msgstr "" -#: howto/logging-cookbook.rst:4003 +#: howto/logging-cookbook.rst:4022 msgid "then running the script results in" msgstr "" -#: howto/logging-cookbook.rst:4021 +#: howto/logging-cookbook.rst:4040 msgid "" "As you can see, this output isn't ideal. That's because the underlying code " "which writes to ``sys.stderr`` makes multiple writes, each of which results " @@ -2597,17 +2641,60 @@ msgid "" "``LoggerWriter``:" msgstr "" -#: howto/logging-cookbook.rst:4046 +#: howto/logging-cookbook.rst:4065 msgid "" "This just buffers up stuff until a newline is seen, and then logs complete " "lines. With this approach, you get better output:" msgstr "" -#: howto/logging-cookbook.rst:4062 +#: howto/logging-cookbook.rst:4078 +msgid "How to uniformly handle newlines in logging output" +msgstr "" + +#: howto/logging-cookbook.rst:4080 +msgid "" +"Usually, messages that are logged (say to console or file) consist of a " +"single line of text. However, sometimes there is a need to handle messages " +"with multiple lines - whether because a logging format string contains " +"newlines, or logged data contains newlines. If you want to handle such " +"messages uniformly, so that each line in the logged message appears " +"uniformly formatted as if it was logged separately, you can do this using a " +"handler mixin, as in the following snippet:" +msgstr "" + +#: howto/logging-cookbook.rst:4106 +msgid "You can use the mixin as in the following script:" +msgstr "" + +#: howto/logging-cookbook.rst:4127 +#, fuzzy +msgid "The script, when run, prints something like:" +msgstr "qui, à l’exécution, produit quelque chose comme ça :" + +#: howto/logging-cookbook.rst:4139 +msgid "" +"If, on the other hand, you are concerned about `log injection `_, you can use a formatter " +"which escapes newlines, as per the following example:" +msgstr "" + +#: howto/logging-cookbook.rst:4163 +msgid "" +"You can, of course, use whatever escaping scheme makes the most sense for " +"you. The script, when run, should produce output like this:" +msgstr "" + +#: howto/logging-cookbook.rst:4173 +msgid "" +"Escaping behaviour can't be the stdlib default , as it would break backwards " +"compatibility." +msgstr "" + +#: howto/logging-cookbook.rst:4179 msgid "Patterns to avoid" msgstr "" -#: howto/logging-cookbook.rst:4064 +#: howto/logging-cookbook.rst:4181 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -2615,11 +2702,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: howto/logging-cookbook.rst:4070 +#: howto/logging-cookbook.rst:4187 msgid "Opening the same log file multiple times" msgstr "" -#: howto/logging-cookbook.rst:4072 +#: howto/logging-cookbook.rst:4189 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -2627,32 +2714,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: howto/logging-cookbook.rst:4077 +#: howto/logging-cookbook.rst:4194 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: howto/logging-cookbook.rst:4080 +#: howto/logging-cookbook.rst:4197 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: howto/logging-cookbook.rst:4083 +#: howto/logging-cookbook.rst:4200 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: howto/logging-cookbook.rst:4087 +#: howto/logging-cookbook.rst:4204 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: howto/logging-cookbook.rst:4090 +#: howto/logging-cookbook.rst:4207 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -2661,7 +2748,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: howto/logging-cookbook.rst:4096 +#: howto/logging-cookbook.rst:4213 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -2671,17 +2758,17 @@ msgid "" "being supposedly in place." msgstr "" -#: howto/logging-cookbook.rst:4103 +#: howto/logging-cookbook.rst:4220 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: howto/logging-cookbook.rst:4107 +#: howto/logging-cookbook.rst:4224 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: howto/logging-cookbook.rst:4109 +#: howto/logging-cookbook.rst:4226 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -2692,13 +2779,13 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: howto/logging-cookbook.rst:4118 +#: howto/logging-cookbook.rst:4235 msgid "" "Adding handlers other than :class:`~logging.NullHandler` to a logger in a " "library" msgstr "" -#: howto/logging-cookbook.rst:4120 +#: howto/logging-cookbook.rst:4237 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -2706,11 +2793,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: howto/logging-cookbook.rst:4126 +#: howto/logging-cookbook.rst:4243 msgid "Creating a lot of loggers" msgstr "" -#: howto/logging-cookbook.rst:4128 +#: howto/logging-cookbook.rst:4245 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -2721,39 +2808,39 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: howto/logging-cookbook.rst:4139 +#: howto/logging-cookbook.rst:4256 msgid "Other resources" msgstr "Autres ressources" -#: howto/logging-cookbook.rst:4143 +#: howto/logging-cookbook.rst:4260 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging-cookbook.rst:4144 +#: howto/logging-cookbook.rst:4261 msgid "API reference for the logging module." msgstr "Référence de l’API du module de journalisation." -#: howto/logging-cookbook.rst:4146 +#: howto/logging-cookbook.rst:4263 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging-cookbook.rst:4147 +#: howto/logging-cookbook.rst:4264 msgid "Configuration API for the logging module." msgstr "API pour la configuration du module de journalisation." -#: howto/logging-cookbook.rst:4149 +#: howto/logging-cookbook.rst:4266 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging-cookbook.rst:4150 +#: howto/logging-cookbook.rst:4267 msgid "Useful handlers included with the logging module." msgstr "Gestionnaires utiles inclus avec le module de journalisation." -#: howto/logging-cookbook.rst:4152 +#: howto/logging-cookbook.rst:4269 msgid ":ref:`Basic Tutorial `" msgstr ":ref:`Tutoriel de découverte `" -#: howto/logging-cookbook.rst:4154 +#: howto/logging-cookbook.rst:4271 msgid ":ref:`Advanced Tutorial `" msgstr ":ref:`Tutoriel avancé `" diff --git a/howto/logging.po b/howto/logging.po index fd21b47e7..8e81e00eb 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-24 12:32+0100\n" "Last-Translator: Mathieu Dupuy\n" "Language-Team: FRENCH \n" @@ -64,17 +64,18 @@ msgstr "Quand utiliser ``logging``" #, fuzzy msgid "" "You can access logging functionality by creating a logger via ``logger = " -"getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :" -"meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :" -"meth:`~Logger.critical` methods. To determine when to use logging, and to " -"see which logger methods to use when, see the table below. It states, for " +"logging.getLogger(__name__)``, and then calling the " +"logger's :meth:`~Logger.debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` " +"and :meth:`~Logger.critical` methods. To determine when to use logging, and " +"to see which logger methods to use when, see the table below. It states, for " "each of a set of common tasks, the best tool to use for that task." msgstr "" "Le module *logging* fournit un ensemble de fonctions de commodités pour une " -"utilisation simple du module. Ce sont les fonctions :func:`debug`, :func:" -"`info`, :func:`warning`, :func:`error` et :func:`critical`. Pour déterminer " -"quand employer la journalisation, voyez la table ci-dessous, qui vous " -"indique, pour chaque tâche parmi les plus communes, l'outil approprié." +"utilisation simple du module. Ce sont les " +"fonctions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` " +"et :func:`critical`. Pour déterminer quand employer la journalisation, voyez " +"la table ci-dessous, qui vous indique, pour chaque tâche parmi les plus " +"communes, l'outil approprié." #: howto/logging.rst:38 msgid "Task you want to perform" @@ -157,12 +158,13 @@ msgstr "" #: howto/logging.rst:63 #, fuzzy msgid "" -"A logger's :meth:`~Logger.error`, :meth:`~Logger.exception` or :meth:" -"`~Logger.critical` method as appropriate for the specific error and " +"A logger's :meth:`~Logger.error`, :meth:`~Logger.exception` " +"or :meth:`~Logger.critical` method as appropriate for the specific error and " "application domain" msgstr "" -":func:`logging.error`, :func:`logging.exception` ou :func:`logging." -"critical`, au mieux, selon l'erreur spécifique et le domaine d'application" +":func:`logging.error`, :func:`logging.exception` " +"ou :func:`logging.critical`, au mieux, selon l'erreur spécifique et le " +"domaine d'application" #: howto/logging.rst:70 #, fuzzy @@ -279,8 +281,8 @@ msgstr "" msgid "" "printed out on the console. The ``INFO`` message doesn't appear because the " "default level is ``WARNING``. The printed message includes the indication of " -"the level and the description of the event provided in the logging call, i." -"e. 'Watch out!'. The actual output can be formatted quite flexibly if you " +"the level and the description of the event provided in the logging call, " +"i.e. 'Watch out!'. The actual output can be formatted quite flexibly if you " "need that; formatting options will also be explained later." msgstr "" "affiché dans la console. Le message ``INFO`` n'apparaît pas parce que le " @@ -295,7 +297,7 @@ msgstr "" msgid "" "Notice that in this example, we use functions directly on the ``logging`` " "module, like ``logging.debug``, rather than creating a logger and calling " -"functions on it. These functions operation on the root logger, but can be " +"functions on it. These functions operate on the root logger, but can be " "useful as they will call :func:`~logging.basicConfig` for you if it has not " "been called yet, like in this example. In larger programs you'll usually " "want to control the logging configuration explicitly however - so for that " @@ -434,10 +436,10 @@ msgstr "" "Comme vous pouvez le voir, l'inclusion des données variables dans le message " "de description de l'évènement emploie le vieux style de formatage avec %. " "C'est pour assurer la rétrocompatibilité : le module ``logging`` est " -"antérieur aux nouvelles options de formatage comme :meth:`str.format` ou :" -"class:`string.Template`. Ces nouvelles options de formatage *sont* gérées, " -"mais leur exploration sort du cadre de ce tutoriel, voyez :ref:`formatting-" -"styles` pour plus d'information." +"antérieur aux nouvelles options de formatage comme :meth:`str.format` " +"ou :class:`string.Template`. Ces nouvelles options de formatage *sont* " +"gérées, mais leur exploration sort du cadre de ce tutoriel, " +"voyez :ref:`formatting-styles` pour plus d'information." #: howto/logging.rst:234 msgid "Changing the format of displayed messages" @@ -490,9 +492,9 @@ msgstr "ce qui affichera quelque chose comme :" #: howto/logging.rst:277 msgid "" -"The default format for date/time display (shown above) is like ISO8601 or :" -"rfc:`3339`. If you need more control over the formatting of the date/time, " -"provide a *datefmt* argument to ``basicConfig``, as in this example::" +"The default format for date/time display (shown above) is like ISO8601 " +"or :rfc:`3339`. If you need more control over the formatting of the date/" +"time, provide a *datefmt* argument to ``basicConfig``, as in this example::" msgstr "" "Le format par défaut de l'horodatage (comme ci-dessus) est donné par la " "norme ISO8601 ou :rfc:`3339`. Pour plus de contrôle sur le formatage de " @@ -505,8 +507,8 @@ msgstr "ce qui affichera quelque chose comme :" #: howto/logging.rst:291 msgid "" -"The format of the *datefmt* argument is the same as supported by :func:`time." -"strftime`." +"The format of the *datefmt* argument is the same as supported " +"by :func:`time.strftime`." msgstr "Le format de *datefmt* est le même que celui de :func:`time.strftime`." #: howto/logging.rst:296 @@ -532,8 +534,8 @@ msgstr "" msgid "" "If your logging needs are simple, then use the above examples to incorporate " "logging into your own scripts, and if you run into problems or don't " -"understand something, please post a question on the comp.lang.python Usenet " -"group (available at https://groups.google.com/g/comp.lang.python) and you " +"understand something, please post a question in the Help category of the " +"`Python discussion forum `_ and you " "should receive help before too long." msgstr "" "Si vos besoins avec ``logging`` sont simples, vous pouvez incorporer les " @@ -642,17 +644,18 @@ msgstr "" #: howto/logging.rst:348 msgid "" "The root of the hierarchy of loggers is called the root logger. That's the " -"logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :" -"func:`error` and :func:`critical`, which just call the same-named method of " -"the root logger. The functions and the methods have the same signatures. The " -"root logger's name is printed as 'root' in the logged output." +"logger used by the " +"functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` " +"and :func:`critical`, which just call the same-named method of the root " +"logger. The functions and the methods have the same signatures. The root " +"logger's name is printed as 'root' in the logged output." msgstr "" "La racine de la hiérarchie des enregistreurs est appelée le *root logger*. " -"C'est l'enregistreur utilisé par les fonctions :func:`debug`, :func:`info`, :" -"func:`warning`, :func:`error` et :func:`critical`, qui appelle en fait les " -"méthodes du même nom de l'objet *root logger*. Les fonctions et les méthodes " -"ont la même signature. Le nom de l'enregistreur racine est affiché comme " -"« ``'root'`` » dans la sortie." +"C'est l'enregistreur utilisé par les " +"fonctions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` " +"et :func:`critical`, qui appelle en fait les méthodes du même nom de l'objet " +"*root logger*. Les fonctions et les méthodes ont la même signature. Le nom " +"de l'enregistreur racine est affiché comme « ``'root'`` » dans la sortie." #: howto/logging.rst:354 msgid "" @@ -678,22 +681,22 @@ msgstr "" msgid "" "By default, no destination is set for any logging messages. You can specify " "a destination (such as console or file) by using :func:`basicConfig` as in " -"the tutorial examples. If you call the functions :func:`debug`, :func:" -"`info`, :func:`warning`, :func:`error` and :func:`critical`, they will check " -"to see if no destination is set; and if one is not set, they will set a " -"destination of the console (``sys.stderr``) and a default format for the " -"displayed message before delegating to the root logger to do the actual " -"message output." +"the tutorial examples. If you call the " +"functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` " +"and :func:`critical`, they will check to see if no destination is set; and " +"if one is not set, they will set a destination of the console " +"(``sys.stderr``) and a default format for the displayed message before " +"delegating to the root logger to do the actual message output." msgstr "" "Par défaut, aucune destination n'est prédéfinie pour les messages de " "journalisation. Vous pouvez définir une destination (comme la console ou un " "fichier) en utilisant :func:`basicConfig` comme dans les exemples donnés " -"dans le tutoriel. Si vous appelez les fonctions :func:`debug`, :func:" -"`info`, :func:`warning`, :func:`error` et :func:`critical`, celles-ci " -"vérifient si une destination a été définie ; si ce n'est pas le cas, la " -"destination est assignée à la console (``sys.stderr``) avec un format par " -"défaut pour le message affiché, avant d'être déléguée au *logger* racine, " -"qui sort le message." +"dans le tutoriel. Si vous appelez les " +"fonctions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` " +"et :func:`critical`, celles-ci vérifient si une destination a été définie ; " +"si ce n'est pas le cas, la destination est assignée à la console " +"(``sys.stderr``) avec un format par défaut pour le message affiché, avant " +"d'être déléguée au *logger* racine, qui sort le message." #: howto/logging.rst:369 msgid "The default format set by :func:`basicConfig` for messages is:" @@ -707,10 +710,10 @@ msgid "" "the *format* keyword argument. For all options regarding how a format string " "is constructed, see :ref:`formatter-objects`." msgstr "" -"Vous pouvez modifier ce comportement en passant une chaîne de formatage à :" -"func:`basicConfig` par l'argument nommé *format*. Consultez :ref:`formatter-" -"objects` pour toutes les options de construction de cette chaîne de " -"formatage." +"Vous pouvez modifier ce comportement en passant une chaîne de formatage " +"à :func:`basicConfig` par l'argument nommé *format*. " +"Consultez :ref:`formatter-objects` pour toutes les options de construction " +"de cette chaîne de formatage." #: howto/logging.rst:380 msgid "Logging Flow" @@ -810,32 +813,33 @@ msgstr "" #: howto/logging.rst:465 msgid "" -":meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:" -"`Logger.error`, and :meth:`Logger.critical` all create log records with a " -"message and a level that corresponds to their respective method names. The " -"message is actually a format string, which may contain the standard string " -"substitution syntax of ``%s``, ``%d``, ``%f``, and so on. The rest of their " -"arguments is a list of objects that correspond with the substitution fields " -"in the message. With regard to ``**kwargs``, the logging methods care only " -"about a keyword of ``exc_info`` and use it to determine whether to log " -"exception information." -msgstr "" -"Les méthodes :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger." -"warning`, :meth:`Logger.error` et :meth:`Logger.critical` créent des entrées " -"de journal avec un message et un niveau correspondant à leur nom. Le message " -"est en fait une chaîne de caractères qui peut contenir la syntaxe standard " -"de substitution de chaînes de caractères : ``%s``, ``%d``, ``%f``, etc. " -"L'argument suivant est une liste des objets correspondant aux champs à " -"substituer dans le message. En ce qui concerne ``**kwargs``, les méthodes de " -"``logging`` ne tiennent compte que du mot clef ``exc_info`` et l'utilisent " -"pour déterminer s'il faut enregistrer les informations associées à une " -"exception." +":meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:`Logger.error`, " +"and :meth:`Logger.critical` all create log records with a message and a " +"level that corresponds to their respective method names. The message is " +"actually a format string, which may contain the standard string substitution " +"syntax of ``%s``, ``%d``, ``%f``, and so on. The rest of their arguments is " +"a list of objects that correspond with the substitution fields in the " +"message. With regard to ``**kwargs``, the logging methods care only about a " +"keyword of ``exc_info`` and use it to determine whether to log exception " +"information." +msgstr "" +"Les " +"méthodes :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:`Logger.error` " +"et :meth:`Logger.critical` créent des entrées de journal avec un message et " +"un niveau correspondant à leur nom. Le message est en fait une chaîne de " +"caractères qui peut contenir la syntaxe standard de substitution de chaînes " +"de caractères : ``%s``, ``%d``, ``%f``, etc. L'argument suivant est une " +"liste des objets correspondant aux champs à substituer dans le message. En " +"ce qui concerne ``**kwargs``, les méthodes de ``logging`` ne tiennent compte " +"que du mot clef ``exc_info`` et l'utilisent pour déterminer s'il faut " +"enregistrer les informations associées à une exception." #: howto/logging.rst:475 msgid "" -":meth:`Logger.exception` creates a log message similar to :meth:`Logger." -"error`. The difference is that :meth:`Logger.exception` dumps a stack trace " -"along with it. Call this method only from an exception handler." +":meth:`Logger.exception` creates a log message similar " +"to :meth:`Logger.error`. The difference is that :meth:`Logger.exception` " +"dumps a stack trace along with it. Call this method only from an exception " +"handler." msgstr "" ":meth:`Logger.exception` crée un message similaire à :meth:`Logger.error`. " "La différence est que :meth:`Logger.exception` ajoute la trace de la pile " @@ -932,23 +936,23 @@ msgstr "" "Les objets de type :class:`~logging.Handler` sont responsables de la " "distribution des messages (selon leur niveau de sévérité) vers les " "destinations spécifiées pour ce *handler*. Les objets :class:`Logger` " -"peuvent ajouter des objets *handler* à eux-mêmes en appelant :meth:`~Logger." -"addHandler`. Pour donner un exemple, une application peut envoyer tous les " -"messages dans un fichier journal, tous les messages de niveau ``ERROR`` ou " -"supérieur vers la sortie standard, et tous les messages de niveau " -"``CRITICAL`` vers une adresse de courriel. Dans ce scénario, nous avons " -"besoin de trois *handlers*, responsable chacun d'envoyer des messages d'une " -"sévérité donnée vers une destination donnée." +"peuvent ajouter des objets *handler* à eux-mêmes en " +"appelant :meth:`~Logger.addHandler`. Pour donner un exemple, une application " +"peut envoyer tous les messages dans un fichier journal, tous les messages de " +"niveau ``ERROR`` ou supérieur vers la sortie standard, et tous les messages " +"de niveau ``CRITICAL`` vers une adresse de courriel. Dans ce scénario, nous " +"avons besoin de trois *handlers*, responsable chacun d'envoyer des messages " +"d'une sévérité donnée vers une destination donnée." #: howto/logging.rst:522 msgid "" "The standard library includes quite a few handler types (see :ref:`useful-" -"handlers`); the tutorials use mainly :class:`StreamHandler` and :class:" -"`FileHandler` in its examples." +"handlers`); the tutorials use mainly :class:`StreamHandler` " +"and :class:`FileHandler` in its examples." msgstr "" "La bibliothèque standard inclut déjà un bon nombre de types de gestionnaires " -"(voir :ref:`useful-handlers`) ; le tutoriel utilise surtout :class:" -"`StreamHandler` et :class:`FileHandler` dans ses exemples." +"(voir :ref:`useful-handlers`) ; le tutoriel utilise " +"surtout :class:`StreamHandler` et :class:`FileHandler` dans ses exemples." #: howto/logging.rst:526 msgid "" @@ -997,10 +1001,10 @@ msgstr "" #: howto/logging.rst:543 msgid "" -"Application code should not directly instantiate and use instances of :class:" -"`Handler`. Instead, the :class:`Handler` class is a base class that defines " -"the interface that all handlers should have and establishes some default " -"behavior that child classes can use (or override)." +"Application code should not directly instantiate and use instances " +"of :class:`Handler`. Instead, the :class:`Handler` class is a base class " +"that defines the interface that all handlers should have and establishes " +"some default behavior that child classes can use (or override)." msgstr "" "Le code d'une application ne devrait ni instancier, ni utiliser d'instances " "de la classe :class:`Handler`. La classe :class:`Handler` est plutôt une " @@ -1051,14 +1055,14 @@ msgstr "" #: howto/logging.rst:571 msgid "" "If the ``style`` is ``'%'``, the message format string uses ``%()s`` styled string substitution; the possible keys are documented in :" -"ref:`logrecord-attributes`. If the style is ``'{'``, the message format " +"key>)s`` styled string substitution; the possible keys are documented " +"in :ref:`logrecord-attributes`. If the style is ``'{'``, the message format " "string is assumed to be compatible with :meth:`str.format` (using keyword " "arguments), while if the style is ``'$'`` then the message format string " "should conform to what is expected by :meth:`string.Template.substitute`." msgstr "" -"Si l'argument ``style`` est ``'%'``, la chaîne de formatage utilise " -"``%()s`` comme style de substitution de chaîne de " +"Si l'argument ``style`` est ``'%'``, la chaîne de formatage utilise ``%" +"()s`` comme style de substitution de chaîne de " "caractères. Les clefs possibles sont documentées dans :ref:`logrecord-" "attributes`. Si le style est ``'{'``, le message de la chaîne de formatage " "est compatible avec :meth:`str.format` (en employant des arguments nommés). " @@ -1125,8 +1129,8 @@ msgstr "" #: howto/logging.rst:607 msgid "" -"Creating a dictionary of configuration information and passing it to the :" -"func:`dictConfig` function." +"Creating a dictionary of configuration information and passing it to " +"the :func:`dictConfig` function." msgstr "" "Créer un dictionnaire d'informations de configuration et le passer à la " "fonction :func:`dictConfig`." @@ -1137,10 +1141,10 @@ msgid "" "config-api`. The following example configures a very simple logger, a " "console handler, and a simple formatter using Python code::" msgstr "" -"Pour la documentation de référence de ces deux dernières options, voyez :ref:" -"`logging-config-api`. L'exemple suivant configure un *logger* très simple, " -"un *handler* employant la console, et un *formatter* simple en utilisant du " -"code Python ::" +"Pour la documentation de référence de ces deux dernières options, " +"voyez :ref:`logging-config-api`. L'exemple suivant configure un *logger* " +"très simple, un *handler* employant la console, et un *formatter* simple en " +"utilisant du code Python ::" #: howto/logging.rst:640 msgid "" @@ -1219,11 +1223,11 @@ msgstr "" msgid "" "Note that the class names referenced in config files need to be either " "relative to the logging module, or absolute values which can be resolved " -"using normal import mechanisms. Thus, you could use either :class:`~logging." -"handlers.WatchedFileHandler` (relative to the logging module) or ``mypackage." -"mymodule.MyHandler`` (for a class defined in package ``mypackage`` and " -"module ``mymodule``, where ``mypackage`` is available on the Python import " -"path)." +"using normal import mechanisms. Thus, you could use " +"either :class:`~logging.handlers.WatchedFileHandler` (relative to the " +"logging module) or ``mypackage.mymodule.MyHandler`` (for a class defined in " +"package ``mypackage`` and module ``mymodule``, where ``mypackage`` is " +"available on the Python import path)." msgstr "" "Notez que les noms de classe référencés dans le fichier de configuration " "doivent être relatifs au module ``logging``, ou des valeurs absolues qui " @@ -1299,10 +1303,10 @@ msgstr "" #: howto/logging.rst:789 #, fuzzy msgid "" -"The event is output using a 'handler of last resort', stored in :data:" -"`lastResort`. This internal handler is not associated with any logger, and " -"acts like a :class:`~logging.StreamHandler` which writes the event " -"description message to the current value of ``sys.stderr`` (therefore " +"The event is output using a 'handler of last resort', stored " +"in :data:`lastResort`. This internal handler is not associated with any " +"logger, and acts like a :class:`~logging.StreamHandler` which writes the " +"event description message to the current value of ``sys.stderr`` (therefore " "respecting any redirections which may be in effect). No formatting is done " "on the message - just the bare event description message is printed. The " "handler's level is set to ``WARNING``, so all events at this and greater " @@ -1400,13 +1404,13 @@ msgstr "" #: howto/logging.rst:833 msgid "" -"A do-nothing handler is included in the logging package: :class:`~logging." -"NullHandler` (since Python 3.1). An instance of this handler could be added " -"to the top-level logger of the logging namespace used by the library (*if* " -"you want to prevent your library's logged events being output to ``sys." -"stderr`` in the absence of logging configuration). If all logging by a " -"library *foo* is done using loggers with names matching 'foo.x', 'foo.x.y', " -"etc. then the code::" +"A do-nothing handler is included in the logging " +"package: :class:`~logging.NullHandler` (since Python 3.1). An instance of " +"this handler could be added to the top-level logger of the logging namespace " +"used by the library (*if* you want to prevent your library's logged events " +"being output to ``sys.stderr`` in the absence of logging configuration). If " +"all logging by a library *foo* is done using loggers with names matching " +"'foo.x', 'foo.x.y', etc. then the code::" msgstr "" "Un gestionnaire *ne-fait-rien* est inclus dans le paquet de " "journalisation : :class:`~logging.NullHandler` (depuis Python 3.1). Une " @@ -1415,8 +1419,8 @@ msgstr "" "bibliothèque (*si* vous souhaitez empêcher la copie de la journalisation de " "votre bibliothèque dans ``sys.stderr`` en l'absence de configuration de " "journalisation). Si toute la journalisation par une bibliothèque *foo* est " -"effectuée en utilisant des enregistreurs avec des noms correspondant à *foo." -"x*, *foo.x.y*, etc., alors le code ::" +"effectuée en utilisant des enregistreurs avec des noms correspondant à " +"*foo.x*, *foo.x.y*, etc., alors le code ::" #: howto/logging.rst:844 msgid "" @@ -1448,22 +1452,23 @@ msgstr "" #: howto/logging.rst:855 msgid "" -"It is strongly advised that you *do not add any handlers other than* :class:" -"`~logging.NullHandler` *to your library's loggers*. This is because the " -"configuration of handlers is the prerogative of the application developer " -"who uses your library. The application developer knows their target audience " -"and what handlers are most appropriate for their application: if you add " -"handlers 'under the hood', you might well interfere with their ability to " -"carry out unit tests and deliver logs which suit their requirements." -msgstr "" -"Il est vivement conseillé de ne *pas ajouter de gestionnaires autres que* :" -"class:`~logging.NullHandler` *aux enregistreurs de votre bibliothèque*. Cela " -"est dû au fait que la configuration des gestionnaires est la prérogative du " -"développeur d'applications qui utilise votre bibliothèque. Le développeur " -"d'applications connaît le public cible et les gestionnaires les plus " -"appropriés pour ses applications : si vous ajoutez des gestionnaires « sous " -"le manteau », vous pourriez bien interférer avec les tests unitaires et la " -"journalisation qui convient à ses exigences." +"It is strongly advised that you *do not add any handlers other " +"than* :class:`~logging.NullHandler` *to your library's loggers*. This is " +"because the configuration of handlers is the prerogative of the application " +"developer who uses your library. The application developer knows their " +"target audience and what handlers are most appropriate for their " +"application: if you add handlers 'under the hood', you might well interfere " +"with their ability to carry out unit tests and deliver logs which suit their " +"requirements." +msgstr "" +"Il est vivement conseillé de ne *pas ajouter de gestionnaires autres " +"que* :class:`~logging.NullHandler` *aux enregistreurs de votre " +"bibliothèque*. Cela est dû au fait que la configuration des gestionnaires " +"est la prérogative du développeur d'applications qui utilise votre " +"bibliothèque. Le développeur d'applications connaît le public cible et les " +"gestionnaires les plus appropriés pour ses applications : si vous ajoutez " +"des gestionnaires « sous le manteau », vous pourriez bien interférer avec " +"les tests unitaires et la journalisation qui convient à ses exigences." #: howto/logging.rst:866 msgid "Logging Levels" @@ -1536,29 +1541,29 @@ msgstr "" #: howto/logging.rst:897 msgid "" "Logging messages are encoded as instances of the :class:`~logging.LogRecord` " -"class. When a logger decides to actually log an event, a :class:`~logging." -"LogRecord` instance is created from the logging message." +"class. When a logger decides to actually log an event, " +"a :class:`~logging.LogRecord` instance is created from the logging message." msgstr "" -"Les messages de journalisation sont codés en tant qu'instances de :class:" -"`~logging.LogRecord`. Lorsqu'un enregistreur décide de réellement " +"Les messages de journalisation sont codés en tant qu'instances " +"de :class:`~logging.LogRecord`. Lorsqu'un enregistreur décide de réellement " "enregistrer un événement, une instance de :class:`~logging.LogRecord` est " "créée à partir du message de journalisation." #: howto/logging.rst:901 msgid "" -"Logging messages are subjected to a dispatch mechanism through the use of :" -"dfn:`handlers`, which are instances of subclasses of the :class:`Handler` " -"class. Handlers are responsible for ensuring that a logged message (in the " -"form of a :class:`LogRecord`) ends up in a particular location (or set of " -"locations) which is useful for the target audience for that message (such as " -"end users, support desk staff, system administrators, developers). Handlers " -"are passed :class:`LogRecord` instances intended for particular " -"destinations. Each logger can have zero, one or more handlers associated " -"with it (via the :meth:`~Logger.addHandler` method of :class:`Logger`). In " -"addition to any handlers directly associated with a logger, *all handlers " -"associated with all ancestors of the logger* are called to dispatch the " -"message (unless the *propagate* flag for a logger is set to a false value, " -"at which point the passing to ancestor handlers stops)." +"Logging messages are subjected to a dispatch mechanism through the use " +"of :dfn:`handlers`, which are instances of subclasses of " +"the :class:`Handler` class. Handlers are responsible for ensuring that a " +"logged message (in the form of a :class:`LogRecord`) ends up in a particular " +"location (or set of locations) which is useful for the target audience for " +"that message (such as end users, support desk staff, system administrators, " +"developers). Handlers are passed :class:`LogRecord` instances intended for " +"particular destinations. Each logger can have zero, one or more handlers " +"associated with it (via the :meth:`~Logger.addHandler` method " +"of :class:`Logger`). In addition to any handlers directly associated with a " +"logger, *all handlers associated with all ancestors of the logger* are " +"called to dispatch the message (unless the *propagate* flag for a logger is " +"set to a false value, at which point the passing to ancestor handlers stops)." msgstr "" "Les messages de journalisation sont soumis à un mécanisme d'expédition via " "l'utilisation de :dfn:`handlers`, qui sont des instances de sous-classes de " @@ -1567,8 +1572,8 @@ msgstr "" "dans un emplacement particulier (ou un ensemble d'emplacements) qui est " "utile pour le public cible pour ce message (tels que les utilisateurs " "finaux, le personnel chargé de l'assistance aux utilisateurs, les " -"administrateurs système ou les développeurs). Des instances de :class:" -"`LogRecord` adaptées à leur destination finale sont passées aux " +"administrateurs système ou les développeurs). Des instances " +"de :class:`LogRecord` adaptées à leur destination finale sont passées aux " "gestionnaires destinées à des destinations particulières. Chaque " "enregistreur peut avoir zéro, un ou plusieurs gestionnaires associés à celui-" "ci (via la méthode :meth:`~Logger.addHandler` de :class:`Logger`). En plus " @@ -1582,18 +1587,18 @@ msgstr "" msgid "" "Just as for loggers, handlers can have levels associated with them. A " "handler's level acts as a filter in the same way as a logger's level does. " -"If a handler decides to actually dispatch an event, the :meth:`~Handler." -"emit` method is used to send the message to its destination. Most user-" -"defined subclasses of :class:`Handler` will need to override this :meth:" -"`~Handler.emit`." +"If a handler decides to actually dispatch an event, " +"the :meth:`~Handler.emit` method is used to send the message to its " +"destination. Most user-defined subclasses of :class:`Handler` will need to " +"override this :meth:`~Handler.emit`." msgstr "" "Tout comme pour les enregistreurs, les gestionnaires peuvent avoir des " "niveaux associés. Le niveau d'un gestionnaire agit comme un filtre de la " "même manière que le niveau d'un enregistreur. Si un gestionnaire décide de " "réellement distribuer un événement, la méthode :meth:`~Handler.emit` est " "utilisée pour envoyer le message à sa destination. La plupart des sous-" -"classes définies par l'utilisateur de :class:`Handler` devront remplacer ce :" -"meth:`~Handler.emit`." +"classes définies par l'utilisateur de :class:`Handler` devront remplacer " +"ce :meth:`~Handler.emit`." #: howto/logging.rst:924 msgid "Custom Levels" @@ -1653,14 +1658,14 @@ msgstr "" msgid "" ":class:`~handlers.BaseRotatingHandler` is the base class for handlers that " "rotate log files at a certain point. It is not meant to be instantiated " -"directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:" -"`~handlers.TimedRotatingFileHandler`." +"directly. Instead, use :class:`~handlers.RotatingFileHandler` " +"or :class:`~handlers.TimedRotatingFileHandler`." msgstr "" ":class:`~handlers.BaseRotatingHandler` est la classe mère pour les " "gestionnaires qui assurent la rotation des fichiers de journalisation à " "partir d’un certain point. Elle n'est pas destinée à être instanciée " -"directement. Utilisez plutôt :class:`~handlers.RotatingFileHandler` ou :" -"class:`~handlers.TimedRotatingFileHandler`." +"directement. Utilisez plutôt :class:`~handlers.RotatingFileHandler` " +"ou :class:`~handlers.TimedRotatingFileHandler`." #: howto/logging.rst:954 msgid "" @@ -1716,8 +1721,8 @@ msgstr "" #: howto/logging.rst:972 msgid "" -":class:`~handlers.NTEventLogHandler` instances send messages to a Windows " -"NT/2000/XP event log." +":class:`~handlers.NTEventLogHandler` instances send messages to a Windows NT/" +"2000/XP event log." msgstr "" "Les instances de :class:`~handlers.NTEventLogHandler` envoient des messages " "à un journal des événements Windows NT/2000/XP." @@ -1792,17 +1797,17 @@ msgid "" "defined in a sub-module, :mod:`logging.handlers`. (There is also another sub-" "module, :mod:`logging.config`, for configuration functionality.)" msgstr "" -"Les classes :class:`NullHandler`, :class:`StreamHandler` et :class:" -"`FileHandler` sont définies dans le module de journalisation de base. Les " -"autres gestionnaires sont définis dans un sous-module, :mod:`logging." -"handlers` (il existe également un autre sous-module, :mod:`logging.config`, " -"pour la fonctionnalité de configuration)." +"Les classes :class:`NullHandler`, :class:`StreamHandler` " +"et :class:`FileHandler` sont définies dans le module de journalisation de " +"base. Les autres gestionnaires sont définis dans un sous-" +"module, :mod:`logging.handlers` (il existe également un autre sous-" +"module, :mod:`logging.config`, pour la fonctionnalité de configuration)." #: howto/logging.rst:1006 msgid "" -"Logged messages are formatted for presentation through instances of the :" -"class:`Formatter` class. They are initialized with a format string suitable " -"for use with the % operator and a dictionary." +"Logged messages are formatted for presentation through instances of " +"the :class:`Formatter` class. They are initialized with a format string " +"suitable for use with the % operator and a dictionary." msgstr "" "Les messages journalisés sont mis en forme pour la présentation via des " "instances de la classe :class:`Formatter`. Ils sont initialisés avec une " @@ -1812,24 +1817,24 @@ msgstr "" #: howto/logging.rst:1010 #, fuzzy msgid "" -"For formatting multiple messages in a batch, instances of :class:" -"`BufferingFormatter` can be used. In addition to the format string (which is " -"applied to each message in the batch), there is provision for header and " -"trailer format strings." +"For formatting multiple messages in a batch, instances " +"of :class:`BufferingFormatter` can be used. In addition to the format string " +"(which is applied to each message in the batch), there is provision for " +"header and trailer format strings." msgstr "" -"Pour formater plusieurs messages dans un lot, des instances de :class:" -"`~handlers.BufferingFormatter` peuvent être utilisées. En plus de la chaîne " -"de format (qui est appliquée à chaque message dans le lot), il existe des " -"dispositions pour les chaînes de format d'en-tête et de fin." +"Pour formater plusieurs messages dans un lot, des instances " +"de :class:`~handlers.BufferingFormatter` peuvent être utilisées. En plus de " +"la chaîne de format (qui est appliquée à chaque message dans le lot), il " +"existe des dispositions pour les chaînes de format d'en-tête et de fin." #: howto/logging.rst:1015 msgid "" "When filtering based on logger level and/or handler level is not enough, " -"instances of :class:`Filter` can be added to both :class:`Logger` and :class:" -"`Handler` instances (through their :meth:`~Handler.addFilter` method). " -"Before deciding to process a message further, both loggers and handlers " -"consult all their filters for permission. If any filter returns a false " -"value, the message is not processed further." +"instances of :class:`Filter` can be added to both :class:`Logger` " +"and :class:`Handler` instances (through their :meth:`~Handler.addFilter` " +"method). Before deciding to process a message further, both loggers and " +"handlers consult all their filters for permission. If any filter returns a " +"false value, the message is not processed further." msgstr "" "Lorsque le filtrage basé sur le niveau de l'enregistreur et/ou le niveau du " "gestionnaire ne suffit pas, les instances de :class:`Filter` peuvent être " @@ -1872,8 +1877,8 @@ msgstr "" msgid "" ":class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never " "swallowed. Other exceptions which occur during the :meth:`~Handler.emit` " -"method of a :class:`Handler` subclass are passed to its :meth:`~Handler." -"handleError` method." +"method of a :class:`Handler` subclass are passed to " +"its :meth:`~Handler.handleError` method." msgstr "" "Les exceptions :class:`SystemExit` et :class:`KeyboardInterrupt` ne sont " "jamais passées sous silence. Les autres exceptions qui se produisent pendant " @@ -1882,16 +1887,16 @@ msgstr "" #: howto/logging.rst:1042 msgid "" -"The default implementation of :meth:`~Handler.handleError` in :class:" -"`Handler` checks to see if a module-level variable, :data:`raiseExceptions`, " -"is set. If set, a traceback is printed to :data:`sys.stderr`. If not set, " -"the exception is swallowed." +"The default implementation of :meth:`~Handler.handleError` " +"in :class:`Handler` checks to see if a module-level " +"variable, :data:`raiseExceptions`, is set. If set, a traceback is printed " +"to :data:`sys.stderr`. If not set, the exception is swallowed." msgstr "" -"L'implémentation par défaut de :meth:`~Handler.handleError` dans la classe :" -"class:`Handler` vérifie si une variable au niveau du module, :data:" -"`raiseExceptions`, est définie. Si cette valeur est définie, la trace de la " -"pile d'appels est affichée sur :data:`sys.stderr`. Si elle n'est pas " -"définie, l'exception est passée sous silence." +"L'implémentation par défaut de :meth:`~Handler.handleError` dans la " +"classe :class:`Handler` vérifie si une variable au niveau du " +"module, :data:`raiseExceptions`, est définie. Si cette valeur est définie, " +"la trace de la pile d'appels est affichée sur :data:`sys.stderr`. Si elle " +"n'est pas définie, l'exception est passée sous silence." #: howto/logging.rst:1048 msgid "" @@ -1902,8 +1907,9 @@ msgid "" msgstr "" "La valeur par défaut de :data:`raiseExceptions` est ``True``. C'est parce " "que pendant le développement, vous voulez généralement être notifié de " -"toutes les exceptions qui se produisent. Il est conseillé de définir :data:" -"`raiseExceptions` à ``False`` pour une utilisation en production." +"toutes les exceptions qui se produisent. Il est conseillé de " +"définir :data:`raiseExceptions` à ``False`` pour une utilisation en " +"production." #: howto/logging.rst:1058 msgid "Using arbitrary objects as messages" @@ -1913,12 +1919,12 @@ msgstr "Utilisation d'objets arbitraires comme messages" msgid "" "In the preceding sections and examples, it has been assumed that the message " "passed when logging the event is a string. However, this is not the only " -"possibility. You can pass an arbitrary object as a message, and its :meth:" -"`~object.__str__` method will be called when the logging system needs to " -"convert it to a string representation. In fact, if you want to, you can " -"avoid computing a string representation altogether - for example, the :class:" -"`~handlers.SocketHandler` emits an event by pickling it and sending it over " -"the wire." +"possibility. You can pass an arbitrary object as a message, and " +"its :meth:`~object.__str__` method will be called when the logging system " +"needs to convert it to a string representation. In fact, if you want to, you " +"can avoid computing a string representation altogether - for example, " +"the :class:`~handlers.SocketHandler` emits an event by pickling it and " +"sending it over the wire." msgstr "" "Dans les sections et exemples précédents, il a été supposé que le message " "passé lors de la journalisation de l'événement est une chaîne. Cependant, ce " @@ -1939,10 +1945,10 @@ msgid "" "Formatting of message arguments is deferred until it cannot be avoided. " "However, computing the arguments passed to the logging method can also be " "expensive, and you may want to avoid doing it if the logger will just throw " -"away your event. To decide what to do, you can call the :meth:`~Logger." -"isEnabledFor` method which takes a level argument and returns true if the " -"event would be created by the Logger for that level of call. You can write " -"code like this::" +"away your event. To decide what to do, you can call " +"the :meth:`~Logger.isEnabledFor` method which takes a level argument and " +"returns true if the event would be created by the Logger for that level of " +"call. You can write code like this::" msgstr "" "La mise en forme des arguments de message est différée jusqu'à ce qu'elle ne " "puisse pas être évitée. Toutefois, le calcul des arguments passés à la " @@ -2012,14 +2018,15 @@ msgstr "Informations sur l'endroit où les appels ont été faits." #: howto/logging.rst:1105 msgid "" -"Set ``logging._srcfile`` to ``None``. This avoids calling :func:`sys." -"_getframe`, which may help to speed up your code in environments like PyPy " -"(which can't speed up code that uses :func:`sys._getframe`)." +"Set ``logging._srcfile`` to ``None``. This avoids " +"calling :func:`sys._getframe`, which may help to speed up your code in " +"environments like PyPy (which can't speed up code that " +"uses :func:`sys._getframe`)." msgstr "" -"Définissez ``logging._srcfile`` à ``None``. Cela évite d'appeler :func:`sys." -"_getframe`, qui peut aider à accélérer votre code dans des environnements " -"comme PyPy (qui ne peut pas accélérer le code qui utilise :func:`sys." -"_getframe`)." +"Définissez ``logging._srcfile`` à ``None``. Cela évite " +"d'appeler :func:`sys._getframe`, qui peut aider à accélérer votre code dans " +"des environnements comme PyPy (qui ne peut pas accélérer le code qui " +"utilise :func:`sys._getframe`)." #: howto/logging.rst:1111 msgid "Threading information." @@ -2101,17 +2108,17 @@ msgid ":ref:`A logging cookbook `" msgstr ":ref:`A logging cookbook `" #~ msgid "" -#~ "The call to :func:`basicConfig` should come *before* any calls to :func:" -#~ "`debug`, :func:`info`, etc. Otherwise, those functions will call :func:" -#~ "`basicConfig` for you with the default options. As it's intended as a one-" -#~ "off simple configuration facility, only the first call will actually do " -#~ "anything: subsequent calls are effectively no-ops." +#~ "The call to :func:`basicConfig` should come *before* any calls " +#~ "to :func:`debug`, :func:`info`, etc. Otherwise, those functions will " +#~ "call :func:`basicConfig` for you with the default options. As it's " +#~ "intended as a one-off simple configuration facility, only the first call " +#~ "will actually do anything: subsequent calls are effectively no-ops." #~ msgstr "" -#~ "L'appel à :func:`basicConfig` doit être fait *avant* tout appel à :func:" -#~ "`debug`, :func:`info`, etc. Sinon, ces fonctions appelleront :func:" -#~ "`basicConfig` pour vous avec les options par défaut. Comme il s'agit d'un " -#~ "outil de configuration simple et unique, seul le premier appel fera " -#~ "quelque chose : les appels suivants ne feront rien." +#~ "L'appel à :func:`basicConfig` doit être fait *avant* tout appel " +#~ "à :func:`debug`, :func:`info`, etc. Sinon, ces fonctions " +#~ "appelleront :func:`basicConfig` pour vous avec les options par défaut. " +#~ "Comme il s'agit d'un outil de configuration simple et unique, seul le " +#~ "premier appel fera quelque chose : les appels suivants ne feront rien." #~ msgid "Logging from multiple modules" #~ msgstr "Employer *logging* à partir de différents modules" @@ -2136,12 +2143,12 @@ msgstr ":ref:`A logging cookbook `" #~ "level -- see :ref:`logging-advanced-tutorial`." #~ msgstr "" #~ "ce qui est normalement ce à quoi vous vous attendiez. Vous pouvez " -#~ "généraliser cela à plusieurs modules, en employant le motif de *mylib." -#~ "py*. Remarquez qu'avec cette méthode simple, vous ne pourrez pas savoir, " -#~ "en lisant le fichier de log, *d'où* viennent les messages dans votre " -#~ "application, sauf dans la description de l'évènement. Si vous voulez " -#~ "suivre la localisation des messages, référez-vous à la documentation " -#~ "avancée :ref:`logging-advanced-tutorial`." +#~ "généraliser cela à plusieurs modules, en employant le motif de " +#~ "*mylib.py*. Remarquez qu'avec cette méthode simple, vous ne pourrez pas " +#~ "savoir, en lisant le fichier de log, *d'où* viennent les messages dans " +#~ "votre application, sauf dans la description de l'évènement. Si vous " +#~ "voulez suivre la localisation des messages, référez-vous à la " +#~ "documentation avancée :ref:`logging-advanced-tutorial`." #~ msgid "In Python 3.2 and later, the behaviour is as follows:" #~ msgstr "Dans Python 3.2 et ultérieur, le comportement est le suivant :" diff --git a/howto/mro.po b/howto/mro.po index 46c9a6a6d..51be4135d 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -343,9 +341,9 @@ msgstr "" #: howto/mro.rst:303 msgid "" -"The only difference with the previous example is the change B(D,E) --> B(E," -"D); however even such a little modification completely changes the ordering " -"of the hierarchy:" +"The only difference with the previous example is the change B(D,E) --> " +"B(E,D); however even such a little modification completely changes the " +"ordering of the hierarchy:" msgstr "" #: howto/mro.rst:332 @@ -408,8 +406,8 @@ msgstr "" #: howto/mro.rst:399 msgid "" "We see that class G inherits from F and E, with F *before* E: therefore we " -"would expect the attribute *G.remember2buy* to be inherited by *F." -"rembermer2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives" +"would expect the attribute *G.remember2buy* to be inherited by " +"*F.remember2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives" msgstr "" #: howto/mro.rst:407 @@ -593,8 +591,8 @@ msgstr "" #: howto/mro.rst:667 msgid "" -"The paper *A Monotonic Superclass Linearization for Dylan*: https://doi." -"org/10.1145/236337.236343" +"The paper *A Monotonic Superclass Linearization for Dylan*: https://doi.org/" +"10.1145/236337.236343" msgstr "" #: howto/mro.rst:670 diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index 10a3529d9..8af98a715 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: howto/perf_profiling.rst:7 -msgid "Python support for the Linux ``perf`` profiler" +msgid "Python support for the ``perf map`` compatible profilers" msgstr "" #: howto/perf_profiling.rst:0 @@ -31,52 +29,55 @@ msgstr "" #: howto/perf_profiling.rst:11 msgid "" -"`The Linux perf profiler `_ is a very powerful " -"tool that allows you to profile and obtain information about the performance " -"of your application. ``perf`` also has a very vibrant ecosystem of tools " -"that aid with the analysis of the data that it produces." +"`The Linux perf profiler `_ and `samply " +"`_ are powerful tools that allow you to " +"profile and obtain information about the performance of your application. " +"Both tools have vibrant ecosystems that aid with the analysis of the data " +"they produce." msgstr "" -#: howto/perf_profiling.rst:17 +#: howto/perf_profiling.rst:16 msgid "" -"The main problem with using the ``perf`` profiler with Python applications " -"is that ``perf`` only gets information about native symbols, that is, the " -"names of functions and procedures written in C. This means that the names " -"and file names of Python functions in your code will not appear in the " -"output of ``perf``." +"The main problem with using these profilers with Python applications is that " +"they only get information about native symbols, that is, the names of " +"functions and procedures written in C. This means that the names and file " +"names of Python functions in your code will not appear in the profiler " +"output." msgstr "" -#: howto/perf_profiling.rst:22 +#: howto/perf_profiling.rst:21 msgid "" "Since Python 3.12, the interpreter can run in a special mode that allows " -"Python functions to appear in the output of the ``perf`` profiler. When this " +"Python functions to appear in the output of compatible profilers. When this " "mode is enabled, the interpreter will interpose a small piece of code " "compiled on the fly before the execution of every Python function and it " -"will teach ``perf`` the relationship between this piece of code and the " +"will teach the profiler the relationship between this piece of code and the " "associated Python function using :doc:`perf map files <../c-api/perfmaps>`." msgstr "" -#: howto/perf_profiling.rst:31 +#: howto/perf_profiling.rst:30 msgid "" -"Support for the ``perf`` profiler is currently only available for Linux on " -"select architectures. Check the output of the ``configure`` build step or " -"check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to " -"see if your system is supported." +"Support for profiling is available on Linux and macOS on select " +"architectures. Perf is available on Linux, while samply can be used on both " +"Linux and macOS. samply support on macOS is available starting from Python " +"3.15. Check the output of the ``configure`` build step or check the output " +"of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to see if your system " +"is supported." msgstr "" -#: howto/perf_profiling.rst:36 +#: howto/perf_profiling.rst:37 msgid "For example, consider the following script:" msgstr "" -#: howto/perf_profiling.rst:55 +#: howto/perf_profiling.rst:56 msgid "We can run ``perf`` to sample CPU stack traces at 9999 hertz::" msgstr "" -#: howto/perf_profiling.rst:59 +#: howto/perf_profiling.rst:60 msgid "Then we can use ``perf report`` to analyze the data:" msgstr "" -#: howto/perf_profiling.rst:100 +#: howto/perf_profiling.rst:101 msgid "" "As you can see, the Python functions are not shown in the output, only " "``_PyEval_EvalFrameDefault`` (the function that evaluates the Python " @@ -85,76 +86,113 @@ msgid "" "which Python function corresponds to which bytecode-evaluating function." msgstr "" -#: howto/perf_profiling.rst:105 +#: howto/perf_profiling.rst:106 msgid "" "Instead, if we run the same experiment with ``perf`` support enabled we get:" msgstr "" -#: howto/perf_profiling.rst:152 +#: howto/perf_profiling.rst:153 +msgid "Using the samply profiler" +msgstr "" + +#: howto/perf_profiling.rst:155 +msgid "" +"samply is a modern profiler that can be used as an alternative to perf. It " +"uses the same perf map files that Python generates, making it compatible " +"with Python's profiling support. samply is particularly useful on macOS " +"where perf is not available." +msgstr "" + +#: howto/perf_profiling.rst:160 +msgid "" +"To use samply with Python, first install it following the instructions at " +"https://github.com/mstange/samply, then run::" +msgstr "" + +#: howto/perf_profiling.rst:165 +msgid "" +"This will open a web interface where you can analyze the profiling data " +"interactively. The advantage of samply is that it provides a modern web-" +"based interface for analyzing profiling data and works on both Linux and " +"macOS." +msgstr "" + +#: howto/perf_profiling.rst:170 +msgid "" +"On macOS, samply support requires Python 3.15 or later. Also on macOS, " +"samply can't profile signed Python executables due to restrictions by macOS. " +"You can profile with Python binaries that you've compiled yourself, or which " +"are unsigned or locally-signed (such as anything installed by Homebrew). In " +"order to attach to running processes on macOS, run ``samply setup`` once " +"(and every time samply is updated) to self-sign the samply binary." +msgstr "" + +#: howto/perf_profiling.rst:178 msgid "How to enable ``perf`` profiling support" msgstr "" -#: howto/perf_profiling.rst:154 +#: howto/perf_profiling.rst:180 msgid "" "``perf`` profiling support can be enabled either from the start using the " "environment variable :envvar:`PYTHONPERFSUPPORT` or the :option:`-X perf <-" -"X>` option, or dynamically using :func:`sys.activate_stack_trampoline` and :" -"func:`sys.deactivate_stack_trampoline`." +"X>` option, or dynamically using :func:`sys.activate_stack_trampoline` " +"and :func:`sys.deactivate_stack_trampoline`." msgstr "" -#: howto/perf_profiling.rst:160 +#: howto/perf_profiling.rst:186 msgid "" "The :mod:`!sys` functions take precedence over the :option:`!-X` option, " "the :option:`!-X` option takes precedence over the environment variable." msgstr "" -#: howto/perf_profiling.rst:163 +#: howto/perf_profiling.rst:189 msgid "Example, using the environment variable::" msgstr "" -#: howto/perf_profiling.rst:168 +#: howto/perf_profiling.rst:194 msgid "Example, using the :option:`!-X` option::" msgstr "" -#: howto/perf_profiling.rst:173 +#: howto/perf_profiling.rst:199 msgid "Example, using the :mod:`sys` APIs in file :file:`example.py`:" msgstr "" -#: howto/perf_profiling.rst:185 +#: howto/perf_profiling.rst:211 msgid "...then::" msgstr "" -#: howto/perf_profiling.rst:192 +#: howto/perf_profiling.rst:218 msgid "How to obtain the best results" msgstr "" -#: howto/perf_profiling.rst:194 +#: howto/perf_profiling.rst:220 msgid "" -"For best results, Python should be compiled with ``CFLAGS=\"-fno-omit-frame-" -"pointer -mno-omit-leaf-frame-pointer\"`` as this allows profilers to unwind " -"using only the frame pointer and not on DWARF debug information. This is " -"because as the code that is interposed to allow ``perf`` support is " -"dynamically generated it doesn't have any DWARF debugging information " -"available." +"For best results, keep frame pointers enabled. On supported GCC-compatible " +"toolchains, CPython builds itself with ``-fno-omit-frame-pointer`` and " +"similar flags (see :option:`--without-frame-pointers` for details). These " +"flags allow profilers to unwind using only the frame pointer and not on " +"DWARF debug information. This is because as the code that is interposed to " +"allow ``perf`` support is dynamically generated it doesn't have any DWARF " +"debugging information available." msgstr "" -#: howto/perf_profiling.rst:201 +#: howto/perf_profiling.rst:228 msgid "" "You can check if your system has been compiled with this flag by running::" msgstr "" -#: howto/perf_profiling.rst:205 +#: howto/perf_profiling.rst:232 msgid "" "If you don't see any output it means that your interpreter has not been " "compiled with frame pointers and therefore it may not be able to show Python " "functions in the output of ``perf``." msgstr "" -#: howto/perf_profiling.rst:211 +#: howto/perf_profiling.rst:238 msgid "How to work without frame pointers" msgstr "" -#: howto/perf_profiling.rst:213 +#: howto/perf_profiling.rst:240 msgid "" "If you are working with a Python interpreter that has been compiled without " "frame pointers, you can still use the ``perf`` profiler, but the overhead " @@ -164,21 +202,21 @@ msgid "" "debugging information to unwind the stack and this is a slow process." msgstr "" -#: howto/perf_profiling.rst:220 +#: howto/perf_profiling.rst:247 msgid "" -"To enable this mode, you can use the environment variable :envvar:" -"`PYTHON_PERF_JIT_SUPPORT` or the :option:`-X perf_jit <-X>` option, which " -"will enable the JIT mode for the ``perf`` profiler." +"To enable this mode, you can use the environment " +"variable :envvar:`PYTHON_PERF_JIT_SUPPORT` or the :option:`-X perf_jit <-X>` " +"option, which will enable the JIT mode for the ``perf`` profiler." msgstr "" -#: howto/perf_profiling.rst:226 +#: howto/perf_profiling.rst:253 msgid "" "Due to a bug in the ``perf`` tool, only ``perf`` versions higher than v6.8 " "will work with the JIT mode. The fix was also backported to the v6.7.2 " "version of the tool." msgstr "" -#: howto/perf_profiling.rst:230 +#: howto/perf_profiling.rst:257 msgid "" "Note that when checking the version of the ``perf`` tool (which can be done " "by running ``perf version``) you must take into account that some distros " @@ -186,18 +224,18 @@ msgid "" "that ``perf 6.7-3`` is not necessarily ``perf 6.7.3``." msgstr "" -#: howto/perf_profiling.rst:235 +#: howto/perf_profiling.rst:262 msgid "" "When using the perf JIT mode, you need an extra step before you can run " "``perf report``. You need to call the ``perf inject`` command to inject the " "JIT information into the ``perf.data`` file.::" msgstr "" -#: howto/perf_profiling.rst:243 +#: howto/perf_profiling.rst:270 msgid "or using the environment variable::" msgstr "" -#: howto/perf_profiling.rst:249 +#: howto/perf_profiling.rst:276 msgid "" "``perf inject --jit`` command will read ``perf.data``, automatically pick up " "the perf dump file that Python creates (in ``/tmp/perf-$PID.dump``), and " @@ -207,15 +245,50 @@ msgid "" "by Python." msgstr "" -#: howto/perf_profiling.rst:257 +#: howto/perf_profiling.rst:284 +msgid "" +"When using ``--call-graph dwarf``, the ``perf`` tool will take snapshots of " +"the stack of the process being profiled and save the information in the " +"``perf.data`` file. By default, the size of the stack dump is 8192 bytes, " +"but you can change the size by passing it after a comma like ``--call-graph " +"dwarf,16384``." +msgstr "" + +#: howto/perf_profiling.rst:290 +msgid "" +"The size of the stack dump is important because if the size is too small " +"``perf`` will not be able to unwind the stack and the output will be " +"incomplete. On the other hand, if the size is too big, then ``perf`` won't " +"be able to sample the process as frequently as it would like as the overhead " +"will be higher." +msgstr "" + +#: howto/perf_profiling.rst:296 +msgid "" +"The stack size is particularly important when profiling Python code compiled " +"with low optimization levels (like ``-O0``), as these builds tend to have " +"larger stack frames. If you are compiling Python with ``-O0`` and not seeing " +"Python functions in your profiling output, try increasing the stack dump " +"size to 65528 bytes (the maximum)::" +msgstr "" + +#: howto/perf_profiling.rst:304 +msgid "Different compilation flags can significantly impact stack sizes:" +msgstr "" + +#: howto/perf_profiling.rst:306 +msgid "" +"Builds with ``-O0`` typically have much larger stack frames than those with " +"``-O1`` or higher" +msgstr "" + +#: howto/perf_profiling.rst:307 +msgid "" +"Adding optimizations (``-O1``, ``-O2``, etc.) typically reduces stack size" +msgstr "" + +#: howto/perf_profiling.rst:308 msgid "" -"Notice that when using ``--call-graph dwarf`` the ``perf`` tool will take " -"snapshots of the stack of the process being profiled and save the " -"information in the ``perf.data`` file. By default the size of the stack dump " -"is 8192 bytes but the user can change the size by passing the size after " -"comma like ``--call-graph dwarf,4096``. The size of the stack dump is " -"important because if the size is too small ``perf`` will not be able to " -"unwind the stack and the output will be incomplete. On the other hand, if " -"the size is too big, then ``perf`` won't be able to sample the process as " -"frequently as it would like as the overhead will be higher." +"Frame pointers (``-fno-omit-frame-pointer``) generally provide more reliable " +"stack unwinding" msgstr "" diff --git a/howto/pyporting.po b/howto/pyporting.po index 7bbaf3935..26c213ff7 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2021-12-11 16:27+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -52,8 +52,8 @@ msgstr "" #: howto/pyporting.rst:21 msgid "" "Since Python 3.11 the original porting guide was discontinued. You can find " -"the old guide in the `archive `_." +"the old guide in the `archive `_." msgstr "" #: howto/pyporting.rst:27 @@ -343,10 +343,10 @@ msgstr "" #~ "changer et à quoi s'intéresser spécifiquement pendant que vous codez, " #~ "vous aurez sûrement envie de découvrir quels sont les changements " #~ "introduits par Python 3 par rapport à Python 2. Pour atteindre cet " -#~ "objectif, les deux meilleurs moyens sont de lire le document :ref:" -#~ "`whatsnew-index` de chaque version de Python 3 et le livre `Porting to " -#~ "Python 3`_ (gratuit en ligne, en anglais). Il y a également une " -#~ "« antisèche » (`cheat sheet`_, ressource en anglais) très pratique du " +#~ "objectif, les deux meilleurs moyens sont de lire le " +#~ "document :ref:`whatsnew-index` de chaque version de Python 3 et le livre " +#~ "`Porting to Python 3`_ (gratuit en ligne, en anglais). Il y a également " +#~ "une « antisèche » (`cheat sheet`_, ressource en anglais) très pratique du " #~ "projet Python-Future." #~ msgid "Update your code" @@ -422,9 +422,9 @@ msgstr "" #~ "la documentation de l'outil que vous avez choisi afin d'identifier ce " #~ "qu'il corrige par défaut et ce qui peut être appliqué de façon " #~ "optionnelle afin de savoir ce qui sera (ou non) corrigé pour vous ou ce " -#~ "que vous devrez modifier vous-même (par exemple, le remplacement ``io." -#~ "open()`` plutôt que la fonction native ``open()`` est inactif par défaut " -#~ "dans *Modernize*). Heureusement, il n'y a que quelques points à " +#~ "que vous devrez modifier vous-même (par exemple, le remplacement " +#~ "``io.open()`` plutôt que la fonction native ``open()`` est inactif par " +#~ "défaut dans *Modernize*). Heureusement, il n'y a que quelques points à " #~ "surveiller qui peuvent réellement être considérés comme des problèmes " #~ "difficiles à déboguer si vous n'y prêtez pas attention." @@ -614,11 +614,11 @@ msgstr "" #~ "caractères littérales de votre code correspondent à du texte ou à du " #~ "binaire. Vous devez préfixer par ``b`` tous les littéraux qui " #~ "représentent des données binaires et par ``u`` les littéraux qui " -#~ "représentent du texte (il existe une importation du module :mod:" -#~ "`__future__` permettant de forcer l'encodage de toutes les chaînes de " -#~ "caractères littérales non spécifiées en Unicode, mais cette pratique " -#~ "s'est avérée moins efficace que l'ajout explicite des préfixe ``b`` et " -#~ "``u``)." +#~ "représentent du texte (il existe une importation du " +#~ "module :mod:`__future__` permettant de forcer l'encodage de toutes les " +#~ "chaînes de caractères littérales non spécifiées en Unicode, mais cette " +#~ "pratique s'est avérée moins efficace que l'ajout explicite des préfixe " +#~ "``b`` et ``u``)." #~ msgid "" #~ "As part of this dichotomy you also need to be careful about opening " @@ -694,9 +694,9 @@ msgstr "" #~ "simplement qu'une collection de nombres en binaire, Python 3 renvoie la " #~ "valeur entière de l'octet indicé. Mais en Python 2, étant donné que " #~ "``bytes == str``, l'indiçage renvoie une tranche de longueur 1 de " -#~ "*bytes*. Le projet six_ dispose d'une fonction appelée ``six." -#~ "indexbytes()`` qui renvoie un entier comme en Python 3 : ``six." -#~ "indexbytes(b'123', 1)``." +#~ "*bytes*. Le projet six_ dispose d'une fonction appelée " +#~ "``six.indexbytes()`` qui renvoie un entier comme en Python 3 : " +#~ "``six.indexbytes(b'123', 1)``." #~ msgid "To summarize:" #~ msgstr "Pour résumer :" @@ -768,11 +768,12 @@ msgstr "" #~ "code to access e.g. the :mod:`importlib.abc` module by doing the " #~ "following::" #~ msgstr "" -#~ "Supposons que vous avez besoin d'accéder à une fonctionnalité de :mod:" -#~ "`importlib` qui est disponible dans la bibliothèque standard de Python " -#~ "depuis la version 3.3, dans celle de Python 2 via le module importlib2_ " -#~ "sur *PyPI*. Vous pourriez être tenté d'écrire un code qui accède, par " -#~ "exemple, au module :mod:`importlib.abc` avec l'approche suivante ::" +#~ "Supposons que vous avez besoin d'accéder à une fonctionnalité " +#~ "de :mod:`importlib` qui est disponible dans la bibliothèque standard de " +#~ "Python depuis la version 3.3, dans celle de Python 2 via le module " +#~ "importlib2_ sur *PyPI*. Vous pourriez être tenté d'écrire un code qui " +#~ "accède, par exemple, au module :mod:`importlib.abc` avec l'approche " +#~ "suivante ::" #~ msgid "" #~ "The problem with this code is what happens when Python 4 comes out? It " diff --git a/howto/regex.po b/howto/regex.po index 313058751..90218b379 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-28 11:09+0200\n" "Last-Translator: Nabil Bendafi \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 3.2.1\n" #: howto/regex.rst:5 -msgid "Regular Expression HOWTO" +#, fuzzy +msgid "Regular expression HOWTO" msgstr "Guide des expressions régulières" #: howto/regex.rst:0 @@ -27,7 +28,7 @@ msgstr "Auteur" msgid "A.M. Kuchling " msgstr "A.M. Kuchling " -#: howto/regex.rst:-1 +#: howto/regex.rst:16 msgid "Abstract" msgstr "Résumé" @@ -110,7 +111,8 @@ msgstr "" "régulière élaborée, il sera probablement plus compréhensible." #: howto/regex.rst:51 -msgid "Simple Patterns" +#, fuzzy +msgid "Simple patterns" msgstr "Motifs simples" #: howto/regex.rst:53 @@ -136,7 +138,8 @@ msgstr "" "compilateurs." #: howto/regex.rst:63 -msgid "Matching Characters" +#, fuzzy +msgid "Matching characters" msgstr "Correspondance de caractères" #: howto/regex.rst:65 @@ -154,16 +157,16 @@ msgstr "" #: howto/regex.rst:70 msgid "" -"There are exceptions to this rule; some characters are special :dfn:" -"`metacharacters`, and don't match themselves. Instead, they signal that " -"some out-of-the-ordinary thing should be matched, or they affect other " -"portions of the RE by repeating them or changing their meaning. Much of " -"this document is devoted to discussing various metacharacters and what they " -"do." +"There are exceptions to this rule; some characters are " +"special :dfn:`metacharacters`, and don't match themselves. Instead, they " +"signal that some out-of-the-ordinary thing should be matched, or they affect " +"other portions of the RE by repeating them or changing their meaning. Much " +"of this document is devoted to discussing various metacharacters and what " +"they do." msgstr "" -"Il existe des exceptions à cette règle ; certains caractères sont des :dfn:" -"`métacaractères` spéciaux et ne correspondent pas à eux-mêmes. Au lieu de " -"cela, ils signalent que certaines choses non ordinaires doivent " +"Il existe des exceptions à cette règle ; certains caractères sont " +"des :dfn:`métacaractères` spéciaux et ne correspondent pas à eux-mêmes. Au " +"lieu de cela, ils signalent que certaines choses non ordinaires doivent " "correspondre, ou ils affectent d'autre portions de la RE en les répétant ou " "en changeant leur sens. Une grande partie de ce document est consacrée au " "fonctionnement de ces métacaractères." @@ -212,12 +215,12 @@ msgstr "" #: howto/regex.rst:97 msgid "" -"You can match the characters not listed within the class by :dfn:" -"`complementing` the set. This is indicated by including a ``'^'`` as the " -"first character of the class. For example, ``[^5]`` will match any character " -"except ``'5'``. If the caret appears elsewhere in a character class, it " -"does not have special meaning. For example: ``[5^]`` will match either a " -"``'5'`` or a ``'^'``." +"You can match the characters not listed within the class " +"by :dfn:`complementing` the set. This is indicated by including a ``'^'`` " +"as the first character of the class. For example, ``[^5]`` will match any " +"character except ``'5'``. If the caret appears elsewhere in a character " +"class, it does not have special meaning. For example: ``[5^]`` will match " +"either a ``'5'`` or a ``'^'``." msgstr "" "Vous pouvez trouver une correspondance avec les caractères non listés dans " "une classe en spécifiant le :dfn:`complément` de l'ensemble. Ceci est " @@ -261,19 +264,20 @@ msgid "" "Let's take an example: ``\\w`` matches any alphanumeric character. If the " "regex pattern is expressed in bytes, this is equivalent to the class ``[a-zA-" "Z0-9_]``. If the regex pattern is a string, ``\\w`` will match all the " -"characters marked as letters in the Unicode database provided by the :mod:" -"`unicodedata` module. You can use the more restricted definition of ``\\w`` " -"in a string pattern by supplying the :const:`re.ASCII` flag when compiling " -"the regular expression." +"characters marked as letters in the Unicode database provided by " +"the :mod:`unicodedata` module. You can use the more restricted definition " +"of ``\\w`` in a string pattern by supplying the :const:`re.ASCII` flag when " +"compiling the regular expression." msgstr "" "Prenons un exemple : ``\\w`` correspond à n'importe quel caractère " "alphanumérique. Si l'expression régulière est exprimée en *bytes*, c'est " "équivalent à la classe ``[a-zA-Z0-9_]``. Si l'expression régulière est une " "chaîne de caractères, ``\\w`` correspond à tous les caractères identifiés " -"comme lettre dans la base de données Unicode fournie par le module :mod:" -"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de " -"``\\w`` dans un motif exprimé en chaîne de caractères en spécifiant " -"l'option :const:`re.ASCII` lors de la compilation de l'expression régulière." +"comme lettre dans la base de données Unicode fournie par le " +"module :mod:`unicodedata`. Vous pouvez utiliser la définition plus " +"restrictive de ``\\w`` dans un motif exprimé en chaîne de caractères en " +"spécifiant l'option :const:`re.ASCII` lors de la compilation de l'expression " +"régulière." #: howto/regex.rst:123 msgid "" @@ -373,9 +377,9 @@ msgstr "" #: howto/regex.rst:156 msgid "" "The final metacharacter in this section is ``.``. It matches anything " -"except a newline character, and there's an alternate mode (:const:`re." -"DOTALL`) where it will match even a newline. ``.`` is often used where you " -"want to match \"any character\"." +"except a newline character, and there's an alternate mode " +"(:const:`re.DOTALL`) where it will match even a newline. ``.`` is often " +"used where you want to match \"any character\"." msgstr "" "Le dernier métacaractère de cette section est ``.``. Il correspond à tous " "les caractères, à l'exception du caractère de retour à la ligne ; il existe " @@ -384,7 +388,8 @@ msgstr "" "veut trouver une correspondance avec « n'importe quel caractère »." #: howto/regex.rst:163 -msgid "Repeating Things" +#, fuzzy +msgid "Repeating things" msgstr "Répétitions" #: howto/regex.rst:165 @@ -531,7 +536,7 @@ msgstr "" "Essaie encore ``b``, mais la position courante est le dernier caractère, qui " "est ``'d'``." -#: howto/regex.rst:213 +#: howto/regex.rst:209 msgid "6" msgstr "6" @@ -545,6 +550,10 @@ msgstr "" "Encore un retour en arrière, de manière à ce que ``[bcd]*`` ne corresponde " "qu'à ``bc``." +#: howto/regex.rst:213 +msgid "7" +msgstr "" + #: howto/regex.rst:213 msgid "" "Try ``b`` again. This time the character at the current position is " @@ -645,7 +654,8 @@ msgstr "" "simplement parce qu'ils sont plus courts et plus faciles à lire." #: howto/regex.rst:259 -msgid "Using Regular Expressions" +#, fuzzy +msgid "Using regular expressions" msgstr "Utilisation des expressions régulières" #: howto/regex.rst:261 @@ -661,7 +671,8 @@ msgstr "" "d'effectuer des correspondances avec." #: howto/regex.rst:268 -msgid "Compiling Regular Expressions" +#, fuzzy +msgid "Compiling regular expressions" msgstr "Compilation des expressions régulières" #: howto/regex.rst:270 @@ -692,8 +703,8 @@ msgid "" "and no special syntax was created for expressing them. (There are " "applications that don't need REs at all, so there's no need to bloat the " "language specification by including them.) Instead, the :mod:`re` module is " -"simply a C extension module included with Python, just like the :mod:" -"`socket` or :mod:`zlib` modules." +"simply a C extension module included with Python, just like " +"the :mod:`socket` or :mod:`zlib` modules." msgstr "" "La RE passée à :func:`re.compile` est une chaîne. Les RE sont des chaînes " "car les expressions régulières ne font pas partie intrinsèque du langage " @@ -713,7 +724,8 @@ msgstr "" "suivante." #: howto/regex.rst:299 -msgid "The Backslash Plague" +#, fuzzy +msgid "The backslash plague" msgstr "La maudite barre oblique inverse" #: howto/regex.rst:301 @@ -819,12 +831,13 @@ msgstr "" "écrites dans le code Python en utilisant la notation « chaînes brutes »." #: howto/regex.rst:336 +#, fuzzy msgid "" "In addition, special escape sequences that are valid in regular expressions, " -"but not valid as Python string literals, now result in a :exc:" -"`DeprecationWarning` and will eventually become a :exc:`SyntaxError`, which " -"means the sequences will be invalid if raw string notation or escaping the " -"backslashes isn't used." +"but not valid as Python string literals, now result in " +"a :exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`, " +"which means the sequences will be invalid if raw string notation or escaping " +"the backslashes isn't used." msgstr "" "En complément, les séquences d'échappement valides dans les expressions " "régulières, mais non valides dans les littéraux chaînes classiques, " @@ -862,7 +875,8 @@ msgid "``r\"\\w+\\s+\\1\"``" msgstr "``r\"\\w+\\s+\\1\"``" #: howto/regex.rst:355 -msgid "Performing Matches" +#, fuzzy +msgid "Performing matches" msgstr "Recherche de correspondances" #: howto/regex.rst:357 @@ -877,58 +891,65 @@ msgstr "" "attributs. Seuls les plus significatifs seront couverts ici ; consultez la " "documentation :mod:`re` pour la liste complète." -#: howto/regex.rst:417 howto/regex.rst:1065 +#: howto/regex.rst:418 howto/regex.rst:1074 msgid "Method/Attribute" msgstr "Méthode/Attribut" -#: howto/regex.rst:417 howto/regex.rst:1065 +#: howto/regex.rst:418 howto/regex.rst:1074 msgid "Purpose" msgstr "Objectif" #: howto/regex.rst:365 -msgid "``match()``" -msgstr "``match()``" +msgid "``search()``" +msgstr "``search()``" #: howto/regex.rst:365 -msgid "Determine if the RE matches at the beginning of the string." -msgstr "Détermine si la RE fait correspond dès le début de la chaîne." +msgid "Scan through a string, looking for any location where this RE matches." +msgstr "Analyse la chaîne à la recherche d'une position où la RE correspond." #: howto/regex.rst:368 -msgid "``search()``" -msgstr "``search()``" +#, fuzzy +msgid "``prefixmatch()``" +msgstr "``match()``" #: howto/regex.rst:368 -msgid "Scan through a string, looking for any location where this RE matches." -msgstr "Analyse la chaîne à la recherche d'une position où la RE correspond." +#, fuzzy +msgid "" +"Determine if the RE matches at the beginning of the string. Previously " +"named :ref:`match() `." +msgstr "Détermine si la RE fait correspond dès le début de la chaîne." -#: howto/regex.rst:371 +#: howto/regex.rst:372 msgid "``findall()``" msgstr "``findall()``" -#: howto/regex.rst:371 -msgid "Find all substrings where the RE matches, and returns them as a list." +#: howto/regex.rst:372 +#, fuzzy +msgid "Find all substrings where the RE matches, and return them as a list." msgstr "" "Trouve toutes les sous-chaînes qui correspondent à la RE et les renvoie sous " "la forme d'une liste." -#: howto/regex.rst:374 +#: howto/regex.rst:375 msgid "``finditer()``" msgstr "``finditer()``" -#: howto/regex.rst:374 +#: howto/regex.rst:375 +#, fuzzy msgid "" -"Find all substrings where the RE matches, and returns them as an :term:" -"`iterator`." +"Find all substrings where the RE matches, and return them as " +"an :term:`iterator`." msgstr "" "Trouve toutes les sous-chaînes qui correspondent à la RE et les renvoie sous " "la forme d'un :term:`itérateur `." -#: howto/regex.rst:378 +#: howto/regex.rst:379 +#, fuzzy msgid "" -":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if " -"no match can be found. If they're successful, a :ref:`match object ` instance is returned, containing information about the match: " -"where it starts and ends, the substring it matched, and more." +":meth:`~re.Pattern.search` and :meth:`~re.Pattern.prefixmatch` return " +"``None`` if no match can be found. If they're successful, a :ref:`match " +"object ` instance is returned, containing information about " +"the match: where it starts and ends, the substring it matched, and more." msgstr "" ":meth:`~re.Pattern.match` et :meth:`~re.Pattern.search` renvoient ``None`` " "si aucune correspondance ne peut être trouvée. Si elles trouvent une " @@ -937,13 +958,13 @@ msgstr "" "correspondance : position de départ et de fin, la sous-chaîne qui correspond " "et d'autres informations." -#: howto/regex.rst:383 +#: howto/regex.rst:384 msgid "" "You can learn about this by interactively experimenting with the :mod:`re` " "module." msgstr "" -#: howto/regex.rst:386 +#: howto/regex.rst:387 msgid "" "This HOWTO uses the standard Python interpreter for its examples. First, run " "the Python interpreter, import the :mod:`re` module, and compile a RE::" @@ -952,13 +973,14 @@ msgstr "" "Commencez par lancer l'interpréteur Python, importez le module :mod:`re` et " "compilez une RE ::" -#: howto/regex.rst:394 +#: howto/regex.rst:395 +#, fuzzy msgid "" "Now, you can try matching various strings against the RE ``[a-z]+``. An " "empty string shouldn't match at all, since ``+`` means 'one or more " -"repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, " -"which will cause the interpreter to print no output. You can explicitly " -"print the result of :meth:`!match` to make this clear. ::" +"repetitions'. :meth:`~re.Pattern.search` should return ``None`` in this " +"case, which will cause the interpreter to print no output. You can " +"explicitly print the result of :meth:`!search` to make this clear. ::" msgstr "" "Maintenant, vous pouvez tester des correspondances de la RE ``[a-z]+`` avec " "différentes chaînes. Une chaîne vide ne doit pas correspondre, puisque ``+`` " @@ -967,18 +989,20 @@ msgstr "" "rien. Vous pouvez afficher le résultat de :meth:`!match` explicitement pour " "que ce soit clair. ::" -#: howto/regex.rst:404 +#: howto/regex.rst:405 +#, fuzzy msgid "" "Now, let's try it on a string that it should match, such as ``tempo``. In " -"this case, :meth:`~re.Pattern.match` will return a :ref:`match object `, so you should store the result in a variable for later use. ::" +"this case, :meth:`~re.Pattern.search` will return a :ref:`match object " +"`, so you should store the result in a variable for later " +"use. ::" msgstr "" "Maintenant, essayons sur une chaîne qui doit correspondre, par exemple " "``tempo``. Dans ce cas, :meth:`~re.Pattern.match` renvoie un :ref:`objet " "correspondance `, vous pouvez ainsi stocker le résultat dans " "une variable pour une utilisation ultérieure. ::" -#: howto/regex.rst:412 +#: howto/regex.rst:413 msgid "" "Now you can query the :ref:`match object ` for information " "about the matching string. Match object instances also have several methods " @@ -989,65 +1013,66 @@ msgstr "" "instances d'objets correspondances possèdent plusieurs méthodes et " "attributs ; les plus importants sont :" -#: howto/regex.rst:419 +#: howto/regex.rst:420 msgid "``group()``" msgstr "``group()``" -#: howto/regex.rst:419 +#: howto/regex.rst:420 msgid "Return the string matched by the RE" msgstr "Renvoie la chaîne de caractères correspondant à la RE" -#: howto/regex.rst:421 +#: howto/regex.rst:422 msgid "``start()``" msgstr "``start()``" -#: howto/regex.rst:421 +#: howto/regex.rst:422 msgid "Return the starting position of the match" msgstr "Renvoie la position de début de la correspondance" -#: howto/regex.rst:423 +#: howto/regex.rst:424 msgid "``end()``" msgstr "``end()``" -#: howto/regex.rst:423 +#: howto/regex.rst:424 msgid "Return the ending position of the match" msgstr "Renvoie la position de fin de la correspondance" -#: howto/regex.rst:425 +#: howto/regex.rst:426 msgid "``span()``" msgstr "``span()``" -#: howto/regex.rst:425 +#: howto/regex.rst:426 msgid "Return a tuple containing the (start, end) positions of the match" msgstr "" "Renvoie un *n*-uplet contenant les positions (début, fin) de la " "correspondance" -#: howto/regex.rst:429 +#: howto/regex.rst:430 msgid "Trying these methods will soon clarify their meaning::" msgstr "Essayons ces méthodes pour clarifier leur signification ::" -#: howto/regex.rst:438 +#: howto/regex.rst:439 +#, fuzzy msgid "" -":meth:`~re.Match.group` returns the substring that was matched by the RE. :" -"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and " -"ending index of the match. :meth:`~re.Match.span` returns both start and end " -"indexes in a single tuple. Since the :meth:`~re.Pattern.match` method only " -"checks if the RE matches at the start of a string, :meth:`!start` will " -"always be zero. However, the :meth:`~re.Pattern.search` method of patterns " -"scans through the string, so the match may not start at zero in that " -"case. ::" -msgstr "" -":meth:`~re.Match.group` renvoie la sous-chaîne qui correspond à la RE. :meth:" -"`~re.Match.start` et :meth:`~re.Match.end` renvoient les indices de début et " -"de fin de la correspondance. :meth:`~re.Match.span` renvoie les indices de " -"début et de fin dans un seul couple. Comme la méthode :meth:`~re.Pattern." -"match` ne fait que vérifier si la RE correspond au début de la chaîne, :meth:" -"`!start` vaut toujours zéro. Cependant, la méthode :meth:`~re.Pattern." -"search` d'un motif analyse toute la chaîne, afin de trouver une " -"correspondance potentielle qui ne commence pas à zéro. ::" - -#: howto/regex.rst:455 +":meth:`~re.Match.group` returns the substring that was matched by the " +"RE. :meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting " +"and ending index of the match. :meth:`~re.Match.span` returns both start and " +"end indexes in a single tuple. The :meth:`~re.Pattern.search` method of " +"patterns scans through the string, so the match may not start at zero. " +"However, the :meth:`~re.Pattern.prefixmatch` method only checks if the RE " +"matches at the start of a string, so :meth:`!start` will always be zero in " +"that case. ::" +msgstr "" +":meth:`~re.Match.group` renvoie la sous-chaîne qui correspond à la " +"RE. :meth:`~re.Match.start` et :meth:`~re.Match.end` renvoient les indices " +"de début et de fin de la correspondance. :meth:`~re.Match.span` renvoie les " +"indices de début et de fin dans un seul couple. Comme la " +"méthode :meth:`~re.Pattern.match` ne fait que vérifier si la RE correspond " +"au début de la chaîne, :meth:`!start` vaut toujours zéro. Cependant, la " +"méthode :meth:`~re.Pattern.search` d'un motif analyse toute la chaîne, afin " +"de trouver une correspondance potentielle qui ne commence pas à zéro. ::" + +#: howto/regex.rst:457 msgid "" "In actual programs, the most common style is to store the :ref:`match object " "` in a variable, and then check if it was ``None``. This " @@ -1057,63 +1082,67 @@ msgstr "" "stocker l'\\ :ref:`objet correspondance ` dans une variable, " "puis à vérifier s'il vaut ``None``. Généralement, cela ressemble à ceci ::" -#: howto/regex.rst:466 +#: howto/regex.rst:468 msgid "" -"Two pattern methods return all of the matches for a pattern. :meth:`~re." -"Pattern.findall` returns a list of matching strings::" +"Two pattern methods return all of the matches for a " +"pattern. :meth:`~re.Pattern.findall` returns a list of matching strings::" msgstr "" -"Deux méthodes de motifs renvoient toutes les correspondances pour un motif. :" -"meth:`~re.Pattern.findall` renvoie une liste des chaînes qui correspondent ::" +"Deux méthodes de motifs renvoient toutes les correspondances pour un " +"motif. :meth:`~re.Pattern.findall` renvoie une liste des chaînes qui " +"correspondent ::" -#: howto/regex.rst:473 +#: howto/regex.rst:475 +#, fuzzy msgid "" "The ``r`` prefix, making the literal a raw string literal, is needed in this " "example because escape sequences in a normal \"cooked\" string literal that " "are not recognized by Python, as opposed to regular expressions, now result " -"in a :exc:`DeprecationWarning` and will eventually become a :exc:" -"`SyntaxError`. See :ref:`the-backslash-plague`." +"in a :exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`. " +"See :ref:`the-backslash-plague`." msgstr "" "Le préfixe ``r``, qui indique une chaîne brute littérale, est nécessaire " "dans cet exemple car les séquences d'échappement dans une chaîne littérale " "qui ne sont pas reconnues par Python, alors qu'elles le sont par les " "expressions régulières, produisent maintenant un :exc:`DeprecationWarning` " -"et deviendront possiblement des :exc:`SyntaxError`. Reportez-vous à :ref:" -"`the-backslash-plague`." +"et deviendront possiblement des :exc:`SyntaxError`. Reportez-vous " +"à :ref:`the-backslash-plague`." -#: howto/regex.rst:479 +#: howto/regex.rst:481 msgid "" ":meth:`~re.Pattern.findall` has to create the entire list before it can be " "returned as the result. The :meth:`~re.Pattern.finditer` method returns a " -"sequence of :ref:`match object ` instances as an :term:" -"`iterator`::" +"sequence of :ref:`match object ` instances as " +"an :term:`iterator`::" msgstr "" ":meth:`~re.Pattern.findall` doit créer la liste entière avant de la renvoyer " "comme résultat. La méthode :meth:`~re.Pattern.finditer` renvoie une séquence " -"d'instances d'\\ :ref:`objets correspondances ` en tant :term:" -"`qu'itérateur ` ::" +"d'instances d'\\ :ref:`objets correspondances ` en " +"tant :term:`qu'itérateur ` ::" -#: howto/regex.rst:495 -msgid "Module-Level Functions" +#: howto/regex.rst:497 +#, fuzzy +msgid "Module-level functions" msgstr "Fonctions de niveau module" -#: howto/regex.rst:497 +#: howto/regex.rst:499 +#, fuzzy msgid "" -"You don't have to create a pattern object and call its methods; the :mod:" -"`re` module also provides top-level functions called :func:`~re.match`, :" -"func:`~re.search`, :func:`~re.findall`, :func:`~re.sub`, and so forth. " -"These functions take the same arguments as the corresponding pattern method " -"with the RE string added as the first argument, and still return either " -"``None`` or a :ref:`match object ` instance. ::" +"You don't have to create a pattern object and call its methods; " +"the :mod:`re` module also provides top-level functions " +"called :func:`~re.search`, :func:`~re.prefixmatch`, :func:`~re.findall`, :func:`~re.sub`, " +"and so forth. These functions take the same arguments as the corresponding " +"pattern method with the RE string added as the first argument, and still " +"return either ``None`` or a :ref:`match object ` instance. ::" msgstr "" "Vous n'avez pas besoin de créer un objet motif et d'appeler ses méthodes ; " -"le module :mod:`re` fournit des fonctions à son niveau, ce sont :func:`~re." -"match`, :func:`~re.search`, :func:`~re.findall`, :func:`~re.sub` et ainsi de " -"suite. Ces fonctions prennent les mêmes arguments que les méthodes " -"correspondantes des objets motifs, avec la chaîne RE ajoutée en tant que " -"premier argument. Elles renvoient toujours ``None`` ou une instance d'\\ :" -"ref:`objet correspondance `. ::" +"le module :mod:`re` fournit des fonctions à son niveau, ce " +"sont :func:`~re.match`, :func:`~re.search`, :func:`~re.findall`, :func:`~re.sub` " +"et ainsi de suite. Ces fonctions prennent les mêmes arguments que les " +"méthodes correspondantes des objets motifs, avec la chaîne RE ajoutée en " +"tant que premier argument. Elles renvoient toujours ``None`` ou une instance " +"d'\\ :ref:`objet correspondance `. ::" -#: howto/regex.rst:509 +#: howto/regex.rst:511 msgid "" "Under the hood, these functions simply create a pattern object for you and " "call the appropriate method on it. They also store the compiled object in a " @@ -1125,7 +1154,7 @@ msgstr "" "l'objet compilé dans un cache afin que les appels suivants qui utilisent la " "même RE n'aient pas besoin d'analyser le motif une nouvelle fois." -#: howto/regex.rst:514 +#: howto/regex.rst:516 msgid "" "Should you use these module-level functions, or should you get the pattern " "and call its methods yourself? If you're accessing a regex within a loop, " @@ -1138,32 +1167,33 @@ msgstr "" "d'économiser quelques appels de fonctions. En dehors des boucles, il n'y a " "pas beaucoup de différence grâce au cache interne." -#: howto/regex.rst:522 -msgid "Compilation Flags" +#: howto/regex.rst:524 +#, fuzzy +msgid "Compilation flags" msgstr "Options de compilation" -#: howto/regex.rst:526 +#: howto/regex.rst:528 msgid "" "Compilation flags let you modify some aspects of how regular expressions " "work. Flags are available in the :mod:`re` module under two names, a long " -"name such as :const:`IGNORECASE` and a short, one-letter form such as :const:" -"`I`. (If you're familiar with Perl's pattern modifiers, the one-letter " -"forms use the same letters; the short form of :const:`re.VERBOSE` is :const:" -"`re.X`, for example.) Multiple flags can be specified by bitwise OR-ing " -"them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, for " -"example." +"name such as :const:`IGNORECASE` and a short, one-letter form such " +"as :const:`I`. (If you're familiar with Perl's pattern modifiers, the one-" +"letter forms use the same letters; the short form of :const:`re.VERBOSE` " +"is :const:`re.X`, for example.) Multiple flags can be specified by bitwise " +"OR-ing them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, " +"for example." msgstr "" "Les options de compilation vous permettent de modifier le comportement des " -"expressions régulières. Ces options sont accessibles dans le module :mod:" -"`re` par deux noms, un long du type :const:`IGNORECASE` et un court (une " -"seule lettre) tel que :const:`I` (si vous êtes habitués aux modificateurs de " -"motifs Perl, la version courte utilise les mêmes lettres que Perl, par " -"exemple la version courte de :const:`re.VERBOSE` est :const:`re.X`). " -"Plusieurs options peuvent être spécifiées en appliquant l'opérateur bit-à-" -"bit *OR* ; par exemple, ``re.I | re.M`` active à la fois les options :const:" -"`I` et :const:`M`." +"expressions régulières. Ces options sont accessibles dans le " +"module :mod:`re` par deux noms, un long du type :const:`IGNORECASE` et un " +"court (une seule lettre) tel que :const:`I` (si vous êtes habitués aux " +"modificateurs de motifs Perl, la version courte utilise les mêmes lettres " +"que Perl, par exemple la version courte de :const:`re.VERBOSE` " +"est :const:`re.X`). Plusieurs options peuvent être spécifiées en appliquant " +"l'opérateur bit-à-bit *OR* ; par exemple, ``re.I | re.M`` active à la fois " +"les options :const:`I` et :const:`M`." -#: howto/regex.rst:534 +#: howto/regex.rst:536 msgid "" "Here's a table of the available flags, followed by a more detailed " "explanation of each one." @@ -1171,19 +1201,19 @@ msgstr "" "Vous trouvez ci-dessous le tableau des options disponibles, suivies " "d'explications détaillées." -#: howto/regex.rst:538 +#: howto/regex.rst:540 msgid "Flag" msgstr "Option" -#: howto/regex.rst:538 +#: howto/regex.rst:540 msgid "Meaning" msgstr "Signification" -#: howto/regex.rst:540 +#: howto/regex.rst:542 msgid ":const:`ASCII`, :const:`A`" msgstr ":const:`ASCII`, :const:`A`" -#: howto/regex.rst:540 +#: howto/regex.rst:542 msgid "" "Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " "on ASCII characters with the respective property." @@ -1192,55 +1222,55 @@ msgstr "" "``\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " "ayant la propriété demandée." -#: howto/regex.rst:544 +#: howto/regex.rst:546 msgid ":const:`DOTALL`, :const:`S`" msgstr ":const:`DOTALL`, :const:`S`" -#: howto/regex.rst:544 +#: howto/regex.rst:546 msgid "Make ``.`` match any character, including newlines." msgstr "" "Fait en sorte que ``.`` corresponde à n'importe quel caractère, caractère de " "retour à la ligne inclus." -#: howto/regex.rst:547 +#: howto/regex.rst:549 msgid ":const:`IGNORECASE`, :const:`I`" msgstr ":const:`IGNORECASE`, :const:`I`" -#: howto/regex.rst:547 +#: howto/regex.rst:549 msgid "Do case-insensitive matches." msgstr "Recherche une correspondance sans tenir compte de la casse." -#: howto/regex.rst:549 +#: howto/regex.rst:551 msgid ":const:`LOCALE`, :const:`L`" msgstr ":const:`LOCALE`, :const:`L`" -#: howto/regex.rst:549 +#: howto/regex.rst:551 msgid "Do a locale-aware match." msgstr "" "Recherche une correspondance en tenant compte de la configuration de la " "région." -#: howto/regex.rst:551 +#: howto/regex.rst:553 msgid ":const:`MULTILINE`, :const:`M`" msgstr ":const:`MULTILINE`, :const:`M`" -#: howto/regex.rst:551 +#: howto/regex.rst:553 msgid "Multi-line matching, affecting ``^`` and ``$``." msgstr "Correspondance multi-lignes, affecte ``^`` et ``$``." -#: howto/regex.rst:554 +#: howto/regex.rst:556 msgid ":const:`VERBOSE`, :const:`X` (for 'extended')" msgstr "" ":const:`VERBOSE`, :const:`X` (pour *extended*, c.-à-d. étendu en anglais)" -#: howto/regex.rst:554 +#: howto/regex.rst:556 msgid "" "Enable verbose REs, which can be organized more cleanly and understandably." msgstr "" "Active les RE verbeuses, qui peuvent être organisées de manière plus propre " "et compréhensible." -#: howto/regex.rst:563 +#: howto/regex.rst:565 #, fuzzy msgid "" "Perform case-insensitive matching; character class and literal strings will " @@ -1253,8 +1283,8 @@ msgid "" "letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U+212A, " "Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, ``'spAM'``, or " "``'ſpam'`` (the latter is matched only in Unicode mode). This lowercasing " -"doesn't take the current locale into account; it will if you also set the :" -"const:`LOCALE` flag." +"doesn't take the current locale into account; it will if you also set " +"the :const:`LOCALE` flag." msgstr "" "Effectue une correspondance insensible à la casse ; les classes de " "caractères et les littéraux de chaînes de caractères ignorent la casse pour " @@ -1269,10 +1299,10 @@ msgstr "" "s) et 'K' (U+212A, signe du Kelvin). ``Spam`` correspond ainsi à ``'Spam'``, " "``'spam'``, ``'spAM'`` ou ``'ſpam'`` (ce dernier ne correspond qu'en mode " "Unicode). Le passage en minuscules ne prend pas en compte la configuration " -"de région courante ; elle le fait si vous mettez aussi l'option :const:" -"`LOCALE`." +"de région courante ; elle le fait si vous mettez aussi " +"l'option :const:`LOCALE`." -#: howto/regex.rst:581 +#: howto/regex.rst:583 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale instead of the Unicode database." @@ -1281,7 +1311,7 @@ msgstr "" "à la casse dépendants de la configuration de la région courante au lieu de " "la base de données Unicode." -#: howto/regex.rst:584 +#: howto/regex.rst:586 msgid "" "Locales are a feature of the C library intended to help in writing programs " "that take account of language differences. For example, if you're " @@ -1319,7 +1349,7 @@ msgstr "" "est déjà activée par défaut dans Python 3 pour les motifs Unicode (type " "*str*) et elle est capable de gérer différentes configurations de régions." -#: howto/regex.rst:606 +#: howto/regex.rst:608 msgid "" "(``^`` and ``$`` haven't been explained yet; they'll be introduced in " "section :ref:`more-metacharacters`.)" @@ -1327,7 +1357,7 @@ msgstr "" "Nota : ``^`` et ``$`` n'ont pas encore été expliqués ; ils sont introduits " "dans la section :ref:`more-metacharacters`." -#: howto/regex.rst:609 +#: howto/regex.rst:611 msgid "" "Usually ``^`` matches only at the beginning of the string, and ``$`` matches " "only at the end of the string and immediately before the newline (if any) at " @@ -1346,7 +1376,7 @@ msgstr "" "fin de la chaîne de caractères ou à la fin de chaque ligne (précédant " "immédiatement chaque nouvelle ligne)." -#: howto/regex.rst:622 +#: howto/regex.rst:624 msgid "" "Makes the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline." @@ -1355,7 +1385,7 @@ msgstr "" "caractère, y compris le retour à la ligne ; sans cette option, ``'.'`` " "correspond avec tout, *sauf* le retour à la ligne." -#: howto/regex.rst:630 +#: howto/regex.rst:632 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\s`` and ``\\S`` perform ASCII-" "only matching instead of full Unicode matching. This is only meaningful for " @@ -1366,7 +1396,8 @@ msgstr "" "caractères Unicode. Cette option n'a de sens que pour des motifs Unicode, " "elle est ignorée pour les motifs *bytes*." -#: howto/regex.rst:639 +#: howto/regex.rst:641 +#, fuzzy msgid "" "This flag allows you to write regular expressions that are more readable by " "granting you more flexibility in how you can format them. When this flag " @@ -1374,7 +1405,7 @@ msgid "" "the whitespace is in a character class or preceded by an unescaped " "backslash; this lets you organize and indent the RE more clearly. This flag " "also lets you put comments within a RE that will be ignored by the engine; " -"comments are marked by a ``'#'`` that's neither in a character class or " +"comments are marked by a ``'#'`` that's neither in a character class nor " "preceded by an unescaped backslash." msgstr "" "Cette option vous permet d'écrire des expressions régulières plus lisibles " @@ -1387,7 +1418,7 @@ msgstr "" "commentaires commencent par un ``'#'`` qui n'est ni dans une classe de " "caractères, ni précédé d'une barre oblique inverse." -#: howto/regex.rst:648 +#: howto/regex.rst:650 msgid "" "For example, here's a RE that uses :const:`re.VERBOSE`; see how much easier " "it is to read? ::" @@ -1395,11 +1426,11 @@ msgstr "" "Par exemple, voici une RE qui utilise :const:`re.VERBOSE` ; vous pouvez " "constater qu'elle est beaucoup plus facile à lire ::" -#: howto/regex.rst:661 +#: howto/regex.rst:663 msgid "Without the verbose setting, the RE would look like this::" msgstr "Sans l'option verbeuse, cette RE ressemble à ceci ::" -#: howto/regex.rst:667 +#: howto/regex.rst:669 msgid "" "In the above example, Python's automatic concatenation of string literals " "has been used to break up the RE into smaller pieces, but it's still more " @@ -1410,11 +1441,12 @@ msgstr "" "morceaux, mais la RE reste plus difficile à comprendre que sa version " "utilisant :const:`re.VERBOSE`." -#: howto/regex.rst:673 -msgid "More Pattern Power" +#: howto/regex.rst:675 +#, fuzzy +msgid "More pattern power" msgstr "Des motifs plus puissants" -#: howto/regex.rst:675 +#: howto/regex.rst:677 msgid "" "So far we've only covered a part of the features of regular expressions. In " "this section, we'll cover some new metacharacters, and how to use groups to " @@ -1425,11 +1457,12 @@ msgstr "" "nouveaux métacaractères et l'utilisation des groupes pour récupérer des " "portions de textes correspondantes." -#: howto/regex.rst:683 -msgid "More Metacharacters" +#: howto/regex.rst:685 +#, fuzzy +msgid "More metacharacters" msgstr "Plus de métacaractères" -#: howto/regex.rst:685 +#: howto/regex.rst:687 msgid "" "There are some metacharacters that we haven't covered yet. Most of them " "will be covered in this section." @@ -1437,7 +1470,7 @@ msgstr "" "Nous n'avons pas encore couvert tous les métacaractères. Cette section " "traite de la plupart de ceux que nous n'avons pas abordés." -#: howto/regex.rst:688 +#: howto/regex.rst:690 msgid "" "Some of the remaining metacharacters to be discussed are :dfn:`zero-width " "assertions`. They don't cause the engine to advance through the string; " @@ -1458,11 +1491,11 @@ msgstr "" "correspondent à un endroit donné, elles correspondent automatiquement un " "nombre infini de fois." -#: howto/regex.rst:696 +#: howto/regex.rst:698 msgid "``|``" msgstr "``|``" -#: howto/regex.rst:697 +#: howto/regex.rst:699 msgid "" "Alternation, or the \"or\" operator. If *A* and *B* are regular " "expressions, ``A|B`` will match any string that matches either *A* or *B*. " @@ -1478,7 +1511,7 @@ msgstr "" "``'Crow'`` ou ``'Servo'``, mais pas avec ``'Cro'``, un ``'w'`` ou un " "``'S'``, ou encore ``'ervo'``." -#: howto/regex.rst:703 +#: howto/regex.rst:705 msgid "" "To match a literal ``'|'``, use ``\\|``, or enclose it inside a character " "class, as in ``[|]``." @@ -1486,23 +1519,23 @@ msgstr "" "Pour correspondre avec un ``'|'`` littéral, utilisez ``\\|`` ou placez-le " "dans une classe de caractères, comme ceci ``[|]``." -#: howto/regex.rst:706 +#: howto/regex.rst:708 msgid "``^``" msgstr "``^``" -#: howto/regex.rst:707 +#: howto/regex.rst:709 msgid "" "Matches at the beginning of lines. Unless the :const:`MULTILINE` flag has " -"been set, this will only match at the beginning of the string. In :const:" -"`MULTILINE` mode, this also matches immediately after each newline within " -"the string." +"been set, this will only match at the beginning of the string. " +"In :const:`MULTILINE` mode, this also matches immediately after each newline " +"within the string." msgstr "" "Correspond à un début de ligne. À moins que l'option :const:`MULTILINE` ne " "soit activée, cela ne fait correspondre que le début de la chaîne. Dans le " "mode :const:`MULTILINE`, cela fait aussi correspondre immédiatement après " "chaque nouvelle ligne à l'intérieur de la chaîne." -#: howto/regex.rst:711 +#: howto/regex.rst:713 msgid "" "For example, if you wish to match the word ``From`` only at the beginning of " "a line, the RE to use is ``^From``. ::" @@ -1510,15 +1543,15 @@ msgstr "" "Par exemple, si vous voulez trouver le mot ``From`` uniquement quand il est " "en début de ligne, la RE à utiliser est ``^From``. ::" -#: howto/regex.rst:719 +#: howto/regex.rst:721 msgid "To match a literal ``'^'``, use ``\\^``." msgstr "Pour trouver un ``'^'`` littéral, utilisez ``\\^``." -#: howto/regex.rst:721 +#: howto/regex.rst:723 msgid "``$``" msgstr "``$``" -#: howto/regex.rst:722 +#: howto/regex.rst:724 msgid "" "Matches at the end of a line, which is defined as either the end of the " "string, or any location followed by a newline character. ::" @@ -1526,7 +1559,7 @@ msgstr "" "Correspond à une fin de ligne, ce qui veut dire soit la fin de la chaîne, " "soit tout emplacement qui est suivi du caractère de nouvelle ligne. ::" -#: howto/regex.rst:732 +#: howto/regex.rst:734 msgid "" "To match a literal ``'$'``, use ``\\$`` or enclose it inside a character " "class, as in ``[$]``." @@ -1534,11 +1567,11 @@ msgstr "" "Pour trouver un ``'$'`` littéral, utilisez ``\\$`` ou placez-le à " "l'intérieur d'une classe de caractères, comme ceci ``[$]``." -#: howto/regex.rst:735 +#: howto/regex.rst:737 msgid "``\\A``" msgstr "``\\A``" -#: howto/regex.rst:736 +#: howto/regex.rst:738 msgid "" "Matches only at the start of the string. When not in :const:`MULTILINE` " "mode, ``\\A`` and ``^`` are effectively the same. In :const:`MULTILINE` " @@ -1546,26 +1579,34 @@ msgid "" "string, but ``^`` may match at any location inside the string that follows a " "newline character." msgstr "" -"Correspond au début de la chaîne de caractères, uniquement. Si l'option :" -"const:`MULTILINE` n'est pas activée, ``\\A`` et ``^`` sont équivalents. Dans " -"le mode :const:`MULTILINE`, ils sont différents : ``\\A`` ne correspond " -"toujours qu'au début de la chaîne alors que ``^`` correspond aussi aux " -"emplacements situés immédiatement après une nouvelle ligne à l'intérieur de " -"la chaîne." +"Correspond au début de la chaîne de caractères, uniquement. Si " +"l'option :const:`MULTILINE` n'est pas activée, ``\\A`` et ``^`` sont " +"équivalents. Dans le mode :const:`MULTILINE`, ils sont différents : ``\\A`` " +"ne correspond toujours qu'au début de la chaîne alors que ``^`` correspond " +"aussi aux emplacements situés immédiatement après une nouvelle ligne à " +"l'intérieur de la chaîne." -#: howto/regex.rst:741 -msgid "``\\Z``" -msgstr "``\\Z``" +#: howto/regex.rst:743 +msgid "``\\z``" +msgstr "" -#: howto/regex.rst:742 +#: howto/regex.rst:744 msgid "Matches only at the end of the string." msgstr "Correspond uniquement à la fin d'une chaîne de caractères." -#: howto/regex.rst:744 +#: howto/regex.rst:746 +msgid "``\\Z``" +msgstr "``\\Z``" + +#: howto/regex.rst:747 +msgid "The same as ``\\z``. For compatibility with old Python versions." +msgstr "" + +#: howto/regex.rst:749 msgid "``\\b``" msgstr "``\\b``" -#: howto/regex.rst:745 +#: howto/regex.rst:750 msgid "" "Word boundary. This is a zero-width assertion that matches only at the " "beginning or end of a word. A word is defined as a sequence of alphanumeric " @@ -1577,7 +1618,7 @@ msgstr "" "séquence de caractères alphanumériques ; ainsi, la fin d'un mot est indiquée " "par un « blanc » ou un caractère non-alphanumérique." -#: howto/regex.rst:750 +#: howto/regex.rst:755 msgid "" "The following example matches ``class`` only when it's a complete word; it " "won't match when it's contained inside another word. ::" @@ -1586,7 +1627,7 @@ msgstr "" "complet ; il n'y a pas de correspondance quand il est à l'intérieur d'un " "autre mot. ::" -#: howto/regex.rst:761 +#: howto/regex.rst:766 msgid "" "There are two subtleties you should remember when using this special " "sequence. First, this is the worst collision between Python's string " @@ -1606,7 +1647,7 @@ msgstr "" "ressemble à notre RE précédente, mais nous avons omis le ``'r'`` devant la " "chaîne RE. ::" -#: howto/regex.rst:775 +#: howto/regex.rst:780 msgid "" "Second, inside a character class, where there's no use for this assertion, " "``\\b`` represents the backspace character, for compatibility with Python's " @@ -1616,11 +1657,11 @@ msgstr "" "d'être, ``\\b`` représente le caractère retour-arrière, afin d'être " "compatible avec les littéraux de chaînes de caractères." -#: howto/regex.rst:779 +#: howto/regex.rst:784 msgid "``\\B``" msgstr "``\\B``" -#: howto/regex.rst:780 +#: howto/regex.rst:785 msgid "" "Another zero-width assertion, this is the opposite of ``\\b``, only matching " "when the current position is not at a word boundary." @@ -1629,11 +1670,11 @@ msgstr "" "dire qu'elle fait correspondre uniquement les emplacements qui ne sont pas à " "la limite d'un mot." -#: howto/regex.rst:785 +#: howto/regex.rst:790 msgid "Grouping" msgstr "Regroupement" -#: howto/regex.rst:787 +#: howto/regex.rst:792 msgid "" "Frequently you need to obtain more information than just whether the RE " "matched or not. Regular expressions are often used to dissect strings by " @@ -1649,7 +1690,7 @@ msgstr "" "diviser en un nom d'en-tête et une valeur associée, séparés par un ``':'``, " "comme ceci :" -#: howto/regex.rst:800 +#: howto/regex.rst:805 msgid "" "This can be handled by writing a regular expression which matches an entire " "header line, and has one group which matches the header name, and another " @@ -1659,7 +1700,7 @@ msgstr "" "ligne d'en-tête entière et qui comporte un groupe correspondant au nom de " "l'en-tête, et un autre groupe correspondant à la valeur de l'en-tête." -#: howto/regex.rst:804 +#: howto/regex.rst:809 msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " @@ -1675,28 +1716,29 @@ msgstr "" "quantificateur, comme ``*``, ``+``, ``?`` ou ``{m,n}``. Par exemple, " "``(ab)*`` correspond à zéro, une ou plusieurs fois ``ab``. ::" -#: howto/regex.rst:815 +#: howto/regex.rst:820 msgid "" "Groups indicated with ``'('``, ``')'`` also capture the starting and ending " "index of the text that they match; this can be retrieved by passing an " -"argument to :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re." -"Match.end`, and :meth:`~re.Match.span`. Groups are numbered starting with " -"0. Group 0 is always present; it's the whole RE, so :ref:`match object " -"` methods all have group 0 as their default argument. Later " -"we'll see how to express groups that don't capture the span of text that " -"they match. ::" +"argument " +"to :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re.Match.end`, " +"and :meth:`~re.Match.span`. Groups are numbered starting with 0. Group 0 " +"is always present; it's the whole RE, so :ref:`match object ` " +"methods all have group 0 as their default argument. Later we'll see how to " +"express groups that don't capture the span of text that they match. ::" msgstr "" "Les groupes délimités par ``'('`` et ``')'`` capturent également les indices " "de début et de fin du texte avec lequel ils correspondent ; ces indices " -"peuvent être récupérés en passant un argument à :meth:`~re.Match.group`, :" -"meth:`~re.Match.start`, :meth:`~re.Match.end` ou :meth:`~re.Match.span`. Les " -"groupes sont numérotés à partir de 0, le groupe 0 étant toujours présent ; " -"c'est l'ensemble de la RE, donc les méthodes de l'\\ :ref:`objet " -"correspondance ` ont le groupe 0 comme argument par défaut. " -"Plus loin, nous voyons comment exprimer les groupes qui ne capturent pas " -"l'étendue du texte avec lequel ils correspondent. ::" +"peuvent être récupérés en passant un argument " +"à :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re.Match.end` " +"ou :meth:`~re.Match.span`. Les groupes sont numérotés à partir de 0, le " +"groupe 0 étant toujours présent ; c'est l'ensemble de la RE, donc les " +"méthodes de l'\\ :ref:`objet correspondance ` ont le groupe 0 " +"comme argument par défaut. Plus loin, nous voyons comment exprimer les " +"groupes qui ne capturent pas l'étendue du texte avec lequel ils " +"correspondent. ::" -#: howto/regex.rst:831 +#: howto/regex.rst:836 msgid "" "Subgroups are numbered from left to right, from 1 upward. Groups can be " "nested; to determine the number, just count the opening parenthesis " @@ -1707,7 +1749,7 @@ msgstr "" "suffit de compter le nombre de parenthèses ouvrantes de la gauche vers la " "droite. ::" -#: howto/regex.rst:844 +#: howto/regex.rst:849 msgid "" ":meth:`~re.Match.group` can be passed multiple group numbers at a time, in " "which case it will return a tuple containing the corresponding values for " @@ -1717,7 +1759,7 @@ msgstr "" "même temps, elle vous renvoie alors un *n*-uplet contenant les valeurs " "correspondantes pour ces groupes. ::" -#: howto/regex.rst:850 +#: howto/regex.rst:855 msgid "" "The :meth:`~re.Match.groups` method returns a tuple containing the strings " "for all the subgroups, from 1 up to however many there are. ::" @@ -1726,7 +1768,7 @@ msgstr "" "chaînes pour tous les sous-groupes, en commençant par le numéro 1 jusqu'au " "dernier. ::" -#: howto/regex.rst:856 +#: howto/regex.rst:861 msgid "" "Backreferences in a pattern allow you to specify that the contents of an " "earlier capturing group must also be found at the current location in the " @@ -1744,12 +1786,12 @@ msgstr "" "d'un nombre pour insérer des caractères arbitraires dans une chaîne ; soyez " "sûr d'utiliser une chaîne brute quand vous faites des renvois dans une RE." -#: howto/regex.rst:864 +#: howto/regex.rst:869 msgid "For example, the following RE detects doubled words in a string. ::" msgstr "" "Par exemple, la RE suivante détecte les mots doublés dans une chaîne. ::" -#: howto/regex.rst:870 +#: howto/regex.rst:875 msgid "" "Backreferences like this aren't often useful for just searching through a " "string --- there are few text formats which repeat data in this way --- but " @@ -1761,11 +1803,12 @@ msgstr "" "répètent des données ainsi — mais vous verrez bientôt qu'ils sont *très* " "utiles pour effectuer des substitutions dans les chaînes." -#: howto/regex.rst:876 -msgid "Non-capturing and Named Groups" +#: howto/regex.rst:881 +#, fuzzy +msgid "Non-capturing and named groups" msgstr "Groupes non de capture et groupes nommés" -#: howto/regex.rst:878 +#: howto/regex.rst:883 msgid "" "Elaborate REs may use many groups, both to capture substrings of interest, " "and to group and structure the RE itself. In complex REs, it becomes " @@ -1781,7 +1824,7 @@ msgstr "" "expressions régulières. Nous allons donc commencer en examinant cette " "syntaxe." -#: howto/regex.rst:884 +#: howto/regex.rst:889 msgid "" "Perl 5 is well known for its powerful additions to standard regular " "expressions. For these new features the Perl developers couldn't choose new " @@ -1800,7 +1843,7 @@ msgstr "" "auraient considéré que ``&`` était un caractère standard et ne l'aurait pas " "échappé en écrivant ``\\&`` ou ``[&]``." -#: howto/regex.rst:891 +#: howto/regex.rst:896 msgid "" "The solution chosen by the Perl developers was to use ``(?...)`` as the " "extension syntax. ``?`` immediately after a parenthesis was a syntax error " @@ -1815,10 +1858,11 @@ msgstr "" "était une erreur de syntaxe, parce que le ``?`` n'a alors rien à répéter. " "Ainsi, cela n'a pas introduit de problème de compatibilité. Les caractères " "qui suivent immédiatement le ``?`` indiquent quelle extension est utilisée, " -"donc ``(?=truc)`` est une chose (une assertion positive anticipée) et ``(?:" -"truc)`` est une autre chose (la sous-expression ``truc`` que l'on groupe)." +"donc ``(?=truc)`` est une chose (une assertion positive anticipée) et " +"``(?:truc)`` est une autre chose (la sous-expression ``truc`` que l'on " +"groupe)." -#: howto/regex.rst:899 +#: howto/regex.rst:904 msgid "" "Python supports several of Perl's extensions and adds an extension syntax to " "Perl's extension syntax. If the first character after the question mark is " @@ -1829,7 +1873,7 @@ msgstr "" "d'interrogation est ``P``, cela signifie que c'est une extension spécifique " "à Python." -#: howto/regex.rst:904 +#: howto/regex.rst:909 msgid "" "Now that we've looked at the general extension syntax, we can return to the " "features that simplify working with groups in complex REs." @@ -1838,7 +1882,7 @@ msgstr "" "aux fonctionnalités qui simplifient le travail avec les groupes dans des RE " "complexes." -#: howto/regex.rst:907 +#: howto/regex.rst:912 msgid "" "Sometimes you'll want to use a group to denote a part of a regular " "expression, but aren't interested in retrieving the group's contents. You " @@ -1852,7 +1896,7 @@ msgstr "" "``(?:...)``, où vous remplacez les ``...`` par n'importe quelle expression " "régulière. ::" -#: howto/regex.rst:919 +#: howto/regex.rst:924 msgid "" "Except for the fact that you can't retrieve the contents of what the group " "matched, a non-capturing group behaves exactly the same as a capturing " @@ -1874,7 +1918,7 @@ msgstr "" "qu'il n'y a aucune différence de performance dans la recherche de groupes, " "de capture ou non ; les deux formes travaillent à la même vitesse." -#: howto/regex.rst:928 +#: howto/regex.rst:933 msgid "" "A more significant feature is named groups: instead of referring to them by " "numbers, groups can be referenced by a name." @@ -1883,7 +1927,7 @@ msgstr "" "faire référence par des nombres, vous pouvez référencer des groupes par leur " "nom." -#: howto/regex.rst:931 +#: howto/regex.rst:936 msgid "" "The syntax for a named group is one of the Python-specific extensions: ``(?" "P...)``. *name* is, obviously, the name of the group. Named groups " @@ -1897,31 +1941,31 @@ msgstr "" "La syntaxe pour nommer les groupes est l'une des extensions spécifiques à " "Python : ``(?P....)``. *nom* est, vous vous en doutez, le nom du " "groupe. Les groupes nommés se comportent exactement comme des groupes de " -"capture, sauf qu'ils associent en plus un nom à un groupe. Les méthodes des :" -"ref:`objets correspondances ` qui gèrent les groupes de " +"capture, sauf qu'ils associent en plus un nom à un groupe. Les méthodes " +"des :ref:`objets correspondances ` qui gèrent les groupes de " "capture acceptent soit des entiers qui font référence aux numéros des " "groupes, soit des chaînes de caractères qui désignent les noms des groupes " "désirés. Les groupes nommés se voient toujours attribuer un numéro, vous " "pouvez ainsi récupérer les informations d'un groupe de deux façons ::" -#: howto/regex.rst:946 +#: howto/regex.rst:951 msgid "" -"Additionally, you can retrieve named groups as a dictionary with :meth:`~re." -"Match.groupdict`::" +"Additionally, you can retrieve named groups as a dictionary " +"with :meth:`~re.Match.groupdict`::" msgstr "" -"De plus, vous pouvez récupérer les groupes nommés comme dictionnaire avec :" -"meth:`~re.Match.groupdict` ::" +"De plus, vous pouvez récupérer les groupes nommés comme dictionnaire " +"avec :meth:`~re.Match.groupdict` ::" -#: howto/regex.rst:953 +#: howto/regex.rst:958 msgid "" "Named groups are handy because they let you use easily remembered names, " -"instead of having to remember numbers. Here's an example RE from the :mod:" -"`imaplib` module::" +"instead of having to remember numbers. Here's an example RE from " +"the :mod:`imaplib` module::" msgstr "" "Les groupes nommés sont pratiques car il est plus facile de se rappeler un " "nom qu'un numéro. Voici un exemple de RE tirée du module :mod:`imaplib` ::" -#: howto/regex.rst:964 +#: howto/regex.rst:969 msgid "" "It's obviously much easier to retrieve ``m.group('zonem')``, instead of " "having to remember to retrieve group 9." @@ -1929,15 +1973,15 @@ msgstr "" "Il est évidemment plus facile de récupérer ``m.group('zonem')`` que de se " "rappeler de récupérer le groupe 9." -#: howto/regex.rst:967 +#: howto/regex.rst:972 msgid "" "The syntax for backreferences in an expression such as ``(...)\\1`` refers " "to the number of the group. There's naturally a variant that uses the group " "name instead of the number. This is another Python extension: ``(?P=name)`` " "indicates that the contents of the group called *name* should again be " "matched at the current point. The regular expression for finding doubled " -"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?" -"P\\w+)\\s+(?P=word)\\b``::" +"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?P\\w+)\\s+" +"(?P=word)\\b``::" msgstr "" "La syntaxe des renvois dans une expression telle que ``(....)\\1`` fait " "référence au numéro du groupe. Il y a naturellement une variante qui utilise " @@ -1947,11 +1991,12 @@ msgstr "" "mots doublés, ``\\b(\\w+)\\s+\\1\\b`` peut ainsi être ré-écrite en ``\\b(?" "P\\w+)\\s+(?P=mot)\\b`` ::" -#: howto/regex.rst:980 -msgid "Lookahead Assertions" +#: howto/regex.rst:985 +#, fuzzy +msgid "Lookahead assertions" msgstr "Assertions prédictives" -#: howto/regex.rst:982 +#: howto/regex.rst:987 msgid "" "Another zero-width assertion is the lookahead assertion. Lookahead " "assertions are available in both positive and negative form, and look like " @@ -1961,11 +2006,11 @@ msgstr "" "assertion prédictive peut s'exprimer sous deux formes, la positive et la " "négative, comme ceci :" -#: howto/regex.rst:985 +#: howto/regex.rst:990 msgid "``(?=...)``" msgstr "``(?=...)``" -#: howto/regex.rst:986 +#: howto/regex.rst:991 msgid "" "Positive lookahead assertion. This succeeds if the contained regular " "expression, represented here by ``...``, successfully matches at the current " @@ -1980,11 +2025,11 @@ msgstr "" "n'avance pas ; le reste du motif est testé à l'endroit même où l'assertion a " "commencé." -#: howto/regex.rst:992 +#: howto/regex.rst:997 msgid "``(?!...)``" msgstr "``(?!...)``" -#: howto/regex.rst:993 +#: howto/regex.rst:998 msgid "" "Negative lookahead assertion. This is the opposite of the positive " "assertion; it succeeds if the contained expression *doesn't* match at the " @@ -1994,7 +2039,7 @@ msgstr "" "elle réussit si l'expression régulière contenue *ne* correspond *pas* à " "l'emplacement courant dans la chaîne." -#: howto/regex.rst:997 +#: howto/regex.rst:1002 msgid "" "To make this concrete, let's look at a case where a lookahead is useful. " "Consider a simple pattern to match a filename and split it apart into a base " @@ -2007,15 +2052,15 @@ msgstr "" "exemple, dans ``news.rc``, ``news`` est le nom de base et ``rc`` est " "l'extension du nom de fichier." -#: howto/regex.rst:1002 +#: howto/regex.rst:1007 msgid "The pattern to match this is quite simple:" msgstr "Le motif de correspondance est plutôt simple :" -#: howto/regex.rst:1004 +#: howto/regex.rst:1009 msgid "``.*[.].*$``" msgstr "``.*[.].*$``" -#: howto/regex.rst:1006 +#: howto/regex.rst:1011 msgid "" "Notice that the ``.`` needs to be treated specially because it's a " "metacharacter, so it's inside a character class to only match that specific " @@ -2031,7 +2076,7 @@ msgstr "" "bien inclus dans l'extension. Cette expression régulière fait correspondre " "``truc.bar``, ``autoexec.bat``, ``sendmail.cf`` et ``printers.conf``." -#: howto/regex.rst:1013 +#: howto/regex.rst:1018 msgid "" "Now, consider complicating the problem a bit; what if you want to match " "filenames where the extension is not ``bat``? Some incorrect attempts:" @@ -2040,29 +2085,35 @@ msgstr "" "correspondre les noms de fichiers dont l'extension n'est pas ``bat`` ? voici " "quelques tentatives incorrectes :" -#: howto/regex.rst:1016 +#: howto/regex.rst:1021 +#, fuzzy +msgid "``.*[.][^b].*$``" +msgstr "``.*[.].*$``" + +#: howto/regex.rst:1023 +#, fuzzy msgid "" -"``.*[.][^b].*$`` The first attempt above tries to exclude ``bat`` by " -"requiring that the first character of the extension is not a ``b``. This is " -"wrong, because the pattern also doesn't match ``foo.bar``." +"The first attempt above tries to exclude ``bat`` by requiring that the first " +"character of the extension is not a ``b``. This is wrong, because the " +"pattern also doesn't match ``foo.bar``." msgstr "" "``.*[.][^b].*$`` Le premier essai ci-dessus tente d'exclure ``bat`` en " "spécifiant que le premier caractère de l'extension ne doit pas être ``b``. " "Cela ne fonctionne pas, car le motif n'accepte pas ``truc.bar``." -#: howto/regex.rst:1020 +#: howto/regex.rst:1027 msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" msgstr "``.*[.]([^b]..|.[^a].|..[^t])$``" -#: howto/regex.rst:1022 +#: howto/regex.rst:1029 msgid "" "The expression gets messier when you try to patch up the first solution by " "requiring one of the following cases to match: the first character of the " "extension isn't ``b``; the second character isn't ``a``; or the third " -"character isn't ``t``. This accepts ``foo.bar`` and rejects ``autoexec." -"bat``, but it requires a three-letter extension and won't accept a filename " -"with a two-letter extension such as ``sendmail.cf``. We'll complicate the " -"pattern again in an effort to fix it." +"character isn't ``t``. This accepts ``foo.bar`` and rejects " +"``autoexec.bat``, but it requires a three-letter extension and won't accept " +"a filename with a two-letter extension such as ``sendmail.cf``. We'll " +"complicate the pattern again in an effort to fix it." msgstr "" "L'expression devient plus confuse si nous essayons de réparer la première " "solution en spécifiant l'un des cas suivants : le premier caractère de " @@ -2073,11 +2124,11 @@ msgstr "" "``sendmail.cf``. Compliquons encore une fois le motif pour essayer de le " "réparer." -#: howto/regex.rst:1030 +#: howto/regex.rst:1037 msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" -#: howto/regex.rst:1032 +#: howto/regex.rst:1039 msgid "" "In the third attempt, the second and third letters are all made optional in " "order to allow matching extensions shorter than three characters, such as " @@ -2087,7 +2138,7 @@ msgstr "" "devenues facultatives afin de permettre la correspondance avec des " "extensions plus courtes que trois caractères, comme ``sendmail.cf``." -#: howto/regex.rst:1036 +#: howto/regex.rst:1043 msgid "" "The pattern's getting really complicated now, which makes it hard to read " "and understand. Worse, if the problem changes and you want to exclude both " @@ -2099,18 +2150,24 @@ msgstr "" "à la fois ``bat`` et ``exe`` en tant qu'extensions, le modèle deviendra " "encore plus compliqué et confus." -#: howto/regex.rst:1041 +#: howto/regex.rst:1048 msgid "A negative lookahead cuts through all this confusion:" msgstr "Une assertion prédictive négative supprime toute cette confusion :" -#: howto/regex.rst:1043 +#: howto/regex.rst:1050 +#, fuzzy +msgid "``.*[.](?!bat$)[^.]*$``" +msgstr "``.*[.](?!bat$|exe$)[^.]*$``" + +#: howto/regex.rst:1052 +#, fuzzy msgid "" -"``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression " -"``bat`` doesn't match at this point, try the rest of the pattern; if " -"``bat$`` does match, the whole pattern will fail. The trailing ``$`` is " -"required to ensure that something like ``sample.batch``, where the extension " -"only starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that " -"the pattern works when there are multiple dots in the filename." +"The negative lookahead means: if the expression ``bat`` doesn't match at " +"this point, try the rest of the pattern; if ``bat$`` does match, the whole " +"pattern will fail. The trailing ``$`` is required to ensure that something " +"like ``sample.batch``, where the extension only starts with ``bat``, will be " +"allowed. The ``[^.]*`` makes sure that the pattern works when there are " +"multiple dots in the filename." msgstr "" "``.*[.](?!bat$)[^.]*$`` Cette assertion prédictive négative signifie : si " "l'expression ``bat`` ne correspond pas à cet emplacement, essaie le reste du " @@ -2120,7 +2177,7 @@ msgstr "" "``[^...]*`` s'assure que le motif fonctionne lorsqu'il y a plusieurs points " "dans le nom de fichier." -#: howto/regex.rst:1050 +#: howto/regex.rst:1059 msgid "" "Excluding another filename extension is now easy; simply add it as an " "alternative inside the assertion. The following pattern excludes filenames " @@ -2130,15 +2187,16 @@ msgstr "" "suffit de l'ajouter comme alternative à l'intérieur de l'assertion. Le motif " "suivant exclut les noms de fichiers qui se terminent par ``bat`` ou ``exe`` :" -#: howto/regex.rst:1054 +#: howto/regex.rst:1063 msgid "``.*[.](?!bat$|exe$)[^.]*$``" msgstr "``.*[.](?!bat$|exe$)[^.]*$``" -#: howto/regex.rst:1058 -msgid "Modifying Strings" +#: howto/regex.rst:1067 +#, fuzzy +msgid "Modifying strings" msgstr "Modification de chaînes" -#: howto/regex.rst:1060 +#: howto/regex.rst:1069 msgid "" "Up to this point, we've simply performed searches against a static string. " "Regular expressions are also commonly used to modify strings in various " @@ -2149,21 +2207,21 @@ msgstr "" "pour modifier les chaînes de caractères de diverses manières, en utilisant " "les méthodes suivantes des motifs :" -#: howto/regex.rst:1067 +#: howto/regex.rst:1076 msgid "``split()``" msgstr "``split()``" -#: howto/regex.rst:1067 +#: howto/regex.rst:1076 msgid "Split the string into a list, splitting it wherever the RE matches" msgstr "" "Découpe la chaîne de caractère en liste, la découpant partout où la RE " "correspond" -#: howto/regex.rst:1070 +#: howto/regex.rst:1079 msgid "``sub()``" msgstr "``sub()``" -#: howto/regex.rst:1070 +#: howto/regex.rst:1079 msgid "" "Find all substrings where the RE matches, and replace them with a different " "string" @@ -2171,11 +2229,11 @@ msgstr "" "Recherche toutes les sous-chaînes de caractères où la RE correspond et les " "substitue par une chaîne de caractères différente" -#: howto/regex.rst:1073 +#: howto/regex.rst:1082 msgid "``subn()``" msgstr "``subn()``" -#: howto/regex.rst:1073 +#: howto/regex.rst:1082 msgid "" "Does the same thing as :meth:`!sub`, but returns the new string and the " "number of replacements" @@ -2183,11 +2241,12 @@ msgstr "" "Fait la même chose que :meth:`!sub`, mais renvoie la nouvelle chaîne et le " "nombre de remplacements effectués" -#: howto/regex.rst:1080 -msgid "Splitting Strings" +#: howto/regex.rst:1089 +#, fuzzy +msgid "Splitting strings" msgstr "Découpage de chaînes" -#: howto/regex.rst:1082 +#: howto/regex.rst:1091 msgid "" "The :meth:`~re.Pattern.split` method of a pattern splits a string apart " "wherever the RE matches, returning a list of the pieces. It's similar to " @@ -2199,12 +2258,12 @@ msgstr "" "La méthode :meth:`~re.Pattern.Pattern.split` d'un motif divise une chaîne de " "caractères à chaque fois que la RE correspond, retournant la liste des " "morceaux. C'est similaire à la méthode :meth:`~str.split` mais est beaucoup " -"plus générale par les délimiteurs que vous pouvez spécifier ; la méthode :" -"meth:`!split` du type *string* ne gère que les découpages en suivant les " -"« blancs » ou suivant une chaîne définie. Comme vous pouvez vous y attendre, " -"il y a aussi une fonction :func:`re.split` de niveau module." +"plus générale par les délimiteurs que vous pouvez spécifier ; la " +"méthode :meth:`!split` du type *string* ne gère que les découpages en " +"suivant les « blancs » ou suivant une chaîne définie. Comme vous pouvez vous " +"y attendre, il y a aussi une fonction :func:`re.split` de niveau module." -#: howto/regex.rst:1093 +#: howto/regex.rst:1102 msgid "" "Split *string* by the matches of the regular expression. If capturing " "parentheses are used in the RE, then their contents will also be returned as " @@ -2216,7 +2275,7 @@ msgstr "" "également renvoyé dans la liste résultante. Si *maxsplit* n'est pas nul, au " "plus *maxsplit* découpages sont effectués." -#: howto/regex.rst:1098 +#: howto/regex.rst:1107 msgid "" "You can limit the number of splits made, by passing a value for *maxsplit*. " "When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the " @@ -2230,7 +2289,7 @@ msgstr "" "élément de la liste. Dans l'exemple suivant, le délimiteur est toute " "séquence de caractères non alphanumériques. ::" -#: howto/regex.rst:1110 +#: howto/regex.rst:1119 msgid "" "Sometimes you're not only interested in what the text between delimiters is, " "but also need to know what the delimiter was. If capturing parentheses are " @@ -2242,7 +2301,7 @@ msgstr "" "la RE, leurs valeurs sont également renvoyées dans la liste. Comparons les " "appels suivants ::" -#: howto/regex.rst:1122 +#: howto/regex.rst:1131 msgid "" "The module-level function :func:`re.split` adds the RE to be used as the " "first argument, but is otherwise the same. ::" @@ -2250,11 +2309,12 @@ msgstr "" "La fonction de niveau module :func:`re.split` ajoute la RE à utiliser comme " "premier argument, mais est par ailleurs identique. ::" -#: howto/regex.rst:1134 -msgid "Search and Replace" +#: howto/regex.rst:1143 +#, fuzzy +msgid "Search and replace" msgstr "Recherche et substitution" -#: howto/regex.rst:1136 +#: howto/regex.rst:1145 msgid "" "Another common task is to find all the matches for a pattern, and replace " "them with a different string. The :meth:`~re.Pattern.sub` method takes a " @@ -2262,11 +2322,11 @@ msgid "" "string to be processed." msgstr "" "Une autre tâche classique est de trouver toutes les correspondances d'un " -"motif et de les remplacer par une autre chaîne. La méthode :meth:`~re." -"Pattern.sub` prend une valeur de substitution, qui peut être une chaîne de " -"caractères ou une fonction, et la chaîne à traiter." +"motif et de les remplacer par une autre chaîne. La " +"méthode :meth:`~re.Pattern.sub` prend une valeur de substitution, qui peut " +"être une chaîne de caractères ou une fonction, et la chaîne à traiter." -#: howto/regex.rst:1143 +#: howto/regex.rst:1152 msgid "" "Returns the string obtained by replacing the leftmost non-overlapping " "occurrences of the RE in *string* by the replacement *replacement*. If the " @@ -2276,7 +2336,7 @@ msgstr "" "les plus à gauche de la RE dans *string* par la substitution *replacement*. " "Si le motif n'est pas trouvé, *string* est renvoyée inchangée." -#: howto/regex.rst:1147 +#: howto/regex.rst:1156 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. The default value " @@ -2286,7 +2346,7 @@ msgstr "" "remplacer ; *count* doit être un entier positif ou nul. La valeur par défaut " "de 0 signifie qu'il faut remplacer toutes les occurrences." -#: howto/regex.rst:1151 +#: howto/regex.rst:1160 msgid "" "Here's a simple example of using the :meth:`~re.Pattern.sub` method. It " "replaces colour names with the word ``colour``::" @@ -2294,7 +2354,7 @@ msgstr "" "Voici un exemple simple utilisant la méthode :meth:`~re.Pattern.sub`. Nous " "remplaçons les noms des couleurs par le mot ``colour`` ::" -#: howto/regex.rst:1160 +#: howto/regex.rst:1169 msgid "" "The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-" "tuple containing the new string value and the number of replacements that " @@ -2304,7 +2364,7 @@ msgstr "" "couple contenant la nouvelle valeur de la chaîne de caractères et le nombre " "de remplacements effectués ::" -#: howto/regex.rst:1169 +#: howto/regex.rst:1178 msgid "" "Empty matches are replaced only when they're not adjacent to a previous " "empty match. ::" @@ -2312,7 +2372,7 @@ msgstr "" "Les correspondances vides ne sont remplacées que lorsqu'elles ne sont pas " "adjacentes à une correspondance vide précédente. ::" -#: howto/regex.rst:1176 +#: howto/regex.rst:1185 msgid "" "If *replacement* is a string, any backslash escapes in it are processed. " "That is, ``\\n`` is converted to a single newline character, ``\\r`` is " @@ -2330,7 +2390,7 @@ msgstr "" "correspondante au groupe dans le RE. Ceci vous permet d'incorporer des " "parties du texte original dans la chaîne de remplacement résultante." -#: howto/regex.rst:1183 +#: howto/regex.rst:1192 msgid "" "This example matches the word ``section`` followed by a string enclosed in " "``{``, ``}``, and changes ``section`` to ``subsection``::" @@ -2338,7 +2398,7 @@ msgstr "" "Cet exemple fait correspondre le mot ``section`` suivi par une chaîne " "encadrée par ``{`` et ``}``, et modifie ``section`` en ``subsection`` ::" -#: howto/regex.rst:1190 +#: howto/regex.rst:1199 msgid "" "There's also a syntax for referring to named groups as defined by the ``(?" "P...)`` syntax. ``\\g`` will use the substring matched by the " @@ -2359,7 +2419,7 @@ msgstr "" "substitutions suivantes sont toutes équivalentes mais utilisent les trois " "variantes de la chaîne de remplacement. ::" -#: howto/regex.rst:1207 +#: howto/regex.rst:1216 msgid "" "*replacement* can also be a function, which gives you even more control. If " "*replacement* is a function, the function is called for every non-" @@ -2374,7 +2434,7 @@ msgstr "" "fonction, qui peut utiliser cette information pour calculer la chaîne de " "remplacement désirée et la renvoyer." -#: howto/regex.rst:1213 +#: howto/regex.rst:1222 msgid "" "In the following example, the replacement function translates decimals into " "hexadecimal::" @@ -2382,7 +2442,7 @@ msgstr "" "Dans l'exemple suivant, la fonction de substitution convertit un nombre " "décimal en hexadécimal ::" -#: howto/regex.rst:1225 +#: howto/regex.rst:1234 msgid "" "When using the module-level :func:`re.sub` function, the pattern is passed " "as the first argument. The pattern may be provided as an object or as a " @@ -2399,11 +2459,12 @@ msgstr "" "chaîne de caractères, par exemple ``sub(\"(?i)b+\", \"x\", \"bbbb BBBBB\")`` " "renvoie ``'x x'``." -#: howto/regex.rst:1233 -msgid "Common Problems" +#: howto/regex.rst:1242 +#, fuzzy +msgid "Common problems" msgstr "Problèmes classiques" -#: howto/regex.rst:1235 +#: howto/regex.rst:1244 msgid "" "Regular expressions are a powerful tool for some applications, but in some " "ways their behaviour isn't intuitive and at times they don't behave the way " @@ -2415,31 +2476,33 @@ msgstr "" "et, parfois, elles ne se comportent pas comme vous pouvez vous y attendre. " "Cette section met en évidence certains des pièges les plus courants." -#: howto/regex.rst:1241 -msgid "Use String Methods" +#: howto/regex.rst:1250 +#, fuzzy +msgid "Use string methods" msgstr "Utilisez les méthodes du type *string*" -#: howto/regex.rst:1243 +#: howto/regex.rst:1252 msgid "" "Sometimes using the :mod:`re` module is a mistake. If you're matching a " -"fixed string, or a single character class, and you're not using any :mod:" -"`re` features such as the :const:`~re.IGNORECASE` flag, then the full power " -"of regular expressions may not be required. Strings have several methods for " -"performing operations with fixed strings and they're usually much faster, " -"because the implementation is a single small C loop that's been optimized " -"for the purpose, instead of the large, more generalized regular expression " -"engine." +"fixed string, or a single character class, and you're not using " +"any :mod:`re` features such as the :const:`~re.IGNORECASE` flag, then the " +"full power of regular expressions may not be required. Strings have several " +"methods for performing operations with fixed strings and they're usually " +"much faster, because the implementation is a single small C loop that's been " +"optimized for the purpose, instead of the large, more generalized regular " +"expression engine." msgstr "" "Parfois, il ne faut pas utiliser le module :mod:`re`. Si vous faites " "correspondre une chaîne fixe, ou une classe à un seul caractère, et que vous " -"n'utilisez pas les fonctionnalités de :mod:`re` telles que l'option :const:" -"`~re.IGNORECASE`, alors la puissance des expressions régulières n'est pas " -"nécessaire. Les chaînes de caractères ont plusieurs méthodes pour opérer sur " -"des chaînes fixes et elles sont généralement beaucoup plus rapides, parce " -"que l'implémentation est une seule petite boucle C qui a été optimisée, au " -"lieu du gros moteur d'expressions régulières plus généraliste." +"n'utilisez pas les fonctionnalités de :mod:`re` telles que " +"l'option :const:`~re.IGNORECASE`, alors la puissance des expressions " +"régulières n'est pas nécessaire. Les chaînes de caractères ont plusieurs " +"méthodes pour opérer sur des chaînes fixes et elles sont généralement " +"beaucoup plus rapides, parce que l'implémentation est une seule petite " +"boucle C qui a été optimisée, au lieu du gros moteur d'expressions " +"régulières plus généraliste." -#: howto/regex.rst:1251 +#: howto/regex.rst:1260 msgid "" "One example might be replacing a single fixed string with another one; for " "example, you might replace ``word`` with ``deed``. :func:`re.sub` seems " @@ -2448,8 +2511,8 @@ msgid "" "turning ``swordfish`` into ``sdeedfish``, but the naive RE ``word`` would " "have done that, too. (To avoid performing the substitution on parts of " "words, the pattern would have to be ``\\bword\\b``, in order to require that " -"``word`` have a word boundary on either side. This takes the job beyond :" -"meth:`!replace`'s abilities.)" +"``word`` have a word boundary on either side. This takes the job " +"beyond :meth:`!replace`'s abilities.)" msgstr "" "Nous pouvons prendre l'exemple du remplacement d'une seule chaîne fixe par " "une autre ; vous souhaitez remplacer ``mot`` par ``acte``. :func:`re.sub` " @@ -2458,10 +2521,10 @@ msgstr "" "transformant ``moteur`` en ``acteeur``, mais la RE naïve ``mot`` aurait " "aussi fait cela (pour éviter d'effectuer la substitution sur des parties de " "mots, le motif doit être ``\\bmot\\b``, qui exige que ``mot`` soit en limite " -"de mot d'un côté et de l'autre ; c'est au-delà des capacités de la méthode :" -"meth:`!replace`)." +"de mot d'un côté et de l'autre ; c'est au-delà des capacités de la " +"méthode :meth:`!replace`)." -#: howto/regex.rst:1260 +#: howto/regex.rst:1269 msgid "" "Another common task is deleting every occurrence of a single character from " "a string or replacing it with another single character. You might do this " @@ -2471,11 +2534,11 @@ msgid "" msgstr "" "Une autre tâche classique est de supprimer chaque occurrence d'un seul " "caractère d'une chaîne de caractères ou de le remplacer par un autre " -"caractère unique. Vous pouvez le faire avec quelque chose comme ``re." -"sub('\\n', ' ', S)``, mais :meth:`~str.translate` en est capable et est plus " -"rapide que n'importe quelle opération d'expression régulière." +"caractère unique. Vous pouvez le faire avec quelque chose comme " +"``re.sub('\\n', ' ', S)``, mais :meth:`~str.translate` en est capable et est " +"plus rapide que n'importe quelle opération d'expression régulière." -#: howto/regex.rst:1266 +#: howto/regex.rst:1275 msgid "" "In short, before turning to the :mod:`re` module, consider whether your " "problem can be solved with a faster and simpler string method." @@ -2483,71 +2546,48 @@ msgstr "" "Bref, avant de passer au module :mod:`re`, évaluez d'abord si votre problème " "peut être résolu avec une méthode de chaîne plus rapide et plus simple." -#: howto/regex.rst:1271 -msgid "match() versus search()" +#: howto/regex.rst:1282 +#, fuzzy +msgid "prefixmatch() (aka match) versus search()" msgstr "*match()* contre *search()*" -#: howto/regex.rst:1273 +#: howto/regex.rst:1284 msgid "" -"The :func:`~re.match` function only checks if the RE matches at the " -"beginning of the string while :func:`~re.search` will scan forward through " -"the string for a match. It's important to keep this distinction in mind. " -"Remember, :func:`!match` will only report a successful match which will " -"start at 0; if the match wouldn't start at zero, :func:`!match` will *not* " -"report it. ::" +":func:`~re.prefixmatch` was added in Python 3.15 as the :ref:`preferred name " +"` for :func:`~re.match`. Before this, it was only " +"known as :func:`!match` and the distinction with :func:`~re.search` was " +"often misunderstood." msgstr "" -"La fonction :func:`~re.match` vérifie seulement si la RE correspond au début " -"de la chaîne de caractères tandis que :func:`~re.search` parcourt la chaîne " -"de caractères pour trouver une correspondance. Il est important de garder " -"cette distinction à l'esprit. Rappelez-vous, :func:`!match` ne trouve qu'une " -"correspondance qui commence à 0 ; si la correspondance commence plus loin, :" -"func:`!match` *ne la trouve pas*. ::" -#: howto/regex.rst:1284 +#: howto/regex.rst:1289 +msgid "" +":func:`!prefixmatch` aka :func:`!match` only checks if the RE matches at the " +"beginning of the string while :func:`!search` scans forward through the " +"string for a match. ::" +msgstr "" + +#: howto/regex.rst:1298 +#, fuzzy msgid "" -"On the other hand, :func:`~re.search` will scan forward through the string, " +"On the other hand, :func:`~re.search` scans forward through the string, " "reporting the first match it finds. ::" msgstr "" "D'un autre côté, :func:`~re.search` balaie la chaîne de caractères, " "rapportant la première correspondance qu'elle trouve. ::" -#: howto/regex.rst:1292 -msgid "" -"Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``." -"*`` to the front of your RE. Resist this temptation and use :func:`re." -"search` instead. The regular expression compiler does some analysis of REs " -"in order to speed up the process of looking for a match. One such analysis " -"figures out what the first character of a match must be; for example, a " -"pattern starting with ``Crow`` must match starting with a ``'C'``. The " -"analysis lets the engine quickly scan through the string looking for the " -"starting character, only trying the full match if a ``'C'`` is found." -msgstr "" -"Vous pouvez être tenté d'utiliser :func:`re.match` en ajoutant simplement ``." -"*`` au début de votre RE. Ce n'est pas une bonne idée, utilisez plutôt :func:" -"`re.search`. Le compilateur d'expressions régulières analyse les RE pour " -"optimiser le processus de recherche d'une correspondance. Cette analyse " -"permet de déterminer ce que doit être le premier caractère d'une " -"correspondance ; par exemple, un motif commençant par ``Corbeau`` doit faire " -"correspondre un ``'C'`` en tête. L'analyse permet au moteur de parcourir " -"rapidement la chaîne de caractères à la recherche du caractère de départ, " -"n'essayant la correspondance complète que si un ``'C'`` a déjà été trouvé." - -#: howto/regex.rst:1301 -msgid "" -"Adding ``.*`` defeats this optimization, requiring scanning to the end of " -"the string and then backtracking to find a match for the rest of the RE. " -"Use :func:`re.search` instead." -msgstr "" -"Ajouter ``.*`` annihile cette optimisation, nécessitant un balayage jusqu'à " -"la fin de la chaîne de caractères, puis un retour en arrière pour trouver " -"une correspondance pour le reste de la RE. Préférez l'utilisation :func:`re." -"search`." - -#: howto/regex.rst:1307 -msgid "Greedy versus Non-Greedy" +#: howto/regex.rst:1306 +msgid "" +"This distinction is important to remember when using the " +"old :func:`~re.match` name in code requiring compatibility with older Python " +"versions." +msgstr "" + +#: howto/regex.rst:1311 +#, fuzzy +msgid "Greedy versus non-greedy" msgstr "Glouton contre non-glouton" -#: howto/regex.rst:1309 +#: howto/regex.rst:1313 msgid "" "When repeating a regular expression, as in ``a*``, the resulting action is " "to consume as much of the pattern as possible. This fact often bites you " @@ -2562,7 +2602,7 @@ msgstr "" "pour faire correspondre une seule balise HTML ne fonctionne pas en raison de " "la nature gloutonne de ``.*``. ::" -#: howto/regex.rst:1323 +#: howto/regex.rst:1327 msgid "" "The RE matches the ``'<'`` in ``''``, and the ``.*`` consumes the rest " "of the string. There's still more left in the RE, though, and the ``>`` " @@ -2579,7 +2619,7 @@ msgstr "" "correspondance finale s'étend du ``'<'`` de ``''`` au ``'>'`` de ``''``, ce qui n'est pas ce que vous voulez." -#: howto/regex.rst:1330 +#: howto/regex.rst:1334 msgid "" "In this case, the solution is to use the non-greedy quantifiers ``*?``, ``+?" "``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " @@ -2594,7 +2634,7 @@ msgstr "" "échoue, le moteur avance caractère par caractère, ré-essayant ``'>'`` à " "chaque pas. Nous obtenons alors le bon résultat ::" -#: howto/regex.rst:1339 +#: howto/regex.rst:1343 msgid "" "(Note that parsing HTML or XML with regular expressions is painful. Quick-" "and-dirty patterns will handle common cases, but HTML and XML have special " @@ -2610,11 +2650,11 @@ msgstr "" "traite tous les cas possibles, les motifs seront *très* compliqués. " "Utilisez un module d'analyse HTML ou XML pour de telles tâches." -#: howto/regex.rst:1347 +#: howto/regex.rst:1351 msgid "Using re.VERBOSE" msgstr "Utilisez *re.VERBOSE*" -#: howto/regex.rst:1349 +#: howto/regex.rst:1353 msgid "" "By now you've probably noticed that regular expressions are a very compact " "notation, but they're not terribly readable. REs of moderate complexity can " @@ -2627,7 +2667,7 @@ msgstr "" "obliques inverses, de parenthèses et de métacaractères, ce qui la rend " "difficile à lire et à comprendre." -#: howto/regex.rst:1354 +#: howto/regex.rst:1358 msgid "" "For such REs, specifying the :const:`re.VERBOSE` flag when compiling the " "regular expression can be helpful, because it allows you to format the " @@ -2637,7 +2677,7 @@ msgstr "" "l'expression régulière peut être utile ; cela vous permet de formater " "l'expression régulière de manière plus claire." -#: howto/regex.rst:1358 +#: howto/regex.rst:1362 msgid "" "The ``re.VERBOSE`` flag has several effects. Whitespace in the regular " "expression that *isn't* inside a character class is ignored. This means " @@ -2657,27 +2697,28 @@ msgstr "" "ligne suivante. Lorsque vous l'utilisez avec des chaînes à triple " "guillemets, cela permet aux RE d'être formatées plus proprement ::" -#: howto/regex.rst:1375 +#: howto/regex.rst:1379 msgid "This is far more readable than::" msgstr "Ceci est beaucoup plus lisible que ::" -#: howto/regex.rst:1381 +#: howto/regex.rst:1385 msgid "Feedback" msgstr "Vos commentaires" -#: howto/regex.rst:1383 +#: howto/regex.rst:1387 +#, fuzzy msgid "" "Regular expressions are a complicated topic. Did this document help you " -"understand them? Were there parts that were unclear, or Problems you " +"understand them? Were there parts that were unclear, or problems you " "encountered that weren't covered here? If so, please send suggestions for " -"improvements to the author." +"improvements to the :ref:`issue tracker `." msgstr "" "Les expressions régulières sont un sujet compliqué. Est-ce que ce document " "vous a aidé à les comprendre ? Des parties ne sont pas claires, ou des " "problèmes que vous avez rencontrés ne sont pas traités ici ? Si tel est le " "cas, merci d'envoyer vos suggestions d'améliorations à l'auteur." -#: howto/regex.rst:1388 +#: howto/regex.rst:1392 msgid "" "The most complete book on regular expressions is almost certainly Jeffrey " "Friedl's Mastering Regular Expressions, published by O'Reilly. " @@ -2697,12 +2738,59 @@ msgstr "" "bibliothèque." #~ msgid "" -#~ "You can learn about this by interactively experimenting with the :mod:" -#~ "`re` module. If you have :mod:`tkinter` available, you may also want to " -#~ "look at :source:`Tools/demo/redemo.py`, a demonstration program included " -#~ "with the Python distribution. It allows you to enter REs and strings, " -#~ "and displays whether the RE matches or fails. :file:`redemo.py` can be " -#~ "quite useful when trying to debug a complicated RE." +#~ "The :func:`~re.match` function only checks if the RE matches at the " +#~ "beginning of the string while :func:`~re.search` will scan forward " +#~ "through the string for a match. It's important to keep this distinction " +#~ "in mind. Remember, :func:`!match` will only report a successful match " +#~ "which will start at 0; if the match wouldn't start at zero, :func:`!" +#~ "match` will *not* report it. ::" +#~ msgstr "" +#~ "La fonction :func:`~re.match` vérifie seulement si la RE correspond au " +#~ "début de la chaîne de caractères tandis que :func:`~re.search` parcourt " +#~ "la chaîne de caractères pour trouver une correspondance. Il est important " +#~ "de garder cette distinction à l'esprit. Rappelez-vous, :func:`!match` ne " +#~ "trouve qu'une correspondance qui commence à 0 ; si la correspondance " +#~ "commence plus loin, :func:`!match` *ne la trouve pas*. ::" + +#~ msgid "" +#~ "Sometimes you'll be tempted to keep using :func:`re.match`, and just add " +#~ "``.*`` to the front of your RE. Resist this temptation and " +#~ "use :func:`re.search` instead. The regular expression compiler does some " +#~ "analysis of REs in order to speed up the process of looking for a match. " +#~ "One such analysis figures out what the first character of a match must " +#~ "be; for example, a pattern starting with ``Crow`` must match starting " +#~ "with a ``'C'``. The analysis lets the engine quickly scan through the " +#~ "string looking for the starting character, only trying the full match if " +#~ "a ``'C'`` is found." +#~ msgstr "" +#~ "Vous pouvez être tenté d'utiliser :func:`re.match` en ajoutant simplement " +#~ "``.*`` au début de votre RE. Ce n'est pas une bonne idée, utilisez " +#~ "plutôt :func:`re.search`. Le compilateur d'expressions régulières analyse " +#~ "les RE pour optimiser le processus de recherche d'une correspondance. " +#~ "Cette analyse permet de déterminer ce que doit être le premier caractère " +#~ "d'une correspondance ; par exemple, un motif commençant par ``Corbeau`` " +#~ "doit faire correspondre un ``'C'`` en tête. L'analyse permet au moteur de " +#~ "parcourir rapidement la chaîne de caractères à la recherche du caractère " +#~ "de départ, n'essayant la correspondance complète que si un ``'C'`` a déjà " +#~ "été trouvé." + +#~ msgid "" +#~ "Adding ``.*`` defeats this optimization, requiring scanning to the end of " +#~ "the string and then backtracking to find a match for the rest of the RE. " +#~ "Use :func:`re.search` instead." +#~ msgstr "" +#~ "Ajouter ``.*`` annihile cette optimisation, nécessitant un balayage " +#~ "jusqu'à la fin de la chaîne de caractères, puis un retour en arrière pour " +#~ "trouver une correspondance pour le reste de la RE. Préférez " +#~ "l'utilisation :func:`re.search`." + +#~ msgid "" +#~ "You can learn about this by interactively experimenting with " +#~ "the :mod:`re` module. If you have :mod:`tkinter` available, you may also " +#~ "want to look at :source:`Tools/demo/redemo.py`, a demonstration program " +#~ "included with the Python distribution. It allows you to enter REs and " +#~ "strings, and displays whether the RE matches or fails. :file:`redemo.py` " +#~ "can be quite useful when trying to debug a complicated RE." #~ msgstr "" #~ "Vous pouvez apprendre leur fonctionnement en expérimentant de manière " #~ "interactive avec le module :mod:`re`. Si vous disposez de :mod:`tkinter`, " diff --git a/howto/remote_debugging.po b/howto/remote_debugging.po new file mode 100644 index 000000000..532a7640a --- /dev/null +++ b/howto/remote_debugging.po @@ -0,0 +1,889 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: howto/remote_debugging.rst:4 +msgid "Remote debugging attachment protocol" +msgstr "" + +#: howto/remote_debugging.rst:6 +msgid "" +"This protocol enables external tools to attach to a running CPython process " +"and execute Python code remotely." +msgstr "" + +#: howto/remote_debugging.rst:9 +msgid "" +"Most platforms require elevated privileges to attach to another Python " +"process." +msgstr "" + +#: howto/remote_debugging.rst:12 +msgid "Disabling remote debugging" +msgstr "" + +#: howto/remote_debugging.rst:14 +msgid "To disable remote debugging support, use any of the following:" +msgstr "" + +#: howto/remote_debugging.rst:16 +msgid "" +"Set the :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable to ``1`` " +"before starting the interpreter." +msgstr "" + +#: howto/remote_debugging.rst:18 +msgid "Use the :option:`-X disable_remote_debug` command-line option." +msgstr "" + +#: howto/remote_debugging.rst:19 +msgid "Compile Python with the :option:`--without-remote-debug` build flag." +msgstr "" + +#: howto/remote_debugging.rst:24 +msgid "Permission requirements" +msgstr "" + +#: howto/remote_debugging.rst:26 +msgid "" +"Attaching to a running Python process for remote debugging requires elevated " +"privileges on most platforms. The specific requirements and troubleshooting " +"steps depend on your operating system:" +msgstr "" + +#: howto/remote_debugging.rst:31 +msgid "Linux" +msgstr "Linux" + +#: howto/remote_debugging.rst:32 +msgid "" +"The tracer process must have the ``CAP_SYS_PTRACE`` capability or equivalent " +"privileges. You can only trace processes you own and can signal. Tracing may " +"fail if the process is already being traced, or if it is running with set-" +"user-ID or set-group-ID. Security modules like Yama may further restrict " +"tracing." +msgstr "" + +#: howto/remote_debugging.rst:38 +msgid "To temporarily relax ptrace restrictions (until reboot), run:" +msgstr "" + +#: howto/remote_debugging.rst:40 +msgid "``echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope``" +msgstr "" + +#: howto/remote_debugging.rst:44 +msgid "" +"Disabling ``ptrace_scope`` reduces system hardening and should only be done " +"in trusted environments." +msgstr "" + +#: howto/remote_debugging.rst:47 +msgid "" +"If running inside a container, use ``--cap-add=SYS_PTRACE`` or ``--" +"privileged``, and run as root if needed." +msgstr "" + +#: howto/remote_debugging.rst:50 +msgid "Try re-running the command with elevated privileges:" +msgstr "" + +#: howto/remote_debugging.rst:52 +msgid "``sudo -E !!``" +msgstr "" + +#: howto/remote_debugging.rst:56 +msgid "macOS" +msgstr "macOS" + +#: howto/remote_debugging.rst:57 +msgid "" +"To attach to another process, you typically need to run your debugging tool " +"with elevated privileges. This can be done by using ``sudo`` or running as " +"root." +msgstr "" + +#: howto/remote_debugging.rst:61 +msgid "" +"Even when attaching to processes you own, macOS may block debugging unless " +"the debugger is run with root privileges due to system security restrictions." +msgstr "" + +#: howto/remote_debugging.rst:66 +msgid "Windows" +msgstr "Windows" + +#: howto/remote_debugging.rst:67 +msgid "" +"To attach to another process, you usually need to run your debugging tool " +"with administrative privileges. Start the command prompt or terminal as " +"Administrator." +msgstr "" + +#: howto/remote_debugging.rst:71 +msgid "" +"Some processes may still be inaccessible even with Administrator rights, " +"unless you have the ``SeDebugPrivilege`` privilege enabled." +msgstr "" + +#: howto/remote_debugging.rst:74 +msgid "" +"To resolve file or folder access issues, adjust the security permissions:" +msgstr "" + +#: howto/remote_debugging.rst:76 +msgid "Right-click the file or folder and select **Properties**." +msgstr "" + +#: howto/remote_debugging.rst:77 +msgid "Go to the **Security** tab to view users and groups with access." +msgstr "" + +#: howto/remote_debugging.rst:78 +msgid "Click **Edit** to modify permissions." +msgstr "" + +#: howto/remote_debugging.rst:79 +msgid "Select your user account." +msgstr "" + +#: howto/remote_debugging.rst:80 +msgid "In **Permissions**, check **Read** or **Full control** as needed." +msgstr "" + +#: howto/remote_debugging.rst:81 +msgid "Click **Apply**, then **OK** to confirm." +msgstr "" + +#: howto/remote_debugging.rst:86 +msgid "" +"Ensure you've satisfied all :ref:`permission-requirements` before proceeding." +msgstr "" + +#: howto/remote_debugging.rst:88 +msgid "" +"This section describes the low-level protocol that enables external tools to " +"inject and execute a Python script within a running CPython process." +msgstr "" + +#: howto/remote_debugging.rst:91 +msgid "" +"This mechanism forms the basis of the :func:`sys.remote_exec` function, " +"which instructs a remote Python process to execute a ``.py`` file. However, " +"this section does not document the usage of that function. Instead, it " +"provides a detailed explanation of the underlying protocol, which takes as " +"input the ``pid`` of a target Python process and the path to a Python source " +"file to be executed. This information supports independent reimplementation " +"of the protocol, regardless of programming language." +msgstr "" + +#: howto/remote_debugging.rst:101 +msgid "" +"The execution of the injected script depends on the interpreter reaching a " +"safe evaluation point. As a result, execution may be delayed depending on " +"the runtime state of the target process." +msgstr "" + +#: howto/remote_debugging.rst:105 +msgid "" +"Once injected, the script is executed by the interpreter within the target " +"process the next time a safe evaluation point is reached. This approach " +"enables remote execution capabilities without modifying the behavior or " +"structure of the running Python application." +msgstr "" + +#: howto/remote_debugging.rst:110 +msgid "" +"Subsequent sections provide a step-by-step description of the protocol, " +"including techniques for locating interpreter structures in memory, safely " +"accessing internal fields, and triggering code execution. Platform-specific " +"variations are noted where applicable, and example implementations are " +"included to clarify each operation." +msgstr "" + +#: howto/remote_debugging.rst:117 +msgid "Locating the PyRuntime structure" +msgstr "" + +#: howto/remote_debugging.rst:119 +msgid "" +"CPython places the ``PyRuntime`` structure in a dedicated binary section to " +"help external tools find it at runtime. The name and format of this section " +"vary by platform. For example, ``.PyRuntime`` is used on ELF systems, and " +"``__DATA,__PyRuntime`` is used on macOS. Tools can find the offset of this " +"structure by examining the binary on disk." +msgstr "" + +#: howto/remote_debugging.rst:125 +msgid "" +"The ``PyRuntime`` structure contains CPython’s global interpreter state and " +"provides access to other internal data, including the list of interpreters, " +"thread states, and debugger support fields." +msgstr "" + +#: howto/remote_debugging.rst:129 +msgid "" +"To work with a remote Python process, a debugger must first find the memory " +"address of the ``PyRuntime`` structure in the target process. This address " +"can’t be hardcoded or calculated from a symbol name, because it depends on " +"where the operating system loaded the binary." +msgstr "" + +#: howto/remote_debugging.rst:134 +msgid "" +"The method for finding ``PyRuntime`` depends on the platform, but the steps " +"are the same in general:" +msgstr "" + +#: howto/remote_debugging.rst:137 +msgid "" +"Find the base address where the Python binary or shared library was loaded " +"in the target process." +msgstr "" + +#: howto/remote_debugging.rst:139 +msgid "" +"Use the on-disk binary to locate the offset of the ``.PyRuntime`` section." +msgstr "" + +#: howto/remote_debugging.rst:140 +msgid "" +"Add the section offset to the base address to compute the address in memory." +msgstr "" + +#: howto/remote_debugging.rst:142 +msgid "" +"The sections below explain how to do this on each supported platform and " +"include example code." +msgstr "" + +#: howto/remote_debugging.rst:146 +msgid "Linux (ELF)" +msgstr "" + +#: howto/remote_debugging.rst:147 +msgid "To find the ``PyRuntime`` structure on Linux:" +msgstr "" + +#: howto/remote_debugging.rst:149 +msgid "" +"Read the process’s memory map (for example, ``/proc//maps``) to find " +"the address where the Python executable or ``libpython`` was loaded." +msgstr "" + +#: howto/remote_debugging.rst:151 +msgid "" +"Parse the ELF section headers in the binary to get the offset of the " +"``.PyRuntime`` section." +msgstr "" + +#: howto/remote_debugging.rst:153 +msgid "" +"Add that offset to the base address from step 1 to get the memory address of " +"``PyRuntime``." +msgstr "" + +#: howto/remote_debugging.rst:218 howto/remote_debugging.rst:557 +msgid "The following is an example implementation::" +msgstr "" + +#: howto/remote_debugging.rst:179 +msgid "" +"On Linux systems, there are two main approaches to read memory from another " +"process. The first is through the ``/proc`` filesystem, specifically by " +"reading from ``/proc/[pid]/mem`` which provides direct access to the " +"process's memory. This requires appropriate permissions - either being the " +"same user as the target process or having root access. The second approach " +"is using the ``process_vm_readv()`` system call which provides a more " +"efficient way to copy memory between processes. While ptrace's " +"``PTRACE_PEEKTEXT`` operation can also be used to read memory, it is " +"significantly slower as it only reads one word at a time and requires " +"multiple context switches between the tracer and tracee processes." +msgstr "" + +#: howto/remote_debugging.rst:190 +msgid "" +"For parsing ELF sections, the process involves reading and interpreting the " +"ELF file format structures from the binary file on disk. The ELF header " +"contains a pointer to the section header table. Each section header contains " +"metadata about a section including its name (stored in a separate string " +"table), offset, and size. To find a specific section like .PyRuntime, you " +"need to walk through these headers and match the section name. The section " +"header then provides the offset where that section exists in the file, which " +"can be used to calculate its runtime address when the binary is loaded into " +"memory." +msgstr "" + +#: howto/remote_debugging.rst:199 +msgid "" +"You can read more about the ELF file format in the `ELF specification " +"`_." +msgstr "" + +#: howto/remote_debugging.rst:204 +msgid "macOS (Mach-O)" +msgstr "" + +#: howto/remote_debugging.rst:205 +msgid "To find the ``PyRuntime`` structure on macOS:" +msgstr "" + +#: howto/remote_debugging.rst:207 +msgid "" +"Call ``task_for_pid()`` to get the ``mach_port_t`` task port for the target " +"process. This handle is needed to read memory using APIs like " +"``mach_vm_read_overwrite`` and ``mach_vm_region``." +msgstr "" + +#: howto/remote_debugging.rst:210 +msgid "" +"Scan the memory regions to find the one containing the Python executable or " +"``libpython``." +msgstr "" + +#: howto/remote_debugging.rst:212 +msgid "" +"Load the binary file from disk and parse the Mach-O headers to find the " +"section named ``PyRuntime`` in the ``__DATA`` segment. On macOS, symbol " +"names are automatically prefixed with an underscore, so the ``PyRuntime`` " +"symbol appears as ``_PyRuntime`` in the symbol table, but the section name " +"is not affected." +msgstr "" + +#: howto/remote_debugging.rst:243 +msgid "" +"On macOS, accessing another process's memory requires using Mach-O specific " +"APIs and file formats. The first step is obtaining a ``task_port`` handle " +"via ``task_for_pid()``, which provides access to the target process's memory " +"space. This handle enables memory operations through APIs like " +"``mach_vm_read_overwrite()``." +msgstr "" + +#: howto/remote_debugging.rst:249 +msgid "" +"The process memory can be examined using ``mach_vm_region()`` to scan " +"through the virtual memory space, while ``proc_regionfilename()`` helps " +"identify which binary files are loaded at each memory region. When the " +"Python binary or library is found, its Mach-O headers need to be parsed to " +"locate the ``PyRuntime`` structure." +msgstr "" + +#: howto/remote_debugging.rst:254 +msgid "" +"The Mach-O format organizes code and data into segments and sections. The " +"``PyRuntime`` structure lives in a section named ``__PyRuntime`` within the " +"``__DATA`` segment. The actual runtime address calculation involves finding " +"the ``__TEXT`` segment which serves as the binary's base address, then " +"locating the ``__DATA`` segment containing our target section. The final " +"address is computed by combining the base address with the appropriate " +"section offsets from the Mach-O headers." +msgstr "" + +#: howto/remote_debugging.rst:262 +msgid "" +"Note that accessing another process's memory on macOS typically requires " +"elevated privileges - either root access or special security entitlements " +"granted to the debugging process." +msgstr "" + +#: howto/remote_debugging.rst:268 +msgid "Windows (PE)" +msgstr "" + +#: howto/remote_debugging.rst:269 +msgid "To find the ``PyRuntime`` structure on Windows:" +msgstr "" + +#: howto/remote_debugging.rst:271 +msgid "" +"Use the ToolHelp API to enumerate all modules loaded in the target process. " +"This is done using functions such as `CreateToolhelp32Snapshot `_, `Module32First `_, and " +"`Module32Next `_." +msgstr "" + +#: howto/remote_debugging.rst:278 +msgid "" +"Identify the module corresponding to :file:`python.exe` " +"or :file:`python{XY}.dll`, where ``X`` and ``Y`` are the major and minor " +"version numbers of the Python version, and record its base address." +msgstr "" + +#: howto/remote_debugging.rst:281 +msgid "" +"Locate the ``PyRuntim`` section. Due to the PE format's 8-character limit on " +"section names (defined as ``IMAGE_SIZEOF_SHORT_NAME``), the original name " +"``PyRuntime`` is truncated. This section contains the ``PyRuntime`` " +"structure." +msgstr "" + +#: howto/remote_debugging.rst:285 +msgid "" +"Retrieve the section’s relative virtual address (RVA) and add it to the base " +"address of the module." +msgstr "" + +#: howto/remote_debugging.rst:312 +msgid "" +"On Windows, accessing another process's memory requires using the Windows " +"API functions like ``CreateToolhelp32Snapshot()`` and ``Module32First()/" +"Module32Next()`` to enumerate loaded modules. The ``OpenProcess()`` function " +"provides a handle to access the target process's memory space, enabling " +"memory operations through ``ReadProcessMemory()``." +msgstr "" + +#: howto/remote_debugging.rst:318 +msgid "" +"The process memory can be examined by enumerating loaded modules to find the " +"Python binary or DLL. When found, its PE headers need to be parsed to locate " +"the ``PyRuntime`` structure." +msgstr "" + +#: howto/remote_debugging.rst:322 +msgid "" +"The PE format organizes code and data into sections. The ``PyRuntime`` " +"structure lives in a section named \"PyRuntim\" (truncated from " +"\"PyRuntime\" due to PE's 8-character name limit). The actual runtime " +"address calculation involves finding the module's base address from the " +"module entry, then locating our target section in the PE headers. The final " +"address is computed by combining the base address with the section's virtual " +"address from the PE section headers." +msgstr "" + +#: howto/remote_debugging.rst:329 +msgid "" +"Note that accessing another process's memory on Windows typically requires " +"appropriate privileges - either administrative access or the " +"``SeDebugPrivilege`` privilege granted to the debugging process." +msgstr "" + +#: howto/remote_debugging.rst:335 +msgid "Reading _Py_DebugOffsets" +msgstr "" + +#: howto/remote_debugging.rst:337 +msgid "" +"Once the address of the ``PyRuntime`` structure has been determined, the " +"next step is to read the ``_Py_DebugOffsets`` structure located at the " +"beginning of the ``PyRuntime`` block." +msgstr "" + +#: howto/remote_debugging.rst:341 +msgid "" +"This structure provides version-specific field offsets that are needed to " +"safely read interpreter and thread state memory. These offsets vary between " +"CPython versions and must be checked before use to ensure they are " +"compatible." +msgstr "" + +#: howto/remote_debugging.rst:345 +msgid "To read and check the debug offsets, follow these steps:" +msgstr "" + +#: howto/remote_debugging.rst:347 +msgid "" +"Read memory from the target process starting at the ``PyRuntime`` address, " +"covering the same number of bytes as the ``_Py_DebugOffsets`` structure. " +"This structure is located at the very start of the ``PyRuntime`` memory " +"block. Its layout is defined in CPython’s internal headers and stays the " +"same within a given minor version, but may change in major versions." +msgstr "" + +#: howto/remote_debugging.rst:353 +msgid "Check that the structure contains valid data:" +msgstr "" + +#: howto/remote_debugging.rst:355 +msgid "The ``cookie`` field must match the expected debug marker." +msgstr "" + +#: howto/remote_debugging.rst:356 +msgid "" +"The ``version`` field must match the version of the Python interpreter used " +"by the debugger." +msgstr "" + +#: howto/remote_debugging.rst:358 +msgid "" +"If either the debugger or the target process is using a pre-release version " +"(for example, an alpha, beta, or release candidate), the versions must match " +"exactly." +msgstr "" + +#: howto/remote_debugging.rst:361 +msgid "" +"The ``free_threaded`` field must have the same value in both the debugger " +"and the target process." +msgstr "" + +#: howto/remote_debugging.rst:364 +msgid "" +"If the structure is valid, the offsets it contains can be used to locate " +"fields in memory. If any check fails, the debugger should stop the operation " +"to avoid reading memory in the wrong format." +msgstr "" + +#: howto/remote_debugging.rst:368 +msgid "" +"The following is an example implementation that reads and checks " +"``_Py_DebugOffsets``::" +msgstr "" + +#: howto/remote_debugging.rst:396 +msgid "**Process suspension recommended**" +msgstr "" + +#: howto/remote_debugging.rst:398 +msgid "" +"To avoid race conditions and ensure memory consistency, it is strongly " +"recommended that the target process be suspended before performing any " +"operations that read or write internal interpreter state. The Python runtime " +"may concurrently mutate interpreter data structures—such as creating or " +"destroying threads—during normal execution. This can result in invalid " +"memory reads or writes." +msgstr "" + +#: howto/remote_debugging.rst:405 +msgid "" +"A debugger may suspend execution by attaching to the process with ``ptrace`` " +"or by sending a ``SIGSTOP`` signal. Execution should only be resumed after " +"debugger-side memory operations are complete." +msgstr "" + +#: howto/remote_debugging.rst:411 +msgid "" +"Some tools, such as profilers or sampling-based debuggers, may operate on a " +"running process without suspension. In such cases, tools must be explicitly " +"designed to handle partially updated or inconsistent memory. For most " +"debugger implementations, suspending the process remains the safest and most " +"robust approach." +msgstr "" + +#: howto/remote_debugging.rst:419 +msgid "Locating the interpreter and thread state" +msgstr "" + +#: howto/remote_debugging.rst:421 +msgid "" +"Before code can be injected and executed in a remote Python process, the " +"debugger must choose a thread in which to schedule execution. This is " +"necessary because the control fields used to perform remote code injection " +"are located in the ``_PyRemoteDebuggerSupport`` structure, which is embedded " +"in a ``PyThreadState`` object. These fields are modified by the debugger to " +"request execution of injected scripts." +msgstr "" + +#: howto/remote_debugging.rst:428 +msgid "" +"The ``PyThreadState`` structure represents a thread running inside a Python " +"interpreter. It maintains the thread’s evaluation context and contains the " +"fields required for debugger coordination. Locating a valid " +"``PyThreadState`` is therefore a key prerequisite for triggering execution " +"remotely." +msgstr "" + +#: howto/remote_debugging.rst:433 +msgid "" +"A thread is typically selected based on its role or ID. In most cases, the " +"main thread is used, but some tools may target a specific thread by its " +"native thread ID. Once the target thread is chosen, the debugger must locate " +"both the interpreter and the associated thread state structures in memory." +msgstr "" + +#: howto/remote_debugging.rst:438 +msgid "The relevant internal structures are defined as follows:" +msgstr "" + +#: howto/remote_debugging.rst:440 +msgid "" +"``PyInterpreterState`` represents an isolated Python interpreter instance. " +"Each interpreter maintains its own set of imported modules, built-in state, " +"and thread state list. Although most Python applications use a single " +"interpreter, CPython supports multiple interpreters in the same process." +msgstr "" + +#: howto/remote_debugging.rst:445 +msgid "" +"``PyThreadState`` represents a thread running within an interpreter. It " +"contains execution state and the control fields used by the debugger." +msgstr "" + +#: howto/remote_debugging.rst:448 +msgid "To locate a thread:" +msgstr "" + +#: howto/remote_debugging.rst:450 +msgid "" +"Use the offset ``runtime_state.interpreters_head`` to obtain the address of " +"the first interpreter in the ``PyRuntime`` structure. This is the entry " +"point to the linked list of active interpreters." +msgstr "" + +#: howto/remote_debugging.rst:454 +msgid "" +"Use the offset ``interpreter_state.threads_main`` to access the main thread " +"state associated with the selected interpreter. This is typically the most " +"reliable thread to target." +msgstr "" + +#: howto/remote_debugging.rst:458 +msgid "" +"Optionally, use the offset ``interpreter_state.threads_head`` to iterate " +"through the linked list of all thread states. Each ``PyThreadState`` " +"structure contains a ``native_thread_id`` field, which may be compared to a " +"target thread ID to find a specific thread." +msgstr "" + +#: howto/remote_debugging.rst:463 +msgid "" +"Once a valid ``PyThreadState`` has been found, its address can be used in " +"later steps of the protocol, such as writing debugger control fields and " +"scheduling execution." +msgstr "" + +#: howto/remote_debugging.rst:467 +msgid "" +"The following is an example implementation that locates the main thread " +"state::" +msgstr "" + +#: howto/remote_debugging.rst:490 +msgid "" +"The following example demonstrates how to locate a thread by its native " +"thread ID::" +msgstr "" + +#: howto/remote_debugging.rst:520 +msgid "" +"Once a valid thread state has been located, the debugger can proceed with " +"modifying its control fields and scheduling execution, as described in the " +"next section." +msgstr "" + +#: howto/remote_debugging.rst:525 +msgid "Writing control information" +msgstr "" + +#: howto/remote_debugging.rst:527 +msgid "" +"Once a valid ``PyThreadState`` structure has been identified, the debugger " +"may modify control fields within it to schedule the execution of a specified " +"Python script. These control fields are checked periodically by the " +"interpreter, and when set correctly, they trigger the execution of remote " +"code at a safe point in the evaluation loop." +msgstr "" + +#: howto/remote_debugging.rst:533 +msgid "" +"Each ``PyThreadState`` contains a ``_PyRemoteDebuggerSupport`` structure " +"used for communication between the debugger and the interpreter. The " +"locations of its fields are defined by the ``_Py_DebugOffsets`` structure " +"and include the following:" +msgstr "" + +#: howto/remote_debugging.rst:538 +msgid "" +"``debugger_script_path``: A fixed-size buffer that holds the full path to a " +"Python source file (``.py``). This file must be accessible and readable by " +"the target process when execution is triggered." +msgstr "" + +#: howto/remote_debugging.rst:542 +msgid "" +"``debugger_pending_call``: An integer flag. Setting this to ``1`` tells the " +"interpreter that a script is ready to be executed." +msgstr "" + +#: howto/remote_debugging.rst:545 +msgid "" +"``eval_breaker``: A field checked by the interpreter during execution. " +"Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this " +"field causes the interpreter to pause and check for debugger activity." +msgstr "" + +#: howto/remote_debugging.rst:549 +msgid "" +"To complete the injection, the debugger must perform the following steps:" +msgstr "" + +#: howto/remote_debugging.rst:551 +msgid "Write the full script path into the ``debugger_script_path`` buffer." +msgstr "" + +#: howto/remote_debugging.rst:552 +msgid "Set ``debugger_pending_call`` to ``1``." +msgstr "" + +#: howto/remote_debugging.rst:553 +msgid "" +"Read the current value of ``eval_breaker``, set bit 5 " +"(``_PY_EVAL_PLEASE_STOP_BIT``), and write the updated value back. This " +"signals the interpreter to check for debugger activity." +msgstr "" + +#: howto/remote_debugging.rst:596 +msgid "" +"Once these fields are set, the debugger may resume the process (if it was " +"suspended). The interpreter will process the request at the next safe " +"evaluation point, load the script from disk, and execute it." +msgstr "" + +#: howto/remote_debugging.rst:600 +msgid "" +"It is the responsibility of the debugger to ensure that the script file " +"remains present and accessible to the target process during execution." +msgstr "" + +#: howto/remote_debugging.rst:605 +msgid "" +"Script execution is asynchronous. The script file cannot be deleted " +"immediately after injection. The debugger should wait until the injected " +"script has produced an observable effect before removing the file. This " +"effect depends on what the script is designed to do. For example, a debugger " +"might wait until the remote process connects back to a socket before " +"removing the script. Once such an effect is observed, it is safe to assume " +"the file is no longer needed." +msgstr "" + +#: howto/remote_debugging.rst:614 +msgid "Summary" +msgstr "" + +#: howto/remote_debugging.rst:616 +msgid "To inject and execute a Python script in a remote process:" +msgstr "" + +#: howto/remote_debugging.rst:618 +msgid "Locate the ``PyRuntime`` structure in the target process’s memory." +msgstr "" + +#: howto/remote_debugging.rst:619 +msgid "" +"Read and validate the ``_Py_DebugOffsets`` structure at the beginning of " +"``PyRuntime``." +msgstr "" + +#: howto/remote_debugging.rst:621 +msgid "Use the offsets to locate a valid ``PyThreadState``." +msgstr "" + +#: howto/remote_debugging.rst:622 +msgid "Write the path to a Python script into ``debugger_script_path``." +msgstr "" + +#: howto/remote_debugging.rst:623 +msgid "Set the ``debugger_pending_call`` flag to ``1``." +msgstr "" + +#: howto/remote_debugging.rst:624 +msgid "Set ``_PY_EVAL_PLEASE_STOP_BIT`` in the ``eval_breaker`` field." +msgstr "" + +#: howto/remote_debugging.rst:625 +msgid "" +"Resume the process (if suspended). The script will execute at the next safe " +"evaluation point." +msgstr "" + +#: howto/remote_debugging.rst:631 +msgid "Security and threat model" +msgstr "" + +#: howto/remote_debugging.rst:633 +msgid "" +"The remote debugging protocol relies on the same operating system primitives " +"used by native debuggers such as GDB and LLDB. Attaching to a process " +"requires the **same privileges** that those debuggers require, for example " +"``ptrace`` / Yama LSM on Linux, ``task_for_pid`` on macOS, and " +"``SeDebugPrivilege`` on Windows. Python does not introduce any new " +"privilege escalation path; if an attacker already possesses the permissions " +"needed to attach to a process, they could equally use GDB to read memory or " +"inject code." +msgstr "" + +#: howto/remote_debugging.rst:642 +msgid "" +"The following principles define what is, and is not, considered a security " +"vulnerability in this feature:" +msgstr "" + +#: howto/remote_debugging.rst:645 +msgid "Attaching requires OS-level privileges" +msgstr "" + +#: howto/remote_debugging.rst:646 +msgid "" +"On every supported platform the operating system gates cross-process memory " +"access behind privilege checks (``CAP_SYS_PTRACE``, root, or administrator " +"rights). A report that demonstrates an issue only after these privileges " +"have already been obtained is **not** a vulnerability in CPython, since the " +"OS security boundary was already crossed." +msgstr "" + +#: howto/remote_debugging.rst:652 +msgid "" +"Crashes or memory errors when reading a compromised process are not " +"vulnerabilities" +msgstr "" + +#: howto/remote_debugging.rst:653 +msgid "" +"A tool that reads internal interpreter state from a target process must " +"trust that memory to be well-formed. If the target process has been " +"corrupted or is controlled by an attacker, the debugger or profiler may " +"crash, produce garbage output, or behave unpredictably. This is the same " +"risk accepted by every ``ptrace``-based debugger. Bugs in this category " +"(buffer overflows, segmentation faults, or undefined behaviour triggered by " +"reading corrupted state) are **not** treated as security issues, though " +"fixes that improve robustness are welcome." +msgstr "" + +#: howto/remote_debugging.rst:662 +msgid "Vulnerabilities in the target process are not in scope" +msgstr "" + +#: howto/remote_debugging.rst:663 +msgid "" +"If the Python process being debugged has already been compromised, the " +"attacker already controls execution in that process. Demonstrating further " +"impact from that starting point does not constitute a vulnerability in the " +"remote debugging protocol." +msgstr "" + +#: howto/remote_debugging.rst:669 +msgid "When to use ``PYTHON_DISABLE_REMOTE_DEBUG``" +msgstr "" + +#: howto/remote_debugging.rst:671 +msgid "" +"The environment variable :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` (and the " +"equivalent :option:`-X disable_remote_debug` flag) allows operators to " +"disable the in-process side of the protocol as a **defence-in-depth** " +"measure. This may be useful in hardened or sandboxed deployment " +"environments where no debugging or profiling of the process is expected and " +"reducing attack surface is a priority, even though the OS-level privilege " +"checks already prevent unprivileged access." +msgstr "" + +#: howto/remote_debugging.rst:679 +msgid "" +"Setting this variable does **not** affect other OS-level debugging " +"interfaces (``ptrace``, ``/proc``, ``task_for_pid``, etc.), which remain " +"available according to their own permission models." +msgstr "" diff --git a/howto/sockets.po b/howto/sockets.po index 0a5a6f291..f562ef084 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-02-16 15:07+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -27,7 +27,7 @@ msgstr "Auteur" msgid "Gordon McMillan" msgstr "Gordon McMillan" -#: howto/sockets.rst:-1 +#: howto/sockets.rst:10 msgid "Abstract" msgstr "Résumé" @@ -159,15 +159,15 @@ msgstr "" #: howto/sockets.rst:80 msgid "" "A couple things to notice: we used ``socket.gethostname()`` so that the " -"socket would be visible to the outside world. If we had used ``s." -"bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would still " -"have a \"server\" socket, but one that was only visible within the same " -"machine. ``s.bind(('', 80))`` specifies that the socket is reachable by any " -"address the machine happens to have." +"socket would be visible to the outside world. If we had used " +"``s.bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would " +"still have a \"server\" socket, but one that was only visible within the " +"same machine. ``s.bind(('', 80))`` specifies that the socket is reachable " +"by any address the machine happens to have." msgstr "" "Quelques remarques : nous avons utilisé ``socket.gethostname()`` pour que le " -"connecteur soit visible par le monde extérieur. Si nous avions utilisé ``s." -"bind(('localhost', 80))`` ou ``s.bind(('127.0.0.1', 80))``, nous aurions " +"connecteur soit visible par le monde extérieur. Si nous avions utilisé " +"``s.bind(('localhost', 80))`` ou ``s.bind(('127.0.0.1', 80))``, nous aurions " "toujours un connecteur « serveur », mais qui ne serait visible qu'à " "l'intérieur de la même machine. ``s.bind(('', 80))`` précise que le " "connecteur est accessible par n'importe quelle adresse que la machine " diff --git a/howto/sorting.po b/howto/sorting.po index b44776216..8a3bc609c 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -5,20 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2022-12-11 19:25+0100\n" -"Last-Translator: Jean Abou Samra \n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" +"PO-Revision-Date: 2025-10-25 14:06+0200\n" +"Last-Translator: Julien Palard \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.1\n" +"X-Generator: Poedit 3.6\n" #: howto/sorting.rst:4 -#, fuzzy msgid "Sorting Techniques" -msgstr "Les bases du tri" +msgstr "Les techniques de tri" #: howto/sorting.rst:0 msgid "Author" @@ -55,8 +54,8 @@ msgid "" "A simple ascending sort is very easy: just call the :func:`sorted` function. " "It returns a new sorted list:" msgstr "" -"Un tri ascendant simple est très facile : il suffit d'appeler la fonction :" -"func:`sorted`. Elle renvoie une nouvelle liste triée :" +"Un tri ascendant simple est très facile : il suffit d'appeler la " +"fonction :func:`sorted`. Elle renvoie une nouvelle liste triée :" #: howto/sorting.rst:27 msgid "" @@ -67,9 +66,9 @@ msgid "" msgstr "" "Vous pouvez aussi utiliser la méthode :meth:`list.sort`. Elle modifie la " "liste elle-même (et renvoie ``None`` pour éviter les confusions). " -"Habituellement, cette méthode est moins pratique que la fonction :func:" -"`sorted` -- mais si vous n'avez pas besoin de la liste originale, cette " -"technique est légèrement plus efficace." +"Habituellement, cette méthode est moins pratique que la " +"fonction :func:`sorted` -- mais si vous n'avez pas besoin de la liste " +"originale, cette technique est légèrement plus efficace." #: howto/sorting.rst:39 msgid "" @@ -85,20 +84,26 @@ msgid "Key Functions" msgstr "Fonctions clef" #: howto/sorting.rst:50 +#, fuzzy msgid "" -"Both :meth:`list.sort` and :func:`sorted` have a *key* parameter to specify " -"a function (or other callable) to be called on each list element prior to " -"making comparisons." +"The :meth:`list.sort` method and the " +"functions :func:`sorted`, :func:`min`, :func:`max`, :func:`heapq.nsmallest`, " +"and :func:`heapq.nlargest` have a *key* parameter to specify a function (or " +"other callable) to be called on each list element prior to making " +"comparisons." msgstr "" ":meth:`list.sort` et :func:`sorted` ont un paramètre *key* afin de spécifier " "une fonction (ou autre appelable) qui peut être appelée sur chaque élément " "de la liste avant d'effectuer des comparaisons." -#: howto/sorting.rst:54 -msgid "For example, here's a case-insensitive string comparison:" +#: howto/sorting.rst:56 +#, fuzzy +msgid "" +"For example, here's a case-insensitive string comparison " +"using :meth:`str.casefold`:" msgstr "Par exemple, voici une comparaison de texte insensible à la casse :" -#: howto/sorting.rst:61 +#: howto/sorting.rst:64 msgid "" "The value of the *key* parameter should be a function (or other callable) " "that takes a single argument and returns a key to use for sorting purposes. " @@ -110,7 +115,7 @@ msgstr "" "Cette technique est rapide car la fonction clef est appelée exactement une " "seule fois pour chaque enregistrement en entrée." -#: howto/sorting.rst:66 +#: howto/sorting.rst:69 msgid "" "A common pattern is to sort complex objects using some of the object's " "indices as keys. For example:" @@ -118,46 +123,45 @@ msgstr "" "Un usage fréquent est de faire un tri sur des objets complexes en utilisant " "les indices des objets en tant que clef. Par exemple :" -#: howto/sorting.rst:79 +#: howto/sorting.rst:82 msgid "" "The same technique works for objects with named attributes. For example:" msgstr "" "La même technique marche pour des objets avec des attributs nommés. Par " "exemple :" -#: howto/sorting.rst:99 +#: howto/sorting.rst:102 msgid "" "Objects with named attributes can be made by a regular class as shown above, " -"or they can be instances of :class:`~dataclasses.dataclass` or a :term:" -"`named tuple`." +"or they can be instances of :class:`~dataclasses.dataclass` or " +"a :term:`named tuple`." msgstr "" -#: howto/sorting.rst:104 -#, fuzzy +#: howto/sorting.rst:107 msgid "Operator Module Functions and Partial Function Evaluation" -msgstr "Fonctions du module *operator*" +msgstr "Fonctions du module *operator* et application partielle de fonctions" -#: howto/sorting.rst:106 -#, fuzzy +#: howto/sorting.rst:109 msgid "" "The :term:`key function` patterns shown above are very common, so Python " "provides convenience functions to make accessor functions easier and faster. " -"The :mod:`operator` module has :func:`~operator.itemgetter`, :func:" -"`~operator.attrgetter`, and a :func:`~operator.methodcaller` function." +"The :mod:`operator` module " +"has :func:`~operator.itemgetter`, :func:`~operator.attrgetter`, and " +"a :func:`~operator.methodcaller` function." msgstr "" -"Les fonctions clef utilisées ci-dessus sont courantes, donc Python fournit " -"des fonctions permettant de rendre plus simple et plus rapide l'usage des " -"fonctions d'accesseur. Le module :mod:`operator` contient les fonctions :" -"func:`~operator.itemgetter`, :func:`~operator.attrgetter`, et :func:" -"`~operator.methodcaller`." +"L'utilisation des :term:`fonctions clefs ` ci-dessus est " +"courante, donc Python fournit des fonctions permettant de rendre plus simple " +"et plus rapide l'usage des accesseurs. Le module :mod:`operator` contient " +"les fonctions :func:`~operator.itemgetter`, :func:`~operator.attrgetter`, " +"et :func:`~operator.methodcaller`." -#: howto/sorting.rst:111 +#: howto/sorting.rst:114 msgid "Using those functions, the above examples become simpler and faster:" msgstr "" "En utilisant ces fonctions, les exemples au dessus deviennent plus simples " "et plus rapides :" -#: howto/sorting.rst:123 +#: howto/sorting.rst:126 msgid "" "The operator module functions allow multiple levels of sorting. For example, " "to sort by *grade* then by *age*:" @@ -165,7 +169,7 @@ msgstr "" "Les fonctions du module *operator* permettent plusieurs niveaux de tri. Par " "exemple, pour trier par *grade* puis par *age* :" -#: howto/sorting.rst:134 +#: howto/sorting.rst:137 msgid "" "The :mod:`functools` module provides another helpful tool for making key-" "functions. The :func:`~functools.partial` function can reduce the `arity " @@ -173,11 +177,11 @@ msgid "" "it suitable for use as a key-function." msgstr "" -#: howto/sorting.rst:153 +#: howto/sorting.rst:156 msgid "Ascending and Descending" msgstr "Ascendant et descendant" -#: howto/sorting.rst:155 +#: howto/sorting.rst:158 msgid "" "Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with " "a boolean value. This is used to flag descending sorts. For example, to get " @@ -188,11 +192,11 @@ msgstr "" "des tris. Par exemple, pour avoir les données des étudiants dans l'ordre " "inverse par *age* :" -#: howto/sorting.rst:168 +#: howto/sorting.rst:171 msgid "Sort Stability and Complex Sorts" msgstr "Stabilité des tris et tris complexes" -#: howto/sorting.rst:170 +#: howto/sorting.rst:173 msgid "" "Sorts are guaranteed to be `stable `_\\. That means that when multiple records have " @@ -202,7 +206,7 @@ msgstr "" "Algorithme_de_tri#Caract.C3.A8re_stable>`_\\. Cela signifie que lorsque " "plusieurs enregistrements on la même clef, leur ordre original est préservé." -#: howto/sorting.rst:180 +#: howto/sorting.rst:183 msgid "" "Notice how the two records for *blue* retain their original order so that " "``('blue', 1)`` is guaranteed to precede ``('blue', 2)``." @@ -211,7 +215,7 @@ msgstr "" "et que par conséquent il est garanti que ``('blue', 1)`` précède ``('blue', " "2)``." -#: howto/sorting.rst:183 +#: howto/sorting.rst:186 msgid "" "This wonderful property lets you build complex sorts in a series of sorting " "steps. For example, to sort the student data by descending *grade* and then " @@ -222,7 +226,7 @@ msgstr "" "des étudiants en ordre descendant par *grade* puis en ordre ascendant par " "*age*, effectuez un tri par *age* en premier puis un second tri par *grade* :" -#: howto/sorting.rst:193 +#: howto/sorting.rst:196 msgid "" "This can be abstracted out into a wrapper function that can take a list and " "tuples of field and order to sort them on multiple passes." @@ -230,7 +234,7 @@ msgstr "" "Ceci peut être encapsulé dans une fonction qui prend une liste et des n-" "uplets (attribut, ordre) pour les trier en plusieurs passes." -#: howto/sorting.rst:206 +#: howto/sorting.rst:209 msgid "" "The `Timsort `_ algorithm used in " "Python does multiple sorts efficiently because it can take advantage of any " @@ -240,18 +244,17 @@ msgstr "" "Python effectue de multiples tris efficacement parce qu'il peut tirer " "avantage de l'ordre existant dans un jeu de données." -#: howto/sorting.rst:211 -#, fuzzy +#: howto/sorting.rst:214 msgid "Decorate-Sort-Undecorate" -msgstr "La méthode traditionnelle utilisant Decorate-Sort-Undecorate" +msgstr "La méthode *Decorate-Sort-Undecorate*" -#: howto/sorting.rst:213 +#: howto/sorting.rst:216 msgid "This idiom is called Decorate-Sort-Undecorate after its three steps:" msgstr "" -"Cette technique est appelée Decorate-Sort-Undecorate et se base sur trois " +"Cette technique est appelée *Decorate-Sort-Undecorate* et se base sur trois " "étapes :" -#: howto/sorting.rst:215 +#: howto/sorting.rst:218 msgid "" "First, the initial list is decorated with new values that control the sort " "order." @@ -259,11 +262,11 @@ msgstr "" "Premièrement, la liste de départ est décorée avec les nouvelles valeurs qui " "contrôlent l'ordre du tri." -#: howto/sorting.rst:217 +#: howto/sorting.rst:220 msgid "Second, the decorated list is sorted." msgstr "En second lieu, la liste décorée est triée." -#: howto/sorting.rst:219 +#: howto/sorting.rst:222 msgid "" "Finally, the decorations are removed, creating a list that contains only the " "initial values in the new order." @@ -271,14 +274,14 @@ msgstr "" "Enfin, la décoration est supprimée, créant ainsi une liste qui contient " "seulement la valeur initiale dans le nouvel ordre." -#: howto/sorting.rst:222 +#: howto/sorting.rst:225 msgid "" "For example, to sort the student data by *grade* using the DSU approach:" msgstr "" "Par exemple, pour trier les données étudiant par *grade* en utilisant " "l'approche DSU :" -#: howto/sorting.rst:231 +#: howto/sorting.rst:234 msgid "" "This idiom works because tuples are compared lexicographically; the first " "items are compared; if they are the same then the second items are compared, " @@ -288,7 +291,7 @@ msgstr "" "lexicographique; les premiers objets sont comparés; si il y a des objets " "identiques, alors l'objet suivant est comparé, et ainsi de suite." -#: howto/sorting.rst:235 +#: howto/sorting.rst:238 msgid "" "It is not strictly necessary in all cases to include the index *i* in the " "decorated list, but including it gives two benefits:" @@ -296,7 +299,7 @@ msgstr "" "Il n'est pas strictement nécessaire dans tous les cas d’inclure l'indice *i* " "dans la liste décorée, mais l'inclure donne deux avantages :" -#: howto/sorting.rst:238 +#: howto/sorting.rst:241 msgid "" "The sort is stable -- if two items have the same key, their order will be " "preserved in the sorted list." @@ -304,7 +307,7 @@ msgstr "" "Le tri est stable -- si deux objets on la même clef, leur ordre sera " "préservé dans la liste triée." -#: howto/sorting.rst:241 +#: howto/sorting.rst:244 msgid "" "The original items do not have to be comparable because the ordering of the " "decorated tuples will be determined by at most the first two items. So for " @@ -316,17 +319,17 @@ msgstr "" "par exemple la liste originale pourrait contenir des nombres complexes qui " "pourraient ne pas être triés directement." -#: howto/sorting.rst:246 +#: howto/sorting.rst:249 msgid "" -"Another name for this idiom is `Schwartzian transform `_\\, after Randal L. Schwartz, who " -"popularized it among Perl programmers." +"Another name for this idiom is `Schwartzian transform `_\\, after Randal L. Schwartz, " +"who popularized it among Perl programmers." msgstr "" -"Un autre nom pour cette technique est `Schwartzian transform `_\\, après que Randal L. Schwartz " -"l'ait popularisé chez les développeurs Perl." +"Un autre nom pour cette technique est `Schwartzian transform `_\\, après que Randal L. " +"Schwartz l'ait popularisé chez les développeurs Perl." -#: howto/sorting.rst:250 +#: howto/sorting.rst:253 msgid "" "Now that Python sorting provides key-functions, this technique is not often " "needed." @@ -334,18 +337,20 @@ msgstr "" "Maintenant que le tri Python fournit des fonctions-clef, cette technique " "n'est plus souvent utilisée." -#: howto/sorting.rst:253 -#, fuzzy +#: howto/sorting.rst:256 msgid "Comparison Functions" -msgstr "Fonctions du module *operator*" +msgstr "Fonctions de comparaison" -#: howto/sorting.rst:255 +#: howto/sorting.rst:258 msgid "" "Unlike key functions that return an absolute value for sorting, a comparison " "function computes the relative ordering for two inputs." msgstr "" +"Contrairement aux fonctions clés qui renvoient une valeur absolue sur " +"laquelle baser le tri, une fonction de comparaison calcule l'ordre relatif " +"entre deux entrées." -#: howto/sorting.rst:258 +#: howto/sorting.rst:261 msgid "" "For example, a `balance scale `_ compares two samples giving a " @@ -353,38 +358,108 @@ msgid "" "function such as ``cmp(a, b)`` will return a negative value for less-than, " "zero if the inputs are equal, or a positive value for greater-than." msgstr "" +"Par exemple, une `balance `_ compare deux échantillons en donnant un " +"classement relatif : plus léger, égal ou plus lourd. De la même manière, une " +"fonction de comparaison telle que ``cmp(a, b)`` donne un résultat négatif si " +"la première valeur est plus petite, zéro si les deux valeurs sont égales, et " +"un résultat positif si la première valeur est plus grande." -#: howto/sorting.rst:265 +#: howto/sorting.rst:268 msgid "" "It is common to encounter comparison functions when translating algorithms " "from other languages. Also, some libraries provide comparison functions as " "part of their API. For example, :func:`locale.strcoll` is a comparison " "function." msgstr "" +"Il est fréquent de rencontrer des fonctions de comparaison lorsqu'on traduit " +"des algorithmes à partir d'autres langages. Aussi, certaines bibliothèques " +"fournissent des fonctions de comparaison intégrées dans leurs API, " +"comme :func:`locale.strcoll` par exemple." + +#: howto/sorting.rst:272 +msgid "" +"To accommodate those situations, Python " +"provides :class:`functools.cmp_to_key` to wrap the comparison function to " +"make it usable as a key function::" +msgstr "" +"Pour remédier à ces situations, Python fournit :class:`functools.cmp_to_key` " +"pour transformer une fonction de comparaison en une fonction clé ::" + +#: howto/sorting.rst:279 +msgid "Strategies For Unorderable Types and Values" +msgstr "" -#: howto/sorting.rst:269 +#: howto/sorting.rst:281 msgid "" -"To accommodate those situations, Python provides :class:`functools." -"cmp_to_key` to wrap the comparison function to make it usable as a key " -"function::" +"A number of type and value issues can arise when sorting. Here are some " +"strategies that can help:" msgstr "" -#: howto/sorting.rst:276 +#: howto/sorting.rst:284 +msgid "Convert non-comparable input types to strings prior to sorting:" +msgstr "" + +#: howto/sorting.rst:292 +msgid "" +"This is needed because most cross-type comparisons raise a :exc:`TypeError`." +msgstr "" + +#: howto/sorting.rst:295 +msgid "Remove special values prior to sorting:" +msgstr "" + +#: howto/sorting.rst:305 +msgid "" +"This is needed because the `IEEE-754 standard `_ specifies that, \"Every NaN shall compare unordered with " +"everything, including itself.\"" +msgstr "" + +#: howto/sorting.rst:309 +msgid "Likewise, ``None`` can be stripped from datasets as well:" +msgstr "" + +#: howto/sorting.rst:317 +msgid "This is needed because ``None`` is not comparable to other types." +msgstr "" + +#: howto/sorting.rst:319 +msgid "Convert mapping types into sorted item lists before sorting:" +msgstr "" + +#: howto/sorting.rst:327 +msgid "" +"This is needed because dict-to-dict comparisons raise a :exc:`TypeError`." +msgstr "" + +#: howto/sorting.rst:330 +msgid "Convert set types into sorted lists before sorting:" +msgstr "" + +#: howto/sorting.rst:338 +msgid "" +"This is needed because the elements contained in set types do not have a " +"deterministic order. For example, ``list({'a', 'b'})`` may produce either " +"``['a', 'b']`` or ``['b', 'a']``." +msgstr "" + +#: howto/sorting.rst:343 msgid "Odds and Ends" -msgstr "Et n'oublions pas" +msgstr "Notes complémentaires" -#: howto/sorting.rst:278 +#: howto/sorting.rst:345 #, fuzzy msgid "" -"For locale aware sorting, use :func:`locale.strxfrm` for a key function or :" -"func:`locale.strcoll` for a comparison function. This is necessary because " -"\"alphabetical\" sort orderings can vary across cultures even if the " +"For locale aware sorting, use :func:`locale.strxfrm` for a key function " +"or :func:`locale.strcoll` for a comparison function. This is necessary " +"because \"alphabetical\" sort orderings can vary across cultures even if the " "underlying alphabet is the same." msgstr "" "Pour du tri de texte localisé, utilisez :func:`locale.strxfrm` en tant que " "fonction clef ou :func:`locale.strcoll` comme fonction de comparaison." -#: howto/sorting.rst:283 +#: howto/sorting.rst:350 msgid "" "The *reverse* parameter still maintains sort stability (so that records with " "equal keys retain the original order). Interestingly, that effect can be " @@ -396,27 +471,27 @@ msgstr "" "cet effet peut être simulé sans le paramètre en utilisant la fonction " "native :func:`reversed` deux fois :" -#: howto/sorting.rst:297 +#: howto/sorting.rst:364 #, fuzzy msgid "" "The sort routines use ``<`` when making comparisons between two objects. So, " -"it is easy to add a standard sort order to a class by defining an :meth:" -"`~object.__lt__` method:" +"it is easy to add a standard sort order to a class by defining " +"an :meth:`~object.__lt__` method:" msgstr "" "Pour effectuer les comparaisons entre deux objets, les routines de tri " "utilisent l'opérateur ``<``. Il est donc facile d'ajouter un ordre de tri " "standard à une classe en définissant sa méthode :meth:`__lt__` :" -#: howto/sorting.rst:307 +#: howto/sorting.rst:374 msgid "" -"However, note that ``<`` can fall back to using :meth:`~object.__gt__` if :" -"meth:`~object.__lt__` is not implemented (see :func:`object.__lt__` for " +"However, note that ``<`` can fall back to using :meth:`~object.__gt__` " +"if :meth:`~object.__lt__` is not implemented (see :func:`object.__lt__` for " "details on the mechanics). To avoid surprises, :pep:`8` recommends that all " "six comparison methods be implemented. The :func:`~functools.total_ordering` " "decorator is provided to make that task easier." msgstr "" -#: howto/sorting.rst:314 +#: howto/sorting.rst:381 msgid "" "Key functions need not depend directly on the objects being sorted. A key " "function can also access external resources. For instance, if the student " @@ -429,24 +504,24 @@ msgstr "" "ils peuvent être utilisés pour trier une liste différentes de noms " "d'étudiants :" -#: howto/sorting.rst:327 +#: howto/sorting.rst:394 msgid "Partial Sorts" msgstr "" -#: howto/sorting.rst:329 +#: howto/sorting.rst:396 msgid "" "Some applications require only some of the data to be ordered. The standard " "library provides several tools that do less work than a full sort:" msgstr "" -#: howto/sorting.rst:332 +#: howto/sorting.rst:399 msgid "" ":func:`min` and :func:`max` return the smallest and largest values, " "respectively. These functions make a single pass over the input data and " "require almost no auxiliary memory." msgstr "" -#: howto/sorting.rst:336 +#: howto/sorting.rst:403 msgid "" ":func:`heapq.nsmallest` and :func:`heapq.nlargest` return the *n* smallest " "and largest values, respectively. These functions make a single pass over " @@ -455,7 +530,7 @@ msgid "" "fewer comparisons than a full sort." msgstr "" -#: howto/sorting.rst:342 +#: howto/sorting.rst:409 msgid "" ":func:`heapq.heappush` and :func:`heapq.heappop` create and maintain a " "partially sorted arrangement of data that keeps the smallest element at " @@ -477,9 +552,9 @@ msgstr "" #~ "However, note that ``<`` can fall back to using :meth:`~object.__gt__` " #~ "if :meth:`~object.__lt__` is not implemented (see :func:`object.__lt__`)." #~ msgstr "" -#~ "Notez toutefois que l'opérateur ``<`` peut utiliser la méthode :meth:" -#~ "`__gt__` si :meth:`__lt__` n'est pas implémentée ; voir :func:`object." -#~ "__lt__`." +#~ "Notez toutefois que l'opérateur ``<`` peut utiliser la " +#~ "méthode :meth:`__gt__` si :meth:`__lt__` n'est pas implémentée ; " +#~ "voir :func:`object.__lt__`." #~ msgid "The Old Way Using the *cmp* Parameter" #~ msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*" @@ -504,8 +579,8 @@ msgstr "" #~ msgstr "" #~ "En Py3.0, le paramètre *cmp* à été supprimé complètement (dans le cadre " #~ "d'un effort plus général pour simplifier et unifier le langage, en " -#~ "éliminant le conflit entre les comparaisons riches et la méthode magique :" -#~ "meth:`__cmp__`)." +#~ "éliminant le conflit entre les comparaisons riches et la méthode " +#~ "magique :meth:`__cmp__`)." #~ msgid "" #~ "In Py2.x, sort allowed an optional function which can be called for doing " diff --git a/howto/timerfd.po b/howto/timerfd.po index 1bb3e6771..0e68fde37 100644 --- a/howto/timerfd.po +++ b/howto/timerfd.po @@ -1,7 +1,5 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" diff --git a/howto/unicode.po b/howto/unicode.po index 358f121d9..512c69044 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-26 17:48+0200\n" "Last-Translator: Mathieu Dupuy\n" "Language-Team: FRENCH \n" @@ -101,10 +101,10 @@ msgstr "" msgid "" "The Unicode standard describes how characters are represented by **code " "points**. A code point value is an integer in the range 0 to 0x10FFFF " -"(about 1.1 million values, the `actual number assigned `_ is less than that). In the standard and in " -"this document, a code point is written using the notation ``U+265E`` to mean " -"the character with value ``0x265e`` (9,822 in decimal)." +"(about 1.1 million values, the `actual number assigned `_ is less than that). In the " +"standard and in this document, a code point is written using the notation " +"``U+265E`` to mean the character with value ``0x265e`` (9,822 in decimal)." msgstr "" "Le standard Unicode décrit comment les caractères sont représentés par les " "**points de code**. Une valeur de point de code est un nombre entier compris " @@ -328,7 +328,7 @@ msgstr "" "processeurs (*words*), comme UTF-16 et UTF-32, où la séquence des octets " "varie en fonction du matériel sur lequel la chaîne a été encodée." -#: howto/unicode.rst:514 howto/unicode.rst:735 +#: howto/unicode.rst:516 howto/unicode.rst:737 msgid "References" msgstr "Références" @@ -368,14 +368,14 @@ msgstr "" #: howto/unicode.rst:173 msgid "" -"Another `good introductory article `_ was " "written by Joel Spolsky. If this introduction didn't make things clear to " "you, you should try reading this alternate article before continuing." msgstr "" -"Un autre `bon article d'introduction `_ a été " "écrit par Joel Spolsky. Si cette présente introduction ne vous a pas " "clarifié les choses, vous devriez essayer de lire cet article-là avant de " @@ -453,10 +453,10 @@ msgid "" "of :class:`bytes`. This method takes an *encoding* argument, such as " "``UTF-8``, and optionally an *errors* argument." msgstr "" -"De plus, une chaîne de caractères peut être créée en utilisant la méthode :" -"func:`~bytes.decode` de la classe :class:`bytes`. Cette méthode prend un " -"argument *encoding*, ``UTF-8`` par exemple, et optionnellement un argument " -"*errors*." +"De plus, une chaîne de caractères peut être créée en utilisant la " +"méthode :func:`~bytes.decode` de la classe :class:`bytes`. Cette méthode " +"prend un argument *encoding*, ``UTF-8`` par exemple, et optionnellement un " +"argument *errors*." #: howto/unicode.rst:228 msgid "" @@ -470,12 +470,12 @@ msgid "" msgstr "" "L'argument *errors* détermine la réponse lorsque la chaîne en entrée ne peut " "pas être convertie selon les règles de l'encodage. Les valeurs autorisées " -"pour cet argument sont ``'strict'`` (« strict » : lève une exception :exc:" -"`UnicodeDecodeError`), ``'replace'`` (« remplacer » : utilise ``U+FFFD``, " -"``REPLACEMENT CARACTER``), ``'ignore'`` (« ignorer » : n'inclut pas le " -"caractère dans le résultat Unicode) ou ``'backslashreplace'`` (« remplacer " -"avec antislash » : insère une séquence d’échappement ``\\xNN``). Les " -"exemples suivants illustrent les différences ::" +"pour cet argument sont ``'strict'`` (« strict » : lève une " +"exception :exc:`UnicodeDecodeError`), ``'replace'`` (« remplacer » : utilise " +"``U+FFFD``, ``REPLACEMENT CARACTER``), ``'ignore'`` (« ignorer » : n'inclut " +"pas le caractère dans le résultat Unicode) ou ``'backslashreplace'`` " +"(« remplacer avec antislash » : insère une séquence d’échappement " +"``\\xNN``). Les exemples suivants illustrent les différences ::" #: howto/unicode.rst:248 msgid "" @@ -487,8 +487,8 @@ msgid "" msgstr "" "Les encodages sont spécifiés sous forme de chaînes de caractères contenant " "le nom de l'encodage. Python est livré avec une centaine d'encodages " -"différents ; voir la référence de la bibliothèque Python sur les :ref:" -"`encodages standards ` pour une liste. Certains " +"différents ; voir la référence de la bibliothèque Python sur " +"les :ref:`encodages standards ` pour une liste. Certains " "encodages ont plusieurs noms ; par exemple, ``'latin-1'``, ``'iso_8859_1'`` " "et ``'8859'`` sont tous synonymes du même encodage." @@ -522,21 +522,21 @@ msgstr "" #: howto/unicode.rst:272 msgid "" -"The *errors* parameter is the same as the parameter of the :meth:`~bytes." -"decode` method but supports a few more possible handlers. As well as " -"``'strict'``, ``'ignore'``, and ``'replace'`` (which in this case inserts a " -"question mark instead of the unencodable character), there is also " +"The *errors* parameter is the same as the parameter of " +"the :meth:`~bytes.decode` method but supports a few more possible handlers. " +"As well as ``'strict'``, ``'ignore'``, and ``'replace'`` (which in this case " +"inserts a question mark instead of the unencodable character), there is also " "``'xmlcharrefreplace'`` (inserts an XML character reference), " "``backslashreplace`` (inserts a ``\\uNNNN`` escape sequence) and " "``namereplace`` (inserts a ``\\N{...}`` escape sequence)." msgstr "" -"Le paramètre *errors* est le même que le paramètre de la méthode :meth:" -"`~bytes.decode` mais possède quelques gestionnaires supplémentaires. En plus " -"de ``'strict'``, ``'ignore'`` et ``'remplace'`` (qui dans ce cas insère un " -"point d'interrogation au lieu du caractère non encodable), il y a aussi " -"``'xmlcharrefreplace'`` (insère une référence XML), ``backslashreplace`` " -"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence " -"``\\N{...}``)." +"Le paramètre *errors* est le même que le paramètre de la " +"méthode :meth:`~bytes.decode` mais possède quelques gestionnaires " +"supplémentaires. En plus de ``'strict'``, ``'ignore'`` et ``'remplace'`` " +"(qui dans ce cas insère un point d'interrogation au lieu du caractère non " +"encodable), il y a aussi ``'xmlcharrefreplace'`` (insère une référence XML), " +"``backslashreplace`` (insère une séquence ``\\uNNNN``) et ``namereplace`` " +"(insère une séquence ``\\N{...}``)." #: howto/unicode.rst:280 msgid "The following example shows the different results::" @@ -553,11 +553,11 @@ msgid "" msgstr "" "Les routines de bas niveau pour enregistrer et accéder aux encodages " "disponibles se trouvent dans le module :mod:`codecs`. L'implémentation de " -"nouveaux encodages nécessite également de comprendre le module :mod:" -"`codecs`. Cependant, les fonctions d'encodage et de décodage renvoyées par " -"ce module sont généralement de bas-niveau pour être facilement utilisées et " -"l'écriture de nouveaux encodages est une tâche très spécialisée, donc le " -"module ne sera pas couvert dans ce guide." +"nouveaux encodages nécessite également de comprendre le " +"module :mod:`codecs`. Cependant, les fonctions d'encodage et de décodage " +"renvoyées par ce module sont généralement de bas-niveau pour être facilement " +"utilisées et l'écriture de nouveaux encodages est une tâche très " +"spécialisée, donc le module ne sera pas couvert dans ce guide." #: howto/unicode.rst:310 msgid "Unicode Literals in Python Source Code" @@ -637,11 +637,11 @@ msgstr "" "Si vous n'incluez pas un tel commentaire, l'encodage par défaut est UTF-8 " "comme déjà mentionné. Voir aussi la :pep:`263` pour plus d'informations." -#: howto/unicode.rst:356 +#: howto/unicode.rst:358 msgid "Unicode Properties" msgstr "Propriétés Unicode" -#: howto/unicode.rst:358 +#: howto/unicode.rst:360 msgid "" "The Unicode specification includes a database of information about code " "points. For each defined code point, the information includes the " @@ -658,7 +658,7 @@ msgstr "" "existe également des propriétés liées à l'affichage, telles que " "l'utilisation du point de code dans un texte bidirectionnel." -#: howto/unicode.rst:366 +#: howto/unicode.rst:368 msgid "" "The following program displays some information about several characters, " "and prints the numeric value of one particular character::" @@ -666,11 +666,11 @@ msgstr "" "Le programme suivant affiche des informations sur plusieurs caractères et " "affiche la valeur numérique d'un caractère particulier ::" -#: howto/unicode.rst:380 +#: howto/unicode.rst:382 msgid "When run, this prints:" msgstr "Si vous l'exécutez, cela affiche :" -#: howto/unicode.rst:391 +#: howto/unicode.rst:393 msgid "" "The category codes are abbreviations describing the nature of the character. " "These are grouped into categories such as \"Letter\", \"Number\", " @@ -678,9 +678,9 @@ msgid "" "subcategories. To take the codes from the above output, ``'Ll'`` means " "'Letter, lowercase', ``'No'`` means \"Number, other\", ``'Mn'`` is \"Mark, " "nonspacing\", and ``'So'`` is \"Symbol, other\". See `the General Category " -"Values section of the Unicode Character Database documentation `_ for a list of category " -"codes." +"Values section of the Unicode Character Database documentation `_ for a list of " +"category codes." msgstr "" "Les codes de catégorie sont des abréviations décrivant la nature du " "caractère. Celles-ci sont regroupées en catégories telles que « Lettre », " @@ -689,15 +689,15 @@ msgstr "" "``'Ll'`` signifie « Lettre, minuscules », ``'No'`` signifie « Nombre, " "autre », ``'Mn'`` est « Marque, non-espaçant », et ``'So'`` est « Symbole, " "autre ». Voir la section `Valeurs générales des catégories de la " -"documentation de la base de données de caractères Unicode `_ (ressource en anglais) " -"pour une liste de codes de catégories." +"documentation de la base de données de caractères Unicode `_ (ressource en " +"anglais) pour une liste de codes de catégories." -#: howto/unicode.rst:402 +#: howto/unicode.rst:404 msgid "Comparing Strings" msgstr "Comparaison de chaînes de caractères" -#: howto/unicode.rst:404 +#: howto/unicode.rst:406 msgid "" "Unicode adds some complication to comparing strings, because the same set of " "characters can be represented by different sequences of code points. For " @@ -715,7 +715,7 @@ msgstr "" "résultat lorsqu'elles sont affichées, mais l'une est une chaîne de " "caractères de longueur 1 et l'autre de longueur 2." -#: howto/unicode.rst:412 +#: howto/unicode.rst:414 msgid "" "One tool for a case-insensitive comparison is the :meth:`~str.casefold` " "string method that converts a string to a case-insensitive form following an " @@ -723,36 +723,35 @@ msgid "" "handling for characters such as the German letter 'ß' (code point U+00DF), " "which becomes the pair of lowercase letters 'ss'." msgstr "" -"Un outil pour une comparaison insensible à la casse est la méthode :meth:" -"`~str.casefold` qui convertit une chaîne en une forme insensible à la casse " -"suivant un algorithme décrit par le standard Unicode. Cet algorithme a un " -"traitement spécial pour les caractères tels que la lettre allemande « *ß* » " -"(point de code ``U+00DF``), qui devient la paire de lettres minuscules " -"« *ss* »." - -#: howto/unicode.rst:425 -#, fuzzy -msgid "" -"A second tool is the :mod:`unicodedata` module's :func:`~unicodedata." -"normalize` function that converts strings to one of several normal forms, " -"where letters followed by a combining character are replaced with single " -"characters. :func:`~unicodedata.normalize` can be used to perform string " -"comparisons that won't falsely report inequality if two strings use " -"combining characters differently:" -msgstr "" -"Un deuxième outil est la fonction :mod:`unicodedata` du module :func:" -"`~unicodedata.normalize` qui convertit les chaînes de caractères en l'une de " -"plusieurs formes normales, où les lettres suivies d'un caractère de " -"combinaison sont remplacées par des caractères simples. :func:`normalize` " -"peut être utilisée pour effectuer des comparaisons qui ne rapportent pas " -"faussement les inégalités si deux chaînes utilisent différents caractères de " -"combinaison :" - -#: howto/unicode.rst:448 +"Un outil pour une comparaison insensible à la casse est la " +"méthode :meth:`~str.casefold` qui convertit une chaîne en une forme " +"insensible à la casse suivant un algorithme décrit par le standard Unicode. " +"Cet algorithme a un traitement spécial pour les caractères tels que la " +"lettre allemande « *ß* » (point de code ``U+00DF``), qui devient la paire de " +"lettres minuscules « *ss* »." + +#: howto/unicode.rst:427 +msgid "" +"A second tool is the :mod:`unicodedata` " +"module's :func:`~unicodedata.normalize` function that converts strings to " +"one of several normal forms, where letters followed by a combining character " +"are replaced with single characters. :func:`~unicodedata.normalize` can be " +"used to perform string comparisons that won't falsely report inequality if " +"two strings use combining characters differently:" +msgstr "" +"Un deuxième outil est la fonction :mod:`unicodedata` du " +"module :func:`~unicodedata.normalize` qui convertit les chaînes de " +"caractères en l'une de plusieurs formes normales, où les lettres suivies " +"d'un caractère de combinaison sont remplacées par des caractères " +"simples. :func:`~unicodedata.normalize` peut être utilisée pour effectuer " +"des comparaisons qui ne rapportent pas faussement les inégalités si deux " +"chaînes utilisent différents caractères de combinaison :" + +#: howto/unicode.rst:450 msgid "When run, this outputs:" msgstr "Si vous l'exécutez, cela affiche :" -#: howto/unicode.rst:457 +#: howto/unicode.rst:459 msgid "" "The first argument to the :func:`~unicodedata.normalize` function is a " "string giving the desired normalization form, which can be one of 'NFC', " @@ -762,30 +761,30 @@ msgstr "" "chaîne de caractères donnant la forme de normalisation désirée, qui peut " "être une de celles-ci : ``'NFC'``, ``'NFKC'``, ``'NFD'`` et ``'NFKD'``." -#: howto/unicode.rst:461 +#: howto/unicode.rst:463 msgid "The Unicode Standard also specifies how to do caseless comparisons::" msgstr "" "La norme Unicode spécifie également comment faire des comparaisons " "insensibles à la casse ::" -#: howto/unicode.rst:477 -#, fuzzy +#: howto/unicode.rst:479 msgid "" "This will print ``True``. (Why is :func:`!NFD` invoked twice? Because " "there are a few characters that make :meth:`~str.casefold` return a non-" "normalized string, so the result needs to be normalized again. See section " "3.13 of the Unicode Standard for a discussion and an example.)" msgstr "" -"Ceci affiche ``True``. (Pourquoi :func:`NFD` est-il invoqué deux fois ? " -"Parce qu'il y a quelques caractères qui font que :meth:`casefold` renvoie " -"une chaîne non normalisée, donc le résultat doit être normalisé à nouveau. " -"Voir la section 3.13 du standard Unicode pour une discussion et un exemple)." +"Ceci affiche ``True``. (Pourquoi :func:`!NFD` est-il invoqué deux fois ? " +"Parce qu'il y a quelques caractères qui font que :meth:`~str.casefold` " +"renvoie une chaîne non normalisée, donc le résultat doit être normalisé à " +"nouveau. Voir la section 3.13 du standard Unicode pour une discussion et un " +"exemple)." -#: howto/unicode.rst:484 +#: howto/unicode.rst:486 msgid "Unicode Regular Expressions" msgstr "Expressions régulières Unicode" -#: howto/unicode.rst:486 +#: howto/unicode.rst:488 msgid "" "The regular expressions supported by the :mod:`re` module can be provided " "either as bytes or strings. Some of the special character sequences such as " @@ -801,7 +800,7 @@ msgstr "" "exemple, ``\\d`` correspond aux caractères ``[0-9]`` en octets mais dans les " "chaînes de caractères correspond à tout caractère de la catégorie ``'Nd'``." -#: howto/unicode.rst:493 +#: howto/unicode.rst:495 msgid "" "The string in this example has the number 57 written in both Thai and Arabic " "numerals::" @@ -809,17 +808,17 @@ msgstr "" "Dans cet exemple, la chaîne contient le nombre 57 écrit en chiffres arabes " "et thaïlandais ::" -#: howto/unicode.rst:503 +#: howto/unicode.rst:505 msgid "" "When executed, ``\\d+`` will match the Thai numerals and print them out. If " "you supply the :const:`re.ASCII` flag to :func:`~re.compile`, ``\\d+`` will " "match the substring \"57\" instead." msgstr "" "Une fois exécuté, ``\\d+`` correspond aux chiffres thaïlandais et les " -"affiche. Si vous fournissez le drapeau :const:`re.ASCII` à :func:`~re." -"compile`, ``\\d+`` correspond cette fois à la chaîne \"57\"." +"affiche. Si vous fournissez le drapeau :const:`re.ASCII` " +"à :func:`~re.compile`, ``\\d+`` correspond cette fois à la chaîne \"57\"." -#: howto/unicode.rst:507 +#: howto/unicode.rst:509 msgid "" "Similarly, ``\\w`` matches a wide variety of Unicode characters but only " "``[a-zA-Z0-9_]`` in bytes or if :const:`re.ASCII` is supplied, and ``\\s`` " @@ -830,21 +829,23 @@ msgstr "" "``\\s`` correspond soit aux caractères blancs Unicode soit aux caractères " "``[ \\t\\n\\r\\f\\v]``." -#: howto/unicode.rst:518 +#: howto/unicode.rst:520 msgid "Some good alternative discussions of Python's Unicode support are:" msgstr "" "Quelques bonnes discussions alternatives sur la gestion d'Unicode par Python " "sont :" -#: howto/unicode.rst:520 +#: howto/unicode.rst:522 msgid "" -"`Processing Text Files in Python 3 `_, by Nick Coghlan." +"`Processing Text Files in Python 3 `_, " +"by Nick Coghlan." msgstr "" -"`Processing Text Files in Python 3 `_, par Nick Coghlan." +"`Processing Text Files in Python 3 `_, " +"par Nick Coghlan." -#: howto/unicode.rst:521 +#: howto/unicode.rst:523 msgid "" "`Pragmatic Unicode `_, a PyCon " "2012 presentation by Ned Batchelder." @@ -852,23 +853,23 @@ msgstr "" "`Pragmatic Unicode `_, une " "présentation *PyCon* 2012 par Ned Batchelder." -#: howto/unicode.rst:523 +#: howto/unicode.rst:525 msgid "" -"The :class:`str` type is described in the Python library reference at :ref:" -"`textseq`." +"The :class:`str` type is described in the Python library reference " +"at :ref:`textseq`." msgstr "" "Le type :class:`str` est décrit dans la référence de la bibliothèque Python " "à :ref:`textseq`." -#: howto/unicode.rst:526 +#: howto/unicode.rst:528 msgid "The documentation for the :mod:`unicodedata` module." msgstr "La documentation du module :mod:`unicodedata`." -#: howto/unicode.rst:528 +#: howto/unicode.rst:530 msgid "The documentation for the :mod:`codecs` module." msgstr "La documentation du module :mod:`codecs`." -#: howto/unicode.rst:530 +#: howto/unicode.rst:532 msgid "" "Marc-André Lemburg gave `a presentation titled \"Python and Unicode\" (PDF " "slides) `_ at " @@ -877,16 +878,16 @@ msgid "" "``unicode`` and literals start with ``u``)." msgstr "" "Marc-André Lemburg a donné une présentation intitulée `« Python et Unicode » " -"(diapositives PDF) `_ à *EuroPython* 2002. Les diapositives sont un excellent aperçu de la " -"conception des fonctionnalités Unicode de Python 2 (où le type de chaîne " -"Unicode est appelé ``unicode`` et les littéraux commencent par ``u``)." +"(diapositives PDF) `_ à *EuroPython* 2002. Les diapositives sont un excellent aperçu " +"de la conception des fonctionnalités Unicode de Python 2 (où le type de " +"chaîne Unicode est appelé ``unicode`` et les littéraux commencent par ``u``)." -#: howto/unicode.rst:538 +#: howto/unicode.rst:540 msgid "Reading and Writing Unicode Data" msgstr "Lecture et écriture de données Unicode" -#: howto/unicode.rst:540 +#: howto/unicode.rst:542 msgid "" "Once you've written some code that works with Unicode data, the next problem " "is input/output. How do you get Unicode strings into your program, and how " @@ -897,7 +898,7 @@ msgstr "" "des chaînes Unicode dans votre programme et comment convertir les chaînes " "Unicode dans une forme appropriée pour le stockage ou la transmission ?" -#: howto/unicode.rst:544 +#: howto/unicode.rst:546 msgid "" "It's possible that you may not need to do anything depending on your input " "sources and output destinations; you should check whether the libraries used " @@ -913,7 +914,7 @@ msgstr "" "également en charge les colonnes encodées en Unicode et peuvent renvoyer des " "valeurs Unicode à partir d'une requête SQL." -#: howto/unicode.rst:550 +#: howto/unicode.rst:552 msgid "" "Unicode data is usually converted to a particular encoding before it gets " "written to disk or sent over a socket. It's possible to do all the work " @@ -927,7 +928,7 @@ msgstr "" "élément 8-bits, puis convertir les octets avec ``bytes.decode(encoding)``. " "Cependant, l'approche manuelle n'est pas recommandée." -#: howto/unicode.rst:555 +#: howto/unicode.rst:557 msgid "" "One problem is the multi-byte nature of encodings; one Unicode character can " "be represented by several bytes. If you want to read the file in arbitrary-" @@ -952,7 +953,7 @@ msgstr "" "pendant un moment, vous aurez besoin d'avoir à la fois la chaîne encodée et " "sa version Unicode en mémoire)." -#: howto/unicode.rst:565 +#: howto/unicode.rst:567 msgid "" "The solution would be to use the low-level decoding interface to catch the " "case of partial coding sequences. The work of implementing this has already " @@ -960,24 +961,24 @@ msgid "" "object that assumes the file's contents are in a specified encoding and " "accepts Unicode parameters for methods such as :meth:`~io.TextIOBase.read` " "and :meth:`~io.TextIOBase.write`. This works through :func:`open`\\'s " -"*encoding* and *errors* parameters which are interpreted just like those in :" -"meth:`str.encode` and :meth:`bytes.decode`." +"*encoding* and *errors* parameters which are interpreted just like those " +"in :meth:`str.encode` and :meth:`bytes.decode`." msgstr "" "La solution serait d'utiliser l'interface de décodage de bas-niveau pour " "intercepter le cas des séquences d'encodage incomplètes. Ce travail " "d'implémentation a déjà été fait pour vous : la fonction native :func:`open` " "peut renvoyer un objet de type fichier qui suppose que le contenu du fichier " "est dans un encodage spécifié et accepte les paramètres Unicode pour des " -"méthodes telles que :meth:`~io.TextIOBase.read` et :meth:`~io.TextIOBase." -"write`. Ceci fonctionne grâce aux paramètres *encoding* et *errors* de :func:" -"`open` qui sont interprétés comme ceux de :meth:`str.encode` et :meth:`bytes." -"decode`." +"méthodes telles que :meth:`~io.TextIOBase.read` " +"et :meth:`~io.TextIOBase.write`. Ceci fonctionne grâce aux paramètres " +"*encoding* et *errors* de :func:`open` qui sont interprétés comme ceux " +"de :meth:`str.encode` et :meth:`bytes.decode`." -#: howto/unicode.rst:574 +#: howto/unicode.rst:576 msgid "Reading Unicode from a file is therefore simple::" msgstr "Lire de l'Unicode à partir d'un fichier est donc simple ::" -#: howto/unicode.rst:580 +#: howto/unicode.rst:582 msgid "" "It's also possible to open files in update mode, allowing both reading and " "writing::" @@ -985,7 +986,7 @@ msgstr "" "Il est également possible d'ouvrir des fichiers en mode « mise à jour », " "permettant à la fois la lecture et l'écriture ::" -#: howto/unicode.rst:588 +#: howto/unicode.rst:590 msgid "" "The Unicode character ``U+FEFF`` is used as a byte-order mark (BOM), and is " "often written as the first character of a file in order to assist with " @@ -1009,7 +1010,7 @@ msgstr "" "``utf-16-be`` pour les encodages petit-boutiste et gros-boutiste, qui " "spécifient un ordre d'octets donné et ne sautent pas la *BOM*." -#: howto/unicode.rst:597 +#: howto/unicode.rst:599 msgid "" "In some areas, it is also convention to use a \"BOM\" at the start of UTF-8 " "encoded files; the name is misleading since UTF-8 is not byte-order " @@ -1023,11 +1024,11 @@ msgstr "" "fichier est encodé en UTF-8. Pour lire ces fichiers, utilisez le codec " "``utf-8-sig`` pour sauter automatiquement la marque si elle est présente." -#: howto/unicode.rst:604 +#: howto/unicode.rst:606 msgid "Unicode filenames" msgstr "Noms de fichiers Unicode" -#: howto/unicode.rst:606 +#: howto/unicode.rst:608 msgid "" "Most of the operating systems in common use today support filenames that " "contain arbitrary Unicode characters. Usually this is implemented by " @@ -1050,7 +1051,7 @@ msgstr "" "avez défini les variables d'environnement ``LANG`` ou ``LC_CTYPE`` ; sinon, " "l'encodage par défaut est UTF-8." -#: howto/unicode.rst:616 +#: howto/unicode.rst:618 msgid "" "The :func:`sys.getfilesystemencoding` function returns the encoding to use " "on your current system, in case you want to do the encoding manually, but " @@ -1065,7 +1066,7 @@ msgstr "" "généralement simplement fournir la chaîne Unicode comme nom de fichier et " "elle est automatiquement convertie à l'encodage qui convient ::" -#: howto/unicode.rst:626 +#: howto/unicode.rst:628 msgid "" "Functions in the :mod:`os` module such as :func:`os.stat` will also accept " "Unicode filenames." @@ -1073,7 +1074,7 @@ msgstr "" "Les fonctions du module :mod:`os` telles que :func:`os.stat` acceptent " "également les noms de fichiers Unicode." -#: howto/unicode.rst:629 +#: howto/unicode.rst:631 msgid "" "The :func:`os.listdir` function returns filenames, which raises an issue: " "should it return the Unicode version of filenames, or should it return bytes " @@ -1087,21 +1088,22 @@ msgid "" msgstr "" "La fonction :func:`os.listdir` renvoie des noms de fichiers, ce qui soulève " "un problème : doit-elle renvoyer la version Unicode des noms de fichiers ou " -"doit-elle renvoyer des chaînes d'octets contenant les versions encodées ? :" -"func:`os.listdir` peut faire les deux, selon que vous fournissez le chemin " -"du répertoire en chaîne d'octets ou en chaîne Unicode. Si vous passez une " -"chaîne Unicode comme chemin d'accès, les noms de fichiers sont décodés en " -"utilisant l'encodage du système de fichiers et une liste de chaînes Unicode " -"est renvoyée, tandis que passer un chemin d'accès en chaîne d'octets renvoie " -"les noms de fichiers comme chaîne d'octets. Par exemple, en supposant que l':" -"term:`encodage par défaut du système de fichiers ` est UTF-8, exécuter le programme suivant ::" - -#: howto/unicode.rst:647 +"doit-elle renvoyer des chaînes d'octets contenant les versions " +"encodées ? :func:`os.listdir` peut faire les deux, selon que vous fournissez " +"le chemin du répertoire en chaîne d'octets ou en chaîne Unicode. Si vous " +"passez une chaîne Unicode comme chemin d'accès, les noms de fichiers sont " +"décodés en utilisant l'encodage du système de fichiers et une liste de " +"chaînes Unicode est renvoyée, tandis que passer un chemin d'accès en chaîne " +"d'octets renvoie les noms de fichiers comme chaîne d'octets. Par exemple, en " +"supposant que l':term:`encodage par défaut du système de fichiers " +"` est UTF-8, exécuter le programme " +"suivant ::" + +#: howto/unicode.rst:649 msgid "will produce the following output:" msgstr "produit la sortie suivante :" -#: howto/unicode.rst:655 +#: howto/unicode.rst:657 msgid "" "The first list contains UTF-8-encoded filenames, and the second list " "contains the Unicode versions." @@ -1109,7 +1111,7 @@ msgstr "" "La première liste contient les noms de fichiers encodés en UTF-8 et la " "seconde contient les versions Unicode." -#: howto/unicode.rst:658 +#: howto/unicode.rst:660 msgid "" "Note that on most occasions, you should can just stick with using Unicode " "with these APIs. The bytes APIs should only be used on systems where " @@ -1122,11 +1124,11 @@ msgstr "" "peuvent être présents. Cela ne concerne pratiquement que des systèmes Unix " "maintenant." -#: howto/unicode.rst:665 +#: howto/unicode.rst:667 msgid "Tips for Writing Unicode-aware Programs" msgstr "Conseils pour écrire des programmes compatibles Unicode" -#: howto/unicode.rst:667 +#: howto/unicode.rst:669 msgid "" "This section provides some suggestions on writing software that deals with " "Unicode." @@ -1134,11 +1136,11 @@ msgstr "" "Cette section fournit quelques suggestions sur l'écriture de logiciels qui " "traitent de l'Unicode." -#: howto/unicode.rst:670 +#: howto/unicode.rst:672 msgid "The most important tip is:" msgstr "Le conseil le plus important est :" -#: howto/unicode.rst:672 +#: howto/unicode.rst:674 msgid "" "Software should only work with Unicode strings internally, decoding the " "input data as soon as possible and encoding the output only at the end." @@ -1147,7 +1149,7 @@ msgstr "" "décodant les données d'entrée dès que possible et encodant la sortie " "uniquement à la fin." -#: howto/unicode.rst:675 +#: howto/unicode.rst:677 msgid "" "If you attempt to write processing functions that accept both Unicode and " "byte strings, you will find your program vulnerable to bugs wherever you " @@ -1159,10 +1161,10 @@ msgstr "" "les chaînes Unicode et les chaînes d'octets, les possibilités d'occurrences " "de bogues dans votre programme augmentent partout où vous combinez les deux " "différents types de chaînes. Il n'y a pas d'encodage ou de décodage " -"automatique : si vous faites par exemple ``str + octets``, une :exc:" -"`TypeError` est levée." +"automatique : si vous faites par exemple ``str + octets``, " +"une :exc:`TypeError` est levée." -#: howto/unicode.rst:680 +#: howto/unicode.rst:682 msgid "" "When using data coming from a web browser or some other untrusted source, a " "common technique is to check for illegal characters in a string before using " @@ -1185,11 +1187,11 @@ msgstr "" "choisir un moyen intelligent de cacher du texte malveillant dans le flux de " "données encodé." -#: howto/unicode.rst:691 +#: howto/unicode.rst:693 msgid "Converting Between File Encodings" msgstr "Conversion entre les encodages de fichiers" -#: howto/unicode.rst:693 +#: howto/unicode.rst:695 msgid "" "The :class:`~codecs.StreamRecoder` class can transparently convert between " "encodings, taking a stream that returns data in encoding #1 and behaving " @@ -1200,7 +1202,7 @@ msgstr "" "dans l'encodage #1, elle se comporte comme un flux qui renvoie des données " "dans l'encodage #2." -#: howto/unicode.rst:697 +#: howto/unicode.rst:699 msgid "" "For example, if you have an input file *f* that's in Latin-1, you can wrap " "it with a :class:`~codecs.StreamRecoder` to return bytes encoded in UTF-8::" @@ -1209,11 +1211,11 @@ msgstr "" "pouvez l'encapsuler dans un :class:`~codecs.StreamRecoder` pour qu'il " "renvoie des octets encodés en UTF-8 ::" -#: howto/unicode.rst:711 +#: howto/unicode.rst:713 msgid "Files in an Unknown Encoding" msgstr "Fichiers dans un encodage inconnu" -#: howto/unicode.rst:713 +#: howto/unicode.rst:715 msgid "" "What can you do if you need to make a change to a file, but don't know the " "file's encoding? If you know the encoding is ASCII-compatible and only want " @@ -1225,7 +1227,7 @@ msgstr "" "voulez seulement examiner ou modifier les parties ASCII, vous pouvez ouvrir " "le fichier avec le gestionnaire d'erreurs ``surrogateescape`` ::" -#: howto/unicode.rst:727 +#: howto/unicode.rst:729 msgid "" "The ``surrogateescape`` error handler will decode any non-ASCII bytes as " "code points in a special range running from U+DC80 to U+DCFF. These code " @@ -1238,10 +1240,10 @@ msgstr "" "le gestionnaire d'erreurs ``surrogateescape`` est utilisé pour encoder les " "données et les réécrire." -#: howto/unicode.rst:737 +#: howto/unicode.rst:739 msgid "" -"One section of `Mastering Python 3 Input/Output `_, a PyCon 2010 talk by David " +"One section of `Mastering Python 3 Input/Output `_, a PyCon 2010 talk by David " "Beazley, discusses text processing and binary data handling." msgstr "" "Une partie de la conférence `Mastering Python 3 Input/Output `_ is a PyCon 2013 talk by Benjamin Peterson that " @@ -1275,11 +1277,11 @@ msgstr "" "donnée par Benjamin Peterson qui traite de la représentation interne Unicode " "en Python 3.3." -#: howto/unicode.rst:754 +#: howto/unicode.rst:756 msgid "Acknowledgements" msgstr "Remerciements" -#: howto/unicode.rst:756 +#: howto/unicode.rst:758 msgid "" "The initial draft of this document was written by Andrew Kuchling. It has " "since been revised further by Alexander Belopolsky, Georg Brandl, Andrew " @@ -1289,7 +1291,7 @@ msgstr "" "depuis été révisé par Alexander Belopolsky, Georg Brandl, Andrew Kuchling et " "Ezio Melotti." -#: howto/unicode.rst:760 +#: howto/unicode.rst:762 msgid "" "Thanks to the following people who have noted errors or offered suggestions " "on this article: Éric Araujo, Nicholas Bastin, Nick Coghlan, Marius " diff --git a/howto/urllib2.po b/howto/urllib2.po index f7e765348..8a13b5023 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -31,6 +31,10 @@ msgstr "" msgid "Introduction" msgstr "Introduction" +#: howto/urllib2.rst:13 +msgid "Related Articles" +msgstr "" + #: howto/urllib2.rst:15 msgid "" "You may also find useful the following article on fetching web resources " @@ -39,8 +43,8 @@ msgstr "" #: howto/urllib2.rst:18 msgid "" -"`Basic Authentication `_" +"`Basic Authentication `__" msgstr "" #: howto/urllib2.rst:20 @@ -89,8 +93,8 @@ msgstr "" #: howto/urllib2.rst:52 msgid "" "If you wish to retrieve a resource via URL and store it in a temporary " -"location, you can do so via the :func:`shutil.copyfileobj` and :func:" -"`tempfile.NamedTemporaryFile` functions::" +"location, you can do so via the :func:`shutil.copyfileobj` " +"and :func:`tempfile.NamedTemporaryFile` functions::" msgstr "" #: howto/urllib2.rst:67 @@ -211,14 +215,14 @@ msgstr "Gestion des exceptions" #: howto/urllib2.rst:197 msgid "" "*urlopen* raises :exc:`~urllib.error.URLError` when it cannot handle a " -"response (though as usual with Python APIs, built-in exceptions such as :exc:" -"`ValueError`, :exc:`TypeError` etc. may also be raised)." +"response (though as usual with Python APIs, built-in exceptions such " +"as :exc:`ValueError`, :exc:`TypeError` etc. may also be raised)." msgstr "" #: howto/urllib2.rst:201 msgid "" -":exc:`~urllib.error.HTTPError` is the subclass of :exc:`~urllib.error." -"URLError` raised in the specific case of HTTP URLs." +":exc:`~urllib.error.HTTPError` is the subclass " +"of :exc:`~urllib.error.URLError` raised in the specific case of HTTP URLs." msgstr "" #: howto/urllib2.rst:204 @@ -252,9 +256,9 @@ msgid "" "request. The default handlers will handle some of these responses for you " "(for example, if the response is a \"redirection\" that requests the client " "fetch the document from a different URL, urllib will handle that for you). " -"For those it can't handle, urlopen will raise an :exc:`~urllib.error." -"HTTPError`. Typical errors include '404' (page not found), '403' (request " -"forbidden), and '401' (authentication required)." +"For those it can't handle, urlopen will raise " +"an :exc:`~urllib.error.HTTPError`. Typical errors include '404' (page not " +"found), '403' (request forbidden), and '401' (authentication required)." msgstr "" #: howto/urllib2.rst:235 @@ -282,11 +286,11 @@ msgstr "" #: howto/urllib2.rst:247 msgid "" ":attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary " -"of response codes in that shows all the response codes used by :rfc:`2616`. " -"The dictionary is reproduced here for convenience ::" +"of response codes that shows all the response codes used by :rfc:`2616`. An " +"excerpt from the dictionary is shown below ::" msgstr "" -#: howto/urllib2.rst:319 +#: howto/urllib2.rst:271 msgid "" "When an error is raised the server responds by returning an HTTP error code " "*and* an error page. You can use the :exc:`~urllib.error.HTTPError` instance " @@ -295,43 +299,43 @@ msgid "" "``urllib.response`` module::" msgstr "" -#: howto/urllib2.rst:339 +#: howto/urllib2.rst:291 msgid "Wrapping it Up" msgstr "" -#: howto/urllib2.rst:341 +#: howto/urllib2.rst:293 msgid "" -"So if you want to be prepared for :exc:`~urllib.error.HTTPError` *or* :exc:" -"`~urllib.error.URLError` there are two basic approaches. I prefer the second " -"approach." +"So if you want to be prepared for :exc:`~urllib.error.HTTPError` " +"*or* :exc:`~urllib.error.URLError` there are two basic approaches. I prefer " +"the second approach." msgstr "" -#: howto/urllib2.rst:345 +#: howto/urllib2.rst:297 msgid "Number 1" msgstr "" -#: howto/urllib2.rst:367 +#: howto/urllib2.rst:319 msgid "" "The ``except HTTPError`` *must* come first, otherwise ``except URLError`` " "will *also* catch an :exc:`~urllib.error.HTTPError`." msgstr "" -#: howto/urllib2.rst:371 +#: howto/urllib2.rst:323 msgid "Number 2" msgstr "" -#: howto/urllib2.rst:392 +#: howto/urllib2.rst:344 msgid "info and geturl" msgstr "" -#: howto/urllib2.rst:394 +#: howto/urllib2.rst:346 msgid "" "The response returned by urlopen (or the :exc:`~urllib.error.HTTPError` " "instance) has two useful methods :meth:`!info` and :meth:`!geturl` and is " "defined in the module :mod:`urllib.response`." msgstr "" -#: howto/urllib2.rst:398 +#: howto/urllib2.rst:350 msgid "" "**geturl** - this returns the real URL of the page fetched. This is useful " "because ``urlopen`` (or the opener object used) may have followed a " @@ -339,14 +343,14 @@ msgid "" "requested." msgstr "" -#: howto/urllib2.rst:402 +#: howto/urllib2.rst:354 msgid "" "**info** - this returns a dictionary-like object that describes the page " -"fetched, particularly the headers sent by the server. It is currently an :" -"class:`http.client.HTTPMessage` instance." +"fetched, particularly the headers sent by the server. It is currently " +"an :class:`http.client.HTTPMessage` instance." msgstr "" -#: howto/urllib2.rst:406 +#: howto/urllib2.rst:358 msgid "" "Typical headers include 'Content-length', 'Content-type', and so on. See the " "`Quick Reference to HTTP Headers `_ for a " @@ -354,11 +358,11 @@ msgid "" "use." msgstr "" -#: howto/urllib2.rst:413 +#: howto/urllib2.rst:365 msgid "Openers and Handlers" msgstr "" -#: howto/urllib2.rst:415 +#: howto/urllib2.rst:367 msgid "" "When you fetch a URL you use an opener (an instance of the perhaps " "confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " @@ -369,20 +373,20 @@ msgid "" "HTTP redirections or HTTP cookies." msgstr "" -#: howto/urllib2.rst:423 +#: howto/urllib2.rst:375 msgid "" "You will want to create openers if you want to fetch URLs with specific " "handlers installed, for example to get an opener that handles cookies, or to " "get an opener that does not handle redirections." msgstr "" -#: howto/urllib2.rst:427 +#: howto/urllib2.rst:379 msgid "" -"To create an opener, instantiate an ``OpenerDirector``, and then call ``." -"add_handler(some_handler_instance)`` repeatedly." +"To create an opener, instantiate an ``OpenerDirector``, and then call " +"``.add_handler(some_handler_instance)`` repeatedly." msgstr "" -#: howto/urllib2.rst:430 +#: howto/urllib2.rst:382 msgid "" "Alternatively, you can use ``build_opener``, which is a convenience function " "for creating opener objects with a single function call. ``build_opener`` " @@ -390,31 +394,31 @@ msgid "" "or override the default handlers." msgstr "" -#: howto/urllib2.rst:435 +#: howto/urllib2.rst:387 msgid "" "Other sorts of handlers you might want to can handle proxies, " "authentication, and other common but slightly specialised situations." msgstr "" -#: howto/urllib2.rst:438 +#: howto/urllib2.rst:390 msgid "" "``install_opener`` can be used to make an ``opener`` object the (global) " "default opener. This means that calls to ``urlopen`` will use the opener you " "have installed." msgstr "" -#: howto/urllib2.rst:442 +#: howto/urllib2.rst:394 msgid "" "Opener objects have an ``open`` method, which can be called directly to " "fetch urls in the same way as the ``urlopen`` function: there's no need to " "call ``install_opener``, except as a convenience." msgstr "" -#: howto/urllib2.rst:448 +#: howto/urllib2.rst:400 msgid "Basic Authentication" msgstr "" -#: howto/urllib2.rst:450 +#: howto/urllib2.rst:402 msgid "" "To illustrate creating and installing a handler we will use the " "``HTTPBasicAuthHandler``. For a more detailed discussion of this subject -- " @@ -423,7 +427,7 @@ msgid "" "www.voidspace.org.uk/python/articles/authentication.shtml>`__." msgstr "" -#: howto/urllib2.rst:456 +#: howto/urllib2.rst:408 msgid "" "When authentication is required, the server sends a header (as well as the " "401 error code) requesting authentication. This specifies the " @@ -431,11 +435,11 @@ msgid "" "Authenticate: SCHEME realm=\"REALM\"``." msgstr "" -#: howto/urllib2.rst:461 +#: howto/urllib2.rst:413 msgid "e.g." msgstr "" -#: howto/urllib2.rst:468 +#: howto/urllib2.rst:420 msgid "" "The client should then retry the request with the appropriate name and " "password for the realm included as a header in the request. This is 'basic " @@ -443,7 +447,7 @@ msgid "" "of ``HTTPBasicAuthHandler`` and an opener to use this handler." msgstr "" -#: howto/urllib2.rst:473 +#: howto/urllib2.rst:425 msgid "" "The ``HTTPBasicAuthHandler`` uses an object called a password manager to " "handle the mapping of URLs and realms to passwords and usernames. If you " @@ -456,13 +460,13 @@ msgid "" "by providing ``None`` as the realm argument to the ``add_password`` method." msgstr "" -#: howto/urllib2.rst:483 +#: howto/urllib2.rst:435 msgid "" "The top-level URL is the first URL that requires authentication. URLs " "\"deeper\" than the URL you pass to .add_password() will also match. ::" msgstr "" -#: howto/urllib2.rst:508 +#: howto/urllib2.rst:460 msgid "" "In the above example we only supplied our ``HTTPBasicAuthHandler`` to " "``build_opener``. By default openers have the handlers for normal situations " @@ -472,7 +476,7 @@ msgid "" "``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``." msgstr "" -#: howto/urllib2.rst:515 +#: howto/urllib2.rst:467 msgid "" "``top_level_url`` is in fact *either* a full URL (including the 'http:' " "scheme component and the hostname and optionally the port number) e.g. " @@ -483,11 +487,11 @@ msgid "" "example ``\"joe:password@example.com\"`` is not correct." msgstr "" -#: howto/urllib2.rst:525 +#: howto/urllib2.rst:477 msgid "Proxies" msgstr "" -#: howto/urllib2.rst:527 +#: howto/urllib2.rst:479 msgid "" "**urllib** will auto-detect your proxy settings and use those. This is " "through the ``ProxyHandler``, which is part of the normal handler chain when " @@ -497,71 +501,71 @@ msgid "" "similar steps to setting up a `Basic Authentication`_ handler: ::" msgstr "" -#: howto/urllib2.rst:540 +#: howto/urllib2.rst:492 msgid "" "Currently ``urllib.request`` *does not* support fetching of ``https`` " -"locations through a proxy. However, this can be enabled by extending urllib." -"request as shown in the recipe [#]_." +"locations through a proxy. However, this can be enabled by extending " +"urllib.request as shown in the recipe [#]_." msgstr "" -#: howto/urllib2.rst:546 +#: howto/urllib2.rst:498 msgid "" "``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see " "the documentation on :func:`~urllib.request.getproxies`." msgstr "" -#: howto/urllib2.rst:551 +#: howto/urllib2.rst:503 msgid "Sockets and Layers" msgstr "" -#: howto/urllib2.rst:553 +#: howto/urllib2.rst:505 msgid "" "The Python support for fetching resources from the web is layered. urllib " "uses the :mod:`http.client` library, which in turn uses the socket library." msgstr "" -#: howto/urllib2.rst:556 +#: howto/urllib2.rst:508 msgid "" "As of Python 2.3 you can specify how long a socket should wait for a " "response before timing out. This can be useful in applications which have to " "fetch web pages. By default the socket module has *no timeout* and can hang. " -"Currently, the socket timeout is not exposed at the http.client or urllib." -"request levels. However, you can set the default timeout globally for all " -"sockets using ::" +"Currently, the socket timeout is not exposed at the http.client or " +"urllib.request levels. However, you can set the default timeout globally for " +"all sockets using ::" msgstr "" -#: howto/urllib2.rst:579 +#: howto/urllib2.rst:531 msgid "Footnotes" msgstr "Notes" -#: howto/urllib2.rst:581 +#: howto/urllib2.rst:533 msgid "This document was reviewed and revised by John Lee." msgstr "" -#: howto/urllib2.rst:583 +#: howto/urllib2.rst:535 msgid "Google for example." msgstr "" -#: howto/urllib2.rst:584 +#: howto/urllib2.rst:536 msgid "" "Browser sniffing is a very bad practice for website design - building sites " "using web standards is much more sensible. Unfortunately a lot of sites " "still send different versions to different browsers." msgstr "" -#: howto/urllib2.rst:587 +#: howto/urllib2.rst:539 msgid "" "The user agent for MSIE 6 is *'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT " "5.1; SV1; .NET CLR 1.1.4322)'*" msgstr "" -#: howto/urllib2.rst:589 +#: howto/urllib2.rst:541 msgid "" "For details of more HTTP request headers, see `Quick Reference to HTTP " "Headers`_." msgstr "" -#: howto/urllib2.rst:591 +#: howto/urllib2.rst:543 msgid "" "In my case I have to use a proxy to access the internet at work. If you " "attempt to fetch *localhost* URLs through this proxy it blocks them. IE is " @@ -569,7 +573,7 @@ msgid "" "with a localhost server, I have to prevent urllib from using the proxy." msgstr "" -#: howto/urllib2.rst:596 +#: howto/urllib2.rst:548 msgid "" "urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: improve-page-nojs.rst:5 +msgid "Improve a documentation page" +msgstr "" + +#: improve-page-nojs.rst:13 +msgid "" +"We are always interested to hear ideas about improvements to the " +"documentation." +msgstr "" + +#: improve-page-nojs.rst:17 +msgid "" +"If the bug or suggested improvement concerns the translation of this " +"documentation, open an issue or edit the page in `translation's repository " +"`_ instead." +msgstr "" + +#: improve-page-nojs.rst:21 +msgid "You have a few ways to ask questions or suggest changes:" +msgstr "" + +#: improve-page-nojs.rst:23 +msgid "" +"You can start a discussion about the page on the Python discussion forum. " +"This link will start a topic in the Documentation category: `New " +"Documentation topic `_." +msgstr "" + +#: improve-page-nojs.rst:27 +msgid "" +"You can open an issue on the Python GitHub issue tracker. This link will " +"create a new issue with the \"docs\" label: `New docs issue `_." +msgstr "" diff --git a/improve-page.po b/improve-page.po new file mode 100644 index 000000000..bc0d0d2b6 --- /dev/null +++ b/improve-page.po @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: improve-page.rst:5 +msgid "Improve a documentation page" +msgstr "" + +#: improve-page.rst:43 +msgid "" +"We are always interested to hear ideas about improvements to the " +"documentation." +msgstr "" + +#: improve-page.rst:45 +msgid "" +"You were reading \"PAGETITLE\" at ``_. The source for that page is " +"on `GitHub `_." +msgstr "" + +#: improve-page.rst:50 +msgid "" +"If the bug or suggested improvement concerns the translation of this " +"documentation, open an issue or edit the page in `translation's repository " +"`_ instead." +msgstr "" + +#: improve-page.rst:54 +msgid "You have a few ways to ask questions or suggest changes:" +msgstr "" + +#: improve-page.rst:56 +msgid "" +"You can start a discussion about the page on the Python discussion forum. " +"This link will start a pre-populated topic: `Question about page " +"\"PAGETITLE\" `_." +msgstr "" + +#: improve-page.rst:60 +msgid "" +"You can open an issue on the Python GitHub issue tracker. This link will " +"create a new pre-populated issue: `Docs: problem with page \"PAGETITLE\" " +"`_." +msgstr "" + +#: improve-page.rst:64 +msgid "" +"You can `edit the page on GitHub `_ to open a pull request and begin the " +"contribution process." +msgstr "" diff --git a/installing/index.po b/installing/index.po index 368efff36..d419ffcb8 100644 --- a/installing/index.po +++ b/installing/index.po @@ -5,40 +5,34 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2023-03-26 12:02+0200\n" -"Last-Translator: Mathieu Dupuy\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-29 18:14+0100\n" +"Last-Translator: Julien Palard \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" +"X-Generator: Poedit 3.6\n" #: installing/index.rst:7 -msgid "Installing Python Modules" +#, fuzzy +msgid "Installing Python modules" msgstr "Installation de modules Python" -#: installing/index.rst:0 -msgid "Email" -msgstr "Email" - #: installing/index.rst:9 -msgid "distutils-sig@python.org" -msgstr "distutils-sig@python.org" - -#: installing/index.rst:11 +#, fuzzy msgid "" "As a popular open source development project, Python has an active " "supporting community of contributors and users that also make their software " -"available for other Python developers to use under open source license terms." +"available for other Python developers to use under open-source license terms." msgstr "" "En tant que logiciel libre populaire, Python bénéficie d'une communauté " "active de contributeurs et d'utilisateurs qui rendent à leur tour leurs " "logiciels disponibles, sous licence libre, pour les autres développeurs " "Python." -#: installing/index.rst:15 +#: installing/index.rst:13 msgid "" "This allows Python users to share and collaborate effectively, benefiting " "from the solutions others have already created to common (and sometimes even " @@ -50,18 +44,17 @@ msgstr "" "résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " "partager leurs propres solutions à tous." -#: installing/index.rst:20 -#, fuzzy +#: installing/index.rst:18 msgid "" "This guide covers the installation part of the process. For a guide to " "creating and sharing your own Python projects, refer to the `Python " "packaging user guide`_." msgstr "" "Ce guide couvre la partie installation. Pour un guide sur la création et le " -"partage de vos propres projets Python, voyez :ref:`le guide de distribution " -"`." +"partage de vos propres projets Python, consultez le `Python packaging user " +"guide`_." -#: installing/index.rst:28 +#: installing/index.rst:26 msgid "" "For corporate and other institutional users, be aware that many " "organisations have their own policies around using and contributing to open " @@ -73,19 +66,20 @@ msgstr "" "au logiciel libre. Prenez ces règles en compte lorsque vous utilisez les " "outils de distribution et d'installation fournis par Python." -#: installing/index.rst:35 +#: installing/index.rst:33 msgid "Key terms" msgstr "Vocabulaire" -#: installing/index.rst:37 +#: installing/index.rst:35 +#, fuzzy msgid "" -"``pip`` is the preferred installer program. Starting with Python 3.4, it is " -"included by default with the Python binary installers." +":program:`pip` is the preferred installer program. It is included by default " +"with the Python binary installers." msgstr "" "``pip`` est l'outil d'installation de prédilection. À partir de Python 3.4, " "il est inclus par défaut avec l'installateur de Python." -#: installing/index.rst:39 +#: installing/index.rst:37 msgid "" "A *virtual environment* is a semi-isolated Python environment that allows " "packages to be installed for use by a particular application, rather than " @@ -95,77 +89,55 @@ msgstr "" "autorise les paquets à être installés pour une application particulière, " "plutôt que d'être installés au niveau du système." -#: installing/index.rst:42 +#: installing/index.rst:40 +#, fuzzy msgid "" -"``venv`` is the standard tool for creating virtual environments, and has " -"been part of Python since Python 3.3. Starting with Python 3.4, it defaults " -"to installing ``pip`` into all created virtual environments." +"``venv`` is the standard tool for creating virtual environments. It defaults " +"to installing :program:`pip` into all created virtual environments." msgstr "" "``venv`` est l'outil standard pour créer des environnements virtuels, et est " "intégré à Python depuis la version 3.3. Depuis Python 3.4, il installe aussi " "``pip`` dans tous les environnements virtuels créés." -#: installing/index.rst:45 +#: installing/index.rst:42 msgid "" -"``virtualenv`` is a third party alternative (and predecessor) to ``venv``. " -"It allows virtual environments to be used on versions of Python prior to " -"3.4, which either don't provide ``venv`` at all, or aren't able to " -"automatically install ``pip`` into created environments." +"``virtualenv`` is a third-party alternative (and predecessor) to ``venv``." msgstr "" -"``virtualenv`` est une alternative tierce à ``venv`` (et son prédécesseur). " -"Elle permet la création d'environnements virtuels pour les versions de " -"Python antérieures à 3.4, qui ne fournissent pas de ``venv``, ou ne sont pas " -"capables d'installer automatiquement ``pip`` dans les environnements créés." -#: installing/index.rst:49 +#: installing/index.rst:44 +#, fuzzy msgid "" -"The `Python Package Index `__ is a public repository of " -"open source licensed packages made available for use by other Python users." +"The `Python Package Index (PyPI) `__ is a public " +"repository of open source licensed packages made available for use by other " +"Python users." msgstr "" "L'`Index des Paquets Python `__ est un dépôt public des " "paquets sous licence ouverte disponibles pour tous les utilisateurs Python." -#: installing/index.rst:52 +#: installing/index.rst:47 #, fuzzy msgid "" -"the `Python Packaging Authority `__ is the group of " +"The `Python Packaging Authority `__ is the group of " "developers and documentation authors responsible for the maintenance and " "evolution of the standard packaging tools and the associated metadata and " "file format standards. They maintain a variety of tools, documentation, and " "issue trackers on `GitHub `__." msgstr "" -"le `Python Packaging Authority `__ est le groupe de " +"la `Python Packaging Authority `__ est le groupe de " "développeurs et d'auteurs de documentation responsable de la maintenance et " "de l'évolution des suites d'outils standard et des normes de métadonnées et " "de format de fichiers associées. Ils maintiennent une variété d'outils, de " -"documentation, et d'outils de suivi des problèmes sur les deux sites `GitHub " -"`__ et `Bitbucket `__." - -#: installing/index.rst:58 -msgid "" -"``distutils`` is the original build and distribution system first added to " -"the Python standard library in 1998. While direct use of ``distutils`` is " -"being phased out, it still laid the foundation for the current packaging and " -"distribution infrastructure, and it not only remains part of the standard " -"library, but its name lives on in other ways (such as the name of the " -"mailing list used to coordinate Python packaging standards development)." -msgstr "" -"``distutils`` est le premier système de construction et de distribution " -"ajouté à la bibliothèque standard en 1998. Bien que l'utilisation directe de " -"``distutils`` soit progressivement supprimée, elle reste le fondement de " -"l'infrastructure actuelle de construction de paquet et de distribution. Au-" -"delà de rester dans la bibliothèque standard, son nom vit aussi sous " -"d'autres formes, tel que la liste de diffusion utilisée pour coordonner le " -"développement et les standards de la création de paquet." +"documentation, et d'outils de suivi des problèmes sur `GitHub `__." -#: installing/index.rst:66 +#: installing/index.rst:54 msgid "" "The use of ``venv`` is now recommended for creating virtual environments." msgstr "" "L'utilisation de ``venv`` est maintenant recommandée pour créer vos " "environnements virtuels." -#: installing/index.rst:71 +#: installing/index.rst:59 msgid "" "`Python Packaging User Guide: Creating and using virtual environments " "`__" @@ -174,11 +146,11 @@ msgstr "" "environnements virtuels `__" -#: installing/index.rst:76 +#: installing/index.rst:64 msgid "Basic usage" msgstr "Utilisation de base" -#: installing/index.rst:78 +#: installing/index.rst:66 msgid "" "The standard packaging tools are all designed to be used from the command " "line." @@ -186,15 +158,16 @@ msgstr "" "Les outils standards de création de paquets sont tous conçus pour être " "utilisés à partir de la ligne de commande." -#: installing/index.rst:81 +#: installing/index.rst:69 +#, fuzzy msgid "" "The following command will install the latest version of a module and its " -"dependencies from the Python Package Index::" +"dependencies from PyPI::" msgstr "" "La commande suivante va installer la dernière version d'un module et ses " "dépendances depuis le *Python Package Index* ::" -#: installing/index.rst:88 +#: installing/index.rst:76 msgid "" "For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." @@ -202,7 +175,7 @@ msgstr "" "Pour les utilisateurs POSIX (y compris Mac OS X et Linux), les exemples de " "ce guide supposent l'utilisation d'un :term:`environnement virtuel`." -#: installing/index.rst:91 +#: installing/index.rst:79 msgid "" "For Windows users, the examples in this guide assume that the option to " "adjust the system PATH environment variable was selected when installing " @@ -212,7 +185,7 @@ msgstr "" "l'option proposant de modifier la variable d'environnement PATH à été cochée " "lors de l'installation de Python." -#: installing/index.rst:95 +#: installing/index.rst:83 msgid "" "It's also possible to specify an exact or minimum version directly on the " "command line. When using comparator operators such as ``>``, ``<`` or some " @@ -224,7 +197,7 @@ msgstr "" "``>``, ``<`` ou d'autres caractères spéciaux qui sont interprétés par le " "*shell*, le nom du paquet et la version doivent être mis entre guillemets ::" -#: installing/index.rst:103 +#: installing/index.rst:91 msgid "" "Normally, if a suitable module is already installed, attempting to install " "it again will have no effect. Upgrading existing modules must be requested " @@ -234,26 +207,28 @@ msgstr "" "n'aura aucun effet. La mise à jour de modules existants doit être demandée " "explicitement ::" -#: installing/index.rst:109 +#: installing/index.rst:97 +#, fuzzy msgid "" -"More information and resources regarding ``pip`` and its capabilities can be " -"found in the `Python Packaging User Guide `__." +"More information and resources regarding :program:`pip` and its capabilities " +"can be found in the `Python Packaging User Guide `__." msgstr "" "Plus d'informations et de ressources concernant ``pip`` et ses capacités " "peuvent être trouvées dans le `Python Packaging User Guide `__." -#: installing/index.rst:112 +#: installing/index.rst:100 msgid "" "Creation of virtual environments is done through the :mod:`venv` module. " "Installing packages into an active virtual environment uses the commands " "shown above." msgstr "" -"La création d'environnements virtuels est réalisée grâce au module :mod:" -"`venv`. Installer des paquets au sein de l'environnement virtuel courant " -"utilise les commandes montrées précédemment." +"La création d'environnements virtuels est réalisée grâce au " +"module :mod:`venv`. Installer des paquets au sein de l'environnement virtuel " +"courant utilise les commandes montrées précédemment." -#: installing/index.rst:118 +#: installing/index.rst:106 msgid "" "`Python Packaging User Guide: Installing Python Distribution Packages " "`__" @@ -261,44 +236,20 @@ msgstr "" "`Guide Utilisateur de l'Empaquetage Python : Installer les paquets de la " "distribution Python `__" -#: installing/index.rst:123 +#: installing/index.rst:111 msgid "How do I ...?" msgstr "Comment puis-je … ?" -#: installing/index.rst:125 +#: installing/index.rst:113 msgid "These are quick answers or links for some common tasks." msgstr "" "Ce sont des réponses rapides ou des liens pour certaines tâches courantes." -#: installing/index.rst:128 -msgid "... install ``pip`` in versions of Python prior to Python 3.4?" -msgstr "" -"... Installer ``pip`` avec une version de Python antérieures à la 3.4 ?" - -#: installing/index.rst:130 -msgid "" -"Python only started bundling ``pip`` with Python 3.4. For earlier versions, " -"``pip`` needs to be \"bootstrapped\" as described in the Python Packaging " -"User Guide." -msgstr "" -"Python n'a commencé à fournir ``pip`` depuis Python 3.4. Pour les versions " -"précédentes, ``pip`` a besoin d'être \"amorcé\" tel que décrit dans le " -"*Python Packaging User Guide*." - -#: installing/index.rst:136 -msgid "" -"`Python Packaging User Guide: Requirements for Installing Packages `__" -msgstr "" -"`Guide Utilisateur de l'Empaquetage Python : Pré-requis pour installer des " -"paquets `__" - -#: installing/index.rst:143 +#: installing/index.rst:118 msgid "... install packages just for the current user?" msgstr "... Installer des paquets juste pour l'utilisateur actuel ?" -#: installing/index.rst:145 +#: installing/index.rst:120 msgid "" "Passing the ``--user`` option to ``python -m pip install`` will install a " "package just for the current user, rather than for all users of the system." @@ -307,17 +258,18 @@ msgstr "" "paquet juste pour l'utilisateur en cours, plutôt que pour tous les " "utilisateurs du système." -#: installing/index.rst:150 +#: installing/index.rst:125 msgid "... install scientific Python packages?" msgstr "... Installer des paquets Python scientifiques ?" -#: installing/index.rst:152 +#: installing/index.rst:127 +#, fuzzy msgid "" "A number of scientific Python packages have complex binary dependencies, and " -"aren't currently easy to install using ``pip`` directly. At this point in " -"time, it will often be easier for users to install these packages by `other " -"means `__ rather than attempting to " -"install them with ``pip``." +"aren't currently easy to install using :program:`pip` directly. It will " +"often be easier for users to install these packages by `other means `__ rather than attempting to install them " +"with :program:`pip`." msgstr "" "Un certain nombre de paquets scientifiques Python ont des dépendances " "binaires complexes, et ne sont pas actuellement faciles à installer " @@ -326,7 +278,7 @@ msgstr "" "packaging.python.org/science/>`__ plutôt que d'essayer de les installer avec " "``pip``." -#: installing/index.rst:160 +#: installing/index.rst:135 msgid "" "`Python Packaging User Guide: Installing Scientific Packages `__" @@ -334,50 +286,54 @@ msgstr "" "`Guide Utilisateur de l'Empaquetage Python : Installer des paquets " "scientifiques `__" -#: installing/index.rst:165 +#: installing/index.rst:140 msgid "... work with multiple versions of Python installed in parallel?" msgstr "" "... Travailler avec plusieurs versions de Python installés en parallèle ?" -#: installing/index.rst:167 +#: installing/index.rst:142 +#, fuzzy msgid "" "On Linux, macOS, and other POSIX systems, use the versioned Python commands " -"in combination with the ``-m`` switch to run the appropriate copy of " -"``pip``::" +"in combination with the ``-m`` switch to run the appropriate copy " +"of :program:`pip`::" msgstr "" "Sous Linux, Max OS X et autres systèmes POSIX, utiliser les commandes Python " "de la version souhaitée en combinaison avec l'option ``-m`` permet de lancer " "la version appropriée de ``pip`` ::" -#: installing/index.rst:176 -msgid "Appropriately versioned ``pip`` commands may also be available." +#: installing/index.rst:149 +#, fuzzy +msgid "Appropriately versioned :program:`pip` commands may also be available." msgstr "" "Les versions appropriées des commandes ``pip`` peuvent aussi être " "disponibles." -#: installing/index.rst:178 +#: installing/index.rst:151 +#, fuzzy msgid "" -"On Windows, use the ``py`` Python launcher in combination with the ``-m`` " -"switch::" +"On Windows, use the :program:`py` Python launcher in combination with the ``-" +"m`` switch::" msgstr "" "Sous Windows, utilisez le lanceur Python ``py`` en combinaison avec l'option " "``-m`` ::" -#: installing/index.rst:195 +#: installing/index.rst:166 msgid "Common installation issues" msgstr "Les problèmes d'installation typiques" -#: installing/index.rst:198 +#: installing/index.rst:169 msgid "Installing into the system Python on Linux" msgstr "Installer dans le Python du système sur Linux" -#: installing/index.rst:200 +#: installing/index.rst:171 +#, fuzzy msgid "" "On Linux systems, a Python installation will typically be included as part " "of the distribution. Installing into this Python installation requires root " "access to the system, and may interfere with the operation of the system " "package manager and other components of the system if a component is " -"unexpectedly upgraded using ``pip``." +"unexpectedly upgraded using :program:`pip`." msgstr "" "Sur les systèmes Linux, une installation de Python sera généralement incluse " "dans le cadre de la distribution. Installer dans cette installation de " @@ -386,58 +342,62 @@ msgstr "" "du système si un composant est mis à jour de façon inattendue en utilisant " "``pip``." -#: installing/index.rst:206 +#: installing/index.rst:177 +#, fuzzy msgid "" "On such systems, it is often better to use a virtual environment or a per-" -"user installation when installing packages with ``pip``." +"user installation when installing packages with :program:`pip`." msgstr "" "Sur de tels systèmes, il est souvent préférable d'utiliser un environnement " "virtuel ou une installation par l'utilisateur lors de l'installation des " "paquets avec ``pip``." -#: installing/index.rst:211 +#: installing/index.rst:182 msgid "Pip not installed" msgstr "``Pip`` n'est pas installé" -#: installing/index.rst:213 +#: installing/index.rst:184 +#, fuzzy msgid "" -"It is possible that ``pip`` does not get installed by default. One potential " -"fix is::" +"It is possible that :program:`pip` does not get installed by default. One " +"potential fix is::" msgstr "" "Il est possible que ``pip`` ne soit pas installé par défaut. Une solution " "est ::" -#: installing/index.rst:217 +#: installing/index.rst:188 +#, fuzzy msgid "" -"There are also additional resources for `installing pip. `__" +"There are also additional resources for `installing pip `__." msgstr "" "Il existe également des ressources supplémentaires pour `installer pip. " "`__" -#: installing/index.rst:222 +#: installing/index.rst:193 msgid "Installing binary extensions" msgstr "Installation d'extensions binaires" -#: installing/index.rst:224 +#: installing/index.rst:195 +#, fuzzy msgid "" -"Python has typically relied heavily on source based distribution, with end " -"users being expected to compile extension modules from source as part of the " +"Python once relied heavily on source-based distribution, with end users " +"being expected to compile extension modules from source as part of the " "installation process." msgstr "" "Python a généralement beaucoup misé sur une distribution basée sur les " "sources, avec laquelle les utilisateurs finaux devaient compiler, lors de " "l'installation, les modules d'extension à partir des sources." -#: installing/index.rst:228 +#: installing/index.rst:199 +#, fuzzy msgid "" -"With the introduction of support for the binary ``wheel`` format, and the " -"ability to publish wheels for at least Windows and macOS through the Python " -"Package Index, this problem is expected to diminish over time, as users are " -"more regularly able to install pre-built extensions rather than needing to " -"build them themselves." +"With the introduction of the binary wheel format, and the ability to publish " +"wheels through PyPI, this problem is diminishing, as users are more " +"regularly able to install pre-built extensions rather than needing to build " +"them themselves." msgstr "" "Avec l'introduction du format binaire ``wheel``, et la possibilité de " "publier des *wheels*, pour, au moins Windows et Mac OS X, via le *Python " @@ -445,22 +405,81 @@ msgstr "" "utilisateurs sont plus régulièrement en mesure d'installer des extensions " "pré-compilées plutôt que de devoir les compiler eux-mêmes." -#: installing/index.rst:234 +#: installing/index.rst:204 +#, fuzzy msgid "" -"Some of the solutions for installing `scientific software `__ that are not yet available as pre-built ``wheel`` " -"files may also help with obtaining other binary extensions without needing " -"to build them locally." +"Some of the solutions for installing `scientific software `__ that are not yet available as pre-built " +"wheel files may also help with obtaining other binary extensions without " +"needing to build them locally." msgstr "" "Certaines solutions pour installer des `paquets scientifiques `__ qui ne sont pas encore disponibles comme " "``wheel`` pré-construites peuvent aussi aider à obtenir d'autres extensions " "binaires sans devoir les construire localement." -#: installing/index.rst:241 +#: installing/index.rst:211 msgid "" -"`Python Packaging User Guide: Binary Extensions `__" +"`Python Packaging User Guide: Binary Extensions `__" msgstr "" "`Guide Utilisateur de l'Empaquetage Python : Extensions binaires `__" + +#~ msgid "Email" +#~ msgstr "Email" + +#~ msgid "distutils-sig@python.org" +#~ msgstr "distutils-sig@python.org" + +#~ msgid "" +#~ "``virtualenv`` is a third party alternative (and predecessor) to " +#~ "``venv``. It allows virtual environments to be used on versions of Python " +#~ "prior to 3.4, which either don't provide ``venv`` at all, or aren't able " +#~ "to automatically install ``pip`` into created environments." +#~ msgstr "" +#~ "``virtualenv`` est une alternative tierce à ``venv`` (et son " +#~ "prédécesseur). Elle permet la création d'environnements virtuels pour les " +#~ "versions de Python antérieures à 3.4, qui ne fournissent pas de ``venv``, " +#~ "ou ne sont pas capables d'installer automatiquement ``pip`` dans les " +#~ "environnements créés." + +#~ msgid "" +#~ "``distutils`` is the original build and distribution system first added " +#~ "to the Python standard library in 1998. While direct use of ``distutils`` " +#~ "is being phased out, it still laid the foundation for the current " +#~ "packaging and distribution infrastructure, and it not only remains part " +#~ "of the standard library, but its name lives on in other ways (such as the " +#~ "name of the mailing list used to coordinate Python packaging standards " +#~ "development)." +#~ msgstr "" +#~ "``distutils`` est le premier système de construction et de distribution " +#~ "ajouté à la bibliothèque standard en 1998. Bien que l'utilisation directe " +#~ "de ``distutils`` soit progressivement supprimée, elle reste le fondement " +#~ "de l'infrastructure actuelle de construction de paquet et de " +#~ "distribution. Au-delà de rester dans la bibliothèque standard, son nom " +#~ "vit aussi sous d'autres formes, tel que la liste de diffusion utilisée " +#~ "pour coordonner le développement et les standards de la création de " +#~ "paquet." + +#~ msgid "... install ``pip`` in versions of Python prior to Python 3.4?" +#~ msgstr "" +#~ "... Installer ``pip`` avec une version de Python antérieures à la 3.4 ?" + +#~ msgid "" +#~ "Python only started bundling ``pip`` with Python 3.4. For earlier " +#~ "versions, ``pip`` needs to be \"bootstrapped\" as described in the Python " +#~ "Packaging User Guide." +#~ msgstr "" +#~ "Python n'a commencé à fournir ``pip`` depuis Python 3.4. Pour les " +#~ "versions précédentes, ``pip`` a besoin d'être \"amorcé\" tel que décrit " +#~ "dans le *Python Packaging User Guide*." + +#~ msgid "" +#~ "`Python Packaging User Guide: Requirements for Installing Packages " +#~ "`__" +#~ msgstr "" +#~ "`Guide Utilisateur de l'Empaquetage Python : Pré-requis pour installer " +#~ "des paquets `__" diff --git a/library/__future__.po b/library/__future__.po index 46d2beeaa..0c5de9843 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 19:52+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -26,17 +26,18 @@ msgstr "**Source code:** :source:`Lib/_future_.py`" #: library/__future__.rst:11 msgid "" -"Imports of the form ``from __future__ import feature`` are called :ref:" -"`future statements `. These are special-cased by the Python compiler " -"to allow the use of new Python features in modules containing the future " -"statement before the release in which the feature becomes standard." +"Imports of the form ``from __future__ import feature`` are " +"called :ref:`future statements `. These are special-cased by the " +"Python compiler to allow the use of new Python features in modules " +"containing the future statement before the release in which the feature " +"becomes standard." msgstr "" #: library/__future__.rst:16 msgid "" "While these future statements are given additional special meaning by the " "Python compiler, they are still executed like any other import statement and " -"the :mod:`__future__` exists and is handled by the import system the same " +"the :mod:`!__future__` exists and is handled by the import system the same " "way any other Python module would be. This design serves three purposes:" msgstr "" @@ -49,10 +50,11 @@ msgstr "" "d'importation et s'attendent à trouver les modules qu'ils importent ;" #: library/__future__.rst:24 +#, fuzzy msgid "" "To document when incompatible changes were introduced, and when they will be " "--- or were --- made mandatory. This is a form of executable documentation, " -"and can be inspected programmatically via importing :mod:`__future__` and " +"and can be inspected programmatically via importing :mod:`!__future__` and " "examining its contents." msgstr "" "Pour documenter le phasage de changements entraînant des incompatibilités : " @@ -64,8 +66,8 @@ msgstr "" #, fuzzy msgid "" "To ensure that :ref:`future statements ` run under releases prior to " -"Python 2.1 at least yield runtime exceptions (the import of :mod:" -"`__future__` will fail, because there was no module of that name prior to " +"Python 2.1 at least yield runtime exceptions (the import of :mod:`!" +"__future__` will fail, because there was no module of that name prior to " "2.1)." msgstr "" "s'assurer que les :ref:`instructions *future* ` lancées sous les " @@ -78,8 +80,9 @@ msgid "Module Contents" msgstr "Contenu du module" #: library/__future__.rst:36 +#, fuzzy msgid "" -"No feature description will ever be deleted from :mod:`__future__`. Since " +"No feature description will ever be deleted from :mod:`!__future__`. Since " "its introduction in Python 2.1 the following features have found their way " "into the language using this mechanism:" msgstr "" @@ -87,163 +90,130 @@ msgstr "" "son introduction dans Python 2.1, les fonctionnalités suivantes ont trouvé " "leur places dans le langage utilisant ce mécanisme :" -#: library/__future__.rst:41 +#: library/__future__.rst:45 msgid "feature" msgstr "fonctionnalité" -#: library/__future__.rst:41 +#: library/__future__.rst:46 msgid "optional in" msgstr "optionnel dans" -#: library/__future__.rst:41 +#: library/__future__.rst:47 msgid "mandatory in" msgstr "obligatoire dans" -#: library/__future__.rst:41 +#: library/__future__.rst:48 msgid "effect" msgstr "effet" -#: library/__future__.rst:43 -msgid "nested_scopes" -msgstr "nested_scopes" - -#: library/__future__.rst:43 +#: library/__future__.rst:50 msgid "2.1.0b1" msgstr "2.1.0b1" -#: library/__future__.rst:43 +#: library/__future__.rst:51 msgid "2.2" msgstr "2.2" -#: library/__future__.rst:43 +#: library/__future__.rst:52 msgid ":pep:`227`: *Statically Nested Scopes*" msgstr ":pep:`227` : *Portées imbriquées*" -#: library/__future__.rst:46 -msgid "generators" -msgstr "générateurs" - -#: library/__future__.rst:46 +#: library/__future__.rst:54 msgid "2.2.0a1" msgstr "2.2.0a1" -#: library/__future__.rst:46 +#: library/__future__.rst:55 msgid "2.3" msgstr "2.3" -#: library/__future__.rst:46 +#: library/__future__.rst:56 msgid ":pep:`255`: *Simple Generators*" msgstr ":pep:`255` : *Générateurs simples*" -#: library/__future__.rst:49 -msgid "division" -msgstr "division" - -#: library/__future__.rst:49 +#: library/__future__.rst:58 msgid "2.2.0a2" msgstr "2.2.0a2" -#: library/__future__.rst:52 library/__future__.rst:61 +#: library/__future__.rst:63 library/__future__.rst:75 msgid "3.0" msgstr "3.0" -#: library/__future__.rst:49 +#: library/__future__.rst:60 msgid ":pep:`238`: *Changing the Division Operator*" msgstr ":pep:`238` : *Changement de l'opérateur de division*" -#: library/__future__.rst:52 -msgid "absolute_import" -msgstr "absolute_import" - -#: library/__future__.rst:55 +#: library/__future__.rst:66 msgid "2.5.0a1" msgstr "2.5.0a1" -#: library/__future__.rst:52 +#: library/__future__.rst:64 msgid ":pep:`328`: *Imports: Multi-Line and Absolute/Relative*" msgstr "" ":pep:`328` : *Importations : multilignes et absolues/relatives* (ressource " "en anglais)" -#: library/__future__.rst:55 -msgid "with_statement" -msgstr "with_statement" - -#: library/__future__.rst:55 +#: library/__future__.rst:67 msgid "2.6" msgstr "2.6" -#: library/__future__.rst:55 -msgid ":pep:`343`: *The \"with\" Statement*" +#: library/__future__.rst:68 +#, fuzzy +msgid ":pep:`343`: *The “with” Statement*" msgstr ":pep:`343` : *L'instruction \"with\"*" -#: library/__future__.rst:58 -msgid "print_function" -msgstr "print_function" - -#: library/__future__.rst:61 +#: library/__future__.rst:74 msgid "2.6.0a2" msgstr "2.6.0a2" -#: library/__future__.rst:58 +#: library/__future__.rst:72 msgid ":pep:`3105`: *Make print a function*" msgstr ":pep:`3105` : *Transformation de print en fonction*" -#: library/__future__.rst:61 -msgid "unicode_literals" -msgstr "unicode_literals" - -#: library/__future__.rst:61 +#: library/__future__.rst:76 msgid ":pep:`3112`: *Bytes literals in Python 3000*" msgstr ":pep:`3112` : *Chaînes d'octets littéraux en Python 3000*" -#: library/__future__.rst:64 -msgid "generator_stop" -msgstr "generator_stop" - -#: library/__future__.rst:64 +#: library/__future__.rst:78 msgid "3.5.0b1" msgstr "3.5.0b1" -#: library/__future__.rst:64 +#: library/__future__.rst:79 msgid "3.7" msgstr "3.7" -#: library/__future__.rst:64 +#: library/__future__.rst:80 msgid ":pep:`479`: *StopIteration handling inside generators*" msgstr "" ":pep:`479` : *Gestion de *StopIteration* à l’intérieur des générateurs*" -#: library/__future__.rst:67 -msgid "annotations" -msgstr "annotations" - -#: library/__future__.rst:67 +#: library/__future__.rst:82 msgid "3.7.0b1" msgstr "3.7.0b1" -#: library/__future__.rst:67 -msgid "TBD [1]_" +#: library/__future__.rst:83 +msgid "Never [1]_" msgstr "" -#: library/__future__.rst:67 -msgid ":pep:`563`: *Postponed evaluation of annotations*" -msgstr ":pep:`563` : *Évaluation différée des annotations*" +#: library/__future__.rst:84 +msgid "" +":pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred " +"evaluation of annotations using descriptors*" +msgstr "" -#: library/__future__.rst:77 +#: library/__future__.rst:93 msgid "Each statement in :file:`__future__.py` is of the form::" msgstr "Chaque instruction dans :file:`__future__.py` est de la forme ::" -#: library/__future__.rst:82 +#: library/__future__.rst:98 msgid "" "where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both " "are 5-tuples of the same form as :data:`sys.version_info`::" msgstr "" "où, normalement, *OptionalRelease* est inférieur à *MandatoryRelease*, et " -"les deux sont des quintuplets de la même forme que :data:`sys." -"version_info` ::" +"les deux sont des quintuplets de la même forme " +"que :data:`sys.version_info` ::" -#: library/__future__.rst:94 +#: library/__future__.rst:110 msgid "" "*OptionalRelease* records the first release in which the feature was " "accepted." @@ -251,7 +221,7 @@ msgstr "" "*OptionalRelease* enregistre la première version dans laquelle la " "fonctionnalité a été acceptée." -#: library/__future__.rst:98 +#: library/__future__.rst:114 msgid "" "In the case of a *MandatoryRelease* that has not yet occurred, " "*MandatoryRelease* predicts the release in which the feature will become " @@ -261,7 +231,7 @@ msgstr "" "*MandatoryRelease* prédit la *release* dans laquelle la fonctionnalité " "deviendra un élément du langage." -#: library/__future__.rst:102 +#: library/__future__.rst:118 msgid "" "Else *MandatoryRelease* records when the feature became part of the " "language; in releases at or after that, modules no longer need a future " @@ -273,7 +243,7 @@ msgstr "" "n'ont plus besoin d'une déclaration *future* pour utiliser la fonctionnalité " "en question, mais ils peuvent continuer à utiliser ces importations." -#: library/__future__.rst:106 +#: library/__future__.rst:122 #, fuzzy msgid "" "*MandatoryRelease* may also be ``None``, meaning that a planned feature got " @@ -282,13 +252,13 @@ msgstr "" "*MandatoryRelease* peut également être ``None``, ce qui signifie qu'une " "fonction planifiée a été abandonnée." -#: library/__future__.rst:111 +#: library/__future__.rst:127 #, fuzzy msgid "" "*CompilerFlag* is the (bitfield) flag that should be passed in the fourth " "argument to the built-in function :func:`compile` to enable the feature in " -"dynamically compiled code. This flag is stored in the :attr:`_Feature." -"compiler_flag` attribute on :class:`_Feature` instances." +"dynamically compiled code. This flag is stored in " +"the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances." msgstr "" "*CompilerFlag* est un drapeau (chaque bit représente un champ) qui doit être " "passé en tant que quatrième argument à la fonction native :func:`compile` " @@ -296,44 +266,71 @@ msgstr "" "indicateur est stocké dans l'attribut :attr:`compiler_flag` dans les " "instances de :class:`_Feature`." -#: library/__future__.rst:117 +#: library/__future__.rst:133 msgid "" "``from __future__ import annotations`` was previously scheduled to become " -"mandatory in Python 3.10, but the Python Steering Council twice decided to " -"delay the change (`announcement for Python 3.10 `__; `announcement for Python 3.11 `__). No " -"final decision has been made yet. See also :pep:`563` and :pep:`649`." +"mandatory in Python 3.10, but the change was delayed and ultimately " +"canceled. This feature will eventually be deprecated and removed. " +"See :pep:`649` and :pep:`749`." msgstr "" -#: library/__future__.rst:127 +#: library/__future__.rst:141 msgid ":ref:`future`" msgstr ":ref:`future`" -#: library/__future__.rst:128 +#: library/__future__.rst:142 msgid "How the compiler treats future imports." msgstr "Comment le compilateur gère les importations « futures »." -#: library/__future__.rst:130 +#: library/__future__.rst:144 msgid ":pep:`236` - Back to the __future__" msgstr ":pep:`236` — retour vers le ``__future__``" -#: library/__future__.rst:131 +#: library/__future__.rst:145 msgid "The original proposal for the __future__ mechanism." msgstr "La proposition originale pour le mécanisme de ``__future__``." +#~ msgid "nested_scopes" +#~ msgstr "nested_scopes" + +#~ msgid "generators" +#~ msgstr "générateurs" + +#~ msgid "division" +#~ msgstr "division" + +#~ msgid "absolute_import" +#~ msgstr "absolute_import" + +#~ msgid "with_statement" +#~ msgstr "with_statement" + +#~ msgid "print_function" +#~ msgstr "print_function" + +#~ msgid "unicode_literals" +#~ msgstr "unicode_literals" + +#~ msgid "generator_stop" +#~ msgstr "generator_stop" + +#~ msgid "annotations" +#~ msgstr "annotations" + +#~ msgid ":pep:`563`: *Postponed evaluation of annotations*" +#~ msgstr ":pep:`563` : *Évaluation différée des annotations*" + #~ msgid ":mod:`__future__` is a real module, and serves three purposes:" #~ msgstr "" #~ "Le module :mod:`__future__` est un vrai module, et il a trois objectifs :" #~ msgid "" -#~ "Instances of class :class:`_Feature` have two corresponding methods, :" -#~ "meth:`getOptionalRelease` and :meth:`getMandatoryRelease`." +#~ "Instances of class :class:`_Feature` have two corresponding " +#~ "methods, :meth:`getOptionalRelease` and :meth:`getMandatoryRelease`." #~ msgstr "" #~ "Les instances de classe :class:`_Feature` ont deux méthodes " -#~ "correspondantes, :meth:`getOptionalRelease` et :meth:" -#~ "`getMandatoryRelease`." +#~ "correspondantes, :meth:`getOptionalRelease` " +#~ "et :meth:`getMandatoryRelease`." #~ msgid "3.11" #~ msgstr "3.11" diff --git a/library/__main__.po b/library/__main__.po index 94dabe8fe..5493a14dd 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2022-05-18 13:39+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -44,8 +44,8 @@ msgstr "c'est aussi le nom du fichier ``__main__.py`` dans les paquets Python." msgid "" "Both of these mechanisms are related to Python modules; how users interact " "with them and how they interact with each other. They are explained in " -"detail below. If you're new to Python modules, see the tutorial section :" -"ref:`tut-modules` for an introduction." +"detail below. If you're new to Python modules, see the tutorial " +"section :ref:`tut-modules` for an introduction." msgstr "" "Les deux sont liés aux modules Python, à la manière de s'en servir en tant " "qu'utilisateur et à la manière dont ils interagissent entre eux. Cette page " @@ -117,8 +117,8 @@ msgstr "" #: library/__main__.rst:67 msgid "" -"the Python module or package passed to the Python interpreter with the :" -"option:`-m` argument:" +"the Python module or package passed to the Python interpreter with " +"the :option:`-m` argument:" msgstr "" "le module ou paquet passé à l'interpréteur avec l'option :option:`-m` :" @@ -242,15 +242,15 @@ msgstr "" "ligne de commande. Les scripts sont ajoutés au système à l'aide de points " "d'entrée, qui demandent à `pip `_ de créer un " "exécutable. Il le fait en insérant un appel à la fonction à l'intérieur d'un " -"modèle prédéfini où la valeur qu'elle renvoie est passée directement à :func:" -"`sys.exit` ::" +"modèle prédéfini où la valeur qu'elle renvoie est passée directement " +"à :func:`sys.exit` ::" #: library/__main__.rst:175 msgid "" "Since the call to ``main`` is wrapped in :func:`sys.exit`, the expectation " -"is that your function will return some value acceptable as an input to :func:" -"`sys.exit`; typically, an integer or ``None`` (which is implicitly returned " -"if your function does not have a return statement)." +"is that your function will return some value acceptable as an input " +"to :func:`sys.exit`; typically, an integer or ``None`` (which is implicitly " +"returned if your function does not have a return statement)." msgstr "" "Puisque l'appel de ``main`` est encapsulé dans :func:`sys.exit`, ``main`` " "doit renvoyer une valeur qui convienne comme argument à :func:`sys.exit`, " @@ -268,23 +268,24 @@ msgid "" msgstr "" "Il est utile de se conformer à cette convention. De cette manière, le module " "se comporte de la même manière s'il est distribué comme script à l'aide des " -"points d'entrée que lorsqu'il est exécuté directement (avec ``python3 echo." -"py``)." +"points d'entrée que lorsqu'il est exécuté directement (avec ``python3 " +"echo.py``)." #: library/__main__.rst:185 msgid "" "In particular, be careful about returning strings from your ``main`` " "function. :func:`sys.exit` will interpret a string argument as a failure " "message, so your program will have an exit code of ``1``, indicating " -"failure, and the string will be written to :data:`sys.stderr`. The ``echo." -"py`` example from earlier exemplifies using the ``sys.exit(main())`` " +"failure, and the string will be written to :data:`sys.stderr`. The " +"``echo.py`` example from earlier exemplifies using the ``sys.exit(main())`` " "convention." msgstr "" "En particulier, mieux vaut éviter de renvoyer une chaîne de caractères " "depuis la fonction ``main``. En effet, si :func:`sys.exit` reçoit une " -"chaîne, elle l'interprète comme un message d'erreur, qu'elle affiche sur :" -"data:`sys.stderr` avant de terminer le programme avec le code de retour 1 " -"(erreur). L'exemple de ``echo.py`` ci-dessus montre la pratique recommandée." +"chaîne, elle l'interprète comme un message d'erreur, qu'elle affiche " +"sur :data:`sys.stderr` avant de terminer le programme avec le code de retour " +"1 (erreur). L'exemple de ``echo.py`` ci-dessus montre la pratique " +"recommandée." #: library/__main__.rst:193 msgid "" @@ -372,13 +373,14 @@ msgstr "" #: library/__main__.rst:254 #, fuzzy msgid "" -"This won't work for ``__main__.py`` files in the root directory of a ``." -"zip`` file though. Hence, for consistency, a minimal ``__main__.py`` " +"This won't work for ``__main__.py`` files in the root directory of a " +"``.zip`` file though. Hence, for consistency, a minimal ``__main__.py`` " "without a ``__name__`` check is preferred." msgstr "" "Malgré tout, cela ne fonctionne pas pour les fichiers ``__main__.py`` à la " -"racine d'une archive ZIP. Aussi est-il préférable d'écrire des ``__main__." -"py`` dans le style minimal de celui de :mod:`venv` mentionné ci-dessus." +"racine d'une archive ZIP. Aussi est-il préférable d'écrire des " +"``__main__.py`` dans le style minimal de celui de :mod:`venv` mentionné ci-" +"dessus." #: library/__main__.rst:260 #, fuzzy @@ -432,15 +434,15 @@ msgstr "" msgid "Here is an example module that consumes the ``__main__`` namespace::" msgstr "Voici un exemple d'utilisation du module ``__main__`` ::" -#: library/__main__.rst:300 +#: library/__main__.rst:297 msgid "Example usage of this module could be as follows::" msgstr "Ce code s'utilise comme ceci ::" -#: library/__main__.rst:319 +#: library/__main__.rst:316 msgid "Now, if we started our program, the result would look like this:" msgstr "Le programme ci-dessus donne la sortie :" -#: library/__main__.rst:326 +#: library/__main__.rst:323 msgid "" "The exit code of the program would be 1, indicating an error. Uncommenting " "the line with ``my_name = \"Dinsdale\"`` fixes the program and now it exits " @@ -451,7 +453,7 @@ msgstr "" "programme est corrigé, et renvoie au système le code 0 car il n'y a plus " "d'erreur :" -#: library/__main__.rst:335 +#: library/__main__.rst:332 msgid "" "Note that importing ``__main__`` doesn't cause any issues with " "unintentionally running top-level code meant for script use which is put in " @@ -463,7 +465,7 @@ msgstr "" "script sous ``if __name__ == '__main__'`` dans le module principal " "``start`` ?" -#: library/__main__.rst:339 +#: library/__main__.rst:336 #, fuzzy msgid "" "Python inserts an empty ``__main__`` module in :data:`sys.modules` at " @@ -477,9 +479,9 @@ msgid "" "this works." msgstr "" "En fait, le déroulement de l'exécution est le suivant : au lancement de " -"l'interpréteur, un module ``__main__`` initialement vide est inséré dans :" -"attr:`sys.modules`. Il se remplit au fur et à mesure de l'exécution du code " -"principal. Dans notre exemple, le module principal est ``start``, qui " +"l'interpréteur, un module ``__main__`` initialement vide est inséré " +"dans :attr:`sys.modules`. Il se remplit au fur et à mesure de l'exécution du " +"code principal. Dans notre exemple, le module principal est ``start``, qui " "s'exécute ligne par ligne et en vient à importer ``namely``. Or ``namely``, " "à son tour, importe ``__main__``, c'est-à-dire en fait ``start``. On a donc " "une importation cyclique. Puisque le module ``__main__`` est déjà présent " @@ -488,7 +490,7 @@ msgstr "" "le document de référence du système d'importation explique plus avant ce " "fonctionnement." -#: library/__main__.rst:348 +#: library/__main__.rst:345 msgid "" "The Python REPL is another example of a \"top-level environment\", so " "anything defined in the REPL becomes part of the ``__main__`` scope::" @@ -497,21 +499,20 @@ msgstr "" "possible. Toute variable qui y est définie appartient à l'espace de nommage " "``__main__`` ::" -#: library/__main__.rst:364 +#: library/__main__.rst:361 msgid "" -"Note that in this case the ``__main__`` scope doesn't contain a ``__file__`` " -"attribute as it's interactive." +"The ``__main__`` scope is used in the implementation of :mod:`pdb` " +"and :mod:`rlcompleter`." msgstr "" -"Dans ce cas, il n'y a pas de variable ``__file__``, puisque cela n'a pas de " -"sens dans le mode interactif." +"Le module ``__main__`` est notamment employé dans les implémentations " +"de :mod:`pdb` et :mod:`rlcompleter`." -#: library/__main__.rst:367 -msgid "" -"The ``__main__`` scope is used in the implementation of :mod:`pdb` and :mod:" -"`rlcompleter`." -msgstr "" -"Le module ``__main__`` est notamment employé dans les implémentations de :" -"mod:`pdb` et :mod:`rlcompleter`." +#~ msgid "" +#~ "Note that in this case the ``__main__`` scope doesn't contain a " +#~ "``__file__`` attribute as it's interactive." +#~ msgstr "" +#~ "Dans ce cas, il n'y a pas de variable ``__file__``, puisque cela n'a pas " +#~ "de sens dans le mode interactif." #, fuzzy #~ msgid "" @@ -530,9 +531,9 @@ msgstr "" #~ "invite interactive." #~ msgid "" -#~ "For a package, the same effect can be achieved by including a ``__main__." -#~ "py`` module, the contents of which will be executed when the module is " -#~ "run with ``-m``." +#~ "For a package, the same effect can be achieved by including a " +#~ "``__main__.py`` module, the contents of which will be executed when the " +#~ "module is run with ``-m``." #~ msgstr "" #~ "Pour un paquet, le même effet peut être obtenu en utilisant un module " #~ "``__main__.py``, son contenu sera exécuté si le paquet est lancé via ``-" diff --git a/library/_thread.po b/library/_thread.po index ba440cef6..61fd7be53 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 20:06+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -30,9 +30,9 @@ msgid "" "level threading API built on top of this module." msgstr "" "Ce module fournit les primitives de bas niveau pour travailler avec de " -"multiples fils d'exécution (aussi appelés :dfn:`light-weight processes` ou :" -"dfn:`tasks`) — plusieurs fils d'exécution de contrôle partagent leur espace " -"de données global. Pour la synchronisation, de simples verrous (aussi " +"multiples fils d'exécution (aussi appelés :dfn:`light-weight processes` " +"ou :dfn:`tasks`) — plusieurs fils d'exécution de contrôle partagent leur " +"espace de données global. Pour la synchronisation, de simples verrous (aussi " "appelés des :dfn:`mutexes` ou des :dfn:`binary semaphores`) sont fournis. Le " "module :mod:`threading` fournit une API de fils d'exécution de haut niveau, " "plus facile à utiliser et construite à partir de ce module." @@ -55,10 +55,6 @@ msgstr "" "Ceci est à présent un synonyme de l'exception native :exc:`RuntimeError`." #: library/_thread.rst:41 -msgid "This is the type of lock objects." -msgstr "C'est le type d'objets verrous." - -#: library/_thread.rst:46 msgid "" "Start a new thread and return its identifier. The thread executes the " "function *function* with the argument list *args* (which must be a tuple). " @@ -69,24 +65,25 @@ msgstr "" "(qui doit être un *n*-uplet). L'argument optionnel *kwargs* spécifie un " "dictionnaire d'arguments nommés." -#: library/_thread.rst:50 +#: library/_thread.rst:45 msgid "When the function returns, the thread silently exits." msgstr "Au renvoi de la fonction, le fil d'exécution quitte silencieusement." -#: library/_thread.rst:52 +#: library/_thread.rst:47 msgid "" -"When the function terminates with an unhandled exception, :func:`sys." -"unraisablehook` is called to handle the exception. The *object* attribute of " -"the hook argument is *function*. By default, a stack trace is printed and " -"then the thread exits (but other threads continue to run)." -msgstr "" -"Lorsque la fonction se termine avec une exception non gérée, :func:`sys." -"unraisablehook` est appelée pour gérer cette dernière. L'attribut *object* " -"de l'argument *hook* est *function*. Par défaut, la trace d'appels est " -"affichée puis le fil d'exécution se termine (mais les autres fils " -"d'exécution continuent de s'exécuter)." +"When the function terminates with an unhandled " +"exception, :func:`sys.unraisablehook` is called to handle the exception. The " +"*object* attribute of the hook argument is *function*. By default, a stack " +"trace is printed and then the thread exits (but other threads continue to " +"run)." +msgstr "" +"Lorsque la fonction se termine avec une exception non " +"gérée, :func:`sys.unraisablehook` est appelée pour gérer cette dernière. " +"L'attribut *object* de l'argument *hook* est *function*. Par défaut, la " +"trace d'appels est affichée puis le fil d'exécution se termine (mais les " +"autres fils d'exécution continuent de s'exécuter)." -#: library/_thread.rst:57 +#: library/_thread.rst:52 msgid "" "When the function raises a :exc:`SystemExit` exception, it is silently " "ignored." @@ -94,19 +91,19 @@ msgstr "" "Lorsque la fonction lève l'exception :exc:`SystemExit`, elle est ignorée " "silencieusement." -#: library/_thread.rst:60 +#: library/_thread.rst:55 msgid "" "Raises an :ref:`auditing event ` ``_thread.start_new_thread`` with " "arguments ``function``, ``args``, ``kwargs``." msgstr "" -#: library/_thread.rst:62 +#: library/_thread.rst:57 msgid ":func:`sys.unraisablehook` is now used to handle unhandled exceptions." msgstr "" ":func:`sys.unraisablehook` est maintenant utilisée pour s'occuper des " "exceptions non gérées." -#: library/_thread.rst:68 +#: library/_thread.rst:63 msgid "" "Simulate the effect of a signal arriving in the main thread. A thread can " "use this function to interrupt the main thread, though there is no guarantee " @@ -116,29 +113,31 @@ msgstr "" "d'exécution peut utiliser cette fonction pour interrompre le fil d'exécution " "principal, bien qu'une interruption immédiate ne soit pas garantie." -#: library/_thread.rst:72 +#: library/_thread.rst:67 #, fuzzy msgid "" "If given, *signum* is the number of the signal to simulate. If *signum* is " "not given, :const:`signal.SIGINT` is simulated." msgstr "" -"Le signal simulé est *signum*. La valeur par défaut est :data:`signal." -"SIGINT`." +"Le signal simulé est *signum*. La valeur par défaut " +"est :data:`signal.SIGINT`." -#: library/_thread.rst:75 +#: library/_thread.rst:70 #, fuzzy msgid "" -"If the given signal isn't handled by Python (it was set to :const:`signal." -"SIG_DFL` or :const:`signal.SIG_IGN`), this function does nothing." +"If the given signal isn't handled by Python (it was set " +"to :const:`signal.SIG_DFL` or :const:`signal.SIG_IGN`), this function does " +"nothing." msgstr "" -"Si le signal n'est pas géré par Python (s'il a été paramétré à :data:`signal." -"SIG_DFL` ou :data:`signal.SIG_IGN`), cette fonction ne fait rien." +"Si le signal n'est pas géré par Python (s'il a été paramétré " +"à :data:`signal.SIG_DFL` ou :data:`signal.SIG_IGN`), cette fonction ne fait " +"rien." -#: library/_thread.rst:79 +#: library/_thread.rst:74 msgid "The *signum* argument is added to customize the signal number." msgstr "Ajout du paramètre *signum* pour modifier le numéro du signal." -#: library/_thread.rst:83 +#: library/_thread.rst:78 msgid "" "This does not emit the corresponding signal but schedules a call to the " "associated handler (if it exists). If you want to truly emit the signal, " @@ -148,7 +147,7 @@ msgstr "" "gestionnaire associé (à condition qu'il existe). Pour émettre réellement le " "signal, utilisez :func:`signal.raise_signal`." -#: library/_thread.rst:90 +#: library/_thread.rst:85 msgid "" "Raise the :exc:`SystemExit` exception. When not caught, this will cause the " "thread to exit silently." @@ -156,7 +155,7 @@ msgstr "" "Lève une exception :exc:`SystemExit`. Quand elle n'est pas interceptée, le " "fil d'exécution se terminera silencieusement." -#: library/_thread.rst:104 +#: library/_thread.rst:99 msgid "" "Return a new lock object. Methods of locks are described below. The lock " "is initially unlocked." @@ -164,7 +163,7 @@ msgstr "" "Renvoie un nouveau verrou. Les méthodes des verrous sont décrites ci-" "dessous. Le verrou est initialement déverrouillé." -#: library/_thread.rst:110 +#: library/_thread.rst:105 msgid "" "Return the 'thread identifier' of the current thread. This is a nonzero " "integer. Its value has no direct meaning; it is intended as a magic cookie " @@ -179,7 +178,7 @@ msgstr "" "être recyclés lorsqu'un fil d'exécution se termine et qu'un autre fil est " "créé." -#: library/_thread.rst:118 +#: library/_thread.rst:113 msgid "" "Return the native integral Thread ID of the current thread assigned by the " "kernel. This is a non-negative integer. Its value may be used to uniquely " @@ -192,23 +191,27 @@ msgstr "" "fil d'exécution se termine, après quoi la valeur peut être recyclée par le " "système d'exploitation)." -#: library/_thread.rst:148 +#: library/_thread.rst:146 msgid "Availability" -msgstr "" +msgstr "Disponibilité" -#: library/_thread.rst:127 +#: library/_thread.rst:122 msgid "Added support for GNU/kFreeBSD." msgstr "" -#: library/_thread.rst:133 +#: library/_thread.rst:125 +msgid "Added support for Solaris." +msgstr "" + +#: library/_thread.rst:131 msgid "" "Return the thread stack size used when creating new threads. The optional " "*size* argument specifies the stack size to be used for subsequently created " "threads, and must be 0 (use platform or configured default) or a positive " "integer value of at least 32,768 (32 KiB). If *size* is not specified, 0 is " -"used. If changing the thread stack size is unsupported, a :exc:" -"`RuntimeError` is raised. If the specified stack size is invalid, a :exc:" -"`ValueError` is raised and the stack size is unmodified. 32 KiB is " +"used. If changing the thread stack size is unsupported, " +"a :exc:`RuntimeError` is raised. If the specified stack size is invalid, " +"a :exc:`ValueError` is raised and the stack size is unmodified. 32 KiB is " "currently the minimum supported stack size value to guarantee sufficient " "stack space for the interpreter itself. Note that some platforms may have " "particular restrictions on values for the stack size, such as requiring a " @@ -225,38 +228,43 @@ msgstr "" "un entier positif supérieur ou égal à 32 768 (32 Kio). Si *size* n'est pas " "spécifié, 0 est utilisé. Si la modification de la taille de la pile de fils " "n'est pas prise en charge, une exception :exc:`RuntimeError` est levée. Si " -"la taille de la pile spécifiée n'est pas valide, une exception :exc:" -"`ValueError` est levée et la taille de la pile n'est pas modifiée. 32 Kio " -"est actuellement la valeur minimale de taille de la pile prise en charge " -"pour garantir un espace de pile suffisant pour l'interpréteur lui-même. " -"Notez que certaines plates-formes peuvent avoir des restrictions " -"particulières sur les valeurs de taille de la pile, telles que l'exigence " -"d'une taille de pile minimale > 32 Kio ou d'une allocation en multiples de " -"la taille de page de la mémoire du système – la documentation de la plate-" -"forme devrait être consultée pour plus d'informations (4 Kio sont courants ; " -"en l'absence de renseignements plus spécifiques, l'approche suggérée est " -"l'utilisation de multiples de 4 096 octets pour la taille de la pile)." - -#: library/_thread.rst:150 +"la taille de la pile spécifiée n'est pas valide, une " +"exception :exc:`ValueError` est levée et la taille de la pile n'est pas " +"modifiée. 32 Kio est actuellement la valeur minimale de taille de la pile " +"prise en charge pour garantir un espace de pile suffisant pour " +"l'interpréteur lui-même. Notez que certaines plates-formes peuvent avoir des " +"restrictions particulières sur les valeurs de taille de la pile, telles que " +"l'exigence d'une taille de pile minimale > 32 Kio ou d'une allocation en " +"multiples de la taille de page de la mémoire du système – la documentation " +"de la plate-forme devrait être consultée pour plus d'informations (4 Kio " +"sont courants ; en l'absence de renseignements plus spécifiques, l'approche " +"suggérée est l'utilisation de multiples de 4 096 octets pour la taille de la " +"pile)." + +#: library/_thread.rst:148 msgid "Unix platforms with POSIX threads support." msgstr "" -#: library/_thread.rst:155 +#: library/_thread.rst:153 #, fuzzy msgid "" "The maximum value allowed for the *timeout* parameter of :meth:`Lock.acquire " "`. Specifying a timeout greater than this value will " "raise an :exc:`OverflowError`." msgstr "" -"La valeur maximale autorisée pour le paramètre *timeout* de la méthode :" -"meth:`Lock.acquire`. Préciser un délai d'attente supérieur à cette valeur " -"lève une exception :exc:`OverflowError`." +"La valeur maximale autorisée pour le paramètre *timeout* de la " +"méthode :meth:`Lock.acquire`. Préciser un délai d'attente supérieur à cette " +"valeur lève une exception :exc:`OverflowError`." -#: library/_thread.rst:162 +#: library/_thread.rst:169 +msgid "This is the type of lock objects." +msgstr "C'est le type d'objets verrous." + +#: library/_thread.rst:171 msgid "Lock objects have the following methods:" msgstr "Les verrous ont les méthodes suivantes :" -#: library/_thread.rst:167 +#: library/_thread.rst:175 msgid "" "Without any optional argument, this method acquires the lock " "unconditionally, if necessary waiting until it is released by another thread " @@ -268,7 +276,7 @@ msgstr "" "par un autre fil d'exécution (un seul fil d'exécution à la fois peut " "acquérir le verrou — c'est leur raison d'être)." -#: library/_thread.rst:171 +#: library/_thread.rst:179 #, fuzzy msgid "" "If the *blocking* argument is present, the action depends on its value: if " @@ -281,7 +289,7 @@ msgstr "" "acquis immédiatement, sans attendre, sinon le verrou est acquis " "inconditionnellement comme ci-dessus." -#: library/_thread.rst:176 +#: library/_thread.rst:184 #, fuzzy msgid "" "If the floating-point *timeout* argument is present and positive, it " @@ -294,7 +302,7 @@ msgstr "" "argument *timeout* négatif spécifie une attente illimitée. Vous ne pouvez " "pas spécifier un *timeout* si *waitflag* est à zéro." -#: library/_thread.rst:181 +#: library/_thread.rst:189 msgid "" "The return value is ``True`` if the lock is acquired successfully, ``False`` " "if not." @@ -302,16 +310,22 @@ msgstr "" "La valeur renvoyée est ``True`` si le verrou est acquis avec succès, sinon " "``False``." -#: library/_thread.rst:184 +#: library/_thread.rst:192 msgid "The *timeout* parameter is new." msgstr "Le paramètre *timeout* est nouveau." -#: library/_thread.rst:187 +#: library/_thread.rst:195 msgid "Lock acquires can now be interrupted by signals on POSIX." msgstr "" "Le verrou acquis peut maintenant être interrompu par des signaux sur POSIX." -#: library/_thread.rst:193 +#: library/_thread.rst:198 +#, fuzzy +msgid "Lock acquires can now be interrupted by signals on Windows." +msgstr "" +"Le verrou acquis peut maintenant être interrompu par des signaux sur POSIX." + +#: library/_thread.rst:203 msgid "" "Releases the lock. The lock must have been acquired earlier, but not " "necessarily by the same thread." @@ -319,7 +333,7 @@ msgstr "" "Relâche le verrou. Le verrou doit avoir été acquis plus tôt, mais pas " "nécessairement par le même fil d'exécution." -#: library/_thread.rst:199 +#: library/_thread.rst:208 msgid "" "Return the status of the lock: ``True`` if it has been acquired by some " "thread, ``False`` if not." @@ -327,25 +341,25 @@ msgstr "" "Renvoie le statut du verrou : ``True`` s'il a été acquis par certains fils " "d'exécution, sinon ``False``." -#: library/_thread.rst:202 +#: library/_thread.rst:211 msgid "" -"In addition to these methods, lock objects can also be used via the :keyword:" -"`with` statement, e.g.::" +"In addition to these methods, lock objects can also be used via " +"the :keyword:`with` statement, e.g.::" msgstr "" "En plus de ces méthodes, les objets verrous peuvent aussi être utilisés via " "l'instruction :keyword:`with`, e.g ::" -#: library/_thread.rst:212 +#: library/_thread.rst:221 msgid "**Caveats:**" msgstr "**Avertissements :**" -#: library/_thread.rst:216 +#: library/_thread.rst:225 msgid "" "Interrupts always go to the main thread (the :exc:`KeyboardInterrupt` " "exception will be received by that thread.)" msgstr "" -#: library/_thread.rst:219 +#: library/_thread.rst:228 msgid "" "Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is " "equivalent to calling :func:`_thread.exit`." @@ -353,30 +367,30 @@ msgstr "" "Appeler la fonction :func:`sys.exit` ou lever l'exception :exc:`SystemExit` " "est équivalent à appeler la fonction :func:`_thread.exit`." -#: library/_thread.rst:222 -#, fuzzy -msgid "" -"It is platform-dependent whether the :meth:`~threading.Lock.acquire` method " -"on a lock can be interrupted (so that the :exc:`KeyboardInterrupt` exception " -"will happen immediately, rather than only after the lock has been acquired " -"or the operation has timed out). It can be interrupted on POSIX, but not on " -"Windows." -msgstr "" -"Il n'est pas possible d'interrompre la méthode :meth:`acquire` sur un verrou " -"— l'exception :exc:`KeyboardInterrupt` surviendra après que le verrou a été " -"acquis." - -#: library/_thread.rst:228 +#: library/_thread.rst:231 msgid "" "When the main thread exits, it is system defined whether the other threads " -"survive. On most systems, they are killed without executing :keyword:" -"`try` ... :keyword:`finally` clauses or executing object destructors." +"survive. On most systems, they are killed without " +"executing :keyword:`try` ... :keyword:`finally` clauses or executing object " +"destructors." msgstr "" "Quand le fil d'exécution principal s'arrête, il est défini par le système si " "les autres fils d'exécution survivent. Sur beaucoup de systèmes, ils sont " "tués sans l'exécution des clauses :keyword:`try`… :keyword:`finally` ou " "l'exécution des destructeurs d'objets." +#, fuzzy +#~ msgid "" +#~ "It is platform-dependent whether the :meth:`~threading.Lock.acquire` " +#~ "method on a lock can be interrupted (so that the :exc:`KeyboardInterrupt` " +#~ "exception will happen immediately, rather than only after the lock has " +#~ "been acquired or the operation has timed out). It can be interrupted on " +#~ "POSIX, but not on Windows." +#~ msgstr "" +#~ "Il n'est pas possible d'interrompre la méthode :meth:`acquire` sur un " +#~ "verrou — l'exception :exc:`KeyboardInterrupt` surviendra après que le " +#~ "verrou a été acquis." + #~ msgid "POSIX" #~ msgstr "POSIX" @@ -401,8 +415,9 @@ msgstr "" #~ msgid "" #~ "Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` " -#~ "exception will be received by an arbitrary thread. (When the :mod:" -#~ "`signal` module is available, interrupts always go to the main thread.)" +#~ "exception will be received by an arbitrary thread. (When " +#~ "the :mod:`signal` module is available, interrupts always go to the main " +#~ "thread.)" #~ msgstr "" #~ "Les fils d'exécution interagissent étrangement avec les interruptions : " #~ "l'exception :exc:`KeyboardInterrupt` sera reçue par un fil d'exécution " diff --git a/library/abc.po b/library/abc.po index 4a81c5727..8d90bca9a 100644 --- a/library/abc.po +++ b/library/abc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-11-20 22:28+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,34 +20,35 @@ msgstr "" msgid ":mod:`!abc` --- Abstract Base Classes" msgstr ":mod:`abc` — Classes de Base Abstraites" -#: library/abc.rst:11 +#: library/abc.rst:7 msgid "**Source code:** :source:`Lib/abc.py`" msgstr "**Code source:** :source:`Lib/abc.py`" -#: library/abc.rst:15 +#: library/abc.rst:11 msgid "" "This module provides the infrastructure for defining :term:`abstract base " "classes ` (ABCs) in Python, as outlined in :pep:`3119`; " -"see the PEP for why this was added to Python. (See also :pep:`3141` and the :" -"mod:`numbers` module regarding a type hierarchy for numbers based on ABCs.)" +"see the PEP for why this was added to Python. (See also :pep:`3141` and " +"the :mod:`numbers` module regarding a type hierarchy for numbers based on " +"ABCs.)" msgstr "" "Le module fournit l'infrastructure pour définir les :term:`classes mères " "abstraites ` (*Abstract Base Class* ou *ABC* en " "anglais) en Python, tel qu'indiqué dans la :pep:`3119`; voir la PEP pour la " -"raison de son ajout à Python. (Voir également la :pep:`3141` et le module :" -"mod:`numbers` pour ce qui concerne la hiérarchie de types pour les nombres " -"basés sur les classes mères abstraites). Par la suite nous utiliserons " -"l'abréviation ABC (*Abstract Base Class*) pour désigner une classe mère " -"abstraite." +"raison de son ajout à Python. (Voir également la :pep:`3141` et le " +"module :mod:`numbers` pour ce qui concerne la hiérarchie de types pour les " +"nombres basés sur les classes abstraites). Par la suite nous " +"utiliserons l'abréviation ABC (*Abstract Base Class*) pour désigner une " +"classe abstraite." -#: library/abc.rst:20 +#: library/abc.rst:16 #, fuzzy msgid "" "The :mod:`collections` module has some concrete classes that derive from " -"ABCs; these can, of course, be further derived. In addition, the :mod:" -"`collections.abc` submodule has some ABCs that can be used to test whether a " -"class or instance provides a particular interface, for example, if it is :" -"term:`hashable` or if it is a :term:`mapping`." +"ABCs; these can, of course, be further derived. In addition, " +"the :mod:`collections.abc` submodule has some ABCs that can be used to test " +"whether a class or instance provides a particular interface, for example, if " +"it is :term:`hashable` or if it is a :term:`mapping`." msgstr "" "Le module :mod:`collections` possède certaines classes concrètes qui " "dérivent d'ABC. Celles-ci peuvent, bien sur, être elles-mêmes dérivées. De " @@ -56,7 +57,7 @@ msgstr "" "spécifique. Par exemple, est-elle hachable ou un tableau associatif " "(*mapping* en anglais) ?" -#: library/abc.rst:27 +#: library/abc.rst:23 msgid "" "This module provides the metaclass :class:`ABCMeta` for defining ABCs and a " "helper class :class:`ABC` to alternatively define ABCs through inheritance:" @@ -65,7 +66,7 @@ msgstr "" "que la classe d'aide :class:`ABC`, cette dernière permettant de définir des " "ABC en utilisant l'héritage :" -#: library/abc.rst:32 +#: library/abc.rst:28 #, fuzzy msgid "" "A helper class that has :class:`ABCMeta` as its metaclass. With this class, " @@ -76,7 +77,7 @@ msgstr "" "ABC peut être créée simplement en héritant de :class:`ABC` , ce qui permet " "d'éviter l'utilisation parfois déroutante de métaclasse, par exemple ::" -#: library/abc.rst:41 +#: library/abc.rst:37 #, fuzzy msgid "" "Note that the type of :class:`!ABC` is still :class:`ABCMeta`, therefore " @@ -89,14 +90,14 @@ msgstr "" "conséquence, hériter de :class:`ABC` nécessite les précautions habituelles " "concernant l'utilisation de métaclasses : l'utilisation d'héritage multiple " "peut entrainer des conflits de métaclasses. Il est également possible de " -"définir une ABC en passant l'argument nommé *metaclass* et en utilisant :" -"class:`ABCMeta` directement, par exemple ::" +"définir une ABC en passant l'argument nommé *metaclass* et en " +"utilisant :class:`ABCMeta` directement, par exemple ::" -#: library/abc.rst:57 +#: library/abc.rst:53 msgid "Metaclass for defining Abstract Base Classes (ABCs)." -msgstr "Métaclasse pour définir des classes mères abstraites (ABC)." +msgstr "Métaclasse pour définir des classes abstraites (ABC)." -#: library/abc.rst:59 +#: library/abc.rst:55 msgid "" "Use this metaclass to create an ABC. An ABC can be subclassed directly, and " "then acts as a mix-in class. You can also register unrelated concrete " @@ -108,17 +109,17 @@ msgid "" "even via :func:`super`). [#]_" msgstr "" "Utilisez cette métaclasse pour créer une ABC. Il est possible d'hériter " -"d'une ABC directement, cette classe mère abstraite fonctionne alors comme " +"d'une ABC directement, cette classe abstraite fonctionne alors comme " "une classe *mixin*. Vous pouvez également enregistrer une classe concrète " "sans lien (même une classe native) et des ABC comme \"sous-classes " "virtuelles\" -- celles-ci et leur descendantes seront considérées comme des " -"sous-classes de la classe mère abstraite par la fonction native :func:" -"`issubclass`, mais les ABC enregistrées n'apparaitront pas dans leur ordre " -"de résolution des méthodes (*MRO* pour *Method Resolution Order* en " -"anglais). Les implémentations de méthodes définies par l'ABC ne seront pas " -"appelable (pas même via :func:`super`). [#]_" +"sous-classes de la classe abstraite par la fonction " +"native :func:`issubclass`, mais les ABC enregistrées n'apparaitront pas dans " +"leur ordre de résolution des méthodes (*MRO* pour *Method Resolution Order* " +"en anglais). Les implémentations de méthodes définies par l'ABC ne seront " +"pas appelable (pas même via :func:`super`). [#]_" -#: library/abc.rst:68 +#: library/abc.rst:64 #, fuzzy msgid "" "Classes created with a metaclass of :class:`!ABCMeta` have the following " @@ -127,53 +128,53 @@ msgstr "" "Les classes dont la métaclasse est :class:`ABCMeta` possèdent les méthodes " "suivantes :" -#: library/abc.rst:72 +#: library/abc.rst:68 msgid "" "Register *subclass* as a \"virtual subclass\" of this ABC. For example::" msgstr "" "Enregistrer *subclass* en tant que sous-classe virtuelle de cette ABC. Par " "exemple ::" -#: library/abc.rst:85 +#: library/abc.rst:81 msgid "Returns the registered subclass, to allow usage as a class decorator." msgstr "" "Renvoie la sous-classe enregistrée pour permettre l'utilisation en tant que " "décorateur de classe." -#: library/abc.rst:88 +#: library/abc.rst:84 #, fuzzy msgid "" -"To detect calls to :meth:`!register`, you can use the :func:" -"`get_cache_token` function." +"To detect calls to :meth:`!register`, you can use " +"the :func:`get_cache_token` function." msgstr "" "Pour détecter les appels à :meth:`register`, vous pouvez utiliser la " "fonction :func:`get_cache_token`." -#: library/abc.rst:92 +#: library/abc.rst:88 msgid "You can also override this method in an abstract base class:" msgstr "Vous pouvez également redéfinir cette méthode dans une ABC :" -#: library/abc.rst:96 +#: library/abc.rst:92 msgid "(Must be defined as a class method.)" msgstr "(Doit être définie en tant que méthode de classe.)" -#: library/abc.rst:98 +#: library/abc.rst:94 #, fuzzy msgid "" "Check whether *subclass* is considered a subclass of this ABC. This means " "that you can customize the behavior of :func:`issubclass` further without " "the need to call :meth:`register` on every class you want to consider a " -"subclass of the ABC. (This class method is called from the :meth:`~type." -"__subclasscheck__` method of the ABC.)" +"subclass of the ABC. (This class method is called from " +"the :meth:`~type.__subclasscheck__` method of the ABC.)" msgstr "" "Vérifie si *subclass* est considérée comme une sous-classe de cette ABC. " "Cela signifie que vous pouvez personnaliser le comportement de " "``issubclass`` sans nécessiter d'appeler :meth:`register` pour chacune des " "classes que vous souhaitez considérer comme sous-classe de l'ABC. (Cette " "méthode de classe est appelée par la méthode :meth:`__subclasscheck__` de la " -"classe mère abstraite)." +"classe abstraite)." -#: library/abc.rst:104 +#: library/abc.rst:100 #, fuzzy msgid "" "This method should return ``True``, ``False`` or :data:`NotImplemented`. If " @@ -189,68 +190,71 @@ msgstr "" "renvoie ``NotImplemented``, la vérification d'appartenance à la sous-classe " "continue via le mécanisme habituel." -#: library/abc.rst:114 +#: library/abc.rst:110 msgid "" "For a demonstration of these concepts, look at this example ABC definition::" msgstr "" "Pour une illustration de ces concepts, voir cet exemple de définition de " "ABC ::" -#: library/abc.rst:143 +#: library/abc.rst:139 #, fuzzy msgid "" -"The ABC ``MyIterable`` defines the standard iterable method, :meth:" -"`~iterator.__iter__`, as an abstract method. The implementation given here " -"can still be called from subclasses. The :meth:`!get_iterator` method is " -"also part of the ``MyIterable`` abstract base class, but it does not have to " -"be overridden in non-abstract derived classes." +"The ABC ``MyIterable`` defines the standard iterable " +"method, :meth:`~object.__iter__`, as an abstract method. The implementation " +"given here can still be called from subclasses. The :meth:`!get_iterator` " +"method is also part of the ``MyIterable`` abstract base class, but it does " +"not have to be overridden in non-abstract derived classes." msgstr "" -"L'ABC ``MyIterable`` définit la méthode d'itération :meth:`~iterator." -"__iter__` comme méthode abstraite. L'implémentation qui lui est donnée ici " -"peut être appelée depuis les sous-classes. La méthode :meth:`get_iterator` " -"fait également partie de la classe mère abstraite ``MyIterable``, mais elle " -"n'a pas à être redéfinie dans les classes dérivées non-abstraites." +"L'ABC ``MyIterable`` définit la méthode " +"d'itération :meth:`~iterator.__iter__` comme méthode abstraite. " +"L'implémentation qui lui est donnée ici peut être appelée depuis les sous-" +"classes. La méthode :meth:`get_iterator` fait également partie de la classe " +"abstraite ``MyIterable``, mais elle n'a pas à être redéfinie dans les " +"classes dérivées non-abstraites." -#: library/abc.rst:149 +#: library/abc.rst:145 #, fuzzy msgid "" "The :meth:`__subclasshook__` class method defined here says that any class " -"that has an :meth:`~iterator.__iter__` method in its :attr:`~object." -"__dict__` (or in that of one of its base classes, accessed via the :attr:" -"`~type.__mro__` list) is considered a ``MyIterable`` too." +"that has an :meth:`~object.__iter__` method in its :attr:`~object.__dict__` " +"(or in that of one of its base classes, accessed via " +"the :attr:`~type.__mro__` list) is considered a ``MyIterable`` too." msgstr "" "La méthode de classe :meth:`__subclasshook__` définie ici dit que toute " -"classe qui possède la méthode :meth:`~iterator.__iter__` dans son :attr:" -"`~object.__dict__` (ou dans une de ses classes mères, accédée via la liste :" -"attr:`~class.__mro__`) est considérée également comme un ``MyIterable``." +"classe qui possède la méthode :meth:`~iterator.__iter__` dans " +"son :attr:`~object.__dict__` (ou dans une de ses classes mères, accédée via " +"la liste :attr:`~class.__mro__`) est considérée également comme un " +"``MyIterable``." -#: library/abc.rst:154 +#: library/abc.rst:150 #, fuzzy msgid "" "Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, " -"even though it does not define an :meth:`~iterator.__iter__` method (it uses " +"even though it does not define an :meth:`~object.__iter__` method (it uses " "the old-style iterable protocol, defined in terms of :meth:`~object.__len__` " "and :meth:`~object.__getitem__`). Note that this will not make " "``get_iterator`` available as a method of ``Foo``, so it is provided " "separately." msgstr "" "Enfin, la dernière ligne fait de ``Foo`` une sous-classe virtuelle de " -"``MyIterable``, même si cette classe ne définit pas de méthode :meth:" -"`~iterator.__iter__` (elle utilise l'ancien protocole d'itération qui se " -"définit en termes de :meth:`__len__` et :meth:`__getitem__`). A noter que " -"cela ne rendra pas le ``get_iterator`` de ``MyIterable`` disponible comme " -"une méthode de ``Foo``, ``get_iterator`` est donc implémenté séparément." - -#: library/abc.rst:163 +"``MyIterable``, même si cette classe ne définit pas de " +"méthode :meth:`~iterator.__iter__` (elle utilise l'ancien protocole " +"d'itération qui se définit en termes de :meth:`__len__` " +"et :meth:`__getitem__`). A noter que cela ne rendra pas le ``get_iterator`` " +"de ``MyIterable`` disponible comme une méthode de ``Foo``, ``get_iterator`` " +"est donc implémenté séparément." + +#: library/abc.rst:159 #, fuzzy msgid "The :mod:`!abc` module also provides the following decorator:" msgstr "Le module :mod:`abc` fournit aussi le décorateur :" -#: library/abc.rst:167 +#: library/abc.rst:163 msgid "A decorator indicating abstract methods." msgstr "Un décorateur marquant les méthodes comme abstraites." -#: library/abc.rst:169 +#: library/abc.rst:165 #, fuzzy msgid "" "Using this decorator requires that the class's metaclass is :class:`ABCMeta` " @@ -260,15 +264,15 @@ msgid "" "the normal 'super' call mechanisms. :func:`!abstractmethod` may be used to " "declare abstract methods for properties and descriptors." msgstr "" -"Utiliser ce décorateur nécessite que la métaclasse de la classe soit :class:" -"`ABCMeta` ou soit dérivée de celle-ci. Une classe qui possède une méta-" -"classe dérivée de :class:`ABCMeta` ne peut pas être instanciée à moins que " -"toutes ses méthodes et propriétés abstraites soient redéfinies. Les méthodes " -"abstraites peuvent être appelées en utilisant n'importe quel des mécanismes " -"d'appel à 'super'. :func:`abstractmethod` peut être utilisée pour déclarer " -"des méthodes abstraites pour les propriétés et descripteurs." +"Utiliser ce décorateur nécessite que la métaclasse de la classe " +"soit :class:`ABCMeta` ou soit dérivée de celle-ci. Une classe qui possède " +"une méta-classe dérivée de :class:`ABCMeta` ne peut pas être instanciée à " +"moins que toutes ses méthodes et propriétés abstraites soient redéfinies. " +"Les méthodes abstraites peuvent être appelées en utilisant n'importe quel " +"des mécanismes d'appel à 'super'. :func:`abstractmethod` peut être utilisée " +"pour déclarer des méthodes abstraites pour les propriétés et descripteurs." -#: library/abc.rst:176 +#: library/abc.rst:172 #, fuzzy msgid "" "Dynamically adding abstract methods to a class, or attempting to modify the " @@ -285,7 +289,7 @@ msgstr "" "utilisant l'héritage classique. Les \"sous-classes virtuelles\" enregistrées " "avec la méthode :meth:`register` de l'ABC ne sont pas affectées." -#: library/abc.rst:183 +#: library/abc.rst:179 #, fuzzy msgid "" "When :func:`!abstractmethod` is applied in combination with other method " @@ -296,7 +300,7 @@ msgstr "" "d'autres descripteurs de méthodes, il doit être appliqué en tant que " "décorateur le plus interne. Voir les exemples d'utilisation suivants ::" -#: library/abc.rst:217 +#: library/abc.rst:213 #, fuzzy msgid "" "In order to correctly interoperate with the abstract base class machinery, " @@ -305,13 +309,14 @@ msgid "" "of the methods used to compose the descriptor are abstract. For example, " "Python's built-in :class:`property` does the equivalent of::" msgstr "" -"Afin d'interagir correctement avec le mécanisme de classe mère abstraite, un " -"descripteur doit s'identifier comme abstrait en utilisant :attr:" -"`__isabstractmethod__`. En général, cet attribut doit être ``True`` si au " -"moins une des méthodes faisant partie du descripteur est abstraite. Par " -"exemple, la classe native :class:`property` de python fait l'équivalent de ::" +"Afin d'interagir correctement avec le mécanisme de classe abstraite, un " +"descripteur doit s'identifier comme abstrait en " +"utilisant :attr:`__isabstractmethod__`. En général, cet attribut doit être " +"``True`` si au moins une des méthodes faisant partie du descripteur est " +"abstraite. Par exemple, la classe native :class:`property` de python fait " +"l'équivalent de ::" -#: library/abc.rst:232 +#: library/abc.rst:228 msgid "" "Unlike Java abstract methods, these abstract methods may have an " "implementation. This implementation can be called via the :func:`super` " @@ -320,35 +325,35 @@ msgid "" "inheritance." msgstr "" "Contrairement aux méthodes abstraites Java, ces méthodes abstraites peuvent " -"être implémentées. Cette implémentation peut être appelée via le mécanisme :" -"func:`super` depuis la classe qui la redéfinit. C'est typiquement utile pour " -"y appeler *super* et ainsi coopérer correctement dans un environnement " -"utilisant de l'héritage multiple." +"être implémentées. Cette implémentation peut être appelée via le " +"mécanisme :func:`super` depuis la classe qui la redéfinit. C'est typiquement " +"utile pour y appeler *super* et ainsi coopérer correctement dans un " +"environnement utilisant de l'héritage multiple." -#: library/abc.rst:239 +#: library/abc.rst:235 #, fuzzy msgid "The :mod:`!abc` module also supports the following legacy decorators:" msgstr "" "Le module :mod:`abc` gère également les décorateurs historiques suivants :" -#: library/abc.rst:244 +#: library/abc.rst:240 msgid "" "It is now possible to use :class:`classmethod` with :func:`abstractmethod`, " "making this decorator redundant." msgstr "" -"Il est désormais possible d'utiliser :class:`classmethod` avec :func:" -"`abstractmethod`, cela rend ce décorateur redondant." +"Il est désormais possible d'utiliser :class:`classmethod` " +"avec :func:`abstractmethod`, cela rend ce décorateur redondant." -#: library/abc.rst:248 +#: library/abc.rst:244 msgid "" "A subclass of the built-in :func:`classmethod`, indicating an abstract " "classmethod. Otherwise it is similar to :func:`abstractmethod`." msgstr "" "Sous-classe du décorateur natif :func:`classmethod` qui indique une méthode " -"de classe ( ``classmethod`` ) abstraite. En dehors de cela, est similaire à :" -"func:`abstractmethod`." +"de classe ( ``classmethod`` ) abstraite. En dehors de cela, est similaire " +"à :func:`abstractmethod`." -#: library/abc.rst:251 +#: library/abc.rst:247 msgid "" "This special case is deprecated, as the :func:`classmethod` decorator is now " "correctly identified as abstract when applied to an abstract method::" @@ -357,24 +362,24 @@ msgstr "" "désormais correctement identifié comme abstrait quand il est appliqué à une " "méthode abstraite ::" -#: library/abc.rst:265 +#: library/abc.rst:261 msgid "" "It is now possible to use :class:`staticmethod` with :func:`abstractmethod`, " "making this decorator redundant." msgstr "" -"Il est désormais possible d'utiliser :class:`staticmethod` avec :func:" -"`abstractmethod`, cela rend ce décorateur redondant." +"Il est désormais possible d'utiliser :class:`staticmethod` " +"avec :func:`abstractmethod`, cela rend ce décorateur redondant." -#: library/abc.rst:269 +#: library/abc.rst:265 msgid "" "A subclass of the built-in :func:`staticmethod`, indicating an abstract " "staticmethod. Otherwise it is similar to :func:`abstractmethod`." msgstr "" "Sous-classe du décorateur natif :func:`classmethod` qui indique une méthode " -"statique ( ``staticmethod`` ) abstraite. En dehors de cela, est similaire à :" -"func:`abstractmethod`." +"statique ( ``staticmethod`` ) abstraite. En dehors de cela, est similaire " +"à :func:`abstractmethod`." -#: library/abc.rst:272 +#: library/abc.rst:268 msgid "" "This special case is deprecated, as the :func:`staticmethod` decorator is " "now correctly identified as abstract when applied to an abstract method::" @@ -383,22 +388,24 @@ msgstr "" "désormais correctement identifié comme abstrait quand appliqué à une méthode " "abstraite ::" -#: library/abc.rst:285 +#: library/abc.rst:281 msgid "" -"It is now possible to use :class:`property`, :meth:`property.getter`, :meth:" -"`property.setter` and :meth:`property.deleter` with :func:`abstractmethod`, " -"making this decorator redundant." +"It is now possible to " +"use :class:`property`, :meth:`property.getter`, :meth:`property.setter` " +"and :meth:`property.deleter` with :func:`abstractmethod`, making this " +"decorator redundant." msgstr "" -"Il est désormais possible d'utiliser :class:`property`, :meth:`property." -"getter`, :meth:`property.setter` et :meth:`property.deleter` avec :func:" -"`abstractmethod`, ce qui rend ce décorateur redondant." +"Il est désormais possible " +"d'utiliser :class:`property`, :meth:`property.getter`, :meth:`property.setter` " +"et :meth:`property.deleter` avec :func:`abstractmethod`, ce qui rend ce " +"décorateur redondant." -#: library/abc.rst:290 +#: library/abc.rst:286 msgid "" "A subclass of the built-in :func:`property`, indicating an abstract property." msgstr "Sous-classe de :func:`property`, qui indique une propriété abstraite." -#: library/abc.rst:293 +#: library/abc.rst:289 msgid "" "This special case is deprecated, as the :func:`property` decorator is now " "correctly identified as abstract when applied to an abstract method::" @@ -407,7 +414,7 @@ msgstr "" "correctement identifié comme abstrait quand appliqué à une méthode " "abstraite ::" -#: library/abc.rst:303 +#: library/abc.rst:299 msgid "" "The above example defines a read-only property; you can also define a read-" "write abstract property by appropriately marking one or more of the " @@ -417,7 +424,7 @@ msgstr "" "également définir une propriété en lecture-écriture abstraite en indiquant " "une ou plusieurs des méthodes sous-jacentes comme abstraite ::" -#: library/abc.rst:317 +#: library/abc.rst:313 msgid "" "If only some components are abstract, only those components need to be " "updated to create a concrete property in a subclass::" @@ -426,16 +433,16 @@ msgstr "" "nécessitent d'être mis à jour pour créer une propriété concrète dans une " "sous-classe ::" -#: library/abc.rst:326 +#: library/abc.rst:322 #, fuzzy msgid "The :mod:`!abc` module also provides the following functions:" msgstr "Le module :mod:`abc` fournit également la fonction suivante :" -#: library/abc.rst:330 +#: library/abc.rst:326 msgid "Returns the current abstract base class cache token." msgstr "Renvoie le jeton de cache ( *cache token*) de l'ABC." -#: library/abc.rst:332 +#: library/abc.rst:328 msgid "" "The token is an opaque object (that supports equality testing) identifying " "the current version of the abstract base class cache for virtual subclasses. " @@ -446,7 +453,7 @@ msgstr "" "virtuelles. Le jeton change avec chaque appel à :meth:`ABCMeta.register` sur " "n'importe quelle ABC." -#: library/abc.rst:340 +#: library/abc.rst:336 msgid "" "A function to recalculate an abstract class's abstraction status. This " "function should be called if a class's abstract methods have been " @@ -458,17 +465,17 @@ msgstr "" "modifiées après la création de la classe. C'est notamment le cas dans les " "décorateurs de classe." -#: library/abc.rst:345 +#: library/abc.rst:341 msgid "Returns *cls*, to allow usage as a class decorator." msgstr "" "Pour permettre une utilisation en tant que décorateur, cette fonction " "renvoie *cls*." -#: library/abc.rst:347 +#: library/abc.rst:343 msgid "If *cls* is not an instance of :class:`ABCMeta`, does nothing." msgstr "Ne fait rien si *cls* n'est pas une instance de :class:`ABCMeta`." -#: library/abc.rst:351 +#: library/abc.rst:347 msgid "" "This function assumes that *cls*'s superclasses are already updated. It does " "not update any subclasses." @@ -476,11 +483,11 @@ msgstr "" "Cette fonction suppose que les classes mères de *cls* ont vu leur état " "recalculé, et ne fait rien pour recalculer celui des classes filles." -#: library/abc.rst:357 +#: library/abc.rst:353 msgid "Footnotes" msgstr "Notes" -#: library/abc.rst:358 +#: library/abc.rst:354 msgid "" "C++ programmers should note that Python's virtual base class concept is not " "the same as C++'s." diff --git a/library/aifc.po b/library/aifc.po new file mode 100644 index 000000000..72fefeed0 --- /dev/null +++ b/library/aifc.po @@ -0,0 +1,33 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/aifc.rst:2 +msgid ":mod:`!aifc` --- Read and write AIFF and AIFC files" +msgstr "" + +#: library/aifc.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/aifc.rst:14 +msgid "" +"The last version of Python that provided the :mod:`!aifc` module was `Python " +"3.12 `_." +msgstr "" diff --git a/library/annotationlib.po b/library/annotationlib.po new file mode 100644 index 000000000..c6e166cca --- /dev/null +++ b/library/annotationlib.po @@ -0,0 +1,958 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/annotationlib.rst:2 +msgid ":mod:`!annotationlib` --- Functionality for introspecting annotations" +msgstr "" + +#: library/annotationlib.rst:9 +msgid "**Source code:** :source:`Lib/annotationlib.py`" +msgstr "" + +#: library/annotationlib.rst:18 +msgid "" +"The :mod:`!annotationlib` module provides tools for " +"introspecting :term:`annotations ` on modules, classes, and " +"functions." +msgstr "" + +#: library/annotationlib.rst:21 +msgid "" +"Annotations are :ref:`lazily evaluated ` and often contain " +"forward references to objects that are not yet defined when the annotation " +"is created. This module provides a set of low-level tools that can be used " +"to retrieve annotations in a reliable way, even in the presence of forward " +"references and other edge cases." +msgstr "" + +#: library/annotationlib.rst:26 +msgid "" +"This module supports retrieving annotations in three main formats " +"(see :class:`Format`), each of which works best for different use cases:" +msgstr "" + +#: library/annotationlib.rst:29 +msgid "" +":attr:`~Format.VALUE` evaluates the annotations and returns their value. " +"This is most straightforward to work with, but it may raise errors, for " +"example if the annotations contain references to undefined names." +msgstr "" + +#: library/annotationlib.rst:32 +msgid "" +":attr:`~Format.FORWARDREF` returns :class:`ForwardRef` objects for " +"annotations that cannot be resolved, allowing you to inspect the annotations " +"without evaluating them. This is useful when you need to work with " +"annotations that may contain unresolved forward references." +msgstr "" + +#: library/annotationlib.rst:36 +msgid "" +":attr:`~Format.STRING` returns the annotations as a string, similar to how " +"it would appear in the source file. This is useful for documentation " +"generators that want to display annotations in a readable way." +msgstr "" + +#: library/annotationlib.rst:40 +msgid "" +"The :func:`get_annotations` function is the main entry point for retrieving " +"annotations. Given a function, class, or module, it returns an annotations " +"dictionary in the requested format. This module also provides functionality " +"for working directly with the :term:`annotate function` that is used to " +"evaluate annotations, such as :func:`get_annotate_from_class_namespace` " +"and :func:`call_annotate_function`, as well as " +"the :func:`call_evaluate_function` function for working with :term:`evaluate " +"functions `." +msgstr "" + +#: library/annotationlib.rst:51 +msgid "" +"Most functionality in this module can execute arbitrary code; see :ref:`the " +"security section ` for more information." +msgstr "" + +#: library/annotationlib.rst:56 +msgid "" +":pep:`649` proposed the current model for how annotations work in Python." +msgstr "" + +#: library/annotationlib.rst:58 +msgid "" +":pep:`749` expanded on various aspects of :pep:`649` and introduced " +"the :mod:`!annotationlib` module." +msgstr "" + +#: library/annotationlib.rst:61 +msgid "" +":ref:`annotations-howto` provides best practices for working with " +"annotations." +msgstr "" + +#: library/annotationlib.rst:64 +msgid "" +":pypi:`typing-extensions` provides a backport of :func:`get_annotations` " +"that works on earlier versions of Python." +msgstr "" + +#: library/annotationlib.rst:68 +msgid "Annotation semantics" +msgstr "" + +#: library/annotationlib.rst:70 +msgid "" +"The way annotations are evaluated has changed over the history of Python 3, " +"and currently still depends on a :ref:`future import `. There have " +"been execution models for annotations:" +msgstr "" + +#: library/annotationlib.rst:74 +msgid "" +"*Stock semantics* (default in Python 3.0 through 3.13; see :pep:`3107` " +"and :pep:`526`): Annotations are evaluated eagerly, as they are encountered " +"in the source code." +msgstr "" + +#: library/annotationlib.rst:77 +msgid "" +"*Stringified annotations* (used with ``from __future__ import annotations`` " +"in Python 3.7 and newer; see :pep:`563`): Annotations are stored as strings " +"only." +msgstr "" + +#: library/annotationlib.rst:80 +msgid "" +"*Deferred evaluation* (default in Python 3.14 and newer; see :pep:`649` " +"and :pep:`749`): Annotations are evaluated lazily, only when they are " +"accessed." +msgstr "" + +#: library/annotationlib.rst:83 +msgid "As an example, consider the following program::" +msgstr "" + +#: library/annotationlib.rst:92 +msgid "This will behave as follows:" +msgstr "" + +#: library/annotationlib.rst:94 +msgid "" +"Under stock semantics (Python 3.13 and earlier), it will throw " +"a :exc:`NameError` at the line where ``func`` is defined, because ``Cls`` is " +"an undefined name at that point." +msgstr "" + +#: library/annotationlib.rst:97 +msgid "" +"Under stringified annotations (if ``from __future__ import annotations`` is " +"used), it will print ``{'a': 'Cls', 'return': 'None'}``." +msgstr "" + +#: library/annotationlib.rst:99 +msgid "" +"Under deferred evaluation (Python 3.14 and later), it will print ``{'a': " +", 'return': None}``." +msgstr "" + +#: library/annotationlib.rst:102 +msgid "" +"Stock semantics were used when function annotations were first introduced in " +"Python 3.0 (by :pep:`3107`) because this was the simplest, most obvious way " +"to implement annotations. The same execution model was used when variable " +"annotations were introduced in Python 3.6 (by :pep:`526`). However, stock " +"semantics caused problems when using annotations as type hints, such as a " +"need to refer to names that are not yet defined when the annotation is " +"encountered. In addition, there were performance problems with executing " +"annotations at module import time. Therefore, in Python 3.7, :pep:`563` " +"introduced the ability to store annotations as strings using the ``from " +"__future__ import annotations`` syntax. The plan at the time was to " +"eventually make this behavior the default, but a problem appeared: " +"stringified annotations are more difficult to process for those who " +"introspect annotations at runtime. An alternative proposal, :pep:`649`, " +"introduced the third execution model, deferred evaluation, and was " +"implemented in Python 3.14. Stringified annotations are still used if ``from " +"__future__ import annotations`` is present, but this behavior will " +"eventually be removed." +msgstr "" + +#: library/annotationlib.rst:121 +msgid "Classes" +msgstr "Classes" + +#: library/annotationlib.rst:125 +msgid "" +"An :class:`~enum.IntEnum` describing the formats in which annotations can be " +"returned. Members of the enum, or their equivalent integer values, can be " +"passed to :func:`get_annotations` and other functions in this module, as " +"well as to :attr:`~object.__annotate__` functions." +msgstr "" + +#: library/annotationlib.rst:133 +msgid "Values are the result of evaluating the annotation expressions." +msgstr "" + +#: library/annotationlib.rst:138 +msgid "" +"Special value used to signal that an annotate function is being evaluated in " +"a special environment with fake globals. When passed this value, annotate " +"functions should either return the same value as for " +"the :attr:`Format.VALUE` format, or raise :exc:`NotImplementedError` to " +"signal that they do not support execution in this environment. This format " +"is only used internally and should not be passed to the functions in this " +"module." +msgstr "" + +#: library/annotationlib.rst:149 +msgid "" +"Values are real annotation values (as per :attr:`Format.VALUE` format) for " +"defined values, and :class:`ForwardRef` proxies for undefined values. Real " +"objects may contain references to :class:`ForwardRef` proxy objects." +msgstr "" + +#: library/annotationlib.rst:157 +msgid "" +"Values are the text string of the annotation as it appears in the source " +"code, up to modifications including, but not restricted to, whitespace " +"normalizations and constant values optimizations." +msgstr "" + +#: library/annotationlib.rst:161 +msgid "" +"The exact values of these strings may change in future versions of Python." +msgstr "" + +#: library/annotationlib.rst:167 +msgid "A proxy object for forward references in annotations." +msgstr "" + +#: library/annotationlib.rst:169 +msgid "" +"Instances of this class are returned when the :attr:`~Format.FORWARDREF` " +"format is used and annotations contain a name that cannot be resolved. This " +"can happen when a forward reference is used in an annotation, such as when a " +"class is referenced before it is defined." +msgstr "" + +#: library/annotationlib.rst:176 +msgid "" +"A string containing the code that was evaluated to produce " +"the :class:`~ForwardRef`. The string may not be exactly equivalent to the " +"original source." +msgstr "" + +#: library/annotationlib.rst:182 +msgid "Evaluate the forward reference, returning its value." +msgstr "" + +#: library/annotationlib.rst:184 +msgid "" +"If the *format* argument is :attr:`~Format.VALUE` (the default), this method " +"may throw an exception, such as :exc:`NameError`, if the forward reference " +"refers to a name that cannot be resolved. The arguments to this method can " +"be used to provide bindings for names that would otherwise be undefined. If " +"the *format* argument is :attr:`~Format.FORWARDREF`, the method will never " +"throw an exception, but may return a :class:`~ForwardRef` instance. For " +"example, if the forward reference object contains the code " +"``list[undefined]``, where ``undefined`` is a name that is not defined, " +"evaluating it with the :attr:`~Format.FORWARDREF` format will return " +"``list[ForwardRef('undefined')]``. If the *format* argument " +"is :attr:`~Format.STRING`, the method will " +"return :attr:`~ForwardRef.__forward_arg__`." +msgstr "" + +#: library/annotationlib.rst:196 +msgid "" +"The *owner* parameter provides the preferred mechanism for passing scope " +"information to this method. The owner of a :class:`~ForwardRef` is the " +"object that contains the annotation from which the :class:`~ForwardRef` " +"derives, such as a module object, type object, or function object." +msgstr "" + +#: library/annotationlib.rst:201 +msgid "" +"The *globals*, *locals*, and *type_params* parameters provide a more precise " +"mechanism for influencing the names that are available when " +"the :class:`~ForwardRef` is evaluated. *globals* and *locals* are passed " +"to :func:`eval`, representing the global and local namespaces in which the " +"name is evaluated. The *type_params* parameter is relevant for objects " +"created using the native syntax for :ref:`generic classes ` " +"and :ref:`functions `. It is a tuple of :ref:`type " +"parameters ` that are in scope while the forward reference is " +"being evaluated. For example, if evaluating a :class:`~ForwardRef` retrieved " +"from an annotation found in the class namespace of a generic class ``C``, " +"*type_params* should be set to ``C.__type_params__``." +msgstr "" + +#: library/annotationlib.rst:212 +msgid "" +":class:`~ForwardRef` instances returned by :func:`get_annotations` retain " +"references to information about the scope they originated from, so calling " +"this method with no further arguments may be sufficient to evaluate such " +"objects. :class:`~ForwardRef` instances created by other means may not have " +"any information about their scope, so passing arguments to this method may " +"be necessary to evaluate them successfully." +msgstr "" + +#: library/annotationlib.rst:219 +msgid "" +"If no *owner*, *globals*, *locals*, or *type_params* are provided and " +"the :class:`~ForwardRef` does not contain information about its origin, " +"empty globals and locals dictionaries are used." +msgstr "" + +#: library/annotationlib.rst:227 +msgid "Functions" +msgstr "Fonctions" + +#: library/annotationlib.rst:231 +msgid "" +"Convert an annotations dict containing runtime values to a dict containing " +"only strings. If the values are not already strings, they are converted " +"using :func:`type_repr`. This is meant as a helper for user-provided " +"annotate functions that support the :attr:`~Format.STRING` format but do not " +"have access to the code creating the annotations." +msgstr "" + +#: library/annotationlib.rst:238 +msgid "" +"For example, this is used to implement the :attr:`~Format.STRING` " +"for :class:`typing.TypedDict` classes created through the functional syntax:" +msgstr "" + +#: library/annotationlib.rst:252 +msgid "" +"Call the :term:`annotate function` *annotate* with the given *format*, a " +"member of the :class:`Format` enum, and return the annotations dictionary " +"produced by the function." +msgstr "" + +#: library/annotationlib.rst:256 +msgid "" +"This helper function is required because annotate functions generated by the " +"compiler for functions, classes, and modules only support " +"the :attr:`~Format.VALUE` format when called directly. To support other " +"formats, this function calls the annotate function in a special environment " +"that allows it to produce annotations in the other formats. This is a useful " +"building block when implementing functionality that needs to partially " +"evaluate annotations while a class is being constructed." +msgstr "" + +#: library/annotationlib.rst:265 +msgid "" +"*owner* is the object that owns the annotation function, usually a function, " +"class, or module. If provided, it is used in the :attr:`~Format.FORWARDREF` " +"format to produce a :class:`ForwardRef` object that carries more information." +msgstr "" + +#: library/annotationlib.rst:272 +msgid "" +":PEP:`PEP 649 <649#the-stringizer-and-the-fake-globals-environment>` " +"contains an explanation of the implementation technique used by this " +"function." +msgstr "" + +#: library/annotationlib.rst:280 +msgid "" +"Call the :term:`evaluate function` *evaluate* with the given *format*, a " +"member of the :class:`Format` enum, and return the value produced by the " +"function. This is similar to :func:`call_annotate_function`, but the latter " +"always returns a dictionary mapping strings to annotations, while this " +"function returns a single value." +msgstr "" + +#: library/annotationlib.rst:286 +msgid "" +"This is intended for use with the evaluate functions generated for lazily " +"evaluated elements related to type aliases and type parameters:" +msgstr "" + +#: library/annotationlib.rst:289 +msgid ":meth:`typing.TypeAliasType.evaluate_value`, the value of type aliases" +msgstr "" + +#: library/annotationlib.rst:290 +msgid ":meth:`typing.TypeVar.evaluate_bound`, the bound of type variables" +msgstr "" + +#: library/annotationlib.rst:291 +msgid "" +":meth:`typing.TypeVar.evaluate_constraints`, the constraints of type " +"variables" +msgstr "" + +#: library/annotationlib.rst:293 +msgid "" +":meth:`typing.TypeVar.evaluate_default`, the default value of type variables" +msgstr "" + +#: library/annotationlib.rst:295 +msgid "" +":meth:`typing.ParamSpec.evaluate_default`, the default value of parameter " +"specifications" +msgstr "" + +#: library/annotationlib.rst:297 +msgid "" +":meth:`typing.TypeVarTuple.evaluate_default`, the default value of type " +"variable tuples" +msgstr "" + +#: library/annotationlib.rst:300 +msgid "" +"*owner* is the object that owns the evaluate function, such as the type " +"alias or type variable object." +msgstr "" + +#: library/annotationlib.rst:303 +msgid "" +"*format* can be used to control the format in which the value is returned:" +msgstr "" + +#: library/annotationlib.rst:321 +msgid "" +"Retrieve the :term:`annotate function` from a class namespace dictionary " +"*namespace*. Return :const:`!None` if the namespace does not contain an " +"annotate function. This is primarily useful before the class has been fully " +"created (e.g., in a metaclass); after the class exists, the annotate " +"function can be retrieved with ``cls.__annotate__``. See :ref:`below " +"` for an example using this function in a metaclass." +msgstr "" + +#: library/annotationlib.rst:331 +msgid "Compute the annotations dict for an object." +msgstr "" + +#: library/annotationlib.rst:333 +msgid "" +"*obj* may be a callable, class, module, or other object " +"with :attr:`~object.__annotate__` or :attr:`~object.__annotations__` " +"attributes. Passing any other object raises :exc:`TypeError`." +msgstr "" + +#: library/annotationlib.rst:337 +msgid "" +"The *format* parameter controls the format in which annotations are " +"returned, and must be a member of the :class:`Format` enum or its integer " +"equivalent. The different formats work as follows:" +msgstr "" + +#: library/annotationlib.rst:341 +msgid "" +"VALUE: :attr:`!object.__annotations__` is tried first; if that does not " +"exist, the :attr:`!object.__annotate__` function is called if it exists." +msgstr "" + +#: library/annotationlib.rst:344 +msgid "" +"FORWARDREF: If :attr:`!object.__annotations__` exists and can be evaluated " +"successfully, it is used; otherwise, the :attr:`!object.__annotate__` " +"function is called. If it does not exist either, :attr:`!" +"object.__annotations__` is tried again and any error from accessing it is re-" +"raised." +msgstr "" + +#: library/annotationlib.rst:349 +msgid "" +"When calling :attr:`!object.__annotate__` it is first called " +"with :attr:`~Format.FORWARDREF`. If this is not implemented, it will then " +"check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS` is supported and use that " +"in the fake globals environment. If neither of these formats are supported, " +"it will fall back to using :attr:`~Format.VALUE`. If :attr:`~Format.VALUE` " +"fails, the error from this call will be raised." +msgstr "" + +#: library/annotationlib.rst:355 +msgid "" +"STRING: If :attr:`!object.__annotate__` exists, it is called first; " +"otherwise, :attr:`!object.__annotations__` is used and stringified " +"using :func:`annotations_to_string`." +msgstr "" + +#: library/annotationlib.rst:359 +msgid "" +"When calling :attr:`!object.__annotate__` it is first called " +"with :attr:`~Format.STRING`. If this is not implemented, it will then check " +"if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS` is supported and use that in the " +"fake globals environment. If neither of these formats are supported, it will " +"fall back to using :attr:`~Format.VALUE` with the result converted " +"using :func:`annotations_to_string`. If :attr:`~Format.VALUE` fails, the " +"error from this call will be raised." +msgstr "" + +#: library/annotationlib.rst:366 +msgid "" +"Returns a dict. :func:`!get_annotations` returns a new dict every time it's " +"called; calling it twice on the same object will return two different but " +"equivalent dicts." +msgstr "" + +#: library/annotationlib.rst:370 +msgid "This function handles several details for you:" +msgstr "" + +#: library/annotationlib.rst:372 +msgid "" +"If *eval_str* is true, values of type :class:`!str` will be un-stringized " +"using :func:`eval`. This is intended for use with stringized annotations " +"(``from __future__ import annotations``). It is an error to set *eval_str* " +"to true with formats other than :attr:`Format.VALUE`." +msgstr "" + +#: library/annotationlib.rst:377 +msgid "" +"If *obj* doesn't have an annotations dict, returns an empty dict. (Functions " +"and methods always have an annotations dict; classes, modules, and other " +"types of callables may not.)" +msgstr "" + +#: library/annotationlib.rst:381 +msgid "" +"Ignores inherited annotations on classes, as well as annotations on " +"metaclasses. If a class doesn't have its own annotations dict, returns an " +"empty dict." +msgstr "" + +#: library/annotationlib.rst:384 +msgid "" +"All accesses to object members and dict values are done using ``getattr()`` " +"and ``dict.get()`` for safety." +msgstr "" + +#: library/annotationlib.rst:387 +msgid "" +"*eval_str* controls whether or not values of type :class:`!str` are replaced " +"with the result of calling :func:`eval` on those values:" +msgstr "" + +#: library/annotationlib.rst:390 +msgid "" +"If eval_str is true, :func:`eval` is called on values of type :class:`!str`. " +"(Note that :func:`!get_annotations` doesn't catch exceptions; " +"if :func:`eval` raises an exception, it will unwind the stack past " +"the :func:`!get_annotations` call.)" +msgstr "" + +#: library/annotationlib.rst:394 +msgid "" +"If *eval_str* is false (the default), values of type :class:`!str` are " +"unchanged." +msgstr "" + +#: library/annotationlib.rst:397 +msgid "" +"*globals* and *locals* are passed in to :func:`eval`; see the documentation " +"for :func:`eval` for more information. If *globals* or *locals* is :const:`!" +"None`, this function may replace that value with a context-specific default, " +"contingent on ``type(obj)``:" +msgstr "" + +#: library/annotationlib.rst:402 +msgid "If *obj* is a module, *globals* defaults to ``obj.__dict__``." +msgstr "" + +#: library/annotationlib.rst:403 +msgid "" +"If *obj* is a class, *globals* defaults to " +"``sys.modules[obj.__module__].__dict__`` and *locals* defaults to the *obj* " +"class namespace." +msgstr "" + +#: library/annotationlib.rst:406 +msgid "" +"If *obj* is a callable, *globals* defaults to :attr:`obj.__globals__ " +"`, although if *obj* is a wrapped function " +"(using :func:`functools.update_wrapper`) or a :class:`functools.partial` " +"object, it is unwrapped until a non-wrapped function is found." +msgstr "" + +#: library/annotationlib.rst:412 +msgid "" +"Calling :func:`!get_annotations` is best practice for accessing the " +"annotations dict of any object. See :ref:`annotations-howto` for more " +"information on annotations best practices." +msgstr "" + +#: library/annotationlib.rst:427 +msgid "" +"Convert an arbitrary Python value to a format suitable for use by " +"the :attr:`~Format.STRING` format. This calls :func:`repr` for most objects, " +"but has special handling for some objects, such as type objects." +msgstr "" + +#: library/annotationlib.rst:431 +msgid "" +"This is meant as a helper for user-provided annotate functions that support " +"the :attr:`~Format.STRING` format but do not have access to the code " +"creating the annotations. It can also be used to provide a user-friendly " +"string representation for other objects that contain values that are " +"commonly encountered in annotations." +msgstr "" + +#: library/annotationlib.rst:441 +msgid "Recipes" +msgstr "Cas pratiques" + +#: library/annotationlib.rst:446 +msgid "Using annotations in a metaclass" +msgstr "" + +#: library/annotationlib.rst:448 +msgid "" +"A :ref:`metaclass ` may want to inspect or even modify the " +"annotations in a class body during class creation. Doing so requires " +"retrieving annotations from the class namespace dictionary. For classes " +"created with ``from __future__ import annotations``, the annotations will be " +"in the ``__annotations__`` key of the dictionary. For other classes with " +"annotations, :func:`get_annotate_from_class_namespace` can be used to get " +"the annotate function, and :func:`call_annotate_function` can be used to " +"call it and retrieve the annotations. Using the :attr:`~Format.FORWARDREF` " +"format will usually be best, because this allows the annotations to refer to " +"names that cannot yet be resolved when the class is created." +msgstr "" + +#: library/annotationlib.rst:459 +msgid "" +"To modify the annotations, it is best to create a wrapper annotate function " +"that calls the original annotate function, makes any necessary adjustments, " +"and returns the result." +msgstr "" + +#: library/annotationlib.rst:463 +msgid "" +"Below is an example of a metaclass that filters out " +"all :class:`typing.ClassVar` annotations from the class and puts them in a " +"separate attribute:" +msgstr "" + +#: library/annotationlib.rst:514 +msgid "Creating a custom callable annotate function" +msgstr "" + +#: library/annotationlib.rst:516 +msgid "" +"Custom :term:`annotate functions ` may be literal " +"functions like those automatically generated for functions, classes, and " +"modules. Or, they may wish to utilise the encapsulation provided by classes, " +"in which case any :term:`callable` can be used as an :term:`annotate " +"function`." +msgstr "" + +#: library/annotationlib.rst:521 +msgid "" +"To provide the :attr:`~Format.VALUE`, :attr:`~Format.STRING`, " +"or :attr:`~Format.FORWARDREF` formats directly, an :term:`annotate function` " +"must provide the following attribute:" +msgstr "" + +#: library/annotationlib.rst:525 +msgid "" +"A callable ``__call__`` with signature ``__call__(format, /) -> dict``, that " +"does not raise a :exc:`NotImplementedError` when called with a supported " +"format." +msgstr "" + +#: library/annotationlib.rst:528 +msgid "" +"To provide the :attr:`~Format.VALUE_WITH_FAKE_GLOBALS` format, which is used " +"to automatically generate :attr:`~Format.STRING` " +"or :attr:`~Format.FORWARDREF` if they are not supported " +"directly, :term:`annotate functions ` must provide the " +"following attributes:" +msgstr "" + +#: library/annotationlib.rst:533 +msgid "" +"A callable ``__call__`` with signature ``__call__(format, /) -> dict``, that " +"does not raise a :exc:`NotImplementedError` when called " +"with :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`." +msgstr "" + +#: library/annotationlib.rst:536 +msgid "" +"A :ref:`code object ` ``__code__`` containing the compiled " +"code for the annotate function." +msgstr "" + +#: library/annotationlib.rst:538 +msgid "" +"Optional: A tuple of the function's positional defaults ``__kwdefaults__``, " +"if the function represented by ``__code__`` uses any positional defaults." +msgstr "" + +#: library/annotationlib.rst:540 +msgid "" +"Optional: A dict of the function's keyword defaults ``__defaults__``, if the " +"function represented by ``__code__`` uses any keyword defaults." +msgstr "" + +#: library/annotationlib.rst:542 +msgid "Optional: All other :ref:`function attributes `." +msgstr "" + +#: library/annotationlib.rst:568 +msgid "This can then be called with:" +msgstr "" + +#: library/annotationlib.rst:576 +msgid "Or used as the annotate function for an object:" +msgstr "" + +#: library/annotationlib.rst:589 +msgid "Limitations of the ``STRING`` format" +msgstr "" + +#: library/annotationlib.rst:591 +msgid "" +"The :attr:`~Format.STRING` format is meant to approximate the source code of " +"the annotation, but the implementation strategy used means that it is not " +"always possible to recover the exact source code." +msgstr "" + +#: library/annotationlib.rst:595 +msgid "" +"First, the stringifier of course cannot recover any information that is not " +"present in the compiled code, including comments, whitespace, " +"parenthesization, and operations that get simplified by the compiler." +msgstr "" + +#: library/annotationlib.rst:599 +msgid "" +"Second, the stringifier can intercept almost all operations that involve " +"names looked up in some scope, but it cannot intercept operations that " +"operate fully on constants. As a corollary, this also means it is not safe " +"to request the ``STRING`` format on untrusted code: Python is powerful " +"enough that it is possible to achieve arbitrary code execution even with no " +"access to any globals or builtins. For example:" +msgstr "" + +#: library/annotationlib.rst:614 +msgid "" +"This particular example works as of the time of writing, but it relies on " +"implementation details and is not guaranteed to work in the future." +msgstr "" + +#: library/annotationlib.rst:617 +msgid "" +"Among the different kinds of expressions that exist in Python, as " +"represented by the :mod:`ast` module, some expressions are supported, " +"meaning that the ``STRING`` format can generally recover the original source " +"code; others are unsupported, meaning that they may result in incorrect " +"output or an error." +msgstr "" + +#: library/annotationlib.rst:622 +msgid "The following are supported (sometimes with caveats):" +msgstr "" + +#: library/annotationlib.rst:624 +msgid ":class:`ast.BinOp`" +msgstr "" + +#: library/annotationlib.rst:625 +msgid ":class:`ast.UnaryOp`" +msgstr "" + +#: library/annotationlib.rst:627 +msgid "" +":class:`ast.Invert` (``~``), :class:`ast.UAdd` (``+``), " +"and :class:`ast.USub` (``-``) are supported" +msgstr "" + +#: library/annotationlib.rst:628 +msgid ":class:`ast.Not` (``not``) is not supported" +msgstr "" + +#: library/annotationlib.rst:630 +msgid ":class:`ast.Dict` (except when using ``**`` unpacking)" +msgstr "" + +#: library/annotationlib.rst:631 +msgid ":class:`ast.Set`" +msgstr "" + +#: library/annotationlib.rst:632 +msgid ":class:`ast.Compare`" +msgstr "" + +#: library/annotationlib.rst:634 +msgid ":class:`ast.Eq` and :class:`ast.NotEq` are supported" +msgstr "" + +#: library/annotationlib.rst:635 +msgid "" +":class:`ast.Lt`, :class:`ast.LtE`, :class:`ast.Gt`, and :class:`ast.GtE` are " +"supported, but the operand may be flipped" +msgstr "" + +#: library/annotationlib.rst:636 +msgid "" +":class:`ast.Is`, :class:`ast.IsNot`, :class:`ast.In`, and :class:`ast.NotIn` " +"are not supported" +msgstr "" + +#: library/annotationlib.rst:638 +msgid ":class:`ast.Call` (except when using ``**`` unpacking)" +msgstr "" + +#: library/annotationlib.rst:639 +msgid "" +":class:`ast.Constant` (though not the exact representation of the constant; " +"for example, escape sequences in strings are lost; hexadecimal numbers are " +"converted to decimal)" +msgstr "" + +#: library/annotationlib.rst:641 +msgid ":class:`ast.Attribute` (assuming the value is not a constant)" +msgstr "" + +#: library/annotationlib.rst:642 +msgid ":class:`ast.Subscript` (assuming the value is not a constant)" +msgstr "" + +#: library/annotationlib.rst:643 +msgid ":class:`ast.Starred` (``*`` unpacking)" +msgstr "" + +#: library/annotationlib.rst:644 +msgid ":class:`ast.Name`" +msgstr "" + +#: library/annotationlib.rst:645 +msgid ":class:`ast.List`" +msgstr "" + +#: library/annotationlib.rst:646 +msgid ":class:`ast.Tuple`" +msgstr "" + +#: library/annotationlib.rst:647 +msgid ":class:`ast.Slice`" +msgstr "" + +#: library/annotationlib.rst:649 +msgid "" +"The following are unsupported, but throw an informative error when " +"encountered by the stringifier:" +msgstr "" + +#: library/annotationlib.rst:652 +msgid "" +":class:`ast.FormattedValue` (f-strings; error is not detected if conversion " +"specifiers like ``!r`` are used)" +msgstr "" + +#: library/annotationlib.rst:654 +msgid ":class:`ast.JoinedStr` (f-strings)" +msgstr "" + +#: library/annotationlib.rst:656 +msgid "The following are unsupported and result in incorrect output:" +msgstr "" + +#: library/annotationlib.rst:658 +msgid ":class:`ast.BoolOp` (``and`` and ``or``)" +msgstr "" + +#: library/annotationlib.rst:659 +msgid ":class:`ast.IfExp`" +msgstr "" + +#: library/annotationlib.rst:660 +msgid ":class:`ast.Lambda`" +msgstr "" + +#: library/annotationlib.rst:661 +msgid ":class:`ast.ListComp`" +msgstr "" + +#: library/annotationlib.rst:662 +msgid ":class:`ast.SetComp`" +msgstr "" + +#: library/annotationlib.rst:663 +msgid ":class:`ast.DictComp`" +msgstr "" + +#: library/annotationlib.rst:664 +msgid ":class:`ast.GeneratorExp`" +msgstr "" + +#: library/annotationlib.rst:666 +msgid "" +"The following are disallowed in annotation scopes and therefore not relevant:" +msgstr "" + +#: library/annotationlib.rst:668 +msgid ":class:`ast.NamedExpr` (``:=``)" +msgstr "" + +#: library/annotationlib.rst:669 +msgid ":class:`ast.Await`" +msgstr "" + +#: library/annotationlib.rst:670 +msgid ":class:`ast.Yield`" +msgstr "" + +#: library/annotationlib.rst:671 +msgid ":class:`ast.YieldFrom`" +msgstr "" + +#: library/annotationlib.rst:675 +msgid "Limitations of the ``FORWARDREF`` format" +msgstr "" + +#: library/annotationlib.rst:677 +msgid "" +"The :attr:`~Format.FORWARDREF` format aims to produce real values as much as " +"possible, with anything that cannot be resolved replaced " +"with :class:`ForwardRef` objects. It is affected by broadly the same " +"Limitations as the :attr:`~Format.STRING` format: annotations that perform " +"operations on literals or that use unsupported expression types may raise " +"exceptions when evaluated using the :attr:`~Format.FORWARDREF` format." +msgstr "" + +#: library/annotationlib.rst:684 +msgid "Below are a few examples of the behavior with unsupported expressions:" +msgstr "" + +#: library/annotationlib.rst:705 +msgid "Security implications of introspecting annotations" +msgstr "" + +#: library/annotationlib.rst:707 +msgid "" +"Much of the functionality in this module involves executing code related to " +"annotations, which can then do arbitrary things. For " +"example, :func:`get_annotations` may call an arbitrary :term:`annotate " +"function`, and :meth:`ForwardRef.evaluate` may call :func:`eval` on an " +"arbitrary string. Code contained in an annotation might make arbitrary " +"system calls, enter an infinite loop, or perform any other operation. This " +"is also true for any access of the :attr:`~object.__annotations__` " +"attribute, and for various functions in the :mod:`typing` module that work " +"with annotations, such as :func:`typing.get_type_hints`." +msgstr "" + +#: library/annotationlib.rst:716 +msgid "" +"Any security issue arising from this also applies immediately after " +"importing code that may contain untrusted annotations: importing code can " +"always cause arbitrary operations to be performed. However, it is unsafe to " +"accept strings or other input from an untrusted source and pass them to any " +"of the APIs for introspecting annotations, for example by editing an " +"``__annotations__`` dictionary or directly creating a :class:`ForwardRef` " +"object." +msgstr "" diff --git a/library/archiving.po b/library/archiving.po index 893e6f3dc..c4f8f26f7 100644 --- a/library/archiving.po +++ b/library/archiving.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2018-07-27 23:01+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -19,11 +19,12 @@ msgid "Data Compression and Archiving" msgstr "Compression de donnée et archivage" #: library/archiving.rst:7 +#, fuzzy msgid "" "The modules described in this chapter support data compression with the " -"zlib, gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-" -"format archives. See also :ref:`archiving-operations` provided by the :mod:" -"`shutil` module." +"zlib, gzip, bzip2, lzma, and zstd algorithms, and the creation of ZIP- and " +"tar-format archives. See also :ref:`archiving-operations` provided by " +"the :mod:`shutil` module." msgstr "" "Les modules documentés dans ce chapitre implémentent les algorithmes de " "compression *zlib*, *gzip*, *bzip2* et *lzma*, ainsi que la création " diff --git a/library/argparse.po b/library/argparse.po index e12358b59..11b5da2cd 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-05-14 23:55+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -24,42 +24,55 @@ msgstr "" ":mod:`argparse` -- Analyseur d'arguments, d'options, et de sous-commandes de " "ligne de commande" -#: library/argparse.rst:12 +#: library/argparse.rst:9 msgid "**Source code:** :source:`Lib/argparse.py`" msgstr "**Code source:** :source:`Lib/argparse.py`" -#: library/argparse.rst:-1 +#: library/argparse.rst:13 +msgid "" +"While :mod:`!argparse` is the default recommended standard library module " +"for implementing basic command line applications, authors with more exacting " +"requirements for exactly how their command line applications behave may find " +"it doesn't provide the necessary level of control. Refer to :ref:`choosing-" +"an-argument-parser` for alternatives to consider when ``argparse`` doesn't " +"support behaviors that the application requires (such as entirely disabling " +"support for interspersed options and positional arguments, or accepting " +"option parameter values that start with ``-`` even when they correspond to " +"another defined option)." +msgstr "" + +#: library/argparse.rst:25 msgid "Tutorial" msgstr "Tutoriel" -#: library/argparse.rst:18 +#: library/argparse.rst:27 msgid "" "This page contains the API reference information. For a more gentle " -"introduction to Python command-line parsing, have a look at the :ref:" -"`argparse tutorial `." +"introduction to Python command-line parsing, have a look at " +"the :ref:`argparse tutorial `." msgstr "" "Cette page est la référence de l'API. Pour une introduction plus en douceur " "à l'analyse des arguments de la ligne de commande, regardez :ref:`le " "tutoriel argparse `." -#: library/argparse.rst:22 +#: library/argparse.rst:31 #, fuzzy msgid "" "The :mod:`!argparse` module makes it easy to write user-friendly command-" "line interfaces. The program defines what arguments it requires, and :mod:`!" -"argparse` will figure out how to parse those out of :data:`sys.argv`. The :" -"mod:`!argparse` module also automatically generates help and usage " +"argparse` will figure out how to parse those out of :data:`sys.argv`. " +"The :mod:`!argparse` module also automatically generates help and usage " "messages. The module will also issue errors when users give the program " "invalid arguments." msgstr "" "Le module :mod:`argparse` facilite l'écriture d'interfaces en ligne de " -"commande agréables à l'emploi. Le programme définit les arguments requis et :" -"mod:`argparse` s'arrange pour analyser ceux provenant de :data:`sys.argv`. " -"Le module :mod:`argparse` génère aussi automatiquement les messages d'aide, " -"le mode d'emploi, et lève des erreurs lorsque les utilisateurs fournissent " -"des arguments invalides." +"commande agréables à l'emploi. Le programme définit les arguments requis " +"et :mod:`argparse` s'arrange pour analyser ceux provenant " +"de :data:`sys.argv`. Le module :mod:`argparse` génère aussi automatiquement " +"les messages d'aide, le mode d'emploi, et lève des erreurs lorsque les " +"utilisateurs fournissent des arguments invalides." -#: library/argparse.rst:28 +#: library/argparse.rst:37 #, fuzzy msgid "" "The :mod:`!argparse` module's support for command-line interfaces is built " @@ -72,7 +85,7 @@ msgstr "" "spécifier les arguments possibles et il possède des options qui s'appliquent " "à l'ensemble de l'analyseur ::" -#: library/argparse.rst:37 +#: library/argparse.rst:46 msgid "" "The :meth:`ArgumentParser.add_argument` method attaches individual argument " "specifications to the parser. It supports positional arguments, options " @@ -84,7 +97,7 @@ msgstr "" "booléennes). Les arguments ont la possibilité d'être complétés par des " "valeurs ::" -#: library/argparse.rst:46 +#: library/argparse.rst:55 msgid "" "The :meth:`ArgumentParser.parse_args` method runs the parser and places the " "extracted data in a :class:`argparse.Namespace` object::" @@ -92,18 +105,18 @@ msgstr "" "La méthode :meth:`ArgumentParser.parse_args` lance l'analyseur et stocke les " "résultats dans un objet :class:`argparse.Namespace` ::" -#: library/argparse.rst:53 +#: library/argparse.rst:62 msgid "" -"If you're looking for a guide about how to upgrade :mod:`optparse` code to :" -"mod:`!argparse`, see :ref:`Upgrading Optparse Code `." msgstr "" -#: library/argparse.rst:57 +#: library/argparse.rst:66 msgid "ArgumentParser objects" msgstr "Objets ``ArgumentParser``" -#: library/argparse.rst:66 +#: library/argparse.rst:76 msgid "" "Create a new :class:`ArgumentParser` object. All parameters should be passed " "as keyword arguments. Each parameter has its own more detailed description " @@ -113,13 +126,15 @@ msgstr "" "être passés en arguments nommés. Chaque paramètre a sa propre description " "détaillée ci-dessous, mais en résumé ils sont :" -#: library/argparse.rst:70 +#: library/argparse.rst:80 +#, fuzzy msgid "" -"prog_ - The name of the program (default: ``os.path.basename(sys.argv[0])``)" +"prog_ - The name of the program (default: generated from the ``__main__`` " +"module attributes and ``sys.argv[0]``)" msgstr "" "prog_ – Nom du programme (par défaut : ``os.path.basename(sys.argv[0])``) ;" -#: library/argparse.rst:73 +#: library/argparse.rst:83 msgid "" "usage_ - The string describing the program usage (default: generated from " "arguments added to parser)" @@ -127,19 +142,19 @@ msgstr "" "usage_ – Chaîne décrivant l'utilisation du programme (par défaut : générée à " "partir des arguments ajoutés à l'analyseur) ;" -#: library/argparse.rst:76 +#: library/argparse.rst:86 msgid "" "description_ - Text to display before the argument help (by default, no text)" msgstr "" "description_ – Texte à afficher au dessus de l'aide pour les arguments (vide " "par défaut) ;" -#: library/argparse.rst:79 +#: library/argparse.rst:89 msgid "epilog_ - Text to display after the argument help (by default, no text)" msgstr "" "epilog_ – Texte à afficher après l'aide des arguments (vide par défaut) ;" -#: library/argparse.rst:81 +#: library/argparse.rst:91 msgid "" "parents_ - A list of :class:`ArgumentParser` objects whose arguments should " "also be included" @@ -147,12 +162,12 @@ msgstr "" "parents_ – Liste d'objets :class:`ArgumentParser` contenant des arguments " "qui devraient aussi être inclus ;" -#: library/argparse.rst:84 +#: library/argparse.rst:94 msgid "formatter_class_ - A class for customizing the help output" msgstr "" "formatter_class_ – Classe pour personnaliser la sortie du message d'aide ;" -#: library/argparse.rst:86 +#: library/argparse.rst:96 msgid "" "prefix_chars_ - The set of characters that prefix optional arguments " "(default: '-')" @@ -160,7 +175,7 @@ msgstr "" "prefix_chars_ – Jeu de caractères qui précède les arguments optionnels (par " "défaut : ``'-'``) ;" -#: library/argparse.rst:89 +#: library/argparse.rst:99 msgid "" "fromfile_prefix_chars_ - The set of characters that prefix files from which " "additional arguments should be read (default: ``None``)" @@ -168,7 +183,7 @@ msgstr "" "fromfile_prefix_chars_ – Jeu de caractères qui précède les fichiers d'où des " "arguments additionnels doivent être lus (par défaut : ``None``) ;" -#: library/argparse.rst:92 +#: library/argparse.rst:102 msgid "" "argument_default_ - The global default value for arguments (default: " "``None``)" @@ -176,7 +191,7 @@ msgstr "" "argument_default_ – Valeur globale par défaut pour les arguments (par " "défaut : ``None``) ;" -#: library/argparse.rst:95 +#: library/argparse.rst:105 msgid "" "conflict_handler_ - The strategy for resolving conflicting optionals " "(usually unnecessary)" @@ -184,22 +199,23 @@ msgstr "" "conflict_handler_ – Stratégie pour résoudre les conflits entre les arguments " "optionnels (non-nécessaire en général) ;" -#: library/argparse.rst:98 +#: library/argparse.rst:108 msgid "" "add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)" msgstr "" "add_help_ – Ajoute une option d'aide ``-h/--help`` à l'analyseur (par " "défaut : ``True``) ;" -#: library/argparse.rst:100 +#: library/argparse.rst:110 +#, fuzzy msgid "" "allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " -"unambiguous. (default: ``True``)" +"unambiguous (default: ``True``)" msgstr "" "allow_abbrev_ – Permet l'acceptation d'abréviations non-ambigües pour les " "options longues (par défaut : ``True``) ;" -#: library/argparse.rst:103 +#: library/argparse.rst:113 #, fuzzy msgid "" "exit_on_error_ - Determines whether or not :class:`!ArgumentParser` exits " @@ -209,11 +225,21 @@ msgstr "" "avec un message d'erreur quand une erreur est rencontrée (par défaut : " "``True``)." -#: library/argparse.rst:106 +#: library/argparse.rst:116 +msgid "" +"suggest_on_error_ - Enables suggestions for mistyped argument choices and " +"subparser names (default: ``True``)" +msgstr "" + +#: library/argparse.rst:119 +msgid "color_ - Allow color output (default: ``True``)" +msgstr "" + +#: library/argparse.rst:121 msgid "*allow_abbrev* parameter was added." msgstr "Le paramètre *allow_abbrev* est ajouté." -#: library/argparse.rst:109 +#: library/argparse.rst:124 msgid "" "In previous versions, *allow_abbrev* also disabled grouping of short flags " "such as ``-vv`` to mean ``-v -v``." @@ -222,21 +248,30 @@ msgstr "" "regroupement de plusieurs options courtes telles que ``-vv`` pour signifier " "``-v -v``." -#: library/argparse.rst:113 +#: library/argparse.rst:128 msgid "*exit_on_error* parameter was added." msgstr "Le paramètre *exit_on_error* est ajouté." -#: library/argparse.rst:598 +#: library/argparse.rst:131 +#, fuzzy +msgid "*suggest_on_error* and *color* parameters were added." +msgstr "Le paramètre *exit_on_error* est ajouté." + +#: library/argparse.rst:134 +msgid "*suggest_on_error* default changed to ``True``." +msgstr "" + +#: library/argparse.rst:700 msgid "The following sections describe how each of these are used." msgstr "" "Les sections suivantes décrivent comment chacune de ces options sont " "utilisées." -#: library/argparse.rst:122 +#: library/argparse.rst:143 msgid "prog" msgstr "Le paramètre *prog*" -#: library/argparse.rst:125 +#: library/argparse.rst:146 #, fuzzy msgid "" "By default, :class:`ArgumentParser` calculates the name of the program to " @@ -245,25 +280,25 @@ msgstr "" "Par défaut, l'objet :class:`ArgumentParser` construit le message relatif à " "l'utilisation à partir des arguments qu'il contient ::" -#: library/argparse.rst:128 +#: library/argparse.rst:149 msgid "" "The :func:`base name ` of ``sys.argv[0]`` if a file was " "passed as argument." msgstr "" -#: library/argparse.rst:130 +#: library/argparse.rst:151 msgid "" "The Python interpreter name followed by ``sys.argv[0]`` if a directory or a " "zipfile was passed as argument." msgstr "" -#: library/argparse.rst:132 +#: library/argparse.rst:153 msgid "" "The Python interpreter name followed by ``-m`` followed by the module or " "package name if the :option:`-m` option was used." msgstr "" -#: library/argparse.rst:135 +#: library/argparse.rst:156 msgid "" "This default is almost always desirable because it will make the help " "messages match the string that was used to invoke the program on the command " @@ -271,21 +306,28 @@ msgid "" "supplied using the ``prog=`` argument to :class:`ArgumentParser`::" msgstr "" -#: library/argparse.rst:147 +#: library/argparse.rst:168 +#, fuzzy +msgid "" +"Note that the program name, whether determined from ``sys.argv[0]``, from " +"the ``__main__`` module attributes or from the ``prog=`` argument, is " +"available to help messages using the ``%(prog)s`` format specifier." +msgstr "" +"Prenez note que le nom du programme, peu importe s'il provient de " +"``sys.argv[0]`` ou de l'argument ``prog=``, est accessible aux messages " +"d'aide grâce au spécificateur de formatage ``%(prog)s``." + +#: library/argparse.rst:184 msgid "" -"Note that the program name, whether determined from ``sys.argv[0]`` or from " -"the ``prog=`` argument, is available to help messages using the ``%(prog)s`` " -"format specifier." +"The default ``prog`` value now reflects how ``__main__`` was actually " +"executed, rather than always being ``os.path.basename(sys.argv[0])``." msgstr "" -"Prenez note que le nom du programme, peu importe s'il provient de ``sys." -"argv[0]`` ou de l'argument ``prog=``, est accessible aux messages d'aide " -"grâce au spécificateur de formatage ``%(prog)s``." -#: library/argparse.rst:164 +#: library/argparse.rst:189 msgid "usage" msgstr "Le paramètre *usage*" -#: library/argparse.rst:166 +#: library/argparse.rst:191 #, fuzzy msgid "" "By default, :class:`ArgumentParser` calculates the usage message from the " @@ -295,7 +337,7 @@ msgstr "" "Par défaut, l'objet :class:`ArgumentParser` construit le message relatif à " "l'utilisation à partir des arguments qu'il contient ::" -#: library/argparse.rst:183 +#: library/argparse.rst:208 msgid "" "The ``%(prog)s`` format specifier is available to fill in the program name " "in your usage messages." @@ -303,11 +345,20 @@ msgstr "" "Le spécificateur de formatage ``%(prog)s`` est disponible pour insérer le " "nom du programme dans vos messages d'utilisation." -#: library/argparse.rst:190 +#: library/argparse.rst:211 +msgid "" +"When a custom usage message is specified for the main parser, you may also " +"want to consider passing the ``prog`` argument " +"to :meth:`~ArgumentParser.add_subparsers` or the ``prog`` and the ``usage`` " +"arguments to :meth:`~_SubParsersAction.add_parser`, to ensure consistent " +"command prefixes and usage information across subparsers." +msgstr "" + +#: library/argparse.rst:221 msgid "description" msgstr "Le paramètre *description*" -#: library/argparse.rst:192 +#: library/argparse.rst:223 #, fuzzy msgid "" "Most calls to the :class:`ArgumentParser` constructor will use the " @@ -322,7 +373,7 @@ msgstr "" "d'aide, cette description est affichée entre le prototype de ligne de " "commande et les messages d'aide des arguments ::" -#: library/argparse.rst:198 +#: library/argparse.rst:229 msgid "" "By default, the description will be line-wrapped so that it fits within the " "given space. To change this behavior, see the formatter_class_ argument." @@ -331,11 +382,11 @@ msgstr "" "se conformer à l'espace disponible. Pour changer ce comportement, voyez " "l'argument formatter_class_." -#: library/argparse.rst:203 +#: library/argparse.rst:234 msgid "epilog" msgstr "Le paramètre *epilog*" -#: library/argparse.rst:205 +#: library/argparse.rst:236 msgid "" "Some programs like to display additional description of the program after " "the description of the arguments. Such text can be specified using the " @@ -345,7 +396,7 @@ msgstr "" "description des arguments. Un tel texte peut être spécifié grâce à " "l'argument ``epilog=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:222 +#: library/argparse.rst:253 msgid "" "As with the description_ argument, the ``epilog=`` text is by default line-" "wrapped, but this behavior can be adjusted with the formatter_class_ " @@ -353,22 +404,22 @@ msgid "" msgstr "" "De même que pour l'argument description_, le texte passé à ``epilog=`` est " "sujet au retour à la ligne automatique. Ce comportement peut être ajusté " -"grâce à l'argument formatter_class_ du constructeur d':class:" -"`ArgumentParser`." +"grâce à l'argument formatter_class_ du constructeur " +"d':class:`ArgumentParser`." -#: library/argparse.rst:228 +#: library/argparse.rst:259 msgid "parents" msgstr "Le paramètre *parents*" -#: library/argparse.rst:230 +#: library/argparse.rst:261 msgid "" "Sometimes, several parsers share a common set of arguments. Rather than " "repeating the definitions of these arguments, a single parser with all the " -"shared arguments and passed to ``parents=`` argument to :class:" -"`ArgumentParser` can be used. The ``parents=`` argument takes a list of :" -"class:`ArgumentParser` objects, collects all the positional and optional " -"actions from them, and adds these actions to the :class:`ArgumentParser` " -"object being constructed::" +"shared arguments and passed to ``parents=`` argument " +"to :class:`ArgumentParser` can be used. The ``parents=`` argument takes a " +"list of :class:`ArgumentParser` objects, collects all the positional and " +"optional actions from them, and adds these actions to " +"the :class:`ArgumentParser` object being constructed::" msgstr "" "Parfois, plusieurs analyseurs partagent un jeu commun d'arguments. Plutôt " "que de répéter les définitions de ces arguments, un analyseur commun qui " @@ -379,7 +430,7 @@ msgstr "" "puis les ajoute à l'instance d':class:`ArgumentParser` en cours de " "création ::" -#: library/argparse.rst:250 +#: library/argparse.rst:281 msgid "" "Note that most parent parsers will specify ``add_help=False``. Otherwise, " "the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the " @@ -390,7 +441,7 @@ msgstr "" "voir plus d'une option ``-h/--help`` (une pour le parent et une pour " "l'instance en cours de création) et va lever une erreur." -#: library/argparse.rst:255 +#: library/argparse.rst:286 msgid "" "You must fully initialize the parsers before passing them via ``parents=``. " "If you change the parent parsers after the child parser, those changes will " @@ -400,11 +451,11 @@ msgstr "" "``parents=``. Si vous changez les analyseurs parents après la création de " "l'analyseur enfant, ces changements ne sont pas répercutés sur l'enfant." -#: library/argparse.rst:263 +#: library/argparse.rst:294 msgid "formatter_class" msgstr "Le paramètre *formatter_class*" -#: library/argparse.rst:265 +#: library/argparse.rst:296 msgid "" ":class:`ArgumentParser` objects allow the help formatting to be customized " "by specifying an alternate formatting class. Currently, there are four such " @@ -414,20 +465,20 @@ msgstr "" "en page des messages d'aide en spécifiant une classe de formatage " "alternative. Il y a actuellement quatre classes de formatage :" -#: library/argparse.rst:274 +#: library/argparse.rst:305 msgid "" ":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " -"more control over how textual descriptions are displayed. By default, :class:" -"`ArgumentParser` objects line-wrap the description_ and epilog_ texts in " -"command-line help messages::" +"more control over how textual descriptions are displayed. By " +"default, :class:`ArgumentParser` objects line-wrap the description_ and " +"epilog_ texts in command-line help messages::" msgstr "" ":class:`RawDescriptionHelpFormatter` et :class:`RawTextHelpFormatter` vous " "donnent plus de contrôle sur comment les descriptions textuelles sont " -"affichées. Par défaut, les contenus de description_ et epilog_ des objets :" -"class:`ArgumentParser` font l'objet du retour à la ligne automatique dans " -"les messages d'aide ::" +"affichées. Par défaut, les contenus de description_ et epilog_ des " +"objets :class:`ArgumentParser` font l'objet du retour à la ligne automatique " +"dans les messages d'aide ::" -#: library/argparse.rst:299 +#: library/argparse.rst:330 msgid "" "Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " "indicates that description_ and epilog_ are already correctly formatted and " @@ -438,7 +489,7 @@ msgstr "" "correctement et qu'ils ne doivent pas faire l'objet d'un retour à la ligne " "automatique ::" -#: library/argparse.rst:325 +#: library/argparse.rst:356 #, fuzzy msgid "" ":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " @@ -452,7 +503,7 @@ msgstr "" "seul. Si vous voulez garder plusieurs sauts de ligne, ajoutez des espaces " "entre les caractères de changement de ligne." -#: library/argparse.rst:330 +#: library/argparse.rst:361 msgid "" ":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " "default values to each of the argument help messages::" @@ -460,7 +511,7 @@ msgstr "" ":class:`ArgumentDefaultsHelpFormatter` ajoute automatiquement l'information " "sur les valeurs par défaut aux messages d'aide de tous les arguments ::" -#: library/argparse.rst:348 +#: library/argparse.rst:379 msgid "" ":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for " "each argument as the display name for its values (rather than using the " @@ -470,11 +521,11 @@ msgstr "" "chacun des arguments comme nom d'affichage pour leurs valeurs (contrairement " "au formateur standard qui utilise dest_) ::" -#: library/argparse.rst:369 +#: library/argparse.rst:400 msgid "prefix_chars" msgstr "Le paramètre *prefix_chars*" -#: library/argparse.rst:371 +#: library/argparse.rst:402 #, fuzzy msgid "" "Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. " @@ -488,7 +539,7 @@ msgstr "" "les options ``+f`` ou ``/foo``), vous devez les préciser en utilisant " "l'argument ``prefix_chars=`` du constructeur d'``ArgumentParser`` ::" -#: library/argparse.rst:383 +#: library/argparse.rst:414 msgid "" "The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of " "characters that does not include ``-`` will cause ``-f/--foo`` options to be " @@ -498,11 +549,11 @@ msgstr "" "caractères qui n'inclut pas ``-`` provoquera le refus des options comme ``-" "f/--foo``." -#: library/argparse.rst:389 +#: library/argparse.rst:420 msgid "fromfile_prefix_chars" msgstr "Le paramètre *fromfile_prefix_chars*" -#: library/argparse.rst:391 +#: library/argparse.rst:422 msgid "" "Sometimes, when dealing with a particularly long argument list, it may make " "sense to keep the list of arguments in a file rather than typing it out at " @@ -514,34 +565,43 @@ msgstr "" "Parfois, par exemple quand on traite une liste d'arguments particulièrement " "longue, il est logique de stocker la liste d'arguments dans un fichier " "plutôt que de la saisir sur la ligne de commande. Si un jeu de caractères " -"est passé à l'argument ``fromfile_prefix_chars=`` du constructeur de :class:" -"`ArgumentParser`, alors les arguments qui commencent par l'un des caractères " -"spécifiés sont traités comme des fichiers et sont remplacés par les " -"arguments contenus dans ces fichiers. Par exemple ::" +"est passé à l'argument ``fromfile_prefix_chars=`` du constructeur " +"de :class:`ArgumentParser`, alors les arguments qui commencent par l'un des " +"caractères spécifiés sont traités comme des fichiers et sont remplacés par " +"les arguments contenus dans ces fichiers. Par exemple ::" -#: library/argparse.rst:406 +#: library/argparse.rst:437 +#, fuzzy msgid "" -"Arguments read from a file must by default be one per line (but see also :" -"meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they " -"were in the same place as the original file referencing argument on the " +"Arguments read from a file must be one per line by default (but see " +"also :meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if " +"they were in the same place as the original file referencing argument on the " "command line. So in the example above, the expression ``['-f', 'foo', " "'@args.txt']`` is considered equivalent to the expression ``['-f', 'foo', '-" "f', 'bar']``." msgstr "" "Par défaut, les arguments lus à partir d'un fichier doivent être chacun sur " -"une nouvelle ligne (voir aussi :meth:`~ArgumentParser." -"convert_arg_line_to_args`) et ils sont traités comme s'ils étaient au même " -"emplacement que le fichier original référençant les arguments de la ligne de " -"commande. Ainsi dans l'exemple ci-dessus, l'expression ``['-f', 'foo', " -"'@args.txt']`` est équivalente à l'expression ``['-f', 'foo', '-f', 'bar']``." +"une nouvelle ligne (voir " +"aussi :meth:`~ArgumentParser.convert_arg_line_to_args`) et ils sont traités " +"comme s'ils étaient au même emplacement que le fichier original référençant " +"les arguments de la ligne de commande. Ainsi dans l'exemple ci-dessus, " +"l'expression ``['-f', 'foo', '@args.txt']`` est équivalente à l'expression " +"``['-f', 'foo', '-f', 'bar']``." + +#: library/argparse.rst:445 +msgid "" +"Empty lines are treated as empty strings (``''``), which are allowed as " +"values but not as arguments. Empty lines that are read as arguments will " +"result in an \"unrecognized arguments\" error." +msgstr "" -#: library/argparse.rst:412 +#: library/argparse.rst:449 msgid "" ":class:`ArgumentParser` uses :term:`filesystem encoding and error handler` " "to read the file containing arguments." msgstr "" -#: library/argparse.rst:415 +#: library/argparse.rst:452 msgid "" "The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " "arguments will never be treated as file references." @@ -550,29 +610,30 @@ msgstr "" "signifie que les arguments ne sont pas traités en tant que références à des " "fichiers." -#: library/argparse.rst:418 +#: library/argparse.rst:455 msgid "" ":class:`ArgumentParser` changed encoding and errors to read arguments files " -"from default (e.g. :func:`locale.getpreferredencoding(False) ` and ``\"strict\"``) to the :term:`filesystem encoding " -"and error handler`. Arguments file should be encoded in UTF-8 instead of " -"ANSI Codepage on Windows." +"from default (e.g. :func:`locale.getpreferredencoding(False) " +"` and ``\"strict\"``) to the :term:`filesystem " +"encoding and error handler`. Arguments file should be encoded in UTF-8 " +"instead of ANSI Codepage on Windows." msgstr "" -#: library/argparse.rst:426 +#: library/argparse.rst:463 msgid "argument_default" msgstr "Le paramètre *argument_default*" -#: library/argparse.rst:428 +#: library/argparse.rst:465 msgid "" -"Generally, argument defaults are specified either by passing a default to :" -"meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser." -"set_defaults` methods with a specific set of name-value pairs. Sometimes " -"however, it may be useful to specify a single parser-wide default for " -"arguments. This can be accomplished by passing the ``argument_default=`` " -"keyword argument to :class:`ArgumentParser`. For example, to globally " -"suppress attribute creation on :meth:`~ArgumentParser.parse_args` calls, we " -"supply ``argument_default=SUPPRESS``::" +"Generally, argument defaults are specified either by passing a default " +"to :meth:`~ArgumentParser.add_argument` or by calling " +"the :meth:`~ArgumentParser.set_defaults` methods with a specific set of name-" +"value pairs. Sometimes however, it may be useful to specify a single parser-" +"wide default for arguments. This can be accomplished by passing the " +"``argument_default=`` keyword argument to :class:`ArgumentParser`. For " +"example, to globally suppress attribute creation " +"on :meth:`~ArgumentParser.parse_args` calls, we supply " +"``argument_default=SUPPRESS``::" msgstr "" "Généralement, les valeurs par défaut des arguments sont définies soit en " "passant la valeur désirée à :meth:`~ArgumentParser.add_argument` soit par un " @@ -585,31 +646,32 @@ msgstr "" "de :meth:`~ArgumentParser.parse_args`, on fournit " "``argument_default=SUPPRESS`` ::" -#: library/argparse.rst:448 +#: library/argparse.rst:485 msgid "allow_abbrev" msgstr "Le paramètre *allow_abbrev*" -#: library/argparse.rst:450 +#: library/argparse.rst:487 msgid "" -"Normally, when you pass an argument list to the :meth:`~ArgumentParser." -"parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " -"abbreviations ` of long options." +"Normally, when you pass an argument list to " +"the :meth:`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, " +"it :ref:`recognizes abbreviations ` of long options." msgstr "" -"En temps normal, lorsque vous passez une liste d'arguments à la méthode :" -"meth:`~ArgumentParser.parse_args` d':class:`ArgumentParser` :ref:`elle " -"accepte les abréviations ` des options longues." +"En temps normal, lorsque vous passez une liste d'arguments à la " +"méthode :meth:`~ArgumentParser.parse_args` " +"d':class:`ArgumentParser` :ref:`elle accepte les abréviations ` des options longues." -#: library/argparse.rst:454 +#: library/argparse.rst:491 msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" msgstr "" "Cette fonctionnalité peut être désactivée en passant ``False`` à " "``allow_abbrev`` ::" -#: library/argparse.rst:467 +#: library/argparse.rst:504 msgid "conflict_handler" msgstr "Le paramètre *conflict_handler*" -#: library/argparse.rst:469 +#: library/argparse.rst:506 msgid "" ":class:`ArgumentParser` objects do not allow two actions with the same " "option string. By default, :class:`ArgumentParser` objects raise an " @@ -621,7 +683,7 @@ msgstr "" "lèvent une exception si on essaie de créer un argument avec une chaîne " "d'option qui est déjà utilisée ::" -#: library/argparse.rst:481 +#: library/argparse.rst:518 msgid "" "Sometimes (e.g. when using parents_) it may be useful to simply override any " "older arguments with the same option string. To get this behavior, the " @@ -633,7 +695,7 @@ msgstr "" "d'option. Pour obtenir ce comportement, vous devez passer ``'resolve'`` à " "l'argument ``conflict_handler=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:497 +#: library/argparse.rst:534 msgid "" "Note that :class:`ArgumentParser` objects only remove an action if all of " "its option strings are overridden. So, in the example above, the old ``-f/--" @@ -645,11 +707,11 @@ msgstr "" "dessus, l'action ``-f/--foo`` du parent est conservée comme l'action ``-f`` " "puisque ``--foo`` est la seule chaîne d'options qui a été surchargée." -#: library/argparse.rst:504 +#: library/argparse.rst:541 msgid "add_help" msgstr "Le paramètre *add_help*" -#: library/argparse.rst:506 +#: library/argparse.rst:543 #, fuzzy msgid "" "By default, :class:`ArgumentParser` objects add an option which simply " @@ -660,17 +722,17 @@ msgstr "" "l'affichage du message d'aide de l'analyseur. Par exemple, prenons le " "fichier ``myprogram.py`` qui contient le code suivant ::" -#: library/argparse.rst:510 +#: library/argparse.rst:547 msgid "" "Occasionally, it may be useful to disable the addition of this help option. " -"This can be achieved by passing ``False`` as the ``add_help=`` argument to :" -"class:`ArgumentParser`::" +"This can be achieved by passing ``False`` as the ``add_help=`` argument " +"to :class:`ArgumentParser`::" msgstr "" "Il est parfois utile de désactiver l'ajout de cette option d'aide. Pour ce " "faire, vous devez passer ``False`` à l'argument ``add_help=`` du " "constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:522 +#: library/argparse.rst:559 msgid "" "The help option is typically ``-h/--help``. The exception to this is if the " "``prefix_chars=`` is specified and does not include ``-``, in which case ``-" @@ -683,22 +745,23 @@ msgstr "" "ce cas, le premier caractère de ``prefix_chars`` est utilisé comme préfixe " "des options d'aide ::" -#: library/argparse.rst:537 +#: library/argparse.rst:574 msgid "exit_on_error" msgstr "Le paramètre *exit_on_error*" -#: library/argparse.rst:539 +#: library/argparse.rst:576 #, fuzzy msgid "" -"Normally, when you pass an invalid argument list to the :meth:" -"`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " -"print a *message* to :data:`sys.stderr` and exit with a status code of 2." +"Normally, when you pass an invalid argument list to " +"the :meth:`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, " +"it will print a *message* to :data:`sys.stderr` and exit with a status code " +"of 2." msgstr "" "En général, quand vous passez une liste d'arguments dont au moins un est " -"invalide à la méthode :meth:`~ArgumentParser.parse_args` d'une instance d':" -"class:`ArgumentParser`, l'exécution se termine avec un message d'erreur." +"invalide à la méthode :meth:`~ArgumentParser.parse_args` d'une instance " +"d':class:`ArgumentParser`, l'exécution se termine avec un message d'erreur." -#: library/argparse.rst:543 +#: library/argparse.rst:580 msgid "" "If the user would like to catch errors manually, the feature can be enabled " "by setting ``exit_on_error`` to ``False``::" @@ -706,11 +769,73 @@ msgstr "" "Si vous souhaitez intercepter les erreurs manuellement, la fonctionnalité " "peut être activée en assignant ``False`` à ``exit_on_error`` ::" -#: library/argparse.rst:560 +#: library/argparse.rst:596 +#, fuzzy +msgid "suggest_on_error" +msgstr "Le paramètre *exit_on_error*" + +#: library/argparse.rst:598 +msgid "" +"By default, when a user passes an invalid argument choice or subparser " +"name, :class:`ArgumentParser` will exit with error info and provide " +"suggestions for mistyped arguments. The error message will list the " +"permissible argument choices (if specified) or subparser names, along with a " +"\"maybe you meant\" suggestion if a close match is found. Note that this " +"only applies for arguments when the choices specified are strings::" +msgstr "" + +#: library/argparse.rst:611 +#, fuzzy +msgid "" +"You can disable suggestions by setting ``suggest_on_error`` to ``False``." +msgstr "" +"Cette fonctionnalité peut être désactivée en passant ``False`` à " +"``allow_abbrev`` ::" + +#: library/argparse.rst:614 +msgid "" +"Changed default value of ``suggest_on_error`` from ``False`` to ``True``." +msgstr "" + +#: library/argparse.rst:618 +msgid "color" +msgstr "*color*" + +#: library/argparse.rst:620 +msgid "" +"By default, the help message is printed in color using `ANSI escape " +"sequences `__. If you want " +"plain text help messages, you can disable this :ref:`in your local " +"environment `, or in the argument parser itself " +"by setting ``color`` to ``False``::" +msgstr "" + +#: library/argparse.rst:633 +msgid "" +"Note that when ``color=True``, colored output depends on both environment " +"variables and terminal capabilities. However, if ``color=False``, colored " +"output is always disabled, even if environment variables like " +"``FORCE_COLOR`` are set." +msgstr "" + +#: library/argparse.rst:640 +msgid "" +"To highlight inline code in your description, epilog, or argument ``help`` " +"text, you can use single or double backticks::" +msgstr "" + +#: library/argparse.rst:652 +msgid "" +"When colors are enabled, the text inside backticks will be displayed in a " +"distinct color to help examples stand out. When colors are disabled, " +"backticks are preserved as-is, which is readable in plain text." +msgstr "" + +#: library/argparse.rst:660 msgid "The add_argument() method" msgstr "La méthode *add_argument()*" -#: library/argparse.rst:566 +#: library/argparse.rst:666 msgid "" "Define how a single command-line argument should be parsed. Each parameter " "has its own more detailed description below, but in short they are:" @@ -718,7 +843,7 @@ msgstr "" "Définie comment une option de ligne de commande doit être analysée. Chacun " "des paramètres est décrit plus en détails ci-bas, mais en résumé ils sont :" -#: library/argparse.rst:569 +#: library/argparse.rst:669 #, fuzzy msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``'foo'`` " @@ -727,7 +852,7 @@ msgstr "" "`name_or_flags`_ – Nom ou liste de chaînes d'options. Par exemple : ``foo`` " "ou ``-f, --foo`` ;" -#: library/argparse.rst:572 +#: library/argparse.rst:672 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." @@ -735,17 +860,17 @@ msgstr "" "action_ – Type élémentaire de l'action à entreprendre quand cet argument est " "reconnu sur la ligne de commande ;" -#: library/argparse.rst:575 +#: library/argparse.rst:675 msgid "nargs_ - The number of command-line arguments that should be consumed." msgstr "nargs_ – Nombre d'arguments de la ligne de commande à capturer ;" -#: library/argparse.rst:577 +#: library/argparse.rst:677 msgid "" "const_ - A constant value required by some action_ and nargs_ selections." msgstr "" "const_ – Valeur constante requise par certains choix d'action_ et de nargs_ ;" -#: library/argparse.rst:579 +#: library/argparse.rst:679 msgid "" "default_ - The value produced if the argument is absent from the command " "line and if it is absent from the namespace object." @@ -753,18 +878,18 @@ msgstr "" "default_ – Valeur produite si l'argument est absent de la ligne de commande " "et absent de l'objet ``namespace`` ;" -#: library/argparse.rst:582 +#: library/argparse.rst:682 msgid "" "type_ - The type to which the command-line argument should be converted." msgstr "" "type_ – Type vers lequel l'argument sur la ligne de commande doit être " "converti ;" -#: library/argparse.rst:584 +#: library/argparse.rst:684 msgid "choices_ - A sequence of the allowable values for the argument." msgstr "choices_ – La séquence de valeurs autorisées pour cet argument ;" -#: library/argparse.rst:586 +#: library/argparse.rst:686 msgid "" "required_ - Whether or not the command-line option may be omitted (optionals " "only)." @@ -772,37 +897,41 @@ msgstr "" "required_ – ``True`` si l'option sur la ligne de commande est obligatoire " "(ne s'applique qu'aux arguments optionnels) ;" -#: library/argparse.rst:589 +#: library/argparse.rst:689 msgid "help_ - A brief description of what the argument does." msgstr "help_ – Brève description de ce que fait l'argument ;" -#: library/argparse.rst:591 +#: library/argparse.rst:691 msgid "metavar_ - A name for the argument in usage messages." msgstr "metavar_ – Nom de l'argument dans les messages d'utilisations ;" -#: library/argparse.rst:593 +#: library/argparse.rst:693 msgid "" -"dest_ - The name of the attribute to be added to the object returned by :" -"meth:`parse_args`." +"dest_ - The name of the attribute to be added to the object returned " +"by :meth:`parse_args`." msgstr "" -"dest_ – Nom de l'attribut qui est ajouté à l'objet retourné par :meth:" -"`parse_args`." +"dest_ – Nom de l'attribut qui est ajouté à l'objet retourné " +"par :meth:`parse_args`." -#: library/argparse.rst:596 +#: library/argparse.rst:696 msgid "deprecated_ - Whether or not use of the argument is deprecated." msgstr "" -#: library/argparse.rst:604 +#: library/argparse.rst:698 +msgid "The method returns an :class:`Action` object representing the argument." +msgstr "" + +#: library/argparse.rst:706 msgid "name or flags" msgstr "Le paramètre *name_or_flags*" -#: library/argparse.rst:606 +#: library/argparse.rst:708 msgid "" "The :meth:`~ArgumentParser.add_argument` method must know whether an " "optional argument, like ``-f`` or ``--foo``, or a positional argument, like " -"a list of filenames, is expected. The first arguments passed to :meth:" -"`~ArgumentParser.add_argument` must therefore be either a series of flags, " -"or a simple argument name." +"a list of filenames, is expected. The first arguments passed " +"to :meth:`~ArgumentParser.add_argument` must therefore be either a series of " +"flags, or a simple argument name." msgstr "" "La méthode :meth:`~ArgumentParser.add_argument` doit savoir s'il s'agit d'un " "argument optionnel (tel que ``-f`` ou ``--foo``) ou d'un argument " @@ -810,15 +939,15 @@ msgstr "" "premier argument passé à :meth:`~ArgumentParser.add_argument` doit donc être " "soit une série de drapeaux, soit le nom de l'argument." -#: library/argparse.rst:612 +#: library/argparse.rst:714 msgid "For example, an optional argument could be created like::" msgstr "Par exemple, un argument optionnel est créé comme suit ::" -#: library/argparse.rst:616 +#: library/argparse.rst:718 msgid "while a positional argument could be created like::" msgstr "alors qu'un argument positionnel est créé comme suit ::" -#: library/argparse.rst:620 +#: library/argparse.rst:722 msgid "" "When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " "be identified by the ``-`` prefix, and the remaining arguments will be " @@ -828,11 +957,21 @@ msgstr "" "commencent par le préfixe ``-`` sont présumés optionnels et tous les autres " "sont présumés positionnels ::" -#: library/argparse.rst:639 +#: library/argparse.rst:737 +msgid "" +"By default, :mod:`!argparse` automatically handles the internal naming and " +"display names of arguments, simplifying the process without requiring " +"additional configuration. As such, you do not need to specify the dest_ and " +"metavar_ parameters. For optional arguments, the dest_ parameter defaults to " +"the argument name, with underscores ``_`` replacing hyphens ``-``. The " +"metavar_ parameter defaults to the upper-cased name. For example::" +msgstr "" + +#: library/argparse.rst:760 msgid "action" msgstr "Le paramètre *action*" -#: library/argparse.rst:641 +#: library/argparse.rst:762 msgid "" ":class:`ArgumentParser` objects associate command-line arguments with " "actions. These actions can do just about anything with the command-line " @@ -849,7 +988,7 @@ msgstr "" "indique comment l'argument de la ligne de commande est traité. Les actions " "natives sont :" -#: library/argparse.rst:647 +#: library/argparse.rst:768 #, fuzzy msgid "" "``'store'`` - This just stores the argument's value. This is the default " @@ -858,7 +997,7 @@ msgstr "" "``'store'`` – Stocke la valeur de l'argument sans autre traitement. Ceci est " "l'action par défaut. Par exemple ::" -#: library/argparse.rst:650 +#: library/argparse.rst:771 msgid "" "``'store_const'`` - This stores the value specified by the const_ keyword " "argument; note that the const_ keyword argument defaults to ``None``. The " @@ -870,26 +1009,26 @@ msgstr "" "généralement utilisée avec des arguments optionnels représentant un drapeau " "ou une condition similaire. Par exemple ::" -#: library/argparse.rst:660 +#: library/argparse.rst:781 #, fuzzy msgid "" "``'store_true'`` and ``'store_false'`` - These are special cases of " -"``'store_const'`` used for storing the values ``True`` and ``False`` " -"respectively. In addition, they create default values of ``False`` and " -"``True`` respectively::" +"``'store_const'`` that respectively store the values ``True`` and ``False`` " +"with default values of ``False`` and ``True``::" msgstr "" "``'store_true'`` et ``'store_false'`` – Ces actions sont des cas " "particuliers de ``'store_const'`` pour lesquelles la valeur stockée est " "``True`` et ``False``, respectivement. Aussi, ces actions ont comme valeur " "par défaut ``False`` et ``True``, respectivement. Par exemple ::" -#: library/argparse.rst:672 +#: library/argparse.rst:793 +#, fuzzy msgid "" -"``'append'`` - This stores a list, and appends each argument value to the " -"list. It is useful to allow an option to be specified multiple times. If the " -"default value is non-empty, the default elements will be present in the " -"parsed value for the option, with any values from the command line appended " -"after those default values. Example usage::" +"``'append'`` - This appends each argument value to a list. It is useful for " +"allowing an option to be specified multiple times. If the default value is a " +"non-empty list, the parsed value will start with the default list's elements " +"and any values from the command line will be appended after those default " +"values. Example usage::" msgstr "" "``'append'`` – Stocke une liste et ajoute la valeur de son argument à cette " "liste. Il est donc généralement utile d'accepter la répétition de cet " @@ -897,13 +1036,13 @@ msgstr "" "également présente dans la liste et précède les valeurs passées sur la ligne " "de commande ::" -#: library/argparse.rst:683 +#: library/argparse.rst:804 +#, fuzzy msgid "" -"``'append_const'`` - This stores a list, and appends the value specified by " -"the const_ keyword argument to the list; note that the const_ keyword " -"argument defaults to ``None``. The ``'append_const'`` action is typically " -"useful when multiple arguments need to store constants to the same list. For " -"example::" +"``'append_const'`` - This appends the value specified by the const_ keyword " +"argument to a list; note that the const_ keyword argument defaults to " +"``None``. The ``'append_const'`` action is typically useful when multiple " +"arguments need to store constants to the same list. For example::" msgstr "" "``'append_const'`` – Stocke une liste et ajoute la valeur de son argument " "const_ à cette liste. Notez que la valeur par défaut de l'argument const_ " @@ -911,30 +1050,31 @@ msgstr "" "arguments ont besoin de stocker des constantes dans une seule liste. Par " "exemple ::" -#: library/argparse.rst:695 +#: library/argparse.rst:816 msgid "" -"``'extend'`` - This stores a list and appends each item from the multi-value " -"argument list to it. The ``'extend'`` action is typically used with the " -"nargs_ keyword argument value ``'+'`` or ``'*'``. Note that when nargs_ is " -"``None`` (the default) or ``'?'``, each character of the argument string " -"will be appended to the list. Example usage::" +"``'extend'`` - This appends each item from a multi-value argument to a list. " +"The ``'extend'`` action is typically used with the nargs_ keyword argument " +"value ``'+'`` or ``'*'``. Note that when nargs_ is ``None`` (the default) or " +"``'?'``, each character of the argument string will be appended to the list. " +"Example usage::" msgstr "" -#: library/argparse.rst:710 +#: library/argparse.rst:831 +#, fuzzy msgid "" -"``'count'`` - This counts the number of times a keyword argument occurs. For " +"``'count'`` - This counts the number of times an argument occurs. For " "example, this is useful for increasing verbosity levels::" msgstr "" "``'count'`` – Compte le nombre d'occurrences de l'argument nommé. Ceci est " "pratique, par exemple, pour augmenter le niveau de verbosité ::" -#: library/argparse.rst:718 +#: library/argparse.rst:839 msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." msgstr "" "Prenez note que la valeur de *default* est ``None`` à moins qu'elle soit " "explicitement définie à ``0``." -#: library/argparse.rst:720 +#: library/argparse.rst:841 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -943,62 +1083,61 @@ msgid "" msgstr "" "``'help'`` – Affiche le message d'aide complet pour toutes les options de " "l'analyseur puis termine l'exécution. Une action ``help`` est " -"automatiquement ajoutée à l'analyseur par défaut. Consultez :class:" -"`ArgumentParser` pour les détails de la création du contenu de l'aide." +"automatiquement ajoutée à l'analyseur par défaut. " +"Consultez :class:`ArgumentParser` pour les détails de la création du contenu " +"de l'aide." -#: library/argparse.rst:725 +#: library/argparse.rst:846 msgid "" -"``'version'`` - This expects a ``version=`` keyword argument in the :meth:" -"`~ArgumentParser.add_argument` call, and prints version information and " -"exits when invoked::" +"``'version'`` - This expects a ``version=`` keyword argument in " +"the :meth:`~ArgumentParser.add_argument` call, and prints version " +"information and exits when invoked::" msgstr "" "``'version'`` – Affiche la version du programme puis termine l'exécution. " -"Cette action requiert l'argument nommé ``version=`` dans l'appel à :meth:" -"`~ArgumentParser.add_argument` ::" - -#: library/argparse.rst:735 -msgid "" -"Only actions that consume command-line arguments (e.g. ``'store'``, " -"``'append'`` or ``'extend'``) can be used with positional arguments." -msgstr "" +"Cette action requiert l'argument nommé ``version=`` dans l'appel " +"à :meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:740 +#: library/argparse.rst:856 #, fuzzy msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " -"subclass or other object that implements the same interface. The :class:`!" -"BooleanOptionalAction` is available in :mod:`!argparse` and adds support for " -"boolean actions such as ``--foo`` and ``--no-foo``::" +"subclass (e.g. :class:`BooleanOptionalAction`) or other object that " +"implements the same interface. Only actions that consume command-line " +"arguments (e.g. ``'store'``, ``'append'``, ``'extend'``, or custom actions " +"with non-zero ``nargs``) can be used with positional arguments." msgstr "" "Vous pouvez aussi spécifier une action arbitraire en passant une sous-classe " "d'``Action`` ou un objet qui implémente la même interface. La classe " "``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " "gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" -#: library/argparse.rst:753 +#: library/argparse.rst:862 #, fuzzy msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " -"and :meth:`!format_usage` methods." +"and :meth:`!format_usage` methods. You can also register custom actions " +"using the :meth:`~ArgumentParser.register` method and reference them by " +"their registered name." msgstr "" -"La façon recommandée pour créer une action personnalisée est d'hériter d':" -"class:`Action` en surchargeant la méthode ``__call__``. Vous avez également " -"l'option de surcharger les méthodes ``__init__`` et ``format_usage``." +"La façon recommandée pour créer une action personnalisée est d'hériter " +"d':class:`Action` en surchargeant la méthode ``__call__``. Vous avez " +"également l'option de surcharger les méthodes ``__init__`` et " +"``format_usage``." -#: library/argparse.rst:757 +#: library/argparse.rst:867 msgid "An example of a custom action::" msgstr "Un exemple d'action personnalisée ::" -#: library/argparse.rst:777 +#: library/argparse.rst:887 msgid "For more details, see :class:`Action`." msgstr "Pour plus d'information, voir :class:`Action`." -#: library/argparse.rst:783 +#: library/argparse.rst:893 msgid "nargs" msgstr "Le paramètre *nargs*" -#: library/argparse.rst:785 +#: library/argparse.rst:895 #, fuzzy msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " @@ -1012,7 +1151,7 @@ msgstr "" "``nargs`` associe un nombre différent d'arguments de la ligne de commande à " "une action. Les valeurs reconnues sont :" -#: library/argparse.rst:790 +#: library/argparse.rst:900 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1020,7 +1159,7 @@ msgstr "" "``N`` (un entier). ``N`` arguments de la ligne de commande sont capturés " "ensemble et stockés dans une liste. Par exemple ::" -#: library/argparse.rst:799 +#: library/argparse.rst:909 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." @@ -1029,7 +1168,7 @@ msgstr "" "différent du comportement par défaut qui produit l'élément directement " "(comme un scalaire)." -#: library/argparse.rst:804 +#: library/argparse.rst:914 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1045,7 +1184,7 @@ msgstr "" "qu'elle ne soit pas suivie d'un argument. Dans ce cas, la valeur de const_ " "est produite. Voici quelques exemples pour illustrer ceci ::" -#: library/argparse.rst:821 +#: library/argparse.rst:931 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" @@ -1053,7 +1192,7 @@ msgstr "" "``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " "de sortie optionnels ::" -#: library/argparse.rst:838 +#: library/argparse.rst:946 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1066,18 +1205,19 @@ msgstr "" "d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " "exemple ::" -#: library/argparse.rst:852 +#: library/argparse.rst:960 +#, fuzzy msgid "" -"``'+'``. Just like ``'*'``, all command-line args present are gathered into " -"a list. Additionally, an error message will be generated if there wasn't at " -"least one command-line argument present. For example::" +"``'+'``. Just like ``'*'``, all command-line arguments present are gathered " +"into a list. Additionally, an error message will be generated if there " +"wasn't at least one command-line argument present. For example::" msgstr "" "``'+'``. Comme pour ``'*'``, tous les arguments présents sur la ligne de " "commande sont capturés dans une liste. De plus, un message d'erreur est " "produit s'il n'y a pas au moins un argument présent sur la ligne de " "commande. Par exemple ::" -#: library/argparse.rst:864 +#: library/argparse.rst:972 #, fuzzy msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " @@ -1090,11 +1230,11 @@ msgstr "" "capturés est déterminé par l'action_. En général, c'est un seul argument de " "la ligne de commande qui est capturé et il est produit directement." -#: library/argparse.rst:874 +#: library/argparse.rst:982 msgid "const" msgstr "Le paramètre *const*" -#: library/argparse.rst:876 +#: library/argparse.rst:984 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1106,32 +1246,34 @@ msgstr "" "est requise par certaines actions d':class:`ArgumentParser`. Les deux " "utilisations les plus communes sont :" -#: library/argparse.rst:880 +#: library/argparse.rst:988 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " -"the ``const`` value to one of the attributes of the object returned by :meth:" -"`~ArgumentParser.parse_args`. See the action_ description for examples. If " -"``const`` is not provided to :meth:`~ArgumentParser.add_argument`, it will " -"receive a default value of ``None``." +"the ``const`` value to one of the attributes of the object returned " +"by :meth:`~ArgumentParser.parse_args`. See the action_ description for " +"examples. If ``const`` is not provided " +"to :meth:`~ArgumentParser.add_argument`, it will receive a default value of " +"``None``." msgstr "" "quand :meth:`~ArgumentParser.add_argument` est appelée avec " "``action='store_const'`` ou ``action='append_const'``, ces actions ajoutent " -"la valeur de ``const`` à l'un des attributs de l'objet renvoyé par :meth:" -"`~ArgumentParser.parse_args`. Consultez la description d'action_ pour voir " -"quelques exemples. La valeur de ``const`` est ``None`` par défaut pour :meth:" -"`~ArgumentParser.add_argument` ;" +"la valeur de ``const`` à l'un des attributs de l'objet renvoyé " +"par :meth:`~ArgumentParser.parse_args`. Consultez la description d'action_ " +"pour voir quelques exemples. La valeur de ``const`` est ``None`` par défaut " +"pour :meth:`~ArgumentParser.add_argument` ;" # Nous sommes dans une énumération après un :, donc pas de majuscule et le # paragraphe doit se terminer par ;. -#: library/argparse.rst:888 +#: library/argparse.rst:996 +#, fuzzy msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " "argument that can be followed by zero or one command-line arguments. When " "parsing the command line, if the option string is encountered with no " -"command-line argument following it, the value of ``const`` will be assumed " -"to be ``None`` instead. See the nargs_ description for examples." +"command-line argument following it, the value from ``const`` will be used. " +"See the nargs_ description for examples." msgstr "" "appeler la méthode :meth:`~ArgumentParser.add_argument` avec des chaînes " "d'options (telles ``-f``, ``--foo`` ou avec ``nargs='?'``) crée un argument " @@ -1139,7 +1281,7 @@ msgstr "" "l'analyseur prend ``None`` comme la valeur de ``const``. La description de " "nargs_ offre quelques exemples." -#: library/argparse.rst:895 +#: library/argparse.rst:1003 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." @@ -1147,18 +1289,18 @@ msgstr "" "``const=None`` par défaut, y compris avec ``action='append_const'`` ou " "``action='store_const'``." -#: library/argparse.rst:902 +#: library/argparse.rst:1010 msgid "default" msgstr "Le paramètre *default*" -#: library/argparse.rst:904 +#: library/argparse.rst:1012 msgid "" "All optional arguments and some positional arguments may be omitted at the " -"command line. The ``default`` keyword argument of :meth:`~ArgumentParser." -"add_argument`, whose value defaults to ``None``, specifies what value should " -"be used if the command-line argument is not present. For optional arguments, " -"the ``default`` value is used when the option string was not present at the " -"command line::" +"command line. The ``default`` keyword argument " +"of :meth:`~ArgumentParser.add_argument`, whose value defaults to ``None``, " +"specifies what value should be used if the command-line argument is not " +"present. For optional arguments, the ``default`` value is used when the " +"option string was not present at the command line::" msgstr "" "Tous les arguments optionnels et certains arguments positionnels peuvent " "être omis à la ligne de commande. L'argument nommé ``default`` de la " @@ -1167,7 +1309,7 @@ msgstr "" "commande. Pour les arguments optionnels, la valeur de ``default`` est " "utilisée si la chaîne d'option n'est pas présente sur la ligne de commande ::" -#: library/argparse.rst:918 +#: library/argparse.rst:1026 #, fuzzy msgid "" "If the target namespace already has an attribute set, the action *default* " @@ -1176,12 +1318,13 @@ msgstr "" "Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " "*default* ne l'écrase pas ::" -#: library/argparse.rst:926 +#: library/argparse.rst:1034 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " -"conversion argument, if provided, before setting the attribute on the :class:" -"`Namespace` return value. Otherwise, the parser uses the value as is::" +"conversion argument, if provided, before setting the attribute on " +"the :class:`Namespace` return value. Otherwise, the parser uses the value " +"as is::" msgstr "" "Si la valeur de ``default`` est une chaîne, l'analyseur analyse cette valeur " "comme si c'était un argument de la ligne de commande. En particulier, " @@ -1189,7 +1332,7 @@ msgstr "" "fournie) avant d'affecter l'attribut à l'objet :class:`Namespace` renvoyé. " "Autrement, l'analyseur utilise la valeur telle qu'elle ::" -#: library/argparse.rst:937 +#: library/argparse.rst:1045 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" @@ -1198,14 +1341,14 @@ msgstr "" "valeur de ``default`` est utilisée quand l'argument est absent de la ligne " "de commande ::" -#: library/argparse.rst:947 +#: library/argparse.rst:1055 msgid "" "For required_ arguments, the ``default`` value is ignored. For example, this " "applies to positional arguments with nargs_ values other than ``?`` or " "``*``, or optional arguments marked as ``required=True``." msgstr "" -#: library/argparse.rst:951 +#: library/argparse.rst:1059 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1213,11 +1356,11 @@ msgstr "" "Si vous passez ``default=argparse.SUPPRESS``, aucun attribut n'est ajouté à " "l'objet ``Namespace`` quand l'argument est absent de la ligne de commande ::" -#: library/argparse.rst:965 +#: library/argparse.rst:1073 msgid "type" msgstr "Le paramètre *type*" -#: library/argparse.rst:967 +#: library/argparse.rst:1075 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1227,11 +1370,12 @@ msgid "" msgstr "" "Par défaut, l'analyseur capture les arguments de la ligne de commande comme " "des chaînes. Très souvent par contre, on désire interpréter les chaînes de " -"la ligne de commande comme un autre type, tel que :class:`float` ou :class:" -"`int`. L'argument nommé ``type`` d':meth:`~ArgumentParser.add_argument` nous " -"permet de faire les vérifications et les conversions de type nécessaires." +"la ligne de commande comme un autre type, tel que :class:`float` " +"ou :class:`int`. L'argument nommé ``type`` " +"d':meth:`~ArgumentParser.add_argument` nous permet de faire les " +"vérifications et les conversions de type nécessaires." -#: library/argparse.rst:973 +#: library/argparse.rst:1081 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." @@ -1240,41 +1384,50 @@ msgstr "" "default_, le convertisseur de type n'est appliqué que si la valeur par " "défaut est une chaîne." -#: library/argparse.rst:976 +#: library/argparse.rst:1084 +#, fuzzy msgid "" -"The argument to ``type`` can be any callable that accepts a single string. " -"If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" -"`ValueError`, the exception is caught and a nicely formatted error message " -"is displayed. No other exception types are handled." +"The argument to ``type`` can be a callable that accepts a single string or " +"the name of a registered type (see :meth:`~ArgumentParser.register`) If the " +"function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, " +"or :exc:`ValueError`, the exception is caught and a nicely formatted error " +"message is displayed. Other exception types are not handled." msgstr "" "La valeur de l'argument ``type`` peut être n'importe quel appelable qui " -"accepte une seule chaîne. Si la fonction lève :exc:`ArgumentTypeError`, :exc:" -"`TypeError` ou :exc:`ValueError`, l'exception est traitée et un message " -"d'erreur agréablement formaté est affiché. Aucun autre type d'exception " -"n'est géré." +"accepte une seule chaîne. Si la fonction " +"lève :exc:`ArgumentTypeError`, :exc:`TypeError` ou :exc:`ValueError`, " +"l'exception est traitée et un message d'erreur agréablement formaté est " +"affiché. Aucun autre type d'exception n'est géré." -#: library/argparse.rst:981 +#: library/argparse.rst:1090 msgid "Common built-in types and functions can be used as type converters:" msgstr "" "Les types et les fonctions natives peuvent être utilisés comme " "convertisseurs de types :" -#: library/argparse.rst:996 +#: library/argparse.rst:1104 msgid "User defined functions can be used as well:" msgstr "" "Des fonctions définies par l'utilisateur peuvent aussi être utilisées :" -#: library/argparse.rst:1008 +#: library/argparse.rst:1116 +#, fuzzy msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " -"``True``. This is usually not what is desired." +"``True``. This is usually not what is desired::" msgstr "" "La fonction :func:`bool` est déconseillée comme convertisseur de type. Son " "comportement se limite à convertir les chaînes vides à ``False`` et les " "chaînes non-vides à ``True``. Ce n'est généralement pas le résultat désiré." -#: library/argparse.rst:1012 +#: library/argparse.rst:1125 +msgid "" +"See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " +"alternatives." +msgstr "" + +#: library/argparse.rst:1128 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1287,20 +1440,20 @@ msgstr "" "d'erreurs plus intéressant ou une gestion de ressources devraient être " "effectuées plus tard dans l’exécution suivant l'analyse des arguments." -#: library/argparse.rst:1017 +#: library/argparse.rst:1133 msgid "" "For example, JSON or YAML conversions have complex error cases that require " -"better reporting than can be given by the ``type`` keyword. A :exc:`~json." -"JSONDecodeError` would not be well formatted and a :exc:`FileNotFoundError` " -"exception would not be handled at all." +"better reporting than can be given by the ``type`` keyword. " +"A :exc:`~json.JSONDecodeError` would not be well formatted and " +"a :exc:`FileNotFoundError` exception would not be handled at all." msgstr "" "Par exemple, les conversions de documents *JSON* ou *YAML* ont des cas " "d'erreurs complexes qui requièrent un meilleur signalement que ce qui est " -"fourni par l'argument nommé ``type``. Une exception :exc:`~json." -"JSONDecodeError` ne serait pas adéquatement formatée et une exception :exc:" -"`FileNotFoundError` ne serait pas du tout traitée." +"fourni par l'argument nommé ``type``. Une " +"exception :exc:`~json.JSONDecodeError` ne serait pas adéquatement formatée " +"et une exception :exc:`FileNotFoundError` ne serait pas du tout traitée." -#: library/argparse.rst:1022 +#: library/argparse.rst:1138 #, fuzzy msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " @@ -1317,7 +1470,7 @@ msgstr "" "fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " "bloc :keyword:`with`." -#: library/argparse.rst:1029 +#: library/argparse.rst:1145 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1325,11 +1478,11 @@ msgstr "" "Pour les vérificateurs de types qui ne font que tester l'appartenance à un " "ensemble de valeurs, pensez plutôt à utiliser l'argument nommé choices_." -#: library/argparse.rst:1036 +#: library/argparse.rst:1152 msgid "choices" msgstr "Le paramètre *choices*" -#: library/argparse.rst:1038 +#: library/argparse.rst:1154 msgid "" "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* " @@ -1339,22 +1492,12 @@ msgid "" msgstr "" "Certains arguments de la ligne de commande doivent être choisis parmi un " "ensemble prédéfini de valeurs. Celles-ci doivent être déclarées dans la " -"séquence passée à l'argument *choices* de la méthode :meth:`~ArgumentParser." -"add_argument`. Un message d'erreur est alors affiché si l'utilisateur passe " -"un argument qui n'est pas parmi les valeurs acceptables ::" +"séquence passée à l'argument *choices* de la " +"méthode :meth:`~ArgumentParser.add_argument`. Un message d'erreur est alors " +"affiché si l'utilisateur passe un argument qui n'est pas parmi les valeurs " +"acceptables ::" -#: library/argparse.rst:1053 -#, fuzzy -msgid "" -"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* " -"sequence should match the type_ specified." -msgstr "" -"Prenez note que le test d'inclusion dans le conteneur *choices* est fait " -"après la conversion de type_. Le type des objets dans le conteneur *choices* " -"doit donc correspondre au type_ spécifié ::" - -#: library/argparse.rst:1057 +#: library/argparse.rst:1169 msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." @@ -1363,7 +1506,7 @@ msgstr "" "les objets de type :class:`list`, :class:`set` ou des conteneurs " "personnalisés." -#: library/argparse.rst:1060 +#: library/argparse.rst:1172 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." @@ -1371,7 +1514,25 @@ msgstr "" "L'utilisation d':class:`enum.Enum` est déconseillée, car il est difficile de " "contrôler son apparence dans les messages d'usage, d'aide et d'erreur." -#: library/argparse.rst:1063 +#: library/argparse.rst:1175 +#, fuzzy +msgid "" +"Note that *choices* are checked after any type_ conversions have been " +"performed, so objects in *choices* should match the type_ specified. This " +"can make *choices* appear unfamiliar in usage, help, or error messages." +msgstr "" +"Prenez note que le test d'inclusion dans le conteneur *choices* est fait " +"après la conversion de type_. Le type des objets dans le conteneur *choices* " +"doit donc correspondre au type_ spécifié ::" + +#: library/argparse.rst:1180 +msgid "" +"To keep *choices* user-friendly, consider a custom type wrapper that " +"converts and formats values, or omit type_ and handle conversion in your " +"application code." +msgstr "" + +#: library/argparse.rst:1184 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1384,11 +1545,11 @@ msgstr "" "pas souhaité (comme lorsque les choix sont trop nombreux) spécifiez " "simplement metavar_ de façon explicite." -#: library/argparse.rst:1072 +#: library/argparse.rst:1193 msgid "required" msgstr "Le paramètre *required*" -#: library/argparse.rst:1074 +#: library/argparse.rst:1195 #, fuzzy msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " @@ -1399,20 +1560,20 @@ msgstr "" "En général, le module :mod:`argparse` prend pour acquis que les drapeaux " "comme ``-f`` et ``--bar`` annoncent un argument *optionnel* qui peut " "toujours être omis de la ligne de commande. Pour rendre une option " -"*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` d':" -"meth:`~ArgumentParser.add_argument` ::" +"*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` " +"d':meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1087 +#: library/argparse.rst:1208 msgid "" -"As the example shows, if an option is marked as ``required``, :meth:" -"`~ArgumentParser.parse_args` will report an error if that option is not " -"present at the command line." +"As the example shows, if an option is marked as " +"``required``, :meth:`~ArgumentParser.parse_args` will report an error if " +"that option is not present at the command line." msgstr "" "Tel qu'illustré dans l'exemple, quand l'option est marquée comme " "``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " "l'option est absente de la ligne de commande." -#: library/argparse.rst:1093 +#: library/argparse.rst:1214 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." @@ -1421,11 +1582,11 @@ msgstr "" "utilisateurs s'attendent à ce que les *options* soient *optionnelles*. Elles " "devraient donc être évitées si possible." -#: library/argparse.rst:1100 +#: library/argparse.rst:1221 msgid "help" msgstr "Le paramètre *help*" -#: library/argparse.rst:1102 +#: library/argparse.rst:1223 #, fuzzy msgid "" "The ``help`` value is a string containing a brief description of the " @@ -1438,22 +1599,22 @@ msgstr "" "l'utilisation de ``-h`` ou ``--help`` sur la ligne de commande), ces " "descriptions d'aide sont affichées pour chacun des arguments ::" -#: library/argparse.rst:1107 +#: library/argparse.rst:1228 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " "available specifiers include the program name, ``%(prog)s`` and most keyword " -"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, " -"``%(type)s``, etc.::" +"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, ``%" +"(type)s``, etc.::" msgstr "" "La chaîne ``help`` peut contenir des définitions de formatage permettant " "d'éviter la répétition de contenu tel que le nom du programme et la valeur " "par défaut de l'argument (voir default_). Les définitions disponibles " "comprennent entre autres le nom du programme, ``%(prog)s``, et la plupart " -"des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels que " -"``%(default)s``, ``%(type)s``, etc ::" +"des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels que ``%" +"(default)s``, ``%(type)s``, etc ::" -#: library/argparse.rst:1124 +#: library/argparse.rst:1245 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." @@ -1462,7 +1623,7 @@ msgstr "" "désirez afficher un ``%`` littéral dans la chaîne d'aide, vous devez en " "faire l’échappement avec ``%%``." -#: library/argparse.rst:1127 +#: library/argparse.rst:1248 #, fuzzy msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " @@ -1471,11 +1632,11 @@ msgstr "" ":mod:`argparse` peut supprimer la rubrique d'aide de certaines options. Pour " "ce faire, passez ``argparse.SUPPRESS`` à ``help`` ::" -#: library/argparse.rst:1142 +#: library/argparse.rst:1263 msgid "metavar" msgstr "Le paramètre *metavar*" -#: library/argparse.rst:1144 +#: library/argparse.rst:1265 #, fuzzy msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " @@ -1497,11 +1658,11 @@ msgstr "" "unique ``--foo`` qui prend un seul argument sur la ligne de commande est " "affiché comme ``FOO``. Par exemple ::" -#: library/argparse.rst:1168 +#: library/argparse.rst:1289 msgid "An alternative name can be specified with ``metavar``::" msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" -#: library/argparse.rst:1185 +#: library/argparse.rst:1306 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " @@ -1511,7 +1672,7 @@ msgstr "" "l'attribut ajouté à l'objet renvoyé par :meth:`~ArgumentParser.parse_args` " "est toujours déterminé par la valeur de dest_." -#: library/argparse.rst:1189 +#: library/argparse.rst:1310 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " @@ -1521,36 +1682,39 @@ msgstr "" "plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " "noms à afficher pour chacun des arguments ::" -#: library/argparse.rst:1208 +#: library/argparse.rst:1329 msgid "dest" msgstr "Le paramètre *dest*" -#: library/argparse.rst:1210 +#: library/argparse.rst:1331 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " -"attribute is determined by the ``dest`` keyword argument of :meth:" -"`~ArgumentParser.add_argument`. For positional argument actions, ``dest`` " -"is normally supplied as the first argument to :meth:`~ArgumentParser." -"add_argument`::" +"attribute is determined by the ``dest`` keyword argument " +"of :meth:`~ArgumentParser.add_argument`. For positional argument actions, " +"``dest`` is normally supplied as the first argument " +"to :meth:`~ArgumentParser.add_argument`::" msgstr "" "La plupart des actions d':class:`ArgumentParser` ajoutent une valeur dans un " "attribut de l'objet renvoyé par :meth:`~ArgumentParser.parse_args`. Le nom " -"de l'attribut est déterminé par l'argument nommé ``dest`` d':meth:" -"`~ArgumentParser.add_argument`. Pour les arguments positionnels, ``dest`` " -"est généralement le premier argument d':meth:`~ArgumentParser." -"add_argument` ::" +"de l'attribut est déterminé par l'argument nommé ``dest`` " +"d':meth:`~ArgumentParser.add_argument`. Pour les arguments positionnels, " +"``dest`` est généralement le premier argument " +"d':meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1222 +#: library/argparse.rst:1343 +#, fuzzy msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " -"``dest`` by taking the first long option string and stripping away the " -"initial ``--`` string. If no long option strings were supplied, ``dest`` " -"will be derived from the first short option string by stripping the initial " -"``-`` character. Any internal ``-`` characters will be converted to ``_`` " -"characters to make sure the string is a valid attribute name. The examples " -"below illustrate this behavior::" +"``dest`` by taking the first double-dash long option string and stripping " +"away the initial ``-`` characters. If no double-dash long option strings " +"were supplied, ``dest`` will be derived from the first single-dash long " +"option string by stripping the initial ``-`` character. If no long option " +"strings were supplied, ``dest`` will be derived from the first short option " +"string by stripping the initial ``-`` character. Any internal ``-`` " +"characters will be converted to ``_`` characters to make sure the string is " +"a valid attribute name. The examples below illustrate this behavior::" msgstr "" "Pour les actions d'arguments optionnels, la valeur de ``dest`` est " "généralement inférée des chaînes d'options. :class:`ArgumentParser` génère " @@ -1560,15 +1724,19 @@ msgstr "" "suivants sont convertis en ``_`` pour s'assurer que la chaîne est un nom " "d'attribut valide. Les exemples suivants illustrent ce comportement ::" -#: library/argparse.rst:1239 +#: library/argparse.rst:1365 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "``dest`` vous permet de fournir un nom d'attribut personnalisé ::" -#: library/argparse.rst:1250 +#: library/argparse.rst:1372 +msgid "Single-dash long option now takes precedence over short options." +msgstr "" + +#: library/argparse.rst:1379 msgid "deprecated" msgstr "" -#: library/argparse.rst:1252 +#: library/argparse.rst:1381 msgid "" "During a project's lifetime, some arguments may need to be removed from the " "command line. Before removing them, you should inform your users that the " @@ -1579,39 +1747,40 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: library/argparse.rst:1275 +#: library/argparse.rst:1404 msgid "Action classes" msgstr "Classes Action" -#: library/argparse.rst:1277 +#: library/argparse.rst:1406 #, fuzzy msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " -"follows this API may be passed as the ``action`` parameter to :meth:" -"`~ArgumentParser.add_argument`." +"follows this API may be passed as the ``action`` parameter " +"to :meth:`~ArgumentParser.add_argument`." msgstr "" "Les classes ``Action`` implémentent l'API Action, un appelable qui renvoie " "un appelable qui traite les arguments de la ligne de commande. Tout objet " -"qui suit cette API peut être passé comme paramètre ``action`` d':meth:" -"`~ArgumentParser.add_argument`." +"qui suit cette API peut être passé comme paramètre ``action`` " +"d':meth:`~ArgumentParser.add_argument`." -#: library/argparse.rst:1286 +#: library/argparse.rst:1415 #, fuzzy msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " "the information needed to parse a single argument from one or more strings " "from the command line. The :class:`!Action` class must accept the two " -"positional arguments plus any keyword arguments passed to :meth:" -"`ArgumentParser.add_argument` except for the ``action`` itself." +"positional arguments plus any keyword arguments passed " +"to :meth:`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" "Les objets ``Action`` sont utilisés par un ``ArgumentParser`` pour " "représenter l'information nécessaire à l'analyse d'un seul argument à partir " "d'une ou plusieurs chaînes de la ligne de commande. La classe ``Action`` " -"doit accepter les deux arguments positionnels d':meth:`ArgumentParser." -"add_argument` ainsi que tous ses arguments nommés, sauf ``action``." +"doit accepter les deux arguments positionnels " +"d':meth:`ArgumentParser.add_argument` ainsi que tous ses arguments nommés, " +"sauf ``action``." -#: library/argparse.rst:1292 +#: library/argparse.rst:1421 #, fuzzy msgid "" "Instances of :class:`!Action` (or return value of any callable to the " @@ -1626,7 +1795,7 @@ msgstr "" "plus simple de s'assurer que ces attributs sont définis est d'appeler " "``Action.__init__``." -#: library/argparse.rst:1300 +#: library/argparse.rst:1429 #, fuzzy msgid "" ":class:`!Action` instances should be callable, so subclasses must override " @@ -1636,36 +1805,36 @@ msgstr "" "doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " "quatre paramètres :" -#: library/argparse.rst:1303 +#: library/argparse.rst:1432 #, fuzzy msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "``parser`` – L'objet ``ArgumentParser`` qui contient cette action ;" -#: library/argparse.rst:1305 +#: library/argparse.rst:1434 #, fuzzy msgid "" -"*namespace* - The :class:`Namespace` object that will be returned by :meth:" -"`~ArgumentParser.parse_args`. Most actions add an attribute to this object " -"using :func:`setattr`." +"*namespace* - The :class:`Namespace` object that will be returned " +"by :meth:`~ArgumentParser.parse_args`. Most actions add an attribute to " +"this object using :func:`setattr`." msgstr "" -"``namespace`` – L'objet :class:`Namespace` qui est renvoyé par :meth:" -"`~ArgumentParser.parse_args`. La majorité des actions ajoutent un attribut à " -"cet objet avec :func:`setattr` ;" +"``namespace`` – L'objet :class:`Namespace` qui est renvoyé " +"par :meth:`~ArgumentParser.parse_args`. La majorité des actions ajoutent un " +"attribut à cet objet avec :func:`setattr` ;" -#: library/argparse.rst:1309 +#: library/argparse.rst:1438 #, fuzzy msgid "" "*values* - The associated command-line arguments, with any type conversions " -"applied. Type conversions are specified with the type_ keyword argument to :" -"meth:`~ArgumentParser.add_argument`." +"applied. Type conversions are specified with the type_ keyword argument " +"to :meth:`~ArgumentParser.add_argument`." msgstr "" "``values`` – Les arguments de la ligne de commande associés à l'action après " "les avoir soumis à la conversion de type. Les conversions de types sont " -"spécifiées grâce à l’argument nommé type_ d':meth:`~ArgumentParser." -"add_argument` ;" +"spécifiées grâce à l’argument nommé type_ " +"d':meth:`~ArgumentParser.add_argument` ;" -#: library/argparse.rst:1313 +#: library/argparse.rst:1442 #, fuzzy msgid "" "*option_string* - The option string that was used to invoke this action. The " @@ -1676,7 +1845,7 @@ msgstr "" "L'argument ``option_string`` est optionnel et est absent si l'action est " "associée à un argument positionnel." -#: library/argparse.rst:1317 +#: library/argparse.rst:1446 #, fuzzy msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " @@ -1687,7 +1856,7 @@ msgstr "" "général elle affecte des attributs sur le ``namespace`` en fonction de " "``dest`` et de ``values``." -#: library/argparse.rst:1322 +#: library/argparse.rst:1451 #, fuzzy msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " @@ -1700,11 +1869,34 @@ msgstr "" "utilisée lors de l'affichage du message d'utilisation du programme. Si cette " "méthode n'est pas fournie, une valeur raisonnable est utilisée par défaut." -#: library/argparse.rst:1328 +#: library/argparse.rst:1457 +msgid "" +"A subclass of :class:`Action` for handling boolean flags with positive and " +"negative options. Adding a single argument such as ``--foo`` automatically " +"creates both ``--foo`` and ``--no-foo`` options, storing ``True`` and " +"``False`` respectively::" +msgstr "" + +#: library/argparse.rst:1468 +msgid "" +"Single-dash long options are also supported. For example, negative option ``-" +"nofoo`` is automatically added for positive option ``-foo``. But no " +"additional options are added for short options such as ``-f``." +msgstr "" + +#: library/argparse.rst:1475 +msgid "Added support for single-dash options." +msgstr "" + +#: library/argparse.rst:1478 +msgid "Added support for alternate prefix_chars_." +msgstr "" + +#: library/argparse.rst:1482 msgid "The parse_args() method" msgstr "La méthode *parse_args()*" -#: library/argparse.rst:1332 +#: library/argparse.rst:1486 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -1712,7 +1904,7 @@ msgstr "" "Convertie les chaînes d'arguments en objets et les assigne comme attributs " "de l'espace de nommage ``namespace``. Renvoie un objet ``namespace`` rempli." -#: library/argparse.rst:1335 +#: library/argparse.rst:1489 #, fuzzy msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " @@ -1723,27 +1915,27 @@ msgstr "" "quels objets sont créés et comment ils sont affectés. Consultez la rubrique " "d':meth:`add_argument` pour les détails." -#: library/argparse.rst:1339 +#: library/argparse.rst:1493 msgid "" -"args_ - List of strings to parse. The default is taken from :data:`sys." -"argv`." +"args_ - List of strings to parse. The default is taken " +"from :data:`sys.argv`." msgstr "" "args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " "dans :data:`sys.argv`." -#: library/argparse.rst:1342 +#: library/argparse.rst:1496 msgid "" -"namespace_ - An object to take the attributes. The default is a new empty :" -"class:`Namespace` object." +"namespace_ - An object to take the attributes. The default is a new " +"empty :class:`Namespace` object." msgstr "" "namespace_ – Un objet pour recevoir les attributs. Par défaut, une nouvelle " "instance (vide) de :class:`Namespace`." -#: library/argparse.rst:1347 +#: library/argparse.rst:1501 msgid "Option value syntax" msgstr "Syntaxe de la valeur des options" -#: library/argparse.rst:1349 +#: library/argparse.rst:1503 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " @@ -1754,7 +1946,7 @@ msgstr "" "simple, l'option et sa valeur sont passées en tant que deux arguments " "distincts ::" -#: library/argparse.rst:1361 +#: library/argparse.rst:1515 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " @@ -1764,7 +1956,7 @@ msgstr "" "caractère), l'option et sa valeur peuvent être passées comme un seul " "argument de la ligne de commande en utilisant ``=`` comme séparateur ::" -#: library/argparse.rst:1368 +#: library/argparse.rst:1522 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -1772,7 +1964,7 @@ msgstr "" "Pour les options courtes (un seul caractère), l'option et sa valeur peuvent " "être concaténées ::" -#: library/argparse.rst:1374 +#: library/argparse.rst:1528 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" @@ -1781,29 +1973,29 @@ msgstr "" "préfixe ``-`` pour autant que seule la dernière, au maximum, ne nécessite " "une valeur ::" -#: library/argparse.rst:1386 +#: library/argparse.rst:1540 msgid "Invalid arguments" msgstr "Arguments invalides" -#: library/argparse.rst:1388 +#: library/argparse.rst:1542 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " "options, wrong number of positional arguments, etc. When it encounters such " "an error, it exits and prints the error along with a usage message::" msgstr "" -"Quand elle fait l'analyse de la ligne de commande, la méthode :meth:" -"`~ArgumentParser.parse_args` vérifie plusieurs erreurs possibles : entre " -"autres, options ambigües, types invalides, options invalides, nombre " -"incorrect d'arguments positionnels, etc. Quand une erreur est rencontrée, " -"elle affiche l'erreur accompagnée du message d'aide puis termine " -"l'exécution ::" +"Quand elle fait l'analyse de la ligne de commande, la " +"méthode :meth:`~ArgumentParser.parse_args` vérifie plusieurs erreurs " +"possibles : entre autres, options ambigües, types invalides, options " +"invalides, nombre incorrect d'arguments positionnels, etc. Quand une erreur " +"est rencontrée, elle affiche l'erreur accompagnée du message d'aide puis " +"termine l'exécution ::" -#: library/argparse.rst:1414 +#: library/argparse.rst:1568 msgid "Arguments containing ``-``" msgstr "Arguments contenant ``-``" -#: library/argparse.rst:1416 +#: library/argparse.rst:1570 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1818,13 +2010,13 @@ msgstr "" "quand l'utilisateur s'est clairement trompé. Par contre, certaines " "situations sont intrinsèquement ambigües. Par exemple, l'argument de la " "ligne de commande ``-1`` peut aussi bien être une tentative de spécifier une " -"option qu'une tentative de passer un argument positionnel. La méthode :meth:" -"`~ArgumentParser.parse_args` est prudente : les arguments positionnels ne " -"peuvent commencer par ``-`` que s'ils ont l'apparence d'un nombre négatif et " -"que l'analyseur ne contient aucune option qui a l'apparence d'un nombre " -"négatif ::" +"option qu'une tentative de passer un argument positionnel. La " +"méthode :meth:`~ArgumentParser.parse_args` est prudente : les arguments " +"positionnels ne peuvent commencer par ``-`` que s'ils ont l'apparence d'un " +"nombre négatif et que l'analyseur ne contient aucune option qui a " +"l'apparence d'un nombre négatif ::" -#: library/argparse.rst:1454 +#: library/argparse.rst:1608 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1836,17 +2028,17 @@ msgstr "" "argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " "traiter tout ce qui suit comme un argument positionnel ::" -#: library/argparse.rst:1462 +#: library/argparse.rst:1616 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: library/argparse.rst:1468 +#: library/argparse.rst:1622 msgid "Argument abbreviations (prefix matching)" msgstr "Arguments abrégés (par comparaison de leurs préfixes)" -#: library/argparse.rst:1470 +#: library/argparse.rst:1624 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " @@ -1857,20 +2049,20 @@ msgstr "" "autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " "corresponde à aucune autre option ::" -#: library/argparse.rst:1485 +#: library/argparse.rst:1639 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." msgstr "" "Une erreur est générée pour les arguments qui peuvent produire plus d'une " -"option. Ce comportement peut être désactivé en passant ``False`` à :ref:" -"`allow_abbrev`." +"option. Ce comportement peut être désactivé en passant ``False`` " +"à :ref:`allow_abbrev`." -#: library/argparse.rst:1491 +#: library/argparse.rst:1645 msgid "Beyond ``sys.argv``" msgstr "Au-delà de ``sys.argv``" -#: library/argparse.rst:1493 +#: library/argparse.rst:1647 #, fuzzy msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " @@ -1880,35 +2072,35 @@ msgid "" msgstr "" "Il est parfois désirable de demander à un objet ``ArgumentParser`` de faire " "l'analyse d'arguments autres que ceux de :data:`sys.argv`. On peut faire ce " -"traitement en passant une liste de chaînes à :meth:`~ArgumentParser." -"parse_args`. Cette approche est pratique pour faire des tests depuis " -"l'invite de commande ::" +"traitement en passant une liste de chaînes " +"à :meth:`~ArgumentParser.parse_args`. Cette approche est pratique pour faire " +"des tests depuis l'invite de commande ::" -#: library/argparse.rst:1513 +#: library/argparse.rst:1667 msgid "The Namespace object" msgstr "L'objet ``Namespace``" -#: library/argparse.rst:1517 +#: library/argparse.rst:1671 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -"Classe rudimentaire utilisée par défaut par :meth:`~ArgumentParser." -"parse_args` pour créer un objet qui stocke les attributs. Cet objet est " -"renvoyé par ``ArgumentParser.parse_args``." +"Classe rudimentaire utilisée par défaut " +"par :meth:`~ArgumentParser.parse_args` pour créer un objet qui stocke les " +"attributs. Cet objet est renvoyé par ``ArgumentParser.parse_args``." -#: library/argparse.rst:1520 +#: library/argparse.rst:1674 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " "attributes, you can use the standard Python idiom, :func:`vars`::" msgstr "" -"Cette classe est délibérément rudimentaire : une sous-classe d':class:" -"`object` avec une représentation textuelle intelligible. Si vous préférez " -"une vue *dict-compatible*, vous devez utiliser :func:`vars` (un idiome " -"Python classique) ::" +"Cette classe est délibérément rudimentaire : une sous-classe " +"d':class:`object` avec une représentation textuelle intelligible. Si vous " +"préférez une vue *dict-compatible*, vous devez utiliser :func:`vars` (un " +"idiome Python classique) ::" -#: library/argparse.rst:1530 +#: library/argparse.rst:1684 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " @@ -1919,28 +2111,30 @@ msgstr "" "création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " "l'argument nommé ``namespace=`` ::" -#: library/argparse.rst:1546 +#: library/argparse.rst:1700 msgid "Other utilities" msgstr "Autres outils" -#: library/argparse.rst:1549 -msgid "Sub-commands" +#: library/argparse.rst:1703 +#, fuzzy +msgid "Subcommands" msgstr "Sous commandes" -#: library/argparse.rst:1556 +#: library/argparse.rst:1710 #, fuzzy msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " "``svn update``, and ``svn commit``. Splitting up functionality this way can " "be a particularly good idea when a program performs several different " -"functions which require different kinds of command-line arguments. :class:" -"`ArgumentParser` supports the creation of such subcommands with the :meth:`!" -"add_subparsers` method. The :meth:`!add_subparsers` method is normally " -"called with no arguments and returns a special action object. This object " -"has a single method, :meth:`~_SubParsersAction.add_parser`, which takes a " -"command name and any :class:`!ArgumentParser` constructor arguments, and " -"returns an :class:`!ArgumentParser` object that can be modified as usual." +"functions which require different kinds of command-line " +"arguments. :class:`ArgumentParser` supports the creation of such subcommands " +"with the :meth:`!add_subparsers` method. The :meth:`!add_subparsers` method " +"is normally called with no arguments and returns a special action object. " +"This object has a single method, :meth:`~_SubParsersAction.add_parser`, " +"which takes a command name and any :class:`!ArgumentParser` constructor " +"arguments, and returns an :class:`!ArgumentParser` object that can be " +"modified as usual." msgstr "" "Certains programmes organisent leurs fonctionnalités grâce à des sous-" "commandes. Par exemple : le programme ``svn`` peut être invoqué comme ``svn " @@ -1948,18 +2142,19 @@ msgstr "" "fonctionnalités est judicieuse quand le programme effectue plusieurs " "fonctions différentes qui requièrent différents types de lignes de " "commandes. :class:`ArgumentParser` prend en charge la création de ce genre " -"de sous-commandes grâce à la méthode :meth:`add_subparsers`. La méthode :" -"meth:`add_subparsers` est généralement appelée sans argument et elle renvoie " -"un objet ``Action`` spécial. Cet objet possède une seule méthode, :meth:" -"`~_SubParsersAction..add_parser`, qui prend le nom d'une commande et " -"n'importe quels arguments du constructeur d':class:`ArgumentParser` ; elle " -"renvoie un objet :class:`ArgumentParser` qui peut être modifié normalement." - -#: library/argparse.rst:1568 +"de sous-commandes grâce à la méthode :meth:`add_subparsers`. La " +"méthode :meth:`add_subparsers` est généralement appelée sans argument et " +"elle renvoie un objet ``Action`` spécial. Cet objet possède une seule " +"méthode, :meth:`~_SubParsersAction..add_parser`, qui prend le nom d'une " +"commande et n'importe quels arguments du constructeur " +"d':class:`ArgumentParser` ; elle renvoie un objet :class:`ArgumentParser` " +"qui peut être modifié normalement." + +#: library/argparse.rst:1722 msgid "Description of parameters:" msgstr "Description des paramètres :" -#: library/argparse.rst:1570 +#: library/argparse.rst:1724 #, fuzzy msgid "" "*title* - title for the sub-parser group in help output; by default " @@ -1970,7 +2165,7 @@ msgstr "" "défaut : ``\"subcommands\"`` si ``description`` est fournie, sinon utilise " "la valeur de ``title`` de la section sur les arguments positionnels ;" -#: library/argparse.rst:1574 +#: library/argparse.rst:1728 #, fuzzy msgid "" "*description* - description for the sub-parser group in help output, by " @@ -1981,10 +2176,10 @@ msgstr "" # I think the English version is very misleading here. Even for subcommands, # ``prog`` is only a tiny prefix of the auto generater usage string. -#: library/argparse.rst:1577 +#: library/argparse.rst:1731 #, fuzzy msgid "" -"*prog* - usage information that will be displayed with sub-command help, by " +"*prog* - usage information that will be displayed with subcommand help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" @@ -1992,7 +2187,7 @@ msgstr "" "commandes ; par défaut : le nom du programme et les arguments positionnels " "qui arrivent avant l'argument de ce sous-analyseur ;" -#: library/argparse.rst:1581 +#: library/argparse.rst:1735 #, fuzzy msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " @@ -2002,7 +2197,7 @@ msgstr "" "analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " "``ArgumentParser``) ;" -#: library/argparse.rst:1584 +#: library/argparse.rst:1738 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" @@ -2010,15 +2205,16 @@ msgstr "" "action_ – action à entreprendre quand cet argument est reconnu sur la ligne " "de commande ;" -#: library/argparse.rst:1587 +#: library/argparse.rst:1741 +#, fuzzy msgid "" -"dest_ - name of the attribute under which sub-command name will be stored; " -"by default ``None`` and no value is stored" +"dest_ - name of the attribute under which subcommand name will be stored; by " +"default ``None`` and no value is stored" msgstr "" "dest_ – nom de l'attribut sous lequel la sous-commande est stockée ; par " "défaut : ``None`` et aucune valeur n'est stockée ;" -#: library/argparse.rst:1590 +#: library/argparse.rst:1744 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2026,13 +2222,13 @@ msgstr "" "required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " "``False`` (ajouté dans 3.7) ;" -#: library/argparse.rst:1593 +#: library/argparse.rst:1747 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" "help_ – message d'aide pour le groupe du sous-analyseur dans la sortie " "d'aide ; par défaut : ``None`` ;" -#: library/argparse.rst:1595 +#: library/argparse.rst:1749 #, fuzzy msgid "" "metavar_ - string presenting available subcommands in help; by default it is " @@ -2042,18 +2238,19 @@ msgstr "" "messages d'aide ; par défaut : ``None``, ce qui entraine la génération d'une " "chaîne suivant le format ``'{cmd1, cmd2, …}'``." -#: library/argparse.rst:1598 +#: library/argparse.rst:1752 msgid "Some example usage::" msgstr "Quelques exemples d'utilisation ::" -#: library/argparse.rst:1619 +#: library/argparse.rst:1773 +#, fuzzy msgid "" -"Note that the object returned by :meth:`parse_args` will only contain " -"attributes for the main parser and the subparser that was selected by the " -"command line (and not any other subparsers). So in the example above, when " -"the ``a`` command is specified, only the ``foo`` and ``bar`` attributes are " -"present, and when the ``b`` command is specified, only the ``foo`` and " -"``baz`` attributes are present." +"Note that the object returned by :meth:`~ArgumentParser.parse_args` will " +"only contain attributes for the main parser and the subparser that was " +"selected by the command line (and not any other subparsers). So in the " +"example above, when the ``a`` command is specified, only the ``foo`` and " +"``bar`` attributes are present, and when the ``b`` command is specified, " +"only the ``foo`` and ``baz`` attributes are present." msgstr "" "Prenez note que l'objet renvoyé par :meth:`parse_args` ne contient que les " "attributs reconnus par l'analyseur principal et le sous-analyseur " @@ -2063,7 +2260,7 @@ msgstr "" "présents alors que la commande ``b`` présente les attributs ``foo`` et " "``baz``." -#: library/argparse.rst:1626 +#: library/argparse.rst:1780 #, fuzzy msgid "" "Similarly, when a help message is requested from a subparser, only the help " @@ -2076,60 +2273,45 @@ msgstr "" "analyseurs, seul le message d'aide de cet analyseur est affiché. Le message " "d'aide n'inclut pas le message de l'analyseur parent ni celui des sous-" "analyseurs au même niveau. Il est toutefois possible de fournir un message " -"d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` d':meth:" -"`add_parser` tel qu'illustré ci-dessus." +"d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` " +"d':meth:`add_parser` tel qu'illustré ci-dessus." -#: library/argparse.rst:1662 +#: library/argparse.rst:1816 +#, fuzzy msgid "" -"The :meth:`add_subparsers` method also supports ``title`` and " -"``description`` keyword arguments. When either is present, the subparser's " -"commands will appear in their own group in the help output. For example::" +"The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " +"and ``description`` keyword arguments. When either is present, the " +"subparser's commands will appear in their own group in the help output. For " +"example::" msgstr "" "La méthode :meth:`add_subparsers` accepte les arguments nommés ``title`` et " "``description``. Quand au moins l'un des deux est présent, les commandes du " "sous-analyseur sont affichées dans leur propre groupe dans la sortie d'aide. " "Par exemple ::" -#: library/argparse.rst:1683 -#, fuzzy -msgid "" -"Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional " -"*aliases* argument, which allows multiple strings to refer to the same " -"subparser. This example, like ``svn``, aliases ``co`` as a shorthand for " -"``checkout``::" -msgstr "" -"De plus, ``add_parser`` accepte l'argument additionnel ``aliases`` qui " -"permet à plusieurs chaînes de faire référence au même sous-analyseur. " -"L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " -"abréviation de ``checkout`` ::" - -#: library/argparse.rst:1695 -msgid "" -":meth:`~_SubParsersAction.add_parser` supports also an additional " -"*deprecated* argument, which allows to deprecate the subparser." -msgstr "" - -#: library/argparse.rst:1709 +#: library/argparse.rst:1837 #, fuzzy msgid "" "One particularly effective way of handling subcommands is to combine the use " -"of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` so " -"that each subparser knows which Python function it should execute. For " -"example::" +"of the :meth:`~ArgumentParser.add_subparsers` method with calls " +"to :meth:`~ArgumentParser.set_defaults` so that each subparser knows which " +"Python function it should execute. For example::" msgstr "" "Une façon efficace de traiter les sous-commandes est de combiner " -"l'utilisation de la méthode :meth:`add_subparsers` avec des appels à :meth:" -"`set_defaults` pour que chaque sous-analyseur sache quelle fonction Python " -"doit être exécutée. Par exemple ::" +"l'utilisation de la méthode :meth:`add_subparsers` avec des appels " +"à :meth:`set_defaults` pour que chaque sous-analyseur sache quelle fonction " +"Python doit être exécutée. Par exemple ::" -#: library/argparse.rst:1746 +#: library/argparse.rst:1874 +#, fuzzy msgid "" -"This way, you can let :meth:`parse_args` do the job of calling the " -"appropriate function after argument parsing is complete. Associating " -"functions with actions like this is typically the easiest way to handle the " -"different actions for each of your subparsers. However, if it is necessary " -"to check the name of the subparser that was invoked, the ``dest`` keyword " -"argument to the :meth:`add_subparsers` call will work::" +"This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " +"calling the appropriate function after argument parsing is complete. " +"Associating functions with actions like this is typically the easiest way to " +"handle the different actions for each of your subparsers. However, if it is " +"necessary to check the name of the subparser that was invoked, the ``dest`` " +"keyword argument to the :meth:`~ArgumentParser.add_subparsers` call will " +"work::" msgstr "" "Ainsi, vous pouvez laisser à :meth:`parse_args` la responsabilité de faire " "appel à la bonne fonction après avoir analysé les arguments. Associer " @@ -2138,51 +2320,111 @@ msgstr "" "avez besoin de consulter le nom du sous-analyseur qui a été invoqué, vous " "pouvez utiliser l'argument nommé ``dest`` d':meth:`add_subparsers` ::" -#: library/argparse.rst:1762 +#: library/argparse.rst:1890 #, fuzzy msgid "New *required* keyword-only parameter." msgstr "Introduction des arguments nommés obligatoires." -#: library/argparse.rst:1767 +#: library/argparse.rst:1893 +msgid "" +"Subparser's *prog* is no longer affected by a custom usage message in the " +"main parser." +msgstr "" + +#: library/argparse.rst:1901 +#, fuzzy +msgid "" +"Create and return a new :class:`ArgumentParser` object for the subcommand " +"*name*." +msgstr "``parser`` – L'objet ``ArgumentParser`` qui contient cette action ;" + +#: library/argparse.rst:1904 +msgid "The *name* argument is the name of the sub-command." +msgstr "" + +#: library/argparse.rst:1906 +msgid "The *help* argument provides a short description for this sub-command." +msgstr "" + +#: library/argparse.rst:1908 +msgid "" +"The *aliases* argument allows providing alternative names for this sub-" +"command. For example::" +msgstr "" + +#: library/argparse.rst:1918 +msgid "" +"The *deprecated* argument, if ``True``, marks the sub-command as deprecated " +"and will issue a warning when used. For example::" +msgstr "" + +#: library/argparse.rst:1928 +msgid "" +"All other keyword arguments are passed directly to the :class:`!" +"ArgumentParser` constructor." +msgstr "" + +#: library/argparse.rst:1931 +#, fuzzy +msgid "Added the *deprecated* parameter." +msgstr "Les arguments nommés ``encodings`` et ``errors``." + +#: library/argparse.rst:1936 msgid "FileType objects" msgstr "Objets ``FileType``" -#: library/argparse.rst:1771 +#: library/argparse.rst:1940 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " -"argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" -"`FileType` objects as their type will open command-line arguments as files " -"with the requested modes, buffer sizes, encodings and error handling (see " -"the :func:`open` function for more details)::" +"argument of :meth:`ArgumentParser.add_argument`. Arguments that " +"have :class:`FileType` objects as their type will open command-line " +"arguments as files with the requested modes, buffer sizes, encodings and " +"error handling (see the :func:`open` function for more details)::" msgstr "" "Le type fabrique :class:`FileType` crée des objets qui peuvent être passés à " "l'argument ``type`` d':meth:`ArgumentParser.add_argument`. Les arguments qui " "ont comme ``type`` un objet :class:`FileType` ouvrent les arguments de la " "ligne de commande en tant que fichiers avec les options spécifiées : mode, " -"taille du tampon, encodage et gestion des erreurs (voir la fonction :func:" -"`open` pour plus de détails) ::" +"taille du tampon, encodage et gestion des erreurs (voir la " +"fonction :func:`open` pour plus de détails) ::" -#: library/argparse.rst:1783 +#: library/argparse.rst:1952 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" "Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et le " -"convertissent automatiquement vers :data:`sys.stdin` pour les objets :class:" -"`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour les objets :" -"class:`FileType` ouverts en écriture ::" +"convertissent automatiquement vers :data:`sys.stdin` pour les " +"objets :class:`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour " +"les objets :class:`FileType` ouverts en écriture ::" -#: library/argparse.rst:1792 +#: library/argparse.rst:1963 #, fuzzy -msgid "Added the *encodings* and *errors* parameters." +msgid "" +"If one argument uses *FileType* and then a subsequent argument fails, an " +"error is reported but the file is not automatically closed. This can also " +"clobber the output files. In this case, it would be better to wait until " +"after the parser has run and then use the :keyword:`with`-statement to " +"manage the files." +msgstr "" +"Même la classe :class:`~argparse.FileType` a ses limitations quand elle est " +"utilisée pour l'argument nommé ``type``. Si un argument utilise *FileType* " +"et qu'un argument ultérieur échoue, une erreur est annoncée mais le fichier " +"n'est pas automatiquement fermé. Dans ce cas, il serait mieux d'attendre la " +"fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " +"bloc :keyword:`with`." + +#: library/argparse.rst:1969 +#, fuzzy +msgid "Added the *encoding* and *errors* parameters." msgstr "Les arguments nommés ``encodings`` et ``errors``." -#: library/argparse.rst:1797 +#: library/argparse.rst:1976 msgid "Argument groups" msgstr "Groupes d'arguments" -#: library/argparse.rst:1802 +#: library/argparse.rst:1981 #, fuzzy msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " @@ -2194,38 +2436,39 @@ msgstr "" "Par défaut, :class:`ArgumentParser` regroupe les arguments de la ligne de " "commande entre « arguments positionnels » et « arguments optionnels » dans " "l'affichage de l'aide. Lorsqu'un meilleur regroupement conceptuel est " -"possible, celui-ci peut être créé avec la méthode :meth:" -"`add_argument_group` ::" +"possible, celui-ci peut être créé avec la " +"méthode :meth:`add_argument_group` ::" -#: library/argparse.rst:1819 +#: library/argparse.rst:1998 #, fuzzy msgid "" "The :meth:`add_argument_group` method returns an argument group object which " -"has an :meth:`~ArgumentParser.add_argument` method just like a regular :" -"class:`ArgumentParser`. When an argument is added to the group, the parser " -"treats it just like a normal argument, but displays the argument in a " -"separate group for help messages. The :meth:`!add_argument_group` method " -"accepts *title* and *description* arguments which can be used to customize " -"this display::" +"has an :meth:`~ArgumentParser.add_argument` method just like a " +"regular :class:`ArgumentParser`. When an argument is added to the group, " +"the parser treats it just like a normal argument, but displays the argument " +"in a separate group for help messages. The :meth:`!add_argument_group` " +"method accepts *title* and *description* arguments which can be used to " +"customize this display::" msgstr "" "La méthode :meth:`add_argument_group` renvoie un objet représentant le " -"groupe d'arguments. Cet objet possède une méthode :meth:`~ArgumentParser." -"add_argument` semblable à celle d':class:`ArgumentParser`. Quand un argument " -"est ajouté au groupe, l'analyseur le traite comme un argument normal, mais " -"il affiche le nouvel argument dans un groupe séparé dans les messages " -"d'aide. Afin de personnaliser l'affichage, la méthode :meth:" -"`add_argument_group` accepte les arguments ``title`` et ``description`` ::" +"groupe d'arguments. Cet objet possède une " +"méthode :meth:`~ArgumentParser.add_argument` semblable à celle " +"d':class:`ArgumentParser`. Quand un argument est ajouté au groupe, " +"l'analyseur le traite comme un argument normal, mais il affiche le nouvel " +"argument dans un groupe séparé dans les messages d'aide. Afin de " +"personnaliser l'affichage, la méthode :meth:`add_argument_group` accepte les " +"arguments ``title`` et ``description`` ::" -#: library/argparse.rst:1845 +#: library/argparse.rst:2024 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " -"argument group. These parameters have the same meaning as in the :class:" -"`ArgumentParser` constructor, but apply specifically to the argument group " -"rather than the entire parser." +"argument group. These parameters have the same meaning as in " +"the :class:`ArgumentParser` constructor, but apply specifically to the " +"argument group rather than the entire parser." msgstr "" -#: library/argparse.rst:1850 +#: library/argparse.rst:2029 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." @@ -2234,23 +2477,33 @@ msgstr "" "affiché dans l'une des sections usuelles *positional arguments* et *optional " "arguments*." -#: library/argparse.rst:1853 +#: library/argparse.rst:2032 msgid "" -"Calling :meth:`add_argument_group` on an argument group is deprecated. This " -"feature was never supported and does not always work correctly. The function " -"exists on the API by accident through inheritance and will be removed in the " -"future." +"Within each argument group, arguments are displayed in help output in the " +"order in which they are added." +msgstr "" + +#: library/argparse.rst:2035 +#, fuzzy +msgid "" +"Calling :meth:`add_argument_group` on an argument group now raises an " +"exception. This nesting was never supported, often failed to work correctly, " +"and was unintentionally exposed through inheritance." msgstr "" "Appeler :meth:`add_argument_group` sur un groupe d'arguments est obsolète. " "Cet emploi n'a jamais été pris en charge et ne fonctionne pas dans tous les " "cas. La présence de cette fonction dans l'API est purement accidentelle et " "celle-ci disparaîtra." -#: library/argparse.rst:1861 +#: library/argparse.rst:2040 +msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." +msgstr "" + +#: library/argparse.rst:2046 msgid "Mutual exclusion" msgstr "Exclusion mutuelle" -#: library/argparse.rst:1865 +#: library/argparse.rst:2050 #, fuzzy msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " @@ -2261,7 +2514,7 @@ msgstr "" "qu'au plus un des arguments du groupe mutuellement exclusif est présent sur " "la ligne de commande ::" -#: library/argparse.rst:1881 +#: library/argparse.rst:2066 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " @@ -2271,79 +2524,84 @@ msgstr "" "``required`` pour indiquer qu'au moins un des arguments mutuellement " "exclusifs est nécessaire ::" -#: library/argparse.rst:1893 +#: library/argparse.rst:2078 #, fuzzy msgid "" "Note that currently mutually exclusive argument groups do not support the " -"*title* and *description* arguments of :meth:`~ArgumentParser." -"add_argument_group`. However, a mutually exclusive group can be added to an " -"argument group that has a title and description. For example::" +"*title* and *description* arguments " +"of :meth:`~ArgumentParser.add_argument_group`. However, a mutually exclusive " +"group can be added to an argument group that has a title and description. " +"For example::" msgstr "" "Prenez note que présentement les groupes d'arguments mutuellement exclusifs " -"n'acceptent pas les arguments ``title`` et ``description`` d':meth:" -"`~ArgumentParser.add_argument_group`." +"n'acceptent pas les arguments ``title`` et ``description`` " +"d':meth:`~ArgumentParser.add_argument_group`." -#: library/argparse.rst:1916 +#: library/argparse.rst:2101 +#, fuzzy msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " -"on a mutually exclusive group is deprecated. These features were never " -"supported and do not always work correctly. The functions exist on the API " -"by accident through inheritance and will be removed in the future." +"on a mutually exclusive group now raises an exception. This nesting was " +"never supported, often failed to work correctly, and was unintentionally " +"exposed through inheritance." msgstr "" "Appeler :meth:`add_argument_group` ou :meth:`add_mutually_exclusive_group` " "sur un groupe mutuellement exclusif est obsolète. Cet emploi n'a jamais été " "pris en charge et ne fonctionne pas dans tous les cas. La présence de cette " "fonction dans l'API est purement accidentelle et celle-ci disparaîtra." -#: library/argparse.rst:1924 +#: library/argparse.rst:2109 msgid "Parser defaults" msgstr "Valeurs par défaut de l'analyseur" -#: library/argparse.rst:1928 +#: library/argparse.rst:2113 msgid "" -"Most of the time, the attributes of the object returned by :meth:" -"`parse_args` will be fully determined by inspecting the command-line " -"arguments and the argument actions. :meth:`set_defaults` allows some " +"Most of the time, the attributes of the object returned " +"by :meth:`parse_args` will be fully determined by inspecting the command-" +"line arguments and the argument actions. :meth:`set_defaults` allows some " "additional attributes that are determined without any inspection of the " "command line to be added::" msgstr "" -"Dans la majorité des cas, les attributs de l'objet renvoyé par :meth:" -"`parse_args` sont entièrement définis par l'inspection des arguments de la " -"ligne de commande et par les actions des arguments. La méthode :meth:" -"`set_defaults` permet l'ajout d'attributs additionnels qui sont définis sans " -"nécessiter l'inspection de la ligne de commande ::" +"Dans la majorité des cas, les attributs de l'objet renvoyé " +"par :meth:`parse_args` sont entièrement définis par l'inspection des " +"arguments de la ligne de commande et par les actions des arguments. La " +"méthode :meth:`set_defaults` permet l'ajout d'attributs additionnels qui " +"sont définis sans nécessiter l'inspection de la ligne de commande ::" -#: library/argparse.rst:1940 +#: library/argparse.rst:2125 msgid "" -"Note that parser-level defaults always override argument-level defaults::" +"Note that defaults can be set at both the parser level " +"using :meth:`set_defaults` and at the argument level " +"using :meth:`add_argument`. If both are called for the same argument, the " +"last default set for an argument is used::" msgstr "" -"Prenez note que les valeurs par défaut au niveau de l'analyseur ont " -"précédence sur les valeurs par défaut au niveau de l'argument ::" -#: library/argparse.rst:1948 +#: library/argparse.rst:2135 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " "example of this type." msgstr "" "Les valeurs par défaut au niveau de l'analyseur sont particulièrement utiles " -"quand on travaille avec plusieurs analyseurs. Voir la méthode :meth:" -"`~ArgumentParser.add_subparsers` pour un exemple de cette utilisation." +"quand on travaille avec plusieurs analyseurs. Voir la " +"méthode :meth:`~ArgumentParser.add_subparsers` pour un exemple de cette " +"utilisation." -#: library/argparse.rst:1954 +#: library/argparse.rst:2141 msgid "" -"Get the default value for a namespace attribute, as set by either :meth:" -"`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" +"Get the default value for a namespace attribute, as set by " +"either :meth:`~ArgumentParser.add_argument` or " +"by :meth:`~ArgumentParser.set_defaults`::" msgstr "" "Renvoie la valeur par défaut d'un attribut de l'objet ``Namespace`` tel " -"qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou par :" -"meth:`~ArgumentParser.set_defaults` ::" +"qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou " +"par :meth:`~ArgumentParser.set_defaults` ::" -#: library/argparse.rst:1965 +#: library/argparse.rst:2152 msgid "Printing help" msgstr "Afficher l'aide" -#: library/argparse.rst:1967 +#: library/argparse.rst:2154 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " @@ -2353,17 +2611,17 @@ msgstr "" "charge du formatage et de l'affichage des messages d'erreur et " "d'utilisation. Plusieurs méthodes de formatage sont toutefois disponibles :" -#: library/argparse.rst:1973 +#: library/argparse.rst:2160 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " "assumed." msgstr "" -"Affiche une brève description sur la façon d'invoquer l':class:" -"`ArgumentParser` depuis la ligne de commande. Si ``file`` est ``None``, " -"utilise :data:`sys.stdout`." +"Affiche une brève description sur la façon d'invoquer " +"l':class:`ArgumentParser` depuis la ligne de commande. Si ``file`` est " +"``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:1979 +#: library/argparse.rst:2166 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " @@ -2373,7 +2631,7 @@ msgstr "" "l'information sur les arguments répertoriés dans l':class:`ArgumentParser`. " "Si ``file`` est ``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:1983 +#: library/argparse.rst:2170 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -2381,15 +2639,15 @@ msgstr "" "Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " "que de l'afficher :" -#: library/argparse.rst:1988 +#: library/argparse.rst:2175 msgid "" -"Return a string containing a brief description of how the :class:" -"`ArgumentParser` should be invoked on the command line." +"Return a string containing a brief description of how " +"the :class:`ArgumentParser` should be invoked on the command line." msgstr "" "Renvoie une chaîne contenant une brève description sur la façon d'invoquer " "l':class:`ArgumentParser` depuis la ligne de commande." -#: library/argparse.rst:1993 +#: library/argparse.rst:2180 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." @@ -2398,45 +2656,43 @@ msgstr "" "informations sur l'utilisation du programme et sur les arguments définis " "dans l':class:`ArgumentParser`." -#: library/argparse.rst:1998 +#: library/argparse.rst:2185 msgid "Partial parsing" msgstr "Analyse partielle" -#: library/argparse.rst:2002 +#: library/argparse.rst:2189 msgid "" -"Sometimes a script may only parse a few of the command-line arguments, " -"passing the remaining arguments on to another script or program. In these " -"cases, the :meth:`~ArgumentParser.parse_known_args` method can be useful. " -"It works much like :meth:`~ArgumentParser.parse_args` except that it does " -"not produce an error when extra arguments are present. Instead, it returns " -"a two item tuple containing the populated namespace and the list of " -"remaining argument strings." +"Sometimes a script only needs to handle a specific set of command-line " +"arguments, leaving any unrecognized arguments for another script or program. " +"In these cases, the :meth:`~ArgumentParser.parse_known_args` method can be " +"useful." msgstr "" -"Parfois, un script n'analyse que quelques-uns des arguments de la ligne de " -"commande avant de passer les arguments non-traités à un autre script ou " -"programme. La méthode :meth:`~ArgumentParser.parse_known_args` est utile " -"dans ces cas. Elle fonctionne similairement à :meth:`~ArgumentParser." -"parse_args`, mais elle ne lève pas d'erreur quand des arguments non-reconnus " -"sont présents. Au lieu, elle renvoie une paire de valeurs : l'objet " -"``Namespace`` rempli et la liste des arguments non-traités." -#: library/argparse.rst:2018 +#: library/argparse.rst:2194 msgid "" -":ref:`Prefix matching ` rules apply to :meth:" -"`~ArgumentParser.parse_known_args`. The parser may consume an option even if " -"it's just a prefix of one of its known options, instead of leaving it in the " -"remaining arguments list." +"This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " +"does not raise an error for extra, unrecognized arguments. Instead, it " +"parses the known arguments and returns a two item tuple that contains the " +"populated namespace and the list of any unrecognized arguments." +msgstr "" + +#: library/argparse.rst:2208 +msgid "" +":ref:`Prefix matching ` rules apply " +"to :meth:`~ArgumentParser.parse_known_args`. The parser may consume an " +"option even if it's just a prefix of one of its known options, instead of " +"leaving it in the remaining arguments list." msgstr "" "Les règles d':ref:`acceptation des abréviations ` sont " "applicables à :meth:`~ArgumentParser.parse_known_args`. L'analyseur peut " "ainsi capturer une option même si elle n'est que le préfixe d'une option " "reconnue plutôt que de la laisser dans la liste des arguments non-traités." -#: library/argparse.rst:2025 +#: library/argparse.rst:2215 msgid "Customizing file parsing" msgstr "Personnaliser le *parsing* de fichiers" -#: library/argparse.rst:2029 +#: library/argparse.rst:2219 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -2448,7 +2704,7 @@ msgstr "" "un traitement plus élaboré. Voir aussi l'argument nommé " "``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." -#: library/argparse.rst:2034 +#: library/argparse.rst:2224 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " @@ -2460,7 +2716,7 @@ msgstr "" "appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " "préservé." -#: library/argparse.rst:2038 +#: library/argparse.rst:2228 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" @@ -2469,11 +2725,11 @@ msgstr "" "par des espaces d'être traité comme un argument. L'exemple suivant illustre " "comment réaliser ceci ::" -#: library/argparse.rst:2047 +#: library/argparse.rst:2237 msgid "Exiting methods" msgstr "Méthodes d'interruptions" -#: library/argparse.rst:2051 +#: library/argparse.rst:2241 #, fuzzy msgid "" "This method terminates the program, exiting with the specified *status* and, " @@ -2485,21 +2741,21 @@ msgstr "" "est affichée avant la fin de l'exécution. Vous pouvez surcharger cette " "méthode pour traiter ces étapes différemment ::" -#: library/argparse.rst:2063 +#: library/argparse.rst:2253 #, fuzzy msgid "" -"This method prints a usage message, including the *message*, to :data:`sys." -"stderr` and terminates the program with a status code of 2." +"This method prints a usage message, including the *message*, " +"to :data:`sys.stderr` and terminates the program with a status code of 2." msgstr "" "Cette méthode affiche un message d'utilisation qui inclut la chaîne " "``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " "code de fin d'exécution 2." -#: library/argparse.rst:2068 +#: library/argparse.rst:2258 msgid "Intermixed parsing" msgstr "Analyse entremêlée" -#: library/argparse.rst:2073 +#: library/argparse.rst:2263 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -2507,11 +2763,12 @@ msgid "" "parsing style." msgstr "" "De nombreuses commandes Unix permettent à l'utilisateur d'entremêler les " -"arguments optionnels et les arguments positionnels. Les méthodes :meth:" -"`~ArgumentParser.parse_intermixed_args` et :meth:`~ArgumentParser." -"parse_known_intermixed_args` permettent ce style d'analyse." +"arguments optionnels et les arguments positionnels. Les " +"méthodes :meth:`~ArgumentParser.parse_intermixed_args` " +"et :meth:`~ArgumentParser.parse_known_intermixed_args` permettent ce style " +"d'analyse." -#: library/argparse.rst:2078 +#: library/argparse.rst:2268 #, fuzzy msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " @@ -2525,19 +2782,21 @@ msgstr "" "exclusifs qui contiennent à la fois des arguments optionnels et des " "arguments positionnels ne sont pas pris en charge." -#: library/argparse.rst:2083 +#: library/argparse.rst:2273 msgid "" -"The following example shows the difference between :meth:`~ArgumentParser." -"parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " -"former returns ``['2', '3']`` as unparsed arguments, while the latter " -"collects all the positionals into ``rest``. ::" +"The following example shows the difference " +"between :meth:`~ArgumentParser.parse_known_args` " +"and :meth:`~ArgumentParser.parse_intermixed_args`: the former returns " +"``['2', '3']`` as unparsed arguments, while the latter collects all the " +"positionals into ``rest``. ::" msgstr "" -"L'exemple suivant illustre la différence entre :meth:`~ArgumentParser." -"parse_known_args` et :meth:`~ArgumentParser.parse_intermixed_args` : le " -"premier renvoie ``['2', '3']`` comme arguments non-traités alors que le " -"second capture tous les arguments positionnels dans ``rest`` ::" +"L'exemple suivant illustre la différence " +"entre :meth:`~ArgumentParser.parse_known_args` " +"et :meth:`~ArgumentParser.parse_intermixed_args` : le premier renvoie " +"``['2', '3']`` comme arguments non-traités alors que le second capture tous " +"les arguments positionnels dans ``rest`` ::" -#: library/argparse.rst:2098 +#: library/argparse.rst:2288 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -2549,29 +2808,90 @@ msgstr "" "non-traités. :meth:`~ArgumentParser.parse_intermixed_args` lève une erreur " "s'il reste des chaînes d'arguments non-traités." -#: library/argparse.rst:2107 +#: library/argparse.rst:2297 +msgid "Registering custom types or actions" +msgstr "" + +#: library/argparse.rst:2301 +msgid "" +"Sometimes it's desirable to use a custom string in error messages to provide " +"more user-friendly output. In these cases, :meth:`!register` can be used to " +"register custom actions or types with a parser and allow you to reference " +"the type by their registered name instead of their callable name." +msgstr "" + +#: library/argparse.rst:2306 +msgid "" +"The :meth:`!register` method accepts three arguments - a *registry_name*, " +"specifying the internal registry where the object will be stored (e.g., " +"``action``, ``type``), *value*, which is the key under which the object will " +"be registered, and object, the callable to be registered." +msgstr "" + +#: library/argparse.rst:2311 +msgid "" +"The following example shows how to register a custom type with a parser::" +msgstr "" + +#: library/argparse.rst:2325 msgid "Exceptions" msgstr "Exceptions" -#: library/argparse.rst:2111 +#: library/argparse.rst:2329 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: library/argparse.rst:2113 +#: library/argparse.rst:2331 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: library/argparse.rst:2118 +#: library/argparse.rst:2336 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: library/argparse.rst:2122 +#: library/argparse.rst:2340 msgid "Guides and Tutorials" msgstr "Guides et tutoriels" +#, fuzzy +#~ msgid "" +#~ "Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional " +#~ "*aliases* argument, which allows multiple strings to refer to the same " +#~ "subparser. This example, like ``svn``, aliases ``co`` as a shorthand for " +#~ "``checkout``::" +#~ msgstr "" +#~ "De plus, ``add_parser`` accepte l'argument additionnel ``aliases`` qui " +#~ "permet à plusieurs chaînes de faire référence au même sous-analyseur. " +#~ "L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " +#~ "abréviation de ``checkout`` ::" + +#~ msgid "" +#~ "Note that parser-level defaults always override argument-level defaults::" +#~ msgstr "" +#~ "Prenez note que les valeurs par défaut au niveau de l'analyseur ont " +#~ "précédence sur les valeurs par défaut au niveau de l'argument ::" + +#~ msgid "" +#~ "Sometimes a script may only parse a few of the command-line arguments, " +#~ "passing the remaining arguments on to another script or program. In these " +#~ "cases, the :meth:`~ArgumentParser.parse_known_args` method can be " +#~ "useful. It works much like :meth:`~ArgumentParser.parse_args` except " +#~ "that it does not produce an error when extra arguments are present. " +#~ "Instead, it returns a two item tuple containing the populated namespace " +#~ "and the list of remaining argument strings." +#~ msgstr "" +#~ "Parfois, un script n'analyse que quelques-uns des arguments de la ligne " +#~ "de commande avant de passer les arguments non-traités à un autre script " +#~ "ou programme. La méthode :meth:`~ArgumentParser.parse_known_args` est " +#~ "utile dans ces cas. Elle fonctionne similairement " +#~ "à :meth:`~ArgumentParser.parse_args`, mais elle ne lève pas d'erreur " +#~ "quand des arguments non-reconnus sont présents. Au lieu, elle renvoie une " +#~ "paire de valeurs : l'objet ``Namespace`` rempli et la liste des arguments " +#~ "non-traités." + #, fuzzy #~ msgid "" #~ "*values* - The associated command-line arguments, with any type " @@ -2621,11 +2941,11 @@ msgstr "Guides et tutoriels" #~ msgstr "Limite le choix à certaines valeurs" #~ msgid "" -#~ "``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc." -#~ "Container` instance" +#~ "``['foo', 'bar']``, ``range(1, 10)``, " +#~ "or :class:`~collections.abc.Container` instance" #~ msgstr "" -#~ "``['foo', 'bar']``, ``range(1, 10)`` ou une instance de :class:" -#~ "`~collections.abc.Container`" +#~ "``['foo', 'bar']``, ``range(1, 10)`` ou une instance " +#~ "de :class:`~collections.abc.Container`" #~ msgid "const_" #~ msgstr "const_" @@ -2726,8 +3046,8 @@ msgstr "Guides et tutoriels" #~ msgstr "Créer un analyseur (*parser* en anglais)" #~ msgid "" -#~ "The first step in using the :mod:`argparse` is creating an :class:" -#~ "`ArgumentParser` object::" +#~ "The first step in using the :mod:`argparse` is creating " +#~ "an :class:`ArgumentParser` object::" #~ msgstr "" #~ "La première étape dans l'utilisation de :mod:`argparse` est de créer un " #~ "objet :class:`ArgumentParser` ::" @@ -2745,19 +3065,19 @@ msgstr "Guides et tutoriels" #~ msgid "" #~ "Filling an :class:`ArgumentParser` with information about program " -#~ "arguments is done by making calls to the :meth:`~ArgumentParser." -#~ "add_argument` method. Generally, these calls tell the :class:" -#~ "`ArgumentParser` how to take the strings on the command line and turn " -#~ "them into objects. This information is stored and used when :meth:" -#~ "`~ArgumentParser.parse_args` is called. For example::" +#~ "arguments is done by making calls to " +#~ "the :meth:`~ArgumentParser.add_argument` method. Generally, these calls " +#~ "tell the :class:`ArgumentParser` how to take the strings on the command " +#~ "line and turn them into objects. This information is stored and used " +#~ "when :meth:`~ArgumentParser.parse_args` is called. For example::" #~ msgstr "" #~ "Alimenter un :class:`ArgumentParser` avec des informations sur les " -#~ "arguments du programme s'effectue en faisant des appels à la méthode :" -#~ "meth:`~ArgumentParser.add_argument`. En général ces appels disent à l':" -#~ "class:`ArgumentParser` comment prendre les chaînes de caractères de la " -#~ "ligne de commande et les transformer en objets. Cette information est " -#~ "stockée et utilisée lorsque :meth:`~ArgumentParser.parse_args` est " -#~ "appelée. Par exemple ::" +#~ "arguments du programme s'effectue en faisant des appels à la " +#~ "méthode :meth:`~ArgumentParser.add_argument`. En général ces appels " +#~ "disent à l':class:`ArgumentParser` comment prendre les chaînes de " +#~ "caractères de la ligne de commande et les transformer en objets. Cette " +#~ "information est stockée et utilisée " +#~ "lorsque :meth:`~ArgumentParser.parse_args` est appelée. Par exemple ::" #~ msgid "" #~ "Later, calling :meth:`~ArgumentParser.parse_args` will return an object " @@ -2777,18 +3097,19 @@ msgstr "Guides et tutoriels" #~ msgstr "Analyse des arguments" #~ msgid "" -#~ ":class:`ArgumentParser` parses arguments through the :meth:" -#~ "`~ArgumentParser.parse_args` method. This will inspect the command line, " -#~ "convert each argument to the appropriate type and then invoke the " -#~ "appropriate action. In most cases, this means a simple :class:`Namespace` " -#~ "object will be built up from attributes parsed out of the command line::" +#~ ":class:`ArgumentParser` parses arguments through " +#~ "the :meth:`~ArgumentParser.parse_args` method. This will inspect the " +#~ "command line, convert each argument to the appropriate type and then " +#~ "invoke the appropriate action. In most cases, this means a " +#~ "simple :class:`Namespace` object will be built up from attributes parsed " +#~ "out of the command line::" #~ msgstr "" -#~ ":class:`ArgumentParser` analyse les arguments avec la méthode :meth:" -#~ "`~ArgumentParser.parse_args`. Cette méthode inspecte la ligne de " -#~ "commande, convertit chaque argument au type approprié et invoque l'action " -#~ "requise. Dans la plupart des cas, le résultat est la construction d'un " -#~ "objet :class:`Namespace` à partir des attributs analysés dans la ligne de " -#~ "commande ::" +#~ ":class:`ArgumentParser` analyse les arguments avec la " +#~ "méthode :meth:`~ArgumentParser.parse_args`. Cette méthode inspecte la " +#~ "ligne de commande, convertit chaque argument au type approprié et invoque " +#~ "l'action requise. Dans la plupart des cas, le résultat est la " +#~ "construction d'un objet :class:`Namespace` à partir des attributs " +#~ "analysés dans la ligne de commande ::" #~ msgid "" #~ "In a script, :meth:`~ArgumentParser.parse_args` will typically be called " @@ -2797,8 +3118,8 @@ msgstr "Guides et tutoriels" #~ msgstr "" #~ "Dans un script, :meth:`~ArgumentParser.parse_args` est généralement " #~ "appelée sans arguments et l'objet :class:`ArgumentParser` détermine " -#~ "automatiquement les arguments de la ligne de commande à partir de :data:" -#~ "`sys.argv`." +#~ "automatiquement les arguments de la ligne de commande à partir " +#~ "de :data:`sys.argv`." #~ msgid "" #~ "By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to " @@ -2873,8 +3194,8 @@ msgstr "Guides et tutoriels" #~ "difficilement être conservée." #~ msgid "" -#~ "The :mod:`argparse` module improves on the standard library :mod:" -#~ "`optparse` module in a number of ways including:" +#~ "The :mod:`argparse` module improves on the standard " +#~ "library :mod:`optparse` module in a number of ways including:" #~ msgstr "" #~ "Le module :mod:`argparse` fournit plusieurs améliorations par rapport au " #~ "module :mod:`optparse` de la bibliothèque standard :" @@ -2907,32 +3228,33 @@ msgstr "Guides et tutoriels" #~ msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" #~ msgid "" -#~ "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" -#~ "`ArgumentParser.add_argument` calls." +#~ "Replace all :meth:`optparse.OptionParser.add_option` calls " +#~ "with :meth:`ArgumentParser.add_argument` calls." #~ msgstr "" #~ "remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par " #~ "des appels à :meth:`ArgumentParser.add_argument` ;" #~ msgid "" -#~ "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." -#~ "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` " -#~ "calls for the positional arguments. Keep in mind that what was previously " -#~ "called ``options``, now in the :mod:`argparse` context is called ``args``." +#~ "Replace ``(options, args) = parser.parse_args()`` with ``args = " +#~ "parser.parse_args()`` and add " +#~ "additional :meth:`ArgumentParser.add_argument` calls for the positional " +#~ "arguments. Keep in mind that what was previously called ``options``, now " +#~ "in the :mod:`argparse` context is called ``args``." #~ msgstr "" -#~ "remplacer ``(options, args) = parser.parse_args()`` par ``args = parser." -#~ "parse_args()`` et ajouter des appels à :meth:`ArgumentParser." -#~ "add_argument` pour les arguments positionnels. Prenez note que les " -#~ "valeurs précédemment appelées ``options`` sont appelées ``args`` dans le " -#~ "contexte d':mod:`argparse` ;" +#~ "remplacer ``(options, args) = parser.parse_args()`` par ``args = " +#~ "parser.parse_args()`` et ajouter des appels " +#~ "à :meth:`ArgumentParser.add_argument` pour les arguments positionnels. " +#~ "Prenez note que les valeurs précédemment appelées ``options`` sont " +#~ "appelées ``args`` dans le contexte d':mod:`argparse` ;" #~ msgid "" -#~ "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" -#~ "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" -#~ "`~ArgumentParser.parse_args`." +#~ "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by " +#~ "using :meth:`~ArgumentParser.parse_intermixed_args` instead " +#~ "of :meth:`~ArgumentParser.parse_args`." #~ msgstr "" #~ "remplacer :meth:`optparse.OptionParser.disable_interspersed_args` en " -#~ "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" -#~ "`~ArgumentParser.parse_args` ;" +#~ "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt " +#~ "que :meth:`~ArgumentParser.parse_args` ;" #~ msgid "" #~ "Replace callback actions and the ``callback_*`` keyword arguments with " @@ -2951,13 +3273,13 @@ msgstr "Guides et tutoriels" #~ "``float``, ``complex``, etc) ;" #~ msgid "" -#~ "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:" -#~ "`optparse.OptionError` and :exc:`optparse.OptionValueError` with :exc:" -#~ "`ArgumentError`." +#~ "Replace :class:`optparse.Values` with :class:`Namespace` " +#~ "and :exc:`optparse.OptionError` and :exc:`optparse.OptionValueError` " +#~ "with :exc:`ArgumentError`." #~ msgstr "" -#~ "remplacer :class:`optparse.Values` par :class:`Namespace` ; et :exc:" -#~ "`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" -#~ "`ArgumentError` ;" +#~ "remplacer :class:`optparse.Values` par :class:`Namespace` ; " +#~ "et :exc:`optparse.OptionError` et :exc:`optparse.OptionValueError` " +#~ "par :exc:`ArgumentError` ;" #~ msgid "" #~ "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " diff --git a/library/array.po b/library/array.po index 920d2b49c..9fb7efe8e 100644 --- a/library/array.po +++ b/library/array.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-10-31 12:47+0100\n" "Last-Translator: Cléo Buck \n" "Language-Team: FRENCH \n" @@ -24,11 +24,11 @@ msgstr ":mod:`array` — Tableaux efficaces de valeurs numériques" #, fuzzy msgid "" "This module defines an object type which can compactly represent an array of " -"basic values: characters, integers, floating-point numbers. Arrays are " -"sequence types and behave very much like lists, except that the type of " -"objects stored in them is constrained. The type is specified at object " -"creation time by using a :dfn:`type code`, which is a single character. The " -"following type codes are defined:" +"basic values: characters, integers, floating-point numbers, complex " +"numbers. Arrays are mutable :term:`sequence` types and behave very much " +"like lists, except that the type of objects stored in them is constrained. " +"The type is specified at object creation time by using a :dfn:`type code`, " +"which is a single character. The following type codes are defined:" msgstr "" "Ce module définit un type d'objet qui permet de représenter de façon " "compacte un tableau (*array*) de valeurs élémentaires : caractères, entiers, " @@ -95,7 +95,7 @@ msgstr "" msgid "Unicode character" msgstr "Caractère Unicode" -#: library/array.rst:29 library/array.rst:33 library/array.rst:35 +#: library/array.rst:29 library/array.rst:33 library/array.rst:45 msgid "2" msgstr "2" @@ -111,10 +111,14 @@ msgstr "``'w'``" msgid "Py_UCS4" msgstr "" -#: library/array.rst:37 library/array.rst:45 +#: library/array.rst:37 library/array.rst:47 msgid "4" msgstr "4" +#: library/array.rst:27 +msgid "\\(2)" +msgstr "\\(2)" + #: library/array.rst:29 msgid "``'h'``" msgstr "``'h'``" @@ -171,7 +175,7 @@ msgstr "``'q'``" msgid "signed long long" msgstr "``signed long long``" -#: library/array.rst:43 library/array.rst:47 +#: library/array.rst:43 library/array.rst:51 msgid "8" msgstr "8" @@ -184,41 +188,112 @@ msgid "unsigned long long" msgstr "``unsigned long long``" #: library/array.rst:45 -msgid "``'f'``" -msgstr "``'f'``" +msgid "``'e'``" +msgstr "" -#: library/array.rst:47 +#: library/array.rst:45 +#, fuzzy +msgid "_Float16" +msgstr "*float*" + +#: library/array.rst:47 library/array.rst:49 msgid "float" msgstr "*float*" +#: library/array.rst:45 +msgid "\\(3)" +msgstr "" + #: library/array.rst:47 +msgid "``'f'``" +msgstr "``'f'``" + +#: library/array.rst:49 msgid "``'d'``" msgstr "``'d'``" -#: library/array.rst:47 +#: library/array.rst:49 msgid "double" msgstr "double" -#: library/array.rst:50 +#: library/array.rst:51 +#, fuzzy +msgid "``'Zf'``" +msgstr "``'f'``" + +#: library/array.rst:51 +msgid "float complex" +msgstr "" + +#: library/array.rst:53 +msgid "complex" +msgstr "" + +#: library/array.rst:53 +msgid "\\(4)" +msgstr "" + +#: library/array.rst:53 +#, fuzzy +msgid "``'Zd'``" +msgstr "``'d'``" + +#: library/array.rst:53 +#, fuzzy +msgid "double complex" +msgstr "double" + +#: library/array.rst:53 +#, fuzzy +msgid "16" +msgstr "1" + +#: library/array.rst:57 msgid "Notes:" msgstr "Notes :" -#: library/array.rst:53 +#: library/array.rst:60 msgid "It can be 16 bits or 32 bits depending on the platform." msgstr "" -#: library/array.rst:55 +#: library/array.rst:62 msgid "" "``array('u')`` now uses :c:type:`wchar_t` as C type instead of deprecated " "``Py_UNICODE``. This change doesn't affect its behavior because " "``Py_UNICODE`` is alias of :c:type:`wchar_t` since Python 3.3." msgstr "" -#: library/array.rst:60 +#: library/array.rst:67 msgid "Please migrate to ``'w'`` typecode." msgstr "" -#: library/array.rst:64 +#: library/array.rst:74 +msgid "" +"The IEEE 754 binary16 \"half precision\" type was introduced in the 2008 " +"revision of the `IEEE 754 standard `_. This type is not " +"widely supported by C compilers. It's available as :c:expr:`_Float16` type, " +"if the compiler supports the Annex H of the C23 standard." +msgstr "" + +#: library/array.rst:83 +msgid "" +"Complex types (``Zf`` and ``Zd``) are available unconditionally, regardless " +"on support for complex types (the Annex G of the C11 standard) by the C " +"compiler. As specified in the C11 standard, each complex type is represented " +"by a two-element C array containing, respectively, the real and imaginary " +"parts." +msgstr "" + +#: library/array.rst:93 +msgid "" +"The :ref:`ctypes ` and :ref:`struct ` modules, as well as third-party modules like `numpy `__, use similar -- but " +"slightly different -- type codes." +msgstr "" + +#: library/array.rst:99 #, fuzzy msgid "" "The actual representation of values is determined by the machine " @@ -229,33 +304,38 @@ msgstr "" "machine (à proprement parler, par l'implémentation C). La taille réelle est " "accessible via l'attribut :attr:`itemsize`." -#: library/array.rst:68 +#: library/array.rst:103 #, fuzzy msgid "The module defines the following item:" msgstr "Le module définit le type suivant :" -#: library/array.rst:73 -msgid "A string with all available type codes." +#: library/array.rst:108 +#, fuzzy +msgid "A tuple with all available type codes." msgstr "Une chaîne avec tous les codes de types disponibles." -#: library/array.rst:76 +#: library/array.rst:110 +msgid "The type changed from :class:`str` to :class:`tuple`." +msgstr "" + +#: library/array.rst:114 msgid "The module defines the following type:" msgstr "Le module définit le type suivant :" -#: library/array.rst:81 +#: library/array.rst:119 #, fuzzy msgid "" "A new array whose items are restricted by *typecode*, and initialized from " -"the optional *initializer* value, which must be a :class:`bytes` or :class:" -"`bytearray` object, a Unicode string, or iterable over elements of the " -"appropriate type." +"the optional *initializer* value, which must be a :class:`bytes` " +"or :class:`bytearray` object, a Unicode string, or iterable over elements of " +"the appropriate type." msgstr "" "Un nouveau tableau dont les éléments sont limités par *typecode*, et " "initialisés par la valeur optionnelle *initializer*, qui peut être une " "liste, un :term:`bytes-like object`, ou un itérable sur des éléments du type " "approprié." -#: library/array.rst:86 +#: library/array.rst:124 #, fuzzy msgid "" "If given a :class:`bytes` or :class:`bytearray` object, the initializer is " @@ -265,16 +345,18 @@ msgid "" "to add initial items to the array." msgstr "" "Si le paramètre *initializer* est une liste ou une chaîne de caractères, il " -"est passé à la méthode :meth:`fromlist`, :meth:`frombytes` ou :meth:" -"`fromunicode` du tableau (voir ci-dessous) pour ajouter les éléments " -"initiaux du tableau. Si c'est un itérable, il est passé à la méthode :meth:" -"`extend`." +"est passé à la méthode :meth:`fromlist`, :meth:`frombytes` " +"ou :meth:`fromunicode` du tableau (voir ci-dessous) pour ajouter les " +"éléments initiaux du tableau. Si c'est un itérable, il est passé à la " +"méthode :meth:`extend`." -#: library/array.rst:93 +#: library/array.rst:131 +#, fuzzy msgid "" -"Array objects support the ordinary sequence operations of indexing, slicing, " -"concatenation, and multiplication. When using slice assignment, the " -"assigned value must be an array object with the same type code; in all other " +"Array objects support the ordinary :ref:`mutable ` :term:`sequence` operations of indexing, slicing, concatenation, " +"and multiplication. When using slice assignment, the assigned value must be " +"an array object with the same type code; in all other " "cases, :exc:`TypeError` is raised. Array objects also implement the buffer " "interface, and may be used wherever :term:`bytes-like objects ` are supported." @@ -286,7 +368,11 @@ msgstr "" "tableau implémentent également l'interface tampon, et peuvent être utilisés " "partout où :term:`bytes-like objects ` sont supportés." -#: library/array.rst:99 +#: library/array.rst:137 +msgid "Arrays are :ref:`generic ` over the type of their contents." +msgstr "" + +#: library/array.rst:139 msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." @@ -294,22 +380,23 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``array.__new__`` avec les " "arguments ``typecode``, ``initializer``." -#: library/array.rst:104 +#: library/array.rst:144 msgid "The typecode character used to create the array." msgstr "" "Le code (de type Python caractère) utilisé pour spécifier le type des " "éléments du tableau." -#: library/array.rst:109 +#: library/array.rst:149 msgid "The length in bytes of one array item in the internal representation." msgstr "" "La longueur en octets d'un élément du tableau dans la représentation interne." -#: library/array.rst:114 -msgid "Append a new item with value *x* to the end of the array." +#: library/array.rst:154 +#, fuzzy +msgid "Append a new item with the specified value to the end of the array." msgstr "Ajoute un nouvel élément avec la valeur *x* à la fin du tableau." -#: library/array.rst:119 +#: library/array.rst:159 #, fuzzy msgid "" "Return a tuple ``(address, length)`` giving the current memory address and " @@ -331,7 +418,7 @@ msgstr "" "tant que le tableau existe et qu'aucune opération qui modifie sa taille ne " "lui est appliquée." -#: library/array.rst:129 +#: library/array.rst:169 msgid "" "When using array objects from code written in C or C++ (the only way to " "effectively make use of this information), it makes more sense to use the " @@ -346,28 +433,34 @@ msgstr "" "devrait être évitée dans un nouveau code. L'interface tampon est documentée " "dans :ref:`bufferobjects`." -#: library/array.rst:138 +#: library/array.rst:178 +#, fuzzy msgid "" "\"Byteswap\" all items of the array. This is only supported for values " -"which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:" -"`RuntimeError` is raised. It is useful when reading data from a file " -"written on a machine with a different byte order." +"which are 1, 2, 4, 8 or 16 bytes in size; for other types of " +"values, :exc:`RuntimeError` is raised. It is useful when reading data from " +"a file written on a machine with a different byte order. Note, that for " +"complex types the order of components (the real part, followed by imaginary " +"part) is preserved." msgstr "" "Boutisme de tous les éléments du tableau. Ceci n'est pris en charge que pour " -"les valeurs de 1, 2, 4 ou 8 octets ; pour les autres types de valeur, :exc:" -"`RuntimeError` est levée. Il est utile lors de la lecture de données à " -"partir d'un fichier écrit sur une machine avec un ordre d'octets différent." +"les valeurs de 1, 2, 4 ou 8 octets ; pour les autres types de " +"valeur, :exc:`RuntimeError` est levée. Il est utile lors de la lecture de " +"données à partir d'un fichier écrit sur une machine avec un ordre d'octets " +"différent." -#: library/array.rst:146 -msgid "Return the number of occurrences of *x* in the array." +#: library/array.rst:187 +#, fuzzy +msgid "Return the number of occurrences of *value* in the array." msgstr "Renvoi le nombre d'occurrences de *x* dans le tableau." -#: library/array.rst:151 +#: library/array.rst:192 msgid "" "Append items from *iterable* to the end of the array. If *iterable* is " -"another array, it must have *exactly* the same type code; if not, :exc:" -"`TypeError` will be raised. If *iterable* is not an array, it must be " -"iterable and its elements must be the right type to be appended to the array." +"another array, it must have *exactly* the same type code; if " +"not, :exc:`TypeError` will be raised. If *iterable* is not an array, it " +"must be iterable and its elements must be the right type to be appended to " +"the array." msgstr "" "Ajoute les éléments de *iterable* à la fin du tableau. Si *iterable* est un " "autre tableau, il doit le même code d'indication du type ; dans le cas " @@ -375,46 +468,47 @@ msgstr "" "il doit être itérable et ces éléments doivent être du bon type pour être " "ajoutés dans le tableau." -#: library/array.rst:159 +#: library/array.rst:200 #, fuzzy msgid "" "Appends items from the :term:`bytes-like object`, interpreting its content " -"as an array of machine values (as if it had been read from a file using the :" -"meth:`fromfile` method)." +"as an array of machine values (as if it had been read from a file using " +"the :meth:`fromfile` method)." msgstr "" "Ajoute des éléments de la chaîne, interprétant la chaîne comme un tableau de " "valeurs machine (comme si elle avait été lue depuis le fichier en utilisant " "la méthode :meth:`from file`)." -#: library/array.rst:163 +#: library/array.rst:204 #, fuzzy msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity." msgstr "" ":meth:`fromstring` est renommée en :meth:`frombytes` pour plus de lisibilité." -#: library/array.rst:169 +#: library/array.rst:210 #, fuzzy msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " -"append them to the end of the array. If less than *n* items are available, :" -"exc:`EOFError` is raised, but the items that were available are still " -"inserted into the array." +"append them to the end of the array. If less than *n* items are " +"available, :exc:`EOFError` is raised, but the items that were available are " +"still inserted into the array." msgstr "" "Lit *n* éléments (en tant que valeurs machine) du :term:`file object` *f* et " -"les ajouter à la fin du tableau. Si moins de *n* éléments sont disponibles, :" -"exc:`EOFError` est levée, mais les éléments qui étaient disponibles sont " -"tout de même insérés dans le tableau. *f* doit être un objet fichier natif ; " -"quelque chose d'autre avec une méthode :meth:`read` ne suffit pas." +"les ajouter à la fin du tableau. Si moins de *n* éléments sont " +"disponibles, :exc:`EOFError` est levée, mais les éléments qui étaient " +"disponibles sont tout de même insérés dans le tableau. *f* doit être un " +"objet fichier natif ; quelque chose d'autre avec une méthode :meth:`read` ne " +"suffit pas." -#: library/array.rst:177 +#: library/array.rst:218 msgid "" -"Append items from the list. This is equivalent to ``for x in list: a." -"append(x)`` except that if there is a type error, the array is unchanged." +"Append items from the list. This is equivalent to ``for x in list: " +"a.append(x)`` except that if there is a type error, the array is unchanged." msgstr "" -"Ajoute les éléments de la liste. C'est l'équivalent de ``for x in list: a." -"append(x)`` sauf que s'il y a une erreur de type, le tableau est inchangé." +"Ajoute les éléments de la liste. C'est l'équivalent de ``for x in list: " +"a.append(x)`` sauf que s'il y a une erreur de type, le tableau est inchangé." -#: library/array.rst:183 +#: library/array.rst:224 #, fuzzy msgid "" "Extends this array with data from the given Unicode string. The array must " @@ -427,28 +521,29 @@ msgstr "" "``array.frombytes(unicodestring.encode(enc))`` pour ajouter des données " "Unicode à un tableau d'un autre type." -#: library/array.rst:191 +#: library/array.rst:232 msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " -"of *x* in the array. The optional arguments *start* and *stop* can be " -"specified to search for *x* within a subsection of the array. Raise :exc:" -"`ValueError` if *x* is not found." +"of *value* in the array. The optional arguments *start* and *stop* can be " +"specified to search for *value* within a subsection of the array. " +"Raise :exc:`ValueError` if *value* is not found." msgstr "" -#: library/array.rst:196 +#: library/array.rst:237 msgid "Added optional *start* and *stop* parameters." msgstr "" -#: library/array.rst:202 +#: library/array.rst:243 +#, fuzzy msgid "" -"Insert a new item with value *x* in the array before position *i*. Negative " +"Insert a new item *value* in the array before position *index*. Negative " "values are treated as being relative to the end of the array." msgstr "" "Ajoute un nouvel élément avec la valeur *x* dans le tableau avant la " "position *i*. Les valeurs négatives sont traitées relativement à la fin du " "tableau." -#: library/array.rst:208 +#: library/array.rst:249 msgid "" "Removes the item with the index *i* from the array and returns it. The " "optional argument defaults to ``-1``, so that by default the last item is " @@ -458,20 +553,21 @@ msgstr "" "optionnel par défaut est à ``-1``, de sorte que par défaut le dernier " "élément est supprimé et renvoyé." -#: library/array.rst:215 -msgid "Remove the first occurrence of *x* from the array." +#: library/array.rst:256 +#, fuzzy +msgid "Remove the first occurrence of *value* from the array." msgstr "Supprime la première occurrence de *x* du tableau." -#: library/array.rst:220 +#: library/array.rst:261 #, fuzzy msgid "Remove all elements from the array." msgstr "Supprime la première occurrence de *x* du tableau." -#: library/array.rst:227 +#: library/array.rst:268 msgid "Reverse the order of the items in the array." msgstr "Inverse l'ordre des éléments du tableau." -#: library/array.rst:232 +#: library/array.rst:273 msgid "" "Convert the array to an array of machine values and return the bytes " "representation (the same sequence of bytes that would be written to a file " @@ -481,35 +577,36 @@ msgstr "" "représentation en octets (la même séquence d'octets qui serait écrite par la " "méthode :meth:`tofile`)." -#: library/array.rst:236 +#: library/array.rst:277 #, fuzzy msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity." msgstr "" ":meth:`tostring` est renommé en :meth:`tobytes` pour plus de lisibilité." -#: library/array.rst:242 +#: library/array.rst:283 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "" "Écrit tous les éléments (en tant que valeurs machine) du :term:`file object` " "*f*." -#: library/array.rst:247 +#: library/array.rst:288 msgid "Convert the array to an ordinary list with the same items." msgstr "Convertit le tableau en une liste ordinaire avec les mêmes éléments." -#: library/array.rst:252 +#: library/array.rst:293 #, fuzzy msgid "" "Convert the array to a Unicode string. The array must have a type ``'u'`` " -"or ``'w'``; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." -"decode(enc)`` to obtain a Unicode string from an array of some other type." +"or ``'w'``; otherwise a :exc:`ValueError` is raised. Use " +"``array.tobytes().decode(enc)`` to obtain a Unicode string from an array of " +"some other type." msgstr "" "Convertit le tableau en une chaîne Unicode. Le tableau doit être un tableau " -"de type ``'u'`` ; sinon :exc:`ValueError` est levée. Utilisez ``array." -"tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un tableau de " -"tout autre type." +"de type ``'u'`` ; sinon :exc:`ValueError` est levée. Utilisez " +"``array.tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un " +"tableau de tout autre type." -#: library/array.rst:257 +#: library/array.rst:298 #, fuzzy msgid "" "The string representation of array objects has the form ``array(typecode, " @@ -526,23 +623,23 @@ msgstr "" "en tant que ``array(typecode, initializer)``. *initializer* est omis si le " "tableau est vide, sinon c'est une chaine si le *typecode* est ``'u'``, sinon " "c'est une liste de nombres. Il est garanti que la chaîne puisse être " -"convertie en un tableau avec le même type et la même valeur en utilisant :" -"func:`eval`, tant que la classe :class:`~array.array` a été importée en " -"utilisant ``from array import array``. Exemples ::" +"convertie en un tableau avec le même type et la même valeur en " +"utilisant :func:`eval`, tant que la classe :class:`~array.array` a été " +"importée en utilisant ``from array import array``. Exemples ::" -#: library/array.rst:277 +#: library/array.rst:318 msgid "Module :mod:`struct`" msgstr "Module :mod:`struct`" -#: library/array.rst:278 +#: library/array.rst:319 msgid "Packing and unpacking of heterogeneous binary data." msgstr "Empaquetage et dépaquetage de données binaires hétérogènes." -#: library/array.rst:280 +#: library/array.rst:321 msgid "`NumPy `_" msgstr "" -#: library/array.rst:281 +#: library/array.rst:322 msgid "The NumPy package defines another array type." msgstr "" @@ -592,8 +689,8 @@ msgstr "" #~ "plateforme, il peut être 16 bits ou 32 bits." #~ msgid "" -#~ "``'u'`` will be removed together with the rest of the :c:type:" -#~ "`Py_UNICODE` API." +#~ "``'u'`` will be removed together with the rest of " +#~ "the :c:type:`Py_UNICODE` API." #~ msgstr "``'u'`` sera supprimé avec le reste de l'API :c:type:`Py_UNICODE`." #~ msgid "Deprecated alias for :meth:`frombytes`." diff --git a/library/ast.po b/library/ast.po index 66a225090..e47a73d2b 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-09-15 23:54+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -17,16 +17,17 @@ msgstr "" #: library/ast.rst:2 #, fuzzy -msgid ":mod:`!ast` --- Abstract Syntax Trees" +msgid ":mod:`!ast` --- Abstract syntax trees" msgstr ":mod:`ast` — Arbres Syntaxiques Abstraits" -#: library/ast.rst:14 +#: library/ast.rst:11 msgid "**Source code:** :source:`Lib/ast.py`" msgstr "**Code source :** :source:`Lib/ast.py`" -#: library/ast.rst:18 +#: library/ast.rst:15 +#, fuzzy msgid "" -"The :mod:`ast` module helps Python applications to process trees of the " +"The :mod:`!ast` module helps Python applications to process trees of the " "Python abstract syntax grammar. The abstract syntax itself might change " "with each Python release; this module helps to find out programmatically " "what the current grammar looks like." @@ -37,49 +38,50 @@ msgstr "" "grammaire, qui est susceptible d'être modifiée par les nouvelles versions de " "Python." -#: library/ast.rst:23 +#: library/ast.rst:20 msgid "" -"An abstract syntax tree can be generated by passing :data:`ast." -"PyCF_ONLY_AST` as a flag to the :func:`compile` built-in function, or using " -"the :func:`parse` helper provided in this module. The result will be a tree " -"of objects whose classes all inherit from :class:`ast.AST`. An abstract " -"syntax tree can be compiled into a Python code object using the built-in :" -"func:`compile` function." +"An abstract syntax tree can be generated by " +"passing :data:`ast.PyCF_ONLY_AST` as a flag to the :func:`compile` built-in " +"function, or using the :func:`parse` helper provided in this module. The " +"result will be a tree of objects whose classes all inherit " +"from :class:`ast.AST`. An abstract syntax tree can be compiled into a " +"Python code object using the built-in :func:`compile` function." msgstr "" -"Un arbre syntaxique abstrait peut être généré en passant l'option :data:`ast." -"PyCF_ONLY_AST` à la fonction native :func:`compile`, ou à l'aide de la " -"fonction auxiliaire :func:`parse` fournie par ce module. Le résultat est un " -"arbre composé d'objets dont les classes héritent toutes de :class:`ast.AST`. " -"On peut compiler les arbres en code objet Python à l'aide de la fonction " -"native :func:`compile`." +"Un arbre syntaxique abstrait peut être généré en passant " +"l'option :data:`ast.PyCF_ONLY_AST` à la fonction native :func:`compile`, ou " +"à l'aide de la fonction auxiliaire :func:`parse` fournie par ce module. Le " +"résultat est un arbre composé d'objets dont les classes héritent toutes " +"de :class:`ast.AST`. On peut compiler les arbres en code objet Python à " +"l'aide de la fonction native :func:`compile`." -#: library/ast.rst:33 -msgid "Abstract Grammar" +#: library/ast.rst:30 +#, fuzzy +msgid "Abstract grammar" msgstr "Grammaire abstraite" -#: library/ast.rst:35 +#: library/ast.rst:32 msgid "The abstract grammar is currently defined as follows:" msgstr "La grammaire abstraite est actuellement définie comme suit :" -#: library/ast.rst:42 +#: library/ast.rst:41 msgid "Node classes" msgstr "Classes de nœuds" -#: library/ast.rst:46 +#: library/ast.rst:45 #, fuzzy msgid "" -"This is the base of all AST node classes. The actual node classes are " -"derived from the :file:`Parser/Python.asdl` file, which is reproduced :ref:" -"`above `. They are defined in the :mod:`!_ast` C module " -"and re-exported in :mod:`ast`." +"This is the abstract base of all AST node classes. The actual node classes " +"are derived from the :file:`Parser/Python.asdl` file, which is " +"reproduced :ref:`above `. They are defined in the :mod:`!" +"_ast` C module and re-exported in :mod:`!ast`." msgstr "" "C'est la classe de base de toute classe de nœuds des d'arbres syntaxiques " -"abstraits. Les classes de nœuds elle-mêmes sont dérivées du fichier :file:" -"`Parser/Python.asdl`, qui est reproduit :ref:`ci-dessous `. Elles sont définies dans le module C :mod:`_ast` et ré-exportées " -"dans le module :mod:`ast`." +"abstraits. Les classes de nœuds elle-mêmes sont dérivées du " +"fichier :file:`Parser/Python.asdl`, qui est reproduit :ref:`ci-dessous " +"`. Elles sont définies dans le module C :mod:`_ast` et ré-" +"exportées dans le module :mod:`ast`." -#: library/ast.rst:51 +#: library/ast.rst:50 msgid "" "There is one class defined for each left-hand side symbol in the abstract " "grammar (for example, :class:`ast.stmt` or :class:`ast.expr`). In addition, " @@ -93,12 +95,12 @@ msgstr "" "grammaire abstraite (par exemple :class:`ast.stmt` ou :class:`ast.expr`). En " "plus de cela, une classe est définie pour chacun des constructeurs présentés " "à droite ; ces classes héritent des classes situées à leur gauche dans " -"l'arbre. Par exemple, la classe :class:`ast.BinOp` hérite de la classe :" -"class:`ast.expr`. Pour les règles de réécriture avec alternatives (les " -"« sommes »), la classe de la partie gauche est abstraite : seules les " +"l'arbre. Par exemple, la classe :class:`ast.BinOp` hérite de la " +"classe :class:`ast.expr`. Pour les règles de réécriture avec alternatives " +"(les « sommes »), la classe de la partie gauche est abstraite : seules les " "classes de nœuds à droite sont instanciées." -#: library/ast.rst:64 +#: library/ast.rst:63 #, fuzzy msgid "" "Each concrete class has an attribute :attr:`!_fields` which gives the names " @@ -107,17 +109,18 @@ msgstr "" "Chaque classe concrète possède un attribut :attr:`_fields` donnant les noms " "de tous les nœuds enfants." -#: library/ast.rst:67 +#: library/ast.rst:66 msgid "" "Each instance of a concrete class has one attribute for each child node, of " "the type as defined in the grammar. For example, :class:`ast.BinOp` " "instances have an attribute :attr:`left` of type :class:`ast.expr`." msgstr "" "Chaque instance d'une classe concrète possède un attribut pour chaque nœud " -"enfant, du type défini par la grammaire. Par exemple, les instances :class:" -"`ast.BinOp` possèdent un attribut :attr:`left` de type :class:`ast.expr`." +"enfant, du type défini par la grammaire. Par exemple, les " +"instances :class:`ast.BinOp` possèdent un attribut :attr:`left` de " +"type :class:`ast.expr`." -#: library/ast.rst:71 +#: library/ast.rst:70 msgid "" "If these attributes are marked as optional in the grammar (using a question " "mark), the value might be ``None``. If the attributes can have zero-or-more " @@ -132,35 +135,36 @@ msgstr "" "être présents et avoir une valeur valide pour compiler un arbre syntaxique " "avec :func:`compile`." -#: library/ast.rst:79 +#: library/ast.rst:78 msgid "" "The :attr:`!_field_types` attribute on each concrete class is a dictionary " "mapping field names (as also listed in :attr:`_fields`) to their types." msgstr "" -#: library/ast.rst:94 +#: library/ast.rst:93 #, fuzzy msgid "" -"Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have :attr:" -"`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and :attr:`end_col_offset` " -"attributes. The :attr:`lineno` and :attr:`end_lineno` are the first and " -"last line numbers of source text span (1-indexed so the first line is line " -"1) and the :attr:`col_offset` and :attr:`end_col_offset` are the " -"corresponding UTF-8 byte offsets of the first and last tokens that generated " -"the node. The UTF-8 offset is recorded because the parser uses UTF-8 " -"internally." +"Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses " +"have :attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno`, " +"and :attr:`end_col_offset` attributes. The :attr:`lineno` " +"and :attr:`end_lineno` are the first and last line numbers of source text " +"span (1-indexed so the first line is line 1) and the :attr:`col_offset` " +"and :attr:`end_col_offset` are the corresponding UTF-8 byte offsets of the " +"first and last tokens that generated the node. The UTF-8 offset is recorded " +"because the parser uses UTF-8 internally." msgstr "" "Les instances des sous-classes de :class:`ast.expr` et :class:`ast.stmt` " -"possèdent les attributs :attr:`lineno`, :attr:`col_offset`, :attr:" -"`end_lineno` et :attr:`end_col_offset`. Les attributs :attr:`lineno` et :" -"attr:`end_lineno` sont les numéros de ligne de début et de fin dans le code " -"source (indexés à partir de 1, la première ligne est la ligne 1). Les " +"possèdent les " +"attributs :attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno` " +"et :attr:`end_col_offset`. Les attributs :attr:`lineno` " +"et :attr:`end_lineno` sont les numéros de ligne de début et de fin dans le " +"code source (indexés à partir de 1, la première ligne est la ligne 1). Les " "attributs :attr:`col_offset` et :attr:`end_col_offset` représentent quant à " "eux les décalages respectifs, en octets au format UTF-8, du premier et du " "dernier lexème qui ont généré le nœud. Les décalages sont exprimés en octets " "au format UTF-8 parce que l'analyseur syntaxique utilise l'UTF-8 en interne." -#: library/ast.rst:103 +#: library/ast.rst:102 msgid "" "Note that the end positions are not required by the compiler and are " "therefore optional. The end offset is *after* the last symbol, for example " @@ -172,22 +176,22 @@ msgstr "" "partie du code source ayant donné lieu à une expression avec " "``ligne_source[nœud.col_offset : nœud.end_col_offset]``." -#: library/ast.rst:108 +#: library/ast.rst:107 msgid "" "The constructor of a class :class:`ast.T` parses its arguments as follows:" msgstr "" "Le constructeur d'une classe nommée :class:`ast.T` analyse ses arguments " "comme suit :" -#: library/ast.rst:110 +#: library/ast.rst:109 msgid "" "If there are positional arguments, there must be as many as there are items " "in :attr:`T._fields`; they will be assigned as attributes of these names." msgstr "" -"S'il y a des arguments positionnels, il doit y avoir autant de termes dans :" -"attr:`T._fields` ; ils sont assignés comme attributs portant ces noms." +"S'il y a des arguments positionnels, il doit y avoir autant de termes " +"dans :attr:`T._fields` ; ils sont assignés comme attributs portant ces noms." -#: library/ast.rst:112 +#: library/ast.rst:111 msgid "" "If there are keyword arguments, they will set the attributes of the same " "names to the given values." @@ -195,7 +199,7 @@ msgstr "" "S'il y a des arguments nommés, ils définissent les attributs de mêmes noms " "avec les valeurs données." -#: library/ast.rst:115 +#: library/ast.rst:114 msgid "" "For example, to create and populate an :class:`ast.UnaryOp` node, you could " "use ::" @@ -203,42 +207,59 @@ msgstr "" "Par exemple, pour créer et peupler un nœud :class:`ast.UnaryOp`, on peut " "utiliser ::" -#: library/ast.rst:121 +#: library/ast.rst:120 msgid "" "If a field that is optional in the grammar is omitted from the constructor, " "it defaults to ``None``. If a list field is omitted, it defaults to the " "empty list. If a field of type :class:`!ast.expr_context` is omitted, it " -"defaults to :class:`Load() `. If any other field is omitted, a :" -"exc:`DeprecationWarning` is raised and the AST node will not have this " +"defaults to :class:`Load() `. If any other field is omitted, " +"a :exc:`DeprecationWarning` is raised and the AST node will not have this " "field. In Python 3.15, this condition will raise an error." msgstr "" -#: library/ast.rst:130 +#: library/ast.rst:129 msgid "Class :class:`ast.Constant` is now used for all constants." msgstr "" -"toutes les constantes sont désormais représentées par des instances de :" -"class:`ast.Constant`." +"toutes les constantes sont désormais représentées par des instances " +"de :class:`ast.Constant`." -#: library/ast.rst:134 +#: library/ast.rst:133 msgid "" "Simple indices are represented by their value, extended slices are " "represented as tuples." msgstr "" -#: library/ast.rst:139 -#, fuzzy +#: library/ast.rst:138 msgid "" -"Old classes :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`, :" -"class:`!ast.NameConstant` and :class:`!ast.Ellipsis` are still available, " -"but they will be removed in future Python releases. In the meantime, " -"instantiating them will return an instance of a different class." +"AST node constructors were changed to provide sensible defaults for omitted " +"fields: optional fields now default to ``None``, list fields default to an " +"empty list, and fields of type :class:`!ast.expr_context` default " +"to :class:`Load() `. Previously, omitted attributes would not " +"exist on constructed nodes (accessing them raised :exc:`AttributeError`)." msgstr "" -"les classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:" -"`ast.NameConstant` et :class:`ast.Ellipsis` sont toujours présentes, mais " -"seront supprimées dans une version future. Pour l'instant, leurs " -"constructeurs renvoient des instances de classes différentes." #: library/ast.rst:146 +msgid "" +"The :meth:`~object.__repr__` output of :class:`~ast.AST` nodes includes the " +"values of the node fields." +msgstr "" + +#: library/ast.rst:151 +#, fuzzy +msgid "" +"Previous versions of Python provided the AST classes :class:`!" +"ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`, :class:`!ast.NameConstant` " +"and :class:`!ast.Ellipsis`, which were deprecated in Python 3.8. These " +"classes were removed in Python 3.14, and their functionality has been " +"replaced with :class:`ast.Constant`." +msgstr "" +"les " +"classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:`ast.NameConstant` " +"et :class:`ast.Ellipsis` sont toujours présentes, mais seront supprimées " +"dans une version future. Pour l'instant, leurs constructeurs renvoient des " +"instances de classes différentes." + +#: library/ast.rst:159 #, fuzzy msgid "" "Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still " @@ -249,106 +270,124 @@ msgstr "" "l'avenir. Pour l'instant, elles sont toujours disponibles mais leurs " "constructeurs renvoient des instances de classes différentes." -#: library/ast.rst:153 +#: library/ast.rst:166 msgid "" "Previous versions of Python allowed the creation of AST nodes that were " "missing required fields. Similarly, AST node constructors allowed arbitrary " "keyword arguments that were set as attributes of the AST node, even if they " -"did not match any of the fields of the AST node. This behavior is deprecated " -"and will be removed in Python 3.15." +"did not match any of the fields of the AST node. These cases now raise " +"a :exc:`TypeError`." +msgstr "" + +#: library/ast.rst:173 +msgid "" +"In the :ref:`grammar above `, the AST node classes that " +"correspond to production rules with variants (aka \"sums\") are abstract " +"classes. Previous versions of Python allowed for the creation of direct " +"instances of these abstract node classes. This behavior is deprecated and " +"will be removed in Python 3.20." msgstr "" -#: library/ast.rst:160 +#: library/ast.rst:181 msgid "" "The descriptions of the specific node classes displayed here were initially " -"adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." +"adapted from the fantastic `Green Tree Snakes `__ project and all its " +"contributors." msgstr "" "Les descriptions individuelles des classes de nœuds dans la prochaine " "section sont au départ adaptées du merveilleux projet `Green Tree Snakes " "`_, porté par de nombreux " "contributeurs." -#: library/ast.rst:169 +#: library/ast.rst:190 msgid "Root nodes" msgstr "" -#: library/ast.rst:173 +#: library/ast.rst:194 msgid "" "A Python module, as with :ref:`file input `. Node type generated " "by :func:`ast.parse` in the default ``\"exec\"`` *mode*." msgstr "" -#: library/ast.rst:176 +#: library/ast.rst:197 msgid "``body`` is a :class:`list` of the module's :ref:`ast-statements`." msgstr "" -#: library/ast.rst:178 +#: library/ast.rst:199 msgid "" "``type_ignores`` is a :class:`list` of the module's type ignore comments; " "see :func:`ast.parse` for more details." msgstr "" -#: library/ast.rst:194 +#: library/ast.rst:215 msgid "" "A single Python :ref:`expression input `. Node type " "generated by :func:`ast.parse` when *mode* is ``\"eval\"``." msgstr "" -#: library/ast.rst:197 +#: library/ast.rst:218 msgid "" "``body`` is a single node, one of the :ref:`expression types `." msgstr "" -#: library/ast.rst:209 +#: library/ast.rst:230 msgid "" "A single :ref:`interactive input `, like in :ref:`tut-interac`. " "Node type generated by :func:`ast.parse` when *mode* is ``\"single\"``." msgstr "" -#: library/ast.rst:212 +#: library/ast.rst:233 msgid "``body`` is a :class:`list` of :ref:`statement nodes `." msgstr "" -#: library/ast.rst:231 +#: library/ast.rst:252 msgid "" "A representation of an old-style type comments for functions, as Python " "versions prior to 3.5 didn't support :pep:`484` annotations. Node type " "generated by :func:`ast.parse` when *mode* is ``\"func_type\"``." msgstr "" -#: library/ast.rst:235 +#: library/ast.rst:256 msgid "Such type comments would look like this::" msgstr "" -#: library/ast.rst:241 +#: library/ast.rst:262 msgid "" "``argtypes`` is a :class:`list` of :ref:`expression nodes `." msgstr "" -#: library/ast.rst:243 +#: library/ast.rst:264 msgid "``returns`` is a single :ref:`expression node `." msgstr "" -#: library/ast.rst:261 +#: library/ast.rst:281 msgid "Literals" msgstr "Littéraux" -#: library/ast.rst:265 +#: library/ast.rst:285 +#, fuzzy msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " "contains the Python object it represents. The values represented can be " -"simple types such as a number, string or ``None``, but also immutable " -"container types (tuples and frozensets) if all of their elements are " -"constant." +"instances " +"of :class:`str`, :class:`bytes`, :class:`int`, :class:`float`, :class:`complex`, " +"and :class:`bool`, and the constants :data:`None` and :data:`Ellipsis`." msgstr "" "Valeur constante, contenue dans le champ *value*. Les valeurs possibles sont " "celles de types simples comme les nombres, les chaînes de caractères, ou " "encore ``None``, mais aussi certains conteneurs immuables (*n*-uplets et " "ensembles figés) lorsque tous leurs éléments sont constants." -#: library/ast.rst:279 +#: library/ast.rst:290 +msgid "" +"The ``kind`` attribute is an optional string. For string literals with a " +"``u`` prefix, ``kind`` is set to ``'u'``. For all other constants, ``kind`` " +"is ``None``." +msgstr "" + +#: library/ast.rst:306 msgid "" "Node representing a single formatting field in an f-string. If the string " "contains a single formatting field and nothing else the node can be isolated " @@ -358,7 +397,7 @@ msgstr "" "peut être isolé si la chaîne contient un unique champ et rien d'autre. " "Sinon, il apparaît dans :class:`JoinedStr`." -#: library/ast.rst:283 +#: library/ast.rst:310 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." @@ -366,27 +405,30 @@ msgstr "" "*value* est un nœud d'expression quelconque (comme un littéral, une " "variable, ou encore un appel de fonction)." -#: library/ast.rst:285 +#: library/ast.rst:394 msgid "``conversion`` is an integer:" msgstr "*conversion* est un entier parmi les valeurs suivantes :" -#: library/ast.rst:287 +#: library/ast.rst:314 msgid "-1: no formatting" msgstr "-1, aucun formatage ;" -#: library/ast.rst:288 -msgid "115: ``!s`` string formatting" -msgstr "115, pour le formatage par ``str()`` correspondant à ``!s`` ;" +#: library/ast.rst:315 +#, fuzzy +msgid "97 (``ord('a')``): ``!a`` :func:`ASCII ` formatting" +msgstr "97, pour le formatage par ``ascii()`` correspondant à ``!a``." -#: library/ast.rst:289 -msgid "114: ``!r`` repr formatting" +#: library/ast.rst:316 +#, fuzzy +msgid "114 (``ord('r')``): ``!r`` :func:`repr` formatting" msgstr "114, pour le formatage par ``repr()`` correspondant à ``!r`` ;" -#: library/ast.rst:290 -msgid "97: ``!a`` ascii formatting" -msgstr "97, pour le formatage par ``ascii()`` correspondant à ``!a``." +#: library/ast.rst:317 +#, fuzzy +msgid "115 (``ord('s')``): ``!s`` :func:`string ` formatting" +msgstr "115, pour le formatage par ``str()`` correspondant à ``!s`` ;" -#: library/ast.rst:292 +#: library/ast.rst:319 msgid "" "``format_spec`` is a :class:`JoinedStr` node representing the formatting of " "the value, or ``None`` if no format was specified. Both ``conversion`` and " @@ -397,15 +439,82 @@ msgstr "" "*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " "fait coexister." -#: library/ast.rst:299 +#: library/ast.rst:326 +msgid "" +"An f-string, comprising a series of :class:`FormattedValue` " +"and :class:`Constant` nodes." +msgstr "" +"Chaîne littérale formatée (*f-string*), qui contient une liste de " +"nœuds :class:`FormattedValue` et :class:`Constant`." + +#: library/ast.rst:355 +msgid "" +"Node representing a template string literal, comprising a series " +"of :class:`Interpolation` and :class:`Constant` nodes. These nodes may be " +"any order, and do not need to be interleaved." +msgstr "" + +#: library/ast.rst:383 +msgid "" +"Node representing a single interpolation field in a template string literal." +msgstr "" + +#: library/ast.rst:385 +#, fuzzy msgid "" -"An f-string, comprising a series of :class:`FormattedValue` and :class:" -"`Constant` nodes." +"``value`` is any expression node (such as a literal, a variable, or a " +"function call). This has the same meaning as ``FormattedValue.value``." +msgstr "" +"*value* est un nœud d'expression quelconque (comme un littéral, une " +"variable, ou encore un appel de fonction)." + +#: library/ast.rst:388 +msgid "" +"``str`` is a constant containing the text of the interpolation expression." +msgstr "" + +#: library/ast.rst:390 +msgid "" +"If ``str`` is set to ``None``, then ``value`` is used to generate code when " +"calling :func:`ast.unparse`. This no longer guarantees that the generated " +"code is identical to the original and is intended for code generation." +msgstr "" + +#: library/ast.rst:396 +#, fuzzy +msgid "-1: no conversion" +msgstr "-1, aucun formatage ;" + +#: library/ast.rst:397 +msgid "97 (``ord('a')``): ``!a`` :func:`ASCII ` conversion" +msgstr "" + +#: library/ast.rst:398 +msgid "114 (``ord('r')``): ``!r`` :func:`repr` conversion" +msgstr "" + +#: library/ast.rst:399 +msgid "115 (``ord('s')``): ``!s`` :func:`string ` conversion" +msgstr "" + +#: library/ast.rst:401 +msgid "This has the same meaning as ``FormattedValue.conversion``." msgstr "" -"Chaîne littérale formatée (*f-string*), qui contient une liste de nœuds :" -"class:`FormattedValue` et :class:`Constant`." -#: library/ast.rst:327 +#: library/ast.rst:402 +#, fuzzy +msgid "" +"``format_spec`` is a :class:`JoinedStr` node representing the formatting of " +"the value, or ``None`` if no format was specified. Both ``conversion`` and " +"``format_spec`` can be set at the same time. This has the same meaning as " +"``FormattedValue.format_spec``." +msgstr "" +"*format_spec* est un nœud :class:`JoinedStr` qui précise la manière de " +"formater la valeur. Si aucun formatage particulier n'a été donné, " +"*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " +"fait coexister." + +#: library/ast.rst:411 msgid "" "A list or tuple. ``elts`` holds a list of nodes representing the elements. " "``ctx`` is :class:`Store` if the container is an assignment target (i.e. " @@ -416,11 +525,11 @@ msgstr "" "cible d'une affectation (par exemple ``(x, y) = quelque_chose``). Sinon, " "c'est une instance de :class:`Load`." -#: library/ast.rst:353 +#: library/ast.rst:435 msgid "A set. ``elts`` holds a list of nodes representing the set's elements." msgstr "Ensemble. *elts* est la liste de ses éléments." -#: library/ast.rst:368 +#: library/ast.rst:450 msgid "" "A dictionary. ``keys`` and ``values`` hold lists of nodes representing the " "keys and the values respectively, in matching order (what would be returned " @@ -432,7 +541,7 @@ msgstr "" "l'indice *i* de *values*. *keys* et *values* sont donc des équivalents à " "``dictionnaire.keys()`` et ``dictionnaire.values()``." -#: library/ast.rst:372 +#: library/ast.rst:454 msgid "" "When doing dictionary unpacking using dictionary literals the expression to " "be expanded goes in the ``values`` list, with a ``None`` at the " @@ -442,11 +551,11 @@ msgstr "" "déballer, elle est intégrée dans *values*, et ``None`` est mis à la place " "correspondante dans *keys*." -#: library/ast.rst:390 +#: library/ast.rst:472 msgid "Variables" msgstr "Variables" -#: library/ast.rst:394 +#: library/ast.rst:476 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." @@ -454,7 +563,7 @@ msgstr "" "Variable, dont le nom est *id* (une chaîne de caractères). *ctx* est de l'un " "des trois types :" -#: library/ast.rst:402 +#: library/ast.rst:484 msgid "" "Variable references can be used to load the value of a variable, to assign a " "new value to it, or to delete it. Variable references are given a context to " @@ -464,37 +573,37 @@ msgstr "" "utilisées pour lire la valeur, mettre la variable à une nouvelle valeur, ou " "supprimer la variable." -#: library/ast.rst:432 +#: library/ast.rst:514 msgid "" -"A ``*var`` variable reference. ``value`` holds the variable, typically a :" -"class:`Name` node. This type must be used when building a :class:`Call` node " -"with ``*args``." +"A ``*var`` variable reference. ``value`` holds the variable, typically " +"a :class:`Name` node. This type must be used when building a :class:`Call` " +"node with ``*args``." msgstr "" "Élément étoilé. *value* est le nœud auquel s'applique l'étoile. Le plus " "souvent, *value* est une instance de :class:`Name`. Ce type est notamment " "nécessaire pour les appels de fonction avec déballage d'arguments (par " "exemple ``fonction(*args)`` ; voir aussi :class:`Call`)." -#: library/ast.rst:456 +#: library/ast.rst:538 msgid "Expressions" msgstr "Expressions" -#: library/ast.rst:460 +#: library/ast.rst:542 msgid "" "When an expression, such as a function call, appears as a statement by " "itself with its return value not used or stored, it is wrapped in this " -"container. ``value`` holds one of the other nodes in this section, a :class:" -"`Constant`, a :class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:" -"`YieldFrom` node." +"container. ``value`` holds one of the other nodes in this section, " +"a :class:`Constant`, a :class:`Name`, a :class:`Lambda`, a :class:`Yield` " +"or :class:`YieldFrom` node." msgstr "" "Lorsque une expression, comme l'appel d'une fonction, apparaît comme une " "instruction à elle seule, sans que la valeur ne soit utilisée ou " "sauvegardée, l'expression est insérée dans ce conteneur. Le type de *value* " -"peut être l'un des autres nœuds décrits dans cette section, ou bien parmi :" -"class:`Constant`, :class:`Name`, :class:`Lambda`, :class:`Yield` et :class:" -"`YieldFrom`." +"peut être l'un des autres nœuds décrits dans cette section, ou bien " +"parmi :class:`Constant`, :class:`Name`, :class:`Lambda`, :class:`Yield` " +"et :class:`YieldFrom`." -#: library/ast.rst:478 +#: library/ast.rst:560 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." @@ -502,7 +611,7 @@ msgstr "" "Unité lexicale désignant une opération unaire. L'opérateur est *op*, " "l'opérande *operand* est un nœud d'expression quelconque." -#: library/ast.rst:487 +#: library/ast.rst:569 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." @@ -510,7 +619,7 @@ msgstr "" "Unités lexicales désignant des opérations unaires. :class:`Not` correspond " "au mot-clé ``not``, :class:`Invert` à l'opérateur ``~``." -#: library/ast.rst:501 +#: library/ast.rst:583 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." @@ -518,11 +627,11 @@ msgstr "" "Opération binaire (comme l'addition ou la division). L'opérateur est *op*, " "les opérandes *left* et *right* sont des nœuds d'expression quelconques." -#: library/ast.rst:528 +#: library/ast.rst:610 msgid "Binary operator tokens." msgstr "Unités lexicales pour les opérations binaires." -#: library/ast.rst:533 +#: library/ast.rst:615 msgid "" "A boolean operation, 'or' or 'and'. ``op`` is :class:`Or` or :class:`And`. " "``values`` are the values involved. Consecutive operations with the same " @@ -535,17 +644,17 @@ msgstr "" "même opérateur (comme ``a or b or c``) sont regroupées dans un nœud unique " "avec plusieurs éléments dans la liste *values*." -#: library/ast.rst:538 +#: library/ast.rst:620 msgid "This doesn't include ``not``, which is a :class:`UnaryOp`." msgstr "" -"L'opérateur ``not`` n'est pas implémenté ici, mais bien dans :class:" -"`UnaryOp`." +"L'opérateur ``not`` n'est pas implémenté ici, mais bien " +"dans :class:`UnaryOp`." -#: library/ast.rst:554 +#: library/ast.rst:636 msgid "Boolean operator tokens." msgstr "Unités lexicales pour les opérations booléennes." -#: library/ast.rst:559 +#: library/ast.rst:641 msgid "" "A comparison of two or more values. ``left`` is the first value in the " "comparison, ``ops`` the list of operators, and ``comparators`` the list of " @@ -555,35 +664,35 @@ msgstr "" "comparaison, *ops* la liste des opérateurs, et *comparators* la liste des " "éléments restants de la comparaison." -#: library/ast.rst:588 +#: library/ast.rst:670 msgid "Comparison operator tokens." msgstr "Unités lexicales pour les comparaisons." -#: library/ast.rst:593 +#: library/ast.rst:675 msgid "" -"A function call. ``func`` is the function, which will often be a :class:" -"`Name` or :class:`Attribute` object. Of the arguments:" +"A function call. ``func`` is the function, which will often be " +"a :class:`Name` or :class:`Attribute` object. Of the arguments:" msgstr "" "Appel d'une fonction. Le nœud *func*, représentant la fonction appelée, est " "habituellement de type :class:`Name` ou :class:`Attribute`. Les arguments " "sont contenus dans :" -#: library/ast.rst:596 +#: library/ast.rst:678 msgid "``args`` holds a list of the arguments passed by position." msgstr "" "*args*, la liste des arguments passés sans les nommer (arguments " "positionnels) ;" -#: library/ast.rst:597 +#: library/ast.rst:679 #, fuzzy msgid "" "``keywords`` holds a list of :class:`.keyword` objects representing " "arguments passed by keyword." msgstr "" -"*keywords*, la liste des arguments nommés sous forme de nœuds :class:" -"`keyword`." +"*keywords*, la liste des arguments nommés sous forme de " +"nœuds :class:`keyword`." -#: library/ast.rst:600 +#: library/ast.rst:682 #, fuzzy msgid "" "The ``args`` and ``keywords`` arguments are optional and default to empty " @@ -593,13 +702,13 @@ msgstr "" "obligatoires (mais peuvent être des listes vides). *starargs* (arguments " "étoilés) et *kwargs* (arguments nommés) sont facultatifs." -#: library/ast.rst:623 +#: library/ast.rst:704 msgid "" "A keyword argument to a function call or class definition. ``arg`` is a raw " "string of the parameter name, ``value`` is a node to pass in." msgstr "" -#: library/ast.rst:629 +#: library/ast.rst:710 msgid "" "An expression such as ``a if b else c``. Each field holds a single node, so " "in the following example, all three are :class:`Name` nodes." @@ -607,40 +716,41 @@ msgstr "" "Expression ternaire (``a if b else c``). Chaque champ contient un unique " "nœud. Dans l'exemple suivant, les trois sont de la classe :class:`Name`." -#: library/ast.rst:644 +#: library/ast.rst:725 msgid "" -"Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a :class:" -"`Name`. ``attr`` is a bare string giving the name of the attribute, and " -"``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how " -"the attribute is acted on." +"Attribute access, e.g. ``d.keys``. ``value`` is a node, typically " +"a :class:`Name`. ``attr`` is a bare string giving the name of the attribute, " +"and ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to " +"how the attribute is acted on." msgstr "" "Accès à un attribut (comme ``d.keys``). *value* est un nœud, souvent de la " "classe :class:`Name`. *attr* est le nom de l'attribut, sous forme de chaîne " -"de caractères. *ctx* est de classe :class:`Load`, :class:`Store` ou :class:" -"`Del` selon le type de l'action effectuée sur l'attribut." +"de caractères. *ctx* est de classe :class:`Load`, :class:`Store` " +"ou :class:`Del` selon le type de l'action effectuée sur l'attribut." -#: library/ast.rst:661 +#: library/ast.rst:741 msgid "" "A named expression. This AST node is produced by the assignment expressions " -"operator (also known as the walrus operator). As opposed to the :class:" -"`Assign` node in which the first argument can be multiple nodes, in this " -"case both ``target`` and ``value`` must be single nodes." +"operator (also known as the walrus operator). As opposed to " +"the :class:`Assign` node in which the first argument can be multiple nodes, " +"in this case both ``target`` and ``value`` must be single nodes." msgstr "" -"Expression d'affectation. Ces nœuds proviennent de l'opérateur « morse » ``:" -"=``. Contrairement à :class:`Assign`, dont le premier argument est une liste " -"qui peut contenir plusieurs cibles, les arguments *target* et *value* sont " -"ici des nœuds simples." +"Expression d'affectation. Ces nœuds proviennent de l'opérateur « morse » " +"``:=``. Contrairement à :class:`Assign`, dont le premier argument est une " +"liste qui peut contenir plusieurs cibles, les arguments *target* et *value* " +"sont ici des nœuds simples." -#: library/ast.rst:677 +#: library/ast.rst:757 msgid "Subscripting" msgstr "Indiçage" -#: library/ast.rst:681 +#: library/ast.rst:761 msgid "" "A subscript, such as ``l[1]``. ``value`` is the subscripted object (usually " -"sequence or mapping). ``slice`` is an index, slice or key. It can be a :" -"class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:" -"`Store` or :class:`Del` according to the action performed with the subscript." +"sequence or mapping). ``slice`` is an index, slice or key. It can be " +"a :class:`Tuple` and contain a :class:`Slice`. ``ctx`` " +"is :class:`Load`, :class:`Store` or :class:`Del` according to the action " +"performed with the subscript." msgstr "" "Accès à un indice, par exemple ``liste[1]``. *value* est l'objet où l'indice " "est pris, donc la plupart du temps une séquence ou une table associative. " @@ -649,7 +759,7 @@ msgstr "" "*ctx* est de type :class:`Load`, :class:`Store` ou :class:`Del` selon " "l'action appliquée à l'indice." -#: library/ast.rst:705 +#: library/ast.rst:783 msgid "" "Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can " "occur only inside the *slice* field of :class:`Subscript`, either directly " @@ -657,14 +767,14 @@ msgid "" msgstr "" "Tranches normales (de la forme ``début:fin`` ou ``début:fin:pas``). Les " "instances de cette classe ne peuvent apparaître que dans le champ *slice* " -"d'un :class:`Subscript`, que ce soit directement ou en tant qu'élément d'un :" -"class:`Tuple`." +"d'un :class:`Subscript`, que ce soit directement ou en tant qu'élément " +"d'un :class:`Tuple`." -#: library/ast.rst:722 +#: library/ast.rst:799 msgid "Comprehensions" msgstr "Compréhensions" -#: library/ast.rst:729 +#: library/ast.rst:806 msgid "" "List and set comprehensions, generator expressions, and dictionary " "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " @@ -675,11 +785,11 @@ msgstr "" "Il est remplacé par *key* (expression pour la clé) et *value* (expression " "pour la valeur) dans le cas des dictionnaires." -#: library/ast.rst:733 +#: library/ast.rst:810 msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "*generators* est une liste de nœuds :class:`comprehension`." -#: library/ast.rst:781 +#: library/ast.rst:858 msgid "" "One ``for`` clause in a comprehension. ``target`` is the reference to use " "for each element - typically a :class:`Name` or :class:`Tuple` node. " @@ -692,7 +802,7 @@ msgstr "" "*ifs* contient les tests qui décident si l'élément doit être inséré. C'est " "une liste, car chaque ``for`` peut être suivi de plusieurs ``if``." -#: library/ast.rst:786 +#: library/ast.rst:863 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." @@ -701,11 +811,11 @@ msgstr "" "si la compréhension est asynchrone, c'est-à-dire qu'elle a été écrite avec " "``async for`` au lieu de ``for``." -#: library/ast.rst:851 +#: library/ast.rst:928 msgid "Statements" msgstr "Instructions" -#: library/ast.rst:855 +#: library/ast.rst:932 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." @@ -713,7 +823,7 @@ msgstr "" "Affectation. *targets* est une liste de nœuds, *value* est simplement un " "nœud." -#: library/ast.rst:857 +#: library/ast.rst:934 msgid "" "Multiple nodes in ``targets`` represents assigning the same value to each. " "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " @@ -724,40 +834,40 @@ msgstr "" "représenté par des nœuds :class:`Tuple` ou :class:`List` comme éléments de " "*targets*." -#: library/ast.rst:1158 library/ast.rst:1881 +#: library/ast.rst:1238 library/ast.rst:1989 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" "Le champ facultatif *type_comment* contient une annotation de type fournie " "par un commentaire, et ce sous la forme d'une chaîne de caractères." -#: library/ast.rst:891 +#: library/ast.rst:968 #, fuzzy msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " "a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. " -"``annotation`` is the annotation, such as a :class:`Constant` or :class:" -"`Name` node. ``value`` is a single optional node." +"``annotation`` is the annotation, such as a :class:`Constant` " +"or :class:`Name` node. ``value`` is a single optional node." msgstr "" "Affectation accompagnée d'une annotation de type. La cible *target* est un " "nœud de type :class:`Name`, :class:`Attribute` ou :class:`Subscript`. " -"*annotation* est le contenu de l'annotation, par exemple un nœud :class:" -"`Constant` ou :class:`Name`. Le champ *value* est facultatif et peut " -"contenir un nœud, la valeur affectée à la cible. *simple* est une valeur " -"booléenne sous forme d'entier, 0 ou 1, qui vaut 1 si et seulement si " +"*annotation* est le contenu de l'annotation, par exemple un " +"nœud :class:`Constant` ou :class:`Name`. Le champ *value* est facultatif et " +"peut contenir un nœud, la valeur affectée à la cible. *simple* est une " +"valeur booléenne sous forme d'entier, 0 ou 1, qui vaut 1 si et seulement si " "*target* est de type :class:`Name` et provient d'un nom sans parenthèses, " "donc un nom simple plutôt qu'une expression." -#: library/ast.rst:896 +#: library/ast.rst:973 msgid "" "``simple`` is always either 0 (indicating a \"complex\" target) or 1 " -"(indicating a \"simple\" target). A \"simple\" target consists solely of a :" -"class:`Name` node that does not appear between parentheses; all other " -"targets are considered complex. Only simple targets appear in the :attr:" -"`~object.__annotations__` dictionary of modules and classes." +"(indicating a \"simple\" target). A \"simple\" target consists solely of " +"a :class:`Name` node that does not appear between parentheses; all other " +"targets are considered complex. Only simple targets appear in " +"the :attr:`~object.__annotations__` dictionary of modules and classes." msgstr "" -#: library/ast.rst:946 +#: library/ast.rst:1023 msgid "" "Augmented assignment, such as ``a += 1``. In the following example, " "``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` " @@ -765,11 +875,11 @@ msgid "" "value for 1." msgstr "" "Affectation incrémentale, par exemple ``a += 1``. Dans l'exemple qui suit, " -"*target* est un nœud de type :class:`Name` avec le nom ``'x'`` (de contexte :" -"class:`Store`), *op* est une instance de :class:`Add`, et *value* est un " -"nœud :class:`Constant` contenant la valeur 1." +"*target* est un nœud de type :class:`Name` avec le nom ``'x'`` (de " +"contexte :class:`Store`), *op* est une instance de :class:`Add`, et *value* " +"est un nœud :class:`Constant` contenant la valeur 1." -#: library/ast.rst:951 +#: library/ast.rst:1028 #, fuzzy msgid "" "The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " @@ -778,7 +888,7 @@ msgstr "" "Contrairement aux cibles acceptées par :class:`Assign`, le champ *target* ne " "peut pas être ici de type :class:`Tuple` ou :class:`List`." -#: library/ast.rst:967 +#: library/ast.rst:1044 msgid "" "A ``raise`` statement. ``exc`` is the exception object to be raised, " "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " @@ -789,7 +899,7 @@ msgstr "" "cas d'un ``raise`` sans rien d'autre. Le champ facultatif *cause* correspond " "à la partie après le ``from`` dans ``raise ... from ...``." -#: library/ast.rst:983 +#: library/ast.rst:1060 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." @@ -797,28 +907,28 @@ msgstr "" "Assertion. *test* est la condition, par exemple un nœud :class:`Compare`. " "*msg* est le message d'erreur affiché si le test s'évalue comme faux." -#: library/ast.rst:998 +#: library/ast.rst:1075 msgid "" -"Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" -"class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." +"Represents a ``del`` statement. ``targets`` is a list of nodes, such " +"as :class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "" "Instruction ``del``. Les éléments à supprimer sont rassemblés dans la liste " -"*target*. Ce sont généralement des nœuds de type :class:`Name`, :class:" -"`Attribute` ou :class:`Subscript`." +"*target*. Ce sont généralement des nœuds de " +"type :class:`Name`, :class:`Attribute` ou :class:`Subscript`." -#: library/ast.rst:1015 +#: library/ast.rst:1092 msgid "A ``pass`` statement." msgstr "Instruction ``pass``." -#: library/ast.rst:1027 +#: library/ast.rst:1104 msgid "" "A :ref:`type alias ` created through the :keyword:`type` " -"statement. ``name`` is the name of the alias, ``type_params`` is a list of :" -"ref:`type parameters `, and ``value`` is the value of the " -"type alias." +"statement. ``name`` is the name of the alias, ``type_params`` is a list " +"of :ref:`type parameters `, and ``value`` is the value of " +"the type alias." msgstr "" -#: library/ast.rst:1043 +#: library/ast.rst:1120 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." @@ -827,17 +937,17 @@ msgstr "" "contextes spécifiques comme l'intérieur d'une fonction ou d'une boucle. " "Elles sont décrites dans d'autres sections de ce document." -#: library/ast.rst:1047 +#: library/ast.rst:1124 msgid "Imports" msgstr "Importations" -#: library/ast.rst:1051 +#: library/ast.rst:1128 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "" -"Instruction ``import``. *names* prend la forme d'une liste de nœuds :class:" -"`alias`." +"Instruction ``import``. *names* prend la forme d'une liste de " +"nœuds :class:`alias`." -#: library/ast.rst:1067 +#: library/ast.rst:1145 msgid "" "Represents ``from x import y``. ``module`` is a raw string of the 'from' " "name, without any leading dots, or ``None`` for statements such as ``from . " @@ -851,7 +961,7 @@ msgstr "" "import toto``, *module* vaut ``None``. *level* est le niveau d'importation " "relative sous forme d'entier (0 pour les importations absolues)." -#: library/ast.rst:1088 +#: library/ast.rst:1167 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." @@ -861,11 +971,11 @@ msgstr "" "as ...``. Dans les instructions sans ``as`` (où le module n'est pas " "renommé), *asname* vaut ``None``." -#: library/ast.rst:1104 +#: library/ast.rst:1184 msgid "Control flow" msgstr "Contrôle de l'exécution" -#: library/ast.rst:1107 +#: library/ast.rst:1187 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." @@ -876,17 +986,17 @@ msgstr "" # Il faut développer un peu plus que l'original car le lecteur ne # comprend pas forcément les termes « body » et « orelse ». La même # considération s'applique à bien des descriptions par la suite. -#: library/ast.rst:1112 +#: library/ast.rst:1192 msgid "" -"An ``if`` statement. ``test`` holds a single node, such as a :class:" -"`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." +"An ``if`` statement. ``test`` holds a single node, such as " +"a :class:`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." msgstr "" "Instruction ``if``. La condition, *test*, est un nœud, par exemple une " "instance de :class:`Compare`. *body* est la liste des instructions du bloc. " "*orelse* contient les instructions dans le ``else`` (liste vide s'il n'y a " "pas de ``else``)." -#: library/ast.rst:1115 +#: library/ast.rst:1195 msgid "" "``elif`` clauses don't have a special representation in the AST, but rather " "appear as extra :class:`If` nodes within the ``orelse`` section of the " @@ -896,24 +1006,24 @@ msgstr "" "sont simplement mises dans le *orelse* du ``if`` ou ``elif`` précédent, " "comme nœuds de type :class:`If`." -#: library/ast.rst:1149 +#: library/ast.rst:1229 #, fuzzy msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " -"single :class:`Name`, :class:`Tuple`, :class:`List`, :class:`Attribute` or :" -"class:`Subscript` node. ``iter`` holds the item to be looped over, again as " -"a single node. ``body`` and ``orelse`` contain lists of nodes to execute. " +"single :class:`Name`, :class:`Tuple`, :class:`List`, :class:`Attribute` " +"or :class:`Subscript` node. ``iter`` holds the item to be looped over, again " +"as a single node. ``body`` and ``orelse`` contain lists of nodes to execute. " "Those in ``orelse`` are executed if the loop finishes normally, rather than " "via a ``break`` statement." msgstr "" "Boucle ``for``. Elle porte sur l'itérable donné par le nœud *iter*. La cible " -"des affectations successives est *target*, qui est un nœud de type :class:" -"`Name`, :class:`Tuple` ou :class:`List`. Les instructions du bloc ``for`` " -"forment la liste *body*. Celles de la liste *orelse* proviennent d'une " -"éventuelle clause ``else`` et sont exécutées si la boucle se termine par " -"épuisement de l'itérable, et non pas par un ``break``." +"des affectations successives est *target*, qui est un nœud de " +"type :class:`Name`, :class:`Tuple` ou :class:`List`. Les instructions du " +"bloc ``for`` forment la liste *body*. Celles de la liste *orelse* " +"proviennent d'une éventuelle clause ``else`` et sont exécutées si la boucle " +"se termine par épuisement de l'itérable, et non pas par un ``break``." -#: library/ast.rst:1183 +#: library/ast.rst:1263 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." @@ -924,29 +1034,29 @@ msgstr "" "termine parce que la condition devient fausse et non pas à cause d'une " "instruction ``break``." -#: library/ast.rst:1209 +#: library/ast.rst:1289 msgid "The ``break`` and ``continue`` statements." msgstr "Instructions ``break`` et ``continue``." -#: library/ast.rst:1242 +#: library/ast.rst:1322 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." msgstr "" "Bloc ``try``. Les nœuds de la liste *body* sont les instructions à exécuter " -"sous contrôle des exceptions. La liste *handlers* contient des nœuds :class:" -"`ExceptHandler`, un par ``except``. Les listes *orelse* et *finalbody* " -"contiennent respectivement les instructions se trouvant dans d'éventuels " -"blocs ``else`` et ``finally``." +"sous contrôle des exceptions. La liste *handlers* contient des " +"nœuds :class:`ExceptHandler`, un par ``except``. Les listes *orelse* et " +"*finalbody* contiennent respectivement les instructions se trouvant dans " +"d'éventuels blocs ``else`` et ``finally``." -#: library/ast.rst:1287 +#: library/ast.rst:1367 msgid "" "``try`` blocks which are followed by ``except*`` clauses. The attributes are " "the same as for :class:`Try` but the :class:`ExceptHandler` nodes in " "``handlers`` are interpreted as ``except*`` blocks rather then ``except``." msgstr "" -#: library/ast.rst:1316 +#: library/ast.rst:1396 msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " @@ -960,7 +1070,7 @@ msgstr "" "de caractères *name* (``None`` s'il n'y a pas de ``as``). Les instructions " "sous le ``except`` sont dans la liste *body*." -#: library/ast.rst:1347 +#: library/ast.rst:1427 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " @@ -970,12 +1080,12 @@ msgstr "" "instances de :class:`withitem`. Les instructions sous le ``with`` forment la " "liste *body*." -#: library/ast.rst:1357 +#: library/ast.rst:1437 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " -"context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" -"`Name`, :class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` " -"if that isn't used." +"context manager, often a :class:`Call` node. ``optional_vars`` is " +"a :class:`Name`, :class:`Tuple` or :class:`List` for the ``as foo`` part, or " +"``None`` if that isn't used." msgstr "" "Gestionnaire de contexte dans un bloc ``with``. Le gestionnaire est donné " "par le nœud *context_expr*, souvent une instance de :class:`Call`. S'il y a " @@ -983,38 +1093,38 @@ msgstr "" "de type :class:`Name`, :class:`Tuple` ou :class:`List`. Sinon, " "*optional_vars* vaut ``None``." -#: library/ast.rst:1388 +#: library/ast.rst:1468 msgid "Pattern matching" msgstr "" -#: library/ast.rst:1393 +#: library/ast.rst:1473 msgid "" "A ``match`` statement. ``subject`` holds the subject of the match (the " "object that is being matched against the cases) and ``cases`` contains an " "iterable of :class:`match_case` nodes with the different cases." msgstr "" -#: library/ast.rst:1401 +#: library/ast.rst:1481 msgid "" "A single case pattern in a ``match`` statement. ``pattern`` contains the " -"match pattern that the subject will be matched against. Note that the :class:" -"`AST` nodes produced for patterns differ from those produced for " +"match pattern that the subject will be matched against. Note that " +"the :class:`AST` nodes produced for patterns differ from those produced for " "expressions, even when they share the same syntax." msgstr "" -#: library/ast.rst:1406 +#: library/ast.rst:1486 msgid "" "The ``guard`` attribute contains an expression that will be evaluated if the " "pattern matches the subject." msgstr "" -#: library/ast.rst:1409 +#: library/ast.rst:1489 msgid "" "``body`` contains a list of nodes to execute if the pattern matches and the " "result of evaluating the guard expression is true." msgstr "" -#: library/ast.rst:1450 +#: library/ast.rst:1530 msgid "" "A match literal or value pattern that compares by equality. ``value`` is an " "expression node. Permitted value nodes are restricted as described in the " @@ -1022,14 +1132,14 @@ msgid "" "equal to the evaluated value." msgstr "" -#: library/ast.rst:1478 +#: library/ast.rst:1558 msgid "" "A match literal pattern that compares by identity. ``value`` is the " "singleton to be compared against: ``None``, ``True``, or ``False``. This " "pattern succeeds if the match subject is the given constant." msgstr "" -#: library/ast.rst:1504 +#: library/ast.rst:1584 msgid "" "A match sequence pattern. ``patterns`` contains the patterns to be matched " "against the subject elements if the subject is a sequence. Matches a " @@ -1037,7 +1147,7 @@ msgid "" "otherwise matches a fixed length sequence." msgstr "" -#: library/ast.rst:1536 +#: library/ast.rst:1616 msgid "" "Matches the rest of the sequence in a variable length match sequence " "pattern. If ``name`` is not ``None``, a list containing the remaining " @@ -1045,7 +1155,7 @@ msgid "" "successful." msgstr "" -#: library/ast.rst:1577 +#: library/ast.rst:1657 msgid "" "A match mapping pattern. ``keys`` is a sequence of expression nodes. " "``patterns`` is a corresponding sequence of pattern nodes. ``rest`` is an " @@ -1054,7 +1164,7 @@ msgid "" "statement documentation." msgstr "" -#: library/ast.rst:1583 +#: library/ast.rst:1663 msgid "" "This pattern succeeds if the subject is a mapping, all evaluated key " "expressions are present in the mapping, and the value corresponding to each " @@ -1063,7 +1173,7 @@ msgid "" "overall mapping pattern is successful." msgstr "" -#: library/ast.rst:1624 +#: library/ast.rst:1704 msgid "" "A match class pattern. ``cls`` is an expression giving the nominal class to " "be matched. ``patterns`` is a sequence of pattern nodes to be matched " @@ -1074,21 +1184,21 @@ msgid "" "pattern)." msgstr "" -#: library/ast.rst:1631 +#: library/ast.rst:1711 msgid "" "This pattern succeeds if the subject is an instance of the nominated class, " "all positional patterns match the corresponding class-defined attributes, " "and any specified keyword attributes match their corresponding pattern." msgstr "" -#: library/ast.rst:1635 +#: library/ast.rst:1715 msgid "" "Note: classes may define a property that returns self in order to match a " "pattern node against the instance being matched. Several builtin types are " "also matched that way, as described in the match statement documentation." msgstr "" -#: library/ast.rst:1686 +#: library/ast.rst:1766 msgid "" "A match \"as-pattern\", capture pattern or wildcard pattern. ``pattern`` " "contains the match pattern that the subject will be matched against. If the " @@ -1096,14 +1206,14 @@ msgid "" "and will always succeed." msgstr "" -#: library/ast.rst:1691 +#: library/ast.rst:1771 msgid "" "The ``name`` attribute contains the name that will be bound if the pattern " "is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` " "and the node represents the wildcard pattern." msgstr "" -#: library/ast.rst:1728 +#: library/ast.rst:1808 msgid "" "A match \"or-pattern\". An or-pattern matches each of its subpatterns in " "turn to the subject, until one succeeds. The or-pattern is then deemed to " @@ -1112,69 +1222,86 @@ msgid "" "matched against the subject." msgstr "" -#: library/ast.rst:1762 +#: library/ast.rst:1841 +msgid "Type annotations" +msgstr "" + +#: library/ast.rst:1845 +msgid "" +"A ``# type: ignore`` comment located at *lineno*. *tag* is the optional tag " +"specified by the form ``# type: ignore ``." +msgstr "" + +#: library/ast.rst:1871 +msgid "" +":class:`!TypeIgnore` nodes are not generated when the *type_comments* " +"parameter is set to ``False`` (default). See :func:`ast.parse` for more " +"details." +msgstr "" + +#: library/ast.rst:1879 msgid "Type parameters" msgstr "" -#: library/ast.rst:1764 +#: library/ast.rst:1881 msgid "" ":ref:`Type parameters ` can exist on classes, functions, and " "type aliases." msgstr "" -#: library/ast.rst:1769 +#: library/ast.rst:1886 msgid "" "A :class:`typing.TypeVar`. ``name`` is the name of the type variable. " -"``bound`` is the bound or constraints, if any. If ``bound`` is a :class:" -"`Tuple`, it represents constraints; otherwise it represents the bound. " -"``default_value`` is the default value; if the :class:`!TypeVar` has no " -"default, this attribute will be set to ``None``." +"``bound`` is the bound or constraints, if any. If ``bound`` is " +"a :class:`Tuple`, it represents constraints; otherwise it represents the " +"bound. ``default_value`` is the default value; if the :class:`!TypeVar` has " +"no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1829 library/ast.rst:1861 +#: library/ast.rst:1942 library/ast.rst:1969 #, fuzzy msgid "Added the *default_value* parameter." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:1799 +#: library/ast.rst:1915 msgid "" "A :class:`typing.ParamSpec`. ``name`` is the name of the parameter " "specification. ``default_value`` is the default value; if the :class:`!" "ParamSpec` has no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1834 +#: library/ast.rst:1947 msgid "" "A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable " "tuple. ``default_value`` is the default value; if the :class:`!TypeVarTuple` " "has no default, this attribute will be set to ``None``." msgstr "" -#: library/ast.rst:1865 +#: library/ast.rst:1973 msgid "Function and class definitions" msgstr "Définition de fonctions et de classes" -#: library/ast.rst:1869 +#: library/ast.rst:1977 msgid "A function definition." msgstr "Définition d'une fonction." -#: library/ast.rst:1871 +#: library/ast.rst:1979 msgid "``name`` is a raw string of the function name." msgstr "" "*name* donne le nom de la fonction sous forme d'une chaîne de caractères." -#: library/ast.rst:1872 +#: library/ast.rst:1980 #, fuzzy msgid "``args`` is an :class:`arguments` node." msgstr "" "*args* est un nœud de type :class:`arguments` qui contient les arguments de " "la signature." -#: library/ast.rst:1873 +#: library/ast.rst:1981 msgid "``body`` is the list of nodes inside the function." msgstr "*body* est la liste des instructions dans le corps de la fonction." -#: library/ast.rst:1874 +#: library/ast.rst:1982 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." @@ -1183,19 +1310,19 @@ msgstr "" "sont rangés dans leur ordre d'apparition, c'est-à-dire que le premier de la " "liste est appliqué en dernier." -#: library/ast.rst:1876 +#: library/ast.rst:1984 msgid "``returns`` is the return annotation." msgstr "*returns* est l'annotation de renvoi éventuelle." -#: library/ast.rst:2040 +#: library/ast.rst:2148 msgid "``type_params`` is a list of :ref:`type parameters `." msgstr "" -#: library/ast.rst:2067 library/ast.rst:2078 +#: library/ast.rst:2175 library/ast.rst:2186 msgid "Added ``type_params``." msgstr "" -#: library/ast.rst:1889 +#: library/ast.rst:1997 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." @@ -1206,11 +1333,11 @@ msgstr "" "*args* est une instance de ``arguments`` qui contient les arguments de la " "signature." -#: library/ast.rst:1908 +#: library/ast.rst:2016 msgid "The arguments for a function." msgstr "Arguments d'une fonction." -#: library/ast.rst:1910 +#: library/ast.rst:2018 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" @@ -1218,7 +1345,7 @@ msgstr "" "qui correspondent respectivement aux arguments obligatoirement positionnels, " "positionnels ou nommés et obligatoirement nommés." -#: library/ast.rst:1911 +#: library/ast.rst:2019 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." @@ -1227,7 +1354,7 @@ msgstr "" "capture des arguments restants, positionnels (``*arguments_positionnels``) " "et nommés (``**arguments_nommés``)." -#: library/ast.rst:1913 +#: library/ast.rst:2021 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." @@ -1237,7 +1364,7 @@ msgstr "" "``None``, il n'y a pas de valeur par défaut et l'argument correspondant doit " "être passé obligatoirement à la fonction." -#: library/ast.rst:1915 +#: library/ast.rst:2023 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " @@ -1249,24 +1376,24 @@ msgstr "" "positionnels, ces éléments donnent les valeurs par défaut des *n* derniers " "arguments positionnels (avec *n* la longueur de *defaults*)." -#: library/ast.rst:1922 +#: library/ast.rst:2030 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name; " "``annotation`` is its annotation, such as a :class:`Name` node." msgstr "" -#: library/ast.rst:1927 +#: library/ast.rst:2035 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" "Le champ facultatif *type_comment* est, sous forme de chaîne, une annotation " "de type fournie par un commentaire." -#: library/ast.rst:1969 +#: library/ast.rst:2077 msgid "A ``return`` statement." msgstr "Instruction ``return``, qui renvoie *value*." -#: library/ast.rst:1983 +#: library/ast.rst:2091 #, fuzzy msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " @@ -1278,61 +1405,61 @@ msgstr "" "la valeur qu'elles renvoient n'est pas utilisée dans une expression plus " "large." -#: library/ast.rst:2006 +#: library/ast.rst:2114 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" "Instruction ``global`` ou ``nonlocal``. Elle s'applique aux noms de " "variables donnés dans *names*, une liste de chaînes de caractères." -#: library/ast.rst:2031 +#: library/ast.rst:2139 msgid "A class definition." msgstr "Définition d'une classe." -#: library/ast.rst:2033 +#: library/ast.rst:2141 msgid "``name`` is a raw string for the class name" msgstr "*name* est le nom de la classe sous forme de chaîne de caractères ;" -#: library/ast.rst:2034 +#: library/ast.rst:2142 msgid "``bases`` is a list of nodes for explicitly specified base classes." msgstr "*bases* est la liste des classes mères données explicitement ;" -#: library/ast.rst:2035 +#: library/ast.rst:2143 #, fuzzy msgid "" "``keywords`` is a list of :class:`.keyword` nodes, principally for " -"'metaclass'. Other keywords will be passed to the metaclass, as per :pep:" -"`3115`." +"'metaclass'. Other keywords will be passed to the metaclass, as " +"per :pep:`3115`." msgstr "" "*keywords* est une liste de nœuds de type :class:`keyword`. Le principal mot-" "clé qui peut y apparaître est ``metaclass``. Les autres sont passés à la " "métaclasse (voir la :pep:`3115`) ;" -#: library/ast.rst:2037 +#: library/ast.rst:2145 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "" "*body* est la liste des instructions contenues dans la définition de classe ;" -#: library/ast.rst:2039 +#: library/ast.rst:2147 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" "*decorators_list* est une liste de nœuds, comme pour :class:`FunctionDef`." -#: library/ast.rst:2071 +#: library/ast.rst:2179 msgid "Async and await" msgstr "``async`` et ``await``" -#: library/ast.rst:2075 +#: library/ast.rst:2183 msgid "" -"An ``async def`` function definition. Has the same fields as :class:" -"`FunctionDef`." +"An ``async def`` function definition. Has the same fields " +"as :class:`FunctionDef`." msgstr "" -"Fonction déclarée avec ``async def``. Les champs sont les mêmes que dans :" -"class:`FunctionDef`." +"Fonction déclarée avec ``async def``. Les champs sont les mêmes que " +"dans :class:`FunctionDef`." -#: library/ast.rst:2084 +#: library/ast.rst:2192 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." @@ -1340,7 +1467,7 @@ msgstr "" "Expression ``await``, qui attend *value*. Ces nœuds ne peuvent apparaître " "qu'à l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:2108 +#: library/ast.rst:2216 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " @@ -1350,53 +1477,56 @@ msgstr "" "ceux de :class:`For` et :class:`With`. Ces nœuds ne peuvent apparaître qu'à " "l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:2113 +#: library/ast.rst:2221 +#, fuzzy msgid "" -"When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" -"class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." -"boolop` and :class:`ast.expr_context`) on the returned tree will be " -"singletons. Changes to one will be reflected in all other occurrences of the " -"same value (e.g. :class:`ast.Add`)." -msgstr "" -"Lorsqu'une chaîne contenant du code est transformée en arbre syntaxique par :" -"func:`ast.parse`, les nœuds représentants les opérateurs (classes filles de :" -"class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." -"boolop` et :class:`ast.expr_context`) sont des singletons à l'intérieur de " -"l'arbre renvoyé. Si l'un, par exemple une instance de :class:`ast.Add`, est " -"muté, la modification sera visible sur toutes les autres apparitions de " -"l'opérateur." - -#: library/ast.rst:2121 -msgid ":mod:`ast` Helpers" +"When a string is parsed by :func:`ast.parse`, operator nodes (subclasses " +"of :class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast.boolop` " +"and :class:`ast.expr_context`) on the returned tree will be singletons. " +"Changes to one will be reflected in all other occurrences of the same value " +"(for example, :class:`ast.Add`)." +msgstr "" +"Lorsqu'une chaîne contenant du code est transformée en arbre syntaxique " +"par :func:`ast.parse`, les nœuds représentants les opérateurs (classes " +"filles " +"de :class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast.boolop` " +"et :class:`ast.expr_context`) sont des singletons à l'intérieur de l'arbre " +"renvoyé. Si l'un, par exemple une instance de :class:`ast.Add`, est muté, la " +"modification sera visible sur toutes les autres apparitions de l'opérateur." + +#: library/ast.rst:2229 +#, fuzzy +msgid ":mod:`!ast` helpers" msgstr "Outils du module :mod:`ast`" -#: library/ast.rst:2123 +#: library/ast.rst:2231 +#, fuzzy msgid "" -"Apart from the node classes, the :mod:`ast` module defines these utility " +"Apart from the node classes, the :mod:`!ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" msgstr "" "À part les classes de nœuds, le module :mod:`ast` définit plusieurs " "fonctions et classes utilitaires pour traverser les arbres syntaxiques " "abstraits :" -#: library/ast.rst:2128 +#: library/ast.rst:2236 #, fuzzy msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " -"filename, mode, flags=FLAGS_VALUE, optimize=optimize)``, where " -"``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast." -"PyCF_OPTIMIZED_AST`` otherwise." +"filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, " +"where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and " +"``ast.PyCF_OPTIMIZED_AST`` otherwise." msgstr "" "Analyse le code source et renvoie un arbre syntaxique. Équivalent à " "``compile(source, filename, mode, ast.PyCF_ONLY_AST)``." -#: library/ast.rst:2133 +#: library/ast.rst:2241 #, fuzzy msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " -"equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the flags passed to :" -"func:`compile`. This will report syntax errors for misplaced type " +"equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the flags passed " +"to :func:`compile`. This will report syntax errors for misplaced type " "comments. Without this flag, type comments will be ignored, and the " "``type_comment`` field on selected AST nodes will always be ``None``. In " "addition, the locations of ``# type: ignore`` comments will be returned as " @@ -1404,24 +1534,25 @@ msgid "" "empty list)." msgstr "" "Si *type_comments* est mis à ``True``, l'analyseur syntaxique reconnaît les " -"commentaires de type et les ajoute à l'arbre, comme décrit dans la :pep:" -"`484` et la :pep:`526`. Ceci revient à ajouter :data:`ast." -"PyCF_TYPE_COMMENTS` à l'argument *flags* de :func:`compile`. Une erreur de " -"syntaxe est levée si un commentaire de type est placé au mauvais endroit. " -"Les commentaires ``# type: ignore`` sont également détectés et leurs " -"positions dans la source sont placées dans l'attribut *type_ignores* du " -"nœud :class:`Module`. Sans cette option, les commentaires de type sont " -"ignorés tout comme les commentaires ordinaires, et l'attribut *type_comment* " -"des nœuds dont le type possède ce champ sera toujours mis à ``None``." - -#: library/ast.rst:2143 +"commentaires de type et les ajoute à l'arbre, comme décrit dans " +"la :pep:`484` et la :pep:`526`. Ceci revient à " +"ajouter :data:`ast.PyCF_TYPE_COMMENTS` à l'argument *flags* " +"de :func:`compile`. Une erreur de syntaxe est levée si un commentaire de " +"type est placé au mauvais endroit. Les commentaires ``# type: ignore`` sont " +"également détectés et leurs positions dans la source sont placées dans " +"l'attribut *type_ignores* du nœud :class:`Module`. Sans cette option, les " +"commentaires de type sont ignorés tout comme les commentaires ordinaires, et " +"l'attribut *type_comment* des nœuds dont le type possède ce champ sera " +"toujours mis à ``None``." + +#: library/ast.rst:2251 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " "List[str]``." msgstr "" -#: library/ast.rst:2147 +#: library/ast.rst:2255 msgid "" "Setting ``feature_version`` to a tuple ``(major, minor)`` will result in a " "\"best-effort\" attempt to parse using that Python version's grammar. For " @@ -1434,12 +1565,12 @@ msgid "" "``feature_version``." msgstr "" -#: library/ast.rst:2157 +#: library/ast.rst:2265 msgid "" "If source contains a null character (``\\0``), :exc:`ValueError` is raised." msgstr "" -#: library/ast.rst:2160 +#: library/ast.rst:2268 msgid "" "Note that successfully parsing source code into an AST object doesn't " "guarantee that the source code provided is valid Python code that can be " @@ -1449,13 +1580,13 @@ msgid "" "inside a function node)." msgstr "" -#: library/ast.rst:2167 +#: library/ast.rst:2275 msgid "" "In particular, :func:`ast.parse` won't do any scoping checks, which the " "compilation step does." msgstr "" -#: library/ast.rst:2171 +#: library/ast.rst:2279 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." @@ -1464,44 +1595,49 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un arbre " "syntaxique en raison de la limitation de la profondeur de la pile d'appels." -#: library/ast.rst:2175 +#: library/ast.rst:2283 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" "ajout des paramètres *type_comments* et *feature_version* ainsi que de la " "valeur ``'func_type'`` pour *mode*." -#: library/ast.rst:2178 +#: library/ast.rst:2286 msgid "" "The minimum supported version for ``feature_version`` is now ``(3, 7)``. The " "``optimize`` argument was added." msgstr "" -#: library/ast.rst:2185 +#: library/ast.rst:2290 +#, fuzzy +msgid "Added the *module* parameter." +msgstr "ajout du paramètre *indent*." + +#: library/ast.rst:2296 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " -"would produce an equivalent :class:`ast.AST` object if parsed back with :" -"func:`ast.parse`." +"would produce an equivalent :class:`ast.AST` object if parsed back " +"with :func:`ast.parse`." msgstr "" "À partir d'un arbre syntaxique :class:`ast.AST`, reconstruit un code sous " "forme de chaîne de caractères. S'il est passé à :func:`ast.parse`, le " "résultat produit un arbre :class:`ast.AST` équivalent à l'original." -#: library/ast.rst:2190 +#: library/ast.rst:2301 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " "optimizations, such as constant tuples/frozensets)." msgstr "" -#: library/ast.rst:2195 +#: library/ast.rst:2306 msgid "" -"Trying to unparse a highly complex expression would result with :exc:" -"`RecursionError`." +"Trying to unparse a highly complex expression would result " +"with :exc:`RecursionError`." msgstr "" "Une :exc:`RecursionError` est levée si l'expression comporte de très " "nombreux niveaux d'imbrication." -#: library/ast.rst:2203 +#: library/ast.rst:2314 #, fuzzy msgid "" "Evaluate an expression node or a string containing only a Python literal or " @@ -1515,7 +1651,7 @@ msgstr "" "des littéraux parmi les types suivants : chaînes de caractères, octets, " "nombres, *n*-uplets, listes, dictionnaires, ensembles, booléens, et ``None``." -#: library/ast.rst:2208 +#: library/ast.rst:2319 #, fuzzy msgid "" "This can be used for evaluating strings containing Python values without the " @@ -1528,7 +1664,7 @@ msgstr "" "d'évaluer des expressions arbitrairement complexes, par exemple impliquant " "des opérateurs ou de l'indiçage." -#: library/ast.rst:2213 +#: library/ast.rst:2324 msgid "" "This function had been documented as \"safe\" in the past without defining " "what that meant. That was misleading. This is specifically designed not to " @@ -1540,7 +1676,7 @@ msgid "" "untrusted data is thus not recommended." msgstr "" -#: library/ast.rst:2223 +#: library/ast.rst:2334 #, fuzzy msgid "" "It is possible to crash the Python interpreter due to stack depth " @@ -1550,68 +1686,70 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un arbre " "syntaxique en raison de la limitation de la profondeur de la pile d'appels." -#: library/ast.rst:2226 +#: library/ast.rst:2337 msgid "" -"It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" -"`MemoryError` and :exc:`RecursionError` depending on the malformed input." +"It can " +"raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:`MemoryError` " +"and :exc:`RecursionError` depending on the malformed input." msgstr "" -#: library/ast.rst:2230 +#: library/ast.rst:2341 msgid "Now allows bytes and set literals." msgstr "accepte maintenant les octets et ensembles littéraux." -#: library/ast.rst:2233 +#: library/ast.rst:2344 msgid "Now supports creating empty sets with ``'set()'``." msgstr "accepte ``set()`` pour les ensembles vides." -#: library/ast.rst:2236 +#: library/ast.rst:2347 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: library/ast.rst:2242 +#: library/ast.rst:2353 msgid "" -"Return the docstring of the given *node* (which must be a :class:" -"`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" -"`Module` node), or ``None`` if it has no docstring. If *clean* is true, " -"clean up the docstring's indentation with :func:`inspect.cleandoc`." +"Return the docstring of the given *node* (which must be " +"a :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, " +"or :class:`Module` node), or ``None`` if it has no docstring. If *clean* is " +"true, clean up the docstring's indentation with :func:`inspect.cleandoc`." msgstr "" -"Renvoie la *docstring* du nœud *node* (de type :class:`FunctionDef`, :class:" -"`AsyncFunctionDef`, :class:`ClassDef` or :class:`Module`), ou ``None`` s'il " -"n'a pas de *docstring*. Si *clean* est vrai, cette fonction nettoie " -"l'indentation de la *docstring* avec :func:`inspect.cleandoc`." +"Renvoie la *docstring* du nœud *node* (de " +"type :class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef` " +"or :class:`Module`), ou ``None`` s'il n'a pas de *docstring*. Si *clean* est " +"vrai, cette fonction nettoie l'indentation de la *docstring* " +"avec :func:`inspect.cleandoc`." -#: library/ast.rst:2248 +#: library/ast.rst:2359 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` est maintenant gérée." -#: library/ast.rst:2254 +#: library/ast.rst:2365 #, fuzzy msgid "" "Get source code segment of the *source* that generated *node*. If some " -"location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :" -"attr:`~ast.AST.col_offset`, or :attr:`~ast.AST.end_col_offset`) is missing, " -"return ``None``." +"location information " +"(:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :attr:`~ast.AST.col_offset`, " +"or :attr:`~ast.AST.end_col_offset`) is missing, return ``None``." msgstr "" "Donne la partie de *source* (le code source) qui a donné lieu à *node*. Si " -"l'un des attributs de localisation du nœud (:attr:`lineno`, :attr:" -"`end_lineno`, :attr:`col_offset` et :attr:`end_col_offset`) n'est pas " -"rempli, cette fonction renvoie ``None``." +"l'un des attributs de localisation du nœud " +"(:attr:`lineno`, :attr:`end_lineno`, :attr:`col_offset` " +"et :attr:`end_col_offset`) n'est pas rempli, cette fonction renvoie ``None``." -#: library/ast.rst:2258 +#: library/ast.rst:2369 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." msgstr "" -#: library/ast.rst:2266 +#: library/ast.rst:2377 #, fuzzy msgid "" -"When you compile a node tree with :func:`compile`, the compiler expects :" -"attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every " -"node that supports them. This is rather tedious to fill in for generated " -"nodes, so this helper adds these attributes recursively where not already " -"set, by setting them to the values of the parent node. It works recursively " -"starting at *node*." +"When you compile a node tree with :func:`compile`, the compiler " +"expects :attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes " +"for every node that supports them. This is rather tedious to fill in for " +"generated nodes, so this helper adds these attributes recursively where not " +"already set, by setting them to the values of the parent node. It works " +"recursively starting at *node*." msgstr "" "Lorsque l'on compile un arbre avec :func:`compile`, le compilateur attend " "les attributs :attr:`lineno` et :attr:`col_offset` pour tous les nœuds qui " @@ -1621,7 +1759,7 @@ msgstr "" "comme les valeurs du nœud parent. Elle fonctionne récursivement en démarrant " "de *node*." -#: library/ast.rst:2275 +#: library/ast.rst:2386 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " @@ -1631,19 +1769,20 @@ msgstr "" "nœud dans l'arbre, en commençant par le nœud *node*. C'est utile pour " "« déplacer du code » à un endroit différent dans un fichier." -#: library/ast.rst:2282 +#: library/ast.rst:2393 #, fuzzy msgid "" -"Copy source location (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.col_offset`, :" -"attr:`~ast.AST.end_lineno`, and :attr:`~ast.AST.end_col_offset`) from " -"*old_node* to *new_node* if possible, and return *new_node*." +"Copy source location " +"(:attr:`~ast.AST.lineno`, :attr:`~ast.AST.col_offset`, :attr:`~ast.AST.end_lineno`, " +"and :attr:`~ast.AST.end_col_offset`) from *old_node* to *new_node* if " +"possible, and return *new_node*." msgstr "" -"Copie la position dans la source (attributs :attr:`lineno`, :attr:" -"`col_offset`, :attr:`end_lineno` et :attr:`end_col_offset`) de l'ancien nœud " -"*old_node* vers le nouveau nœud *new_node*, si possible, et renvoie " -"*new_node*." +"Copie la position dans la source " +"(attributs :attr:`lineno`, :attr:`col_offset`, :attr:`end_lineno` " +"et :attr:`end_col_offset`) de l'ancien nœud *old_node* vers le nouveau nœud " +"*new_node*, si possible, et renvoie *new_node*." -#: library/ast.rst:2289 +#: library/ast.rst:2400 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -1651,7 +1790,7 @@ msgstr "" "Produit un *n*-uplet de couples ``(nom_du_champ, valeur)`` pour chaque champ " "de ``node._fields`` qui est présent dans *node*." -#: library/ast.rst:2295 +#: library/ast.rst:2406 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." @@ -1660,7 +1799,7 @@ msgstr "" "champs qui sont des nœuds et tous les éléments des champs qui sont des " "listes de nœuds." -#: library/ast.rst:2301 +#: library/ast.rst:2412 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -1671,7 +1810,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:2308 +#: library/ast.rst:2419 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -1679,10 +1818,10 @@ msgid "" msgstr "" "Classe de base pour un visiteur de nœud, qui parcourt l'arbre syntaxique " "abstrait et appelle une fonction de visite pour chacun des nœuds trouvés. " -"Cette fonction peut renvoyer une valeur, qui est transmise par la méthode :" -"meth:`visit`." +"Cette fonction peut renvoyer une valeur, qui est transmise par la " +"méthode :meth:`visit`." -#: library/ast.rst:2312 +#: library/ast.rst:2423 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1690,59 +1829,60 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:2317 +#: library/ast.rst:2428 msgid "" -"Visit a node. The default implementation calls the method called :samp:" -"`self.visit_{classname}` where *classname* is the name of the node class, " -"or :meth:`generic_visit` if that method doesn't exist." +"Visit a node. The default implementation calls the method " +"called :samp:`self.visit_{classname}` where *classname* is the name of the " +"node class, or :meth:`generic_visit` if that method doesn't exist." msgstr "" -"Visite un nœud. L'implémentation par défaut appelle la méthode :samp:`self." -"visit_{classe}` où *classe* représente le nom de la classe du nœud, ou :meth:" -"`generic_visit` si cette méthode n'existe pas." +"Visite un nœud. L'implémentation par défaut appelle la " +"méthode :samp:`self.visit_{classe}` où *classe* représente le nom de la " +"classe du nœud, ou :meth:`generic_visit` si cette méthode n'existe pas." -#: library/ast.rst:2323 +#: library/ast.rst:2434 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "" "Le visiteur appelle la méthode :meth:`visit` de tous les enfants du nœud." -#: library/ast.rst:2325 +#: library/ast.rst:2436 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." msgstr "" "Notons que les nœuds enfants qui possèdent une méthode de visite spéciale ne " -"sont pas visités à moins que le visiteur n'appelle la méthode :meth:" -"`generic_visit` ou ne les visite lui-même." +"sont pas visités à moins que le visiteur n'appelle la " +"méthode :meth:`generic_visit` ou ne les visite lui-même." -#: library/ast.rst:2331 +#: library/ast.rst:2442 msgid "Handles all constant nodes." msgstr "" -#: library/ast.rst:2333 +#: library/ast.rst:2444 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " -"during traversal. For this a special visitor exists (:class:" -"`NodeTransformer`) that allows modifications." +"during traversal. For this a special visitor exists " +"(:class:`NodeTransformer`) that allows modifications." msgstr "" "N'utilisez pas :class:`NodeVisitor` si vous souhaitez appliquer des " "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:2339 +#: library/ast.rst:2450 #, fuzzy msgid "" -"Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`, :meth:" -"`!visit_NameConstant` and :meth:`!visit_Ellipsis` are deprecated now and " -"will not be called in future Python versions. Add the :meth:" -"`visit_Constant` method to handle all constant nodes." +"Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!" +"visit_Bytes`, :meth:`!visit_NameConstant` and :meth:`!visit_Ellipsis` will " +"not be called in Python 3.14+. Add the :meth:`visit_Constant` method " +"instead to handle all constant nodes." msgstr "" -"les méthodes :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :" -"meth:`visit_NameConstant` et :meth:`visit_Ellipsis` sont devenues obsolètes " -"et cesseront d'être appelées dans une version ultérieure de Python. Écrivez " -"une méthode :meth:`visit_Constant` pour traiter tous les nœuds qui " -"représentent des valeurs constantes." +"les " +"méthodes :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :meth:`visit_NameConstant` " +"et :meth:`visit_Ellipsis` sont devenues obsolètes et cesseront d'être " +"appelées dans une version ultérieure de Python. Écrivez une " +"méthode :meth:`visit_Constant` pour traiter tous les nœuds qui représentent " +"des valeurs constantes." -#: library/ast.rst:2347 +#: library/ast.rst:2458 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -1750,7 +1890,7 @@ msgstr "" "Une sous-classe de :class:`NodeVisitor` qui traverse l'arbre syntaxique " "abstrait et permet de modifier les nœuds." -#: library/ast.rst:2350 +#: library/ast.rst:2461 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -1764,7 +1904,7 @@ msgstr "" "est supprimé de sa position, sinon il est remplacé par cette valeur. Elle " "peut être le nœud original, auquel cas il n'y a pas de remplacement." -#: library/ast.rst:2356 +#: library/ast.rst:2467 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -1772,18 +1912,18 @@ msgstr "" "Voici un exemple de transformation qui réécrit tous les accès à la valeur " "d'une variable ``toto`` en ``data['toto']`` ::" -#: library/ast.rst:2368 +#: library/ast.rst:2479 #, fuzzy msgid "" "Keep in mind that if the node you're operating on has child nodes you must " -"either transform the child nodes yourself or call the :meth:`~ast." -"NodeVisitor.generic_visit` method for the node first." +"either transform the child nodes yourself or call " +"the :meth:`~ast.NodeVisitor.generic_visit` method for the node first." msgstr "" "Gardez en tête que si un nœud sur lequel vous travaillez a des nœuds " "enfants, vous devez transformer également ces nœuds enfants vous-même ou " "appeler d'abord la méthode :meth:`generic_visit` sur le nœud." -#: library/ast.rst:2372 +#: library/ast.rst:2483 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " @@ -1793,24 +1933,24 @@ msgstr "" "instructions), le visiteur peut aussi renvoyer une liste des nœuds plutôt " "qu'un seul nœud." -#: library/ast.rst:2376 +#: library/ast.rst:2487 #, fuzzy msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " -"original tree) without giving them location information (such as :attr:`~ast." -"AST.lineno`), :func:`fix_missing_locations` should be called with the new " -"sub-tree to recalculate the location information::" +"original tree) without giving them location information (such " +"as :attr:`~ast.AST.lineno`), :func:`fix_missing_locations` should be called " +"with the new sub-tree to recalculate the location information::" msgstr "" "Si :class:`NodeTransformer` ajoute de nouveaux nœuds à l'original sans leur " "donner les attributs de position dans la source (:attr:`lineno` et " "consorts), il faut passer le nouvel arbre (ou la nouvelle partie de l'arbre) " "à :func:`fix_missing_locations` pour calculer les positions manquantes ::" -#: library/ast.rst:2384 +#: library/ast.rst:2495 msgid "Usually you use the transformer like this::" msgstr "Utilisation typique des transformations ::" -#: library/ast.rst:2391 +#: library/ast.rst:2502 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -1830,7 +1970,14 @@ msgstr "" "masqués par défaut, mais on peut les inclure en mettant *include_attributes* " "à ``True``." -#: library/ast.rst:2399 +#: library/ast.rst:2510 +msgid "" +"If *color* is ``True``, the returned string is syntax highlighted using ANSI " +"escape sequences. If ``False`` (the default), colored output is always " +"disabled." +msgstr "" + +#: library/ast.rst:2514 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " "pretty-printed with that indent level. An indent level of 0, negative, or " @@ -1847,26 +1994,50 @@ msgstr "" "0 ou la chaîne vide, c'est-à-dire des retours à la ligne sans indentation. " "Avec la valeur par défaut de ``None``, la sortie tient sur une seule ligne." -#: library/ast.rst:2406 +#: library/ast.rst:2521 msgid "" -"If *show_empty* is ``False`` (the default), empty lists and fields that are " -"``None`` will be omitted from the output." +"If *show_empty* is false (the default), optional empty lists and ``Load()`` " +"values will be omitted from the output. Optional ``None`` values are always " +"omitted." msgstr "" -#: library/ast.rst:2409 +#: library/ast.rst:2542 msgid "Added the *indent* option." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:2412 +#: library/ast.rst:2545 #, fuzzy msgid "Added the *show_empty* option." msgstr "ajout du paramètre *indent*." -#: library/ast.rst:2446 -msgid "Compiler Flags" +#: library/ast.rst:2548 +msgid "Omit optional ``Load()`` values by default." +msgstr "" + +#: library/ast.rst:2551 +#, fuzzy +msgid "Added the *color* parameter." +msgstr "ajout du paramètre *indent*." + +#: library/ast.rst:2557 +msgid "Recursively compares two ASTs." +msgstr "" + +#: library/ast.rst:2559 +msgid "" +"*compare_attributes* affects whether AST attributes are considered in the " +"comparison. If *compare_attributes* is ``False`` (default), then attributes " +"are ignored. Otherwise they must all be equal. This option is useful to " +"check whether the ASTs are structurally equal but differ in whitespace or " +"similar details. Attributes include line numbers and column offsets." +msgstr "" + +#: library/ast.rst:2572 +#, fuzzy +msgid "Compiler flags" msgstr "Options du compilateur" -#: library/ast.rst:2448 +#: library/ast.rst:2574 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" @@ -1874,7 +2045,7 @@ msgstr "" "Les options suivantes sont prises en charge par la fonction :func:`compile`. " "Elles permettent de modifier le comportement de la compilation :" -#: library/ast.rst:2453 +#: library/ast.rst:2579 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." @@ -1882,20 +2053,20 @@ msgstr "" "Active la reconnaissance de ``await``, ``async for``, ``async with`` et des " "compréhensions asynchrones au niveau le plus haut." -#: library/ast.rst:2460 +#: library/ast.rst:2586 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" "Génère et renvoie un arbre syntaxique au lieu d'un objet de code compilé." -#: library/ast.rst:2465 +#: library/ast.rst:2591 msgid "" -"The returned AST is optimized according to the *optimize* argument in :func:" -"`compile` or :func:`ast.parse`." +"The returned AST is optimized according to the *optimize* argument " +"in :func:`compile` or :func:`ast.parse`." msgstr "" -#: library/ast.rst:2472 +#: library/ast.rst:2598 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." @@ -1903,49 +2074,74 @@ msgstr "" "Ajoute la prise en charge des commentaires de types tels que définis dans " "la :pep:`484` et la :pep:`526` (``# type: un_type`` et ``# type: ignore``)." -#: library/ast.rst:2481 -msgid "Command-Line Usage" +#: library/ast.rst:2607 +#, fuzzy +msgid "Command-line usage" msgstr "Utilisation en ligne de commande" -#: library/ast.rst:2485 +#: library/ast.rst:2611 +msgid "" +"The output is now syntax highlighted by default. This can " +"be :ref:`controlled using environment variables `." +msgstr "" + +#: library/ast.rst:2615 +#, fuzzy msgid "" -"The :mod:`ast` module can be executed as a script from the command line. It " +"The :mod:`!ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" "Le module :mod:`ast` peut être exécuté en tant que script en ligne de " "commande. C'est aussi simple que ceci :" -#: library/ast.rst:2492 +#: library/ast.rst:2622 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/ast.rst:2498 +#: library/ast.rst:2628 msgid "Show the help message and exit." msgstr "Affiche un message d'aide et quitte." -#: library/ast.rst:2503 +#: library/ast.rst:2633 msgid "" -"Specify what kind of code must be compiled, like the *mode* argument in :" -"func:`parse`." +"Specify what kind of code must be compiled, like the *mode* argument " +"in :func:`parse`." msgstr "" -"Précise le type de code à compiler, comme l'argument *mode* de la fonction :" -"func:`parse`." +"Précise le type de code à compiler, comme l'argument *mode* de la " +"fonction :func:`parse`." -#: library/ast.rst:2508 +#: library/ast.rst:2638 msgid "Don't parse type comments." msgstr "Désactive la reconnaissance des commentaires de type." -#: library/ast.rst:2512 +#: library/ast.rst:2642 msgid "Include attributes such as line numbers and column offsets." msgstr "" "Affiche les attributs comme les numéros de lignes et les décalages par " "rapport aux débuts des lignes." -#: library/ast.rst:2517 +#: library/ast.rst:2647 msgid "Indentation of nodes in AST (number of spaces)." msgstr "Nombre d'espaces pour chaque niveau d'indentation dans la sortie." -#: library/ast.rst:2519 +#: library/ast.rst:2651 +msgid "" +"Python version in the format 3.x (for example, 3.10). Defaults to the " +"current version of the interpreter." +msgstr "" + +#: library/ast.rst:2659 +msgid "Optimization level for parser. Defaults to no optimization." +msgstr "" + +#: library/ast.rst:2665 +msgid "" +"Show empty lists and fields that are ``None``. Defaults to not showing empty " +"objects." +msgstr "" + +#: library/ast.rst:2671 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." @@ -1954,7 +2150,7 @@ msgstr "" "standard sinon. Le code source est transformé en un arbre syntaxique, qui " "est affiché sur la sortie standard." -#: library/ast.rst:2525 +#: library/ast.rst:2677 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -1963,7 +2159,7 @@ msgstr "" "ressource documentaire externe, qui possède plus de détails pour travailler " "avec des arbres syntaxiques Python." -#: library/ast.rst:2528 +#: library/ast.rst:2680 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -1975,7 +2171,7 @@ msgstr "" "extraits de code source à partir desquels ils sont produits. Ceci est utile " "pour les outils qui transforment du code source." -#: library/ast.rst:2533 +#: library/ast.rst:2685 #, fuzzy msgid "" "`leoAst.py `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " @@ -1997,7 +2193,7 @@ msgstr "" "abstraits et conservent tous les détails du formatage. Cette bibliothèque " "est utile aux outils de réusinage et d'analyse de code." -#: library/ast.rst:2543 +#: library/ast.rst:2695 #, fuzzy msgid "" "`Parso `_ is a Python parser that supports " @@ -2022,8 +2218,8 @@ msgstr "" #~ "attempt to parse using that Python version's grammar. Currently ``major`` " #~ "must equal to ``3``. For example, setting ``feature_version=(3, 4)`` " #~ "will allow the use of ``async`` and ``await`` as variable names. The " -#~ "lowest supported version is ``(3, 4)``; the highest is ``sys." -#~ "version_info[0:2]``." +#~ "lowest supported version is ``(3, 4)``; the highest is " +#~ "``sys.version_info[0:2]``." #~ msgstr "" #~ "Si *feature_version* est défini à une version de Python, sous la forme " #~ "d'un couple ``(version_majeure, version_mineure)``, l'analyseur tentera " diff --git a/library/asynchat.po b/library/asynchat.po new file mode 100644 index 000000000..356a5ed75 --- /dev/null +++ b/library/asynchat.po @@ -0,0 +1,37 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/asynchat.rst:2 +msgid ":mod:`!asynchat` --- Asynchronous socket command/response handler" +msgstr "" + +#: library/asynchat.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.12 ` after being " +"deprecated in Python 3.6. The removal was decided in :pep:`594`." +msgstr "" + +#: library/asynchat.rst:14 +msgid "Applications should use the :mod:`asyncio` module instead." +msgstr "" + +#: library/asynchat.rst:16 +msgid "" +"The last version of Python that provided the :mod:`!asynchat` module was " +"`Python 3.11 `_." +msgstr "" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index bb7dbb461..4f609928a 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-06-19 22:57+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -76,13 +76,13 @@ msgstr "En plus d'activer le mode débogage, vous pouvez également :" #: library/asyncio-dev.rst:36 #, fuzzy msgid "" -"setting the log level of the :ref:`asyncio logger ` to :py:" -"const:`logging.DEBUG`, for example the following snippet of code can be run " -"at startup of the application::" +"setting the log level of the :ref:`asyncio logger ` " +"to :py:const:`logging.DEBUG`, for example the following snippet of code can " +"be run at startup of the application::" msgstr "" -"régler le niveau de journalisation pour l'enregistreur d'*asyncio* (:ref:" -"`asyncio logger `) à :py:data:`logging.DEBUG` ; par exemple, " -"le fragment de code suivant peut être exécuté au démarrage de " +"régler le niveau de journalisation pour l'enregistreur d'*asyncio* " +"(:ref:`asyncio logger `) à :py:data:`logging.DEBUG` ; par " +"exemple, le fragment de code suivant peut être exécuté au démarrage de " "l'application ::" #: library/asyncio-dev.rst:42 @@ -92,37 +92,26 @@ msgid "" "command line option." msgstr "" "configurer le module :mod:`warnings` afin d'afficher les avertissements de " -"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant l'option :" -"option:`-W` ``default`` sur la ligne de commande." +"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant " +"l'option :option:`-W` ``default`` sur la ligne de commande." #: library/asyncio-dev.rst:47 msgid "When the debug mode is enabled:" msgstr "Lorsque le mode débogage est activé :" -# long ref -#: library/asyncio-dev.rst:49 -msgid "" -"asyncio checks for :ref:`coroutines that were not awaited ` and logs them; this mitigates the \"forgotten await\" " -"pitfall." -msgstr "" -"*asyncio* surveille les :ref:`coroutines qui ne sont jamais attendues " -"` et les journalise ; cela atténue le " -"problème des « *await* oubliés » ;" - # thread safe comment traduire -#: library/asyncio-dev.rst:53 +#: library/asyncio-dev.rst:49 msgid "" -"Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` and :meth:" -"`loop.call_at` methods) raise an exception if they are called from a wrong " -"thread." +"Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` " +"and :meth:`loop.call_at` methods) raise an exception if they are called from " +"a wrong thread." msgstr "" "beaucoup d'*API* *asyncio* ne prenant pas en charge les fils d'exécution " -"multiples (comme les méthodes :meth:`loop.call_soon` et :meth:`loop." -"call_at`) lèvent une exception si elles sont appelées par le mauvais fil " -"d’exécution ;" +"multiples (comme les méthodes :meth:`loop.call_soon` " +"et :meth:`loop.call_at`) lèvent une exception si elles sont appelées par le " +"mauvais fil d’exécution ;" -#: library/asyncio-dev.rst:57 +#: library/asyncio-dev.rst:53 msgid "" "The execution time of the I/O selector is logged if it takes too long to " "perform an I/O operation." @@ -130,22 +119,22 @@ msgstr "" "le temps d'exécution du sélecteur d'entrée-sortie est journalisé si une " "opération prend trop de temps à s'effectuer ;" -#: library/asyncio-dev.rst:60 +#: library/asyncio-dev.rst:56 msgid "" -"Callbacks taking longer than 100 milliseconds are logged. The :attr:`loop." -"slow_callback_duration` attribute can be used to set the minimum execution " -"duration in seconds that is considered \"slow\"." +"Callbacks taking longer than 100 milliseconds are logged. " +"The :attr:`loop.slow_callback_duration` attribute can be used to set the " +"minimum execution duration in seconds that is considered \"slow\"." msgstr "" "les fonctions de rappel prenant plus de 100 ms sont journalisées ; " "l'attribut :attr:`loop.slow_callback_duration` peut être utilisé pour " "changer la limite (en secondes) après laquelle une fonction de rappel est " "considérée comme « lente »." -#: library/asyncio-dev.rst:68 +#: library/asyncio-dev.rst:64 msgid "Concurrency and Multithreading" msgstr "Programmation concurrente et multi-fils" -#: library/asyncio-dev.rst:70 +#: library/asyncio-dev.rst:66 msgid "" "An event loop runs in a thread (typically the main thread) and executes all " "callbacks and Tasks in its thread. While a Task is running in the event " @@ -160,16 +149,16 @@ msgstr "" "s'exécuter dans ce fil. Quand une tâche traite une expression ``await``, " "elle se suspend et laisse la boucle d’évènements traiter la tâche suivante." -#: library/asyncio-dev.rst:76 +#: library/asyncio-dev.rst:72 msgid "" -"To schedule a :term:`callback` from another OS thread, the :meth:`loop." -"call_soon_threadsafe` method should be used. Example::" +"To schedule a :term:`callback` from another OS thread, " +"the :meth:`loop.call_soon_threadsafe` method should be used. Example::" msgstr "" "Pour planifier un :term:`rappel ` depuis un autre fil d'exécution " "système, utilisez la méthode :meth:`loop.call_soon_threadsafe`. Par " "exemple ::" -#: library/asyncio-dev.rst:81 +#: library/asyncio-dev.rst:77 msgid "" "Almost all asyncio objects are not thread safe, which is typically not a " "problem unless there is code that works with them from outside of a Task or " @@ -180,48 +169,50 @@ msgstr "" "un contexte multi-fils (*thread-safe*) mais cela n'est en général pas un " "problème à moins que l'objet ne fasse appel à du code se trouvant en dehors " "d'une tâche ou d'une fonction de rappel. Dans ce dernier cas, si le code " -"appelle les *API* bas niveau de *asyncio*, utilisez la méthode :meth:`loop." -"call_soon_threadsafe`. Par exemple ::" +"appelle les *API* bas niveau de *asyncio*, utilisez la " +"méthode :meth:`loop.call_soon_threadsafe`. Par exemple ::" -#: library/asyncio-dev.rst:89 +#: library/asyncio-dev.rst:85 msgid "" -"To schedule a coroutine object from a different OS thread, the :func:" -"`run_coroutine_threadsafe` function should be used. It returns a :class:" -"`concurrent.futures.Future` to access the result::" +"To schedule a coroutine object from a different OS thread, " +"the :func:`run_coroutine_threadsafe` function should be used. It returns " +"a :class:`concurrent.futures.Future` to access the result::" msgstr "" "Pour planifier un objet concurrent depuis un autre fil d'exécution système, " -"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un objet :" -"class:`concurrent.futures.Future` pour accéder au résultat ::" +"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un " +"objet :class:`concurrent.futures.Future` pour accéder au résultat ::" -#: library/asyncio-dev.rst:102 +#: library/asyncio-dev.rst:98 #, fuzzy msgid "To handle signals the event loop must be run in the main thread." msgstr "" "Pour pouvoir traiter les signaux et démarrer des processus enfants, la " "boucle d'évènements doit être exécutée dans le fil principal." -#: library/asyncio-dev.rst:105 +#: library/asyncio-dev.rst:101 +#, fuzzy msgid "" -"The :meth:`loop.run_in_executor` method can be used with a :class:" -"`concurrent.futures.ThreadPoolExecutor` to execute blocking code in a " -"different OS thread without blocking the OS thread that the event loop runs " -"in." +"The :meth:`loop.run_in_executor` method can be used with " +"a :class:`concurrent.futures.ThreadPoolExecutor` " +"or :class:`~concurrent.futures.InterpreterPoolExecutor` to execute blocking " +"code in a different OS thread without blocking the OS thread that the event " +"loop runs in." msgstr "" -"La méthode :meth:`loop.run_in_executor` peut être utilisée avec :class:" -"`concurrent.futures.ThreadPoolExecutor` pour exécuter du code bloquant dans " -"un autre fil d'exécution, afin de ne pas bloquer le fil où la boucle " -"d'évènements se trouve." +"La méthode :meth:`loop.run_in_executor` peut être utilisée " +"avec :class:`concurrent.futures.ThreadPoolExecutor` pour exécuter du code " +"bloquant dans un autre fil d'exécution, afin de ne pas bloquer le fil où la " +"boucle d'évènements se trouve." -#: library/asyncio-dev.rst:110 +#: library/asyncio-dev.rst:107 msgid "" "There is currently no way to schedule coroutines or callbacks directly from " -"a different process (such as one started with :mod:`multiprocessing`). The :" -"ref:`asyncio-event-loop-methods` section lists APIs that can read from pipes " -"and watch file descriptors without blocking the event loop. In addition, " -"asyncio's :ref:`Subprocess ` APIs provide a way to start " -"a process and communicate with it from the event loop. Lastly, the " -"aforementioned :meth:`loop.run_in_executor` method can also be used with a :" -"class:`concurrent.futures.ProcessPoolExecutor` to execute code in a " +"a different process (such as one started with :mod:`multiprocessing`). " +"The :ref:`asyncio-event-loop-methods` section lists APIs that can read from " +"pipes and watch file descriptors without blocking the event loop. In " +"addition, asyncio's :ref:`Subprocess ` APIs provide a " +"way to start a process and communicate with it from the event loop. Lastly, " +"the aforementioned :meth:`loop.run_in_executor` method can also be used with " +"a :class:`concurrent.futures.ProcessPoolExecutor` to execute code in a " "different process." msgstr "" "Il n'y a actuellement aucune façon de planifier des coroutines ou des " @@ -231,16 +222,16 @@ msgstr "" "les tubes (*pipes*) et surveiller les descripteurs de fichiers sans bloquer " "la boucle d'évènements. De plus, les *API* :ref:`Subprocess ` d'*asyncio* fournissent un moyen de démarrer un processus et de " -"communiquer avec lui depuis la boucle d'évènements. Enfin, la méthode :meth:" -"`loop.run_in_executor` susmentionnée peut également être utilisée avec :" -"class:`concurrent.futures.ProcessPoolExecutor` pour exécuter du code dans un " -"processus différent." +"communiquer avec lui depuis la boucle d'évènements. Enfin, la " +"méthode :meth:`loop.run_in_executor` susmentionnée peut également être " +"utilisée avec :class:`concurrent.futures.ProcessPoolExecutor` pour exécuter " +"du code dans un processus différent." -#: library/asyncio-dev.rst:124 +#: library/asyncio-dev.rst:121 msgid "Running Blocking Code" msgstr "Exécution de code bloquant" -#: library/asyncio-dev.rst:126 +#: library/asyncio-dev.rst:123 msgid "" "Blocking (CPU-bound) code should not be called directly. For example, if a " "function performs a CPU-intensive calculation for 1 second, all concurrent " @@ -252,22 +243,24 @@ msgstr "" "*asyncio* concurrentes et les opérations d'entrées-sorties seront bloquées " "pour une seconde." -#: library/asyncio-dev.rst:131 +#: library/asyncio-dev.rst:128 +#, fuzzy msgid "" -"An executor can be used to run a task in a different thread or even in a " -"different process to avoid blocking the OS thread with the event loop. See " -"the :meth:`loop.run_in_executor` method for more details." +"An executor can be used to run a task in a different thread, including in a " +"different interpreter, or even in a different process to avoid blocking the " +"OS thread with the event loop. See the :meth:`loop.run_in_executor` method " +"for more details." msgstr "" "Un exécuteur peut être utilisé pour traiter une tâche dans un fil " "d'exécution ou un processus différent, afin d'éviter de bloquer le fil " -"d'exécution système dans lequel se trouve la boucle d’évènements. Voir :meth:" -"`loop.run_in_executor` pour plus de détails." +"d'exécution système dans lequel se trouve la boucle d’évènements. " +"Voir :meth:`loop.run_in_executor` pour plus de détails." -#: library/asyncio-dev.rst:140 +#: library/asyncio-dev.rst:138 msgid "Logging" msgstr "Journalisation" -#: library/asyncio-dev.rst:142 +#: library/asyncio-dev.rst:140 msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." @@ -275,7 +268,7 @@ msgstr "" "*Asyncio* utilise le module :mod:`logging`. Toutes les opérations de " "journalisation sont effectuées via l'enregistreur (*logger*) ``\"asyncio\"``." -#: library/asyncio-dev.rst:145 +#: library/asyncio-dev.rst:143 #, fuzzy msgid "" "The default log level is :py:const:`logging.INFO`, which can be easily " @@ -284,53 +277,53 @@ msgstr "" "Le niveau de journalisation par défaut est :py:data:`logging.INFO` mais peut " "être ajusté facilement ::" -#: library/asyncio-dev.rst:151 +#: library/asyncio-dev.rst:149 msgid "" "Network logging can block the event loop. It is recommended to use a " -"separate thread for handling logs or use non-blocking IO. For example, see :" -"ref:`blocking-handlers`." +"separate thread for handling logs or use non-blocking IO. For example, " +"see :ref:`blocking-handlers`." msgstr "" "La journalisation réseau peut bloquer la boucle d'événements. Il est " "recommandé d'utiliser un fil d'exécution séparé pour gérer les journaux ou " -"d'utiliser des entrées-sorties non bloquantes. Par exemple, voir :ref:" -"`blocking-handlers`." +"d'utiliser des entrées-sorties non bloquantes. Par exemple, " +"voir :ref:`blocking-handlers`." -#: library/asyncio-dev.rst:159 +#: library/asyncio-dev.rst:157 msgid "Detect never-awaited coroutines" msgstr "Détection des coroutines jamais attendues" -#: library/asyncio-dev.rst:161 +#: library/asyncio-dev.rst:159 msgid "" "When a coroutine function is called, but not awaited (e.g. ``coro()`` " -"instead of ``await coro()``) or the coroutine is not scheduled with :meth:" -"`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" +"instead of ``await coro()``) or the coroutine is not scheduled " +"with :meth:`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" msgstr "" "Lorsqu'une fonction coroutine est appelée mais qu'elle n'est pas attendue " "(p. ex. ``coro()`` au lieu de ``await coro()``) ou si la coroutine n'est " -"pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet un :exc:" -"`RuntimeWarning` ::" +"pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet " +"un :exc:`RuntimeWarning` ::" -#: library/asyncio-dev.rst:221 +#: library/asyncio-dev.rst:219 library/asyncio-dev.rst:450 msgid "Output::" msgstr "Sortie ::" -#: library/asyncio-dev.rst:237 +#: library/asyncio-dev.rst:235 msgid "Output in debug mode::" msgstr "Affichage en mode débogage ::" -#: library/asyncio-dev.rst:194 +#: library/asyncio-dev.rst:192 msgid "" -"The usual fix is to either await the coroutine or call the :meth:`asyncio." -"create_task` function::" +"The usual fix is to either await the coroutine or call " +"the :meth:`asyncio.create_task` function::" msgstr "" "La façon habituelle de régler ce problème est d'attendre (*await*) la " "coroutine ou bien d'appeler la fonction :meth:`asyncio.create_task` ::" -#: library/asyncio-dev.rst:202 +#: library/asyncio-dev.rst:200 msgid "Detect never-retrieved exceptions" msgstr "Détection des exceptions jamais récupérées" -#: library/asyncio-dev.rst:204 +#: library/asyncio-dev.rst:202 msgid "" "If a :meth:`Future.set_exception` is called but the Future object is never " "awaited on, the exception would never be propagated to the user code. In " @@ -342,14 +335,150 @@ msgstr "" "utilisateur. Dans ce cas, *asyncio* écrit un message dans le journal lorsque " "l'objet *Future* est récupéré par le ramasse-miette." -#: library/asyncio-dev.rst:209 +#: library/asyncio-dev.rst:207 msgid "Example of an unhandled exception::" msgstr "Exemple d'une exception non-gérée ::" -#: library/asyncio-dev.rst:232 +#: library/asyncio-dev.rst:230 msgid "" ":ref:`Enable the debug mode ` to get the traceback where " "the task was created::" msgstr "" ":ref:`Activez le mode débogage ` pour récupérer la trace " "d'appels indiquant où la tâche a été créée ::" + +#: library/asyncio-dev.rst:254 +msgid "Asynchronous generators best practices" +msgstr "" + +#: library/asyncio-dev.rst:256 +msgid "" +"Writing correct and efficient asyncio code requires awareness of certain " +"pitfalls. This section outlines essential best practices that can save you " +"hours of debugging." +msgstr "" + +#: library/asyncio-dev.rst:261 +msgid "Close asynchronous generators explicitly" +msgstr "" + +#: library/asyncio-dev.rst:263 +msgid "" +"It is recommended to manually close the :term:`asynchronous generator " +"`. If a generator exits early - for " +"example, due to an exception raised in the body of an ``async for`` loop - " +"its asynchronous cleanup code may run in an unexpected context. This can " +"occur after the tasks it depends on have completed, or during the event loop " +"shutdown when the async-generator's garbage collection hook is called." +msgstr "" + +#: library/asyncio-dev.rst:271 +msgid "" +"To avoid this, explicitly close the generator by calling " +"its :meth:`~agen.aclose` method, or use the :func:`contextlib.aclosing` " +"context manager::" +msgstr "" + +#: library/asyncio-dev.rst:289 +msgid "" +"As noted above, the cleanup code for these asynchronous generators is " +"deferred. The following example demonstrates that the finalization of an " +"asynchronous generator can occur in an unexpected order::" +msgstr "" + +#: library/asyncio-dev.rst:319 +msgid "For this example, we get the following output::" +msgstr "" + +#: library/asyncio-dev.rst:336 +msgid "" +"The ``cursor()`` asynchronous generator was finalized before the ``rows`` " +"generator - an unexpected behavior." +msgstr "" + +#: library/asyncio-dev.rst:339 +msgid "" +"The example can be fixed by explicitly closing the ``cursor`` and ``rows`` " +"async-generators::" +msgstr "" + +#: library/asyncio-dev.rst:352 +msgid "Create asynchronous generators only when the event loop is running" +msgstr "" + +#: library/asyncio-dev.rst:354 +msgid "" +"It is recommended to create :term:`asynchronous generators ` only after the event loop has been created." +msgstr "" + +#: library/asyncio-dev.rst:358 +msgid "" +"To ensure that asynchronous generators close reliably, the event loop uses " +"the :func:`sys.set_asyncgen_hooks` function to register callback functions. " +"These callbacks update the list of running asynchronous generators to keep " +"it in a consistent state." +msgstr "" + +#: library/asyncio-dev.rst:363 +msgid "" +"When the :meth:`loop.shutdown_asyncgens() ` " +"function is called, the running generators are stopped gracefully and the " +"list is cleared." +msgstr "" + +#: library/asyncio-dev.rst:367 +msgid "" +"The asynchronous generator invokes the corresponding system hook during its " +"first iteration. At the same time, the generator records that the hook has " +"been called and does not call it again." +msgstr "" + +#: library/asyncio-dev.rst:371 +msgid "" +"Therefore, if iteration begins before the event loop is created, the event " +"loop will not be able to add the generator to its list of active generators " +"because the hooks are set after the generator attempts to call them. " +"Consequently, the event loop will not be able to terminate the generator if " +"necessary." +msgstr "" + +#: library/asyncio-dev.rst:377 +msgid "Consider the following example::" +msgstr "" + +#: library/asyncio-dev.rst:403 +msgid "This example can be fixed as follows::" +msgstr "" + +#: library/asyncio-dev.rst:422 +msgid "Avoid concurrent iteration and closure of the same generator" +msgstr "" + +#: library/asyncio-dev.rst:424 +msgid "" +"Async generators may be reentered while " +"another :meth:`~agen.__anext__` / :meth:`~agen.athrow` / :meth:`~agen.aclose` " +"call is in progress. This may lead to an inconsistent state of the async " +"generator and can cause errors." +msgstr "" + +#: library/asyncio-dev.rst:429 +msgid "Let's consider the following example::" +msgstr "" + +#: library/asyncio-dev.rst:471 +msgid "" +"Therefore, it is recommended to avoid using asynchronous generators in " +"parallel tasks or across multiple event loops." +msgstr "" + +# long ref +#~ msgid "" +#~ "asyncio checks for :ref:`coroutines that were not awaited ` and logs them; this mitigates the \"forgotten " +#~ "await\" pitfall." +#~ msgstr "" +#~ "*asyncio* surveille les :ref:`coroutines qui ne sont jamais attendues " +#~ "` et les journalise ; cela atténue le " +#~ "problème des « *await* oubliés » ;" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index b2ed88425..cf29c9c9d 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-05 23:26+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: library/asyncio-eventloop.rst:8 -msgid "Event Loop" +#, fuzzy +msgid "Event loop" msgstr "Boucle d'évènements" #: library/asyncio-eventloop.rst:10 @@ -126,47 +127,56 @@ msgid "" "function, instead of using these lower level functions to manually create " "and close an event loop." msgstr "" -"Comme indiqué ci-dessus, envisagez d'utiliser la fonction de haut niveau :" -"func:`asyncio.run`, au lieu d'utiliser ces fonctions de bas niveau pour " -"créer et fermer manuellement une boucle d'événements." +"Comme indiqué ci-dessus, envisagez d'utiliser la fonction de haut " +"niveau :func:`asyncio.run`, au lieu d'utiliser ces fonctions de bas niveau " +"pour créer et fermer manuellement une boucle d'événements." #: library/asyncio-eventloop.rst:62 +#, fuzzy +msgid "Raises a :exc:`RuntimeError` if there is no current event loop." +msgstr "" +"Lève une :exc:`RuntimeError` s'il n'y a pas de boucle d'événements en cours " +"d'exécution." + +#: library/asyncio-eventloop.rst:67 msgid "" -"Deprecation warning is emitted if there is no current event loop. In some " -"future Python release this will become an error." +"The :mod:`!asyncio` policy system is deprecated and will be removed in " +"Python 3.16; from there on, this function will return the current running " +"event loop if present else it will return the loop set " +"by :func:`set_event_loop`." msgstr "" -#: library/asyncio-eventloop.rst:68 +#: library/asyncio-eventloop.rst:74 msgid "Set *loop* as the current event loop for the current OS thread." msgstr "" "Définit *loop* comme boucle d'événements actuelle pour le fil d'exécution " "actuel du système d'exploitation." -#: library/asyncio-eventloop.rst:72 +#: library/asyncio-eventloop.rst:78 msgid "Create and return a new event loop object." msgstr "Crée et renvoie un nouvel objet de boucle d'événements." -#: library/asyncio-eventloop.rst:74 +#: library/asyncio-eventloop.rst:80 msgid "" "Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, " "and :func:`new_event_loop` functions can be altered by :ref:`setting a " "custom event loop policy `." msgstr "" -"Notez que le comportement des fonctions :func:`get_event_loop`, :func:" -"`set_event_loop` et :func:`new_event_loop` peut être modifié en :ref:" -"`définissant une politique de boucle d'événement personnalisée `." +"Notez que le comportement des " +"fonctions :func:`get_event_loop`, :func:`set_event_loop` " +"et :func:`new_event_loop` peut être modifié en :ref:`définissant une " +"politique de boucle d'événement personnalisée `." -#: library/asyncio-eventloop.rst:80 +#: library/asyncio-eventloop.rst:86 msgid "Contents" msgstr "Sommaire" -#: library/asyncio-eventloop.rst:81 +#: library/asyncio-eventloop.rst:87 msgid "This documentation page contains the following sections:" msgstr "Cette page de documentation contient les sections suivantes :" # suit un : -#: library/asyncio-eventloop.rst:83 +#: library/asyncio-eventloop.rst:89 msgid "" "The `Event Loop Methods`_ section is the reference documentation of the " "event loop APIs;" @@ -175,18 +185,18 @@ msgstr "" "de boucle d'événements ;" # suit un : -#: library/asyncio-eventloop.rst:86 +#: library/asyncio-eventloop.rst:92 msgid "" -"The `Callback Handles`_ section documents the :class:`Handle` and :class:" -"`TimerHandle` instances which are returned from scheduling methods such as :" -"meth:`loop.call_soon` and :meth:`loop.call_later`;" +"The `Callback Handles`_ section documents the :class:`Handle` " +"and :class:`TimerHandle` instances which are returned from scheduling " +"methods such as :meth:`loop.call_soon` and :meth:`loop.call_later`;" msgstr "" -"la section `Callback Handles`_ documente les instances :class:`Handle` et :" -"class:`TimerHandle` qui sont renvoyées par les méthodes de planification " +"la section `Callback Handles`_ documente les instances :class:`Handle` " +"et :class:`TimerHandle` qui sont renvoyées par les méthodes de planification " "telles que :meth:`loop.call_soon` et :meth:`loop.call_later` ;" # suit un : -#: library/asyncio-eventloop.rst:90 +#: library/asyncio-eventloop.rst:96 msgid "" "The `Server Objects`_ section documents types returned from event loop " "methods like :meth:`loop.create_server`;" @@ -195,43 +205,44 @@ msgstr "" "de boucle d'événements comme :meth:`loop.create_server` ;" # suit un : -#: library/asyncio-eventloop.rst:93 +#: library/asyncio-eventloop.rst:99 msgid "" -"The `Event Loop Implementations`_ section documents the :class:" -"`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" +"The `Event Loop Implementations`_ section documents " +"the :class:`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" msgstr "" -"la section `Event Loop Implementations`_ documente les classes :class:" -"`SelectorEventLoop` et :class:`ProactorEventLoop` ;" +"la section `Event Loop Implementations`_ documente les " +"classes :class:`SelectorEventLoop` et :class:`ProactorEventLoop` ;" # suit un : -#: library/asyncio-eventloop.rst:96 +#: library/asyncio-eventloop.rst:102 msgid "" "The `Examples`_ section showcases how to work with some event loop APIs." msgstr "" "la section `Exemples`_ montre comment travailler avec certaines API de " "boucle d'événements." -#: library/asyncio-eventloop.rst:103 -msgid "Event Loop Methods" +#: library/asyncio-eventloop.rst:109 +#, fuzzy +msgid "Event loop methods" msgstr "Méthodes de la boucle d'évènements" -#: library/asyncio-eventloop.rst:105 +#: library/asyncio-eventloop.rst:111 msgid "Event loops have **low-level** APIs for the following:" msgstr "" "Les boucles d'événements ont des API **de bas niveau** pour les éléments " "suivants :" -#: library/asyncio-eventloop.rst:113 +#: library/asyncio-eventloop.rst:119 msgid "Running and stopping the loop" msgstr "Démarrer et arrêter une boucle d'évènements" -#: library/asyncio-eventloop.rst:117 +#: library/asyncio-eventloop.rst:123 msgid "Run until the *future* (an instance of :class:`Future`) has completed." msgstr "" "Lance la boucle jusqu'à ce que *future* (une instance de :class:`Future`) " "soit terminée." -#: library/asyncio-eventloop.rst:120 +#: library/asyncio-eventloop.rst:126 msgid "" "If the argument is a :ref:`coroutine object ` it is implicitly " "scheduled to run as a :class:`asyncio.Task`." @@ -239,16 +250,16 @@ msgstr "" "Si l'argument est un objet :ref:`coroutine `, il est " "implicitement programmé pour s'exécuter en tant que :class:`asyncio.Task`." -#: library/asyncio-eventloop.rst:123 +#: library/asyncio-eventloop.rst:129 msgid "Return the Future's result or raise its exception." msgstr "Renvoie le résultat du *Future* ou lève son exception." -#: library/asyncio-eventloop.rst:127 +#: library/asyncio-eventloop.rst:133 msgid "Run the event loop until :meth:`stop` is called." msgstr "" "Exécute la boucle d'événement jusqu'à ce que :meth:`stop` soit appelée." -#: library/asyncio-eventloop.rst:129 +#: library/asyncio-eventloop.rst:135 #, fuzzy msgid "" "If :meth:`stop` is called before :meth:`run_forever` is called, the loop " @@ -262,7 +273,7 @@ msgstr "" "événements d'entrée-sortie (et ceux qui étaient déjà programmés), puis " "quitte." -#: library/asyncio-eventloop.rst:134 +#: library/asyncio-eventloop.rst:140 msgid "" "If :meth:`stop` is called while :meth:`run_forever` is running, the loop " "will run the current batch of callbacks and then exit. Note that new " @@ -276,23 +287,23 @@ msgstr "" "s'exécuteront pas dans ce cas ; à la place, ils s'exécuteront la prochaine " "fois que :meth:`run_forever` ou :meth:`run_until_complete` sera appelée." -#: library/asyncio-eventloop.rst:142 +#: library/asyncio-eventloop.rst:148 msgid "Stop the event loop." msgstr "Arrête l'exécution de la boucle d'évènements." -#: library/asyncio-eventloop.rst:146 +#: library/asyncio-eventloop.rst:152 msgid "Return ``True`` if the event loop is currently running." msgstr "Renvoie ``True`` si la boucle d'évènements est démarrée." -#: library/asyncio-eventloop.rst:150 +#: library/asyncio-eventloop.rst:156 msgid "Return ``True`` if the event loop was closed." msgstr "Renvoie ``True`` si la boucle d'évènements est arrêtée." -#: library/asyncio-eventloop.rst:154 +#: library/asyncio-eventloop.rst:160 msgid "Close the event loop." msgstr "Arrête la boucle d'évènements." -#: library/asyncio-eventloop.rst:156 +#: library/asyncio-eventloop.rst:162 msgid "" "The loop must not be running when this function is called. Any pending " "callbacks will be discarded." @@ -300,7 +311,7 @@ msgstr "" "La boucle ne doit pas être en cours d'exécution lorsque cette fonction est " "appelée. Tous les rappels en attente seront ignorés." -#: library/asyncio-eventloop.rst:159 +#: library/asyncio-eventloop.rst:165 msgid "" "This method clears all queues and shuts down the executor, but does not wait " "for the executor to finish." @@ -308,7 +319,7 @@ msgstr "" "Cette méthode efface toutes les files d'attente et arrête l'exécuteur, mais " "n'attend pas que l'exécuteur se termine." -#: library/asyncio-eventloop.rst:162 +#: library/asyncio-eventloop.rst:168 msgid "" "This method is idempotent and irreversible. No other methods should be " "called after the event loop is closed." @@ -316,7 +327,7 @@ msgstr "" "Cette méthode est idempotente et irréversible. Aucune autre méthode ne doit " "être appelée après la fermeture de la boucle d'événements." -#: library/asyncio-eventloop.rst:167 +#: library/asyncio-eventloop.rst:174 #, fuzzy msgid "" "Schedule all currently open :term:`asynchronous generator` objects to close " @@ -325,45 +336,45 @@ msgid "" "should be used to reliably finalize all scheduled asynchronous generators." msgstr "" "Planifie la fermeture de tous les objets :term:`générateurs asynchrones " -"` actuellement ouverts avec un appel :meth:`~agen." -"aclose()`. Après avoir appelé cette méthode, la boucle d'événements émet un " -"avertissement si un nouveau générateur asynchrone est itéré. Elle doit être " -"utilisée pour finaliser de manière fiable tous les générateurs asynchrones " -"planifiés." +"` actuellement ouverts avec un " +"appel :meth:`~agen.aclose()`. Après avoir appelé cette méthode, la boucle " +"d'événements émet un avertissement si un nouveau générateur asynchrone est " +"itéré. Elle doit être utilisée pour finaliser de manière fiable tous les " +"générateurs asynchrones planifiés." -#: library/asyncio-eventloop.rst:173 +#: library/asyncio-eventloop.rst:180 msgid "" "Note that there is no need to call this function when :func:`asyncio.run` is " "used." msgstr "" -"Notez qu'il n'est pas nécessaire d'appeler cette fonction lorsque :func:" -"`asyncio.run` est utilisée." +"Notez qu'il n'est pas nécessaire d'appeler cette fonction " +"lorsque :func:`asyncio.run` est utilisée." -#: library/asyncio-eventloop.rst:176 library/asyncio-eventloop.rst:1269 -#: library/asyncio-eventloop.rst:1712 +#: library/asyncio-eventloop.rst:183 library/asyncio-eventloop.rst:1357 +#: library/asyncio-eventloop.rst:1819 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-eventloop.rst:188 +#: library/asyncio-eventloop.rst:196 msgid "" "Schedule the closure of the default executor and wait for it to join all of " "the threads in the :class:`~concurrent.futures.ThreadPoolExecutor`. Once " -"this method has been called, using the default executor with :meth:`loop." -"run_in_executor` will raise a :exc:`RuntimeError`." +"this method has been called, using the default executor " +"with :meth:`loop.run_in_executor` will raise a :exc:`RuntimeError`." msgstr "" "Planifie la fermeture de l'exécuteur par défaut et attend que tous les fils " "se rejoignent dans le :class:`~concurrent.futures.ThreadPoolExecutor`. Une " -"fois cette méthode appelée, l'utilisation de l'exécuteur par défaut avec :" -"meth:`loop.run_in_executor` lève une :exc:`RuntimeError`." +"fois cette méthode appelée, l'utilisation de l'exécuteur par défaut " +"avec :meth:`loop.run_in_executor` lève une :exc:`RuntimeError`." -#: library/asyncio-eventloop.rst:194 +#: library/asyncio-eventloop.rst:202 msgid "" "The *timeout* parameter specifies the amount of time (in :class:`float` " "seconds) the executor will be given to finish joining. With the default, " "``None``, the executor is allowed an unlimited amount of time." msgstr "" -#: library/asyncio-eventloop.rst:199 +#: library/asyncio-eventloop.rst:207 msgid "" "If the *timeout* is reached, a :exc:`RuntimeWarning` is emitted and the " "default executor is terminated without waiting for its threads to finish " @@ -371,7 +382,7 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:205 +#: library/asyncio-eventloop.rst:213 msgid "" "Do not call this method when using :func:`asyncio.run`, as the latter " "handles default executor shutdown automatically." @@ -379,16 +390,16 @@ msgstr "" "n'appelez pas cette méthode lorsque vous utilisez :func:`asyncio.run`, car " "cette dernière gère automatiquement l'arrêt de l'exécuteur par défaut." -#: library/asyncio-eventloop.rst:210 +#: library/asyncio-eventloop.rst:218 #, fuzzy msgid "Added the *timeout* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:214 +#: library/asyncio-eventloop.rst:222 msgid "Scheduling callbacks" msgstr "Planification des fonctions de rappel" -#: library/asyncio-eventloop.rst:218 +#: library/asyncio-eventloop.rst:226 msgid "" "Schedule the *callback* :term:`callback` to be called with *args* arguments " "at the next iteration of the event loop." @@ -396,7 +407,7 @@ msgstr "" "Définit la :term:`fonction de rappel ` *callback* à appeler avec " "les arguments *args* à la prochaine itération de la boucle d'événements." -#: library/asyncio-eventloop.rst:221 +#: library/asyncio-eventloop.rst:229 msgid "" "Return an instance of :class:`asyncio.Handle`, which can be used later to " "cancel the callback." @@ -404,7 +415,7 @@ msgstr "" "Renvoie une instance de :class:`asyncio.Handle`, qui pourra être utilisée " "ultérieurement pour annuler le rappel." -#: library/asyncio-eventloop.rst:224 +#: library/asyncio-eventloop.rst:232 msgid "" "Callbacks are called in the order in which they are registered. Each " "callback will be called exactly once." @@ -412,34 +423,41 @@ msgstr "" "Les fonctions de rappels sont appelées dans l'ordre dans lequel elles sont " "enregistrées. Chaque fonction de rappel sera appelée exactement une fois." -#: library/asyncio-eventloop.rst:227 +#: library/asyncio-eventloop.rst:235 msgid "" -"The optional keyword-only *context* argument specifies a custom :class:" -"`contextvars.Context` for the *callback* to run in. Callbacks use the " -"current context when no *context* is provided." +"The optional keyword-only *context* argument specifies a " +"custom :class:`contextvars.Context` for the *callback* to run in. Callbacks " +"use the current context when no *context* is provided." msgstr "" -"L'argument facultatif nommé uniquement *context* spécifie un :class:" -"`contextvars.Context` personnalisé pour le *callback* à exécuter. Les " -"rappels utilisent le contexte actuel lorsqu'aucun *context* n'est fourni." +"L'argument facultatif nommé uniquement *context* spécifie " +"un :class:`contextvars.Context` personnalisé pour le *callback* à exécuter. " +"Les rappels utilisent le contexte actuel lorsqu'aucun *context* n'est fourni." -#: library/asyncio-eventloop.rst:231 +#: library/asyncio-eventloop.rst:239 msgid "Unlike :meth:`call_soon_threadsafe`, this method is not thread-safe." msgstr "" "Contrairement à :meth:`call_soon_threadsafe`, cette méthode n'est pas " "compatible avec les programmes à fils d'exécution multiples." -#: library/asyncio-eventloop.rst:235 +#: library/asyncio-eventloop.rst:243 msgid "" "A thread-safe variant of :meth:`call_soon`. When scheduling callbacks from " "another thread, this function *must* be used, since :meth:`call_soon` is not " "thread-safe." msgstr "" -"Une variante compatible avec les programmes à fils d'exécution multiples de :" -"meth:`call_soon`. Lors de la planification de rappels à partir d'un autre " -"fil d'exécution, cette fonction *doit* être utilisée, puisque :meth:" -"`call_soon` n'est pas thread-safe." +"Une variante compatible avec les programmes à fils d'exécution multiples " +"de :meth:`call_soon`. Lors de la planification de rappels à partir d'un " +"autre fil d'exécution, cette fonction *doit* être utilisée, " +"puisque :meth:`call_soon` n'est pas thread-safe." -#: library/asyncio-eventloop.rst:239 +#: library/asyncio-eventloop.rst:247 +msgid "" +"This function is safe to be called from a reentrant context or signal " +"handler, however, it is not safe or fruitful to use the returned handle in " +"such contexts." +msgstr "" + +#: library/asyncio-eventloop.rst:250 msgid "" "Raises :exc:`RuntimeError` if called on a loop that's been closed. This can " "happen on a secondary thread when the main application is shutting down." @@ -448,7 +466,7 @@ msgstr "" "fermée. Cela peut se produire sur un fil secondaire lorsque l'application " "principale se ferme." -#: library/asyncio-eventloop.rst:243 +#: library/asyncio-eventloop.rst:254 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -457,8 +475,8 @@ msgstr "" "` de la documentation." # suit un : -#: library/asyncio-eventloop.rst:246 library/asyncio-eventloop.rst:296 -#: library/asyncio-eventloop.rst:316 +#: library/asyncio-eventloop.rst:257 library/asyncio-eventloop.rst:314 +#: library/asyncio-eventloop.rst:340 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." @@ -467,16 +485,16 @@ msgstr "" "plus de détails." # suit un : -#: library/asyncio-eventloop.rst:254 +#: library/asyncio-eventloop.rst:265 msgid "" "Most :mod:`asyncio` scheduling functions don't allow passing keyword " "arguments. To do that, use :func:`functools.partial`::" msgstr "" "la plupart des fonctions d'ordonnancement :mod:`asyncio` n'autorisent pas le " -"passage d'arguments nommés. Pour le faire, utilisez :func:`functools." -"partial` ::" +"passage d'arguments nommés. Pour le faire, " +"utilisez :func:`functools.partial` ::" -#: library/asyncio-eventloop.rst:261 +#: library/asyncio-eventloop.rst:272 msgid "" "Using partial objects is usually more convenient than using lambdas, as " "asyncio can render partial objects better in debug and error messages." @@ -485,11 +503,11 @@ msgstr "" "l'utilisation de lambdas, car *asyncio* peut mieux rendre les objets " "partiels dans les messages de débogage et d'erreur." -#: library/asyncio-eventloop.rst:269 +#: library/asyncio-eventloop.rst:280 msgid "Scheduling delayed callbacks" msgstr "Planification des rappels différés" -#: library/asyncio-eventloop.rst:271 +#: library/asyncio-eventloop.rst:282 msgid "" "Event loop provides mechanisms to schedule callback functions to be called " "at some point in the future. Event loop uses monotonic clocks to track time." @@ -498,7 +516,7 @@ msgstr "" "de rappel à appeler à un moment donné dans le futur. La boucle d'événements " "utilise des horloges monotones pour suivre le temps." -#: library/asyncio-eventloop.rst:278 +#: library/asyncio-eventloop.rst:289 msgid "" "Schedule *callback* to be called after the given *delay* number of seconds " "(can be either an int or a float)." @@ -506,7 +524,7 @@ msgstr "" "Planifie le rappel *callback* à appeler après *delay* secondes (peut être un " "entier ou un flottant)." -#: library/asyncio-eventloop.rst:281 library/asyncio-eventloop.rst:313 +#: library/asyncio-eventloop.rst:292 library/asyncio-eventloop.rst:331 msgid "" "An instance of :class:`asyncio.TimerHandle` is returned which can be used to " "cancel the callback." @@ -514,7 +532,7 @@ msgstr "" "Une instance de :class:`asyncio.TimerHandle` est renvoyée et peut être " "utilisée pour annuler le rappel." -#: library/asyncio-eventloop.rst:284 +#: library/asyncio-eventloop.rst:295 msgid "" "*callback* will be called exactly once. If two callbacks are scheduled for " "exactly the same time, the order in which they are called is undefined." @@ -523,28 +541,35 @@ msgstr "" "exactement à la même heure, l'ordre dans lequel ils sont appelés n'est pas " "défini." -#: library/asyncio-eventloop.rst:288 +#: library/asyncio-eventloop.rst:299 +#, fuzzy msgid "" "The optional positional *args* will be passed to the callback when it is " -"called. If you want the callback to be called with keyword arguments use :" -"func:`functools.partial`." +"called. Use :func:`functools.partial` :ref:`to pass keyword arguments " +"` to *callback*." msgstr "" -"L'argument positionnel facultatif *args* sera transmis au rappel lorsqu'il " -"sera appelé. Si vous voulez que le rappel soit appelé avec des arguments " -"nommés, utilisez :func:`functools.partial`." +"Utilisez :func:`functools.partial` pour :ref:`passer des arguments nommés " +"` à *callback*." -#: library/asyncio-eventloop.rst:292 +#: library/asyncio-eventloop.rst:304 msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *callback* to run in. The current " -"context is used when no *context* is provided." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the *callback* to run in. The " +"current context is used when no *context* is provided." +msgstr "" +"Un argument facultatif *context* nommé uniquement permet de spécifier " +"un :class:`contextvars.Context` personnalisé pour le *callback* à exécuter. " +"Le contexte actuel est utilisé lorsqu'aucun *context* n'est fourni." + +#: library/asyncio-eventloop.rst:310 +msgid "" +"For performance, callbacks scheduled with :meth:`loop.call_later` may run up " +"to one clock-resolution early (see " +"``time.get_clock_info('monotonic').resolution``)." msgstr "" -"Un argument facultatif *context* nommé uniquement permet de spécifier un :" -"class:`contextvars.Context` personnalisé pour le *callback* à exécuter. Le " -"contexte actuel est utilisé lorsqu'aucun *context* n'est fourni." # suit un : -#: library/asyncio-eventloop.rst:300 +#: library/asyncio-eventloop.rst:318 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "*delay* could not exceed one day. This has been fixed in Python 3.8." @@ -553,21 +578,28 @@ msgstr "" "d'événements par défaut, le *delay* ne pouvait pas dépasser un jour. Cela a " "été corrigé dans Python 3.8." -#: library/asyncio-eventloop.rst:307 +#: library/asyncio-eventloop.rst:325 msgid "" "Schedule *callback* to be called at the given absolute timestamp *when* (an " "int or a float), using the same time reference as :meth:`loop.time`." msgstr "" "Planifie l'appel de *callback* à l'horodatage absolu donné *when* (un *int* " -"ou un *float*), en utilisant la même référence de temps que :meth:`loop." -"time`." +"ou un *float*), en utilisant la même référence de temps " +"que :meth:`loop.time`." -#: library/asyncio-eventloop.rst:311 +#: library/asyncio-eventloop.rst:329 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "Le comportement de cette méthode est le même que :meth:`call_later`." +#: library/asyncio-eventloop.rst:336 +msgid "" +"For performance, callbacks scheduled with :meth:`loop.call_at` may run up to " +"one clock-resolution early (see " +"``time.get_clock_info('monotonic').resolution``)." +msgstr "" + # suit un : -#: library/asyncio-eventloop.rst:320 +#: library/asyncio-eventloop.rst:344 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "difference between *when* and the current time could not exceed one day. " @@ -577,7 +609,7 @@ msgstr "" "d'événements par défaut, la différence entre *when* et l'heure actuelle ne " "pouvait pas dépasser un jour. Cela a été corrigé dans Python 3.8." -#: library/asyncio-eventloop.rst:327 +#: library/asyncio-eventloop.rst:351 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." @@ -586,7 +618,7 @@ msgstr "" "l'horloge monotone interne de la boucle d'événements." # suit un : -#: library/asyncio-eventloop.rst:331 +#: library/asyncio-eventloop.rst:355 msgid "" "In Python 3.7 and earlier timeouts (relative *delay* or absolute *when*) " "should not exceed one day. This has been fixed in Python 3.8." @@ -596,20 +628,21 @@ msgstr "" "été corrigé dans Python 3.8." # suit un : -#: library/asyncio-eventloop.rst:337 +#: library/asyncio-eventloop.rst:361 msgid "The :func:`asyncio.sleep` function." msgstr "la fonction :func:`asyncio.sleep`." -#: library/asyncio-eventloop.rst:341 -msgid "Creating Futures and Tasks" +#: library/asyncio-eventloop.rst:365 +#, fuzzy +msgid "Creating futures and tasks" msgstr "Création de *Futures* et des tâches" -#: library/asyncio-eventloop.rst:345 +#: library/asyncio-eventloop.rst:369 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" "Crée un objet :class:`asyncio.Future` attaché à la boucle d'événements." -#: library/asyncio-eventloop.rst:347 +#: library/asyncio-eventloop.rst:371 msgid "" "This is the preferred way to create Futures in asyncio. This lets third-" "party event loops provide alternative implementations of the Future object " @@ -620,25 +653,32 @@ msgstr "" "alternatives de l'objet *Future* (avec de meilleures performances ou " "instrumentation)." -#: library/asyncio-eventloop.rst:355 +#: library/asyncio-eventloop.rst:379 msgid "" -"Schedule the execution of :ref:`coroutine ` *coro*. Return a :" -"class:`Task` object." +"Schedule the execution of :ref:`coroutine ` *coro*. Return " +"a :class:`Task` object." msgstr "" "Planifie l'exécution de :ref:`coroutine ` *coro*. Renvoie un " "objet :class:`Task`." -#: library/asyncio-eventloop.rst:358 +#: library/asyncio-eventloop.rst:382 msgid "" "Third-party event loops can use their own subclass of :class:`Task` for " -"interoperability. In this case, the result type is a subclass of :class:" -"`Task`." +"interoperability. In this case, the result type is a subclass " +"of :class:`Task`." msgstr "" "Les boucles d'événements tierces peuvent utiliser leur propre sous-classe " "de :class:`Task` pour l'interopérabilité. Dans ce cas, le type de résultat " "est une sous-classe de :class:`Task`." -#: library/asyncio-eventloop.rst:362 +#: library/asyncio-eventloop.rst:386 +msgid "" +"The full function signature is largely the same as that of the :class:`Task` " +"constructor (or factory) - all of the keyword arguments to this function are " +"passed through to that interface." +msgstr "" + +#: library/asyncio-eventloop.rst:390 msgid "" "If the *name* argument is provided and not ``None``, it is set as the name " "of the task using :meth:`Task.set_name`." @@ -646,37 +686,65 @@ msgstr "" "Si l'argument *name* est fourni et non ``None``, il est défini comme le nom " "de la tâche en utilisant :meth:`Task.set_name`." -#: library/asyncio-eventloop.rst:365 +#: library/asyncio-eventloop.rst:393 msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *coro* to run in. The current context " -"copy is created when no *context* is provided." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the *coro* to run in. The current " +"context copy is created when no *context* is provided." msgstr "" -"Argument facultatif *context* nommé uniquement qui permet de spécifier un :" -"class:`contextvars.Context` personnalisé pour la *coro* à exécuter. La copie " -"de contexte actuel est créée lorsqu'aucun *context* n'est fourni." +"Argument facultatif *context* nommé uniquement qui permet de spécifier " +"un :class:`contextvars.Context` personnalisé pour la *coro* à exécuter. La " +"copie de contexte actuel est créée lorsqu'aucun *context* n'est fourni." -#: library/asyncio-eventloop.rst:369 +#: library/asyncio-eventloop.rst:397 +msgid "" +"An optional keyword-only *eager_start* argument allows specifying if the " +"task should execute eagerly during the call to create_task, or be scheduled " +"later. If *eager_start* is not passed the mode set " +"by :meth:`loop.set_task_factory` will be used." +msgstr "" + +#: library/asyncio-eventloop.rst:402 msgid "Added the *name* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:372 +#: library/asyncio-eventloop.rst:405 msgid "Added the *context* parameter." msgstr "ajout du paramètre ``context``." -#: library/asyncio-eventloop.rst:377 +#: library/asyncio-eventloop.rst:408 +msgid "" +"Added ``kwargs`` which passes on arbitrary extra parameters, including " +"``name`` and ``context``." +msgstr "" + +#: library/asyncio-eventloop.rst:411 +msgid "" +"Rolled back the change that passes on *name* and *context* (if it is None), " +"while still passing on other arbitrary keyword arguments (to avoid breaking " +"backwards compatibility with 3.13.3)." +msgstr "" + +#: library/asyncio-eventloop.rst:415 +msgid "" +"All *kwargs* are now passed on. The *eager_start* parameter works with eager " +"task factories." +msgstr "" + +#: library/asyncio-eventloop.rst:420 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -"Définit une fabrique de tâches qui sera utilisée par :meth:`loop." -"create_task`." +"Définit une fabrique de tâches qui sera utilisée " +"par :meth:`loop.create_task`." -#: library/asyncio-eventloop.rst:380 +#: library/asyncio-eventloop.rst:423 +#, fuzzy msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " "*factory* must be a *callable* with the signature matching ``(loop, coro, " -"context=None)``, where *loop* is a reference to the active event loop, and " -"*coro* is a coroutine object. The callable must return a :class:`asyncio." -"Future`-compatible object." +"**kwargs)``, where *loop* is a reference to the active event loop, and " +"*coro* is a coroutine object. The callable must pass on all *kwargs*, and " +"return a :class:`asyncio.Task`-compatible object." msgstr "" "Si *factory* est ``None``, la fabrique de tâches par défaut sera définie. " "Sinon, *factory* doit être un *appelable* avec la signature correspondant à " @@ -684,16 +752,32 @@ msgstr "" "d'événements active et *coro* est un objet coroutine . L'appelable doit " "renvoyer un objet compatible avec :class:`asyncio.Future`." -#: library/asyncio-eventloop.rst:388 +#: library/asyncio-eventloop.rst:429 +msgid "Required that all *kwargs* are passed on to :class:`asyncio.Task`." +msgstr "" + +#: library/asyncio-eventloop.rst:432 +msgid "" +"*name* is no longer passed to task factories. *context* is no longer passed " +"to task factories if it is ``None``." +msgstr "" + +#: library/asyncio-eventloop.rst:436 +msgid "" +"*name* and *context* are now unconditionally passed on to task factories " +"again." +msgstr "" + +#: library/asyncio-eventloop.rst:441 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" "Renvoie une fabrique de tâches ou ``None`` si celle par défaut est utilisée." -#: library/asyncio-eventloop.rst:392 +#: library/asyncio-eventloop.rst:445 msgid "Opening network connections" msgstr "Création de connexions" -#: library/asyncio-eventloop.rst:403 +#: library/asyncio-eventloop.rst:457 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." @@ -701,32 +785,32 @@ msgstr "" "Ouvre un flux de transport connecté à l'adresse spécifiée par *host* et " "*port*." -#: library/asyncio-eventloop.rst:406 +#: library/asyncio-eventloop.rst:460 #, fuzzy msgid "" -"The socket family can be either :py:const:`~socket.AF_INET` or :py:const:" -"`~socket.AF_INET6` depending on *host* (or the *family* argument, if " -"provided)." +"The socket family can be either :py:const:`~socket.AF_INET` " +"or :py:const:`~socket.AF_INET6` depending on *host* (or the *family* " +"argument, if provided)." msgstr "" -"La famille de connecteur peut être :py:data:`~socket.AF_INET` ou :py:data:" -"`~socket.AF_INET6` en fonction de *host* (ou l'argument *family*, s'il est " -"fourni)." +"La famille de connecteur peut être :py:data:`~socket.AF_INET` " +"ou :py:data:`~socket.AF_INET6` en fonction de *host* (ou l'argument " +"*family*, s'il est fourni)." -#: library/asyncio-eventloop.rst:410 +#: library/asyncio-eventloop.rst:464 #, fuzzy msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "Le type de connecteur sera :py:data:`~socket.SOCK_STREAM`." -#: library/asyncio-eventloop.rst:412 library/asyncio-eventloop.rst:1180 -#: library/asyncio-eventloop.rst:1196 +#: library/asyncio-eventloop.rst:466 library/asyncio-eventloop.rst:1265 +#: library/asyncio-eventloop.rst:1282 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -"*protocol_factory* doit être un appelable renvoyant un protocole gérant le :" -"ref:`protocole asyncio `." +"*protocol_factory* doit être un appelable renvoyant un protocole gérant " +"le :ref:`protocole asyncio `." -#: library/asyncio-eventloop.rst:415 +#: library/asyncio-eventloop.rst:469 msgid "" "This method will try to establish the connection in the background. When " "successful, it returns a ``(transport, protocol)`` pair." @@ -734,11 +818,11 @@ msgstr "" "Cette méthode tente d'établir la connexion en arrière-plan. En cas de " "succès, elle renvoie une paire ``(transport, protocol)``." -#: library/asyncio-eventloop.rst:418 +#: library/asyncio-eventloop.rst:472 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "Le synopsis chronologique de l'opération sous-jacente est le suivant :" -#: library/asyncio-eventloop.rst:420 +#: library/asyncio-eventloop.rst:474 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." @@ -746,55 +830,55 @@ msgstr "" "La connexion est établie et un :ref:`transport asyncio ` " "est créé pour cela." -#: library/asyncio-eventloop.rst:423 +#: library/asyncio-eventloop.rst:477 msgid "" -"*protocol_factory* is called without arguments and is expected to return a :" -"ref:`protocol ` instance." +"*protocol_factory* is called without arguments and is expected to return " +"a :ref:`protocol ` instance." msgstr "" "*protocol_factory* est appelée sans arguments et doit renvoyer une instance " "de :ref:`protocol asyncio `." -#: library/asyncio-eventloop.rst:426 +#: library/asyncio-eventloop.rst:480 msgid "" -"The protocol instance is coupled with the transport by calling its :meth:" -"`~BaseProtocol.connection_made` method." +"The protocol instance is coupled with the transport by calling " +"its :meth:`~BaseProtocol.connection_made` method." msgstr "" -"L'instance de protocole est couplée au transport en appelant sa méthode :" -"meth:`~BaseProtocol.connection_made`." +"L'instance de protocole est couplée au transport en appelant sa " +"méthode :meth:`~BaseProtocol.connection_made`." -#: library/asyncio-eventloop.rst:429 +#: library/asyncio-eventloop.rst:483 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "Un *n*-uplet ``(transport, protocol)`` est renvoyé en cas de succès." -#: library/asyncio-eventloop.rst:431 +#: library/asyncio-eventloop.rst:485 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" "Le transport créé est un flux bidirectionnel dépendant de l'implémentation." -#: library/asyncio-eventloop.rst:434 library/asyncio-eventloop.rst:566 +#: library/asyncio-eventloop.rst:488 library/asyncio-eventloop.rst:621 msgid "Other arguments:" msgstr "Autres arguments :" -#: library/asyncio-eventloop.rst:436 +#: library/asyncio-eventloop.rst:490 msgid "" "*ssl*: if given and not false, a SSL/TLS transport is created (by default a " "plain TCP transport is created). If *ssl* is a :class:`ssl.SSLContext` " -"object, this context is used to create the transport; if *ssl* is :const:" -"`True`, a default context returned from :func:`ssl.create_default_context` " -"is used." +"object, this context is used to create the transport; if *ssl* " +"is :const:`True`, a default context returned " +"from :func:`ssl.create_default_context` is used." msgstr "" "*ssl* : s'il est donné et non faux, un transport SSL/TLS est créé (par " -"défaut un transport TCP simple est créé). Si *ssl* est un objet :class:`ssl." -"SSLContext`, ce contexte est utilisé pour créer le transport ; si *ssl* est :" -"const:`True`, un contexte par défaut renvoyé par :func:`ssl." -"create_default_context` est utilisé." +"défaut un transport TCP simple est créé). Si *ssl* est un " +"objet :class:`ssl.SSLContext`, ce contexte est utilisé pour créer le " +"transport ; si *ssl* est :const:`True`, un contexte par défaut renvoyé " +"par :func:`ssl.create_default_context` est utilisé." -#: library/asyncio-eventloop.rst:442 +#: library/asyncio-eventloop.rst:496 msgid ":ref:`SSL/TLS security considerations `" msgstr ":ref:`Considérations sur la sécurité SSL/TLS `" -#: library/asyncio-eventloop.rst:444 +#: library/asyncio-eventloop.rst:498 msgid "" "*server_hostname* sets or overrides the hostname that the target server's " "certificate will be matched against. Should only be passed if *ssl* is not " @@ -813,7 +897,7 @@ msgstr "" "sécurité sérieux, permettant des attaques potentielles de type « homme du " "milieu »)." -#: library/asyncio-eventloop.rst:452 +#: library/asyncio-eventloop.rst:506 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -825,7 +909,7 @@ msgstr "" "de *host*. S'ils sont fournis, ils doivent tous être des entiers provenant " "des constantes du module :mod:`socket`." -#: library/asyncio-eventloop.rst:457 +#: library/asyncio-eventloop.rst:511 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " @@ -842,7 +926,7 @@ msgstr "" "par défaut raisonnable recommandée par la RFC est ``0.25`` (250 " "millisecondes)." -#: library/asyncio-eventloop.rst:465 +#: library/asyncio-eventloop.rst:519 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " @@ -857,16 +941,16 @@ msgstr "" "aucune réorganisation n'est effectuée et les adresses sont essayées dans " "l'ordre renvoyé par :meth:`getaddrinfo`. Si un entier positif est spécifié, " "les adresses sont entrelacées par famille d'adresses et l'entier donné est " -"interprété comme \"First Address Family Count\" tel que défini dans la :rfc:" -"`8305`. La valeur par défaut est ``0`` si *happy_eyeballs_delay* n'est pas " -"spécifié, et ``1`` si c'est le cas." +"interprété comme \"First Address Family Count\" tel que défini dans " +"la :rfc:`8305`. La valeur par défaut est ``0`` si *happy_eyeballs_delay* " +"n'est pas spécifié, et ``1`` si c'est le cas." -#: library/asyncio-eventloop.rst:474 +#: library/asyncio-eventloop.rst:528 msgid "" -"*sock*, if given, should be an existing, already connected :class:`socket." -"socket` object to be used by the transport. If *sock* is given, none of " -"*host*, *port*, *family*, *proto*, *flags*, *happy_eyeballs_delay*, " -"*interleave* and *local_addr* should be specified." +"*sock*, if given, should be an existing, already " +"connected :class:`socket.socket` object to be used by the transport. If " +"*sock* is given, none of *host*, *port*, *family*, *proto*, *flags*, " +"*happy_eyeballs_delay*, *interleave* and *local_addr* should be specified." msgstr "" "*sock*, s'il est fourni, doit être un objet :class:`socket.socket` existant " "et déjà connecté à utiliser par le transport. Si *sock* est donné, aucun des " @@ -874,18 +958,18 @@ msgstr "" "*interleave* et *local_addr* ne doit être spécifié." # suit un : -#: library/asyncio-eventloop.rst:482 library/asyncio-eventloop.rst:597 -#: library/asyncio-eventloop.rst:841 +#: library/asyncio-eventloop.rst:536 library/asyncio-eventloop.rst:658 +#: library/asyncio-eventloop.rst:906 msgid "" "The *sock* argument transfers ownership of the socket to the transport " -"created. To close the socket, call the transport's :meth:`~asyncio." -"BaseTransport.close` method." +"created. To close the socket, call the " +"transport's :meth:`~asyncio.BaseTransport.close` method." msgstr "" "l'argument *sock* transfère la propriété du connecteur au transport créé. " -"Pour fermer le connecteur, appelez la méthode :meth:`~asyncio.BaseTransport." -"close` du transport." +"Pour fermer le connecteur, appelez la " +"méthode :meth:`~asyncio.BaseTransport.close` du transport." -#: library/asyncio-eventloop.rst:486 +#: library/asyncio-eventloop.rst:540 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using " @@ -896,7 +980,7 @@ msgstr "" "sont recherchés en utilisant ``getaddrinfo()``, de la même manière que " "*host* et *port*." -#: library/asyncio-eventloop.rst:490 library/asyncio-eventloop.rst:935 +#: library/asyncio-eventloop.rst:544 library/asyncio-eventloop.rst:1002 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " @@ -906,8 +990,8 @@ msgstr "" "attendre que la poignée de main TLS se termine avant d'abandonner la " "connexion. ``60.0`` secondes si ``None`` (par défaut)." -#: library/asyncio-eventloop.rst:494 library/asyncio-eventloop.rst:750 -#: library/asyncio-eventloop.rst:852 library/asyncio-eventloop.rst:939 +#: library/asyncio-eventloop.rst:548 library/asyncio-eventloop.rst:813 +#: library/asyncio-eventloop.rst:917 library/asyncio-eventloop.rst:1006 msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " "to complete before aborting the connection. ``30.0`` seconds if ``None`` " @@ -917,7 +1001,7 @@ msgstr "" "se termine avant d'abandonner la connexion. ``30.0`` secondes si ``None`` " "(par défaut)." -#: library/asyncio-eventloop.rst:498 +#: library/asyncio-eventloop.rst:552 msgid "" "*all_errors* determines what exceptions are raised when a connection cannot " "be created. By default, only a single ``Exception`` is raised: the first " @@ -928,13 +1012,13 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:508 library/asyncio-eventloop.rst:762 +#: library/asyncio-eventloop.rst:562 library/asyncio-eventloop.rst:825 msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." msgstr "" "ajout de la prise en charge de SSL/TLS dans :class:`ProactorEventLoop`." # suit un : -#: library/asyncio-eventloop.rst:512 +#: library/asyncio-eventloop.rst:566 #, fuzzy msgid "" "The socket option :ref:`socket.TCP_NODELAY ` is set " @@ -943,16 +1027,16 @@ msgstr "" "l'option socket :py:data:`~socket.TCP_NODELAY` est définie par défaut pour " "toutes les connexions TCP." -#: library/asyncio-eventloop.rst:517 library/asyncio-eventloop.rst:862 +#: library/asyncio-eventloop.rst:571 library/asyncio-eventloop.rst:927 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "ajout du paramètre *ssl handshake timeout*" # suit un : -#: library/asyncio-eventloop.rst:521 +#: library/asyncio-eventloop.rst:575 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "ajout des paramètres *happy_eyeballs_delay* et *interleave*." -#: library/asyncio-eventloop.rst:523 +#: library/asyncio-eventloop.rst:577 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -971,24 +1055,24 @@ msgstr "" "spécifie les exigences pour les algorithmes qui réduisent ce délai visible " "par l'utilisateur et fournit un algorithme correspondant." -#: library/asyncio-eventloop.rst:532 +#: library/asyncio-eventloop.rst:586 #, fuzzy msgid "For more information: https://datatracker.ietf.org/doc/html/rfc6555" msgstr "" "Pour plus d'informations, consultez : https://tools.ietf.org/html/rfc6555" -#: library/asyncio-eventloop.rst:536 library/asyncio-eventloop.rst:660 -#: library/asyncio-eventloop.rst:776 library/asyncio-eventloop.rst:815 -#: library/asyncio-eventloop.rst:866 library/asyncio-eventloop.rst:947 +#: library/asyncio-eventloop.rst:590 library/asyncio-eventloop.rst:722 +#: library/asyncio-eventloop.rst:839 library/asyncio-eventloop.rst:879 +#: library/asyncio-eventloop.rst:931 library/asyncio-eventloop.rst:1014 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "ajout du paramètre *ssl shutdown timeout*" -#: library/asyncio-eventloop.rst:538 +#: library/asyncio-eventloop.rst:592 msgid "*all_errors* was added." msgstr "" # suit un : -#: library/asyncio-eventloop.rst:543 +#: library/asyncio-eventloop.rst:597 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " "returns a pair of (:class:`StreamReader`, :class:`StreamWriter`) that can be " @@ -998,28 +1082,30 @@ msgstr "" "Elle renvoie une paire de (:class:`StreamReader`, :class:`StreamWriter`) qui " "peut être utilisée directement dans le code *async/wait*." -#: library/asyncio-eventloop.rst:553 +#: library/asyncio-eventloop.rst:608 msgid "Create a datagram connection." msgstr "Création d'une connexion par datagramme" -#: library/asyncio-eventloop.rst:555 +#: library/asyncio-eventloop.rst:610 #, fuzzy msgid "" -"The socket family can be either :py:const:`~socket.AF_INET`, :py:const:" -"`~socket.AF_INET6`, or :py:const:`~socket.AF_UNIX`, depending on *host* (or " -"the *family* argument, if provided)." +"The socket family can be " +"either :py:const:`~socket.AF_INET`, :py:const:`~socket.AF_INET6`, " +"or :py:const:`~socket.AF_UNIX`, depending on *host* (or the *family* " +"argument, if provided)." msgstr "" -"La famille de connecteur peut être :py:data:`~socket.AF_INET`, :py:data:" -"`~socket.AF_INET6` ou :py:data:`~socket.AF_UNIX`, selon *host* (ou " -"l'argument *family*, s'il est fourni)." +"La famille de connecteur peut " +"être :py:data:`~socket.AF_INET`, :py:data:`~socket.AF_INET6` " +"ou :py:data:`~socket.AF_UNIX`, selon *host* (ou l'argument *family*, s'il " +"est fourni)." -#: library/asyncio-eventloop.rst:559 +#: library/asyncio-eventloop.rst:614 #, fuzzy msgid "The socket type will be :py:const:`~socket.SOCK_DGRAM`." msgstr "Le type de connecteur sera :py:data:`~socket.SOCK_DGRAM`." -#: library/asyncio-eventloop.rst:561 library/asyncio-eventloop.rst:686 -#: library/asyncio-eventloop.rst:833 +#: library/asyncio-eventloop.rst:616 library/asyncio-eventloop.rst:749 +#: library/asyncio-eventloop.rst:898 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." @@ -1027,21 +1113,28 @@ msgstr "" "*protocol_factory* doit être un appelable gérant le :ref:`protocole asyncio " "`." -#: library/asyncio-eventloop.rst:564 library/asyncio-eventloop.rst:642 +#: library/asyncio-eventloop.rst:619 library/asyncio-eventloop.rst:704 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "Un *n*-uplet ``(transport, protocol)`` est renvoyé en cas de succès." -#: library/asyncio-eventloop.rst:568 +#: library/asyncio-eventloop.rst:623 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " -"the socket locally. The *local_host* and *local_port* are looked up using :" -"meth:`getaddrinfo`." +"the socket locally. The *local_host* and *local_port* are looked up " +"using :meth:`getaddrinfo`." msgstr "" "*local_addr*, s'il est fourni, est un *n*-uplet ``(local_host, local_port)`` " "utilisé pour lier le connecteur localement. Le *local_host* et le " "*local_port* sont recherchés en utilisant :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:572 +#: library/asyncio-eventloop.rst:629 +msgid "" +"On Windows, when using the proactor event loop with ``local_addr=None``, " +"an :exc:`OSError` with :attr:`!errno.WSAEINVAL` will be raised when running " +"it." +msgstr "" + +#: library/asyncio-eventloop.rst:633 msgid "" "*remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to " "connect the socket to a remote address. The *remote_host* and *remote_port* " @@ -1049,10 +1142,10 @@ msgid "" msgstr "" "*remote_addr*, s'il est fourni, est un *n*-uplet ``(remote_host, " "remote_port)`` utilisé pour se connecter à une adresse distante. Le " -"*remote_host* et le *remote_port* sont recherchés en utilisant :meth:" -"`getaddrinfo`." +"*remote_host* et le *remote_port* sont recherchés en " +"utilisant :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:576 +#: library/asyncio-eventloop.rst:637 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -1064,7 +1157,7 @@ msgstr "" "pour la résolution *host*. S'ils sont fournis, ils doivent tous être des " "entiers provenant des constantes du module :mod:`socket`." -#: library/asyncio-eventloop.rst:581 +#: library/asyncio-eventloop.rst:642 #, fuzzy msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " @@ -1076,11 +1169,11 @@ msgstr "" "*reuse_port* indique au noyau d'autoriser ce point de terminaison à être lié " "au même port que les autres points de terminaison existants, tant qu'ils " "définissent tous cet indicateur lors de leur création. Cette option n'est " -"pas prise en charge sous Windows et certains Unix. Si la constante :py:data:" -"`~socket.SO_REUSEPORT` n'est pas définie, cette fonctionnalité n'est pas " -"prise en charge." +"pas prise en charge sous Windows et certains Unix. Si la " +"constante :py:data:`~socket.SO_REUSEPORT` n'est pas définie, cette " +"fonctionnalité n'est pas prise en charge." -#: library/asyncio-eventloop.rst:587 +#: library/asyncio-eventloop.rst:648 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." @@ -1088,28 +1181,29 @@ msgstr "" "*allow_broadcast* indique au noyau d'autoriser ce point de terminaison à " "envoyer des messages à l'adresse de *broadcast*." -#: library/asyncio-eventloop.rst:590 +#: library/asyncio-eventloop.rst:651 msgid "" "*sock* can optionally be specified in order to use a preexisting, already " "connected, :class:`socket.socket` object to be used by the transport. If " -"specified, *local_addr* and *remote_addr* should be omitted (must be :const:" -"`None`)." +"specified, *local_addr* and *remote_addr* should be omitted (must " +"be :const:`None`)." msgstr "" -"*sock* peut éventuellement être spécifié afin d'utiliser un objet :class:" -"`socket.socket` préexistant, déjà connecté, à utiliser par le transport. Si " -"spécifié, *local_addr* et *remote_addr* doivent être omis (doit être :const:" -"`None`)." +"*sock* peut éventuellement être spécifié afin d'utiliser un " +"objet :class:`socket.socket` préexistant, déjà connecté, à utiliser par le " +"transport. Si spécifié, *local_addr* et *remote_addr* doivent être omis " +"(doit être :const:`None`)." -#: library/asyncio-eventloop.rst:601 +#: library/asyncio-eventloop.rst:662 msgid "" -"See :ref:`UDP echo client protocol ` and :" -"ref:`UDP echo server protocol ` examples." +"See :ref:`UDP echo client protocol ` " +"and :ref:`UDP echo server protocol ` " +"examples." msgstr "" "Voir les exemples :ref:`asyncio-udp-echo-client-protocol` et :ref:`asyncio-" "udp-echo-server-protocol`." # suit un : -#: library/asyncio-eventloop.rst:604 +#: library/asyncio-eventloop.rst:665 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." @@ -1118,23 +1212,24 @@ msgstr "" "*allow_broadcast* et *sock* ont été ajoutés." # suit un : -#: library/asyncio-eventloop.rst:608 +#: library/asyncio-eventloop.rst:669 msgid "Added support for Windows." msgstr "prise en charge sur Windows." # suit un : -#: library/asyncio-eventloop.rst:611 +#: library/asyncio-eventloop.rst:672 #, fuzzy msgid "" -"The *reuse_address* parameter is no longer supported, as using :ref:`socket." -"SO_REUSEADDR ` poses a significant security concern " -"for UDP. Explicitly passing ``reuse_address=True`` will raise an exception." +"The *reuse_address* parameter is no longer supported, as " +"using :ref:`socket.SO_REUSEADDR ` poses a significant " +"security concern for UDP. Explicitly passing ``reuse_address=True`` will " +"raise an exception." msgstr "" "le paramètre *reuse_address* n'est plus pris en charge, car l'utilisation " "de :py:data:`~sockets.SO_REUSEADDR` pose un problème de sécurité important " "pour UDP. Passer explicitement ``reuse_address=True`` lève une exception." -#: library/asyncio-eventloop.rst:617 +#: library/asyncio-eventloop.rst:678 msgid "" "When multiple processes with differing UIDs assign sockets to an identical " "UDP socket address with ``SO_REUSEADDR``, incoming packets can become " @@ -1145,7 +1240,7 @@ msgstr "" "les paquets entrants peuvent être distribués de manière aléatoire entre les " "connecteurs." -#: library/asyncio-eventloop.rst:621 +#: library/asyncio-eventloop.rst:682 #, fuzzy msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " @@ -1154,13 +1249,13 @@ msgid "" "differing UIDs from assigning sockets to the same socket address." msgstr "" "Pour les plates-formes prises en charge, *reuse_port* peut être utilisé en " -"remplacement d'une fonctionnalité similaire. Avec *reuse_port*, :py:data:" -"`~sockets.SO_REUSEPORT` est utilisé à la place, ce qui empêche " -"spécifiquement les processus avec des UID différents d'attribuer des " -"connecteurs à la même adresse de connecteur." +"remplacement d'une fonctionnalité similaire. Avec " +"*reuse_port*, :py:data:`~sockets.SO_REUSEPORT` est utilisé à la place, ce " +"qui empêche spécifiquement les processus avec des UID différents d'attribuer " +"des connecteurs à la même adresse de connecteur." # suit un : -#: library/asyncio-eventloop.rst:628 +#: library/asyncio-eventloop.rst:689 #, fuzzy msgid "" "The *reuse_address* parameter, disabled since Python 3.8.1, 3.7.6 and " @@ -1169,31 +1264,32 @@ msgstr "" "le paramètre *reuse_address*, désactivé depuis Python 3.9.0, 3.8.1, 3.7.6 et " "3.6.10, a été entièrement supprimé." -#: library/asyncio-eventloop.rst:637 +#: library/asyncio-eventloop.rst:699 msgid "Create a Unix connection." msgstr "Crée une connexion Unix" -#: library/asyncio-eventloop.rst:639 +#: library/asyncio-eventloop.rst:701 #, fuzzy msgid "" -"The socket family will be :py:const:`~socket.AF_UNIX`; socket type will be :" -"py:const:`~socket.SOCK_STREAM`." +"The socket family will be :py:const:`~socket.AF_UNIX`; socket type will " +"be :py:const:`~socket.SOCK_STREAM`." msgstr "" "La famille de connecteur est :py:data:`~socket.AF_UNIX` ; le type de " "connecteur est :py:data:`~socket.SOCK_STREAM`." -#: library/asyncio-eventloop.rst:644 +#: library/asyncio-eventloop.rst:706 msgid "" "*path* is the name of a Unix domain socket and is required, unless a *sock* " -"parameter is specified. Abstract Unix sockets, :class:`str`, :class:" -"`bytes`, and :class:`~pathlib.Path` paths are supported." +"parameter is specified. Abstract Unix " +"sockets, :class:`str`, :class:`bytes`, and :class:`~pathlib.Path` paths are " +"supported." msgstr "" "*path* est le nom d'un connecteur de domaine Unix et est obligatoire, sauf " "si un paramètre *sock* est spécifié. Les connecteurs Unix abstraits, les " "chemins :class:`str`, :class:`bytes` et :class:`~pathlib.Path` sont pris en " "charge." -#: library/asyncio-eventloop.rst:649 +#: library/asyncio-eventloop.rst:711 msgid "" "See the documentation of the :meth:`loop.create_connection` method for " "information about arguments to this method." @@ -1201,13 +1297,13 @@ msgstr "" "Voir la documentation de la méthode :meth:`loop.create_connection` pour plus " "d'informations sur les arguments de cette méthode." -#: library/asyncio-eventloop.rst:652 library/asyncio-eventloop.rst:806 -#: library/asyncio-eventloop.rst:1249 library/asyncio-eventloop.rst:1782 -#: library/asyncio-eventloop.rst:1789 +#: library/asyncio-eventloop.rst:714 library/asyncio-eventloop.rst:870 +#: library/asyncio-eventloop.rst:1336 library/asyncio-eventloop.rst:1889 +#: library/asyncio-eventloop.rst:1896 msgid "Availability" -msgstr "" +msgstr "Disponibilité" -#: library/asyncio-eventloop.rst:654 +#: library/asyncio-eventloop.rst:716 msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`." @@ -1215,11 +1311,11 @@ msgstr "" "ajout du paramètre *ssl_handshake_timeout*. Le paramètre *chemin* peut " "désormais être un :term:`objet simili-chemin `." -#: library/asyncio-eventloop.rst:664 +#: library/asyncio-eventloop.rst:726 msgid "Creating network servers" msgstr "Création de serveurs" -#: library/asyncio-eventloop.rst:679 +#: library/asyncio-eventloop.rst:742 #, fuzzy msgid "" "Create a TCP server (socket type :const:`~socket.SOCK_STREAM`) listening on " @@ -1228,15 +1324,15 @@ msgstr "" "Crée un serveur TCP (type de connecteur :data:`~socket.SOCK_STREAM`) " "écoutant sur le *port* de l'adresse *hôte*." -#: library/asyncio-eventloop.rst:682 +#: library/asyncio-eventloop.rst:745 msgid "Returns a :class:`Server` object." msgstr "Renvoie un objet :class:`Server`." -#: library/asyncio-eventloop.rst:684 +#: library/asyncio-eventloop.rst:747 msgid "Arguments:" msgstr "Arguments :" -#: library/asyncio-eventloop.rst:689 +#: library/asyncio-eventloop.rst:752 msgid "" "The *host* parameter can be set to several types which determine where the " "server would be listening:" @@ -1244,7 +1340,7 @@ msgstr "" "Le paramètre *host* peut être défini sur plusieurs types qui déterminent où " "le serveur écoute :" -#: library/asyncio-eventloop.rst:692 +#: library/asyncio-eventloop.rst:755 msgid "" "If *host* is a string, the TCP server is bound to a single network interface " "specified by *host*." @@ -1252,7 +1348,7 @@ msgstr "" "Si *host* est une chaîne, le serveur TCP est lié à une seule interface " "réseau spécifiée par *host*." -#: library/asyncio-eventloop.rst:695 +#: library/asyncio-eventloop.rst:758 msgid "" "If *host* is a sequence of strings, the TCP server is bound to all network " "interfaces specified by the sequence." @@ -1260,7 +1356,7 @@ msgstr "" "Si *host* est une séquence de chaînes, le serveur TCP est lié à toutes les " "interfaces réseau spécifiées par la séquence." -#: library/asyncio-eventloop.rst:698 +#: library/asyncio-eventloop.rst:761 msgid "" "If *host* is an empty string or ``None``, all interfaces are assumed and a " "list of multiple sockets will be returned (most likely one for IPv4 and " @@ -1270,7 +1366,7 @@ msgstr "" "en compte et une liste de plusieurs connecteurs est renvoyée (probablement " "une pour IPv4 et une autre pour IPv6)." -#: library/asyncio-eventloop.rst:702 +#: library/asyncio-eventloop.rst:765 msgid "" "The *port* parameter can be set to specify which port the server should " "listen on. If ``0`` or ``None`` (the default), a random unused port will be " @@ -1283,23 +1379,24 @@ msgstr "" "interfaces réseau, un port aléatoire différent est sélectionné pour chaque " "interface)." -#: library/asyncio-eventloop.rst:707 +#: library/asyncio-eventloop.rst:770 #, fuzzy msgid "" -"*family* can be set to either :const:`socket.AF_INET` or :const:`~socket." -"AF_INET6` to force the socket to use IPv4 or IPv6. If not set, the *family* " -"will be determined from host name (defaults to :const:`~socket.AF_UNSPEC`)." +"*family* can be set to either :const:`socket.AF_INET` " +"or :const:`~socket.AF_INET6` to force the socket to use IPv4 or IPv6. If not " +"set, the *family* will be determined from host name (defaults " +"to :const:`~socket.AF_UNSPEC`)." msgstr "" -"*family* peut être défini sur :data:`socket.AF_INET` ou sur :data:`~socket." -"AF_INET6` pour forcer le connecteur à utiliser IPv4 ou IPv6. Si elle n'est " -"pas définie, *family* est déterminée à partir du nom d'hôte (par défaut :" -"data:`~socket.AF_UNSPEC`)." +"*family* peut être défini sur :data:`socket.AF_INET` ou " +"sur :data:`~socket.AF_INET6` pour forcer le connecteur à utiliser IPv4 ou " +"IPv6. Si elle n'est pas définie, *family* est déterminée à partir du nom " +"d'hôte (par défaut :data:`~socket.AF_UNSPEC`)." -#: library/asyncio-eventloop.rst:712 +#: library/asyncio-eventloop.rst:775 msgid "*flags* is a bitmask for :meth:`getaddrinfo`." msgstr "*flags* est un masque de bits pour :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:714 +#: library/asyncio-eventloop.rst:777 msgid "" "*sock* can optionally be specified in order to use a preexisting socket " "object. If specified, *host* and *port* must not be specified." @@ -1309,7 +1406,7 @@ msgstr "" "spécifiés." # suit un : -#: library/asyncio-eventloop.rst:719 +#: library/asyncio-eventloop.rst:782 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." @@ -1318,15 +1415,15 @@ msgstr "" "fermer le connecteur, appelez la méthode :meth:`~asyncio.Server.close` du " "serveur." -#: library/asyncio-eventloop.rst:723 +#: library/asyncio-eventloop.rst:786 msgid "" -"*backlog* is the maximum number of queued connections passed to :meth:" -"`~socket.socket.listen` (defaults to 100)." +"*backlog* is the maximum number of queued connections passed " +"to :meth:`~socket.socket.listen` (defaults to 100)." msgstr "" -"*backlog* est le nombre maximum de connexions en file d'attente passées à :" -"meth:`~socket.socket.listen` (par défaut à 100)." +"*backlog* est le nombre maximum de connexions en file d'attente passées " +"à :meth:`~socket.socket.listen` (par défaut à 100)." -#: library/asyncio-eventloop.rst:726 +#: library/asyncio-eventloop.rst:789 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " "the accepted connections." @@ -1334,7 +1431,7 @@ msgstr "" "*ssl* peut être défini sur une instance :class:`~ssl.SSLContext` pour " "activer TLS sur les connexions acceptées." -#: library/asyncio-eventloop.rst:729 +#: library/asyncio-eventloop.rst:792 msgid "" "*reuse_address* tells the kernel to reuse a local socket in ``TIME_WAIT`` " "state, without waiting for its natural timeout to expire. If not specified " @@ -1345,7 +1442,7 @@ msgstr "" "naturel. S'il n'est pas spécifié, il est automatiquement défini sur ``True`` " "sous Unix." -#: library/asyncio-eventloop.rst:734 +#: library/asyncio-eventloop.rst:797 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " @@ -1356,18 +1453,18 @@ msgstr "" "définissent tous cet indicateur lors de leur création. Cette option n'est " "pas prise en charge sous Windows." -#: library/asyncio-eventloop.rst:739 +#: library/asyncio-eventloop.rst:802 msgid "" "*keep_alive* set to ``True`` keeps connections active by enabling the " "periodic transmission of messages." msgstr "" -#: library/asyncio-eventloop.rst:744 +#: library/asyncio-eventloop.rst:807 #, fuzzy msgid "Added the *keep_alive* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:746 +#: library/asyncio-eventloop.rst:809 msgid "" "*ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait " "for the TLS handshake to complete before aborting the connection. ``60.0`` " @@ -1377,7 +1474,7 @@ msgstr "" "attendre que la poignée de main TLS se termine avant d'abandonner la " "connexion. ``60.0`` secondes si ``None`` (par défaut)." -#: library/asyncio-eventloop.rst:754 +#: library/asyncio-eventloop.rst:817 msgid "" "*start_serving* set to ``True`` (the default) causes the created server to " "start accepting connections immediately. When set to ``False``, the user " @@ -1391,12 +1488,12 @@ msgstr "" "connexions." # suit un : -#: library/asyncio-eventloop.rst:766 +#: library/asyncio-eventloop.rst:829 msgid "The *host* parameter can be a sequence of strings." msgstr "le paramètre *host* peut être une séquence de chaînes." # suit un : -#: library/asyncio-eventloop.rst:770 +#: library/asyncio-eventloop.rst:833 #, fuzzy msgid "" "Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " @@ -1408,7 +1505,7 @@ msgstr "" "connexions TCP." # suit un : -#: library/asyncio-eventloop.rst:780 +#: library/asyncio-eventloop.rst:843 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " @@ -1418,16 +1515,16 @@ msgstr "" "qui renvoie une paire de :class:`StreamReader` et :class:`StreamWriter` qui " "peut être utilisée dans un code *async/wait*." -#: library/asyncio-eventloop.rst:791 +#: library/asyncio-eventloop.rst:855 #, fuzzy msgid "" -"Similar to :meth:`loop.create_server` but works with the :py:const:`~socket." -"AF_UNIX` socket family." +"Similar to :meth:`loop.create_server` but works with " +"the :py:const:`~socket.AF_UNIX` socket family." msgstr "" "Similaire à :meth:`loop.create_server` mais fonctionne avec la famille de " "connecteurs :py:data:`~socket.AF_UNIX`." -#: library/asyncio-eventloop.rst:794 +#: library/asyncio-eventloop.rst:858 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " @@ -1438,14 +1535,14 @@ msgstr "" "chemins :class:`str`, :class:`bytes` et :class:`~pathlib.Path` sont pris en " "charge." -#: library/asyncio-eventloop.rst:799 +#: library/asyncio-eventloop.rst:863 msgid "" "If *cleanup_socket* is true then the Unix socket will automatically be " "removed from the filesystem when the server is closed, unless the socket has " "been replaced after the server has been created." msgstr "" -#: library/asyncio-eventloop.rst:803 +#: library/asyncio-eventloop.rst:867 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." @@ -1454,7 +1551,7 @@ msgstr "" "d'informations sur les arguments de cette méthode." # suit un : -#: library/asyncio-eventloop.rst:810 +#: library/asyncio-eventloop.rst:874 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :class:`~pathlib.Path` object." @@ -1462,17 +1559,17 @@ msgstr "" "ajout des paramètres *ssl_handshake_timeout* et *start_serving*. Le " "paramètre *path* peut maintenant être un objet :class:`~pathlib.Path`." -#: library/asyncio-eventloop.rst:819 +#: library/asyncio-eventloop.rst:883 #, fuzzy msgid "Added the *cleanup_socket* parameter." msgstr "ajout du paramètre ``context``." -#: library/asyncio-eventloop.rst:826 +#: library/asyncio-eventloop.rst:891 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" "Enveloppe une connexion déjà acceptée dans une paire transport/protocole." -#: library/asyncio-eventloop.rst:828 +#: library/asyncio-eventloop.rst:893 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." @@ -1480,11 +1577,11 @@ msgstr "" "Cette méthode peut être utilisée par les serveurs qui acceptent les " "connexions en dehors d'*asyncio* mais qui utilisent *asyncio* pour les gérer." -#: library/asyncio-eventloop.rst:831 library/asyncio-eventloop.rst:921 +#: library/asyncio-eventloop.rst:896 library/asyncio-eventloop.rst:988 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-eventloop.rst:836 +#: library/asyncio-eventloop.rst:901 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." @@ -1492,7 +1589,7 @@ msgstr "" "*sock* est un objet connecteur préexistant renvoyé par :meth:`socket.accept " "`." -#: library/asyncio-eventloop.rst:845 +#: library/asyncio-eventloop.rst:910 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." @@ -1500,7 +1597,7 @@ msgstr "" "*ssl* peut être défini sur une :class:`~ssl.SSLContext` pour activer SSL sur " "les connexions acceptées." -#: library/asyncio-eventloop.rst:848 +#: library/asyncio-eventloop.rst:913 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " @@ -1510,31 +1607,31 @@ msgstr "" "attendre que la poignée de main SSL se termine avant d'abandonner la " "connexion. ``60.0`` secondes si ``None`` (par défaut)." -#: library/asyncio-eventloop.rst:856 +#: library/asyncio-eventloop.rst:921 msgid "Returns a ``(transport, protocol)`` pair." msgstr "Renvoie une paire ``(transport, protocole)``." -#: library/asyncio-eventloop.rst:870 +#: library/asyncio-eventloop.rst:935 msgid "Transferring files" msgstr "Transfert de fichiers" -#: library/asyncio-eventloop.rst:875 +#: library/asyncio-eventloop.rst:941 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" "Envoie *file* via *transport*. Renvoie le nombre total d'octets envoyés." -#: library/asyncio-eventloop.rst:878 +#: library/asyncio-eventloop.rst:944 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" "La méthode utilise :meth:`os.sendfile` (hautes performances) si elle est " "disponible." -#: library/asyncio-eventloop.rst:880 +#: library/asyncio-eventloop.rst:946 msgid "*file* must be a regular file object opened in binary mode." msgstr "*file* doit être un objet fichier normal ouvert en mode binaire." -#: library/asyncio-eventloop.rst:882 library/asyncio-eventloop.rst:1127 +#: library/asyncio-eventloop.rst:948 library/asyncio-eventloop.rst:1209 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -1545,11 +1642,11 @@ msgstr "" "*offset* indique où commencer la lecture du fichier. Si spécifié, *count* " "est le nombre total d'octets à transmettre, par opposition à l'envoi du " "fichier jusqu'à ce que EOF soit atteint. La position du fichier est toujours " -"mise à jour, même lorsque cette méthode génère une erreur. :meth:`file." -"tell() ` peut être utilisée pour obtenir le nombre d'octets " -"réellement envoyés." +"mise à jour, même lorsque cette méthode génère une " +"erreur. :meth:`file.tell() ` peut être utilisée pour obtenir " +"le nombre d'octets réellement envoyés." -#: library/asyncio-eventloop.rst:889 +#: library/asyncio-eventloop.rst:955 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " @@ -1559,7 +1656,7 @@ msgstr "" "manuellement le fichier lorsque la plateforme ne prend pas en charge l'appel " "système *sendfile* (par exemple, Windows ou connecteur SSL sous Unix)." -#: library/asyncio-eventloop.rst:893 +#: library/asyncio-eventloop.rst:959 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." @@ -1567,15 +1664,16 @@ msgstr "" "Lève :exc:`SendfileNotAvailableError` si le système ne prend pas en charge " "l'appel système *sendfile* et que *fallback* est ``False``." -#: library/asyncio-eventloop.rst:900 -msgid "TLS Upgrade" +#: library/asyncio-eventloop.rst:966 +#, fuzzy +msgid "TLS upgrade" msgstr "Passage du flux en TLS" -#: library/asyncio-eventloop.rst:907 +#: library/asyncio-eventloop.rst:974 msgid "Upgrade an existing transport-based connection to TLS." msgstr "Convertit une connexion existante en connexion TLS." -#: library/asyncio-eventloop.rst:909 +#: library/asyncio-eventloop.rst:976 msgid "" "Create a TLS coder/decoder instance and insert it between the *transport* " "and the *protocol*. The coder/decoder implements both *transport*-facing " @@ -1585,7 +1683,7 @@ msgstr "" "le *protocol*. Le codeur-décodeur implémente à la fois le protocole vers le " "*transport* et le transport vers le *protocol*." -#: library/asyncio-eventloop.rst:913 +#: library/asyncio-eventloop.rst:980 msgid "" "Return the created two-interface instance. After *await*, the *protocol* " "must stop using the original *transport* and communicate with the returned " @@ -1598,25 +1696,25 @@ msgstr "" "*protocol* et échange sporadiquement des paquets de session TLS " "supplémentaires avec *transport*." -#: library/asyncio-eventloop.rst:918 +#: library/asyncio-eventloop.rst:985 msgid "" "In some situations (e.g. when the passed transport is already closing) this " "may return ``None``." msgstr "" -#: library/asyncio-eventloop.rst:923 +#: library/asyncio-eventloop.rst:990 msgid "" -"*transport* and *protocol* instances that methods like :meth:`~loop." -"create_server` and :meth:`~loop.create_connection` return." +"*transport* and *protocol* instances that methods " +"like :meth:`~loop.create_server` and :meth:`~loop.create_connection` return." msgstr "" "*transport* et *protocol* que des méthodes comme :meth:`~loop.create_server` " "et :meth:`~loop.create_connection` renvoient." -#: library/asyncio-eventloop.rst:927 +#: library/asyncio-eventloop.rst:994 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "*sslcontext* : une instance configurée de :class:`~ssl.SSLContext`." -#: library/asyncio-eventloop.rst:929 +#: library/asyncio-eventloop.rst:996 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." @@ -1624,7 +1722,7 @@ msgstr "" "*server_side* passe à ``True`` lorsqu'une connexion côté serveur est mise à " "jour (comme celle créée par :meth:`~loop.create_server`)." -#: library/asyncio-eventloop.rst:932 +#: library/asyncio-eventloop.rst:999 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." @@ -1632,11 +1730,11 @@ msgstr "" "*server_hostname* : définit ou remplace le nom d'hôte auquel le certificat " "du serveur cible est comparé." -#: library/asyncio-eventloop.rst:952 +#: library/asyncio-eventloop.rst:1019 msgid "Watching file descriptors" msgstr "Surveillance de descripteur de fichier" -#: library/asyncio-eventloop.rst:956 +#: library/asyncio-eventloop.rst:1023 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." @@ -1645,7 +1743,13 @@ msgstr "" "*fd* et appelle *callback* avec les arguments spécifiés une fois que *fd* " "est disponible en lecture." -#: library/asyncio-eventloop.rst:962 +#: library/asyncio-eventloop.rst:1027 library/asyncio-eventloop.rst:1041 +msgid "" +"Any preexisting callback registered for *fd* is cancelled and replaced by " +"*callback*." +msgstr "" + +#: library/asyncio-eventloop.rst:1032 msgid "" "Stop monitoring the *fd* file descriptor for read availability. Returns " "``True`` if *fd* was previously being monitored for reads." @@ -1654,16 +1758,18 @@ msgstr "" "lecture. Renvoie ``True`` si *fd* était précédemment surveillé pour les " "lectures." -#: library/asyncio-eventloop.rst:967 +#: library/asyncio-eventloop.rst:1037 +#, fuzzy msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " -"*callback* with the specified arguments once *fd* is available for writing." +"*callback* with the specified arguments *args* once *fd* is available for " +"writing." msgstr "" "Commence à surveiller le descripteur de fichier *fd* pour la disponibilité " "en écriture et appelle *callback* avec les arguments spécifiés une fois que " "*fd* est disponible en écriture." -#: library/asyncio-eventloop.rst:971 library/asyncio-eventloop.rst:1236 +#: library/asyncio-eventloop.rst:1044 library/asyncio-eventloop.rst:1323 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." @@ -1671,7 +1777,7 @@ msgstr "" "Utilisez :func:`functools.partial` pour :ref:`passer des arguments nommés " "` à *callback*." -#: library/asyncio-eventloop.rst:976 +#: library/asyncio-eventloop.rst:1049 msgid "" "Stop monitoring the *fd* file descriptor for write availability. Returns " "``True`` if *fd* was previously being monitored for writes." @@ -1680,7 +1786,7 @@ msgstr "" "écriture. Renvoie ``True`` si *fd* était précédemment surveillé pour les " "écritures." -#: library/asyncio-eventloop.rst:979 +#: library/asyncio-eventloop.rst:1052 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." @@ -1688,81 +1794,81 @@ msgstr "" "Voir aussi la section :ref:`Prise en charge de la plate-forme ` pour certaines limitations de ces méthodes." -#: library/asyncio-eventloop.rst:984 +#: library/asyncio-eventloop.rst:1057 msgid "Working with socket objects directly" msgstr "Travail direct avec des objets *socket*" -#: library/asyncio-eventloop.rst:986 +#: library/asyncio-eventloop.rst:1059 msgid "" -"In general, protocol implementations that use transport-based APIs such as :" -"meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " -"implementations that work with sockets directly. However, there are some use " -"cases when performance is not critical, and working with :class:`~socket." -"socket` objects directly is more convenient." +"In general, protocol implementations that use transport-based APIs such " +"as :meth:`loop.create_connection` and :meth:`loop.create_server` are faster " +"than implementations that work with sockets directly. However, there are " +"some use cases when performance is not critical, and working " +"with :class:`~socket.socket` objects directly is more convenient." msgstr "" "En général, les implémentations de protocole qui utilisent des API basées " -"sur le transport telles que :meth:`loop.create_connection` et :meth:`loop." -"create_server` sont plus rapides que les implémentations qui fonctionnent " -"directement avec les *sockets*. Cependant, il existe des cas d'utilisation " -"où les performances ne sont pas critiques, et travailler directement avec " -"les objets :class:`~socket.socket` est plus pratique." +"sur le transport telles que :meth:`loop.create_connection` " +"et :meth:`loop.create_server` sont plus rapides que les implémentations qui " +"fonctionnent directement avec les *sockets*. Cependant, il existe des cas " +"d'utilisation où les performances ne sont pas critiques, et travailler " +"directement avec les objets :class:`~socket.socket` est plus pratique." -#: library/asyncio-eventloop.rst:995 +#: library/asyncio-eventloop.rst:1069 msgid "" -"Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." -"recv() `." +"Receive up to *nbytes* from *sock*. Asynchronous version " +"of :meth:`socket.recv() `." msgstr "" -"Reçoit jusqu'à *nbytes* de *sock*. Version asynchrone de :meth:`socket." -"recv() `." +"Reçoit jusqu'à *nbytes* de *sock*. Version asynchrone " +"de :meth:`socket.recv() `." -#: library/asyncio-eventloop.rst:998 +#: library/asyncio-eventloop.rst:1072 msgid "Return the received data as a bytes object." msgstr "Renvoie les données reçues sous la forme d'un objet bytes." -#: library/asyncio-eventloop.rst:1000 library/asyncio-eventloop.rst:1014 -#: library/asyncio-eventloop.rst:1025 library/asyncio-eventloop.rst:1037 -#: library/asyncio-eventloop.rst:1052 library/asyncio-eventloop.rst:1067 -#: library/asyncio-eventloop.rst:1077 library/asyncio-eventloop.rst:1103 -#: library/asyncio-eventloop.rst:1141 +#: library/asyncio-eventloop.rst:1074 library/asyncio-eventloop.rst:1089 +#: library/asyncio-eventloop.rst:1101 library/asyncio-eventloop.rst:1114 +#: library/asyncio-eventloop.rst:1130 library/asyncio-eventloop.rst:1146 +#: library/asyncio-eventloop.rst:1157 library/asyncio-eventloop.rst:1184 +#: library/asyncio-eventloop.rst:1223 msgid "*sock* must be a non-blocking socket." msgstr "Le connecteur *sock* ne doit pas être bloquant." # suit un : -#: library/asyncio-eventloop.rst:1002 +#: library/asyncio-eventloop.rst:1076 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" "même si cette méthode a toujours été documentée en tant que méthode " -"coroutine, les versions antérieures à Python 3.7 renvoyaient un :class:" -"`Future`. Depuis Python 3.7, il s'agit d'une méthode ``async def``." +"coroutine, les versions antérieures à Python 3.7 renvoyaient " +"un :class:`Future`. Depuis Python 3.7, il s'agit d'une méthode ``async def``." -#: library/asyncio-eventloop.rst:1009 +#: library/asyncio-eventloop.rst:1084 msgid "" -"Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" -"meth:`socket.recv_into() ` method." +"Receive data from *sock* into the *buf* buffer. Modeled after the " +"blocking :meth:`socket.recv_into() ` method." msgstr "" "Reçoit les données de *sock* dans le tampon *buf*. Basée sur le modèle de la " "méthode bloquante :meth:`socket.recv_into() `." -#: library/asyncio-eventloop.rst:1012 +#: library/asyncio-eventloop.rst:1087 msgid "Return the number of bytes written to the buffer." msgstr "Renvoie le nombre d'octets écrits dans le tampon." -#: library/asyncio-eventloop.rst:1020 +#: library/asyncio-eventloop.rst:1096 msgid "" -"Receive a datagram of up to *bufsize* from *sock*. Asynchronous version of :" -"meth:`socket.recvfrom() `." +"Receive a datagram of up to *bufsize* from *sock*. Asynchronous version " +"of :meth:`socket.recvfrom() `." msgstr "" -"Reçoit un datagramme jusqu'à *bufsize* de *sock*. Version asynchrone de :" -"meth:`socket.recvfrom() `." +"Reçoit un datagramme jusqu'à *bufsize* de *sock*. Version asynchrone " +"de :meth:`socket.recvfrom() `." -#: library/asyncio-eventloop.rst:1023 +#: library/asyncio-eventloop.rst:1099 msgid "Return a tuple of (received data, remote address)." msgstr "Renvoie un *n*-uplet (données reçues, adresse distante)." -#: library/asyncio-eventloop.rst:1031 +#: library/asyncio-eventloop.rst:1108 msgid "" "Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " "version of :meth:`socket.recvfrom_into() `." @@ -1770,19 +1876,19 @@ msgstr "" "Reçoit un datagramme jusqu'à *nbytes* de *sock* vers *buf*. Version " "asynchrone de :meth:`socket.recvfrom_into() `." -#: library/asyncio-eventloop.rst:1035 +#: library/asyncio-eventloop.rst:1112 msgid "Return a tuple of (number of bytes received, remote address)." msgstr "Renvoie un *n*-uplet (nombre d'octets reçus, adresse distante)." -#: library/asyncio-eventloop.rst:1043 +#: library/asyncio-eventloop.rst:1121 msgid "" -"Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." -"sendall() `." +"Send *data* to the *sock* socket. Asynchronous version " +"of :meth:`socket.sendall() `." msgstr "" -"Envoie les données *data* au connecteur *sock*. Version asynchrone de :meth:" -"`socket.sendall() `." +"Envoie les données *data* au connecteur *sock*. Version asynchrone " +"de :meth:`socket.sendall() `." -#: library/asyncio-eventloop.rst:1046 +#: library/asyncio-eventloop.rst:1124 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1798,7 +1904,7 @@ msgstr "" "connexion." # suit un : -#: library/asyncio-eventloop.rst:1054 library/asyncio-eventloop.rst:1105 +#: library/asyncio-eventloop.rst:1132 library/asyncio-eventloop.rst:1186 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " @@ -1808,40 +1914,40 @@ msgstr "" "avant Python 3.7, elle renvoyait un :class:`Future`. Depuis Python 3.7, il " "s'agit d'une méthode ``async def``." -#: library/asyncio-eventloop.rst:1061 +#: library/asyncio-eventloop.rst:1140 msgid "" -"Send a datagram from *sock* to *address*. Asynchronous version of :meth:" -"`socket.sendto() `." +"Send a datagram from *sock* to *address*. Asynchronous version " +"of :meth:`socket.sendto() `." msgstr "" -"Envoie un datagramme de *sock* à *address*. Version asynchrone de :meth:" -"`socket.sendto() `." +"Envoie un datagramme de *sock* à *address*. Version asynchrone " +"de :meth:`socket.sendto() `." -#: library/asyncio-eventloop.rst:1065 +#: library/asyncio-eventloop.rst:1144 msgid "Return the number of bytes sent." msgstr "Renvoie le nombre d'octets envoyés." -#: library/asyncio-eventloop.rst:1073 +#: library/asyncio-eventloop.rst:1153 msgid "Connect *sock* to a remote socket at *address*." msgstr "Connecte *sock* à un connecteur distant situé à *address*." -#: library/asyncio-eventloop.rst:1075 +#: library/asyncio-eventloop.rst:1155 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" "Version asynchrone de :meth:`socket.connect() `." -#: library/asyncio-eventloop.rst:1079 +#: library/asyncio-eventloop.rst:1159 msgid "" "``address`` no longer needs to be resolved. ``sock_connect`` will try to " -"check if the *address* is already resolved by calling :func:`socket." -"inet_pton`. If not, :meth:`loop.getaddrinfo` will be used to resolve the " -"*address*." +"check if the *address* is already resolved by " +"calling :func:`socket.inet_pton`. If not, :meth:`loop.getaddrinfo` will be " +"used to resolve the *address*." msgstr "" "``address`` n'a plus besoin d'être résolu. ``sock_connect`` essaie de " "vérifier si *address* est déjà résolue en appelant :func:`socket.inet_pton`. " "Sinon, :meth:`loop.getaddrinfo` est utilisé pour résoudre *address*." -#: library/asyncio-eventloop.rst:1088 +#: library/asyncio-eventloop.rst:1168 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." @@ -1849,15 +1955,15 @@ msgstr "" ":meth:`loop.create_connection` et :func:`asyncio.open_connection() " "`." -#: library/asyncio-eventloop.rst:1094 +#: library/asyncio-eventloop.rst:1175 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -"Accepte une connexion. Basée sur le modèle de la méthode bloquante :meth:" -"`socket.accept() `." +"Accepte une connexion. Basée sur le modèle de la méthode " +"bloquante :meth:`socket.accept() `." -#: library/asyncio-eventloop.rst:1097 +#: library/asyncio-eventloop.rst:1178 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1870,11 +1976,11 @@ msgstr "" "connexion, et *adresse* est l'adresse liée au connecteur de l'autre côté de " "la connexion." -#: library/asyncio-eventloop.rst:1112 +#: library/asyncio-eventloop.rst:1193 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr ":meth:`loop.create_server` et :func:`start_server`." -#: library/asyncio-eventloop.rst:1117 +#: library/asyncio-eventloop.rst:1199 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." @@ -1882,25 +1988,25 @@ msgstr "" "Envoie le fichier en utilisant :mod:`os.sendfile` (haute performance) si " "possible. Renvoie le nombre total d'octets envoyés." -#: library/asyncio-eventloop.rst:1120 +#: library/asyncio-eventloop.rst:1202 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" "Version asynchrone de :meth:`socket.sendfile() `." -#: library/asyncio-eventloop.rst:1122 +#: library/asyncio-eventloop.rst:1204 msgid "" -"*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." -"socket`." +"*sock* must be a non-" +"blocking :const:`socket.SOCK_STREAM` :class:`~socket.socket`." msgstr "" "*sock* doit être un :const:`socket.SOCK_STREAM` :class:`~socket.socket` non " "bloquant." -#: library/asyncio-eventloop.rst:1125 +#: library/asyncio-eventloop.rst:1207 msgid "*file* must be a regular file object open in binary mode." msgstr "*file* doit être un objet fichier normal ouvert en mode binaire." -#: library/asyncio-eventloop.rst:1134 +#: library/asyncio-eventloop.rst:1216 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " @@ -1911,7 +2017,7 @@ msgstr "" "charge l'appel système *sendfile* (par exemple, Windows ou connecteur SSL " "sous Unix)." -#: library/asyncio-eventloop.rst:1138 +#: library/asyncio-eventloop.rst:1220 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." @@ -1919,19 +2025,19 @@ msgstr "" "Lève une :exc:`SendfileNotAvailableError` si le système ne prend pas en " "charge l'appel système *sendfile* et que *fallback* est ``False``." -#: library/asyncio-eventloop.rst:1147 +#: library/asyncio-eventloop.rst:1229 msgid "DNS" msgstr "DNS" -#: library/asyncio-eventloop.rst:1152 +#: library/asyncio-eventloop.rst:1235 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "Version asynchrone de :meth:`socket.getaddrinfo`." -#: library/asyncio-eventloop.rst:1156 +#: library/asyncio-eventloop.rst:1240 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "Version asynchrone de :meth:`socket.getnameinfo`." -#: library/asyncio-eventloop.rst:1159 +#: library/asyncio-eventloop.rst:1243 msgid "" "Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous " "versions through the loop's default thread pool executor. When this executor " @@ -1942,42 +2048,42 @@ msgid "" msgstr "" # suit un : -#: library/asyncio-eventloop.rst:1166 +#: library/asyncio-eventloop.rst:1250 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " -"return a coroutine, but prior to Python 3.7 they were, in fact, returning :" -"class:`asyncio.Future` objects. Starting with Python 3.7 both methods are " -"coroutines." +"return a coroutine, but prior to Python 3.7 they were, in fact, " +"returning :class:`asyncio.Future` objects. Starting with Python 3.7 both " +"methods are coroutines." msgstr "" "les méthodes *getaddrinfo* et *getnameinfo* ont toujours été documentées " "pour renvoyer une coroutine, mais avant Python 3.7, elles renvoyaient en " "fait des objets :class:`asyncio.Future`. À partir de Python 3.7, les deux " "méthodes sont des coroutines." -#: library/asyncio-eventloop.rst:1174 +#: library/asyncio-eventloop.rst:1258 msgid "Working with pipes" msgstr "Travail avec des tubes (*pipes*)" -#: library/asyncio-eventloop.rst:1178 +#: library/asyncio-eventloop.rst:1263 msgid "Register the read end of *pipe* in the event loop." msgstr "" "Branche l'extrémité en lecture du tube *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:1183 +#: library/asyncio-eventloop.rst:1268 msgid "*pipe* is a :term:`file-like object `." msgstr "*pipe* est un :term:`simili-fichier `." -#: library/asyncio-eventloop.rst:1185 +#: library/asyncio-eventloop.rst:1270 msgid "" -"Return pair ``(transport, protocol)``, where *transport* supports the :class:" -"`ReadTransport` interface and *protocol* is an object instantiated by the " -"*protocol_factory*." +"Return pair ``(transport, protocol)``, where *transport* supports " +"the :class:`ReadTransport` interface and *protocol* is an object " +"instantiated by the *protocol_factory*." msgstr "" "Renvoie la paire ``(transport, protocol)``, où *transport* prend en charge " "l'interface :class:`ReadTransport` et *protocol* est un objet instancié par " "*protocol_factory*." -#: library/asyncio-eventloop.rst:1189 library/asyncio-eventloop.rst:1205 +#: library/asyncio-eventloop.rst:1274 library/asyncio-eventloop.rst:1291 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." @@ -1985,25 +2091,25 @@ msgstr "" "Avec la boucle d'événements :class:`SelectorEventLoop`, le *pipe* est mis en " "mode non bloquant." -#: library/asyncio-eventloop.rst:1194 +#: library/asyncio-eventloop.rst:1280 msgid "Register the write end of *pipe* in the event loop." msgstr "Branche l'extrémité en écriture de *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:1199 +#: library/asyncio-eventloop.rst:1285 msgid "*pipe* is :term:`file-like object `." msgstr "*pipe* est un :term:`simili-fichier `." -#: library/asyncio-eventloop.rst:1201 +#: library/asyncio-eventloop.rst:1287 msgid "" -"Return pair ``(transport, protocol)``, where *transport* supports :class:" -"`WriteTransport` interface and *protocol* is an object instantiated by the " -"*protocol_factory*." +"Return pair ``(transport, protocol)``, where *transport* " +"supports :class:`WriteTransport` interface and *protocol* is an object " +"instantiated by the *protocol_factory*." msgstr "" "Renvoie la paire ``(transport, protocol)``, où *transport* prend en charge " "l'interface :class:`WriteTransport` et *protocol* est un objet instancié par " "*protocol_factory*." -#: library/asyncio-eventloop.rst:1210 +#: library/asyncio-eventloop.rst:1296 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." @@ -2012,21 +2118,24 @@ msgstr "" "sous Windows. Utilisez :class:`ProactorEventLoop` à la place pour Windows." # suit un : -#: library/asyncio-eventloop.rst:1215 +#: library/asyncio-eventloop.rst:1301 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" "les méthodes :meth:`loop.subprocess_exec` et :meth:`loop.subprocess_shell`." -#: library/asyncio-eventloop.rst:1220 +#: library/asyncio-eventloop.rst:1306 msgid "Unix signals" msgstr "Signaux Unix" -#: library/asyncio-eventloop.rst:1226 -msgid "Set *callback* as the handler for the *signum* signal." +#: library/asyncio-eventloop.rst:1312 +#, fuzzy +msgid "" +"Set *callback* as the handler for the *signum* signal, passing *args* as " +"positional arguments." msgstr "Définit *callback* comme gestionnaire du signal *signum*." -#: library/asyncio-eventloop.rst:1228 +#: library/asyncio-eventloop.rst:1315 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -2035,11 +2144,11 @@ msgid "" msgstr "" "La fonction de rappel sera appelée par *loop*, avec d'autres rappels en file " "d'attente et des coroutines exécutables de cette boucle d'événements. " -"Contrairement aux gestionnaires de signaux enregistrés à l'aide de :func:" -"`signal.signal`, un rappel enregistré avec cette fonction est autorisé à " -"interagir avec la boucle d'événements." +"Contrairement aux gestionnaires de signaux enregistrés à l'aide " +"de :func:`signal.signal`, un rappel enregistré avec cette fonction est " +"autorisé à interagir avec la boucle d'événements." -#: library/asyncio-eventloop.rst:1233 +#: library/asyncio-eventloop.rst:1320 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." @@ -2048,18 +2157,18 @@ msgstr "" "attrapable. Lève une :exc:`RuntimeError` s'il y a un problème lors de la " "configuration du gestionnaire." -#: library/asyncio-eventloop.rst:1239 +#: library/asyncio-eventloop.rst:1326 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" "Comme :func:`signal.signal`, cette fonction doit être invoquée dans le fil " "d'exécution principal." -#: library/asyncio-eventloop.rst:1244 +#: library/asyncio-eventloop.rst:1331 msgid "Remove the handler for the *sig* signal." msgstr "Supprime le gestionnaire du signal *sig*." -#: library/asyncio-eventloop.rst:1246 +#: library/asyncio-eventloop.rst:1333 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." @@ -2068,19 +2177,22 @@ msgstr "" "si aucun gestionnaire n'a été défini pour le signal donné." # suit un : -#: library/asyncio-eventloop.rst:1253 +#: library/asyncio-eventloop.rst:1340 msgid "The :mod:`signal` module." msgstr "le module :mod:`signal`." -#: library/asyncio-eventloop.rst:1257 +#: library/asyncio-eventloop.rst:1344 msgid "Executing code in thread or process pools" msgstr "Exécution de code dans des pools de threads ou de processus" -#: library/asyncio-eventloop.rst:1261 -msgid "Arrange for *func* to be called in the specified executor." +#: library/asyncio-eventloop.rst:1348 +#, fuzzy +msgid "" +"Arrange for *func* to be called in the specified executor passing *args* as " +"positional arguments." msgstr "Fait en sorte que *func* soit appelée dans l'exécuteur spécifié." -#: library/asyncio-eventloop.rst:1263 +#: library/asyncio-eventloop.rst:1351 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``. The " @@ -2089,7 +2201,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: library/asyncio-eventloop.rst:1311 +#: library/asyncio-eventloop.rst:1405 msgid "" "Note that the entry point guard (``if __name__ == '__main__'``) is required " "for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " @@ -2097,16 +2209,16 @@ msgid "" "importing of main module `." msgstr "" "Notez que la garde du point d'entrée (``if __name__ == '__main__'``) est " -"requis pour l'option 3 en raison des particularités de :mod:" -"`multiprocessing`, qui est utilisé par :class:`~concurrent.futures." -"ProcessPoolExecutor`. Voir :ref:`Importation sécurisée du module principal " -"`." +"requis pour l'option 3 en raison des particularités " +"de :mod:`multiprocessing`, qui est utilisé " +"par :class:`~concurrent.futures.ProcessPoolExecutor`. Voir :ref:`Importation " +"sécurisée du module principal `." -#: library/asyncio-eventloop.rst:1316 +#: library/asyncio-eventloop.rst:1410 msgid "This method returns a :class:`asyncio.Future` object." msgstr "Cette méthode renvoie un objet :class:`asyncio.Future`." -#: library/asyncio-eventloop.rst:1318 +#: library/asyncio-eventloop.rst:1412 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." @@ -2114,7 +2226,7 @@ msgstr "" "Utilisez :func:`functools.partial` pour :ref:`passer des arguments nommés " "` à *func*." -#: library/asyncio-eventloop.rst:1321 +#: library/asyncio-eventloop.rst:1415 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -2126,41 +2238,44 @@ msgstr "" "de pool de threads (:class:`~concurrent.futures.ThreadPoolExecutor`) le soin " "de définir le défaut." -#: library/asyncio-eventloop.rst:1330 +#: library/asyncio-eventloop.rst:1424 +#, fuzzy msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " -"*executor* must be an instance of :class:`~concurrent.futures." -"ThreadPoolExecutor`." +"*executor* must be an instance " +"of :class:`~concurrent.futures.ThreadPoolExecutor`, which " +"includes :class:`~concurrent.futures.InterpreterPoolExecutor`." msgstr "" -"Définit *executor* comme exécuteur par défaut utilisé par :meth:" -"`run_in_executor`. *executor* doit être une instance de :class:`~concurrent." -"futures.ThreadPoolExecutor`." +"Définit *executor* comme exécuteur par défaut utilisé " +"par :meth:`run_in_executor`. *executor* doit être une instance " +"de :class:`~concurrent.futures.ThreadPoolExecutor`." -#: library/asyncio-eventloop.rst:1334 +#: library/asyncio-eventloop.rst:1429 msgid "" -"*executor* must be an instance of :class:`~concurrent.futures." -"ThreadPoolExecutor`." +"*executor* must be an instance " +"of :class:`~concurrent.futures.ThreadPoolExecutor`." msgstr "" -"*executor* doit être une instance de :class:`~concurrent.futures." -"ThreadPoolExecutor`." +"*executor* doit être une instance " +"de :class:`~concurrent.futures.ThreadPoolExecutor`." -#: library/asyncio-eventloop.rst:1340 -msgid "Error Handling API" +#: library/asyncio-eventloop.rst:1435 +#, fuzzy +msgid "Error handling API" msgstr "API de gestion d'erreur" -#: library/asyncio-eventloop.rst:1342 +#: library/asyncio-eventloop.rst:1437 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" "Permet de personnaliser la façon dont les exceptions sont gérées dans la " "boucle d'événements." -#: library/asyncio-eventloop.rst:1346 +#: library/asyncio-eventloop.rst:1441 msgid "Set *handler* as the new event loop exception handler." msgstr "" "Définit *handler* comme nouveau gestionnaire d'exceptions de boucle " "d'événements." -#: library/asyncio-eventloop.rst:1348 +#: library/asyncio-eventloop.rst:1443 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -2175,20 +2290,20 @@ msgstr "" "détails de l'exception (voir la documentation :meth:`call_exception_handler` " "pour plus de détails sur le contexte)." -#: library/asyncio-eventloop.rst:1356 +#: library/asyncio-eventloop.rst:1451 msgid "" -"If the handler is called on behalf of a :class:`~asyncio.Task` or :class:" -"`~asyncio.Handle`, it is run in the :class:`contextvars.Context` of that " -"task or callback handle." +"If the handler is called on behalf of a :class:`~asyncio.Task` " +"or :class:`~asyncio.Handle`, it is run in the :class:`contextvars.Context` " +"of that task or callback handle." msgstr "" -#: library/asyncio-eventloop.rst:1362 +#: library/asyncio-eventloop.rst:1457 msgid "" "The handler may be called in the :class:`~contextvars.Context` of the task " "or handle where the exception originated." msgstr "" -#: library/asyncio-eventloop.rst:1367 +#: library/asyncio-eventloop.rst:1462 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." @@ -2196,11 +2311,11 @@ msgstr "" "Renvoie le gestionnaire d'exceptions actuel ou ``None`` si aucun " "gestionnaire d'exceptions personnalisé n'a été défini." -#: library/asyncio-eventloop.rst:1374 +#: library/asyncio-eventloop.rst:1469 msgid "Default exception handler." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1376 +#: library/asyncio-eventloop.rst:1471 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " @@ -2211,20 +2326,20 @@ msgstr "" "personnalisé qui souhaite s'en remettre au comportement du gestionnaire par " "défaut." -#: library/asyncio-eventloop.rst:1380 +#: library/asyncio-eventloop.rst:1475 msgid "" -"*context* parameter has the same meaning as in :meth:" -"`call_exception_handler`." +"*context* parameter has the same meaning as " +"in :meth:`call_exception_handler`." msgstr "" -"Le paramètre *context* a la même signification que dans :meth:" -"`call_exception_handler`." +"Le paramètre *context* a la même signification que " +"dans :meth:`call_exception_handler`." -#: library/asyncio-eventloop.rst:1385 +#: library/asyncio-eventloop.rst:1480 msgid "Call the current event loop exception handler." msgstr "" "Appelle le gestionnaire d'exception de la boucle d'évènements actuelle." -#: library/asyncio-eventloop.rst:1387 +#: library/asyncio-eventloop.rst:1482 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" @@ -2232,83 +2347,93 @@ msgstr "" "*context* est un objet ``dict`` contenant les clés suivantes (de nouvelles " "clés pourront être introduites dans les futures versions de Python) :" -#: library/asyncio-eventloop.rst:1390 +#: library/asyncio-eventloop.rst:1485 msgid "'message': Error message;" msgstr "'message' : message d'erreur ;" -#: library/asyncio-eventloop.rst:1391 +#: library/asyncio-eventloop.rst:1486 msgid "'exception' (optional): Exception object;" msgstr "'exception' (facultatif) : objet exception ;" -#: library/asyncio-eventloop.rst:1392 +#: library/asyncio-eventloop.rst:1487 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "'future' (facultatif) : instance de :class:`asyncio.Future` ;" -#: library/asyncio-eventloop.rst:1393 +#: library/asyncio-eventloop.rst:1488 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "'task' (facultatif) : instance de :class:`asyncio.Task` ;" -#: library/asyncio-eventloop.rst:1394 +#: library/asyncio-eventloop.rst:1489 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "*'handle'* (facultatif) : instance de :class:`asyncio.Handle` ;" -#: library/asyncio-eventloop.rst:1395 +#: library/asyncio-eventloop.rst:1490 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" "*'protocol'* (facultatif) : instance de :ref:`protocole asyncio ` ;" -#: library/asyncio-eventloop.rst:1396 +#: library/asyncio-eventloop.rst:1491 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" "'transport' (facultatif) : instance de :ref:`transport asyncio ` ;" -#: library/asyncio-eventloop.rst:1397 +#: library/asyncio-eventloop.rst:1492 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "'socket' (facultatif) : instance de :class:`socket.socket` ;" -#: library/asyncio-eventloop.rst:1398 +#: library/asyncio-eventloop.rst:1493 +msgid "'source_traceback' (optional): Traceback of the source;" +msgstr "" + +#: library/asyncio-eventloop.rst:1494 +msgid "'handle_traceback' (optional): Traceback of the handle;" +msgstr "" + +#: library/asyncio-eventloop.rst:1495 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "*'asyncgen'* (facultatif) : générateur asynchrone qui a causé" -#: library/asyncio-eventloop.rst:1399 +#: library/asyncio-eventloop.rst:1496 msgid "the exception." msgstr "l'exception" # suit un : -#: library/asyncio-eventloop.rst:1403 +#: library/asyncio-eventloop.rst:1500 #, fuzzy msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler` method." msgstr "" "cette méthode ne doit pas être surchargée dans les boucles d'événements sous-" -"classées. Pour la gestion personnalisée des exceptions, utilisez la méthode :" -"meth:`set_exception_handler()`." +"classées. Pour la gestion personnalisée des exceptions, utilisez la " +"méthode :meth:`set_exception_handler()`." -#: library/asyncio-eventloop.rst:1408 +#: library/asyncio-eventloop.rst:1505 msgid "Enabling debug mode" msgstr "Activation du mode débogage" -#: library/asyncio-eventloop.rst:1412 +#: library/asyncio-eventloop.rst:1509 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "Obtient le mode de débogage (:class:`bool`) de la boucle d'événements." -#: library/asyncio-eventloop.rst:1414 +#: library/asyncio-eventloop.rst:1511 msgid "" -"The default value is ``True`` if the environment variable :envvar:" -"`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." +"The default value is ``True`` if the environment " +"variable :envvar:`PYTHONASYNCIODEBUG` is set to a non-empty string, " +"``False`` otherwise." msgstr "" -"La valeur par défaut est ``True`` si la variable d'environnement :envvar:" -"`PYTHONASYNCIODEBUG` est définie sur une chaîne non vide, ``False`` sinon." +"La valeur par défaut est ``True`` si la variable " +"d'environnement :envvar:`PYTHONASYNCIODEBUG` est définie sur une chaîne non " +"vide, ``False`` sinon." -#: library/asyncio-eventloop.rst:1420 +#: library/asyncio-eventloop.rst:1517 msgid "Set the debug mode of the event loop." msgstr "Active le mode débogage pour la boucle d'évènements." # suit un : -#: library/asyncio-eventloop.rst:1424 +#: library/asyncio-eventloop.rst:1521 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." @@ -2316,27 +2441,28 @@ msgstr "" "le nouveau :ref:`mode de développement Python ` peut désormais " "également être utilisé pour activer le mode de débogage." -#: library/asyncio-eventloop.rst:1429 +#: library/asyncio-eventloop.rst:1526 msgid "" "This attribute can be used to set the minimum execution duration in seconds " "that is considered \"slow\". When debug mode is enabled, \"slow\" callbacks " "are logged." msgstr "" -#: library/asyncio-eventloop.rst:1433 +#: library/asyncio-eventloop.rst:1530 msgid "Default value is 100 milliseconds." msgstr "" # suit un : -#: library/asyncio-eventloop.rst:1437 +#: library/asyncio-eventloop.rst:1534 msgid "The :ref:`debug mode of asyncio `." msgstr "le :ref:`mode debogage d'asyncio `." -#: library/asyncio-eventloop.rst:1441 -msgid "Running Subprocesses" +#: library/asyncio-eventloop.rst:1538 +#, fuzzy +msgid "Running subprocesses" msgstr "Exécution de sous-processus" -#: library/asyncio-eventloop.rst:1443 +#: library/asyncio-eventloop.rst:1540 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " @@ -2344,37 +2470,38 @@ msgid "" msgstr "" "Les méthodes décrites dans ces sous-sections sont de bas niveau. Dans le " "code *async/await* normal, pensez à utiliser les fonctions de commodité de " -"haut niveau :func:`asyncio.create_subprocess_shell` et :func:`asyncio." -"create_subprocess_exec` à la place." +"haut niveau :func:`asyncio.create_subprocess_shell` " +"et :func:`asyncio.create_subprocess_exec` à la place." # suit un : -#: library/asyncio-eventloop.rst:1450 +#: library/asyncio-eventloop.rst:1547 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " -"subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" -"`Subprocess Support on Windows ` for details." +"subprocesses, whereas :class:`SelectorEventLoop` does not. " +"See :ref:`Subprocess Support on Windows ` for " +"details." msgstr "" "sous Windows, la boucle d'événements par défaut :class:`ProactorEventLoop` " -"prend en charge les sous-processus, contrairement à :class:" -"`SelectorEventLoop`. Voir :ref:`Prise en charge des sous-processus sous " -"Windows ` pour plus de détails." +"prend en charge les sous-processus, contrairement " +"à :class:`SelectorEventLoop`. Voir :ref:`Prise en charge des sous-processus " +"sous Windows ` pour plus de détails." -#: library/asyncio-eventloop.rst:1461 +#: library/asyncio-eventloop.rst:1559 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" "Crée un sous-processus à partir d'un ou plusieurs arguments de chaîne " "spécifiés par *args*." -#: library/asyncio-eventloop.rst:1464 +#: library/asyncio-eventloop.rst:1562 msgid "*args* must be a list of strings represented by:" msgstr "*args* doit être une liste de chaînes représentée par :" -#: library/asyncio-eventloop.rst:1466 +#: library/asyncio-eventloop.rst:1564 msgid ":class:`str`;" msgstr ":class:`str` ;" -#: library/asyncio-eventloop.rst:1467 +#: library/asyncio-eventloop.rst:1565 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." @@ -2382,7 +2509,7 @@ msgstr "" "ou :class:`bytes`, encodés selon l':ref:`encodage du système de fichiers " "`." -#: library/asyncio-eventloop.rst:1470 +#: library/asyncio-eventloop.rst:1568 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " @@ -2392,48 +2519,48 @@ msgstr "" "restantes spécifient les arguments. Ensemble, les arguments de chaîne " "forment le ``argv`` du programme." -#: library/asyncio-eventloop.rst:1474 +#: library/asyncio-eventloop.rst:1572 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " "argument; however, where :class:`~subprocess.Popen` takes a single argument " "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -"C'est similaire à la classe standard de la bibliothèque :class:`subprocess." -"Popen` appelée avec ``shell=False`` et la liste des chaînes passées en " -"premier argument ; cependant, où :class:`~subprocess.Popen` prend un seul " -"argument qui est une liste de chaînes, *subprocess_exec* prend plusieurs " -"arguments de chaînes." +"C'est similaire à la classe standard de la " +"bibliothèque :class:`subprocess.Popen` appelée avec ``shell=False`` et la " +"liste des chaînes passées en premier argument ; cependant, " +"où :class:`~subprocess.Popen` prend un seul argument qui est une liste de " +"chaînes, *subprocess_exec* prend plusieurs arguments de chaînes." -#: library/asyncio-eventloop.rst:1480 +#: library/asyncio-eventloop.rst:1578 msgid "" -"The *protocol_factory* must be a callable returning a subclass of the :class:" -"`asyncio.SubprocessProtocol` class." +"The *protocol_factory* must be a callable returning a subclass of " +"the :class:`asyncio.SubprocessProtocol` class." msgstr "" "Le *protocol_factory* doit être un appelable renvoyant une sous-classe de la " "classe :class:`asyncio.SubprocessProtocol`." -#: library/asyncio-eventloop.rst:1483 +#: library/asyncio-eventloop.rst:1581 msgid "Other parameters:" msgstr "Autres paramètres :" -#: library/asyncio-eventloop.rst:1485 +#: library/asyncio-eventloop.rst:1583 msgid "*stdin* can be any of these:" msgstr "*stdin* peut être l'un de ces éléments :" -#: library/asyncio-eventloop.rst:1487 library/asyncio-eventloop.rst:1498 -#: library/asyncio-eventloop.rst:1508 +#: library/asyncio-eventloop.rst:1585 library/asyncio-eventloop.rst:1596 +#: library/asyncio-eventloop.rst:1606 msgid "a file-like object" msgstr "" -#: library/asyncio-eventloop.rst:1488 +#: library/asyncio-eventloop.rst:1586 msgid "" "an existing file descriptor (a positive integer), for example those created " "with :meth:`os.pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1489 library/asyncio-eventloop.rst:1499 -#: library/asyncio-eventloop.rst:1509 +#: library/asyncio-eventloop.rst:1587 library/asyncio-eventloop.rst:1597 +#: library/asyncio-eventloop.rst:1607 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," @@ -2441,8 +2568,8 @@ msgstr "" "la constante :const:`subprocess.PIPE` (par défaut) qui va créer un nouveau " "tube et le connecter," -#: library/asyncio-eventloop.rst:1491 library/asyncio-eventloop.rst:1501 -#: library/asyncio-eventloop.rst:1511 +#: library/asyncio-eventloop.rst:1589 library/asyncio-eventloop.rst:1599 +#: library/asyncio-eventloop.rst:1609 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" @@ -2450,24 +2577,24 @@ msgstr "" "la valeur ``None`` qui fera que le sous-processus héritera du descripteur de " "fichier de ce processus," -#: library/asyncio-eventloop.rst:1493 library/asyncio-eventloop.rst:1503 -#: library/asyncio-eventloop.rst:1513 +#: library/asyncio-eventloop.rst:1591 library/asyncio-eventloop.rst:1601 +#: library/asyncio-eventloop.rst:1611 msgid "" -"the :const:`subprocess.DEVNULL` constant which indicates that the special :" -"data:`os.devnull` file will be used" +"the :const:`subprocess.DEVNULL` constant which indicates that the " +"special :data:`os.devnull` file will be used" msgstr "" -"la constante :const:`subprocess.DEVNULL` qui indique que le fichier spécial :" -"data:`os.devnull` sera utilisé." +"la constante :const:`subprocess.DEVNULL` qui indique que le fichier " +"spécial :data:`os.devnull` sera utilisé." -#: library/asyncio-eventloop.rst:1496 +#: library/asyncio-eventloop.rst:1594 msgid "*stdout* can be any of these:" msgstr "*stdout* peut être l'un de ces éléments :" -#: library/asyncio-eventloop.rst:1506 +#: library/asyncio-eventloop.rst:1604 msgid "*stderr* can be any of these:" msgstr "*stderr* peut être l'un de ces éléments :" -#: library/asyncio-eventloop.rst:1515 +#: library/asyncio-eventloop.rst:1613 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" @@ -2475,7 +2602,7 @@ msgstr "" "la constante :const:`subprocess.STDOUT` qui connectera le flux d'erreur " "standard au flux de sortie standard du processus." -#: library/asyncio-eventloop.rst:1518 +#: library/asyncio-eventloop.rst:1616 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " @@ -2486,7 +2613,7 @@ msgstr "" "*shell*, *text*, *encoding* et *errors*, qui ne doivent pas être spécifiés " "du tout." -#: library/asyncio-eventloop.rst:1523 +#: library/asyncio-eventloop.rst:1621 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " @@ -2496,15 +2623,15 @@ msgstr "" "flux sous forme de texte. :func:`bytes.decode` peut être utilisée pour " "convertir les octets renvoyés par le flux en texte." -#: library/asyncio-eventloop.rst:1527 +#: library/asyncio-eventloop.rst:1625 msgid "" "If a file-like object passed as *stdin*, *stdout* or *stderr* represents a " -"pipe, then the other side of this pipe should be registered with :meth:" -"`~loop.connect_write_pipe` or :meth:`~loop.connect_read_pipe` for use with " -"the event loop." +"pipe, then the other side of this pipe should be registered " +"with :meth:`~loop.connect_write_pipe` or :meth:`~loop.connect_read_pipe` for " +"use with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1532 +#: library/asyncio-eventloop.rst:1630 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." @@ -2512,7 +2639,7 @@ msgstr "" "Voir le constructeur de la classe :class:`subprocess.Popen` pour la " "documentation sur les autres arguments." -#: library/asyncio-eventloop.rst:1535 +#: library/asyncio-eventloop.rst:1633 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " @@ -2522,34 +2649,40 @@ msgstr "" "la classe de base :class:`asyncio.SubprocessTransport` et *protocol* est un " "objet instancié par *protocol_factory*." -#: library/asyncio-eventloop.rst:1543 +#: library/asyncio-eventloop.rst:1637 library/asyncio-eventloop.rst:1663 +msgid "" +"If the transport is closed or is garbage collected, the child process is " +"killed if it is still running." +msgstr "" + +#: library/asyncio-eventloop.rst:1645 msgid "" -"Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" -"`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -"Crée un sous-processus à partir de *cmd*, qui peut être une chaîne :class:" -"`str` ou une chaîne :class:`bytes` encodée avec l':ref:`encodage du système " -"de fichiers `, en utilisant la syntaxe \"shell\" de la " -"plate-forme." +"Crée un sous-processus à partir de *cmd*, qui peut être une " +"chaîne :class:`str` ou une chaîne :class:`bytes` encodée avec " +"l':ref:`encodage du système de fichiers `, en utilisant " +"la syntaxe \"shell\" de la plate-forme." -#: library/asyncio-eventloop.rst:1548 +#: library/asyncio-eventloop.rst:1650 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -"C'est similaire à la classe standard de la bibliothèque :class:`subprocess." -"Popen` appelée avec ``shell=True``." +"C'est similaire à la classe standard de la " +"bibliothèque :class:`subprocess.Popen` appelée avec ``shell=True``." -#: library/asyncio-eventloop.rst:1551 +#: library/asyncio-eventloop.rst:1653 msgid "" -"The *protocol_factory* must be a callable returning a subclass of the :class:" -"`SubprocessProtocol` class." +"The *protocol_factory* must be a callable returning a subclass of " +"the :class:`SubprocessProtocol` class." msgstr "" "Le *protocol_factory* doit être un appelable renvoyant une sous-classe de la " "classe :class:`SubprocessProtocol`." -#: library/asyncio-eventloop.rst:1554 +#: library/asyncio-eventloop.rst:1656 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." @@ -2557,7 +2690,7 @@ msgstr "" "Voir :meth:`~loop.subprocess_exec` pour plus de détails sur les arguments " "restants." -#: library/asyncio-eventloop.rst:1557 +#: library/asyncio-eventloop.rst:1659 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " @@ -2568,7 +2701,7 @@ msgstr "" "instancié par *protocol_factory*." # suit un : -#: library/asyncio-eventloop.rst:1562 +#: library/asyncio-eventloop.rst:1667 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -2585,25 +2718,26 @@ msgstr "" "caractères spéciaux dans les chaînes qui seront utilisées pour construire " "des commandes shell." -#: library/asyncio-eventloop.rst:1571 -msgid "Callback Handles" +#: library/asyncio-eventloop.rst:1676 +#, fuzzy +msgid "Callback handles" msgstr "Fonctions de rappel sur des descripteurs" -#: library/asyncio-eventloop.rst:1575 +#: library/asyncio-eventloop.rst:1680 msgid "" -"A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." -"call_soon_threadsafe`." +"A callback wrapper object returned " +"by :meth:`loop.call_soon`, :meth:`loop.call_soon_threadsafe`." msgstr "" -"Objet encapsulant une fonction de rappel renvoyé par :meth:`loop." -"call_soon`, :meth:`loop.call_soon_threadsafe`." +"Objet encapsulant une fonction de rappel renvoyé " +"par :meth:`loop.call_soon`, :meth:`loop.call_soon_threadsafe`." -#: library/asyncio-eventloop.rst:1580 +#: library/asyncio-eventloop.rst:1685 #, fuzzy msgid "" "Return the :class:`contextvars.Context` object associated with the handle." msgstr "Renvoie la boucle d'événement associée à l'objet serveur." -#: library/asyncio-eventloop.rst:1587 +#: library/asyncio-eventloop.rst:1692 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." @@ -2611,55 +2745,56 @@ msgstr "" "Annule le rappel. Si le rappel a déjà été annulé ou exécuté, cette méthode " "n'a aucun effet." -#: library/asyncio-eventloop.rst:1592 +#: library/asyncio-eventloop.rst:1697 msgid "Return ``True`` if the callback was cancelled." msgstr "Renvoie ``True`` si la fonction de rappel a été annulée." -#: library/asyncio-eventloop.rst:1598 +#: library/asyncio-eventloop.rst:1703 msgid "" -"A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" -"`loop.call_at`." +"A callback wrapper object returned by :meth:`loop.call_later`, " +"and :meth:`loop.call_at`." msgstr "" "Objet encapsulant la fonction de rappel renvoyé par :meth:`loop.call_later` " "et :meth:`loop.call_at`." -#: library/asyncio-eventloop.rst:1601 +#: library/asyncio-eventloop.rst:1706 msgid "This class is a subclass of :class:`Handle`." msgstr "Cette classe est une sous-classe de :class:`Handle`." -#: library/asyncio-eventloop.rst:1605 +#: library/asyncio-eventloop.rst:1710 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" "Renvoie une heure de rappel planifiée sous forme de :class:`float` secondes." -#: library/asyncio-eventloop.rst:1607 +#: library/asyncio-eventloop.rst:1712 msgid "" -"The time is an absolute timestamp, using the same time reference as :meth:" -"`loop.time`." +"The time is an absolute timestamp, using the same time reference " +"as :meth:`loop.time`." msgstr "" -"L'heure est un horodatage absolu, utilisant la même référence de temps que :" -"meth:`loop.time`." +"L'heure est un horodatage absolu, utilisant la même référence de temps " +"que :meth:`loop.time`." -#: library/asyncio-eventloop.rst:1614 -msgid "Server Objects" +#: library/asyncio-eventloop.rst:1719 +#, fuzzy +msgid "Server objects" msgstr "Objets Serveur" -#: library/asyncio-eventloop.rst:1616 +#: library/asyncio-eventloop.rst:1721 msgid "" -"Server objects are created by :meth:`loop.create_server`, :meth:`loop." -"create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " -"functions." +"Server objects are created " +"by :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :func:`start_server`, " +"and :func:`start_unix_server` functions." msgstr "" -"Les objets serveur sont créés par les fonctions :meth:`loop.create_server`, :" -"meth:`loop.create_unix_server`, :func:`start_server` et :func:" -"`start_unix_server`." +"Les objets serveur sont créés par les " +"fonctions :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :func:`start_server` " +"et :func:`start_unix_server`." -#: library/asyncio-eventloop.rst:1620 +#: library/asyncio-eventloop.rst:1725 #, fuzzy msgid "Do not instantiate the :class:`Server` class directly." msgstr "N'instanciez pas la classe directement." -#: library/asyncio-eventloop.rst:1624 +#: library/asyncio-eventloop.rst:1729 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " @@ -2671,26 +2806,26 @@ msgstr "" "l'instruction ``async with`` est terminée ::" # suit un : -#: library/asyncio-eventloop.rst:1637 +#: library/asyncio-eventloop.rst:1742 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" "l'objet serveur est un gestionnaire de contexte asynchrone depuis Python 3.7." -#: library/asyncio-eventloop.rst:1640 +#: library/asyncio-eventloop.rst:1745 msgid "" "This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " "3.10.3 and 3.11." msgstr "" -#: library/asyncio-eventloop.rst:1645 +#: library/asyncio-eventloop.rst:1750 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -"Arrête le serveur : ferme les connecteurs d'écoute et définit l'attribut :" -"attr:`sockets` à ``None``." +"Arrête le serveur : ferme les connecteurs d'écoute et définit " +"l'attribut :attr:`sockets` à ``None``." -#: library/asyncio-eventloop.rst:1648 +#: library/asyncio-eventloop.rst:1753 msgid "" "The sockets that represent existing incoming client connections are left " "open." @@ -2698,59 +2833,59 @@ msgstr "" "Les connecteurs qui représentent les connexions client entrantes existantes " "restent ouvertes." -#: library/asyncio-eventloop.rst:1651 +#: library/asyncio-eventloop.rst:1756 #, fuzzy msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " "to wait until the server is closed (and no more connections are active)." msgstr "" -"Le serveur est fermé de manière asynchrone, utilisez la coroutine :meth:" -"`wait_closed` pour attendre que le serveur soit fermé." +"Le serveur est fermé de manière asynchrone, utilisez la " +"coroutine :meth:`wait_closed` pour attendre que le serveur soit fermé." -#: library/asyncio-eventloop.rst:1657 +#: library/asyncio-eventloop.rst:1762 #, fuzzy msgid "Close all existing incoming client connections." msgstr "" "Les connecteurs qui représentent les connexions client entrantes existantes " "restent ouvertes." -#: library/asyncio-eventloop.rst:1659 +#: library/asyncio-eventloop.rst:1764 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1662 +#: library/asyncio-eventloop.rst:1767 msgid "" ":meth:`close` should be called before :meth:`close_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: library/asyncio-eventloop.rst:1669 +#: library/asyncio-eventloop.rst:1774 msgid "" "Close all existing incoming client connections immediately, without waiting " "for pending operations to complete." msgstr "" -#: library/asyncio-eventloop.rst:1672 +#: library/asyncio-eventloop.rst:1777 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: library/asyncio-eventloop.rst:1675 +#: library/asyncio-eventloop.rst:1780 msgid "" ":meth:`close` should be called before :meth:`abort_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: library/asyncio-eventloop.rst:1682 +#: library/asyncio-eventloop.rst:1787 msgid "Return the event loop associated with the server object." msgstr "Renvoie la boucle d'événement associée à l'objet serveur." -#: library/asyncio-eventloop.rst:1688 +#: library/asyncio-eventloop.rst:1794 msgid "Start accepting connections." msgstr "Commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1690 +#: library/asyncio-eventloop.rst:1796 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." @@ -2758,7 +2893,7 @@ msgstr "" "Cette méthode est idempotente, elle peut donc être appelée lorsque le " "serveur est déjà en service." -#: library/asyncio-eventloop.rst:1693 +#: library/asyncio-eventloop.rst:1799 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -2766,13 +2901,13 @@ msgid "" "or :meth:`Server.serve_forever` can be used to make the Server start " "accepting connections." msgstr "" -"Le paramètre nommé *start_serving* de :meth:`loop.create_server` et :meth:" -"`asyncio.start_server` permet de créer un objet *Server* qui n'accepte pas " -"les connexions initialement. Dans ce cas, ``Server.start_serving()`` ou :" -"meth:`Server.serve_forever` peut être utilisée pour que le serveur commence " -"à accepter les connexions." +"Le paramètre nommé *start_serving* de :meth:`loop.create_server` " +"et :meth:`asyncio.start_server` permet de créer un objet *Server* qui " +"n'accepte pas les connexions initialement. Dans ce cas, " +"``Server.start_serving()`` ou :meth:`Server.serve_forever` peut être " +"utilisée pour que le serveur commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1704 +#: library/asyncio-eventloop.rst:1811 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." @@ -2780,7 +2915,7 @@ msgstr "" "Commence à accepter les connexions jusqu'à ce que la coroutine soit annulée. " "L'annulation de la tâche ``serve_forever`` provoque la fermeture du serveur." -#: library/asyncio-eventloop.rst:1708 +#: library/asyncio-eventloop.rst:1815 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." @@ -2788,18 +2923,18 @@ msgstr "" "Cette méthode peut être appelée si le serveur accepte déjà les connexions. " "Une seule tâche ``serve_forever`` peut exister par objet *Server*." -#: library/asyncio-eventloop.rst:1730 +#: library/asyncio-eventloop.rst:1837 msgid "Return ``True`` if the server is accepting new connections." msgstr "Renvoie ``True`` si le serveur accepte de nouvelles connexions." -#: library/asyncio-eventloop.rst:1736 +#: library/asyncio-eventloop.rst:1844 #, fuzzy msgid "" "Wait until the :meth:`close` method completes and all active connections " "have finished." msgstr "Attend que la méthode :meth:`close` se termine." -#: library/asyncio-eventloop.rst:1741 +#: library/asyncio-eventloop.rst:1849 #, fuzzy msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " @@ -2808,7 +2943,7 @@ msgstr "" "Liste les objets :class:`socket.socket` sur lesquels le serveur écoute." # vulnérabilités -#: library/asyncio-eventloop.rst:1744 +#: library/asyncio-eventloop.rst:1852 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." @@ -2816,33 +2951,34 @@ msgstr "" "avant Python 3.7, ``Server.sockets`` renvoyait directement une liste interne " "de sockets de serveur. En 3.7, une copie de cette liste est renvoyée." -#: library/asyncio-eventloop.rst:1754 -msgid "Event Loop Implementations" +#: library/asyncio-eventloop.rst:1862 +#, fuzzy +msgid "Event loop implementations" msgstr "Implémentations de boucle d'évènements" -#: library/asyncio-eventloop.rst:1756 +#: library/asyncio-eventloop.rst:1864 msgid "" -"asyncio ships with two different event loop implementations: :class:" -"`SelectorEventLoop` and :class:`ProactorEventLoop`." +"asyncio ships with two different event loop " +"implementations: :class:`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" "*asyncio* est livré avec deux implémentations de boucles d'événements " "différentes : :class:`SelectorEventLoop` et :class:`ProactorEventLoop`." -#: library/asyncio-eventloop.rst:1759 +#: library/asyncio-eventloop.rst:1867 #, fuzzy msgid "By default asyncio is configured to use :class:`EventLoop`." msgstr "" "Par défaut, *asyncio* est configuré pour utiliser :class:`SelectorEventLoop` " "sous Unix et :class:`ProactorEventLoop` sous Windows." -#: library/asyncio-eventloop.rst:1764 +#: library/asyncio-eventloop.rst:1872 #, fuzzy msgid "" "A subclass of :class:`AbstractEventLoop` based on the :mod:`selectors` " "module." msgstr "Boucle d'événements basée sur le module :mod:`selectors`." -#: library/asyncio-eventloop.rst:1767 +#: library/asyncio-eventloop.rst:1875 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " @@ -2852,7 +2988,7 @@ msgstr "" "donnée. Il est également possible de configurer manuellement " "l'implémentation exacte du sélecteur à utiliser ::" -#: library/asyncio-eventloop.rst:1787 +#: library/asyncio-eventloop.rst:1894 #, fuzzy msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " @@ -2861,35 +2997,36 @@ msgstr "" "Boucle d'événements pour Windows qui utilise des \"I/O Completion Ports\" " "(IOCP)." -#: library/asyncio-eventloop.rst:1793 +#: library/asyncio-eventloop.rst:1900 +#, fuzzy msgid "" -"`MSDN documentation on I/O Completion Ports `_." +"`MSDN documentation on I/O Completion Ports `_." msgstr "" "`Documentation MSDN sur les ports de saisie semi-automatique d’E/S `_." -#: library/asyncio-eventloop.rst:1798 +#: library/asyncio-eventloop.rst:1905 msgid "" -"An alias to the most efficient available subclass of :class:" -"`AbstractEventLoop` for the given platform." +"An alias to the most efficient available subclass " +"of :class:`AbstractEventLoop` for the given platform." msgstr "" -#: library/asyncio-eventloop.rst:1801 +#: library/asyncio-eventloop.rst:1908 #, fuzzy msgid "" -"It is an alias to :class:`SelectorEventLoop` on Unix and :class:" -"`ProactorEventLoop` on Windows." +"It is an alias to :class:`SelectorEventLoop` on Unix " +"and :class:`ProactorEventLoop` on Windows." msgstr "" "Par défaut, *asyncio* est configuré pour utiliser :class:`SelectorEventLoop` " "sous Unix et :class:`ProactorEventLoop` sous Windows." -#: library/asyncio-eventloop.rst:1807 +#: library/asyncio-eventloop.rst:1914 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -"Classe mère abstraite pour les boucles d'événements conforme à *asyncio*." +"Classe abstraite pour les boucles d'événements conforme à *asyncio*." -#: library/asyncio-eventloop.rst:1809 +#: library/asyncio-eventloop.rst:1916 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." @@ -2897,28 +3034,29 @@ msgstr "" "La section :ref:`asyncio-event-loop-methods` liste toutes les méthodes " "qu'une implémentation alternative de ``AbstractEventLoop`` doit définir." -#: library/asyncio-eventloop.rst:1815 +#: library/asyncio-eventloop.rst:1922 msgid "Examples" msgstr "Exemples" -#: library/asyncio-eventloop.rst:1817 +#: library/asyncio-eventloop.rst:1924 msgid "" "Note that all examples in this section **purposefully** show how to use the " -"low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." -"call_soon`. Modern asyncio applications rarely need to be written this way; " -"consider using the high-level functions like :func:`asyncio.run`." +"low-level event loop APIs, such as :meth:`loop.run_forever` " +"and :meth:`loop.call_soon`. Modern asyncio applications rarely need to be " +"written this way; consider using the high-level functions " +"like :func:`asyncio.run`." msgstr "" "Notez que tous les exemples de cette section montrent **à dessein** comment " -"utiliser les API de boucle d'événement de bas niveau, telles que :meth:`loop." -"run_forever` et :meth:`loop.call_soon`. Les applications *asyncio* modernes " -"ont rarement besoin d'être écrites de cette façon ; pensez à utiliser les " -"fonctions de haut niveau comme :func:`asyncio.run`." +"utiliser les API de boucle d'événement de bas niveau, telles " +"que :meth:`loop.run_forever` et :meth:`loop.call_soon`. Les applications " +"*asyncio* modernes ont rarement besoin d'être écrites de cette façon ; " +"pensez à utiliser les fonctions de haut niveau comme :func:`asyncio.run`." -#: library/asyncio-eventloop.rst:1827 +#: library/asyncio-eventloop.rst:1934 msgid "Hello World with call_soon()" msgstr "\"Hello World\" avec ``call_soon()``" -#: library/asyncio-eventloop.rst:1829 +#: library/asyncio-eventloop.rst:1936 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" @@ -2928,7 +3066,7 @@ msgstr "" "d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:1853 +#: library/asyncio-eventloop.rst:1960 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." @@ -2936,11 +3074,11 @@ msgstr "" "un exemple similaire de :ref:`Hello World ` créé avec une " "coroutine et la fonction :func:`run`." -#: library/asyncio-eventloop.rst:1860 +#: library/asyncio-eventloop.rst:1967 msgid "Display the current date with call_later()" msgstr "Affichage de la date actuelle avec ``call_later()``" -#: library/asyncio-eventloop.rst:1862 +#: library/asyncio-eventloop.rst:1969 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " @@ -2951,7 +3089,7 @@ msgstr "" "5 secondes, puis arrête la boucle d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:1890 +#: library/asyncio-eventloop.rst:1997 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." @@ -2959,20 +3097,20 @@ msgstr "" "un exemple similaire de :ref:`date actuelle ` créé " "avec une coroutine et la fonction :func:`run`." -#: library/asyncio-eventloop.rst:1897 +#: library/asyncio-eventloop.rst:2004 msgid "Watch a file descriptor for read events" msgstr "Surveillance des événements de lecture pour un descripteur de fichier" -#: library/asyncio-eventloop.rst:1899 +#: library/asyncio-eventloop.rst:2006 msgid "" -"Wait until a file descriptor received some data using the :meth:`loop." -"add_reader` method and then close the event loop::" +"Wait until a file descriptor received some data using " +"the :meth:`loop.add_reader` method and then close the event loop::" msgstr "" "Attend qu'un descripteur de fichier reçoive des données en utilisant la " "méthode :meth:`loop.add_reader` puis ferme la boucle d'événements ::" # suit un : -#: library/asyncio-eventloop.rst:1937 +#: library/asyncio-eventloop.rst:2044 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." @@ -2981,49 +3119,62 @@ msgstr "" "les transports, les protocoles et la méthode :meth:`loop.create_connection`," # suit un : -#: library/asyncio-eventloop.rst:1941 +#: library/asyncio-eventloop.rst:2048 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" "un autre :ref:`exemple ` " -"utilisant la fonction et les flux de haut niveau :func:`asyncio." -"open_connection`." +"utilisant la fonction et les flux de haut " +"niveau :func:`asyncio.open_connection`." -#: library/asyncio-eventloop.rst:1949 +#: library/asyncio-eventloop.rst:2056 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "Gestion des signaux *SIGINT* et *SIGTERM*" -#: library/asyncio-eventloop.rst:1951 -msgid "(This ``signals`` example only works on Unix.)" +#: library/asyncio-eventloop.rst:2058 +#, fuzzy +msgid "(This ``signal`` example only works on Unix.)" msgstr "(Cet exemple ne fonctionne que sur Unix.)" -#: library/asyncio-eventloop.rst:1953 +#: library/asyncio-eventloop.rst:2060 #, fuzzy msgid "" -"Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal." -"SIGTERM` using the :meth:`loop.add_signal_handler` method::" +"Register handlers for signals :const:`~signal.SIGINT` " +"and :const:`~signal.SIGTERM` using the :meth:`loop.add_signal_handler` " +"method::" msgstr "" -"Enregistre des gestionnaires pour les signaux :py:data:`SIGINT` et :py:data:" -"`SIGTERM` en utilisant la méthode :meth:`loop.add_signal_handler` ::" +"Enregistre des gestionnaires pour les signaux :py:data:`SIGINT` " +"et :py:data:`SIGTERM` en utilisant la " +"méthode :meth:`loop.add_signal_handler` ::" + +#~ msgid "" +#~ "The optional positional *args* will be passed to the callback when it is " +#~ "called. If you want the callback to be called with keyword arguments " +#~ "use :func:`functools.partial`." +#~ msgstr "" +#~ "L'argument positionnel facultatif *args* sera transmis au rappel " +#~ "lorsqu'il sera appelé. Si vous voulez que le rappel soit appelé avec des " +#~ "arguments nommés, utilisez :func:`functools.partial`." # suit un : #~ msgid "" #~ "In Python versions 3.10.0--3.10.8 and 3.11.0 this function (and other " #~ "functions which use it implicitly) emitted a :exc:`DeprecationWarning` if " #~ "there was no running event loop, even if the current loop was set on the " -#~ "policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a :exc:" -#~ "`DeprecationWarning` if there is no running event loop and no current " -#~ "loop is set. In some future Python release this will become an error." +#~ "policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit " +#~ "a :exc:`DeprecationWarning` if there is no running event loop and no " +#~ "current loop is set. In some future Python release this will become an " +#~ "error." #~ msgstr "" #~ "dans les versions Python 3.10.0–3.10.8 et 3.11.0, cette fonction (et " -#~ "d'autres fonctions qui l'utilisent implicitement) levait un :exc:" -#~ "`DeprecationWarning` s'il n'y avait pas de boucle d'événements en cours " -#~ "d'exécution, même si la boucle actuelle était définie dans la politique. " -#~ "Dans les versions Python 3.10.9, 3.11.1 et 3.12, elles lèvent un :exc:" -#~ "`DeprecationWarning` s'il n'y a pas de boucle d'événements en cours et " -#~ "qu'aucune boucle actuelle n'est définie. Dans une future version de " -#~ "Python, cela deviendra une erreur." +#~ "d'autres fonctions qui l'utilisent implicitement) levait " +#~ "un :exc:`DeprecationWarning` s'il n'y avait pas de boucle d'événements en " +#~ "cours d'exécution, même si la boucle actuelle était définie dans la " +#~ "politique. Dans les versions Python 3.10.9, 3.11.1 et 3.12, elles lèvent " +#~ "un :exc:`DeprecationWarning` s'il n'y a pas de boucle d'événements en " +#~ "cours et qu'aucune boucle actuelle n'est définie. Dans une future version " +#~ "de Python, cela deviendra une erreur." #~ msgid ":ref:`Availability `: Unix." #~ msgstr ":ref:`Disponibilité ` : Unix." @@ -3032,32 +3183,33 @@ msgstr "" #~ "The *executor* argument should be an :class:`concurrent.futures.Executor` " #~ "instance. The default executor is used if *executor* is ``None``." #~ msgstr "" -#~ "L'argument *executor* doit être une instance :class:`concurrent.futures." -#~ "Executor`. L'exécuteur par défaut est utilisé si *executor* vaut ``None``." +#~ "L'argument *executor* doit être une " +#~ "instance :class:`concurrent.futures.Executor`. L'exécuteur par défaut est " +#~ "utilisé si *executor* vaut ``None``." #~ msgid "" #~ "a file-like object representing a pipe to be connected to the " #~ "subprocess's standard input stream using :meth:`~loop.connect_write_pipe`" #~ msgstr "" #~ "un objet de type fichier représentant un tube à connecter au flux " -#~ "d'entrée standard du sous-processus en utilisant :meth:`~loop." -#~ "connect_write_pipe`," +#~ "d'entrée standard du sous-processus en " +#~ "utilisant :meth:`~loop.connect_write_pipe`," #~ msgid "" #~ "a file-like object representing a pipe to be connected to the " #~ "subprocess's standard output stream using :meth:`~loop.connect_write_pipe`" #~ msgstr "" #~ "un objet de type fichier représentant un tube à connecter au flux de " -#~ "sortie standard du sous-processus en utilisant :meth:`~loop." -#~ "connect_write_pipe`," +#~ "sortie standard du sous-processus en " +#~ "utilisant :meth:`~loop.connect_write_pipe`," #~ msgid "" #~ "a file-like object representing a pipe to be connected to the " #~ "subprocess's standard error stream using :meth:`~loop.connect_write_pipe`" #~ msgstr "" #~ "un objet de type fichier représentant un tube à connecter au flux " -#~ "d'erreurs standard du sous-processus en utilisant :meth:`~loop." -#~ "connect_write_pipe`," +#~ "d'erreurs standard du sous-processus en " +#~ "utilisant :meth:`~loop.connect_write_pipe`," #~ msgid ":ref:`Availability `: Unix, Windows." #~ msgstr ":ref:`Disponibilité ` : Unix, Windows." diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po index c2fb717d0..c7804c276 100644 --- a/library/asyncio-exceptions.po +++ b/library/asyncio-exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 14:38+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-11 22:40+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -55,8 +55,8 @@ msgid "" ":exc:`CancelledError` is now a subclass of :class:`BaseException` rather " "than :class:`Exception`." msgstr "" -":exc:`CancelledError` est maintenant une sous-classe de :class:" -"`BaseException`." +":exc:`CancelledError` est maintenant une sous-classe " +"de :class:`BaseException`." #: library/asyncio-exceptions.rst:39 msgid "Invalid internal state of :class:`Task` or :class:`Future`." diff --git a/library/asyncio-extending.po b/library/asyncio-extending.po index 9ed3c8d8b..513e481aa 100644 --- a/library/asyncio-extending.po +++ b/library/asyncio-extending.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-17 19:00+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -64,8 +64,8 @@ msgid "" "declared but not implemented in :class:`asyncio.BaseEventLoop`." msgstr "" "Le successeur doit, pour ce qui le concerne, implémenter un ensemble de " -"méthodes *privées* déclarées mais non implémentées dans :class:`asyncio." -"BaseEventLoop`." +"méthodes *privées* déclarées mais non implémentées " +"dans :class:`asyncio.BaseEventLoop`." #: library/asyncio-extending.rst:30 msgid "" @@ -86,13 +86,14 @@ msgstr "Constructeurs privés *Future* et *Task*" #: library/asyncio-extending.rst:40 msgid "" ":class:`asyncio.Future` and :class:`asyncio.Task` should be never created " -"directly, please use corresponding :meth:`loop.create_future` and :meth:" -"`loop.create_task`, or :func:`asyncio.create_task` factories instead." +"directly, please use corresponding :meth:`loop.create_future` " +"and :meth:`loop.create_task`, or :func:`asyncio.create_task` factories " +"instead." msgstr "" ":class:`asyncio.Future` et :class:`asyncio.Task` ne doivent jamais être " -"créées directement, veuillez utiliser les correspondances :meth:`loop." -"create_future` et :meth:`loop.create_task`, ou les fabriques :func:`asyncio." -"create_task` à la place." +"créées directement, veuillez utiliser les " +"correspondances :meth:`loop.create_future` et :meth:`loop.create_task`, ou " +"les fabriques :func:`asyncio.create_task` à la place." #: library/asyncio-extending.rst:44 msgid "" @@ -141,12 +142,12 @@ msgstr "Prise en charge de la durée de vie des tâches" #, fuzzy msgid "" "A third party task implementation should call the following functions to " -"keep a task visible by :func:`asyncio.all_tasks` and :func:`asyncio." -"current_task`:" +"keep a task visible by :func:`asyncio.all_tasks` " +"and :func:`asyncio.current_task`:" msgstr "" "Une implémentation tierce de tâche doit appeler les fonctions suivantes pour " -"garder une tâche visible par :func:`asyncio.get_tasks` et :func:`asyncio." -"current_task` :" +"garder une tâche visible par :func:`asyncio.get_tasks` " +"et :func:`asyncio.current_task` :" #: library/asyncio-extending.rst:76 msgid "Register a new *task* as managed by *asyncio*." @@ -172,8 +173,8 @@ msgstr "Bascule la tâche en cours vers l'argument *task*." #: library/asyncio-extending.rst:90 msgid "" -"Call the function just before executing a portion of embedded *coroutine* (:" -"meth:`coroutine.send` or :meth:`coroutine.throw`)." +"Call the function just before executing a portion of embedded *coroutine* " +"(:meth:`coroutine.send` or :meth:`coroutine.throw`)." msgstr "" "Appelez la fonction juste avant d'exécuter une partie de la *coroutine* " "intégrée (:meth:`coroutine.send` ou :meth:`coroutine.throw`)." @@ -184,8 +185,8 @@ msgstr "Rebascule la tâche en cours de *task* à ``None``." #: library/asyncio-extending.rst:97 msgid "" -"Call the function just after :meth:`coroutine.send` or :meth:`coroutine." -"throw` execution." +"Call the function just after :meth:`coroutine.send` " +"or :meth:`coroutine.throw` execution." msgstr "" -"Appelez la fonction juste après l'exécution de :meth:`coroutine.send` ou :" -"meth:`coroutine.throw`." +"Appelez la fonction juste après l'exécution de :meth:`coroutine.send` " +"ou :meth:`coroutine.throw`." diff --git a/library/asyncio-future.po b/library/asyncio-future.po index 801bf84ff..1e31b59c2 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-06-17 10:41+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -72,18 +72,18 @@ msgstr "" #: library/asyncio-future.rst:42 msgid "" -"a :class:`Task` object wrapping *obj*, if *obj* is a coroutine (:func:" -"`iscoroutine` is used for the test); in this case the coroutine will be " -"scheduled by ``ensure_future()``." +"a :class:`Task` object wrapping *obj*, if *obj* is a coroutine " +"(:func:`iscoroutine` is used for the test); in this case the coroutine will " +"be scheduled by ``ensure_future()``." msgstr "" -"un objet :class:`Task` encapsulant *obj* si ce dernier est une coroutine (:" -"func:`iscoroutine` est utilisée pour le test). Dans ce cas, l’exécution de " +"un objet :class:`Task` encapsulant *obj* si ce dernier est une coroutine " +"(:func:`iscoroutine` est utilisée pour le test). Dans ce cas, l’exécution de " "la coroutine sera planifiée par ``ensure_future()`` ;" #: library/asyncio-future.rst:47 msgid "" -"a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" -"func:`inspect.isawaitable` is used for the test.)" +"a :class:`Task` object that would await on *obj*, if *obj* is an awaitable " +"(:func:`inspect.isawaitable` is used for the test.)" msgstr "" "un objet :class:`Task` qui attendra (*await*) *obj* si ce dernier peut être " "attendu (*awaitable*). :func:`iscoroutine` est utilisée pour le test." @@ -91,30 +91,32 @@ msgstr "" #: library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." msgstr "" -"Si *obj* ne correspond à aucun des critères ci-dessus, une exception :exc:" -"`TypeError` est levée." +"Si *obj* ne correspond à aucun des critères ci-dessus, une " +"exception :exc:`TypeError` est levée." #: library/asyncio-future.rst:54 msgid "" -"See also the :func:`create_task` function which is the preferred way for " -"creating new Tasks." -msgstr "" -"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée " -"pour créer des nouvelles tâches." - -#: library/asyncio-future.rst:57 -msgid "" "Save a reference to the result of this function, to avoid a task " "disappearing mid-execution." msgstr "" "Gardez une référence au résultat de cette fonction pour éviter de voir une " "tâche disparaitre au milieu de son exécution." -#: library/asyncio-future.rst:60 +#: library/asyncio-future.rst:57 +#, fuzzy +msgid "" +"See also the :func:`create_task` function which is the preferred way for " +"creating new tasks or use :class:`asyncio.TaskGroup` which keeps reference " +"to the task internally." +msgstr "" +"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée " +"pour créer des nouvelles tâches." + +#: library/asyncio-future.rst:61 msgid "The function accepts any :term:`awaitable` object." msgstr "La fonction accepte n'importe quel objet :term:`awaitable`." -#: library/asyncio-future.rst:63 +#: library/asyncio-future.rst:64 msgid "" "Deprecation warning is emitted if *obj* is not a Future-like object and " "*loop* is not specified and there is no running event loop." @@ -123,15 +125,15 @@ msgstr "" "comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas de boucle " "d'évènements en cours d'exécution." -#: library/asyncio-future.rst:70 +#: library/asyncio-future.rst:71 msgid "" -"Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio." -"Future` object." +"Wrap a :class:`concurrent.futures.Future` object in " +"a :class:`asyncio.Future` object." msgstr "" -"Encapsule un objet :class:`concurrent.futures.Future` dans un objet :class:" -"`asyncio.Future`." +"Encapsule un objet :class:`concurrent.futures.Future` dans un " +"objet :class:`asyncio.Future`." -#: library/asyncio-future.rst:73 +#: library/asyncio-future.rst:74 msgid "" "Deprecation warning is emitted if *future* is not a Future-like object and " "*loop* is not specified and there is no running event loop." @@ -140,11 +142,11 @@ msgstr "" "comportant comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas " "de boucle d'évènements en cours d'exécution." -#: library/asyncio-future.rst:79 +#: library/asyncio-future.rst:81 msgid "Future Object" msgstr "Objet *Future*" -#: library/asyncio-future.rst:83 +#: library/asyncio-future.rst:85 msgid "" "A Future represents an eventual result of an asynchronous operation. Not " "thread-safe." @@ -152,7 +154,7 @@ msgstr "" "Un *Future* représente le résultat final d'une opération asynchrone. Il " "n'est pas conçu pour pouvoir être utilisé par plusieurs fils d'exécution." -#: library/asyncio-future.rst:86 +#: library/asyncio-future.rst:88 msgid "" "Future is an :term:`awaitable` object. Coroutines can await on Future " "objects until they either have a result or an exception set, or until they " @@ -163,7 +165,7 @@ msgstr "" "un résultat, ils lèvent une exception ou qu'ils soient annulés. Un *Future* " "peut être attendu plusieurs fois et le résultat est le même." -#: library/asyncio-future.rst:91 +#: library/asyncio-future.rst:93 msgid "" "Typically Futures are used to enable low-level callback-based code (e.g. in " "protocols implemented using asyncio :ref:`transports `) " "d'interagir avec du code haut niveau utilisant *async* et *await*." -#: library/asyncio-future.rst:96 +#: library/asyncio-future.rst:98 msgid "" "The rule of thumb is to never expose Future objects in user-facing APIs, and " -"the recommended way to create a Future object is to call :meth:`loop." -"create_future`. This way alternative event loop implementations can inject " -"their own optimized implementations of a Future object." +"the recommended way to create a Future object is to " +"call :meth:`loop.create_future`. This way alternative event loop " +"implementations can inject their own optimized implementations of a Future " +"object." msgstr "" "Une bonne règle empirique est de ne jamais exposer des objets *Future* dans " "des *API* destinées à l'utilisateur. La façon privilégiée de créer des " @@ -187,11 +190,15 @@ msgstr "" "permet aux implémentations alternatives de la boucle d'évènements d'utiliser " "leur propre implémentation de l'objet *Future*." -#: library/asyncio-future.rst:102 +#: library/asyncio-future.rst:104 +msgid "Futures are :ref:`generic ` over the type of their results." +msgstr "" + +#: library/asyncio-future.rst:106 msgid "Added support for the :mod:`contextvars` module." msgstr "Ajout du support du module :mod:`contextvars`." -#: library/asyncio-future.rst:105 +#: library/asyncio-future.rst:109 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." @@ -199,76 +206,76 @@ msgstr "" "Un ``DeprecationWarning`` est levé si *loop* n'est pas spécifié et s'il n'y " "a pas de boucle d'évènements en cours d'exécution." -#: library/asyncio-future.rst:111 +#: library/asyncio-future.rst:115 msgid "Return the result of the Future." msgstr "Renvoie le résultat du *Future*." -#: library/asyncio-future.rst:113 +#: library/asyncio-future.rst:117 msgid "" "If the Future is *done* and has a result set by the :meth:`set_result` " "method, the result value is returned." msgstr "" -"Si le *Future* est « terminé » et a un résultat défini par la méthode :meth:" -"`set_result`, ce résultat est renvoyé." +"Si le *Future* est « terminé » et a un résultat défini par la " +"méthode :meth:`set_result`, ce résultat est renvoyé." -#: library/asyncio-future.rst:116 +#: library/asyncio-future.rst:120 msgid "" -"If the Future is *done* and has an exception set by the :meth:" -"`set_exception` method, this method raises the exception." +"If the Future is *done* and has an exception set by " +"the :meth:`set_exception` method, this method raises the exception." msgstr "" -"Si le *Future* est « terminé » et a une exception définie par la méthode :" -"meth:`set_exception`, cette méthode lève l'exception." +"Si le *Future* est « terminé » et a une exception définie par la " +"méthode :meth:`set_exception`, cette méthode lève l'exception." -#: library/asyncio-future.rst:207 +#: library/asyncio-future.rst:215 msgid "" -"If the Future has been *cancelled*, this method raises a :exc:" -"`CancelledError` exception." +"If the Future has been *cancelled*, this method raises " +"a :exc:`CancelledError` exception." msgstr "" -"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:" -"`CancelledError`." +"Si le *Future* a été *annulé*, cette méthode lève une " +"exception :exc:`CancelledError`." -#: library/asyncio-future.rst:122 +#: library/asyncio-future.rst:126 #, fuzzy msgid "" -"If the Future's result isn't yet available, this method raises an :exc:" -"`InvalidStateError` exception." +"If the Future's result isn't yet available, this method raises " +"an :exc:`InvalidStateError` exception." msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:127 +#: library/asyncio-future.rst:131 msgid "Mark the Future as *done* and set its result." msgstr "Marque le *Future* comme « terminé » et définit son résultat." -#: library/asyncio-future.rst:136 +#: library/asyncio-future.rst:140 #, fuzzy msgid "" "Raises an :exc:`InvalidStateError` error if the Future is already *done*." msgstr "" "Lève une erreur :exc:`InvalidStateError` si le *Future* est déjà « terminé »." -#: library/asyncio-future.rst:134 +#: library/asyncio-future.rst:138 msgid "Mark the Future as *done* and set an exception." msgstr "Marque le *Future* comme « terminé » et définit une exception." -#: library/asyncio-future.rst:141 +#: library/asyncio-future.rst:145 msgid "Return ``True`` if the Future is *done*." msgstr "Renvoie ``True`` si le *Future* est « terminé »." -#: library/asyncio-future.rst:143 +#: library/asyncio-future.rst:147 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" "Un *Future* est « terminé » s'il a été « annulé » ou si un résultat ou une " -"exception a été définie par les méthodes :meth:`set_result` ou :meth:" -"`set_exception`." +"exception a été définie par les méthodes :meth:`set_result` " +"ou :meth:`set_exception`." -#: library/asyncio-future.rst:149 +#: library/asyncio-future.rst:153 msgid "Return ``True`` if the Future was *cancelled*." msgstr "Renvoie ``True`` si le *Future* a été « annulé »." -#: library/asyncio-future.rst:151 +#: library/asyncio-future.rst:155 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" @@ -276,55 +283,56 @@ msgstr "" "Cette méthode est habituellement utilisée pour vérifier qu'un *Future* n'est " "pas « annulé » avant de définir un résultat ou une exception pour celui-ci ::" -#: library/asyncio-future.rst:159 +#: library/asyncio-future.rst:163 msgid "Add a callback to be run when the Future is *done*." msgstr "" "Ajoute une fonction de rappel à exécuter lorsque le *Future* est « terminé »." -#: library/asyncio-future.rst:161 +#: library/asyncio-future.rst:165 msgid "The *callback* is called with the Future object as its only argument." msgstr "" "L'argument *callback* est appelé avec l'objet *Future* comme seul argument." -#: library/asyncio-future.rst:164 +#: library/asyncio-future.rst:168 msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" "Si le *Future* est déjà « terminé » lorsque la méthode est appelée, " -"l'exécution de la fonction de rappel est planifiée avec :meth:`loop." -"call_soon`." +"l'exécution de la fonction de rappel est planifiée " +"avec :meth:`loop.call_soon`." -#: library/asyncio-future.rst:167 +#: library/asyncio-future.rst:171 msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *callback* to run in. The current " -"context is used when no *context* is provided." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the *callback* to run in. The " +"current context is used when no *context* is provided." msgstr "" -"L'argument nommé optionnel *context* permet de spécifier une classe :class:" -"`contextvars.Context` personnalisée dans laquelle la fonction de rappel " -"s’exécutera. Le contexte actuel est utilisé si *context* n'est pas fourni." +"L'argument nommé optionnel *context* permet de spécifier une " +"classe :class:`contextvars.Context` personnalisée dans laquelle la fonction " +"de rappel s’exécutera. Le contexte actuel est utilisé si *context* n'est pas " +"fourni." -#: library/asyncio-future.rst:171 +#: library/asyncio-future.rst:175 msgid "" -":func:`functools.partial` can be used to pass parameters to the callback, e." -"g.::" +":func:`functools.partial` can be used to pass parameters to the callback, " +"e.g.::" msgstr "" ":func:`functools.partial` peut être utilisée pour passer des paramètres à la " "fonction de rappel ::" -#: library/asyncio-future.rst:178 +#: library/asyncio-future.rst:182 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" "Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails." -#: library/asyncio-future.rst:184 +#: library/asyncio-future.rst:188 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-future.rst:186 +#: library/asyncio-future.rst:190 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." @@ -332,11 +340,11 @@ msgstr "" "Renvoie le nombre de fonctions de rappel retiré. La méthode renvoie " "généralement 1, à moins que la fonction ait été ajoutée plus d'une fois." -#: library/asyncio-future.rst:191 +#: library/asyncio-future.rst:195 msgid "Cancel the Future and schedule callbacks." msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel." -#: library/asyncio-future.rst:193 +#: library/asyncio-future.rst:197 msgid "" "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, " "change the Future's state to *cancelled*, schedule the callbacks, and return " @@ -346,15 +354,22 @@ msgstr "" "Autrement, change l'état du *Future* à « annulé », planifie l'exécution des " "fonctions de rappel et renvoie ``True``." -#: library/asyncio-future.rst:197 +#: library/asyncio-future.rst:201 +msgid "" +"The optional string argument *msg* is passed as the argument to " +"the :exc:`CancelledError` exception raised when a cancelled Future is " +"awaited." +msgstr "" + +#: library/asyncio-future.rst:205 msgid "Added the *msg* parameter." msgstr "Ajout du paramètre *msg*." -#: library/asyncio-future.rst:202 +#: library/asyncio-future.rst:210 msgid "Return the exception that was set on this Future." msgstr "Renvoie l'exception définie pour ce *Future*." -#: library/asyncio-future.rst:204 +#: library/asyncio-future.rst:212 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." @@ -362,19 +377,19 @@ msgstr "" "L'exception, ou ``None`` si aucune exception n'a été définie, est renvoyé " "seulement si le *Future* est « terminé »." -#: library/asyncio-future.rst:210 +#: library/asyncio-future.rst:218 msgid "" -"If the Future isn't *done* yet, this method raises an :exc:" -"`InvalidStateError` exception." +"If the Future isn't *done* yet, this method raises " +"an :exc:`InvalidStateError` exception." msgstr "" "Si le *Future* n'est pas encore « terminé », cette méthode lève une " "exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:215 +#: library/asyncio-future.rst:223 msgid "Return the event loop the Future object is bound to." msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché." -#: library/asyncio-future.rst:222 +#: library/asyncio-future.rst:230 msgid "" "This example creates a Future object, creates and schedules an asynchronous " "Task to set result for the Future, and waits until the Future has a result::" @@ -383,23 +398,23 @@ msgstr "" "tâche asynchrone qui définira le résultat du *Future* et attend jusqu'à ce " "que le *Future* ait un résultat ::" -#: library/asyncio-future.rst:257 +#: library/asyncio-future.rst:265 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" msgstr "" -"L'objet *Future* est conçu pour imiter la classe :class:`concurrent.futures." -"Future`. Les principales différences sont :" +"L'objet *Future* est conçu pour imiter la " +"classe :class:`concurrent.futures.Future`. Les principales différences sont :" -#: library/asyncio-future.rst:260 +#: library/asyncio-future.rst:268 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" -"contrairement au *Future asyncio*, les instances de :class:`concurrent." -"futures.Future` ne peuvent pas être attendues ;" +"contrairement au *Future asyncio*, les instances " +"de :class:`concurrent.futures.Future` ne peuvent pas être attendues ;" -#: library/asyncio-future.rst:263 +#: library/asyncio-future.rst:271 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." @@ -407,37 +422,38 @@ msgstr "" ":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` " "n'acceptent pas d'argument *timeout* ;" -#: library/asyncio-future.rst:266 +#: library/asyncio-future.rst:274 msgid "" -":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :" -"exc:`InvalidStateError` exception when the Future is not *done*." +":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise " +"an :exc:`InvalidStateError` exception when the Future is not *done*." msgstr "" ":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` lèvent une " "exception :exc:`InvalidStateError` lorsque le *Future* n'est pas " "« terminé » ;" -#: library/asyncio-future.rst:270 +#: library/asyncio-future.rst:278 msgid "" "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not " "called immediately. They are scheduled with :meth:`loop.call_soon` instead." msgstr "" -"les fonctions de rappel enregistrées à l'aide de :meth:`asyncio.Future." -"add_done_callback` ne sont pas exécutées immédiatement mais planifiées avec :" -"meth:`loop.call_soon` ;" +"les fonctions de rappel enregistrées à l'aide " +"de :meth:`asyncio.Future.add_done_callback` ne sont pas exécutées " +"immédiatement mais planifiées avec :meth:`loop.call_soon` ;" -#: library/asyncio-future.rst:274 +#: library/asyncio-future.rst:282 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." msgstr "" -"les *Future asyncio* ne sont pas compatibles avec les fonctions :func:" -"`concurrent.futures.wait` et :func:`concurrent.futures.as_completed` ;" +"les *Future asyncio* ne sont pas compatibles avec les " +"fonctions :func:`concurrent.futures.wait` " +"et :func:`concurrent.futures.as_completed` ;" -#: library/asyncio-future.rst:278 +#: library/asyncio-future.rst:286 #, fuzzy msgid "" -":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but :" -"meth:`concurrent.futures.Future.cancel` does not." +":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, " +"but :meth:`concurrent.futures.Future.cancel` does not." msgstr "" ":meth:`asyncio.Future.cancel` accepte un argument optionnel ``msg`` mais " "pas :func:`concurrent.futures.cancel`." diff --git a/library/asyncio-graph.po b/library/asyncio-graph.po new file mode 100644 index 000000000..bdfdaf647 --- /dev/null +++ b/library/asyncio-graph.po @@ -0,0 +1,174 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/asyncio-graph.rst:8 +msgid "Call Graph Introspection" +msgstr "" + +#: library/asyncio-graph.rst:10 +msgid "**Source code:** :source:`Lib/asyncio/graph.py`" +msgstr "" + +#: library/asyncio-graph.rst:14 +msgid "" +"asyncio has powerful runtime call graph introspection utilities to trace the " +"entire call graph of a running *coroutine* or *task*, or a suspended " +"*future*. These utilities and the underlying machinery can be used from " +"within a Python program or by external profilers and debuggers." +msgstr "" + +#: library/asyncio-graph.rst:25 +msgid "" +"Print the async call graph for the current task or the " +"provided :class:`Task` or :class:`Future`." +msgstr "" + +#: library/asyncio-graph.rst:28 +msgid "" +"This function prints entries starting from the top frame and going down " +"towards the invocation point." +msgstr "" + +#: library/asyncio-graph.rst:31 +msgid "" +"The function receives an optional *future* argument. If not passed, the " +"current running task will be used." +msgstr "" + +#: library/asyncio-graph.rst:93 +msgid "" +"If the function is called on *the current task*, the optional keyword-only " +"*depth* argument can be used to skip the specified number of frames from top " +"of the stack." +msgstr "" + +#: library/asyncio-graph.rst:38 +msgid "" +"If the optional keyword-only *limit* argument is provided, each call stack " +"in the resulting graph is truncated to include at most ``abs(limit)`` " +"entries. If *limit* is positive, the entries left are the closest to the " +"invocation point. If *limit* is negative, the topmost entries are left. If " +"*limit* is omitted or ``None``, all entries are present. If *limit* is " +"``0``, the call stack is not printed at all, only \"awaited by\" information " +"is printed." +msgstr "" + +#: library/asyncio-graph.rst:46 +msgid "" +"If *file* is omitted or ``None``, the function will print " +"to :data:`sys.stdout`." +msgstr "" + +#: library/asyncio-graph.rst:49 +msgid "**Example:**" +msgstr "" + +#: library/asyncio-graph.rst:51 +msgid "The following Python code:" +msgstr "" + +#: library/asyncio-graph.rst:66 +msgid "will print::" +msgstr "affiche ::" + +#: library/asyncio-graph.rst:79 +msgid "" +"Like :func:`print_call_graph`, but returns a string. If *future* is ``None`` " +"and there's no current task, the function returns an empty string." +msgstr "" + +#: library/asyncio-graph.rst:86 +msgid "" +"Capture the async call graph for the current task or the " +"provided :class:`Task` or :class:`Future`." +msgstr "" + +#: library/asyncio-graph.rst:89 +msgid "" +"The function receives an optional *future* argument. If not passed, the " +"current running task will be used. If there's no current task, the function " +"returns ``None``." +msgstr "" + +#: library/asyncio-graph.rst:97 +msgid "Returns a ``FutureCallGraph`` data class object:" +msgstr "" + +#: library/asyncio-graph.rst:99 +msgid "``FutureCallGraph(future, call_stack, awaited_by)``" +msgstr "" + +#: library/asyncio-graph.rst:101 +msgid "" +"Where *future* is a reference to a :class:`Future` or a :class:`Task` (or " +"their subclasses.)" +msgstr "" + +#: library/asyncio-graph.rst:104 +msgid "``call_stack`` is a tuple of ``FrameCallGraphEntry`` objects." +msgstr "" + +#: library/asyncio-graph.rst:106 +msgid "``awaited_by`` is a tuple of ``FutureCallGraph`` objects." +msgstr "" + +#: library/asyncio-graph.rst:108 +msgid "``FrameCallGraphEntry(frame)``" +msgstr "" + +#: library/asyncio-graph.rst:110 +msgid "" +"Where *frame* is a frame object of a regular Python function in the call " +"stack." +msgstr "" + +#: library/asyncio-graph.rst:115 +msgid "Low level utility functions" +msgstr "" + +#: library/asyncio-graph.rst:117 +msgid "" +"To introspect an async call graph asyncio requires cooperation from control " +"flow structures, such as :func:`shield` or :class:`TaskGroup`. Any time an " +"intermediate :class:`Future` object with low-level APIs " +"like :meth:`Future.add_done_callback() ` " +"is involved, the following two functions should be used to inform asyncio " +"about how exactly such intermediate future objects are connected with the " +"tasks they wrap or control." +msgstr "" + +#: library/asyncio-graph.rst:128 +msgid "Record that *future* is awaited on by *waiter*." +msgstr "" + +#: library/asyncio-graph.rst:143 +msgid "" +"Both *future* and *waiter* must be instances of :class:`Future` " +"or :class:`Task` or their subclasses, otherwise the call would have no " +"effect." +msgstr "" + +#: library/asyncio-graph.rst:134 +msgid "" +"A call to ``future_add_to_awaited_by()`` must be followed by an eventual " +"call to the :func:`future_discard_from_awaited_by` function with the same " +"arguments." +msgstr "" + +#: library/asyncio-graph.rst:141 +msgid "Record that *future* is no longer awaited on by *waiter*." +msgstr "" diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index be6b6c54f..a180d0873 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-17 22:35+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -186,8 +186,8 @@ msgstr ":meth:`loop.call_soon_threadsafe`" #: library/asyncio-llapi-index.rst:90 msgid "A thread-safe variant of :meth:`loop.call_soon`." msgstr "" -"Une variante compatible avec les programmes à fils d'exécution multiples de :" -"meth:`loop.call_soon`." +"Une variante compatible avec les programmes à fils d'exécution multiples " +"de :meth:`loop.call_soon`." #: library/asyncio-llapi-index.rst:92 msgid ":meth:`loop.call_later`" @@ -206,7 +206,8 @@ msgid "Invoke a callback *at* the given time." msgstr "Invoque un rappel *à l'heure* indiquée." #: library/asyncio-llapi-index.rst:99 -msgid "Thread/Process Pool" +#, fuzzy +msgid "Thread/Interpreter/Process Pool" msgstr "Pool de fils d'exécution ou processus" #: library/asyncio-llapi-index.rst:104 @@ -258,8 +259,8 @@ msgid "" "Set a factory used by :meth:`loop.create_task` to create :class:`Tasks " "`." msgstr "" -"Définit une fabrique utilisée par :meth:`loop.create_task` pour créer des :" -"class:`Tasks `." +"Définit une fabrique utilisée par :meth:`loop.create_task` pour créer " +"des :class:`Tasks `." #: library/asyncio-llapi-index.rst:127 msgid ":meth:`loop.get_task_factory`" @@ -270,8 +271,8 @@ msgid "" "Get the factory :meth:`loop.create_task` uses to create :class:`Tasks " "`." msgstr "" -"Récupère la fabrique que :meth:`loop.create_task` utilise pour créer des :" -"class:`Tasks `." +"Récupère la fabrique que :meth:`loop.create_task` utilise pour créer " +"des :class:`Tasks `." #: library/asyncio-llapi-index.rst:132 msgid "DNS" @@ -673,12 +674,14 @@ msgstr "Renvoie le protocole courant." #: library/asyncio-llapi-index.rst:314 msgid "" "Transports that can receive data (TCP and Unix connections, pipes, etc). " -"Returned from methods like :meth:`loop.create_connection`, :meth:`loop." -"create_unix_connection`, :meth:`loop.connect_read_pipe`, etc:" +"Returned from methods " +"like :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_read_pipe`, " +"etc:" msgstr "" "Transports pouvant recevoir des données (connexions TCP et Unix, pipes, " -"etc.). Renvoyé par des méthodes telles que :meth:`loop.create_connection`, :" -"meth:`loop.create_unix_connection`, :meth:`loop.connect_read_pipe`, etc :" +"etc.). Renvoyé par des méthodes telles " +"que :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_read_pipe`, " +"etc :" #: library/asyncio-llapi-index.rst:319 msgid "Read Transports" @@ -711,12 +714,14 @@ msgstr "Reprend la réception." #: library/asyncio-llapi-index.rst:334 msgid "" "Transports that can Send data (TCP and Unix connections, pipes, etc). " -"Returned from methods like :meth:`loop.create_connection`, :meth:`loop." -"create_unix_connection`, :meth:`loop.connect_write_pipe`, etc:" +"Returned from methods " +"like :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_write_pipe`, " +"etc:" msgstr "" "Transports pouvant envoyer des données (connexions TCP et Unix, pipes, " -"etc.). Renvoyé par des méthodes telles que :meth:`loop.create_connection`, :" -"meth:`loop.create_unix_connection`, :meth:`loop.connect_write_pipe`, etc :" +"etc.). Renvoyé par des méthodes telles " +"que :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_write_pipe`, " +"etc :" #: library/asyncio-llapi-index.rst:339 msgid "Write Transports" @@ -765,11 +770,11 @@ msgstr "Ferme immédiatement le transport." #: library/asyncio-llapi-index.rst:359 msgid "" -":meth:`transport.get_write_buffer_size() `" +":meth:`transport.get_write_buffer_size() " +"`" msgstr "" -":meth:`transport.get_write_buffer_size() `" +":meth:`transport.get_write_buffer_size() " +"`" #: library/asyncio-llapi-index.rst:361 #, fuzzy @@ -778,11 +783,11 @@ msgstr "Renvoie la taille actuelle du tampon de sortie." #: library/asyncio-llapi-index.rst:363 msgid "" -":meth:`transport.get_write_buffer_limits() `" +":meth:`transport.get_write_buffer_limits() " +"`" msgstr "" -":meth:`transport.get_write_buffer_limits() `" +":meth:`transport.get_write_buffer_limits() " +"`" #: library/asyncio-llapi-index.rst:365 msgid "Return high and low water marks for write flow control." @@ -790,11 +795,11 @@ msgstr "Renvoie les seuils haut et bas pour le contrôle du flux d'écriture." #: library/asyncio-llapi-index.rst:367 msgid "" -":meth:`transport.set_write_buffer_limits() `" +":meth:`transport.set_write_buffer_limits() " +"`" msgstr "" -":meth:`transport.set_write_buffer_limits() `" +":meth:`transport.set_write_buffer_limits() " +"`" #: library/asyncio-llapi-index.rst:369 msgid "Set new high and low water marks for write flow control." @@ -824,11 +829,11 @@ msgstr ":meth:`transport.abort() `" #: library/asyncio-llapi-index.rst:386 msgid "" -"Low-level transport abstraction over subprocesses. Returned by :meth:`loop." -"subprocess_exec` and :meth:`loop.subprocess_shell`:" +"Low-level transport abstraction over subprocesses. Returned " +"by :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell`:" msgstr "" -"Abstraction de transport de bas niveau sur les sous-processus. Renvoyé par :" -"meth:`loop.subprocess_exec` et :meth:`loop.subprocess_shell` :" +"Abstraction de transport de bas niveau sur les sous-processus. Renvoyé " +"par :meth:`loop.subprocess_exec` et :meth:`loop.subprocess_shell` :" #: library/asyncio-llapi-index.rst:390 msgid "Subprocess Transports" @@ -844,11 +849,11 @@ msgstr "Renvoie l'ID de processus du sous-processus." #: library/asyncio-llapi-index.rst:398 msgid "" -":meth:`transport.get_pipe_transport() `" +":meth:`transport.get_pipe_transport() " +"`" msgstr "" -":meth:`transport.get_pipe_transport() `" +":meth:`transport.get_pipe_transport() " +"`" #: library/asyncio-llapi-index.rst:400 msgid "" @@ -1010,8 +1015,8 @@ msgstr "" msgid "" "Called when a previous send or receive operation raises an :class:`OSError`." msgstr "" -"Appelée lorsqu'une opération d'envoi ou de réception précédente lève une :" -"class:`OSError`." +"Appelée lorsqu'une opération d'envoi ou de réception précédente lève " +"une :class:`OSError`." #: library/asyncio-llapi-index.rst:482 msgid "Subprocess Protocols" @@ -1021,8 +1026,8 @@ msgstr "Protocoles liés aux sous-processus" #, fuzzy msgid "``callback`` :meth:`~SubprocessProtocol.pipe_data_received`" msgstr "" -"``callback`` :meth:`pipe_data_received() `" +"``callback`` :meth:`pipe_data_received() " +"`" #: library/asyncio-llapi-index.rst:488 msgid "" @@ -1035,8 +1040,8 @@ msgstr "" #, fuzzy msgid "``callback`` :meth:`~SubprocessProtocol.pipe_connection_lost`" msgstr "" -"``callback`` :meth:`pipe_connection_lost() `" +"``callback`` :meth:`pipe_connection_lost() " +"`" #: library/asyncio-llapi-index.rst:492 msgid "" @@ -1052,9 +1057,9 @@ msgstr "" #: library/asyncio-llapi-index.rst:497 msgid "" -"Called when the child process has exited. It can be called before :meth:" -"`~SubprocessProtocol.pipe_data_received` and :meth:`~SubprocessProtocol." -"pipe_connection_lost` methods." +"Called when the child process has exited. It can be called " +"before :meth:`~SubprocessProtocol.pipe_data_received` " +"and :meth:`~SubprocessProtocol.pipe_connection_lost` methods." msgstr "" #: library/asyncio-llapi-index.rst:503 @@ -1063,9 +1068,9 @@ msgstr "Politiques de boucle d'événements" #: library/asyncio-llapi-index.rst:505 msgid "" -"Policies is a low-level mechanism to alter the behavior of functions like :" -"func:`asyncio.get_event_loop`. See also the main :ref:`policies section " -"` for more details." +"Policies is a low-level mechanism to alter the behavior of functions " +"like :func:`asyncio.get_event_loop`. See also the main :ref:`policies " +"section ` for more details." msgstr "" "Les politiques sont un mécanisme de bas niveau pour modifier le comportement " "de fonctions telles que :func:`asyncio.get_event_loop`. Voir aussi la " diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index bcb49930e..db2d3f033 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-17 17:57+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -108,22 +108,22 @@ msgstr "" #: library/asyncio-platforms.rst:53 msgid "" -"Pipes are not supported, so the :meth:`loop.connect_read_pipe` and :meth:" -"`loop.connect_write_pipe` methods are not implemented." +"Pipes are not supported, so the :meth:`loop.connect_read_pipe` " +"and :meth:`loop.connect_write_pipe` methods are not implemented." msgstr "" -"Les tubes ne sont pas pris en charge, donc les méthodes :meth:`loop." -"connect_read_pipe` et :meth:`loop.connect_write_pipe` ne sont pas " -"implémentées." +"Les tubes ne sont pas pris en charge, donc les " +"méthodes :meth:`loop.connect_read_pipe` et :meth:`loop.connect_write_pipe` " +"ne sont pas implémentées." #: library/asyncio-platforms.rst:56 msgid "" -":ref:`Subprocesses ` are not supported, i.e. :meth:`loop." -"subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " -"implemented." +":ref:`Subprocesses ` are not supported, " +"i.e. :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods " +"are not implemented." msgstr "" "Les :ref:`sous-processus ` ne sont pas pris en charge, " -"c'est-à-dire que les méthodes :meth:`loop.subprocess_exec` et :meth:`loop." -"subprocess_shell` ne sont pas implémentées." +"c'est-à-dire que les méthodes :meth:`loop.subprocess_exec` " +"et :meth:`loop.subprocess_shell` ne sont pas implémentées." #: library/asyncio-platforms.rst:60 msgid ":class:`ProactorEventLoop` has the following limitations:" @@ -146,8 +146,9 @@ msgid "" msgstr "" "La résolution de l'horloge monotone sous Windows est généralement d'environ " "15,6 millisecondes. La meilleure résolution est de 0,5 milliseconde. La " -"résolution dépend du matériel (disponibilité de `HPET `_) et de la configuration de Windows." +"résolution dépend du matériel (disponibilité de `HPET `_) et de la configuration " +"de Windows." #: library/asyncio-platforms.rst:75 msgid "Subprocess Support on Windows" @@ -159,44 +160,45 @@ msgid "" "subprocesses, whereas :class:`SelectorEventLoop` does not." msgstr "" "Sous Windows, la boucle d'événements par défaut :class:`ProactorEventLoop` " -"prend en charge les sous-processus, contrairement à :class:" -"`SelectorEventLoop`." +"prend en charge les sous-processus, contrairement " +"à :class:`SelectorEventLoop`." -#: library/asyncio-platforms.rst:80 -msgid "" -"The :meth:`policy.set_child_watcher() ` function is also not supported, as :class:" -"`ProactorEventLoop` has a different mechanism to watch child processes." -msgstr "" -"La fonction :meth:`policy.set_child_watcher() ` n'est pas non plus prise en charge, car :class:" -"`ProactorEventLoop` a un mécanisme différent pour surveiller les processus " -"enfants." - -#: library/asyncio-platforms.rst:87 +#: library/asyncio-platforms.rst:82 msgid "macOS" msgstr "macOS" -#: library/asyncio-platforms.rst:89 +#: library/asyncio-platforms.rst:84 msgid "Modern macOS versions are fully supported." msgstr "Les versions modernes de macOS sont entièrement prises en charge." -#: library/asyncio-platforms.rst:92 +#: library/asyncio-platforms.rst:87 msgid "macOS <= 10.8" msgstr "macOS ≤ 10.8" -#: library/asyncio-platforms.rst:93 +#: library/asyncio-platforms.rst:88 msgid "" -"On macOS 10.6, 10.7 and 10.8, the default event loop uses :class:`selectors." -"KqueueSelector`, which does not support character devices on these " -"versions. The :class:`SelectorEventLoop` can be manually configured to use :" -"class:`~selectors.SelectSelector` or :class:`~selectors.PollSelector` to " -"support character devices on these older versions of macOS. Example::" -msgstr "" -"Sur macOS 10.6, 10.7 et 10.8, la boucle d'événements par défaut utilise :" -"class:`selectors.KqueueSelector`, qui ne prend pas en charge les " +"On macOS 10.6, 10.7 and 10.8, the default event loop " +"uses :class:`selectors.KqueueSelector`, which does not support character " +"devices on these versions. The :class:`SelectorEventLoop` can be manually " +"configured to use :class:`~selectors.SelectSelector` " +"or :class:`~selectors.PollSelector` to support character devices on these " +"older versions of macOS. Example::" +msgstr "" +"Sur macOS 10.6, 10.7 et 10.8, la boucle d'événements par défaut " +"utilise :class:`selectors.KqueueSelector`, qui ne prend pas en charge les " "périphériques de caractères sur ces versions. La :class:`SelectorEventLoop` " -"peut être configurée manuellement pour utiliser :class:`~selectors." -"SelectSelector` ou :class:`~selectors.PollSelector` pour prendre en charge " -"les périphériques de caractères sur ces anciennes versions de macOS. Par " -"exemple ::" +"peut être configurée manuellement pour " +"utiliser :class:`~selectors.SelectSelector` " +"ou :class:`~selectors.PollSelector` pour prendre en charge les périphériques " +"de caractères sur ces anciennes versions de macOS. Par exemple ::" + +#~ msgid "" +#~ "The :meth:`policy.set_child_watcher() " +#~ "` function is also not " +#~ "supported, as :class:`ProactorEventLoop` has a different mechanism to " +#~ "watch child processes." +#~ msgstr "" +#~ "La fonction :meth:`policy.set_child_watcher() " +#~ "` n'est pas non plus prise en " +#~ "charge, car :class:`ProactorEventLoop` a un mécanisme différent pour " +#~ "surveiller les processus enfants." diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index 5d07ea93e..1b4fa8d30 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-17 17:44+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -19,25 +19,33 @@ msgstr "" msgid "Policies" msgstr "Politiques" -#: library/asyncio-policy.rst:10 +#: library/asyncio-policy.rst:12 msgid "" -"An event loop policy is a global object used to get and set the current :ref:" -"`event loop `, as well as create new event loops. The " -"default policy can be :ref:`replaced ` with :ref:" -"`built-in alternatives ` to use different event loop " -"implementations, or substituted by a :ref:`custom policy ` that can override these behaviors." +"Policies are deprecated and will be removed in Python 3.16. Users are " +"encouraged to use the :func:`asyncio.run` function or " +"the :class:`asyncio.Runner` with *loop_factory* to use the desired loop " +"implementation." +msgstr "" + +#: library/asyncio-policy.rst:18 +msgid "" +"An event loop policy is a global object used to get and set the " +"current :ref:`event loop `, as well as create new event " +"loops. The default policy can be :ref:`replaced ` " +"with :ref:`built-in alternatives ` to use different " +"event loop implementations, or substituted by a :ref:`custom policy ` that can override these behaviors." msgstr "" "Une politique de boucle d'événements est un objet global utilisé pour " "obtenir et définir la :ref:`boucle d'événements ` " "actuelle, ainsi que créer de nouvelles boucles d'événements. La politique " -"par défaut peut être :ref:`remplacée ` par des :ref:" -"`alternatives intégrées ` afin d'utiliser d'autres " -"implémentations de boucles d'événements, ou remplacée par une :ref:" -"`politique personnalisée ` qui peut remplacer ces " -"comportements." +"par défaut peut être :ref:`remplacée ` par " +"des :ref:`alternatives intégrées ` afin d'utiliser " +"d'autres implémentations de boucles d'événements, ou remplacée par " +"une :ref:`politique personnalisée ` qui peut " +"remplacer ces comportements." -#: library/asyncio-policy.rst:19 +#: library/asyncio-policy.rst:27 msgid "" "The :ref:`policy object ` gets and sets a separate " "event loop per *context*. This is per-thread by default, though custom " @@ -48,28 +56,29 @@ msgstr "" "valable fil par fil d'exécution par défaut, bien que les politiques " "personnalisées puissent définir le *contexte* différemment." -#: library/asyncio-policy.rst:24 +#: library/asyncio-policy.rst:32 msgid "" -"Custom event loop policies can control the behavior of :func:" -"`get_event_loop`, :func:`set_event_loop`, and :func:`new_event_loop`." +"Custom event loop policies can control the behavior " +"of :func:`get_event_loop`, :func:`set_event_loop`, " +"and :func:`new_event_loop`." msgstr "" "En utilisant une politique de boucle d'événement personnalisée, le " "comportement des fonctions :func:`get_event_loop`, :func:`set_event_loop` " "et :func:`new_event_loop` peut être personnalisé." -#: library/asyncio-policy.rst:27 +#: library/asyncio-policy.rst:35 msgid "" -"Policy objects should implement the APIs defined in the :class:" -"`AbstractEventLoopPolicy` abstract base class." +"Policy objects should implement the APIs defined in " +"the :class:`AbstractEventLoopPolicy` abstract base class." msgstr "" "Les objets politiques doivent implémenter les API définies dans la classe " -"mère abstraite :class:`AbstractEventLoopPolicy`." +"abstraite :class:`AbstractEventLoopPolicy`." -#: library/asyncio-policy.rst:34 +#: library/asyncio-policy.rst:42 msgid "Getting and Setting the Policy" msgstr "Obtenir et définir la politique" -#: library/asyncio-policy.rst:36 +#: library/asyncio-policy.rst:44 msgid "" "The following functions can be used to get and set the policy for the " "current process:" @@ -77,91 +86,89 @@ msgstr "" "Les fonctions suivantes peuvent être utilisées pour obtenir et définir la " "politique du processus en cours :" -#: library/asyncio-policy.rst:41 +#: library/asyncio-policy.rst:49 msgid "Return the current process-wide policy." msgstr "Renvoie la politique actuelle à l'échelle du processus." -#: library/asyncio-policy.rst:45 +#: library/asyncio-policy.rst:51 +msgid "" +"The :func:`get_event_loop_policy` function is deprecated and will be removed " +"in Python 3.16." +msgstr "" + +#: library/asyncio-policy.rst:57 msgid "Set the current process-wide policy to *policy*." msgstr "" "Définit la politique actuelle sur l'ensemble du processus sur *policy*." -#: library/asyncio-policy.rst:47 +#: library/asyncio-policy.rst:59 msgid "If *policy* is set to ``None``, the default policy is restored." msgstr "" "Si *policy* est définie sur ``None``, la politique par défaut est restaurée." -#: library/asyncio-policy.rst:53 +#: library/asyncio-policy.rst:61 +msgid "" +"The :func:`set_event_loop_policy` function is deprecated and will be removed " +"in Python 3.16." +msgstr "" + +#: library/asyncio-policy.rst:69 msgid "Policy Objects" msgstr "Objets politiques" -#: library/asyncio-policy.rst:55 +#: library/asyncio-policy.rst:71 msgid "The abstract event loop policy base class is defined as follows:" msgstr "" -"La classe mère abstraite de la politique de boucle d'événements est définie " +"La classe abstraite de la politique de boucle d'événements est définie " "comme suit :" -#: library/asyncio-policy.rst:59 +#: library/asyncio-policy.rst:75 msgid "An abstract base class for asyncio policies." msgstr "Une classe de base abstraite pour les politiques *asyncio*." -#: library/asyncio-policy.rst:63 +#: library/asyncio-policy.rst:79 msgid "Get the event loop for the current context." msgstr "Récupère la boucle d'évènements pour le contexte actuel." -#: library/asyncio-policy.rst:65 +#: library/asyncio-policy.rst:81 msgid "" "Return an event loop object implementing the :class:`AbstractEventLoop` " "interface." msgstr "" -"Renvoie un objet de boucle d'événements en implémentant l'interface :class:" -"`AbstractEventLoop`." +"Renvoie un objet de boucle d'événements en implémentant " +"l'interface :class:`AbstractEventLoop`." -#: library/asyncio-policy.rst:80 +#: library/asyncio-policy.rst:96 msgid "This method should never return ``None``." msgstr "Cette méthode ne devrait jamais renvoyer ``None``." -#: library/asyncio-policy.rst:74 +#: library/asyncio-policy.rst:90 msgid "Set the event loop for the current context to *loop*." msgstr "Définit la boucle d'événements du contexte actuel sur *loop*." -#: library/asyncio-policy.rst:78 +#: library/asyncio-policy.rst:94 msgid "Create and return a new event loop object." msgstr "Crée et renvoie un nouvel objet de boucle d'événements." -#: library/asyncio-policy.rst:84 -msgid "Get a child process watcher object." -msgstr "Récupère un objet observateur du processus enfant." - -#: library/asyncio-policy.rst:86 +#: library/asyncio-policy.rst:98 msgid "" -"Return a watcher object implementing the :class:`AbstractChildWatcher` " -"interface." +"The :class:`AbstractEventLoopPolicy` class is deprecated and will be removed " +"in Python 3.16." msgstr "" -"Renvoie un objet observateur implémentant l'interface :class:" -"`AbstractChildWatcher`." -#: library/asyncio-policy.rst:97 -msgid "This function is Unix specific." -msgstr "Cette fonction est spécifique à Unix." - -#: library/asyncio-policy.rst:95 -msgid "Set the current child process watcher to *watcher*." -msgstr "Définit l'observateur du processus enfant actuel à *watcher*." - -#: library/asyncio-policy.rst:104 +#: library/asyncio-policy.rst:105 msgid "asyncio ships with the following built-in policies:" msgstr "*asyncio* est livré avec les politiques intégrées suivantes :" -#: library/asyncio-policy.rst:109 +#: library/asyncio-policy.rst:110 msgid "" -"The default asyncio policy. Uses :class:`SelectorEventLoop` on Unix and :" -"class:`ProactorEventLoop` on Windows." +"The default asyncio policy. Uses :class:`SelectorEventLoop` on Unix " +"and :class:`ProactorEventLoop` on Windows." msgstr "" "La politique *asyncio* par défaut. Utilise :class:`SelectorEventLoop` sur " "les plates-formes Unix et :class:`ProactorEventLoop` sur Windows." -#: library/asyncio-policy.rst:112 +#: library/asyncio-policy.rst:113 msgid "" "There is no need to install the default policy manually. asyncio is " "configured to use the default policy automatically." @@ -170,26 +177,30 @@ msgstr "" "*asyncio* est configuré pour utiliser automatiquement la politique par " "défaut." -#: library/asyncio-policy.rst:117 +#: library/asyncio-policy.rst:118 msgid "On Windows, :class:`ProactorEventLoop` is now used by default." msgstr "" "Sous Windows, :class:`ProactorEventLoop` est désormais utilisée par défaut." -#: library/asyncio-policy.rst:119 +#: library/asyncio-policy.rst:120 #, fuzzy msgid "" -"The :meth:`get_event_loop` method of the default asyncio policy now emits a :" -"exc:`DeprecationWarning` if there is no current event loop set and it " -"decides to create one. In some future Python release this will become an " -"error." +"The :meth:`get_event_loop` method of the default asyncio policy now raises " +"a :exc:`RuntimeError` if there is no set event loop." msgstr "" -"Dans les versions Python 3.10.9, 3.11.1 et 3.12, la méthode :meth:" -"`get_event_loop` de la politique *asyncio* par défaut lève un :exc:" -"`DeprecationWarning` s'il n'y a pas de boucle d'événements en cours et " -"qu'aucune boucle actuelle n'est définie. Dans une future version de Python, " -"cela deviendra une erreur." +"Dans les versions Python 3.10.9, 3.11.1 et 3.12, la " +"méthode :meth:`get_event_loop` de la politique *asyncio* par défaut lève " +"un :exc:`DeprecationWarning` s'il n'y a pas de boucle d'événements en cours " +"et qu'aucune boucle actuelle n'est définie. Dans une future version de " +"Python, cela deviendra une erreur." -#: library/asyncio-policy.rst:128 +#: library/asyncio-policy.rst:124 +msgid "" +"The :class:`DefaultEventLoopPolicy` class is deprecated and will be removed " +"in Python 3.16." +msgstr "" + +#: library/asyncio-policy.rst:131 msgid "" "An alternative event loop policy that uses the :class:`SelectorEventLoop` " "event loop implementation." @@ -197,318 +208,320 @@ msgstr "" "Politique de boucle d'événements alternative utilisant l'implémentation de " "la boucle d'événements :class:`ProactorEventLoop`." -#: library/asyncio-policy.rst:139 +#: library/asyncio-policy.rst:146 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: library/asyncio-policy.rst:136 msgid "" +"The :class:`WindowsSelectorEventLoopPolicy` class is deprecated and will be " +"removed in Python 3.16." +msgstr "" + +#: library/asyncio-policy.rst:143 +msgid "" "An alternative event loop policy that uses the :class:`ProactorEventLoop` " "event loop implementation." msgstr "" "Politique de boucle d'événements alternative utilisant l'implémentation de " "la boucle d'événements :class:`ProactorEventLoop`." -#: library/asyncio-policy.rst:145 -msgid "Process Watchers" -msgstr "Observateurs de processus" - -#: library/asyncio-policy.rst:147 +#: library/asyncio-policy.rst:148 msgid "" -"A process watcher allows customization of how an event loop monitors child " -"processes on Unix. Specifically, the event loop needs to know when a child " -"process has exited." +"The :class:`WindowsProactorEventLoopPolicy` class is deprecated and will be " +"removed in Python 3.16." msgstr "" -"Un observateur de processus permet de personnaliser la manière dont une " -"boucle d'événements surveille les processus enfants sous Unix. Plus " -"précisément, la boucle d'événements a besoin de savoir quand un processus " -"enfant s'est terminé." -#: library/asyncio-policy.rst:151 -msgid "" -"In asyncio, child processes are created with :func:`create_subprocess_exec` " -"and :meth:`loop.subprocess_exec` functions." -msgstr "" -"Dans *asyncio*, les processus enfants sont créés avec les fonctions :func:" -"`create_subprocess_exec` et :meth:`loop.subprocess_exec`." +#: library/asyncio-policy.rst:156 +msgid "Custom Policies" +msgstr "Politiques personnalisées" -#: library/asyncio-policy.rst:155 +#: library/asyncio-policy.rst:158 msgid "" -"asyncio defines the :class:`AbstractChildWatcher` abstract base class, which " -"child watchers should implement, and has four different implementations: :" -"class:`ThreadedChildWatcher` (configured to be used by default), :class:" -"`MultiLoopChildWatcher`, :class:`SafeChildWatcher`, and :class:" -"`FastChildWatcher`." +"To implement a new event loop policy, it is recommended to " +"subclass :class:`DefaultEventLoopPolicy` and override the methods for which " +"custom behavior is wanted, e.g.::" msgstr "" -"*asyncio* définit la classe mère abstraite :class:`AbstractChildWatcher`, " -"que les observateurs enfants doivent implémenter et possède quatre " -"implémentations différentes : :class:`ThreadedChildWatcher` (configurée pour " -"être utilisé par défaut), :class:`MultiLoopChildWatcher`, :class:" -"`SafeChildWatcher` et :class:`FastChildWatcher`." +"Pour implémenter une nouvelle politique de boucle d’événements, il est " +"recommandé de sous-classer :class:`DefaultEventLoopPolicy` et de " +"réimplémenter les méthodes pour lesquelles un comportement personnalisé est " +"souhaité, par exemple ::" -#: library/asyncio-policy.rst:161 -msgid "" -"See also the :ref:`Subprocess and Threads ` " -"section." -msgstr "" -"Voir aussi la section :ref:`sous-processus et fils d'exécution `." +#~ msgid "Get a child process watcher object." +#~ msgstr "Récupère un objet observateur du processus enfant." -#: library/asyncio-policy.rst:164 -msgid "" -"The following two functions can be used to customize the child process " -"watcher implementation used by the asyncio event loop:" -msgstr "" -"Les deux fonctions suivantes peuvent être utilisées pour personnaliser " -"l'implémentation de l'observateur de processus enfant utilisé par la boucle " -"d'événements *asyncio* :" +#~ msgid "" +#~ "Return a watcher object implementing the :class:`AbstractChildWatcher` " +#~ "interface." +#~ msgstr "" +#~ "Renvoie un objet observateur implémentant " +#~ "l'interface :class:`AbstractChildWatcher`." -#: library/asyncio-policy.rst:169 -msgid "Return the current child watcher for the current policy." -msgstr "Renvoie l'observateur enfant actuel pour la politique actuelle." +#~ msgid "This function is Unix specific." +#~ msgstr "Cette fonction est spécifique à Unix." -#: library/asyncio-policy.rst:175 -msgid "" -"Set the current child watcher to *watcher* for the current policy. " -"*watcher* must implement methods defined in the :class:" -"`AbstractChildWatcher` base class." -msgstr "" -"Définit l'observateur enfant actuel à *watcher* pour la politique actuelle. " -"*watcher* doit implémenter les méthodes définies dans la classe de base :" -"class:`AbstractChildWatcher`." +#~ msgid "Set the current child process watcher to *watcher*." +#~ msgstr "Définit l'observateur du processus enfant actuel à *watcher*." -#: library/asyncio-policy.rst:182 -msgid "" -"Third-party event loops implementations might not support custom child " -"watchers. For such event loops, using :func:`set_child_watcher` might be " -"prohibited or have no effect." -msgstr "" -"Les implémentations de boucles d'événements tierces peuvent ne pas prendre " -"en charge les observateurs enfants personnalisés. Pour ces boucles " -"d'événements, utiliser :func:`set_child_watcher` pourrait être interdit ou " -"n'avoir aucun effet." +#~ msgid "Process Watchers" +#~ msgstr "Observateurs de processus" -#: library/asyncio-policy.rst:190 -msgid "Register a new child handler." -msgstr "Enregistre un nouveau gestionnaire." +#~ msgid "" +#~ "A process watcher allows customization of how an event loop monitors " +#~ "child processes on Unix. Specifically, the event loop needs to know when " +#~ "a child process has exited." +#~ msgstr "" +#~ "Un observateur de processus permet de personnaliser la manière dont une " +#~ "boucle d'événements surveille les processus enfants sous Unix. Plus " +#~ "précisément, la boucle d'événements a besoin de savoir quand un processus " +#~ "enfant s'est terminé." -#: library/asyncio-policy.rst:192 -msgid "" -"Arrange for ``callback(pid, returncode, *args)`` to be called when a process " -"with PID equal to *pid* terminates. Specifying another callback for the " -"same process replaces the previous handler." -msgstr "" -"Organise l'appel de ``callback(pid, returncode, * args)`` lorsqu'un " -"processus dont le *PID* est égal à *pid* se termine. La spécification d'un " -"autre rappel pour le même processus remplace le gestionnaire précédent." +#~ msgid "" +#~ "In asyncio, child processes are created " +#~ "with :func:`create_subprocess_exec` and :meth:`loop.subprocess_exec` " +#~ "functions." +#~ msgstr "" +#~ "Dans *asyncio*, les processus enfants sont créés avec les " +#~ "fonctions :func:`create_subprocess_exec` et :meth:`loop.subprocess_exec`." -#: library/asyncio-policy.rst:197 -msgid "The *callback* callable must be thread-safe." -msgstr "" -"L'appelable *callback* doit être compatible avec les programmes à fils " -"d'exécution multiples." +#~ msgid "" +#~ "asyncio defines the :class:`AbstractChildWatcher` abstract base class, " +#~ "which child watchers should implement, and has four different " +#~ "implementations: :class:`ThreadedChildWatcher` (configured to be used by " +#~ "default), :class:`MultiLoopChildWatcher`, :class:`SafeChildWatcher`, " +#~ "and :class:`FastChildWatcher`." +#~ msgstr "" +#~ "*asyncio* définit la classe abstraite :class:`AbstractChildWatcher`, " +#~ "que les observateurs enfants doivent implémenter et possède quatre " +#~ "implémentations différentes : :class:`ThreadedChildWatcher` (configurée " +#~ "pour être utilisé par " +#~ "défaut), :class:`MultiLoopChildWatcher`, :class:`SafeChildWatcher` " +#~ "et :class:`FastChildWatcher`." -#: library/asyncio-policy.rst:201 -msgid "Removes the handler for process with PID equal to *pid*." -msgstr "Supprime le gestionnaire de processus avec un PID égal à *pid*." +#~ msgid "" +#~ "See also the :ref:`Subprocess and Threads ` " +#~ "section." +#~ msgstr "" +#~ "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-policy.rst:203 -msgid "" -"The function returns ``True`` if the handler was successfully removed, " -"``False`` if there was nothing to remove." -msgstr "" -"La fonction renvoie ``True`` si le gestionnaire a été supprimé avec succès, " -"``False`` s'il n'y a rien à supprimer." +#~ msgid "" +#~ "The following two functions can be used to customize the child process " +#~ "watcher implementation used by the asyncio event loop:" +#~ msgstr "" +#~ "Les deux fonctions suivantes peuvent être utilisées pour personnaliser " +#~ "l'implémentation de l'observateur de processus enfant utilisé par la " +#~ "boucle d'événements *asyncio* :" -#: library/asyncio-policy.rst:208 -msgid "Attach the watcher to an event loop." -msgstr "Attache l'observateur à une boucle d'événement." +#~ msgid "Return the current child watcher for the current policy." +#~ msgstr "Renvoie l'observateur enfant actuel pour la politique actuelle." -#: library/asyncio-policy.rst:210 -msgid "" -"If the watcher was previously attached to an event loop, then it is first " -"detached before attaching to the new loop." -msgstr "" -"Si l'observateur était précédemment attaché à une boucle d'événements, il " -"est d'abord détaché avant d'être rattaché à la nouvelle boucle." +#~ msgid "" +#~ "Set the current child watcher to *watcher* for the current policy. " +#~ "*watcher* must implement methods defined in " +#~ "the :class:`AbstractChildWatcher` base class." +#~ msgstr "" +#~ "Définit l'observateur enfant actuel à *watcher* pour la politique " +#~ "actuelle. *watcher* doit implémenter les méthodes définies dans la classe " +#~ "de base :class:`AbstractChildWatcher`." -#: library/asyncio-policy.rst:213 -msgid "Note: loop may be ``None``." -msgstr "Remarque : la boucle peut être ``None``." +#~ msgid "" +#~ "Third-party event loops implementations might not support custom child " +#~ "watchers. For such event loops, using :func:`set_child_watcher` might be " +#~ "prohibited or have no effect." +#~ msgstr "" +#~ "Les implémentations de boucles d'événements tierces peuvent ne pas " +#~ "prendre en charge les observateurs enfants personnalisés. Pour ces " +#~ "boucles d'événements, utiliser :func:`set_child_watcher` pourrait être " +#~ "interdit ou n'avoir aucun effet." -#: library/asyncio-policy.rst:217 -msgid "Return ``True`` if the watcher is ready to use." -msgstr "Renvoie ``True`` si l'observateur est prêt à être utilisé." +#~ msgid "Register a new child handler." +#~ msgstr "Enregistre un nouveau gestionnaire." -#: library/asyncio-policy.rst:219 -msgid "" -"Spawning a subprocess with *inactive* current child watcher raises :exc:" -"`RuntimeError`." -msgstr "" -"La création d'un sous-processus avec un observateur enfant actuel *inactif* " -"lève une :exc:`RuntimeError`." +#~ msgid "" +#~ "Arrange for ``callback(pid, returncode, *args)`` to be called when a " +#~ "process with PID equal to *pid* terminates. Specifying another callback " +#~ "for the same process replaces the previous handler." +#~ msgstr "" +#~ "Organise l'appel de ``callback(pid, returncode, * args)`` lorsqu'un " +#~ "processus dont le *PID* est égal à *pid* se termine. La spécification " +#~ "d'un autre rappel pour le même processus remplace le gestionnaire " +#~ "précédent." -#: library/asyncio-policy.rst:226 -msgid "Close the watcher." -msgstr "Ferme l'observateur." +#~ msgid "The *callback* callable must be thread-safe." +#~ msgstr "" +#~ "L'appelable *callback* doit être compatible avec les programmes à fils " +#~ "d'exécution multiples." -#: library/asyncio-policy.rst:228 -msgid "" -"This method has to be called to ensure that underlying resources are cleaned-" -"up." -msgstr "" -"Cette méthode doit être appelée pour s'assurer que les ressources sous-" -"jacentes sont nettoyées." +#~ msgid "Removes the handler for process with PID equal to *pid*." +#~ msgstr "Supprime le gestionnaire de processus avec un PID égal à *pid*." -#: library/asyncio-policy.rst:236 -msgid "" -"This implementation starts a new waiting thread for every subprocess spawn." -msgstr "" -"Cette implémentation démarre un nouveau fil d'exécution en attente pour " -"chaque génération de sous-processus." +#~ msgid "" +#~ "The function returns ``True`` if the handler was successfully removed, " +#~ "``False`` if there was nothing to remove." +#~ msgstr "" +#~ "La fonction renvoie ``True`` si le gestionnaire a été supprimé avec " +#~ "succès, ``False`` s'il n'y a rien à supprimer." -#: library/asyncio-policy.rst:238 -msgid "" -"It works reliably even when the asyncio event loop is run in a non-main OS " -"thread." -msgstr "" -"Il fonctionne de manière fiable même lorsque la boucle d'événements " -"*asyncio* est exécutée dans un fil d'exécution non principal." +#~ msgid "Attach the watcher to an event loop." +#~ msgstr "Attache l'observateur à une boucle d'événement." -#: library/asyncio-policy.rst:240 -#, fuzzy -msgid "" -"There is no noticeable overhead when handling a big number of children " -"(*O*\\ (1) each time a child terminates), but starting a thread per process " -"requires extra memory." -msgstr "" -"Il n'y a pas de surcharge visible lors de la manipulation d'un grand nombre " -"d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." +#~ msgid "" +#~ "If the watcher was previously attached to an event loop, then it is first " +#~ "detached before attaching to the new loop." +#~ msgstr "" +#~ "Si l'observateur était précédemment attaché à une boucle d'événements, il " +#~ "est d'abord détaché avant d'être rattaché à la nouvelle boucle." -#: library/asyncio-policy.rst:243 -msgid "This watcher is used by default." -msgstr "Cet observateur est utilisé par défaut." +#~ msgid "Note: loop may be ``None``." +#~ msgstr "Remarque : la boucle peut être ``None``." -#: library/asyncio-policy.rst:249 -msgid "" -"This implementation registers a :py:data:`SIGCHLD` signal handler on " -"instantiation. That can break third-party code that installs a custom " -"handler for :py:data:`SIGCHLD` signal." -msgstr "" -"Cette implémentation enregistre un gestionnaire de signal :py:data:`SIGCHLD` " -"lors de l'instanciation. Cela peut casser le code tiers qui installe un " -"gestionnaire personnalisé pour le signal :py:data:`SIGCHLD`." +#~ msgid "Return ``True`` if the watcher is ready to use." +#~ msgstr "Renvoie ``True`` si l'observateur est prêt à être utilisé." -#: library/asyncio-policy.rst:273 -msgid "" -"The watcher avoids disrupting other code spawning processes by polling every " -"process explicitly on a :py:data:`SIGCHLD` signal." -msgstr "" -"L'observateur évite de perturber un autre code qui crée des processus en " -"interrogeant explicitement chaque processus sur un signal :py:data:`SIGCHLD`." +#~ msgid "" +#~ "Spawning a subprocess with *inactive* current child watcher " +#~ "raises :exc:`RuntimeError`." +#~ msgstr "" +#~ "La création d'un sous-processus avec un observateur enfant actuel " +#~ "*inactif* lève une :exc:`RuntimeError`." -#: library/asyncio-policy.rst:256 -msgid "" -"There is no limitation for running subprocesses from different threads once " -"the watcher is installed." -msgstr "" -"Il n'y a aucune limitation pour l'exécution de sous-processus à partir de " -"différents fils d'exécution une fois l'observateur installé." +#~ msgid "Close the watcher." +#~ msgstr "Ferme l'observateur." + +#~ msgid "" +#~ "This method has to be called to ensure that underlying resources are " +#~ "cleaned-up." +#~ msgstr "" +#~ "Cette méthode doit être appelée pour s'assurer que les ressources sous-" +#~ "jacentes sont nettoyées." + +#~ msgid "" +#~ "This implementation starts a new waiting thread for every subprocess " +#~ "spawn." +#~ msgstr "" +#~ "Cette implémentation démarre un nouveau fil d'exécution en attente pour " +#~ "chaque génération de sous-processus." + +#~ msgid "" +#~ "It works reliably even when the asyncio event loop is run in a non-main " +#~ "OS thread." +#~ msgstr "" +#~ "Il fonctionne de manière fiable même lorsque la boucle d'événements " +#~ "*asyncio* est exécutée dans un fil d'exécution non principal." -#: library/asyncio-policy.rst:259 #, fuzzy -msgid "" -"The solution is safe but it has a significant overhead when handling a big " -"number of processes (*O*\\ (*n*) each time a :py:data:`SIGCHLD` is received)." -msgstr "" -"La solution est sûre mais elle a une surcharge importante lors de la gestion " -"d'un grand nombre de processus (*O(n)* chaque fois qu'un :py:data:`SIGCHLD` " -"est reçu)." +#~ msgid "" +#~ "There is no noticeable overhead when handling a big number of children " +#~ "(*O*\\ (1) each time a child terminates), but starting a thread per " +#~ "process requires extra memory." +#~ msgstr "" +#~ "Il n'y a pas de surcharge visible lors de la manipulation d'un grand " +#~ "nombre d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." -#: library/asyncio-policy.rst:269 -msgid "" -"This implementation uses active event loop from the main thread to handle :" -"py:data:`SIGCHLD` signal. If the main thread has no running event loop " -"another thread cannot spawn a subprocess (:exc:`RuntimeError` is raised)." -msgstr "" -"Cette implémentation utilise une boucle d'événements active du fil " -"d'exécution principal pour gérer le signal :py:data:`SIGCHLD`. Si le fil " -"d'exécution principal n'a pas de boucle d'événements en cours d'exécution, " -"un autre fil ne pourra pas générer de sous-processus (une :exc:" -"`RuntimeError` est levée)." +#~ msgid "This watcher is used by default." +#~ msgstr "Cet observateur est utilisé par défaut." + +#~ msgid "" +#~ "This implementation registers a :py:data:`SIGCHLD` signal handler on " +#~ "instantiation. That can break third-party code that installs a custom " +#~ "handler for :py:data:`SIGCHLD` signal." +#~ msgstr "" +#~ "Cette implémentation enregistre un gestionnaire de " +#~ "signal :py:data:`SIGCHLD` lors de l'instanciation. Cela peut casser le " +#~ "code tiers qui installe un gestionnaire personnalisé pour le " +#~ "signal :py:data:`SIGCHLD`." + +#~ msgid "" +#~ "The watcher avoids disrupting other code spawning processes by polling " +#~ "every process explicitly on a :py:data:`SIGCHLD` signal." +#~ msgstr "" +#~ "L'observateur évite de perturber un autre code qui crée des processus en " +#~ "interrogeant explicitement chaque processus sur un " +#~ "signal :py:data:`SIGCHLD`." + +#~ msgid "" +#~ "There is no limitation for running subprocesses from different threads " +#~ "once the watcher is installed." +#~ msgstr "" +#~ "Il n'y a aucune limitation pour l'exécution de sous-processus à partir de " +#~ "différents fils d'exécution une fois l'observateur installé." -#: library/asyncio-policy.rst:276 #, fuzzy -msgid "" -"This solution is as safe as :class:`MultiLoopChildWatcher` and has the same " -"*O*\\ (*n*) complexity but requires a running event loop in the main thread " -"to work." -msgstr "" -"Cette solution est aussi sûre que :class:`MultiLoopChildWatcher` et a la " -"même complexité en *O(N)* mais nécessite une boucle d'événements en cours " -"d'exécution dans le fil d'exécution principal pour fonctionner." +#~ msgid "" +#~ "The solution is safe but it has a significant overhead when handling a " +#~ "big number of processes (*O*\\ (*n*) each time a :py:data:`SIGCHLD` is " +#~ "received)." +#~ msgstr "" +#~ "La solution est sûre mais elle a une surcharge importante lors de la " +#~ "gestion d'un grand nombre de processus (*O(n)* chaque fois " +#~ "qu'un :py:data:`SIGCHLD` est reçu)." -#: library/asyncio-policy.rst:283 -msgid "" -"This implementation reaps every terminated processes by calling ``os." -"waitpid(-1)`` directly, possibly breaking other code spawning processes and " -"waiting for their termination." -msgstr "" -"Cette implémentation récupère tous les processus terminés en appelant " -"directement ``os.waitpid(-1)``, cassant éventuellement un autre code qui " -"génère des processus et attend leur fin." +#~ msgid "" +#~ "This implementation uses active event loop from the main thread to " +#~ "handle :py:data:`SIGCHLD` signal. If the main thread has no running event " +#~ "loop another thread cannot spawn a subprocess (:exc:`RuntimeError` is " +#~ "raised)." +#~ msgstr "" +#~ "Cette implémentation utilise une boucle d'événements active du fil " +#~ "d'exécution principal pour gérer le signal :py:data:`SIGCHLD`. Si le fil " +#~ "d'exécution principal n'a pas de boucle d'événements en cours " +#~ "d'exécution, un autre fil ne pourra pas générer de sous-processus " +#~ "(une :exc:`RuntimeError` est levée)." -#: library/asyncio-policy.rst:287 #, fuzzy -msgid "" -"There is no noticeable overhead when handling a big number of children " -"(*O*\\ (1) each time a child terminates)." -msgstr "" -"Il n'y a pas de surcharge visible lors de la manipulation d'un grand nombre " -"d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." +#~ msgid "" +#~ "This solution is as safe as :class:`MultiLoopChildWatcher` and has the " +#~ "same *O*\\ (*n*) complexity but requires a running event loop in the main " +#~ "thread to work." +#~ msgstr "" +#~ "Cette solution est aussi sûre que :class:`MultiLoopChildWatcher` et a la " +#~ "même complexité en *O(N)* mais nécessite une boucle d'événements en cours " +#~ "d'exécution dans le fil d'exécution principal pour fonctionner." -#: library/asyncio-policy.rst:290 -msgid "" -"This solution requires a running event loop in the main thread to work, as :" -"class:`SafeChildWatcher`." -msgstr "" -"Cette solution nécessite une boucle d'événements en cours d'exécution dans " -"le fil d'exécution principal pour fonctionner, comme :class:" -"`SafeChildWatcher`." +#~ msgid "" +#~ "This implementation reaps every terminated processes by calling " +#~ "``os.waitpid(-1)`` directly, possibly breaking other code spawning " +#~ "processes and waiting for their termination." +#~ msgstr "" +#~ "Cette implémentation récupère tous les processus terminés en appelant " +#~ "directement ``os.waitpid(-1)``, cassant éventuellement un autre code qui " +#~ "génère des processus et attend leur fin." -#: library/asyncio-policy.rst:297 -msgid "" -"This implementation polls process file descriptors (pidfds) to await child " -"process termination. In some respects, :class:`PidfdChildWatcher` is a " -"\"Goldilocks\" child watcher implementation. It doesn't require signals or " -"threads, doesn't interfere with any processes launched outside the event " -"loop, and scales linearly with the number of subprocesses launched by the " -"event loop. The main disadvantage is that pidfds are specific to Linux, and " -"only work on recent (5.3+) kernels." -msgstr "" -"Cette implémentation interroge les descripteurs de fichiers de processus " -"(*pidfds*) pour attendre la fin du processus enfant. À certains égards, :" -"class:`PidfdChildWatcher` est une implémentation d'observateur d'enfants " -"*Goldilocks*. Elle ne nécessite ni signaux ni threads, n'interfère avec " -"aucun processus lancé en dehors de la boucle d'événements et évolue de " -"manière linéaire avec le nombre de sous-processus lancés par la boucle " -"d'événements. Le principal inconvénient est que les *pidfds* sont " -"spécifiques à Linux et ne fonctionnent que sur les noyaux récents (5.3+)." - -#: library/asyncio-policy.rst:311 -msgid "Custom Policies" -msgstr "Politiques personnalisées" +#, fuzzy +#~ msgid "" +#~ "There is no noticeable overhead when handling a big number of children " +#~ "(*O*\\ (1) each time a child terminates)." +#~ msgstr "" +#~ "Il n'y a pas de surcharge visible lors de la manipulation d'un grand " +#~ "nombre d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." -#: library/asyncio-policy.rst:313 -msgid "" -"To implement a new event loop policy, it is recommended to subclass :class:" -"`DefaultEventLoopPolicy` and override the methods for which custom behavior " -"is wanted, e.g.::" -msgstr "" -"Pour implémenter une nouvelle politique de boucle d’événements, il est " -"recommandé de sous-classer :class:`DefaultEventLoopPolicy` et de " -"réimplémenter les méthodes pour lesquelles un comportement personnalisé est " -"souhaité, par exemple ::" +#~ msgid "" +#~ "This solution requires a running event loop in the main thread to work, " +#~ "as :class:`SafeChildWatcher`." +#~ msgstr "" +#~ "Cette solution nécessite une boucle d'événements en cours d'exécution " +#~ "dans le fil d'exécution principal pour fonctionner, " +#~ "comme :class:`SafeChildWatcher`." + +#~ msgid "" +#~ "This implementation polls process file descriptors (pidfds) to await " +#~ "child process termination. In some respects, :class:`PidfdChildWatcher` " +#~ "is a \"Goldilocks\" child watcher implementation. It doesn't require " +#~ "signals or threads, doesn't interfere with any processes launched outside " +#~ "the event loop, and scales linearly with the number of subprocesses " +#~ "launched by the event loop. The main disadvantage is that pidfds are " +#~ "specific to Linux, and only work on recent (5.3+) kernels." +#~ msgstr "" +#~ "Cette implémentation interroge les descripteurs de fichiers de processus " +#~ "(*pidfds*) pour attendre la fin du processus enfant. À certains " +#~ "égards, :class:`PidfdChildWatcher` est une implémentation d'observateur " +#~ "d'enfants *Goldilocks*. Elle ne nécessite ni signaux ni threads, " +#~ "n'interfère avec aucun processus lancé en dehors de la boucle " +#~ "d'événements et évolue de manière linéaire avec le nombre de sous-" +#~ "processus lancés par la boucle d'événements. Le principal inconvénient " +#~ "est que les *pidfds* sont spécifiques à Linux et ne fonctionnent que sur " +#~ "les noyaux récents (5.3+)." #~ msgid ":ref:`Availability `: Windows." #~ msgstr ":ref:`Disponibilité ` : Windows." diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 55a6918f8..7f699fd24 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-19 23:01+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -97,11 +97,11 @@ msgstr "" #: library/asyncio-protocol.rst:44 msgid "" -"Most of connection oriented event loop methods (such as :meth:`loop." -"create_connection`) usually accept a *protocol_factory* argument used to " -"create a *Protocol* object for an accepted connection, represented by a " -"*Transport* object. Such methods usually return a tuple of ``(transport, " -"protocol)``." +"Most of connection oriented event loop methods (such " +"as :meth:`loop.create_connection`) usually accept a *protocol_factory* " +"argument used to create a *Protocol* object for an accepted connection, " +"represented by a *Transport* object. Such methods usually return a tuple of " +"``(transport, protocol)``." msgstr "" "La plupart des méthodes de boucles d'événements orientées connexion (telles " "que :meth:`loop.create_connection`) acceptent généralement un argument " @@ -119,23 +119,23 @@ msgstr "Cette page de documentation contient les sections suivantes :" #: library/asyncio-protocol.rst:54 msgid "" -"The `Transports`_ section documents asyncio :class:`BaseTransport`, :class:" -"`ReadTransport`, :class:`WriteTransport`, :class:`Transport`, :class:" -"`DatagramTransport`, and :class:`SubprocessTransport` classes." +"The `Transports`_ section documents " +"asyncio :class:`BaseTransport`, :class:`ReadTransport`, :class:`WriteTransport`, :class:`Transport`, :class:`DatagramTransport`, " +"and :class:`SubprocessTransport` classes." msgstr "" -"La section `Transports`_ documente les classes *asyncio* :class:" -"`BaseTransport`, :class:`ReadTransport`, :class:`WriteTransport`, :class:" -"`Transport`, :class:`DatagramTransport` et :class:`SubprocessTransport`." +"La section `Transports`_ documente les classes " +"*asyncio* :class:`BaseTransport`, :class:`ReadTransport`, :class:`WriteTransport`, :class:`Transport`, :class:`DatagramTransport` " +"et :class:`SubprocessTransport`." #: library/asyncio-protocol.rst:59 msgid "" -"The `Protocols`_ section documents asyncio :class:`BaseProtocol`, :class:" -"`Protocol`, :class:`BufferedProtocol`, :class:`DatagramProtocol`, and :class:" -"`SubprocessProtocol` classes." +"The `Protocols`_ section documents " +"asyncio :class:`BaseProtocol`, :class:`Protocol`, :class:`BufferedProtocol`, :class:`DatagramProtocol`, " +"and :class:`SubprocessProtocol` classes." msgstr "" -"La section `Protocols`_ documente les classes *asyncio* :class:" -"`BaseProtocol`, :class:`Protocol`, :class:`BufferedProtocol`, :class:" -"`DatagramProtocol` et :class:`SubprocessProtocol`." +"La section `Protocols`_ documente les classes " +"*asyncio* :class:`BaseProtocol`, :class:`Protocol`, :class:`BufferedProtocol`, :class:`DatagramProtocol` " +"et :class:`SubprocessProtocol`." #: library/asyncio-protocol.rst:63 msgid "" @@ -203,14 +203,14 @@ msgstr "Transport de base pour les connexions en écriture seule." #: library/asyncio-protocol.rst:100 msgid "" -"Instances of the *WriteTransport* class are returned from the :meth:`loop." -"connect_write_pipe` event loop method and are also used by subprocess-" -"related methods like :meth:`loop.subprocess_exec`." +"Instances of the *WriteTransport* class are returned from " +"the :meth:`loop.connect_write_pipe` event loop method and are also used by " +"subprocess-related methods like :meth:`loop.subprocess_exec`." msgstr "" "Les instances de la classe *WriteTransport* sont renvoyées par la méthode de " "boucle d'événements :meth:`loop.connect_write_pipe` et sont également " -"utilisées par les méthodes liées aux sous-processus comme :meth:`loop." -"subprocess_exec`." +"utilisées par les méthodes liées aux sous-processus " +"comme :meth:`loop.subprocess_exec`." #: library/asyncio-protocol.rst:107 msgid "A base transport for read-only connections." @@ -218,14 +218,14 @@ msgstr "Transport de base pour les connexions en lecture seule." #: library/asyncio-protocol.rst:109 msgid "" -"Instances of the *ReadTransport* class are returned from the :meth:`loop." -"connect_read_pipe` event loop method and are also used by subprocess-related " -"methods like :meth:`loop.subprocess_exec`." +"Instances of the *ReadTransport* class are returned from " +"the :meth:`loop.connect_read_pipe` event loop method and are also used by " +"subprocess-related methods like :meth:`loop.subprocess_exec`." msgstr "" "Les instances de la classe *ReadTransport* sont renvoyées par la méthode de " "boucle d'événements :meth:`loop.connect_read_pipe` et sont également " -"utilisées par les méthodes liées aux sous-processus comme :meth:`loop." -"subprocess_exec`." +"utilisées par les méthodes liées aux sous-processus " +"comme :meth:`loop.subprocess_exec`." #: library/asyncio-protocol.rst:116 msgid "" @@ -246,14 +246,14 @@ msgstr "" #: library/asyncio-protocol.rst:123 msgid "" "Instances of the *Transport* class are returned from or used by event loop " -"methods like :meth:`loop.create_connection`, :meth:`loop." -"create_unix_connection`, :meth:`loop.create_server`, :meth:`loop.sendfile`, " +"methods " +"like :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.create_server`, :meth:`loop.sendfile`, " "etc." msgstr "" "Les instances de la classe *Transport* sont renvoyées ou utilisées par des " -"méthodes de boucle d'événements comme :meth:`loop.create_connection`, :meth:" -"`loop.create_unix_connection`, :meth:`loop.create_server`, :meth:`loop." -"sendfile`, etc." +"méthodes de boucle d'événements " +"comme :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.create_server`, :meth:`loop.sendfile`, " +"etc." #: library/asyncio-protocol.rst:131 msgid "A transport for datagram (UDP) connections." @@ -261,8 +261,8 @@ msgstr "Transport pour les connexions par datagrammes (UDP)." #: library/asyncio-protocol.rst:133 msgid "" -"Instances of the *DatagramTransport* class are returned from the :meth:`loop." -"create_datagram_endpoint` event loop method." +"Instances of the *DatagramTransport* class are returned from " +"the :meth:`loop.create_datagram_endpoint` event loop method." msgstr "" "Les instances de la classe *DatagramTransport* sont renvoyées par la méthode " "de boucle d'événements :meth:`loop.create_datagram_endpoint`." @@ -281,8 +281,8 @@ msgid "" "methods :meth:`loop.subprocess_shell` and :meth:`loop.subprocess_exec`." msgstr "" "Les instances de la classe *SubprocessTransport* sont renvoyées par les " -"méthodes de boucle d'événements :meth:`loop.subprocess_shell` et :meth:`loop." -"subprocess_exec`." +"méthodes de boucle d'événements :meth:`loop.subprocess_shell` " +"et :meth:`loop.subprocess_exec`." #: library/asyncio-protocol.rst:148 msgid "Base Transport" @@ -366,11 +366,11 @@ msgstr "``'socket'`` : Instance de :class:`socket.socket`" #: library/asyncio-protocol.rst:196 msgid "" -"``'sockname'``: the socket's own address, result of :meth:`socket.socket." -"getsockname`" +"``'sockname'``: the socket's own address, result " +"of :meth:`socket.socket.getsockname`" msgstr "" -"``'sockname'`` : la propre adresse du connecteur, résultat de :meth:`socket." -"socket.getsockname`" +"``'sockname'`` : la propre adresse du connecteur, résultat " +"de :meth:`socket.socket.getsockname`" #: library/asyncio-protocol.rst:199 msgid "SSL socket:" @@ -379,12 +379,12 @@ msgstr "Connecteur (*socket*) SSL :" #: library/asyncio-protocol.rst:201 msgid "" "``'compression'``: the compression algorithm being used as a string, or " -"``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket." -"compression`" +"``None`` if the connection isn't compressed; result " +"of :meth:`ssl.SSLSocket.compression`" msgstr "" "``'compression'`` : l'algorithme de compression utilisé (chaîne de " -"caractères), ou ``None`` si la connexion n'est pas compressée ; résultat de :" -"meth:`ssl.SSLSocket.compression`" +"caractères), ou ``None`` si la connexion n'est pas compressée ; résultat " +"de :meth:`ssl.SSLSocket.compression`" #: library/asyncio-protocol.rst:205 msgid "" @@ -400,8 +400,8 @@ msgstr "" msgid "" "``'peercert'``: peer certificate; result of :meth:`ssl.SSLSocket.getpeercert`" msgstr "" -"``'peercert'`` : certificat du pair ; résultat de :meth:`ssl.SSLSocket." -"getpeercert`" +"``'peercert'`` : certificat du pair ; résultat " +"de :meth:`ssl.SSLSocket.getpeercert`" #: library/asyncio-protocol.rst:213 msgid "``'sslcontext'``: :class:`ssl.SSLContext` instance" @@ -411,8 +411,8 @@ msgstr "``sslcontext'`` : instance de :class:`ssl.SSLContext`" msgid "" "``'ssl_object'``: :class:`ssl.SSLObject` or :class:`ssl.SSLSocket` instance" msgstr "" -"``'ssl_object'`` : instance de :class:`ssl.SSLObject` ou de :class:`ssl." -"SSLSocket`" +"``'ssl_object'`` : instance de :class:`ssl.SSLObject` ou " +"de :class:`ssl.SSLSocket`" #: library/asyncio-protocol.rst:218 msgid "pipe:" @@ -461,9 +461,9 @@ msgid "" "until :meth:`resume_reading` is called." msgstr "" "Met en pause l'extrémité de réception du transport. Aucune donnée ne sera " -"transmise à la méthode :meth:`protocol.data_received() ` du protocole jusqu'à ce que :meth:`resume_reading` soit " -"appelée." +"transmise à la méthode :meth:`protocol.data_received() " +"` du protocole jusqu'à ce que :meth:`resume_reading` " +"soit appelée." # suit un : #: library/asyncio-protocol.rst:253 @@ -480,9 +480,9 @@ msgid "" "` method will be called once again if some data is " "available for reading." msgstr "" -"Reprend la réception. La méthode :meth:`protocol.data_received() ` du protocole sera appelée à nouveau si certaines données " -"sont disponibles pour la lecture." +"Reprend la réception. La méthode :meth:`protocol.data_received() " +"` du protocole sera appelée à nouveau si certaines " +"données sont disponibles pour la lecture." # suit un : #: library/asyncio-protocol.rst:263 @@ -512,11 +512,11 @@ msgstr "" #: library/asyncio-protocol.rst:281 msgid "" -"Return :const:`True` if the transport supports :meth:`~WriteTransport." -"write_eof`, :const:`False` if not." +"Return :const:`True` if the transport " +"supports :meth:`~WriteTransport.write_eof`, :const:`False` if not." msgstr "" -"Renvoie :const:`True` si le transport gère :meth:`~WriteTransport." -"write_eof`, :const:`False` sinon." +"Renvoie :const:`True` si le transport " +"gère :meth:`~WriteTransport.write_eof`, :const:`False` sinon." #: library/asyncio-protocol.rst:286 msgid "Return the current size of the output buffer used by the transport." @@ -543,24 +543,24 @@ msgstr "" #: library/asyncio-protocol.rst:302 msgid "" -"These two values (measured in number of bytes) control when the protocol's :" -"meth:`protocol.pause_writing() ` and :meth:" -"`protocol.resume_writing() ` methods are " -"called. If specified, the low watermark must be less than or equal to the " -"high watermark. Neither *high* nor *low* can be negative." +"These two values (measured in number of bytes) control when the " +"protocol's :meth:`protocol.pause_writing() ` " +"and :meth:`protocol.resume_writing() ` methods " +"are called. If specified, the low watermark must be less than or equal to " +"the high watermark. Neither *high* nor *low* can be negative." msgstr "" "Ces deux valeurs (mesurées en nombre d'octets) contrôlent quand les " -"méthodes :meth:`protocol.pause_writing() ` et :" -"meth:`protocol.resume_writing() ` du protocole " -"sont appelées. S'il est spécifié, le seuil bas doit être inférieur ou égal " -"au seuil haut. Ni *high* ni *low* ne peuvent être négatifs." +"méthodes :meth:`protocol.pause_writing() ` " +"et :meth:`protocol.resume_writing() ` du " +"protocole sont appelées. S'il est spécifié, le seuil bas doit être inférieur " +"ou égal au seuil haut. Ni *high* ni *low* ne peuvent être négatifs." #: library/asyncio-protocol.rst:310 msgid "" ":meth:`~BaseProtocol.pause_writing` is called when the buffer size becomes " -"greater than or equal to the *high* value. If writing has been paused, :meth:" -"`~BaseProtocol.resume_writing` is called when the buffer size becomes less " -"than or equal to the *low* value." +"greater than or equal to the *high* value. If writing has been " +"paused, :meth:`~BaseProtocol.resume_writing` is called when the buffer size " +"becomes less than or equal to the *low* value." msgstr "" ":meth:`~BaseProtocol.pause_writing` est appelée lorsque la taille du tampon " "devient supérieure ou égale à la valeur *high*. Si l'écriture a été " @@ -573,21 +573,21 @@ msgid "" "given, the low watermark defaults to an implementation-specific value less " "than or equal to the high watermark. Setting *high* to zero forces *low* to " "zero as well, and causes :meth:`~BaseProtocol.pause_writing` to be called " -"whenever the buffer becomes non-empty. Setting *low* to zero causes :meth:" -"`~BaseProtocol.resume_writing` to be called only once the buffer is empty. " -"Use of zero for either limit is generally sub-optimal as it reduces " -"opportunities for doing I/O and computation concurrently." +"whenever the buffer becomes non-empty. Setting *low* to zero " +"causes :meth:`~BaseProtocol.resume_writing` to be called only once the " +"buffer is empty. Use of zero for either limit is generally sub-optimal as it " +"reduces opportunities for doing I/O and computation concurrently." msgstr "" "Les valeurs par défaut sont spécifiques à l'implémentation. Si seul le seuil " "supérieur est donné, le seuil bas prend par défaut une valeur spécifique à " "l'implémentation inférieure ou égale au seuil supérieur. Définir *high* sur " -"zéro force également *low* sur zéro et provoque l'appel de :meth:" -"`~BaseProtocol.pause_writing` chaque fois que le tampon devient non vide. " -"Définir *low* sur zéro entraîne l'appel de :meth:`~BaseProtocol." -"resume_writing` uniquement une fois que le tampon est vide. L'utilisation de " -"zéro pour l'un ou l'autre seuil est généralement sous-optimal car cela " -"réduit les possibilités d'effectuer des entrées-sorties et des calculs " -"simultanément." +"zéro force également *low* sur zéro et provoque l'appel " +"de :meth:`~BaseProtocol.pause_writing` chaque fois que le tampon devient non " +"vide. Définir *low* sur zéro entraîne l'appel " +"de :meth:`~BaseProtocol.resume_writing` uniquement une fois que le tampon " +"est vide. L'utilisation de zéro pour l'un ou l'autre seuil est généralement " +"sous-optimal car cela réduit les possibilités d'effectuer des entrées-" +"sorties et des calculs simultanément." #: library/asyncio-protocol.rst:326 msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits." @@ -685,28 +685,31 @@ msgstr "" "descripteur de fichier *fd* donné sous forme d'un entier :" #: library/asyncio-protocol.rst:393 +#, fuzzy msgid "" -"``0``: readable streaming transport of the standard input (*stdin*), or :" -"const:`None` if the subprocess was not created with ``stdin=PIPE``" +"``0``: writable streaming transport of the standard input (*stdin*), " +"or :const:`None` if the subprocess was not created with ``stdin=PIPE``" msgstr "" -"``0`` : transport de flux en lecture de l'entrée standard (*stdin*), ou :" -"const:`None` si le sous-processus n'a pas été créé avec ``stdin=PIPE``" +"``0`` : transport de flux en lecture de l'entrée standard (*stdin*), " +"ou :const:`None` si le sous-processus n'a pas été créé avec ``stdin=PIPE``" #: library/asyncio-protocol.rst:395 +#, fuzzy msgid "" -"``1``: writable streaming transport of the standard output (*stdout*), or :" -"const:`None` if the subprocess was not created with ``stdout=PIPE``" +"``1``: readable streaming transport of the standard output (*stdout*), " +"or :const:`None` if the subprocess was not created with ``stdout=PIPE``" msgstr "" -"``1`` : transport de flux en écriture de la sortie standard (*stdout*), ou :" -"const:`None` si le sous-processus n'a pas été créé avec ``stdout=PIPE``" +"``1`` : transport de flux en écriture de la sortie standard (*stdout*), " +"ou :const:`None` si le sous-processus n'a pas été créé avec ``stdout=PIPE``" #: library/asyncio-protocol.rst:397 +#, fuzzy msgid "" -"``2``: writable streaming transport of the standard error (*stderr*), or :" -"const:`None` if the subprocess was not created with ``stderr=PIPE``" +"``2``: readable streaming transport of the standard error (*stderr*), " +"or :const:`None` if the subprocess was not created with ``stderr=PIPE``" msgstr "" -"``2`` : transport de flux en écriture de l'erreur standard (*stderr*), ou :" -"const:`None` si le sous-processus n'a pas été créé avec ``stderr=PIPE``" +"``2`` : transport de flux en écriture de l'erreur standard (*stderr*), " +"ou :const:`None` si le sous-processus n'a pas été créé avec ``stderr=PIPE``" #: library/asyncio-protocol.rst:399 msgid "other *fd*: :const:`None`" @@ -718,9 +721,9 @@ msgid "" "hasn't returned, which is similar to the :attr:`subprocess.Popen.returncode` " "attribute." msgstr "" -"Renvoie le code de retour du sous-processus sous la forme d'un entier ou :" -"const:`None` s'il n'a pas été renvoyé, ce qui est similaire à l'attribut :" -"attr:`subprocess.Popen.returncode`." +"Renvoie le code de retour du sous-processus sous la forme d'un entier " +"ou :const:`None` s'il n'a pas été renvoyé, ce qui est similaire à " +"l'attribut :attr:`subprocess.Popen.returncode`." #: library/asyncio-protocol.rst:409 msgid "Kill the subprocess." @@ -740,11 +743,11 @@ msgstr "Voir aussi :meth:`subprocess.Popen.kill`." #: library/asyncio-protocol.rst:418 msgid "" -"Send the *signal* number to the subprocess, as in :meth:`subprocess.Popen." -"send_signal`." +"Send the *signal* number to the subprocess, as " +"in :meth:`subprocess.Popen.send_signal`." msgstr "" -"Envoie le numéro de *signal* au sous-processus, comme dans :meth:`subprocess." -"Popen.send_signal`." +"Envoie le numéro de *signal* au sous-processus, comme " +"dans :meth:`subprocess.Popen.send_signal`." #: library/asyncio-protocol.rst:423 msgid "Stop the subprocess." @@ -791,7 +794,7 @@ msgid "" "implement network protocols. Those classes are meant to be used together " "with :ref:`transports `." msgstr "" -"*asyncio* fournit un ensemble de classes mères abstraites qui doivent être " +"*asyncio* fournit un ensemble de classes abstraites qui doivent être " "utilisées pour implémenter des protocoles réseau. Ces classes sont destinées " "à être utilisées avec les :ref:`transports `." @@ -802,7 +805,7 @@ msgid "" "certain events, for example when some data is received. A base protocol " "method should be called by the corresponding transport." msgstr "" -"Les sous-classes des classes mères abstraites de protocole peuvent " +"Les sous-classes des classes abstraites de protocole peuvent " "implémenter certaines ou toutes les méthodes. Toutes ces méthodes sont des " "rappels : elles sont appelées par des transports sur certains événements, " "par exemple lors de la réception de certaines données. Une méthode de " @@ -912,8 +915,8 @@ msgid "" "See the documentation of the :meth:`~WriteTransport.set_write_buffer_limits` " "method for more details." msgstr "" -"Voir la documentation de la méthode :meth:`~WriteTransport." -"set_write_buffer_limits` pour plus de détails." +"Voir la documentation de la " +"méthode :meth:`~WriteTransport.set_write_buffer_limits` pour plus de détails." #: library/asyncio-protocol.rst:523 msgid "Called when the transport's buffer goes over the high watermark." @@ -927,12 +930,13 @@ msgstr "" #: library/asyncio-protocol.rst:529 msgid "" -"If the buffer size equals the high watermark, :meth:`~BaseProtocol." -"pause_writing` is not called: the buffer size must go strictly over." +"If the buffer size equals the high " +"watermark, :meth:`~BaseProtocol.pause_writing` is not called: the buffer " +"size must go strictly over." msgstr "" -"Si la taille du tampon est égale au seuil haut, :meth:`~BaseProtocol." -"pause_writing` n'est pas appelée : la taille du tampon doit être strictement " -"supérieure." +"Si la taille du tampon est égale au seuil " +"haut, :meth:`~BaseProtocol.pause_writing` n'est pas appelée : la taille du " +"tampon doit être strictement supérieure." #: library/asyncio-protocol.rst:533 msgid "" @@ -951,17 +955,15 @@ msgstr "Protocoles connectés" #: library/asyncio-protocol.rst:542 msgid "" -"Event methods, such as :meth:`loop.create_server`, :meth:`loop." -"create_unix_server`, :meth:`loop.create_connection`, :meth:`loop." -"create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop." -"connect_read_pipe`, and :meth:`loop.connect_write_pipe` accept factories " -"that return streaming protocols." +"Event methods, such " +"as :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop.connect_read_pipe`, " +"and :meth:`loop.connect_write_pipe` accept factories that return streaming " +"protocols." msgstr "" -"Les méthodes d'événement, telles que :meth:`loop.create_server`, :meth:`loop." -"create_unix_server`, :meth:`loop.create_connection`, :meth:`loop." -"create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop." -"connect_read_pipe` et :meth:`loop.connect_write_pipe` acceptent les " -"fabriques qui renvoient des protocoles connectés." +"Les méthodes d'événement, telles " +"que :meth:`loop.create_server`, :meth:`loop.create_unix_server`, :meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop.connect_read_pipe` " +"et :meth:`loop.connect_write_pipe` acceptent les fabriques qui renvoient des " +"protocoles connectés." #: library/asyncio-protocol.rst:550 msgid "" @@ -1008,8 +1010,9 @@ msgid "" "other end also uses asyncio)." msgstr "" "Appelée lorsque l'autre extrémité signale qu'il n'enverra plus de données " -"(par exemple en appelant :meth:`transport.write_eof() `, si l'autre extrémité utilise également *asyncio*)." +"(par exemple en appelant :meth:`transport.write_eof() " +"`, si l'autre extrémité utilise également " +"*asyncio*)." #: library/asyncio-protocol.rst:572 msgid "" @@ -1073,8 +1076,8 @@ msgstr "" msgid "" "The following callbacks are called on :class:`BufferedProtocol` instances:" msgstr "" -"Les méthodes de rappel suivantes sont appelées sur les instances :class:" -"`BufferedProtocol` :" +"Les méthodes de rappel suivantes sont appelées sur les " +"instances :class:`BufferedProtocol` :" #: library/asyncio-protocol.rst:613 msgid "Called to allocate a new receive buffer." @@ -1112,25 +1115,25 @@ msgstr "" #: library/asyncio-protocol.rst:631 msgid "" -"See the documentation of the :meth:`protocol.eof_received() ` method." +"See the documentation of the :meth:`protocol.eof_received() " +"` method." msgstr "" -"Voir la documentation de la méthode :meth:`protocol.eof_received() `." +"Voir la documentation de la méthode :meth:`protocol.eof_received() " +"`." #: library/asyncio-protocol.rst:635 msgid "" ":meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number of " "times during a connection. However, :meth:`protocol.eof_received() " -"` is called at most once and, if called, :meth:" -"`~BufferedProtocol.get_buffer` and :meth:`~BufferedProtocol.buffer_updated` " -"won't be called after it." +"` is called at most once and, if " +"called, :meth:`~BufferedProtocol.get_buffer` " +"and :meth:`~BufferedProtocol.buffer_updated` won't be called after it." msgstr "" ":meth:`~BufferedProtocol.get_buffer` peut être appelée un nombre arbitraire " "de fois pendant une connexion. Cependant, :meth:`protocol.eof_received() " "` est appelée au plus une fois et, si elle est " -"appelée, :meth:`~BufferedProtocol.get_buffer` et :meth:`~BufferedProtocol." -"buffer_updated` ne seront pas appelées après." +"appelée, :meth:`~BufferedProtocol.get_buffer` " +"et :meth:`~BufferedProtocol.buffer_updated` ne seront pas appelées après." #: library/asyncio-protocol.rst:654 msgid "Datagram Protocols" @@ -1142,8 +1145,8 @@ msgid "" "passed to the :meth:`loop.create_datagram_endpoint` method." msgstr "" "Les instances du protocole par datagrammes doivent être construites par des " -"fabriques de protocole transmises à la méthode :meth:`loop." -"create_datagram_endpoint`." +"fabriques de protocole transmises à la " +"méthode :meth:`loop.create_datagram_endpoint`." #: library/asyncio-protocol.rst:661 msgid "" @@ -1157,11 +1160,11 @@ msgstr "" #: library/asyncio-protocol.rst:667 msgid "" -"Called when a previous send or receive operation raises an :class:" -"`OSError`. *exc* is the :class:`OSError` instance." +"Called when a previous send or receive operation raises " +"an :class:`OSError`. *exc* is the :class:`OSError` instance." msgstr "" -"Appelée lorsqu'une opération d'envoi ou de réception précédente lève une :" -"class:`OSError`. *exc* est l'instance :class:`OSError`." +"Appelée lorsqu'une opération d'envoi ou de réception précédente lève " +"une :class:`OSError`. *exc* est l'instance :class:`OSError`." #: library/asyncio-protocol.rst:670 msgid "" @@ -1187,15 +1190,16 @@ msgstr "" #: library/asyncio-protocol.rst:681 msgid "" -"The socket always appears 'ready' and excess packets are dropped. An :class:" -"`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may or may not be " -"raised; if it is raised, it will be reported to :meth:`DatagramProtocol." -"error_received` but otherwise ignored." +"The socket always appears 'ready' and excess packets are dropped. " +"An :class:`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may or may " +"not be raised; if it is raised, it will be reported " +"to :meth:`DatagramProtocol.error_received` but otherwise ignored." msgstr "" "Le connecteur apparaît toujours « prêt » et les paquets en excès sont " -"supprimés. Une :class:`OSError` avec ``errno`` définie sur :const:`errno." -"ENOBUFS` peut être levée ou non ; si elle est levée, c'est communiqué à :" -"meth:`DatagramProtocol.error_received` et ignoré dans le cas contraire." +"supprimés. Une :class:`OSError` avec ``errno`` définie " +"sur :const:`errno.ENOBUFS` peut être levée ou non ; si elle est levée, c'est " +"communiqué à :meth:`DatagramProtocol.error_received` et ignoré dans le cas " +"contraire." #: library/asyncio-protocol.rst:690 msgid "Subprocess Protocols" @@ -1208,8 +1212,8 @@ msgid "" "methods." msgstr "" "Les instances de protocole de sous-processus doivent être construites par " -"des fabriques de protocole transmises aux méthodes :meth:`loop." -"subprocess_exec` et :meth:`loop.subprocess_shell`." +"des fabriques de protocole transmises aux " +"méthodes :meth:`loop.subprocess_exec` et :meth:`loop.subprocess_shell`." #: library/asyncio-protocol.rst:698 msgid "" @@ -1243,8 +1247,8 @@ msgstr "Appelée lorsqu'un processus enfant se termine." #: library/asyncio-protocol.rst:716 msgid "" -"It can be called before :meth:`~SubprocessProtocol.pipe_data_received` and :" -"meth:`~SubprocessProtocol.pipe_connection_lost` methods." +"It can be called before :meth:`~SubprocessProtocol.pipe_data_received` " +"and :meth:`~SubprocessProtocol.pipe_connection_lost` methods." msgstr "" #: library/asyncio-protocol.rst:721 @@ -1260,8 +1264,9 @@ msgid "" "Create a TCP echo server using the :meth:`loop.create_server` method, send " "back received data, and close the connection::" msgstr "" -"Crée un serveur d'écho TCP en utilisant la méthode :meth:`loop." -"create_server`, renvoie les données reçues et ferme la connexion ::" +"Crée un serveur d'écho TCP en utilisant la " +"méthode :meth:`loop.create_server`, renvoie les données reçues et ferme la " +"connexion ::" #: library/asyncio-protocol.rst:769 msgid "" @@ -1300,8 +1305,9 @@ msgid "" "A UDP echo server, using the :meth:`loop.create_datagram_endpoint` method, " "sends back received data::" msgstr "" -"Serveur d'écho UDP, utilisant la méthode :meth:`loop." -"create_datagram_endpoint`, qui renvoie les données reçues ::" +"Serveur d'écho UDP, utilisant la " +"méthode :meth:`loop.create_datagram_endpoint`, qui renvoie les données " +"reçues ::" #: library/asyncio-protocol.rst:876 msgid "UDP Echo Client" @@ -1312,9 +1318,9 @@ msgid "" "A UDP echo client, using the :meth:`loop.create_datagram_endpoint` method, " "sends data and closes the transport when it receives the answer::" msgstr "" -"Client d'écho UDP, utilisant la méthode :meth:`loop." -"create_datagram_endpoint`, qui envoie des données et ferme le transport " -"lorsqu'il reçoit la réponse :" +"Client d'écho UDP, utilisant la " +"méthode :meth:`loop.create_datagram_endpoint`, qui envoie des données et " +"ferme le transport lorsqu'il reçoit la réponse :" #: library/asyncio-protocol.rst:933 msgid "Connecting Existing Sockets" @@ -1325,17 +1331,17 @@ msgid "" "Wait until a socket receives data using the :meth:`loop.create_connection` " "method with a protocol::" msgstr "" -"Attend qu'un connecteur reçoive des données en utilisant la méthode :meth:" -"`loop.create_connection` avec un protocole ::" +"Attend qu'un connecteur reçoive des données en utilisant la " +"méthode :meth:`loop.create_connection` avec un protocole ::" #: library/asyncio-protocol.rst:989 msgid "" "The :ref:`watch a file descriptor for read events " -"` example uses the low-level :meth:`loop." -"add_reader` method to register an FD." +"` example uses the low-" +"level :meth:`loop.add_reader` method to register an FD." msgstr "" -"L'exemple :ref:`asyncio_example_watch_fd` utilise la méthode de bas niveau :" -"meth:`loop.add_reader` pour enregistrer un descripteur de fichier." +"L'exemple :ref:`asyncio_example_watch_fd` utilise la méthode de bas " +"niveau :meth:`loop.add_reader` pour enregistrer un descripteur de fichier." #: library/asyncio-protocol.rst:993 msgid "" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index a7edf1df3..a9eb08bb8 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-06-11 22:26+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -36,8 +36,8 @@ msgstr "" #: library/asyncio-queue.rst:17 msgid "" -"Note that methods of asyncio queues don't have a *timeout* parameter; use :" -"func:`asyncio.wait_for` function to do queue operations with a timeout." +"Note that methods of asyncio queues don't have a *timeout* parameter; " +"use :func:`asyncio.wait_for` function to do queue operations with a timeout." msgstr "" "Notez que les méthodes des files d'attente *asyncio* n'ont pas de paramètre " "*timeout* ; utilisez la fonction :func:`asyncio.wait_for` pour effectuer des " @@ -103,13 +103,13 @@ msgstr "" #: library/asyncio-queue.rst:57 #, fuzzy msgid "" -"If the queue was initialized with ``maxsize=0`` (the default), then :meth:" -"`full` never returns ``True``." +"If the queue was initialized with ``maxsize=0`` (the default), " +"then :meth:`full` never returns ``True``." msgstr "" "Si la file d'attente a été initialisée avec ``maxsize=0`` (la valeur par " "défaut), alors :meth:`full()` ne renvoie jamais ``True``." -#: library/asyncio-queue.rst:62 +#: library/asyncio-queue.rst:63 msgid "" "Remove and return an item from the queue. If queue is empty, wait until an " "item is available." @@ -117,32 +117,32 @@ msgstr "" "Supprime et renvoie un élément de la file d'attente. Si la file d'attente " "est vide, attend qu'un élément soit disponible." -#: library/asyncio-queue.rst:65 +#: library/asyncio-queue.rst:66 msgid "" "Raises :exc:`QueueShutDown` if the queue has been shut down and is empty, or " "if the queue has been shut down immediately." msgstr "" -#: library/asyncio-queue.rst:70 +#: library/asyncio-queue.rst:71 msgid "" "Return an item if one is immediately available, else raise :exc:`QueueEmpty`." msgstr "" -"Renvoie un élément s'il y en a un immédiatement disponible, sinon lève :exc:" -"`QueueEmpty`." +"Renvoie un élément s'il y en a un immédiatement disponible, sinon " +"lève :exc:`QueueEmpty`." -#: library/asyncio-queue.rst:75 +#: library/asyncio-queue.rst:77 msgid "Block until all items in the queue have been received and processed." msgstr "" "Bloque jusqu'à ce que tous les éléments de la file d'attente aient été " "récupérés et traités." -#: library/asyncio-queue.rst:77 +#: library/asyncio-queue.rst:79 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " -"queue. The count goes down whenever a consumer coroutine calls :meth:" -"`task_done` to indicate that the item was retrieved and all work on it is " -"complete. When the count of unfinished tasks drops to zero, :meth:`join` " -"unblocks." +"queue. The count goes down whenever a consumer coroutine " +"calls :meth:`task_done` to indicate that the item was retrieved and all work " +"on it is complete. When the count of unfinished tasks drops to " +"zero, :meth:`join` unblocks." msgstr "" "Le nombre de tâches inachevées augmente chaque fois qu'un élément est ajouté " "à la file. Ce nombre diminue chaque fois qu'un fil d'exécution consommateur " @@ -150,7 +150,7 @@ msgstr "" "tout le travail à effectuer dessus est terminé. Lorsque le nombre de tâches " "non terminées devient nul, :meth:`join` débloque." -#: library/asyncio-queue.rst:85 +#: library/asyncio-queue.rst:88 msgid "" "Put an item into the queue. If the queue is full, wait until a free slot is " "available before adding the item." @@ -158,61 +158,89 @@ msgstr "" "Met un élément dans la file d'attente. Si la file d'attente est pleine, " "attend qu'un emplacement libre soit disponible avant d'ajouter l'élément." -#: library/asyncio-queue.rst:88 +#: library/asyncio-queue.rst:91 msgid "Raises :exc:`QueueShutDown` if the queue has been shut down." msgstr "" -#: library/asyncio-queue.rst:92 +#: library/asyncio-queue.rst:95 msgid "Put an item into the queue without blocking." msgstr "Ajoute un élément dans la file d'attente sans bloquer." -#: library/asyncio-queue.rst:94 +#: library/asyncio-queue.rst:97 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "" -"Si aucun emplacement libre n'est immédiatement disponible, lève :exc:" -"`QueueFull`." +"Si aucun emplacement libre n'est immédiatement disponible, " +"lève :exc:`QueueFull`." -#: library/asyncio-queue.rst:98 +#: library/asyncio-queue.rst:101 msgid "Return the number of items in the queue." msgstr "Renvoie le nombre d'éléments dans la file d'attente." -#: library/asyncio-queue.rst:102 +#: library/asyncio-queue.rst:105 +msgid "Put a :class:`Queue` instance into a shutdown mode." +msgstr "" + +#: library/asyncio-queue.rst:107 msgid "" -"Shut down the queue, making :meth:`~Queue.get` and :meth:`~Queue.put` raise :" -"exc:`QueueShutDown`." +"The queue can no longer grow. Future calls to :meth:`~Queue.put` " +"raise :exc:`QueueShutDown`. Currently blocked callers of :meth:`~Queue.put` " +"will be unblocked and will raise :exc:`QueueShutDown` in the formerly " +"awaiting task." msgstr "" -#: library/asyncio-queue.rst:105 +#: library/asyncio-queue.rst:112 msgid "" -"By default, :meth:`~Queue.get` on a shut down queue will only raise once the " -"queue is empty. Set *immediate* to true to make :meth:`~Queue.get` raise " -"immediately instead." +"If *immediate* is false (the default), the queue can be wound down normally " +"with :meth:`~Queue.get` calls to extract tasks that have already been loaded." msgstr "" -#: library/asyncio-queue.rst:109 +#: library/asyncio-queue.rst:116 msgid "" -"All blocked callers of :meth:`~Queue.put` and :meth:`~Queue.get` will be " -"unblocked. If *immediate* is true, a task will be marked as done for each " -"remaining item in the queue, which may unblock callers of :meth:`~Queue." -"join`." +"And if :meth:`~Queue.task_done` is called for each remaining task, a " +"pending :meth:`~Queue.join` will be unblocked normally." msgstr "" -#: library/asyncio-queue.rst:118 -msgid "Indicate that a formerly enqueued task is complete." +#: library/asyncio-queue.rst:119 +msgid "" +"Once the queue is empty, future calls to :meth:`~Queue.get` will " +"raise :exc:`QueueShutDown`." +msgstr "" + +#: library/asyncio-queue.rst:122 +msgid "" +"If *immediate* is true, the queue is terminated immediately. The queue is " +"drained to be completely empty and the count of unfinished tasks is reduced " +"by the number of tasks drained. If unfinished tasks is zero, callers " +"of :meth:`~Queue.join` are unblocked. Also, blocked callers " +"of :meth:`~Queue.get` are unblocked and will raise :exc:`QueueShutDown` " +"because the queue is empty." +msgstr "" + +#: library/asyncio-queue.rst:130 +msgid "" +"Use caution when using :meth:`~Queue.join` with *immediate* set to true. " +"This unblocks the join even when no work has been done on the tasks, " +"violating the usual invariant for joining a queue." +msgstr "" + +#: library/asyncio-queue.rst:138 +#, fuzzy +msgid "Indicate that a formerly enqueued work item is complete." msgstr "Indique qu'une tâche précédemment mise en file d'attente est terminée." -#: library/asyncio-queue.rst:120 +#: library/asyncio-queue.rst:140 +#, fuzzy msgid "" -"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a task, a " -"subsequent call to :meth:`task_done` tells the queue that the processing on " -"the task is complete." +"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work " +"item, a subsequent call to :meth:`task_done` tells the queue that the " +"processing on the work item is complete." msgstr "" -"Utilisé par les consommateurs de file d'attente. Pour chaque :meth:`~Queue." -"get` utilisé pour récupérer une tâche, un appel ultérieur à :meth:" -"`task_done` indique à la file d'attente que le traitement de la tâche est " -"terminé." +"Utilisé par les consommateurs de file d'attente. Pour " +"chaque :meth:`~Queue.get` utilisé pour récupérer une tâche, un appel " +"ultérieur à :meth:`task_done` indique à la file d'attente que le traitement " +"de la tâche est terminé." -#: library/asyncio-queue.rst:124 +#: library/asyncio-queue.rst:144 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " @@ -222,13 +250,7 @@ msgstr "" "éléments auront été traités (ce qui signifie qu'un appel à :meth:`task_done` " "a été effectué pour chaque élément qui a été :meth:`put` dans la file)." -#: library/asyncio-queue.rst:129 -msgid "" -"``shutdown(immediate=True)`` calls :meth:`task_done` for each remaining item " -"in the queue." -msgstr "" - -#: library/asyncio-queue.rst:132 +#: library/asyncio-queue.rst:149 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." @@ -236,11 +258,11 @@ msgstr "" "Lève une exception :exc:`ValueError` si elle est appelée plus de fois qu'il " "n'y avait d'éléments dans la file." -#: library/asyncio-queue.rst:137 +#: library/asyncio-queue.rst:154 msgid "Priority Queue" msgstr "File avec priorité" -#: library/asyncio-queue.rst:141 +#: library/asyncio-queue.rst:158 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." @@ -248,17 +270,17 @@ msgstr "" "Une variante de :class:`Queue` ; récupère les entrées par ordre de priorité " "(la plus basse en premier)." -#: library/asyncio-queue.rst:144 +#: library/asyncio-queue.rst:161 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "" "Les entrées sont généralement des *n*-uplets de la forme ``(priority_number, " "data)``." -#: library/asyncio-queue.rst:149 +#: library/asyncio-queue.rst:166 msgid "LIFO Queue" msgstr "Pile (LIFO)" -#: library/asyncio-queue.rst:153 +#: library/asyncio-queue.rst:170 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." @@ -266,11 +288,11 @@ msgstr "" "Une variante de :class:`Queue` qui récupère en premier les entrées les plus " "récemment ajoutées (dernier entré, premier sorti)." -#: library/asyncio-queue.rst:158 +#: library/asyncio-queue.rst:175 msgid "Exceptions" msgstr "Exceptions" -#: library/asyncio-queue.rst:162 +#: library/asyncio-queue.rst:179 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." @@ -278,7 +300,7 @@ msgstr "" "Cette exception est levée lorsque la méthode :meth:`~Queue.get_nowait` est " "appelée sur une file d'attente vide." -#: library/asyncio-queue.rst:168 +#: library/asyncio-queue.rst:185 msgid "" "Exception raised when the :meth:`~Queue.put_nowait` method is called on a " "queue that has reached its *maxsize*." @@ -286,7 +308,7 @@ msgstr "" "Exception levée lorsque la méthode :meth:`~Queue.put_nowait` est appelée sur " "une file d'attente qui a atteint sa *maxsize*." -#: library/asyncio-queue.rst:174 +#: library/asyncio-queue.rst:191 #, fuzzy msgid "" "Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " @@ -295,11 +317,11 @@ msgstr "" "Exception levée lorsque la méthode :meth:`~Queue.put_nowait` est appelée sur " "une file d'attente qui a atteint sa *maxsize*." -#: library/asyncio-queue.rst:181 +#: library/asyncio-queue.rst:198 msgid "Examples" msgstr "Exemples" -#: library/asyncio-queue.rst:185 +#: library/asyncio-queue.rst:202 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po index 3c6c785df..45478576f 100644 --- a/library/asyncio-runner.po +++ b/library/asyncio-runner.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-29 21:12+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -44,20 +44,25 @@ msgid "Running an asyncio Program" msgstr "Exécution d'un programme asynchrone" #: library/asyncio-runner.rst:27 -msgid "Execute the :term:`coroutine` *coro* and return the result." +#, fuzzy +msgid "Execute *coro* in an asyncio event loop and return the result." msgstr "Exécute la :term:`coroutine` *coro* et renvoie le résultat." -#: library/asyncio-runner.rst:29 +#: library/asyncio-runner.rst:121 +msgid "The argument can be any awaitable object." +msgstr "" + +#: library/asyncio-runner.rst:31 #, fuzzy msgid "" -"This function runs the passed coroutine, taking care of managing the asyncio " -"event loop, *finalizing asynchronous generators*, and closing the executor." +"This function runs the awaitable, taking care of managing the asyncio event " +"loop, *finalizing asynchronous generators*, and closing the executor." msgstr "" "Cette fonction exécute la coroutine transmise, en s'occupant de gérer la " "boucle d'événements *asyncio*, de *finaliser les générateurs asynchrones* et " "de terminer correctement les fils d'exécution." -#: library/asyncio-runner.rst:115 +#: library/asyncio-runner.rst:131 msgid "" "This function cannot be called when another asyncio event loop is running in " "the same thread." @@ -65,59 +70,71 @@ msgstr "" "Cette fonction ne peut pas être appelée lorsqu'une autre boucle d'événement " "asynchrone est en cours d'exécution dans le même fil d'exécution." -#: library/asyncio-runner.rst:85 +#: library/asyncio-runner.rst:97 msgid "" "If *debug* is ``True``, the event loop will be run in debug mode. ``False`` " -"disables debug mode explicitly. ``None`` is used to respect the global :ref:" -"`asyncio-debug-mode` settings." +"disables debug mode explicitly. ``None`` is used to respect the " +"global :ref:`asyncio-debug-mode` settings." msgstr "" "Si *debug* vaut ``True``, la boucle d'événements est exécutée en mode " "débogage. ``False`` désactive explicitement le mode débogage. ``None`` est " "utilisée pour respecter les paramètres globaux définis par :ref:`asyncio-" "debug-mode`." -#: library/asyncio-runner.rst:40 +#: library/asyncio-runner.rst:42 msgid "" "If *loop_factory* is not ``None``, it is used to create a new event loop; " "otherwise :func:`asyncio.new_event_loop` is used. The loop is closed at the " "end. This function should be used as a main entry point for asyncio " "programs, and should ideally only be called once. It is recommended to use " -"*loop_factory* to configure the event loop instead of policies. Passing :" -"class:`asyncio.EventLoop` allows running asyncio without the policy system." +"*loop_factory* to configure the event loop instead of policies. " +"Passing :class:`asyncio.EventLoop` allows running asyncio without the policy " +"system." msgstr "" -#: library/asyncio-runner.rst:48 +#: library/asyncio-runner.rst:50 msgid "" "The executor is given a timeout duration of 5 minutes to shutdown. If the " "executor hasn't finished within that duration, a warning is emitted and the " "executor is closed." msgstr "" -#: library/asyncio-runner.rst:52 +#: library/asyncio-runner.rst:54 msgid "Example::" msgstr "Exemple ::" # suit un : -#: library/asyncio-runner.rst:62 +#: library/asyncio-runner.rst:64 msgid "Updated to use :meth:`loop.shutdown_default_executor`." msgstr "mise à jour pour utiliser :meth:`loop.shutdown_default_executor`." -#: library/asyncio-runner.rst:67 +#: library/asyncio-runner.rst:69 msgid "" "*debug* is ``None`` by default to respect the global debug mode settings." msgstr "" "*debug* vaut ``None`` par défaut pour respecter les paramètres du mode de " "débogage global." -#: library/asyncio-runner.rst:71 +#: library/asyncio-runner.rst:73 msgid "Added *loop_factory* parameter." msgstr "" -#: library/asyncio-runner.rst:75 +#: library/asyncio-runner.rst:136 +msgid "*coro* can be any awaitable object." +msgstr "" + +#: library/asyncio-runner.rst:81 +msgid "" +"The :mod:`!asyncio` policy system is deprecated and will be removed in " +"Python 3.16; from there on, an explicit *loop_factory* is needed to " +"configure the event loop." +msgstr "" + +#: library/asyncio-runner.rst:87 msgid "Runner context manager" msgstr "Gestionnaire de contexte de l'exécuteur" -#: library/asyncio-runner.rst:79 +#: library/asyncio-runner.rst:91 msgid "" "A context manager that simplifies *multiple* async function calls in the " "same context." @@ -125,16 +142,16 @@ msgstr "" "Gestionnaire de contexte englobant *plusieurs* appels de fonctions " "asynchrones dans le même contexte." -#: library/asyncio-runner.rst:82 +#: library/asyncio-runner.rst:94 msgid "" -"Sometimes several top-level async functions should be called in the same :" -"ref:`event loop ` and :class:`contextvars.Context`." +"Sometimes several top-level async functions should be called in the " +"same :ref:`event loop ` and :class:`contextvars.Context`." msgstr "" "Parfois, plusieurs fonctions asynchrones de niveau supérieur doivent être " "appelées dans la même :ref:`boucle d'événements ` et le " "même :class:`contextvars.Context`." -#: library/asyncio-runner.rst:89 +#: library/asyncio-runner.rst:101 msgid "" "*loop_factory* could be used for overriding the loop creation. It is the " "responsibility of the *loop_factory* to set the created loop as the current " @@ -147,7 +164,7 @@ msgstr "" "comme boucle d'événements actuelle avec :func:`asyncio.set_event_loop` si " "*loop_factory* vaut ``None``." -#: library/asyncio-runner.rst:94 +#: library/asyncio-runner.rst:106 #, fuzzy msgid "" "Basically, :func:`asyncio.run` example can be rewritten with the runner " @@ -156,31 +173,38 @@ msgstr "" "Fondamentalement, l'exemple :func:`asyncio.run()` peut être réécrit avec " "l'utilisation de l'exécuteur suivant ::" -#: library/asyncio-runner.rst:107 -msgid "Run a :term:`coroutine ` *coro* in the embedded loop." +#: library/asyncio-runner.rst:119 +#, fuzzy +msgid "Execute *coro* in the embedded event loop." msgstr "" "Exécute la :term:`coroutine ` *coro* dans la boucle d'événements " "en cours." -#: library/asyncio-runner.rst:109 -msgid "Return the coroutine's result or raise its exception." -msgstr "Renvoie le résultat de la coroutine ou lève les exceptions afférentes." +#: library/asyncio-runner.rst:123 +msgid "If the argument is a coroutine, it is wrapped in a Task." +msgstr "" -#: library/asyncio-runner.rst:111 +#: library/asyncio-runner.rst:125 +#, fuzzy msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *coro* to run in. The runner's default " -"context is used if ``None``." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the code to run in. The runner's " +"default context is used if context is ``None``." msgstr "" -"L'argument (uniquement nommé) facultatif *context* permet de spécifier un :" -"class:`contextvars.Context` personnalisé pour la coroutine à exécuter. Le " -"contexte par défaut de l'exécuteur est utilisé si *context* est ``None``." +"L'argument (uniquement nommé) facultatif *context* permet de spécifier " +"un :class:`contextvars.Context` personnalisé pour la coroutine à exécuter. " +"Le contexte par défaut de l'exécuteur est utilisé si *context* est ``None``." + +#: library/asyncio-runner.rst:129 +#, fuzzy +msgid "Returns the awaitable's result or raises an exception." +msgstr "Renvoie le résultat de la coroutine ou lève les exceptions afférentes." -#: library/asyncio-runner.rst:120 +#: library/asyncio-runner.rst:140 msgid "Close the runner." msgstr "Termine l'exécuteur." -#: library/asyncio-runner.rst:122 +#: library/asyncio-runner.rst:142 msgid "" "Finalize asynchronous generators, shutdown default executor, close the event " "loop and release embedded :class:`contextvars.Context`." @@ -188,11 +212,11 @@ msgstr "" "Finalise les générateurs asynchrones, arrête l'exécuteur par défaut, ferme " "la boucle d'événements et libère le :class:`contextvars.Context` en cours." -#: library/asyncio-runner.rst:127 +#: library/asyncio-runner.rst:147 msgid "Return the event loop associated with the runner instance." msgstr "Renvoie la boucle d'événements associée à l'instance de l'exécuteur." -#: library/asyncio-runner.rst:131 +#: library/asyncio-runner.rst:151 msgid "" ":class:`Runner` uses the lazy initialization strategy, its constructor " "doesn't initialize underlying low-level structures." @@ -200,33 +224,33 @@ msgstr "" ":class:`Runner` utilise la stratégie d'initialisation paresseuse, son " "constructeur n'initialise pas les structures de bas niveau sous-jacentes." -#: library/asyncio-runner.rst:134 +#: library/asyncio-runner.rst:154 msgid "" "Embedded *loop* and *context* are created at the :keyword:`with` body " "entering or the first call of :meth:`run` or :meth:`get_loop`." msgstr "" "La boucle d'événements *loop* et le *context* intégrés sont créés à " -"l'entrée du corps de :keyword:`with` ou au premier appel de :meth:`run` ou :" -"meth:`get_loop`." +"l'entrée du corps de :keyword:`with` ou au premier appel de :meth:`run` " +"ou :meth:`get_loop`." -#: library/asyncio-runner.rst:139 +#: library/asyncio-runner.rst:159 msgid "Handling Keyboard Interruption" msgstr "Gestion de l'interruption par le clavier" -#: library/asyncio-runner.rst:143 +#: library/asyncio-runner.rst:163 msgid "" -"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, :exc:" -"`KeyboardInterrupt` exception is raised in the main thread by default. " -"However this doesn't work with :mod:`asyncio` because it can interrupt " -"asyncio internals and can hang the program from exiting." +"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-" +"C`, :exc:`KeyboardInterrupt` exception is raised in the main thread by " +"default. However this doesn't work with :mod:`asyncio` because it can " +"interrupt asyncio internals and can hang the program from exiting." msgstr "" -"Lorsque :const:`signal.SIGINT` est déclenché par :kbd:`Ctrl-C`, l'exception :" -"exc:`KeyboardInterrupt` est levée par défaut dans le fils d'exécution " -"principal. Cependant, cela ne fonctionne pas avec :mod:`asyncio` car cela " -"peut interrompre le fonctionnement interne de *asyncio* et empêcher le " -"programme de se terminer." +"Lorsque :const:`signal.SIGINT` est déclenché par :kbd:`Ctrl-C`, " +"l'exception :exc:`KeyboardInterrupt` est levée par défaut dans le fils " +"d'exécution principal. Cependant, cela ne fonctionne pas avec :mod:`asyncio` " +"car cela peut interrompre le fonctionnement interne de *asyncio* et empêcher " +"le programme de se terminer." -#: library/asyncio-runner.rst:148 +#: library/asyncio-runner.rst:168 msgid "" "To mitigate this issue, :mod:`asyncio` handles :const:`signal.SIGINT` as " "follows:" @@ -234,7 +258,7 @@ msgstr "" "Pour contrer ce problème, :mod:`asyncio` gère :const:`signal.SIGINT` comme " "suit :" -#: library/asyncio-runner.rst:150 +#: library/asyncio-runner.rst:170 msgid "" ":meth:`asyncio.Runner.run` installs a custom :const:`signal.SIGINT` handler " "before any user code is executed and removes it when exiting from the " @@ -244,7 +268,7 @@ msgstr "" "personnalisé avant l'exécution de tout code utilisateur et le supprime à la " "sortie de la fonction." -#: library/asyncio-runner.rst:152 +#: library/asyncio-runner.rst:172 msgid "" "The :class:`~asyncio.Runner` creates the main task for the passed coroutine " "for its execution." @@ -252,29 +276,29 @@ msgstr "" "Le :class:`~asyncio.Runner` crée la tâche principale pour la coroutine " "transmise pour son exécution." -#: library/asyncio-runner.rst:154 +#: library/asyncio-runner.rst:174 msgid "" "When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, the custom signal " "handler cancels the main task by calling :meth:`asyncio.Task.cancel` which " "raises :exc:`asyncio.CancelledError` inside the main task. This causes the " "Python stack to unwind, ``try/except`` and ``try/finally`` blocks can be " -"used for resource cleanup. After the main task is cancelled, :meth:`asyncio." -"Runner.run` raises :exc:`KeyboardInterrupt`." +"used for resource cleanup. After the main task is " +"cancelled, :meth:`asyncio.Runner.run` raises :exc:`KeyboardInterrupt`." msgstr "" "Lorsque :const:`signal.SIGINT` est déclenché par :kbd:`Ctrl-C`, le " -"gestionnaire de signal personnalisé annule la tâche principale en appelant :" -"meth:`asyncio.Task.cancel` qui lève :exc:`asyncio.CancelledError` à " -"l'intérieur de la tâche principale. Cela entraîne la remontée dans la pile " +"gestionnaire de signal personnalisé annule la tâche principale en " +"appelant :meth:`asyncio.Task.cancel` qui lève :exc:`asyncio.CancelledError` " +"à l'intérieur de la tâche principale. Cela entraîne la remontée dans la pile " "Python, les blocs ``try/except`` et ``try/finally`` peuvent être utilisés " -"pour le nettoyage des ressources. Une fois la tâche principale annulée, :" -"meth:`asyncio.Runner.run` lève :exc:`KeyboardInterrupt`." +"pour le nettoyage des ressources. Une fois la tâche principale " +"annulée, :meth:`asyncio.Runner.run` lève :exc:`KeyboardInterrupt`." -#: library/asyncio-runner.rst:160 +#: library/asyncio-runner.rst:180 msgid "" -"A user could write a tight loop which cannot be interrupted by :meth:" -"`asyncio.Task.cancel`, in which case the second following :kbd:`Ctrl-C` " -"immediately raises the :exc:`KeyboardInterrupt` without cancelling the main " -"task." +"A user could write a tight loop which cannot be interrupted " +"by :meth:`asyncio.Task.cancel`, in which case the second " +"following :kbd:`Ctrl-C` immediately raises the :exc:`KeyboardInterrupt` " +"without cancelling the main task." msgstr "" "Un utilisateur peut écrire une boucle tellement petite qu'elle ne peut pas " "être interrompue par :meth:`asyncio.Task.cancel` ; dans ce cas la seconde " diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index ef36fc56a..41bcfaa09 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-07-04 23:07+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -56,7 +56,7 @@ msgstr "" "Les fonctions *asyncio* de haut niveau suivantes peuvent être utilisées pour " "créer et utiliser des flux :" -#: library/asyncio-stream.rst:58 +#: library/asyncio-stream.rst:59 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." @@ -64,68 +64,70 @@ msgstr "" "Établit une connexion réseau et renvoie une paire d'objets ``(lecteur, " "écrivain)``." -#: library/asyncio-stream.rst:61 +#: library/asyncio-stream.rst:62 msgid "" -"The returned *reader* and *writer* objects are instances of :class:" -"`StreamReader` and :class:`StreamWriter` classes." +"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`." +"Les objets *lecteur* et *écrivain* renvoyés sont des instances des " +"classes :class:`StreamReader` et :class:`StreamWriter`." -#: library/asyncio-stream.rst:109 +#: library/asyncio-stream.rst:112 msgid "" -"*limit* determines the buffer size limit used by the returned :class:" -"`StreamReader` instance. By default the *limit* is set to 64 KiB." +"*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." +"*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 +#: library/asyncio-stream.rst:69 msgid "" -"The rest of the arguments are passed directly to :meth:`loop." -"create_connection`." +"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`." +"Le reste des arguments est passé directement " +"à :meth:`loop.create_connection`." # suit un : -#: library/asyncio-stream.rst:147 +#: library/asyncio-stream.rst:154 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." +"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`." +"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 +#: library/asyncio-stream.rst:78 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "ajout du paramètre *ssl_handshake_timeout*." # suit un : -#: library/asyncio-stream.rst:80 +#: library/asyncio-stream.rst:81 #, fuzzy msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "ajout des paramètres *happy_eyeballs_delay* et *interleave*." # suit un : -#: library/asyncio-stream.rst:125 library/asyncio-stream.rst:187 +#: library/asyncio-stream.rst:128 library/asyncio-stream.rst:199 msgid "Removed the *loop* parameter." msgstr "suppression du paramètre *loop*." # suit un : -#: library/asyncio-stream.rst:128 library/asyncio-stream.rst:190 -#: library/asyncio-stream.rst:383 +#: library/asyncio-stream.rst:131 library/asyncio-stream.rst:202 +#: library/asyncio-stream.rst:408 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "ajout du paramètre *ssl_shutdown_timeout*." -#: library/asyncio-stream.rst:98 +#: library/asyncio-stream.rst:101 msgid "Start a socket server." msgstr "Démarre un serveur de connexions" -#: library/asyncio-stream.rst:100 +#: library/asyncio-stream.rst:103 msgid "" "The *client_connected_cb* callback is called whenever a new client " "connection is established. It receives a ``(reader, writer)`` pair as two " @@ -134,27 +136,27 @@ msgid "" 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`." +"``(lecteur, écrivain)``, instances des classes :class:`StreamReader` " +"et :class:`StreamWriter`." -#: library/asyncio-stream.rst:105 +#: library/asyncio-stream.rst:108 msgid "" "*client_connected_cb* can be a plain callable or a :ref:`coroutine function " "`; 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`." +"*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 +#: library/asyncio-stream.rst:116 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 +#: library/asyncio-stream.rst:189 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." @@ -164,35 +166,41 @@ msgstr "" "serveur." # suit un : -#: library/asyncio-stream.rst:122 +#: library/asyncio-stream.rst:125 msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." msgstr "ajout des paramètres *ssl_handshake_timeout* et *start_serving*." -#: library/asyncio-stream.rst:133 +# suit un : +#: library/asyncio-stream.rst:134 +#, fuzzy +msgid "Added the *keep_alive* parameter." +msgstr "ajout du paramètre *ssl_handshake_timeout*." + +#: library/asyncio-stream.rst:139 msgid "Unix Sockets" msgstr "Connecteurs Unix (*sockets*)" -#: library/asyncio-stream.rst:138 +#: library/asyncio-stream.rst:145 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 +#: library/asyncio-stream.rst:148 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 +#: library/asyncio-stream.rst:150 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "Voir aussi la documentation de :meth:`loop.create_unix_connection`." -#: library/asyncio-stream.rst:181 +#: library/asyncio-stream.rst:193 msgid "Availability" -msgstr "" +msgstr "Disponibilité" # suit un : -#: library/asyncio-stream.rst:153 +#: library/asyncio-stream.rst:160 msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`" @@ -200,21 +208,28 @@ 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 +#: library/asyncio-stream.rst:177 msgid "Start a Unix socket server." msgstr "Démarre un connecteur Unix en mode serveur." -#: library/asyncio-stream.rst:171 +#: library/asyncio-stream.rst:179 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 +#: library/asyncio-stream.rst:181 +msgid "" +"If *cleanup_socket* is true then the Unix socket will automatically be " +"removed from the filesystem when the server is closed, unless the socket has " +"been replaced after the server has been created." +msgstr "" + +#: library/asyncio-stream.rst:185 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "Voir aussi la documentation de :meth:`loop.create_unix_server`." # suit un : -#: library/asyncio-stream.rst:183 +#: library/asyncio-stream.rst:195 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :term:`path-like object`." @@ -223,37 +238,43 @@ msgstr "" "paramètre *chemin* peut désormais être un :term:`simili-chemin`." -#: library/asyncio-stream.rst:195 +# suit un : +#: library/asyncio-stream.rst:205 +#, fuzzy +msgid "Added the *cleanup_socket* parameter." +msgstr "ajout du paramètre *ssl_handshake_timeout*." + +#: library/asyncio-stream.rst:210 msgid "StreamReader" msgstr "Flux lecteurs (*StreamReader*)" -#: library/asyncio-stream.rst:199 +#: library/asyncio-stream.rst:214 msgid "" "Represents a reader object that provides APIs to read data from the IO " -"stream. As an :term:`asynchronous iterable`, the object supports the :" -"keyword:`async for` statement." +"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 +#: library/asyncio-stream.rst:218 msgid "" -"It is not recommended to instantiate *StreamReader* objects directly; use :" -"func:`open_connection` and :func:`start_server` instead." +"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 +#: library/asyncio-stream.rst:224 msgid "Acknowledge the EOF." msgstr "" -#: library/asyncio-stream.rst:213 +#: library/asyncio-stream.rst:229 msgid "Read up to *n* bytes from the stream." msgstr "Lit jusqu'à *n* octets du flux." -#: library/asyncio-stream.rst:215 +#: library/asyncio-stream.rst:231 msgid "" "If *n* is not provided or set to ``-1``, read until EOF, then return all " "read :class:`bytes`. If EOF was received and the internal buffer is empty, " @@ -263,11 +284,11 @@ msgstr "" "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:220 +#: library/asyncio-stream.rst:236 msgid "If *n* is ``0``, return an empty ``bytes`` object immediately." msgstr "Si *n* vaut ``0``, renvoie immédiatement un objet ``bytes`` vide." -#: library/asyncio-stream.rst:222 +#: library/asyncio-stream.rst:238 msgid "" "If *n* is positive, return at most *n* available ``bytes`` as soon as at " "least 1 byte is available in the internal buffer. If EOF is received before " @@ -277,14 +298,14 @@ msgstr "" "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:229 +#: library/asyncio-stream.rst:246 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:232 +#: library/asyncio-stream.rst:249 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." @@ -292,7 +313,7 @@ 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:235 +#: library/asyncio-stream.rst:252 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." @@ -300,25 +321,26 @@ msgstr "" "Si *EOF* est reçu et que le tampon interne est vide, renvoie un objet " "``bytes`` vide." -#: library/asyncio-stream.rst:240 +#: library/asyncio-stream.rst:258 msgid "Read exactly *n* bytes." msgstr "Lit exactement *n* octets." -#: library/asyncio-stream.rst:242 +#: library/asyncio-stream.rst:260 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "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." +"octets ne puissent être lus. Utilisez " +"l'attribut :attr:`IncompleteReadError.partial` pour obtenir les données " +"partiellement lues." -#: library/asyncio-stream.rst:248 +#: library/asyncio-stream.rst:267 msgid "Read data from the stream until *separator* is found." msgstr "Lit les données du flux jusqu'à ce que le *separator* soit trouvé." -#: library/asyncio-stream.rst:250 +#: library/asyncio-stream.rst:269 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." @@ -326,21 +348,21 @@ 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:254 +#: library/asyncio-stream.rst:273 msgid "" -"If the amount of data read exceeds the configured stream limit, a :exc:" -"`LimitOverrunError` exception is raised, and the data is left in the " +"If the amount of data read exceeds the configured stream limit, " +"a :exc:`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:258 +#: library/asyncio-stream.rst:277 msgid "" -"If EOF is reached before the complete separator is found, an :exc:" -"`IncompleteReadError` exception is raised, and the internal buffer is " -"reset. The :attr:`IncompleteReadError.partial` attribute may contain a " +"If EOF is reached before the complete separator is found, " +"an :exc:`IncompleteReadError` exception is raised, and the internal buffer " +"is 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 " @@ -348,7 +370,7 @@ msgstr "" "réinitialisé. L'attribut :attr:`IncompleteReadError.partial` peut contenir " "une partie du séparateur." -#: library/asyncio-stream.rst:263 +#: library/asyncio-stream.rst:282 msgid "" "The *separator* may also be a tuple of separators. In this case the return " "value will be the shortest possible that has any separator as the suffix. " @@ -356,35 +378,35 @@ msgid "" "separator is considered to be the one that matched." msgstr "" -#: library/asyncio-stream.rst:273 +#: library/asyncio-stream.rst:292 msgid "The *separator* parameter may now be a :class:`tuple` of separators." msgstr "" -#: library/asyncio-stream.rst:278 +#: library/asyncio-stream.rst:297 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:283 +#: library/asyncio-stream.rst:302 msgid "StreamWriter" msgstr "Flux écrivains (*StreamWriter*)" -#: library/asyncio-stream.rst:287 +#: library/asyncio-stream.rst:306 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:290 +#: library/asyncio-stream.rst:309 msgid "" -"It is not recommended to instantiate *StreamWriter* objects directly; use :" -"func:`open_connection` and :func:`start_server` instead." +"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:296 +#: library/asyncio-stream.rst:315 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " @@ -394,11 +416,17 @@ msgstr "" "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:312 +#: library/asyncio-stream.rst:319 +msgid "" +"The *data* buffer should be a bytes, bytearray, or C-contiguous one-" +"dimensional memoryview object." +msgstr "" + +#: library/asyncio-stream.rst:335 msgid "The method should be used along with the ``drain()`` method::" msgstr "La méthode doit être utilisée avec la méthode ``drain()`` ::" -#: library/asyncio-stream.rst:307 +#: library/asyncio-stream.rst:330 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " @@ -409,11 +437,11 @@ msgstr "" "d'attente dans un tampon d'écriture interne jusqu'à ce qu'elles puissent " "être envoyées." -#: library/asyncio-stream.rst:319 +#: library/asyncio-stream.rst:342 msgid "The method closes the stream and the underlying socket." msgstr "La méthode ferme le flux et le connecteur sous-jacent." -#: library/asyncio-stream.rst:321 +#: library/asyncio-stream.rst:344 msgid "" "The method should be used, though not mandatory, along with the " "``wait_closed()`` method::" @@ -421,46 +449,46 @@ 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:329 +#: library/asyncio-stream.rst:352 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." +"Renvoie ``True`` si le transport sous-jacent gère la " +"méthode :meth:`write_eof`, ``False`` sinon." -#: library/asyncio-stream.rst:334 +#: library/asyncio-stream.rst:357 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:339 +#: library/asyncio-stream.rst:362 msgid "Return the underlying asyncio transport." msgstr "Renvoie le transport asynchrone sous-jacent." -#: library/asyncio-stream.rst:343 +#: library/asyncio-stream.rst:366 msgid "" -"Access optional transport information; see :meth:`BaseTransport." -"get_extra_info` for details." +"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." +"Donne accès aux informations de transport facultatives ; " +"voir :meth:`BaseTransport.get_extra_info` pour plus de détails." -#: library/asyncio-stream.rst:348 +#: library/asyncio-stream.rst:372 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:354 +#: library/asyncio-stream.rst:378 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " "blocks until the size of the buffer is drained down to the low watermark and " -"writing can be resumed. When there is nothing to wait for, the :meth:" -"`drain` returns immediately." +"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 " @@ -468,19 +496,19 @@ msgstr "" "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:364 +#: library/asyncio-stream.rst:389 msgid "Upgrade an existing stream-based connection to TLS." msgstr "Bascule la connexion basée sur le flux existant vers TLS." -#: library/asyncio-stream.rst:366 +#: library/asyncio-stream.rst:391 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-stream.rst:368 +#: library/asyncio-stream.rst:393 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "*sslcontext* : une instance configurée de :class:`~ssl.SSLContext`." -#: library/asyncio-stream.rst:370 +#: library/asyncio-stream.rst:395 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." @@ -488,7 +516,7 @@ msgstr "" "*server_hostname* : définit ou remplace le nom d'hôte auquel le certificat " "du serveur cible sera comparé." -#: library/asyncio-stream.rst:373 +#: library/asyncio-stream.rst:398 msgid "" "*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " "to complete before aborting the connection. ``60.0`` seconds if ``None`` " @@ -498,7 +526,7 @@ msgstr "" "poignée de main TLS se termine avant d'abandonner la connexion. ``60.0`` " "secondes si ``None`` (par défaut)." -#: library/asyncio-stream.rst:377 +#: library/asyncio-stream.rst:402 #, fuzzy msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " @@ -509,16 +537,16 @@ msgstr "" "poignée de main TLS se termine avant d'abandonner la connexion. ``60.0`` " "secondes si ``None`` (par défaut)." -#: library/asyncio-stream.rst:389 +#: library/asyncio-stream.rst:414 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "Renvoie ``True`` si le flux est fermé ou en cours de fermeture." -#: library/asyncio-stream.rst:396 +#: library/asyncio-stream.rst:422 msgid "Wait until the stream is closed." msgstr "Attend que le flux soit fermé." -#: library/asyncio-stream.rst:398 +#: library/asyncio-stream.rst:424 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed, ensuring that all data has been flushed before e.g. exiting the " @@ -528,78 +556,78 @@ msgstr "" "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:406 +#: library/asyncio-stream.rst:432 msgid "Examples" msgstr "Exemples" -#: library/asyncio-stream.rst:411 +#: library/asyncio-stream.rst:437 msgid "TCP echo client using streams" msgstr "Client d'écho TCP utilisant des flux" -#: library/asyncio-stream.rst:413 +#: library/asyncio-stream.rst:439 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:437 +#: library/asyncio-stream.rst:463 msgid "" "The :ref:`TCP echo client protocol " -"` example uses the low-level :meth:" -"`loop.create_connection` method." +"` 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:444 +#: library/asyncio-stream.rst:470 msgid "TCP echo server using streams" msgstr "Serveur d'écho TCP utilisant des flux" -#: library/asyncio-stream.rst:446 +#: library/asyncio-stream.rst:472 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:480 +#: library/asyncio-stream.rst:506 msgid "" "The :ref:`TCP echo server protocol " -"` example uses the :meth:`loop." -"create_server` method." +"` 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:485 +#: library/asyncio-stream.rst:511 msgid "Get HTTP headers" msgstr "Récupération des en-têtes HTTP" -#: library/asyncio-stream.rst:487 +#: library/asyncio-stream.rst:513 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:526 +#: library/asyncio-stream.rst:552 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-stream.rst:530 +#: library/asyncio-stream.rst:556 msgid "or with HTTPS::" msgstr "ou avec HTTPS ::" -#: library/asyncio-stream.rst:538 +#: library/asyncio-stream.rst:564 msgid "Register an open socket to wait for data using streams" msgstr "Ouverture d'un connecteur pour attendre les données à l'aide de flux" -#: library/asyncio-stream.rst:540 +#: library/asyncio-stream.rst:566 msgid "" -"Coroutine waiting until a socket receives data using the :func:" -"`open_connection` function::" +"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:575 +#: library/asyncio-stream.rst:601 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " @@ -608,14 +636,14 @@ 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:579 +#: library/asyncio-stream.rst:605 msgid "" "The :ref:`watch a file descriptor for read events " -"` example uses the low-level :meth:`loop." -"add_reader` method to watch a file descriptor." +"` 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." +"L'exemple :ref:`asyncio_example_watch_fd` utilise la méthode de bas " +"niveau :meth:`loop.add_reader` pour surveiller un descripteur de fichier." #~ msgid ":ref:`Availability `: Unix." #~ msgstr ":ref:`Disponibilité ` : Unix." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index e10c1f915..8e3ede063 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-06-17 10:31+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -68,50 +68,57 @@ msgstr "Voir également la section `Exemples`_." msgid "Creating Subprocesses" msgstr "Créer des sous-processus" -#: library/asyncio-subprocess.rst:67 +#: library/asyncio-subprocess.rst:68 msgid "Create a subprocess." msgstr "Crée un sous-processus." -#: library/asyncio-subprocess.rst:69 library/asyncio-subprocess.rst:87 +#: library/asyncio-subprocess.rst:70 library/asyncio-subprocess.rst:92 #, fuzzy msgid "" "The *limit* argument sets the buffer limit for :class:`StreamReader` " -"wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :const:" -"`subprocess.PIPE` is passed to *stdout* and *stderr* arguments)." +"wrappers for :attr:`~asyncio.subprocess.Process.stdout` " +"and :attr:`~asyncio.subprocess.Process.stderr` (if :const:`subprocess.PIPE` " +"is passed to *stdout* and *stderr* arguments)." msgstr "" "Le paramètre *limit* définit la taille maximale du tampon pour les instances " -"de :class:`StreamReader` encapsulant :attr:`Process.stdout` et :attr:" -"`Process.stderr` (Si :attr:`subprocess.PIPE` est passé aux paramètres " -"*stdout* et *stderr*)." +"de :class:`StreamReader` encapsulant :attr:`Process.stdout` " +"et :attr:`Process.stderr` (Si :attr:`subprocess.PIPE` est passé aux " +"paramètres *stdout* et *stderr*)." -#: library/asyncio-subprocess.rst:73 library/asyncio-subprocess.rst:91 +#: library/asyncio-subprocess.rst:74 library/asyncio-subprocess.rst:96 msgid "Return a :class:`~asyncio.subprocess.Process` instance." msgstr "Renvoie une instance de :class:`~asyncio.subprocess.Process`." -#: library/asyncio-subprocess.rst:75 +#: library/asyncio-subprocess.rst:76 msgid "" "See the documentation of :meth:`loop.subprocess_exec` for other parameters." msgstr "" "Voir la documentation de :meth:`loop.subprocess_exec` pour d'autres " "paramètres." +#: library/asyncio-subprocess.rst:79 library/asyncio-subprocess.rst:101 +msgid "" +"If the process object is garbage collected while the process is still " +"running, the child process will be killed." +msgstr "" + # suit un : -#: library/asyncio-subprocess.rst:78 library/asyncio-subprocess.rst:105 +#: library/asyncio-subprocess.rst:82 library/asyncio-subprocess.rst:113 msgid "Removed the *loop* parameter." msgstr "suppression du paramètre *loop*." -#: library/asyncio-subprocess.rst:85 +#: library/asyncio-subprocess.rst:90 msgid "Run the *cmd* shell command." msgstr "Exécute la commande *cmd* dans un *shell*." -#: library/asyncio-subprocess.rst:93 +#: library/asyncio-subprocess.rst:98 msgid "" "See the documentation of :meth:`loop.subprocess_shell` for other parameters." msgstr "" "Voir la documentation de :meth:`loop.subprocess_shell` pour d'autres " "paramètres." -#: library/asyncio-subprocess.rst:98 +#: library/asyncio-subprocess.rst:106 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -122,68 +129,69 @@ msgid "" msgstr "" "Il est de la responsabilité de l'application de s'assurer que tous les " "espaces et les caractères spéciaux sont correctement mis entre guillemets " -"pour éviter les vulnérabilités de type `injection de code `_. La fonction :func:" -"`shlex.quote` peut être utilisée pour l’échappement des espaces et " -"caractères spéciaux dans les chaînes utilisées pour construire des commandes " -"shell." +"pour éviter les vulnérabilités de type `injection de code `_. La " +"fonction :func:`shlex.quote` peut être utilisée pour l’échappement des " +"espaces et caractères spéciaux dans les chaînes utilisées pour construire " +"des commandes shell." # suit un : -#: library/asyncio-subprocess.rst:110 +#: library/asyncio-subprocess.rst:118 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:" -"`ProactorEventLoop` est utilisé. Voir :ref:`Support des sous-processus sous " -"Windows ` pour plus de précisions." +"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 +#: library/asyncio-subprocess.rst:124 msgid "" -"asyncio also has the following *low-level* APIs to work with subprocesses: :" -"meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop." -"connect_read_pipe`, :meth:`loop.connect_write_pipe`, as well as the :ref:" -"`Subprocess Transports ` and :ref:`Subprocess " -"Protocols `." +"asyncio also has the following *low-level* APIs to work with " +"subprocesses: :meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop.connect_read_pipe`, :meth:`loop.connect_write_pipe`, " +"as well as the :ref:`Subprocess Transports ` " +"and :ref:`Subprocess Protocols `." msgstr "" "*asyncio* propose aussi les API de « bas niveau » suivantes pour travailler " -"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`." +"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 +#: library/asyncio-subprocess.rst:132 msgid "Constants" msgstr "Constantes" -#: library/asyncio-subprocess.rst:129 +#: library/asyncio-subprocess.rst:137 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." msgstr "Peut être passé aux paramètres *stdin*, *stdout* ou *stderr*." -#: library/asyncio-subprocess.rst:131 +#: library/asyncio-subprocess.rst:139 +#, fuzzy msgid "" -"If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin ` attribute will point to a :class:`StreamWriter` " -"instance." +"If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin " +"` attribute will point to " +"a :class:`~asyncio.StreamWriter` instance." msgstr "" "Si *PIPE* est passé au paramètre *stdin*, l'attribut :attr:`Process.stdin " -"` ne pointera pas vers une instance de :" -"class:`StreamWriter`." +"` ne pointera pas vers une instance " +"de :class:`StreamWriter`." -#: library/asyncio-subprocess.rst:135 +#: library/asyncio-subprocess.rst:143 +#, fuzzy msgid "" -"If *PIPE* is passed to *stdout* or *stderr* arguments, the :attr:`Process." -"stdout ` and :attr:`Process.stderr " -"` attributes will point to :class:" -"`StreamReader` instances." +"If *PIPE* is passed to *stdout* or *stderr* arguments, " +"the :attr:`Process.stdout ` " +"and :attr:`Process.stderr ` attributes " +"will point to :class:`~asyncio.StreamReader` instances." msgstr "" -"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`." +"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`." -#: library/asyncio-subprocess.rst:143 +#: library/asyncio-subprocess.rst:151 msgid "" "Special value that can be used as the *stderr* argument and indicates that " "standard error should be redirected into standard output." @@ -191,67 +199,70 @@ msgstr "" "Une valeur spéciale qui peut être passée au paramètre *stderr* et qui " "indique que la sortie d'erreur doit être redirigée vers la sortie standard." -#: library/asyncio-subprocess.rst:149 +#: library/asyncio-subprocess.rst:157 msgid "" "Special value that can be used as the *stdin*, *stdout* or *stderr* argument " -"to process creation functions. It indicates that the special file :data:`os." -"devnull` will be used for the corresponding subprocess stream." +"to process creation functions. It indicates that the special " +"file :data:`os.devnull` will be used for the corresponding subprocess stream." msgstr "" "Une valeur spéciale qui peut être passée à l'argument *stdin*, *stdout* ou " "*stderr* des fonctions créant des processus. Elle implique l'utilisation du " "fichier :data:`os.devnull` pour le flux correspondant du processus." -#: library/asyncio-subprocess.rst:155 +#: library/asyncio-subprocess.rst:163 msgid "Interacting with Subprocesses" msgstr "Interagir avec les sous-processus" -#: library/asyncio-subprocess.rst:157 +#: library/asyncio-subprocess.rst:165 msgid "" "Both :func:`create_subprocess_exec` and :func:`create_subprocess_shell` " "functions return instances of the *Process* class. *Process* is a high-" "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." +"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 +#: library/asyncio-subprocess.rst:173 +#, fuzzy msgid "" -"An object that wraps OS processes created by the :func:" -"`create_subprocess_exec` and :func:`create_subprocess_shell` functions." +"An object that wraps OS processes created by " +"the :func:`~asyncio.create_subprocess_exec` " +"and :func:`~asyncio.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 +#: library/asyncio-subprocess.rst:177 msgid "" -"This class is designed to have a similar API to the :class:`subprocess." -"Popen` class, but there are some notable differences:" +"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 :" +"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 +#: library/asyncio-subprocess.rst:181 msgid "" -"unlike Popen, Process instances do not have an equivalent to the :meth:" -"`~subprocess.Popen.poll` method;" +"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 +#: library/asyncio-subprocess.rst:184 msgid "" -"the :meth:`~asyncio.subprocess.Process.communicate` and :meth:`~asyncio." -"subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" -"func:`~asyncio.wait_for` function;" +"the :meth:`~asyncio.subprocess.Process.communicate` " +"and :meth:`~asyncio.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` ;" +"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 +#: library/asyncio-subprocess.rst:188 msgid "" "the :meth:`Process.wait() ` method is " "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " @@ -261,17 +272,17 @@ msgstr "" "méthode :meth:`subprocess.Popen.wait` est implémentée comme une boucle " "bloquante ;" -#: library/asyncio-subprocess.rst:184 +#: library/asyncio-subprocess.rst:192 msgid "the *universal_newlines* parameter is not supported." msgstr "le paramètre *universal_newlines* n'est pas pris en charge." -#: library/asyncio-subprocess.rst:186 +#: library/asyncio-subprocess.rst:194 msgid "This class is :ref:`not thread safe `." msgstr "" "Cette classe n'est :ref:`pas conçue pour un contexte multi-fils `." -#: library/asyncio-subprocess.rst:188 +#: library/asyncio-subprocess.rst:196 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -279,16 +290,16 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-subprocess.rst:193 +#: library/asyncio-subprocess.rst:202 msgid "Wait for the child process to terminate." msgstr "Attend que le sous processus s'arrête." -#: library/asyncio-subprocess.rst:195 +#: library/asyncio-subprocess.rst:204 msgid "Set and return the :attr:`returncode` attribute." msgstr "Définit et renvoie l'attribut :attr:`returncode`." # suit un : -#: library/asyncio-subprocess.rst:199 +#: library/asyncio-subprocess.rst:208 msgid "" "This method can deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and " "the child process generates so much output that it blocks waiting for the OS " @@ -301,29 +312,29 @@ msgstr "" "accepte des données supplémentaires. Pour éviter cette situation, choisissez " "la méthode :meth:`communicate` quand vous utilisez des tubes." -#: library/asyncio-subprocess.rst:207 +#: library/asyncio-subprocess.rst:217 msgid "Interact with process:" msgstr "Interagit avec le processus :" -#: library/asyncio-subprocess.rst:209 +#: library/asyncio-subprocess.rst:219 msgid "send data to *stdin* (if *input* is not ``None``);" msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``) ;" -#: library/asyncio-subprocess.rst:210 +#: library/asyncio-subprocess.rst:220 msgid "closes *stdin*;" msgstr "" -#: library/asyncio-subprocess.rst:211 +#: library/asyncio-subprocess.rst:221 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 ;" -#: library/asyncio-subprocess.rst:212 +#: library/asyncio-subprocess.rst:222 msgid "wait for process to terminate." msgstr "attend que le processus s'arrête." -#: library/asyncio-subprocess.rst:214 +#: library/asyncio-subprocess.rst:224 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." @@ -331,23 +342,24 @@ msgstr "" "Le paramètre optionnel *input* (objet de type :class:`bytes`) représente les " "données transmises au sous-processus." -#: library/asyncio-subprocess.rst:217 +#: library/asyncio-subprocess.rst:227 msgid "Return a tuple ``(stdout_data, stderr_data)``." msgstr "Renvoie un *n*-uplet ``(stdout_data, stderr_data)``." -#: library/asyncio-subprocess.rst:219 +#: library/asyncio-subprocess.rst:229 msgid "" "If either :exc:`BrokenPipeError` or :exc:`ConnectionResetError` exception is " "raised when writing *input* into *stdin*, the exception is ignored. This " "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*." +"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:224 +#: library/asyncio-subprocess.rst:234 msgid "" "If it is desired to send data to the process' *stdin*, the process needs to " "be created with ``stdin=PIPE``. Similarly, to get anything other than " @@ -359,7 +371,7 @@ msgstr "" "``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:230 +#: library/asyncio-subprocess.rst:240 msgid "" "Note, that the data read is buffered in memory, so do not use this method if " "the data size is large or unlimited." @@ -367,16 +379,16 @@ msgstr "" "Notez que les données lues sont mises en cache en mémoire, donc n'utilisez " "pas cette méthode si la taille des données est importante voire illimitée." -#: library/asyncio-subprocess.rst:235 -msgid "*stdin* gets closed when `input=None` too." +#: library/asyncio-subprocess.rst:245 +msgid "*stdin* gets closed when ``input=None`` too." msgstr "" -#: library/asyncio-subprocess.rst:239 +#: library/asyncio-subprocess.rst:249 msgid "Sends the signal *signal* to the child process." msgstr "Envoie le signal *signal* au sous-processus." # suit un : -#: library/asyncio-subprocess.rst:243 +#: library/asyncio-subprocess.rst:253 #, fuzzy msgid "" "On Windows, :py:const:`~signal.SIGTERM` is an alias for :meth:`terminate`. " @@ -388,11 +400,11 @@ msgstr "" "démarrés avec un paramètre *creationflags* incluant " "``CREATE_NEW_PROCESS_GROUP``." -#: library/asyncio-subprocess.rst:250 +#: library/asyncio-subprocess.rst:260 msgid "Stop the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:252 +#: library/asyncio-subprocess.rst:262 #, fuzzy msgid "" "On POSIX systems this method sends :py:const:`~signal.SIGTERM` to the child " @@ -401,7 +413,7 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:255 +#: library/asyncio-subprocess.rst:265 #, fuzzy msgid "" "On Windows the Win32 API function :c:func:`!TerminateProcess` is called to " @@ -410,93 +422,112 @@ msgstr "" "Sous Windows, la fonction API Win32 :c:func:`TerminateProcess` est appelée " "pour arrêter le processus enfant." -#: library/asyncio-subprocess.rst:260 +#: library/asyncio-subprocess.rst:270 msgid "Kill the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:262 +#: library/asyncio-subprocess.rst:272 +#, fuzzy msgid "" -"On POSIX systems this method sends :py:data:`SIGKILL` to the child process." +"On POSIX systems this method sends :py:data:`~signal.SIGKILL` to the child " +"process." msgstr "" "Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:265 +#: library/asyncio-subprocess.rst:275 msgid "On Windows this method is an alias for :meth:`terminate`." msgstr "Sous Windows, cette méthode est un alias pour :meth:`terminate`." -#: library/asyncio-subprocess.rst:269 +#: library/asyncio-subprocess.rst:279 +#, fuzzy msgid "" -"Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " -"created with ``stdin=None``." +"Standard input stream (:class:`~asyncio.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:274 +#: library/asyncio-subprocess.rst:284 +#, fuzzy msgid "" -"Standard output stream (:class:`StreamReader`) or ``None`` if the process " -"was created with ``stdout=None``." +"Standard output stream (:class:`~asyncio.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:279 +#: library/asyncio-subprocess.rst:289 +#, fuzzy msgid "" -"Standard error stream (:class:`StreamReader`) or ``None`` if the process was " -"created with ``stderr=None``." +"Standard error stream (:class:`~asyncio.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:284 +#: library/asyncio-subprocess.rst:294 msgid "" "Use the :meth:`communicate` method rather than :attr:`process.stdin.write() " "`, :attr:`await process.stdout.read() ` or :attr:`await " "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." +"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:293 +#: library/asyncio-subprocess.rst:303 msgid "Process identification number (PID)." msgstr "" "Numéro d'identification du processus (PID, pour *Process Identification " "Number* en anglais)." -#: library/asyncio-subprocess.rst:295 +#: library/asyncio-subprocess.rst:305 +#, fuzzy msgid "" -"Note that for processes created by the :func:`create_subprocess_shell` " -"function, this attribute is the PID of the spawned shell." +"Note that for processes created by " +"the :func:`~asyncio.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é." +"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:300 +#: library/asyncio-subprocess.rst:310 msgid "Return code of the process when it exits." msgstr "Code de retour du processus quand il se termine." -#: library/asyncio-subprocess.rst:302 +#: library/asyncio-subprocess.rst:312 msgid "A ``None`` value indicates that the process has not terminated yet." msgstr "Une valeur ``None`` indique que le processus n'est pas encore terminé." -#: library/asyncio-subprocess.rst:304 +#: library/asyncio-subprocess.rst:314 +#, fuzzy msgid "" -"A negative value ``-N`` indicates that the child was terminated by signal " +"For processes created with :func:`~asyncio.create_subprocess_exec`, a " +"negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." msgstr "" "Une valeur négative ``-N`` indique que le sous-processus a été terminé par " "le signal ``N`` (seulement sur les systèmes *POSIX*)." -#: library/asyncio-subprocess.rst:311 +#: library/asyncio-subprocess.rst:318 +msgid "" +"For processes created with :func:`~asyncio.create_subprocess_shell`, the " +"return code reflects the exit status of the shell itself (e.g. ``/bin/sh``), " +"which may map signals to codes such as ``128+N``. See the documentation of " +"the shell (for example, the Bash manual's Exit Status) for details." +msgstr "" + +#: library/asyncio-subprocess.rst:329 msgid "Subprocess and Threads" msgstr "Sous-processus et fils d'exécution" -#: library/asyncio-subprocess.rst:313 +#: library/asyncio-subprocess.rst:331 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." @@ -504,7 +535,7 @@ 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:316 +#: library/asyncio-subprocess.rst:334 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." @@ -513,32 +544,7 @@ msgstr "" "uniquement (par défaut), :class:`SelectorEventLoop` ne prend pas en charge " "les sous-processus." -#: library/asyncio-subprocess.rst:319 -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:325 -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:328 -msgid "" -"Spawning a subprocess with *inactive* current child watcher raises :exc:" -"`RuntimeError`." -msgstr "" -"Instancier un sous-processus avec un observateur enfant actuel *inactif* " -"lève l'exception :exc:`RuntimeError`." - -#: library/asyncio-subprocess.rst:331 +#: library/asyncio-subprocess.rst:337 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." @@ -548,7 +554,7 @@ msgstr "" "documentation." # suit un : -#: library/asyncio-subprocess.rst:336 +#: library/asyncio-subprocess.rst:342 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." @@ -556,11 +562,11 @@ msgstr "" "la section :ref:`Exécution concurrente et multi-fils d'exécution `." -#: library/asyncio-subprocess.rst:341 +#: library/asyncio-subprocess.rst:347 msgid "Examples" msgstr "Exemples" -#: library/asyncio-subprocess.rst:343 +#: library/asyncio-subprocess.rst:349 msgid "" "An example using the :class:`~asyncio.subprocess.Process` class to control a " "subprocess and the :class:`StreamReader` class to read from its standard " @@ -570,16 +576,39 @@ msgstr "" "contrôler un sous-processus et la classe :class:`StreamReader` pour lire sa " "sortie standard." -#: library/asyncio-subprocess.rst:349 +#: library/asyncio-subprocess.rst:355 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" "Le sous-processus est créé par la fonction :func:`create_subprocess_exec` ::" -#: library/asyncio-subprocess.rst:376 +#: library/asyncio-subprocess.rst:382 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." msgstr "" "Voir également :ref:`le même exemple `, " "écrit en utilisant des API de bas niveau." + +#~ 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." + +#~ 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." + +#~ msgid "" +#~ "Spawning a subprocess with *inactive* current child watcher " +#~ "raises :exc:`RuntimeError`." +#~ msgstr "" +#~ "Instancier un sous-processus avec un observateur enfant actuel *inactif* " +#~ "lève l'exception :exc:`RuntimeError`." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 1d54814c1..da7d440ae 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-06-11 16:49+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -104,21 +104,21 @@ msgstr "" "La meilleure façon d'utiliser un verrou est une instruction :keyword:`async " "with` ::" -#: library/asyncio-sync.rst:199 library/asyncio-sync.rst:304 +#: library/asyncio-sync.rst:201 library/asyncio-sync.rst:309 msgid "which is equivalent to::" msgstr "ce qui équivaut à ::" # suit un : -#: library/asyncio-sync.rst:112 library/asyncio-sync.rst:292 -#: library/asyncio-sync.rst:347 +#: library/asyncio-sync.rst:113 library/asyncio-sync.rst:297 +#: library/asyncio-sync.rst:353 msgid "Removed the *loop* parameter." msgstr "suppression du paramètre *loop*." -#: library/asyncio-sync.rst:72 +#: library/asyncio-sync.rst:73 msgid "Acquire the lock." msgstr "Verrouille (ou acquiert) le verrou." -#: library/asyncio-sync.rst:74 +#: library/asyncio-sync.rst:75 msgid "" "This method waits until the lock is *unlocked*, sets it to *locked* and " "returns ``True``." @@ -126,7 +126,7 @@ 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 +#: library/asyncio-sync.rst:78 msgid "" "When more than one coroutine is blocked in :meth:`acquire` waiting for the " "lock to be unlocked, only one coroutine eventually proceeds." @@ -134,7 +134,7 @@ 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 +#: library/asyncio-sync.rst:82 msgid "" "Acquiring a lock is *fair*: the coroutine that proceeds will be the first " "coroutine that started waiting on the lock." @@ -142,33 +142,33 @@ 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 +#: library/asyncio-sync.rst:87 msgid "Release the lock." msgstr "Libère le verrou." -#: library/asyncio-sync.rst:88 +#: library/asyncio-sync.rst:89 msgid "When the lock is *locked*, reset it to *unlocked* and return." msgstr "Lorsque le verrou est verrouillé, le déverrouille et termine." -#: library/asyncio-sync.rst:90 +#: library/asyncio-sync.rst:91 msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." msgstr "Si le verrou est déjà déverrouillé, une :exc:`RuntimeError` est levée." -#: library/asyncio-sync.rst:94 +#: library/asyncio-sync.rst:95 msgid "Return ``True`` if the lock is *locked*." msgstr "Renvoie ``True`` si le verrou est verrouillé." -#: library/asyncio-sync.rst:98 +#: library/asyncio-sync.rst:99 msgid "Event" msgstr "Événement (*Event*)" -#: library/asyncio-sync.rst:102 +#: library/asyncio-sync.rst:103 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 +#: library/asyncio-sync.rst:105 msgid "" "An asyncio event can be used to notify multiple asyncio tasks that some " "event has happened." @@ -176,10 +176,10 @@ 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 +#: library/asyncio-sync.rst:108 msgid "" -"An Event object manages an internal flag that can be set to *true* with the :" -"meth:`~Event.set` method and reset to *false* with the :meth:`clear` " +"An Event object manages an internal flag that can be set to *true* with " +"the :meth:`~Event.set` method and reset to *false* with the :meth:`clear` " "method. The :meth:`~Event.wait` method blocks until the flag is set to " "*true*. The flag is set to *false* initially." msgstr "" @@ -189,15 +189,15 @@ msgstr "" "jusqu'à ce que l'indicateur soit activé. L'indicateur est initialement " "désactivé." -#: library/asyncio-sync.rst:371 +#: library/asyncio-sync.rst:377 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-sync.rst:142 +#: library/asyncio-sync.rst:144 msgid "Wait until the event is set." msgstr "Attend que l'évènement soit activé." -#: library/asyncio-sync.rst:144 +#: library/asyncio-sync.rst:146 msgid "" "If the event is set, return ``True`` immediately. Otherwise block until " "another task calls :meth:`~Event.set`." @@ -205,42 +205,43 @@ 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 +#: library/asyncio-sync.rst:151 msgid "Set the event." msgstr "Active l'événement." -#: library/asyncio-sync.rst:151 +#: library/asyncio-sync.rst:153 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 +#: library/asyncio-sync.rst:158 msgid "Clear (unset) the event." msgstr "Efface (désactive) l'événement." -#: library/asyncio-sync.rst:158 +#: library/asyncio-sync.rst:160 +#, fuzzy msgid "" -"Tasks awaiting on :meth:`~Event.wait` will now block until the :meth:`~Event." -"set` method is called again." +"Subsequent 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 +#: library/asyncio-sync.rst:165 msgid "Return ``True`` if the event is set." msgstr "Renvoie ``True`` si l'évènement est actif." -#: library/asyncio-sync.rst:167 +#: library/asyncio-sync.rst:169 msgid "Condition" msgstr "Condition" -#: library/asyncio-sync.rst:171 +#: library/asyncio-sync.rst:173 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 +#: library/asyncio-sync.rst:175 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." @@ -249,21 +250,21 @@ msgstr "" "attendre qu'un événement se produise, puis obtenir un accès exclusif à une " "ressource partagée." -#: library/asyncio-sync.rst:177 +#: library/asyncio-sync.rst:179 msgid "" -"In essence, a Condition object combines the functionality of an :class:" -"`Event` and a :class:`Lock`. It is possible to have multiple Condition " -"objects share one Lock, which allows coordinating exclusive access to a " -"shared resource between different tasks interested in particular states of " -"that shared resource." +"In essence, a Condition object combines the functionality of " +"an :class:`Event` and a :class:`Lock`. It is possible to have multiple " +"Condition objects share one Lock, which allows coordinating exclusive access " +"to a 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." +"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 +#: library/asyncio-sync.rst:185 msgid "" "The optional *lock* argument must be a :class:`Lock` object or ``None``. In " "the latter case a new Lock object is created automatically." @@ -271,18 +272,18 @@ 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 +#: library/asyncio-sync.rst:192 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` ::" +"La meilleure façon d'utiliser une *Condition* est une " +"instruction :keyword:`async with` ::" -#: library/asyncio-sync.rst:212 +#: library/asyncio-sync.rst:215 msgid "Acquire the underlying lock." msgstr "Verrouille le verrou sous-jacent." -#: library/asyncio-sync.rst:214 +#: library/asyncio-sync.rst:217 msgid "" "This method waits until the underlying lock is *unlocked*, sets it to " "*locked* and returns ``True``." @@ -290,7 +291,7 @@ msgstr "" "Cette méthode attend que le verrou sous-jacent soit déverrouillé, le " "verrouille et renvoie ``True``." -#: library/asyncio-sync.rst:219 +#: library/asyncio-sync.rst:222 #, fuzzy msgid "" "Wake up *n* tasks (1 by default) waiting on this condition. If fewer than " @@ -299,7 +300,7 @@ 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 +#: library/asyncio-sync.rst:240 msgid "" "The lock must be acquired before this method is called and released shortly " "after. If called with an *unlocked* lock a :exc:`RuntimeError` error is " @@ -309,43 +310,43 @@ msgstr "" "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 +#: library/asyncio-sync.rst:231 msgid "Return ``True`` if the underlying lock is acquired." msgstr "Renvoie ``True`` si le verrou sous-jacent est verrouillé." -#: library/asyncio-sync.rst:232 +#: library/asyncio-sync.rst:235 msgid "Wake up all tasks waiting on this condition." msgstr "Réveille toutes les tâches en attente sur cette condition." -#: library/asyncio-sync.rst:234 +#: library/asyncio-sync.rst:237 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 +#: library/asyncio-sync.rst:246 msgid "Release the underlying lock." msgstr "Libère le verrou sous-jacent." -#: library/asyncio-sync.rst:245 +#: library/asyncio-sync.rst:248 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 +#: library/asyncio-sync.rst:254 msgid "Wait until notified." msgstr "Attend d'être notifié." -#: library/asyncio-sync.rst:252 +#: library/asyncio-sync.rst:256 msgid "" -"If the calling task has not acquired the lock when this method is called, a :" -"exc:`RuntimeError` is raised." +"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 +#: library/asyncio-sync.rst:259 msgid "" "This method releases the underlying lock, and then blocks until it is " "awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the " @@ -356,72 +357,73 @@ msgstr "" "Une fois réveillée, la *Condition* verrouille à nouveau son verrou et cette " "méthode renvoie ``True``." -#: library/asyncio-sync.rst:260 +#: library/asyncio-sync.rst:264 msgid "" "Note that a task *may* return from this call spuriously, which is why the " -"caller should always re-check the state and be prepared to :meth:`wait` " -"again. For this reason, you may prefer to use :meth:`wait_for` instead." +"caller should always re-check the state and be prepared " +"to :meth:`~Condition.wait` again. For this reason, you may prefer to " +"use :meth:`~Condition.wait_for` instead." msgstr "" -#: library/asyncio-sync.rst:267 +#: library/asyncio-sync.rst:272 msgid "Wait until a predicate becomes *true*." msgstr "Attend jusqu'à ce qu'un prédicat devienne vrai." -#: library/asyncio-sync.rst:269 +#: library/asyncio-sync.rst:274 #, fuzzy msgid "" "The predicate must be a callable which result will be interpreted as a " -"boolean value. The method will repeatedly :meth:`wait` until the predicate " -"evaluates to *true*. The final value is the return value." +"boolean value. The method will repeatedly :meth:`~Condition.wait` until the " +"predicate evaluates to *true*. 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:276 +#: library/asyncio-sync.rst:281 msgid "Semaphore" msgstr "Sémaphore" -#: library/asyncio-sync.rst:280 +#: library/asyncio-sync.rst:285 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:282 +#: library/asyncio-sync.rst:287 msgid "" -"A semaphore manages an internal counter which is decremented by each :meth:" -"`acquire` call and incremented by each :meth:`release` call. The counter can " -"never go below zero; when :meth:`acquire` finds that it is zero, it blocks, " -"waiting until some task calls :meth:`release`." +"A semaphore manages an internal counter which is decremented by " +"each :meth:`acquire` call and incremented by each :meth:`release` call. The " +"counter can 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`." +"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:288 +#: library/asyncio-sync.rst:293 msgid "" "The optional *value* argument gives the initial value for the internal " -"counter (``1`` by default). If the given value is less than ``0`` a :exc:" -"`ValueError` is raised." +"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." +"(``1`` par défaut). Si la valeur donnée est inférieure à ``0`` " +"une :exc:`ValueError` est levée." -#: library/asyncio-sync.rst:295 +#: library/asyncio-sync.rst:300 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` ::" +"La meilleure façon d'utiliser un sémaphore est une " +"instruction :keyword:`async with` ::" -#: library/asyncio-sync.rst:317 +#: library/asyncio-sync.rst:323 msgid "Acquire a semaphore." msgstr "Acquiert un sémaphore." -#: library/asyncio-sync.rst:319 +#: library/asyncio-sync.rst:325 msgid "" "If the internal counter is greater than zero, decrement it by one and return " "``True`` immediately. If it is zero, wait until a :meth:`release` is called " @@ -431,12 +433,12 @@ msgstr "" "renvoie ``True`` immédiatement. Si c'est zéro, attend que :meth:`release` " "soit appelée et renvoie ``True``." -#: library/asyncio-sync.rst:325 +#: library/asyncio-sync.rst:331 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:329 +#: library/asyncio-sync.rst:335 msgid "" "Release a semaphore, incrementing the internal counter by one. Can wake up a " "task waiting to acquire the semaphore." @@ -444,7 +446,7 @@ 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:332 +#: library/asyncio-sync.rst:338 msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." @@ -452,43 +454,43 @@ msgstr "" "Contrairement à :class:`BoundedSemaphore`, :class:`Semaphore` permet de " "faire plus d'appels ``release()`` que d'appels ``acquire()``." -#: library/asyncio-sync.rst:337 +#: library/asyncio-sync.rst:343 msgid "BoundedSemaphore" msgstr "Sémaphore capé (*BoundedSemaphore*)" -#: library/asyncio-sync.rst:341 +#: library/asyncio-sync.rst:347 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:343 +#: library/asyncio-sync.rst:349 msgid "" -"Bounded Semaphore is a version of :class:`Semaphore` that raises a :exc:" -"`ValueError` in :meth:`~Semaphore.release` if it increases the internal " -"counter above the initial *value*." +"Bounded Semaphore is a version of :class:`Semaphore` that raises " +"a :exc:`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." +"*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:352 +#: library/asyncio-sync.rst:358 msgid "Barrier" msgstr "Barrière (*Barrier*)" -#: library/asyncio-sync.rst:356 +#: library/asyncio-sync.rst:362 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:358 +#: library/asyncio-sync.rst:364 msgid "" "A barrier is a simple synchronization primitive that allows to block until " -"*parties* number of tasks are waiting on it. Tasks can wait on the :meth:" -"`~Barrier.wait` method and would be blocked until the specified number of " -"tasks end up waiting on :meth:`~Barrier.wait`. At that point all of the " -"waiting tasks would unblock simultaneously." +"*parties* number of tasks are waiting on it. Tasks can wait on " +"the :meth:`~Barrier.wait` method and would be blocked until the specified " +"number of 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 " @@ -496,23 +498,23 @@ msgstr "" "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:364 +#: library/asyncio-sync.rst:370 msgid "" -":keyword:`async with` can be used as an alternative to awaiting on :meth:" -"`~Barrier.wait`." +":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`." +":keyword:`async with` peut être utilisé comme alternative à l'attente " +"sur :meth:`~Barrier.wait`." -#: library/asyncio-sync.rst:367 +#: library/asyncio-sync.rst:373 msgid "The barrier can be reused any number of times." msgstr "La barrière peut être réutilisée un nombre illimité de fois." -#: library/asyncio-sync.rst:394 +#: library/asyncio-sync.rst:400 msgid "Result of this example is::" msgstr "Le résultat de cet exemple est ::" -#: library/asyncio-sync.rst:405 +#: library/asyncio-sync.rst:412 msgid "" "Pass the barrier. When all the tasks party to the barrier have called this " "function, they are all unblocked simultaneously." @@ -520,7 +522,7 @@ 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:408 +#: library/asyncio-sync.rst:415 msgid "" "When a waiting or blocked task in the barrier is cancelled, this task exits " "the barrier which stays in the same state. If the state of the barrier is " @@ -530,7 +532,7 @@ msgstr "" "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:413 +#: library/asyncio-sync.rst:420 msgid "" "The return value is an integer in the range of 0 to ``parties-1``, different " "for each task. This can be used to select a task to do some special " @@ -540,17 +542,17 @@ msgstr "" "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:423 +#: library/asyncio-sync.rst:430 msgid "" "This method may raise a :class:`BrokenBarrierError` exception if the barrier " -"is broken or reset while a task is waiting. It could raise a :exc:" -"`CancelledError` if a task is cancelled." +"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:429 +#: library/asyncio-sync.rst:437 msgid "" "Return the barrier to the default, empty state. Any tasks waiting on it " "will receive the :class:`BrokenBarrierError` exception." @@ -558,7 +560,7 @@ 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:432 +#: library/asyncio-sync.rst:440 msgid "" "If a barrier is broken it may be better to just leave it and create a new " "one." @@ -566,45 +568,47 @@ 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:436 +#: library/asyncio-sync.rst:445 +#, fuzzy msgid "" "Put the barrier into a broken state. This causes any active or future calls " -"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." +"to :meth:`~Barrier.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:443 +#: library/asyncio-sync.rst:452 msgid "The number of tasks required to pass the barrier." msgstr "Le nombre de tâches nécessaires pour franchir la barrière." -#: library/asyncio-sync.rst:447 +#: library/asyncio-sync.rst:456 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:451 +#: library/asyncio-sync.rst:460 msgid "A boolean that is ``True`` if the barrier is in the broken state." msgstr "Booléen qui vaut ``True`` si la barrière est rompue." -#: library/asyncio-sync.rst:456 +#: library/asyncio-sync.rst:465 msgid "" -"This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:" -"`Barrier` object is reset or broken." +"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:464 +#: library/asyncio-sync.rst:473 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." +"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é " diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 03ed72071..0a3592f2f 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-06-29 21:14+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: library/asyncio-task.rst:6 -msgid "Coroutines and Tasks" +#, fuzzy +msgid "Coroutines and tasks" msgstr "Coroutines et tâches" #: library/asyncio-task.rst:8 @@ -107,11 +108,11 @@ msgstr "" #: library/asyncio-task.rst:110 msgid "" -"The :class:`asyncio.TaskGroup` class provides a more modern alternative to :" -"func:`create_task`. Using this API, the last example becomes::" +"The :class:`asyncio.TaskGroup` class provides a more modern alternative " +"to :func:`create_task`. Using this API, the last example becomes::" msgstr "" -"La classe :class:`asyncio.TaskGroup` fournit une alternative plus moderne à :" -"func:`create_task`. En utilisant cette API, le dernier exemple devient ::" +"La classe :class:`asyncio.TaskGroup` fournit une alternative plus moderne " +"à :func:`create_task`. En utilisant cette API, le dernier exemple devient ::" #: library/asyncio-task.rst:128 msgid "The timing and output should be the same as for the previous version." @@ -129,8 +130,8 @@ msgstr "*Attendables*" #: library/asyncio-task.rst:139 msgid "" -"We say that an object is an **awaitable** object if it can be used in an :" -"keyword:`await` expression. Many asyncio APIs are designed to accept " +"We say that an object is an **awaitable** object if it can be used in " +"an :keyword:`await` expression. Many asyncio APIs are designed to accept " "awaitables." msgstr "" "Un objet est dit *attendable* (*awaitable* en anglais, c.-à-d. qui peut être " @@ -183,8 +184,9 @@ msgstr "" #: library/asyncio-task.rst:183 msgid "" -"When a coroutine is wrapped into a *Task* with functions like :func:`asyncio." -"create_task` the coroutine is automatically scheduled to run soon::" +"When a coroutine is wrapped into a *Task* with functions " +"like :func:`asyncio.create_task` the coroutine is automatically scheduled to " +"run soon::" msgstr "" "Lorsqu'une coroutine est encapsulée dans une *tâche* à l'aide de fonctions " "comme :func:`asyncio.create_task`, la coroutine est automatiquement " @@ -236,14 +238,15 @@ msgstr "" #: library/asyncio-task.rst:230 msgid "" -"A good example of a low-level function that returns a Future object is :meth:" -"`loop.run_in_executor`." +"A good example of a low-level function that returns a Future object " +"is :meth:`loop.run_in_executor`." msgstr "" ":meth:`loop.run_in_executor` est l'exemple typique d'une fonction bas-niveau " "renvoyant un objet *Future*." #: library/asyncio-task.rst:235 -msgid "Creating Tasks" +#, fuzzy +msgid "Creating tasks" msgstr "Création de tâches" #: library/asyncio-task.rst:237 @@ -260,32 +263,40 @@ msgstr "" #: library/asyncio-task.rst:246 msgid "" -"If *name* is not ``None``, it is set as the name of the task using :meth:" -"`Task.set_name`." +"The full function signature is largely the same as that of the :class:`Task` " +"constructor (or factory) - all of the keyword arguments to this function are " +"passed through to that interface." msgstr "" -"Si *name* n’est pas ``None``, il est défini comme le nom de la tâche en " -"utilisant :meth:`Task.set_name`." -#: library/asyncio-task.rst:249 +#: library/asyncio-task.rst:250 msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *coro* to run in. The current context " -"copy is created when no *context* is provided." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the *coro* to run in. The current " +"context copy is created when no *context* is provided." msgstr "" -"L'argument (uniquement nommé) facultatif *context* permet de spécifier un :" -"class:`contextvars.Context` personnalisé pour la coroutine à exécuter. La " -"copie de contexte actuelle est créée lorsqu'aucun *context* n'est fourni." +"L'argument (uniquement nommé) facultatif *context* permet de spécifier " +"un :class:`contextvars.Context` personnalisé pour la coroutine à exécuter. " +"La copie de contexte actuelle est créée lorsqu'aucun *context* n'est fourni." -#: library/asyncio-task.rst:253 +#: library/asyncio-task.rst:254 msgid "" -"The task is executed in the loop returned by :func:`get_running_loop`, :exc:" -"`RuntimeError` is raised if there is no running loop in current thread." +"An optional keyword-only *eager_start* argument allows specifying if the " +"task should execute eagerly during the call to create_task, or be scheduled " +"later. If *eager_start* is not passed the mode set " +"by :meth:`loop.set_task_factory` will be used." msgstr "" -"La tâche est exécutée dans la boucle renvoyée par :func:" -"`get_running_loop` ; :exc:`RuntimeError` est levée s'il n'y a pas de boucle " -"en cours d'exécution dans le fil actuel." #: library/asyncio-task.rst:259 +msgid "" +"The task is executed in the loop returned " +"by :func:`get_running_loop`, :exc:`RuntimeError` is raised if there is no " +"running loop in current thread." +msgstr "" +"La tâche est exécutée dans la boucle renvoyée " +"par :func:`get_running_loop` ; :exc:`RuntimeError` est levée s'il n'y a pas " +"de boucle en cours d'exécution dans le fil actuel." + +#: library/asyncio-task.rst:265 #, fuzzy msgid "" ":meth:`asyncio.TaskGroup.create_task` is a new alternative leveraging " @@ -296,7 +307,7 @@ msgstr "" "permet d'attendre facilement un groupe de tâches associées." # suit un : -#: library/asyncio-task.rst:265 +#: library/asyncio-task.rst:271 msgid "" "Save a reference to the result of this function, to avoid a task " "disappearing mid-execution. The event loop only keeps weak references to " @@ -312,67 +323,79 @@ msgstr "" "de type « lance et oublie », rassemblez-les dans une collection ::" # suit un : -#: library/asyncio-task.rst:1188 +#: library/asyncio-task.rst:1239 msgid "Added the *name* parameter." msgstr "ajout du paramètre *name*." # suit un : -#: library/asyncio-task.rst:1195 +#: library/asyncio-task.rst:1246 msgid "Added the *context* parameter." msgstr "ajout du paramètre *context*." -#: library/asyncio-task.rst:295 -msgid "Task Cancellation" +# suit un : +#: library/asyncio-task.rst:299 +#, fuzzy +msgid "Added the *eager_start* parameter by passing on all *kwargs*." +msgstr "ajout du paramètre *name*." + +#: library/asyncio-task.rst:304 +#, fuzzy +msgid "Task cancellation" msgstr "Annulation de tâche" -#: library/asyncio-task.rst:297 +#: library/asyncio-task.rst:306 msgid "" -"Tasks can easily and safely be cancelled. When a task is cancelled, :exc:" -"`asyncio.CancelledError` will be raised in the task at the next opportunity." +"Tasks can easily and safely be cancelled. When a task is " +"cancelled, :exc:`asyncio.CancelledError` will be raised in the task at the " +"next opportunity." msgstr "" "Les tâches peuvent être annulées facilement et en toute sécurité. Lorsqu'une " "tâche est annulée, :exc:`asyncio.CancelledError` est levée dans la tâche à " "la première occasion." -#: library/asyncio-task.rst:301 +#: library/asyncio-task.rst:310 msgid "" "It is recommended that coroutines use ``try/finally`` blocks to robustly " "perform clean-up logic. In case :exc:`asyncio.CancelledError` is explicitly " -"caught, it should generally be propagated when clean-up is complete. :exc:" -"`asyncio.CancelledError` directly subclasses :exc:`BaseException` so most " -"code will not need to be aware of it." +"caught, it should generally be propagated when clean-up is " +"complete. :exc:`asyncio.CancelledError` directly " +"subclasses :exc:`BaseException` so most code will not need to be aware of it." msgstr "" "Il est recommandé que les coroutines utilisent des blocs ``try/finally`` " -"pour exécuter de manière robuste la logique de nettoyage. Dans le cas où :" -"exc:`asyncio.CancelledError` est explicitement interceptée, elle devrait " -"généralement être propagée lorsque le nettoyage est terminé. :exc:`asyncio." -"CancelledError` sous-classe directement :exc:`BaseException` donc la plupart " -"du code n'a pas besoin d'en être conscient." - -#: library/asyncio-task.rst:307 -msgid "" -"The asyncio components that enable structured concurrency, like :class:" -"`asyncio.TaskGroup` and :func:`asyncio.timeout`, are implemented using " -"cancellation internally and might misbehave if a coroutine swallows :exc:" -"`asyncio.CancelledError`. Similarly, user code should not generally call :" -"meth:`uncancel `. However, in cases when suppressing :" -"exc:`asyncio.CancelledError` is truly desired, it is necessary to also call " -"``uncancel()`` to completely remove the cancellation state." -msgstr "" -"Les composants *asyncio* qui permettent la concurrence structurée, comme :" -"class:`asyncio.TaskGroup` et :func:`asyncio.timeout`, sont implémentés en " -"utilisant l'annulation en interne et peuvent mal se comporter si une " -"coroutine ne propage pas :exc:`asyncio.CancelledError`. De même, le code " -"utilisateur ne doit généralement pas appeler :meth:`uncancel`. Cependant, dans les cas où la suppression de :exc:`asyncio." -"CancelledError` est vraiment souhaitée, il est également nécessaire " -"d'appeler ``uncancel()`` pour supprimer complètement l'état d'annulation." - -#: library/asyncio-task.rst:319 -msgid "Task Groups" +"pour exécuter de manière robuste la logique de nettoyage. Dans le cas " +"où :exc:`asyncio.CancelledError` est explicitement interceptée, elle devrait " +"généralement être propagée lorsque le nettoyage est " +"terminé. :exc:`asyncio.CancelledError` sous-classe " +"directement :exc:`BaseException` donc la plupart du code n'a pas besoin d'en " +"être conscient." + +#: library/asyncio-task.rst:316 +msgid "" +"The asyncio components that enable structured concurrency, " +"like :class:`asyncio.TaskGroup` and :func:`asyncio.timeout`, are implemented " +"using cancellation internally and might misbehave if a coroutine " +"swallows :exc:`asyncio.CancelledError`. Similarly, user code should not " +"generally call :meth:`uncancel `. However, in cases " +"when suppressing :exc:`asyncio.CancelledError` is truly desired, it is " +"necessary to also call ``uncancel()`` to completely remove the cancellation " +"state." +msgstr "" +"Les composants *asyncio* qui permettent la concurrence structurée, " +"comme :class:`asyncio.TaskGroup` et :func:`asyncio.timeout`, sont " +"implémentés en utilisant l'annulation en interne et peuvent mal se comporter " +"si une coroutine ne propage pas :exc:`asyncio.CancelledError`. De même, le " +"code utilisateur ne doit généralement pas " +"appeler :meth:`uncancel`. Cependant, dans les cas où " +"la suppression de :exc:`asyncio.CancelledError` est vraiment souhaitée, il " +"est également nécessaire d'appeler ``uncancel()`` pour supprimer " +"complètement l'état d'annulation." + +#: library/asyncio-task.rst:328 +#, fuzzy +msgid "Task groups" msgstr "Groupes de tâches" -#: library/asyncio-task.rst:321 +#: library/asyncio-task.rst:330 msgid "" "Task groups combine a task creation API with a convenient and reliable way " "to wait for all tasks in the group to finish." @@ -380,7 +403,7 @@ msgstr "" "Les groupes de tâches combinent une API de création de tâches avec un moyen " "pratique et fiable d'attendre la fin de toutes les tâches du groupe." -#: library/asyncio-task.rst:326 +#: library/asyncio-task.rst:335 msgid "" "An :ref:`asynchronous context manager ` holding a " "group of tasks. Tasks can be added to the group using :meth:`create_task`. " @@ -391,30 +414,86 @@ msgstr "" "groupe en utilisant :meth:`create_task`. Toutes les tâches sont attendues à " "la sortie du gestionnaire de contexte." -#: library/asyncio-task.rst:335 +#: library/asyncio-task.rst:344 msgid "" -"Create a task in this task group. The signature matches that of :func:" -"`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " -"already finished, or in the process of shutting down), we will close the " -"given ``coro``." +"Create a task in this task group. The signature matches that " +"of :func:`asyncio.create_task`. If the task group is inactive (e.g. not yet " +"entered, already finished, or in the process of shutting down), we will " +"close the given ``coro``." msgstr "" -#: library/asyncio-task.rst:343 +#: library/asyncio-task.rst:352 msgid "Close the given coroutine if the task group is not active." msgstr "" -#: library/asyncio-task.rst:550 library/asyncio-task.rst:781 +#: library/asyncio-task.rst:356 +msgid "Passes on all *kwargs* to :meth:`loop.create_task`" +msgstr "" + +#: library/asyncio-task.rst:360 +msgid "" +"Cancel the task group. This is a non-exceptional, early exit of the task " +"group's lifetime -- useful once the group's goal has been met or its " +"services no longer needed." +msgstr "" + +#: library/asyncio-task.rst:364 +msgid "" +":meth:`~asyncio.Task.cancel` will be called on any tasks in the group that " +"aren't yet done, as well as the parent (body) of the group. The task group " +"context manager will exit *without* :exc:`asyncio.CancelledError` being " +"raised." +msgstr "" + +#: library/asyncio-task.rst:368 +msgid "" +"If :meth:`cancel` is called before entering the task group, the group will " +"be cancelled upon entry. This is useful for patterns where one piece of " +"code passes an unused :class:`asyncio.TaskGroup` instance to another in " +"order to have the ability to cancel anything run within the group." +msgstr "" + +#: library/asyncio-task.rst:373 +msgid "" +":meth:`cancel` is idempotent and may be called after the task group has " +"already exited." +msgstr "" + +#: library/asyncio-task.rst:376 +msgid "Some ways to use :meth:`cancel`:" +msgstr "" + +#: library/asyncio-task.rst:378 +msgid "call it from the task group body based on some condition or event" +msgstr "" + +#: library/asyncio-task.rst:379 +msgid "" +"pass the task group instance to child tasks via :meth:`create_task`, " +"allowing a child task to conditionally cancel the entire entire group" +msgstr "" + +#: library/asyncio-task.rst:381 +msgid "" +"pass the task group instance or bound :meth:`cancel` method to some other " +"task *before* opening the task group, allowing remote cancellation" +msgstr "" + +#: library/asyncio-task.rst:546 library/asyncio-task.rst:780 #: library/asyncio-task.rst:847 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-task.rst:353 +#: library/asyncio-task.rst:394 +#, fuzzy msgid "" "The ``async with`` statement will wait for all tasks in the group to finish. " "While waiting, new tasks may still be added to the group (for example, by " "passing ``tg`` into one of the coroutines and calling ``tg.create_task()`` " -"in that coroutine). Once the last task has finished and the ``async with`` " -"block is exited, no new tasks may be added to the group." +"in that coroutine). There is also opportunity to request termination of the " +"entire task group with ``tg.cancel()``, based on some condition. Once the " +"last task has finished and the ``async with`` block is exited, no new tasks " +"may be added to the group." msgstr "" "L'instruction ``async with`` attend la fin de toutes les tâches du groupe. " "Lors de l'attente, de nouvelles tâches peuvent encore être ajoutées au " @@ -423,16 +502,16 @@ msgstr "" "dernière tâche est terminée et que le bloc ``async with`` est quitté, aucune " "nouvelle tâche ne peut être ajoutée au groupe." -#: library/asyncio-task.rst:360 +#: library/asyncio-task.rst:402 msgid "" "The first time any of the tasks belonging to the group fails with an " "exception other than :exc:`asyncio.CancelledError`, the remaining tasks in " "the group are cancelled. No further tasks can then be added to the group. At " -"this point, if the body of the ``async with`` statement is still active (i." -"e., :meth:`~object.__aexit__` hasn't been called yet), the task directly " -"containing the ``async with`` statement is also cancelled. The resulting :" -"exc:`asyncio.CancelledError` will interrupt an ``await``, but it will not " -"bubble out of the containing ``async with`` statement." +"this point, if the body of the ``async with`` statement is still active " +"(i.e., :meth:`~object.__aexit__` hasn't been called yet), the task directly " +"containing the ``async with`` statement is also cancelled. The " +"resulting :exc:`asyncio.CancelledError` will interrupt an ``await``, but it " +"will not bubble out of the containing ``async with`` statement." msgstr "" "La première fois que l'une des tâches appartenant au groupe échoue avec une " "exception autre que :exc:`asyncio.CancelledError`, les tâches restantes du " @@ -443,7 +522,7 @@ msgstr "" "annulée. Le résultat :exc:`asyncio.CancelledError` interrompt un ``await``, " "mais il ne sort pas de l'instruction ``async with`` englobante." -#: library/asyncio-task.rst:370 +#: library/asyncio-task.rst:412 msgid "" "Once all tasks have finished, if any tasks have failed with an exception " "other than :exc:`asyncio.CancelledError`, those exceptions are combined in " @@ -455,30 +534,31 @@ msgstr "" "combinées dans un :exc:`ExceptionGroup` ou :exc:`BaseExceptionGroup` (selon " "le cas ; voir leur documentation) qui est ensuite levé." -#: library/asyncio-task.rst:377 +#: library/asyncio-task.rst:419 msgid "" -"Two base exceptions are treated specially: If any task fails with :exc:" -"`KeyboardInterrupt` or :exc:`SystemExit`, the task group still cancels the " -"remaining tasks and waits for them, but then the initial :exc:" -"`KeyboardInterrupt` or :exc:`SystemExit` is re-raised instead of :exc:" -"`ExceptionGroup` or :exc:`BaseExceptionGroup`." +"Two base exceptions are treated specially: If any task fails " +"with :exc:`KeyboardInterrupt` or :exc:`SystemExit`, the task group still " +"cancels the remaining tasks and waits for them, but then the " +"initial :exc:`KeyboardInterrupt` or :exc:`SystemExit` is re-raised instead " +"of :exc:`ExceptionGroup` or :exc:`BaseExceptionGroup`." msgstr "" "Deux exceptions de base sont traitées spécialement : si une tâche échoue " "avec :exc:`KeyboardInterrupt` ou :exc:`SystemExit`, le groupe de tâches " -"annule toujours les tâches restantes et les attend, mais alors la :exc:" -"`KeyboardInterrupt` ou la :exc:`SystemExit` initiale est levée à nouveau au " -"lieu de :exc:`ExceptionGroup` ou :exc:`BaseExceptionGroup`." - -#: library/asyncio-task.rst:383 -msgid "" -"If the body of the ``async with`` statement exits with an exception (so :" -"meth:`~object.__aexit__` is called with an exception set), this is treated " -"the same as if one of the tasks failed: the remaining tasks are cancelled " -"and then waited for, and non-cancellation exceptions are grouped into an " -"exception group and raised. The exception passed into :meth:`~object." -"__aexit__`, unless it is :exc:`asyncio.CancelledError`, is also included in " -"the exception group. The same special case is made for :exc:" -"`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph." +"annule toujours les tâches restantes et les attend, mais alors " +"la :exc:`KeyboardInterrupt` ou la :exc:`SystemExit` initiale est levée à " +"nouveau au lieu de :exc:`ExceptionGroup` ou :exc:`BaseExceptionGroup`." + +#: library/asyncio-task.rst:425 +msgid "" +"If the body of the ``async with`` statement exits with an exception " +"(so :meth:`~object.__aexit__` is called with an exception set), this is " +"treated the same as if one of the tasks failed: the remaining tasks are " +"cancelled and then waited for, and non-cancellation exceptions are grouped " +"into an exception group and raised. The exception passed " +"into :meth:`~object.__aexit__`, unless it is :exc:`asyncio.CancelledError`, " +"is also included in the exception group. The same special case is made " +"for :exc:`KeyboardInterrupt` and :exc:`SystemExit` as in the previous " +"paragraph." msgstr "" "Si le corps de l'instruction ``async with`` se termine avec une exception " "(donc :meth:`~object.__aexit__` est appelé avec un ensemble d'exceptions), " @@ -487,10 +567,10 @@ msgstr "" "annulation sont regroupées dans un groupe d'exceptions et levées. " "L'exception transmise à :meth:`~object.__aexit__`, à moins qu'il ne s'agisse " "de :exc:`asyncio.CancelledError`, est également incluse dans le groupe " -"d'exceptions. Le même cas spécial concerne :exc:`KeyboardInterrupt` et :exc:" -"`SystemExit` comme dans le paragraphe précédent." +"d'exceptions. Le même cas spécial concerne :exc:`KeyboardInterrupt` " +"et :exc:`SystemExit` comme dans le paragraphe précédent." -#: library/asyncio-task.rst:395 +#: library/asyncio-task.rst:437 msgid "" "Task groups are careful not to mix up the internal cancellation used to " "\"wake up\" their :meth:`~object.__aexit__` with cancellation requests for " @@ -501,51 +581,36 @@ msgid "" "receive another cancellation and process its own exceptions." msgstr "" -#: library/asyncio-task.rst:403 +#: library/asyncio-task.rst:445 msgid "" "In the case where a task group is cancelled externally and also must raise " -"an :exc:`ExceptionGroup`, it will call the parent task's :meth:`~asyncio." -"Task.cancel` method. This ensures that a :exc:`asyncio.CancelledError` will " -"be raised at the next :keyword:`await`, so the cancellation is not lost." +"an :exc:`ExceptionGroup`, it will call the parent " +"task's :meth:`~asyncio.Task.cancel` method. This ensures that " +"a :exc:`asyncio.CancelledError` will be raised at the next :keyword:`await`, " +"so the cancellation is not lost." msgstr "" -#: library/asyncio-task.rst:409 +#: library/asyncio-task.rst:451 msgid "" -"Task groups preserve the cancellation count reported by :meth:`asyncio.Task." -"cancelling`." +"Task groups preserve the cancellation count reported " +"by :meth:`asyncio.Task.cancelling`." msgstr "" -#: library/asyncio-task.rst:414 +#: library/asyncio-task.rst:456 msgid "" "Improved handling of simultaneous internal and external cancellations and " "correct preservation of cancellation counts." msgstr "" -#: library/asyncio-task.rst:418 -msgid "Terminating a Task Group" -msgstr "" - -#: library/asyncio-task.rst:420 -msgid "" -"While terminating a task group is not natively supported by the standard " -"library, termination can be achieved by adding an exception-raising task to " -"the task group and ignoring the raised exception:" -msgstr "" - -#: library/asyncio-task.rst:456 -#, fuzzy -msgid "Expected output:" -msgstr "Sortie attendue ::" - -#: library/asyncio-task.rst:465 +#: library/asyncio-task.rst:460 msgid "Sleeping" msgstr "Attente" -#: library/asyncio-task.rst:469 +#: library/asyncio-task.rst:465 msgid "Block for *delay* seconds." msgstr "Attend pendant *delay* secondes." -#: library/asyncio-task.rst:471 +#: library/asyncio-task.rst:467 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -553,14 +618,14 @@ msgstr "" "Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " "termine." -#: library/asyncio-task.rst:474 +#: library/asyncio-task.rst:470 msgid "" "``sleep()`` always suspends the current task, allowing other tasks to run." msgstr "" "``sleep()`` suspend systématiquement la tâche courante, ce qui permet aux " "autres tâches de s'exécuter." -#: library/asyncio-task.rst:477 +#: library/asyncio-task.rst:473 msgid "" "Setting the delay to 0 provides an optimized path to allow other tasks to " "run. This can be used by long-running functions to avoid blocking the event " @@ -571,7 +636,7 @@ msgstr "" "durée pour éviter de bloquer la boucle d'événements pendant toute la durée " "de l'appel de fonction." -#: library/asyncio-task.rst:483 +#: library/asyncio-task.rst:479 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" @@ -579,20 +644,21 @@ msgstr "" "secondes ::" # suit un : -#: library/asyncio-task.rst:599 library/asyncio-task.rst:872 -#: library/asyncio-task.rst:983 +#: library/asyncio-task.rst:595 library/asyncio-task.rst:872 +#: library/asyncio-task.rst:984 msgid "Removed the *loop* parameter." msgstr "le paramètre *loop* a été enlevé." -#: library/asyncio-task.rst:504 +#: library/asyncio-task.rst:500 msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." msgstr "" -#: library/asyncio-task.rst:509 -msgid "Running Tasks Concurrently" +#: library/asyncio-task.rst:505 +#, fuzzy +msgid "Running tasks concurrently" msgstr "Exécution de tâches de manière concurrente" -#: library/asyncio-task.rst:513 +#: library/asyncio-task.rst:509 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -600,7 +666,7 @@ msgstr "" "Exécute les objets :ref:`awaitable ` de la séquence " "*aws*, *de manière concurrente*." -#: library/asyncio-task.rst:516 +#: library/asyncio-task.rst:512 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -608,7 +674,7 @@ msgstr "" "Si un *attendable* de *aws* est une coroutine, celui-ci est automatiquement " "planifié comme une tâche *Task*." -#: library/asyncio-task.rst:519 +#: library/asyncio-task.rst:515 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " @@ -618,7 +684,7 @@ msgstr "" "des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " "*awaitables* dans *aws*." -#: library/asyncio-task.rst:523 +#: library/asyncio-task.rst:519 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -630,7 +696,7 @@ msgstr "" "``gather()``. Les autres *attendables* dans la séquence *aws* **ne sont pas " "annulés** et poursuivent leur exécution." -#: library/asyncio-task.rst:528 +#: library/asyncio-task.rst:524 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." @@ -639,7 +705,7 @@ msgstr "" "même manière que les exécutions normales, et incluses dans la liste des " "résultats." -#: library/asyncio-task.rst:531 +#: library/asyncio-task.rst:527 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -647,7 +713,7 @@ msgstr "" "Si ``gather()`` est *annulé*, tous les *awaitables* en cours (ceux qui n'ont " "pas encore fini de s'exécuter) sont également *annulés*." -#: library/asyncio-task.rst:534 +#: library/asyncio-task.rst:530 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -660,17 +726,17 @@ msgstr "" "l'annulation d'une tâche ou d'un futur entraîne l'annulation des autres " "tâches ou futurs." -#: library/asyncio-task.rst:541 +#: library/asyncio-task.rst:537 msgid "" "A new alternative to create and run tasks concurrently and wait for their " "completion is :class:`asyncio.TaskGroup`. *TaskGroup* provides stronger " "safety guarantees than *gather* for scheduling a nesting of subtasks: if a " "task (or a subtask, a task scheduled by a task) raises an exception, " "*TaskGroup* will, while *gather* will not, cancel the remaining scheduled " -"tasks)." +"tasks." msgstr "" -#: library/asyncio-task.rst:588 +#: library/asyncio-task.rst:584 #, fuzzy msgid "" "If *return_exceptions* is false, cancelling gather() after it has been " @@ -686,7 +752,7 @@ msgstr "" "après avoir intercepté une exception (levée par l'un des *attendables*) de " "la collecte n'annule aucun autre *attendable*." -#: library/asyncio-task.rst:595 +#: library/asyncio-task.rst:591 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -694,7 +760,7 @@ msgstr "" "Si *gather* est lui-même annulé, l'annulation est propagée indépendamment de " "*return_exceptions*." -#: library/asyncio-task.rst:602 +#: library/asyncio-task.rst:598 msgid "" "Deprecation warning is emitted if no positional arguments are provided or " "not all positional arguments are Future-like objects and there is no running " @@ -704,31 +770,31 @@ msgstr "" "fourni ou si tous les arguments positionnels ne sont pas des objets de type " "Future et qu'il n'y a pas de boucle d'événements en cours d'exécution." -#: library/asyncio-task.rst:611 -msgid "Eager Task Factory" +#: library/asyncio-task.rst:607 +msgid "Eager task factory" msgstr "" -#: library/asyncio-task.rst:615 +#: library/asyncio-task.rst:611 msgid "A task factory for eager task execution." msgstr "" -#: library/asyncio-task.rst:617 +#: library/asyncio-task.rst:613 msgid "" -"When using this factory (via :meth:`loop.set_task_factory(asyncio." -"eager_task_factory) `), coroutines begin execution " -"synchronously during :class:`Task` construction. Tasks are only scheduled on " -"the event loop if they block. This can be a performance improvement as the " -"overhead of loop scheduling is avoided for coroutines that complete " -"synchronously." +"When using this factory " +"(via :meth:`loop.set_task_factory(asyncio.eager_task_factory) " +"`), coroutines begin execution synchronously " +"during :class:`Task` construction. Tasks are only scheduled on the event " +"loop if they block. This can be a performance improvement as the overhead of " +"loop scheduling is avoided for coroutines that complete synchronously." msgstr "" -#: library/asyncio-task.rst:623 +#: library/asyncio-task.rst:619 msgid "" "A common example where this is beneficial is coroutines which employ caching " "or memoization to avoid actual I/O when possible." msgstr "" -#: library/asyncio-task.rst:628 +#: library/asyncio-task.rst:624 msgid "" "Immediate execution of the coroutine is a semantic change. If the coroutine " "returns or raises, the task is never scheduled to the event loop. If the " @@ -737,38 +803,39 @@ msgid "" "the application's task execution order is likely to change." msgstr "" -#: library/asyncio-task.rst:639 +#: library/asyncio-task.rst:635 msgid "" "Create an eager task factory, similar to :func:`eager_task_factory`, using " "the provided *custom_task_constructor* when creating a new task instead of " "the default :class:`Task`." msgstr "" -#: library/asyncio-task.rst:643 +#: library/asyncio-task.rst:639 msgid "" "*custom_task_constructor* must be a *callable* with the signature matching " -"the signature of :class:`Task.__init__ `. The callable must return a :" -"class:`asyncio.Task`-compatible object." +"the signature of :class:`Task.__init__ `. The callable must return " +"a :class:`asyncio.Task`-compatible object." msgstr "" -#: library/asyncio-task.rst:647 +#: library/asyncio-task.rst:643 msgid "" "This function returns a *callable* intended to be used as a task factory of " -"an event loop via :meth:`loop.set_task_factory(factory) `)." +"an event loop via :meth:`loop.set_task_factory(factory) " +"`)." msgstr "" -#: library/asyncio-task.rst:654 -msgid "Shielding From Cancellation" +#: library/asyncio-task.rst:650 +#, fuzzy +msgid "Shielding from cancellation" msgstr "Protection contre l'annulation" -#: library/asyncio-task.rst:658 +#: library/asyncio-task.rst:654 msgid "" -"Protect an :ref:`awaitable object ` from being :meth:" -"`cancelled `." +"Protect an :ref:`awaitable object ` from " +"being :meth:`cancelled `." msgstr "" -"Empêche qu'un objet :ref:`awaitable ` puisse être :meth:" -"`annulé `." +"Empêche qu'un objet :ref:`awaitable ` puisse " +"être :meth:`annulé `." #: library/asyncio-task.rst:827 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." @@ -776,28 +843,28 @@ msgstr "" "Si *aw* est une coroutine, elle est planifiée automatiquement comme une " "tâche." -#: library/asyncio-task.rst:663 +#: library/asyncio-task.rst:659 msgid "The statement::" msgstr "L'instruction ::" -#: library/asyncio-task.rst:668 +#: library/asyncio-task.rst:664 msgid "is equivalent to::" msgstr "est équivalente à ::" -#: library/asyncio-task.rst:672 +#: library/asyncio-task.rst:668 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " "``something()``, the cancellation did not happen. Although its caller is " -"still cancelled, so the \"await\" expression still raises a :exc:" -"`CancelledError`." +"still cancelled, so the \"await\" expression still raises " +"a :exc:`CancelledError`." msgstr "" "*à la différence près* que, si la coroutine qui la contient est annulée, la " "tâche s'exécutant dans ``something()`` n'est pas annulée. Du point de vue de " "``something()``, il n'y a pas eu d'annulation. Cependant, son appelant est " "bien annulé, donc l'expression *await* lève bien une :exc:`CancelledError`." -#: library/asyncio-task.rst:678 +#: library/asyncio-task.rst:674 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -805,7 +872,7 @@ msgstr "" "Si ``something()`` est annulée d'une autre façon (c.-à-d. depuis elle-même) " "ceci annule également ``shield()``." -#: library/asyncio-task.rst:681 +#: library/asyncio-task.rst:677 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " @@ -816,7 +883,7 @@ msgstr "" "code ci-dessous ::" # suit un : -#: library/asyncio-task.rst:693 +#: library/asyncio-task.rst:689 msgid "" "Save a reference to tasks passed to this function, to avoid a task " "disappearing mid-execution. The event loop only keeps weak references to " @@ -830,7 +897,7 @@ msgstr "" "miettes à tout moment, même avant qu'elle ne soit terminée." # suit un : -#: library/asyncio-task.rst:701 +#: library/asyncio-task.rst:697 msgid "" "Deprecation warning is emitted if *aw* is not Future-like object and there " "is no running event loop." @@ -838,11 +905,11 @@ msgstr "" "un avertissement d'obsolescence est émis si *aw* n'est pas un objet de type " "*future* et qu'il n'y a pas de boucle d'événement en cours d'exécution." -#: library/asyncio-task.rst:707 +#: library/asyncio-task.rst:703 msgid "Timeouts" msgstr "Délais d'attente" -#: library/asyncio-task.rst:711 +#: library/asyncio-task.rst:707 #, fuzzy msgid "" "Return an :ref:`asynchronous context manager ` that " @@ -851,7 +918,7 @@ msgstr "" ":ref:`Gestionnaire de contexte asynchrone ` qui peut " "être utilisé pour limiter le temps passé à attendre quelque chose." -#: library/asyncio-task.rst:715 +#: library/asyncio-task.rst:711 msgid "" "*delay* can either be ``None``, or a float/int number of seconds to wait. If " "*delay* is ``None``, no time limit will be applied; this can be useful if " @@ -862,46 +929,46 @@ msgstr "" "appliquée ; cela peut être utile lorsque le délai d'attente est inconnu au " "moment de la création du gestionnaire de contexte." -#: library/asyncio-task.rst:720 +#: library/asyncio-task.rst:716 msgid "" -"In either case, the context manager can be rescheduled after creation using :" -"meth:`Timeout.reschedule`." +"In either case, the context manager can be rescheduled after creation " +"using :meth:`Timeout.reschedule`." msgstr "" "Dans les deux cas, le gestionnaire de contexte peut être redéfini après sa " "création en utilisant :meth:`Timeout.reschedule`." -#: library/asyncio-task.rst:729 +#: library/asyncio-task.rst:725 #, fuzzy msgid "" "If ``long_running_task`` takes more than 10 seconds to complete, the context " -"manager will cancel the current task and handle the resulting :exc:`asyncio." -"CancelledError` internally, transforming it into a :exc:`TimeoutError` which " -"can be caught and handled." +"manager will cancel the current task and handle the " +"resulting :exc:`asyncio.CancelledError` internally, transforming it into " +"a :exc:`TimeoutError` which can be caught and handled." msgstr "" "Si ``long_running_task`` prend plus de 10 secondes pour se terminer, le " -"gestionnaire de contexte annule la tâche en cours et traite l'erreur :exc:" -"`asyncio.CancelledError` en interne, la transformant en une :exc:`asyncio." -"TimeoutError` qui peut être interceptée et gérée." +"gestionnaire de contexte annule la tâche en cours et traite " +"l'erreur :exc:`asyncio.CancelledError` en interne, la transformant en " +"une :exc:`asyncio.TimeoutError` qui peut être interceptée et gérée." # suit un : -#: library/asyncio-task.rst:736 +#: library/asyncio-task.rst:732 #, fuzzy msgid "" -"The :func:`asyncio.timeout` context manager is what transforms the :exc:" -"`asyncio.CancelledError` into a :exc:`TimeoutError`, which means the :exc:" -"`TimeoutError` can only be caught *outside* of the context manager." +"The :func:`asyncio.timeout` context manager is what transforms " +"the :exc:`asyncio.CancelledError` into a :exc:`TimeoutError`, which means " +"the :exc:`TimeoutError` can only be caught *outside* of the context manager." msgstr "" "le gestionnaire de contexte :func:`asyncio.timeout` est ce qui transforme " "la :exc:`asyncio.CancelledError` en une :exc:`asyncio.TimeoutError`, ce qui " "signifie que la :exc:`asyncio.TimeoutError` ne peut être interceptée qu' *en " "dehors* du gestionnaire de contexte." -#: library/asyncio-task.rst:741 +#: library/asyncio-task.rst:737 #, fuzzy msgid "Example of catching :exc:`TimeoutError`::" msgstr "Exemple de capture :exc:`asyncio.TimeoutError` ::" -#: library/asyncio-task.rst:752 +#: library/asyncio-task.rst:748 msgid "" "The context manager produced by :func:`asyncio.timeout` can be rescheduled " "to a different deadline and inspected." @@ -909,7 +976,7 @@ msgstr "" "Le gestionnaire de contexte produit par :func:`asyncio.timeout` peut être " "reprogrammé à une échéance différente et inspecté." -#: library/asyncio-task.rst:757 +#: library/asyncio-task.rst:753 msgid "" "An :ref:`asynchronous context manager ` for " "cancelling overdue coroutines." @@ -917,7 +984,13 @@ msgstr "" ":ref:`Gestionnaire de contexte asynchrone ` pour " "annuler les coroutines en retard." -#: library/asyncio-task.rst:760 +#: library/asyncio-task.rst:756 +msgid "" +"Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at` rather " +"than instantiating :class:`!Timeout` directly." +msgstr "" + +#: library/asyncio-task.rst:759 msgid "" "``when`` should be an absolute time at which the context should time out, as " "measured by the event loop's clock:" @@ -925,11 +998,11 @@ msgstr "" "``when`` doit être un temps absolu au bout duquel le contexte doit expirer, " "tel que mesuré par l'horloge de la boucle d'événements :" -#: library/asyncio-task.rst:763 +#: library/asyncio-task.rst:762 msgid "If ``when`` is ``None``, the timeout will never trigger." msgstr "Si ``when`` vaut ``None``, le délai maximal ne se déclenche jamais." -#: library/asyncio-task.rst:764 +#: library/asyncio-task.rst:763 msgid "" "If ``when < loop.time()``, the timeout will trigger on the next iteration of " "the event loop." @@ -937,30 +1010,30 @@ msgstr "" "Si ``when < loop.time()``, le délai maximal se déclenche à la prochaine " "itération de la boucle d'événement." -#: library/asyncio-task.rst:769 +#: library/asyncio-task.rst:768 msgid "" "Return the current deadline, or ``None`` if the current deadline is not set." msgstr "" "Renvoie la limite de temps d'exécution définie actuellement, ou ``None`` " "s'il n'y en a pas." -#: library/asyncio-task.rst:774 +#: library/asyncio-task.rst:773 msgid "Reschedule the timeout." msgstr "Reprogramme le délai d'attente." -#: library/asyncio-task.rst:778 +#: library/asyncio-task.rst:777 msgid "Return whether the context manager has exceeded its deadline (expired)." msgstr "" "Renvoie si le gestionnaire de contexte a dépassé son délai (c.-à-d. s'il a " "expiré)." -#: library/asyncio-task.rst:798 +#: library/asyncio-task.rst:797 msgid "Timeout context managers can be safely nested." msgstr "" "Les gestionnaires de contexte de délai maximal peuvent être imbriqués en " "toute sécurité." -#: library/asyncio-task.rst:804 +#: library/asyncio-task.rst:803 msgid "" "Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " "stop waiting, or ``None``." @@ -994,8 +1067,8 @@ msgstr "" #: library/asyncio-task.rst:836 msgid "" -"To avoid the task :meth:`cancellation `, wrap it in :func:" -"`shield`." +"To avoid the task :meth:`cancellation `, wrap it " +"in :func:`shield`." msgstr "" "Pour empêcher :meth:`l'annulation ` de la tâche, il est " "nécessaire de l'encapsuler dans une fonction :func:`shield`." @@ -1020,8 +1093,8 @@ msgid "" "cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" "Si le dépassement du délai d'attente maximal provoque l'annulation de *aw*, " -"``wait_for`` attend que *aw* soit annulée. Auparavant, l'exception :exc:" -"`TimeoutError` était immédiatement levée." +"``wait_for`` attend que *aw* soit annulée. Auparavant, " +"l'exception :exc:`TimeoutError` était immédiatement levée." #: library/asyncio-task.rst:875 #, fuzzy @@ -1031,10 +1104,11 @@ msgstr "" "avant que tous les futurs ne soient achevés." #: library/asyncio-task.rst:880 -msgid "Waiting Primitives" +#, fuzzy +msgid "Waiting primitives" msgstr "Primitives d'attente" -#: library/asyncio-task.rst:884 +#: library/asyncio-task.rst:885 msgid "" "Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " "*aws* iterable concurrently and block until the condition specified by " @@ -1044,20 +1118,20 @@ msgstr "" "l'itérable *aws* de manière concurrente, et s'interrompt jusqu'à ce que la " "condition décrite dans *return_when* soit vraie." -#: library/asyncio-task.rst:888 +#: library/asyncio-task.rst:889 #, fuzzy msgid "The *aws* iterable must not be empty." msgstr "L'itérable *aws* ne doit pas être vide." -#: library/asyncio-task.rst:890 +#: library/asyncio-task.rst:891 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "Renvoie deux ensembles de *Tasks* / *Futures* : ``(done, pending)``." -#: library/asyncio-task.rst:892 +#: library/asyncio-task.rst:893 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-task.rst:896 +#: library/asyncio-task.rst:897 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." @@ -1065,7 +1139,7 @@ msgstr "" "*timeout* (entier ou décimal), si précisé, peut-être utilisé pour contrôler " "le nombre maximal de secondes d'attente avant de se terminer." -#: library/asyncio-task.rst:899 +#: library/asyncio-task.rst:900 msgid "" "Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " "that aren't done when the timeout occurs are simply returned in the second " @@ -1075,7 +1149,7 @@ msgstr "" "ne sont pas finis quand le délai d'attente maximal est dépassé sont tout " "simplement renvoyés dans le second ensemble." -#: library/asyncio-task.rst:903 +#: library/asyncio-task.rst:904 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -1083,36 +1157,36 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/asyncio-task.rst:909 +#: library/asyncio-task.rst:910 msgid "Constant" msgstr "Constante" -#: library/asyncio-task.rst:910 +#: library/asyncio-task.rst:911 msgid "Description" msgstr "Description" -#: library/asyncio-task.rst:913 +#: library/asyncio-task.rst:914 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/asyncio-task.rst:916 +#: library/asyncio-task.rst:917 #, fuzzy msgid "" "The function will return when any future finishes by raising an exception. " -"If no future raises an exception then it is equivalent to :const:" -"`ALL_COMPLETED`." +"If no future raises an exception then it is equivalent " +"to :const:`ALL_COMPLETED`." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine en levant une " -"exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" -"`ALL_COMPLETED`." +"exception. Si aucun *futur* ne lève d'exception, équivaut " +"à :const:`ALL_COMPLETED`." -#: library/asyncio-task.rst:921 +#: library/asyncio-task.rst:922 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/asyncio-task.rst:923 +#: library/asyncio-task.rst:924 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." @@ -1120,15 +1194,15 @@ msgstr "" "À la différence de :func:`~asyncio.wait_for`, ``wait()`` n'annule pas les " "futurs quand le délai d'attente est dépassé." -#: library/asyncio-task.rst:929 +#: library/asyncio-task.rst:930 msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "Passer directement des objets coroutines à ``wait()`` est interdit." -#: library/asyncio-task.rst:990 +#: library/asyncio-task.rst:991 msgid "Added support for generators yielding tasks." msgstr "" -#: library/asyncio-task.rst:938 +#: library/asyncio-task.rst:939 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -1140,36 +1214,36 @@ msgstr "" "Chaque coroutine renvoyée peut être attendue pour obtenir le premier " "résultat suivant de l'ensemble des *attendables* restants." -#: library/asyncio-task.rst:942 +#: library/asyncio-task.rst:943 msgid "" -"The object returned by ``as_completed()`` can be iterated as an :term:" -"`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " -"iteration is used, the originally-supplied awaitables are yielded if they " -"are tasks or futures. This makes it easy to correlate previously-scheduled " -"tasks with their results. Example::" +"The object returned by ``as_completed()`` can be iterated as " +"an :term:`asynchronous iterator` or a plain :term:`iterator`. When " +"asynchronous iteration is used, the originally-supplied awaitables are " +"yielded if they are tasks or futures. This makes it easy to correlate " +"previously-scheduled tasks with their results. Example::" msgstr "" -#: library/asyncio-task.rst:962 +#: library/asyncio-task.rst:963 msgid "" "During asynchronous iteration, implicitly-created tasks will be yielded for " "supplied awaitables that aren't tasks or futures." msgstr "" -#: library/asyncio-task.rst:965 +#: library/asyncio-task.rst:966 msgid "" "When used as a plain iterator, each iteration yields a new coroutine that " "returns the result or raises the exception of the next completed awaitable. " "This pattern is compatible with Python versions older than 3.13::" msgstr "" -#: library/asyncio-task.rst:979 +#: library/asyncio-task.rst:980 msgid "" "A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " "are done. This is raised by the ``async for`` loop during asynchronous " "iteration or by the coroutines yielded during plain iteration." msgstr "" -#: library/asyncio-task.rst:986 +#: library/asyncio-task.rst:987 msgid "" "Deprecation warning is emitted if not all awaitable objects in the *aws* " "iterable are Future-like objects and there is no running event loop." @@ -1178,23 +1252,24 @@ msgstr "" "l'itérable *aws* ne sont pas des objets de type *Future* et qu'il n'y a pas " "de boucle d'événement en cours d'exécution." -#: library/asyncio-task.rst:993 +#: library/asyncio-task.rst:994 msgid "" "The result can now be used as either an :term:`asynchronous iterator` or as " "a plain :term:`iterator` (previously it was only a plain iterator)." msgstr "" -#: library/asyncio-task.rst:999 -msgid "Running in Threads" +#: library/asyncio-task.rst:1000 +#, fuzzy +msgid "Running in threads" msgstr "Exécution dans des fils d'exécution (*threads*)" -#: library/asyncio-task.rst:1003 +#: library/asyncio-task.rst:1005 msgid "Asynchronously run function *func* in a separate thread." msgstr "" "Exécute la fonction *func* de manière asynchrone dans un fil d'exécution " "séparé." -#: library/asyncio-task.rst:1005 +#: library/asyncio-task.rst:1007 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -1206,14 +1281,14 @@ msgstr "" "est propagé, ce qui permet d'accéder aux variables de contexte du fil de " "boucle d'événements dans le fil séparé." -#: library/asyncio-task.rst:1010 +#: library/asyncio-task.rst:1012 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" "Renvoie une coroutine qui peut être attendue pour obtenir le résultat " "éventuel de *func*." -#: library/asyncio-task.rst:1012 +#: library/asyncio-task.rst:1014 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " @@ -1224,7 +1299,7 @@ msgstr "" "bloqueraient autrement la boucle d'événements si elles étaient exécutées " "dans le fil d'exécution principal. Par exemple ::" -#: library/asyncio-task.rst:1042 +#: library/asyncio-task.rst:1044 msgid "" "Directly calling ``blocking_io()`` in any coroutine would block the event " "loop for its duration, resulting in an additional 1 second of run time. " @@ -1238,7 +1313,7 @@ msgstr "" "séparé sans bloquer la boucle d'événements." # suit un : -#: library/asyncio-task.rst:1049 +#: library/asyncio-task.rst:1051 msgid "" "Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " "to make IO-bound functions non-blocking. However, for extension modules that " @@ -1248,22 +1323,23 @@ msgstr "" "en raison du :term:`GIL`, ``asyncio.to_thread()`` ne peut généralement être " "utilisée que pour rendre les fonctions faisant beaucoup d'entrées-sorties " "non bloquantes. Cependant, pour les modules d'extension qui relâchent le GIL " -"ou les implémentations Python alternatives qui n'en ont pas, ``asyncio." -"to_thread()`` peut également être utilisée pour les fonctions qui " +"ou les implémentations Python alternatives qui n'en ont pas, " +"``asyncio.to_thread()`` peut également être utilisée pour les fonctions qui " "sollicitent beaucoup le processeur." -#: library/asyncio-task.rst:1058 -msgid "Scheduling From Other Threads" +#: library/asyncio-task.rst:1060 +#, fuzzy +msgid "Scheduling from other threads" msgstr "Planification depuis d'autres fils d'exécution" -#: library/asyncio-task.rst:1062 +#: library/asyncio-task.rst:1064 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" "Enregistre une coroutine dans la boucle d'exécution actuelle. Cette " "opération est compatible avec les programmes à multiples fils d'exécution " "(*thread-safe*)." -#: library/asyncio-task.rst:1064 +#: library/asyncio-task.rst:1066 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -1271,7 +1347,7 @@ msgstr "" "Renvoie un :class:`concurrent.futures.Future` pour attendre le résultat d'un " "autre fil d'exécution du système d'exploitation." -#: library/asyncio-task.rst:1067 +#: library/asyncio-task.rst:1069 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" @@ -1279,7 +1355,11 @@ msgstr "" "Cette fonction est faite pour être appelée par un fil d'exécution distinct " "de celui dans laquelle la boucle d'événement s'exécute. Exemple ::" -#: library/asyncio-task.rst:1079 +#: library/asyncio-task.rst:1092 +msgid "It's also possible to run the other way around. Example::" +msgstr "" + +#: library/asyncio-task.rst:1126 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" @@ -1288,7 +1368,7 @@ msgstr "" "averti. Elle peut également être utilisée pour annuler la tâche de la boucle " "d'événement ::" -#: library/asyncio-task.rst:1093 +#: library/asyncio-task.rst:1140 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -1296,7 +1376,7 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-task.rst:1096 +#: library/asyncio-task.rst:1143 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -1304,11 +1384,11 @@ msgstr "" "À la différence des autres fonctions d'*asyncio*, cette fonction requiert " "que *loop* soit passé de manière explicite." -#: library/asyncio-task.rst:1103 +#: library/asyncio-task.rst:1150 msgid "Introspection" msgstr "Introspection" -#: library/asyncio-task.rst:1108 +#: library/asyncio-task.rst:1155 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -1316,7 +1396,7 @@ msgstr "" "Renvoie l'instance de la :class:`Task` en cours d'exécution, ou ``None`` " "s'il n'y a pas de tâche en cours." -#: library/asyncio-task.rst:1111 +#: library/asyncio-task.rst:1158 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -1324,13 +1404,13 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:1119 +#: library/asyncio-task.rst:1166 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" "Renvoie l'ensemble des :class:`Task` non terminés en cours d'exécution dans " "la boucle." -#: library/asyncio-task.rst:1122 +#: library/asyncio-task.rst:1169 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -1338,24 +1418,25 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:1130 +#: library/asyncio-task.rst:1177 msgid "Return ``True`` if *obj* is a coroutine object." msgstr "Renvoie ``True`` si *obj* est un objet coroutine." -#: library/asyncio-task.rst:1136 -msgid "Task Object" +#: library/asyncio-task.rst:1184 +#, fuzzy +msgid "Task object" msgstr "Objets *Task*" -#: library/asyncio-task.rst:1140 +#: library/asyncio-task.rst:1188 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." msgstr "" -"Objet compatible avec :class:`Future ` qui exécute une :ref:" -"`coroutine ` Python. Cet objet n'est pas utilisable dans des " -"programmes à fils d'exécution multiples." +"Objet compatible avec :class:`Future ` qui exécute " +"une :ref:`coroutine ` Python. Cet objet n'est pas utilisable dans " +"des programmes à fils d'exécution multiples." -#: library/asyncio-task.rst:1143 +#: library/asyncio-task.rst:1191 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -1367,7 +1448,7 @@ msgstr "" "attend la fin de ce *futur*. Quand celui-ci est terminé, l'exécution de la " "coroutine encapsulée reprend." -#: library/asyncio-task.rst:1149 +#: library/asyncio-task.rst:1197 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " @@ -1378,7 +1459,7 @@ msgstr "" "futur, la boucle d'événement exécute d'autres tâches, des fonctions de " "rappel, ou effectue des opérations d'entrées-sorties." -#: library/asyncio-task.rst:1154 +#: library/asyncio-task.rst:1202 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " @@ -1389,49 +1470,51 @@ msgstr "" "créer des tâches. Il est déconseillé d'instancier manuellement des objets " "*Task*." -#: library/asyncio-task.rst:1159 +#: library/asyncio-task.rst:1207 +#, fuzzy msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " -"coroutine. If a coroutine is awaiting on a Future object during " -"cancellation, the Future object will be cancelled." +"coroutine. If a coroutine is awaiting on a future-like object during " +"cancellation, the awaited object will be cancelled." msgstr "" "La méthode :meth:`cancel` d'une tâche en cours d'exécution permet d'annuler " -"celle-ci. L'appel de cette méthode force la tâche à lever l'exception :exc:" -"`CancelledError` dans la coroutine encapsulée. Si la coroutine attendait un " -"*futur* au moment de l'annulation, celui-ci est annulé." +"celle-ci. L'appel de cette méthode force la tâche à lever " +"l'exception :exc:`CancelledError` dans la coroutine encapsulée. Si la " +"coroutine attendait un *futur* au moment de l'annulation, celui-ci est " +"annulé." -#: library/asyncio-task.rst:1164 +#: library/asyncio-task.rst:1212 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " -"returns ``True`` if the wrapped coroutine did not suppress the :exc:" -"`CancelledError` exception and was actually cancelled." +"returns ``True`` if the wrapped coroutine did not suppress " +"the :exc:`CancelledError` exception and was actually cancelled." msgstr "" "La méthode :meth:`cancelled` permet de vérifier si la tâche a été annulée. " -"Elle renvoie ``True`` si la coroutine encapsulée n'a pas ignoré l'exception :" -"exc:`CancelledError` et a bien été annulée." +"Elle renvoie ``True`` si la coroutine encapsulée n'a pas ignoré " +"l'exception :exc:`CancelledError` et a bien été annulée." -#: library/asyncio-task.rst:1169 +#: library/asyncio-task.rst:1217 msgid "" -":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" -"meth:`Future.set_result` and :meth:`Future.set_exception`." +":class:`asyncio.Task` inherits from :class:`Future` all of its APIs " +"except :meth:`Future.set_result` and :meth:`Future.set_exception`." msgstr "" ":class:`asyncio.Task` hérite de :class:`Future`, de toute son API, à " "l'exception de :meth:`Future.set_result` et de :meth:`Future.set_exception`." -#: library/asyncio-task.rst:1173 +#: library/asyncio-task.rst:1221 #, fuzzy msgid "" -"An optional keyword-only *context* argument allows specifying a custom :" -"class:`contextvars.Context` for the *coro* to run in. If no *context* is " -"provided, the Task copies the current context and later runs its coroutine " -"in the copied context." +"An optional keyword-only *context* argument allows specifying a " +"custom :class:`contextvars.Context` for the *coro* to run in. If no " +"*context* is provided, the Task copies the current context and later runs " +"its coroutine in the copied context." msgstr "" -"L'argument (uniquement nommé) facultatif *context* permet de spécifier un :" -"class:`contextvars.Context` personnalisé pour la coroutine à exécuter. La " -"copie de contexte actuelle est créée lorsqu'aucun *context* n'est fourni." +"L'argument (uniquement nommé) facultatif *context* permet de spécifier " +"un :class:`contextvars.Context` personnalisé pour la coroutine à exécuter. " +"La copie de contexte actuelle est créée lorsqu'aucun *context* n'est fourni." -#: library/asyncio-task.rst:1178 +#: library/asyncio-task.rst:1226 msgid "" "An optional keyword-only *eager_start* argument allows eagerly starting the " "execution of the :class:`asyncio.Task` at task creation time. If set to " @@ -1441,13 +1524,19 @@ msgid "" "eagerly and will skip scheduling to the event loop." msgstr "" +#: library/asyncio-task.rst:1233 +msgid "" +"Tasks are :ref:`generic ` over the return type of their wrapped " +"coroutines." +msgstr "" + # suit un : -#: library/asyncio-task.rst:1185 +#: library/asyncio-task.rst:1236 msgid "Added support for the :mod:`contextvars` module." msgstr "ajout du support du module :mod:`contextvars`." # suit un : -#: library/asyncio-task.rst:1191 +#: library/asyncio-task.rst:1242 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." @@ -1456,16 +1545,16 @@ msgstr "" "qu'il n'y a pas de boucle d'événement en cours d'exécution." # suit un : -#: library/asyncio-task.rst:1198 +#: library/asyncio-task.rst:1249 #, fuzzy msgid "Added the *eager_start* parameter." msgstr "ajout du paramètre *name*." -#: library/asyncio-task.rst:1203 +#: library/asyncio-task.rst:1254 msgid "Return ``True`` if the Task is *done*." msgstr "Renvoie ``True`` si la tâche est *achevée*." -#: library/asyncio-task.rst:1205 +#: library/asyncio-task.rst:1256 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." @@ -1473,11 +1562,11 @@ msgstr "" "Une tâche est dite *achevée* quand la coroutine encapsulée a soit renvoyé " "une valeur, soit levé une exception, ou que la tâche a été annulée." -#: library/asyncio-task.rst:1210 +#: library/asyncio-task.rst:1261 msgid "Return the result of the Task." msgstr "Renvoie le résultat de la tâche." -#: library/asyncio-task.rst:1212 +#: library/asyncio-task.rst:1263 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" @@ -1486,28 +1575,28 @@ msgstr "" "renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " "exception est de nouveau levée)." -#: library/asyncio-task.rst:1230 +#: library/asyncio-task.rst:1281 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." msgstr "" -"Si la tâche a été *annulée*, cette méthode lève une exception :exc:" -"`CancelledError`." +"Si la tâche a été *annulée*, cette méthode lève une " +"exception :exc:`CancelledError`." -#: library/asyncio-task.rst:1219 +#: library/asyncio-task.rst:1270 #, fuzzy msgid "" -"If the Task's result isn't yet available, this method raises an :exc:" -"`InvalidStateError` exception." +"If the Task's result isn't yet available, this method raises " +"an :exc:`InvalidStateError` exception." msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:1224 +#: library/asyncio-task.rst:1275 msgid "Return the exception of the Task." msgstr "Renvoie l'exception de la tâche." -#: library/asyncio-task.rst:1226 +#: library/asyncio-task.rst:1277 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." @@ -1515,38 +1604,38 @@ msgstr "" "Si la coroutine encapsulée lève une exception, cette exception est renvoyée. " "Si la coroutine s'est exécutée normalement, cette méthode renvoie ``None``." -#: library/asyncio-task.rst:1233 +#: library/asyncio-task.rst:1284 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." msgstr "" -"Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" -"exc:`InvalidStateError`." +"Si la tâche n'est pas encore *achevée*, cette méthode lève une " +"exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:1238 +#: library/asyncio-task.rst:1289 msgid "Add a callback to be run when the Task is *done*." msgstr "" "Ajoute une fonction de rappel qui sera exécutée quand la tâche sera " "*achevée*." -#: library/asyncio-task.rst:1249 +#: library/asyncio-task.rst:1300 msgid "This method should only be used in low-level callback-based code." msgstr "" "Cette méthode ne doit être utilisée que dans du code basé sur les fonctions " "de rappel de bas-niveau." -#: library/asyncio-task.rst:1242 +#: library/asyncio-task.rst:1293 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" "Se référer à la documentation de :meth:`Future.add_done_callback` pour plus " "de détails." -#: library/asyncio-task.rst:1247 +#: library/asyncio-task.rst:1298 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-task.rst:1251 +#: library/asyncio-task.rst:1302 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1554,11 +1643,11 @@ msgstr "" "Se référer à la documentation de :meth:`Future.remove_done_callback` pour " "plus de détails." -#: library/asyncio-task.rst:1256 +#: library/asyncio-task.rst:1307 msgid "Return the list of stack frames for this Task." msgstr "Renvoie une liste représentant la pile d'appels de la tâche." -#: library/asyncio-task.rst:1258 +#: library/asyncio-task.rst:1309 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1571,15 +1660,15 @@ msgstr "" "renvoie une liste vide. Si la coroutine a été terminée par une exception, " "ceci renvoie la pile d'erreurs." -#: library/asyncio-task.rst:1264 +#: library/asyncio-task.rst:1315 msgid "The frames are always ordered from oldest to newest." msgstr "La pile est toujours affichée de l'appelant à l'appelé." -#: library/asyncio-task.rst:1266 +#: library/asyncio-task.rst:1317 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "Une seule ligne est renvoyée si la coroutine est suspendue." -#: library/asyncio-task.rst:1268 +#: library/asyncio-task.rst:1319 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1593,11 +1682,11 @@ msgstr "" "renvoyés, si la pile est une pile d'erreurs, ce sont les appels les plus " "anciens qui le sont (dans un souci de cohérence avec le module *traceback*)." -#: library/asyncio-task.rst:1277 +#: library/asyncio-task.rst:1328 msgid "Print the stack or traceback for this Task." msgstr "Affiche la pile d'appels ou d'erreurs de la tâche." -#: library/asyncio-task.rst:1279 +#: library/asyncio-task.rst:1330 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1605,11 +1694,11 @@ msgstr "" "Le format de sortie des appels produits par :meth:`get_stack` est similaire " "à celui du module *traceback*." -#: library/asyncio-task.rst:1282 +#: library/asyncio-task.rst:1333 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "Le paramètre *limit* est directement passé à :meth:`get_stack`." -#: library/asyncio-task.rst:1284 +#: library/asyncio-task.rst:1335 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stdout`." @@ -1617,30 +1706,30 @@ msgstr "" "Le paramètre *file* est un flux d'entrées-sorties sur lequel le résultat est " "écrit ; par défaut, :data:`sys.stdout`." -#: library/asyncio-task.rst:1289 +#: library/asyncio-task.rst:1340 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "Renvoie l’objet *coroutine* encapsulé par la :class:`Task`." -#: library/asyncio-task.rst:1293 +#: library/asyncio-task.rst:1344 msgid "" "This will return ``None`` for Tasks which have already completed eagerly. " "See the :ref:`Eager Task Factory `." msgstr "" -#: library/asyncio-task.rst:1300 +#: library/asyncio-task.rst:1351 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: library/asyncio-task.rst:1304 +#: library/asyncio-task.rst:1355 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: library/asyncio-task.rst:1311 +#: library/asyncio-task.rst:1362 msgid "Return the name of the Task." msgstr "Renvoie le nom de la tâche." -#: library/asyncio-task.rst:1313 +#: library/asyncio-task.rst:1364 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." @@ -1649,70 +1738,84 @@ msgstr "" "défaut d’une *Task* *asyncio* génère un nom par défaut durant " "l’instanciation." -#: library/asyncio-task.rst:1321 +#: library/asyncio-task.rst:1372 msgid "Set the name of the Task." msgstr "Définit le nom de la tâche." -#: library/asyncio-task.rst:1323 +#: library/asyncio-task.rst:1374 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" "L’argument *value* peut être n’importe quel objet qui sera ensuite converti " "en chaine de caractères." -#: library/asyncio-task.rst:1326 +#: library/asyncio-task.rst:1377 msgid "" -"In the default Task implementation, the name will be visible in the :func:" -"`repr` output of a task object." +"In the default Task implementation, the name will be visible in " +"the :func:`repr` output of a task object." msgstr "" "Dans l’implémentation par défaut de *Task*, le nom sera visible dans le " "résultat de :func:`repr` d’un objet *Task*." -#: library/asyncio-task.rst:1333 +#: library/asyncio-task.rst:1384 msgid "Request the Task to be cancelled." msgstr "Demande l'annulation d'une tâche." -#: library/asyncio-task.rst:1335 +#: library/asyncio-task.rst:1386 +msgid "" +"If the Task is already *done* or *cancelled*, return ``False``, otherwise, " +"return ``True``." +msgstr "" + +#: library/asyncio-task.rst:1389 +#, fuzzy msgid "" -"This arranges for a :exc:`CancelledError` exception to be thrown into the " -"wrapped coroutine on the next cycle of the event loop." +"The method arranges for a :exc:`CancelledError` exception to be thrown into " +"the wrapped coroutine on the next cycle of the event loop." msgstr "" "Provisionne la levée de l'exception :exc:`CancelledError` dans la coroutine " "encapsulée. L'exception sera levée au prochain cycle de la boucle " "d'exécution." -#: library/asyncio-task.rst:1338 +#: library/asyncio-task.rst:1392 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " -"CancelledError`` ... :keyword:`finally` block. Therefore, unlike :meth:" -"`Future.cancel`, :meth:`Task.cancel` does not guarantee that the Task will " -"be cancelled, although suppressing cancellation completely is not common and " -"is actively discouraged. Should the coroutine nevertheless decide to " -"suppress the cancellation, it needs to call :meth:`Task.uncancel` in " -"addition to catching the exception." +"CancelledError`` ... :keyword:`finally` block. Therefore, " +"unlike :meth:`Future.cancel`, :meth:`Task.cancel` does not guarantee that " +"the Task will be cancelled, although suppressing cancellation completely is " +"not common and is actively discouraged. Should the coroutine nevertheless " +"decide to suppress the cancellation, it needs to call :meth:`Task.uncancel` " +"in addition to catching the exception." msgstr "" "La coroutine peut alors faire le ménage ou même ignorer la requête en " "supprimant l'exception à l'aide d'un bloc :keyword:`try` … … ``except " -"CancelledError`` … :keyword:`finally`. Par conséquent, contrairement à :meth:" -"`Future.cancel`, :meth:`Task.cancel` ne garantit pas que la tâche sera " -"annulée, bien qu'ignorer totalement une annulation ne soit ni une pratique " -"courante, ni encouragé. Si la coroutine décide néanmoins de supprimer " -"l'annulation, elle doit appeler :meth:`Task.uncancel` en plus d'intercepter " -"l'exception." +"CancelledError`` … :keyword:`finally`. Par conséquent, contrairement " +"à :meth:`Future.cancel`, :meth:`Task.cancel` ne garantit pas que la tâche " +"sera annulée, bien qu'ignorer totalement une annulation ne soit ni une " +"pratique courante, ni encouragé. Si la coroutine décide néanmoins de " +"supprimer l'annulation, elle doit appeler :meth:`Task.uncancel` en plus " +"d'intercepter l'exception." + +#: library/asyncio-task.rst:1402 +msgid "" +"If the Task being cancelled is currently awaiting on a future-like object, " +"that awaited object will also be cancelled. This cancellation propagates " +"down the entire chain of awaited objects." +msgstr "" # suit un : -#: library/asyncio-task.rst:1348 +#: library/asyncio-task.rst:1406 msgid "Added the *msg* parameter." msgstr "ajout du paramètre *msg*." # suit un : -#: library/asyncio-task.rst:1351 +#: library/asyncio-task.rst:1409 msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." msgstr "" "le paramètre ``msg`` est propagé de la tâche annulée vers celle qui l'attend." -#: library/asyncio-task.rst:1356 +#: library/asyncio-task.rst:1414 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -1720,99 +1823,99 @@ msgstr "" "L'exemple ci-dessous illustre comment une coroutine peut intercepter une " "requête d'annulation ::" -#: library/asyncio-task.rst:1395 +#: library/asyncio-task.rst:1453 msgid "Return ``True`` if the Task is *cancelled*." msgstr "Renvoie ``True`` si la tâche est *annulée*." -#: library/asyncio-task.rst:1397 +#: library/asyncio-task.rst:1455 msgid "" -"The Task is *cancelled* when the cancellation was requested with :meth:" -"`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " -"exception thrown into it." +"The Task is *cancelled* when the cancellation was requested " +"with :meth:`cancel` and the wrapped coroutine propagated " +"the :exc:`CancelledError` exception thrown into it." msgstr "" "La tâche est *annulée* quand l'annulation a été demandée avec :meth:`cancel` " "et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " "été levée en son sein." -#: library/asyncio-task.rst:1403 +#: library/asyncio-task.rst:1461 msgid "Decrement the count of cancellation requests to this Task." msgstr "Décrémente le nombre de demandes d'annulation pour cette tâche." -#: library/asyncio-task.rst:1405 +#: library/asyncio-task.rst:1463 msgid "Returns the remaining number of cancellation requests." msgstr "Renvoie le nombre restant de demandes d'annulation." -#: library/asyncio-task.rst:1407 +#: library/asyncio-task.rst:1465 msgid "" -"Note that once execution of a cancelled task completed, further calls to :" -"meth:`uncancel` are ineffective." +"Note that once execution of a cancelled task completed, further calls " +"to :meth:`uncancel` are ineffective." msgstr "" "Notez qu'une fois l'exécution d'une tâche annulée terminée, les appels " "ultérieurs à :meth:`uncancel` ne font rien." -#: library/asyncio-task.rst:1412 +#: library/asyncio-task.rst:1470 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. In particular, if a Task gets successfully uncancelled, this " -"allows for elements of structured concurrency like :ref:`taskgroups` and :" -"func:`asyncio.timeout` to continue running, isolating cancellation to the " -"respective structured block. For example::" +"allows for elements of structured concurrency like :ref:`taskgroups` " +"and :func:`asyncio.timeout` to continue running, isolating cancellation to " +"the respective structured block. For example::" msgstr "" "Cette méthode est utilisée par les composants internes d'*asyncio* et elle " "ne devrait pas être utilisée par le code de l'utilisateur final. En " "particulier, si une tâche est annulée avec succès, cela permet aux " -"structures permettant le multi-fils tels que :ref:`taskgroups` et :func:" -"`asyncio.timeout` de continuer à s'exécuter, isolant l'annulation au bloc " -"concerné. Par exemple ::" +"structures permettant le multi-fils tels que :ref:`taskgroups` " +"et :func:`asyncio.timeout` de continuer à s'exécuter, isolant l'annulation " +"au bloc concerné. Par exemple ::" -#: library/asyncio-task.rst:1430 +#: library/asyncio-task.rst:1488 msgid "" "While the block with ``make_request()`` and ``make_another_request()`` might " "get cancelled due to the timeout, ``unrelated_code()`` should continue " -"running even in case of the timeout. This is implemented with :meth:" -"`uncancel`. :class:`TaskGroup` context managers use :func:`uncancel` in a " -"similar fashion." +"running even in case of the timeout. This is implemented " +"with :meth:`uncancel`. :class:`TaskGroup` context managers " +"use :func:`uncancel` in a similar fashion." msgstr "" "Alors que le bloc avec ``make_request()`` et ``make_another_request()`` peut " "être annulé en raison du délai d'attente, ``unrelated_code()`` devrait " "continuer à s'exécuter même en cas d'atteinte du délai maximal. Ceci est " -"implémenté avec :meth:`uncancel`. Les gestionnaires de contexte :class:" -"`TaskGroup` utilisent :func:`uncancel` de la même manière." +"implémenté avec :meth:`uncancel`. Les gestionnaires de " +"contexte :class:`TaskGroup` utilisent :func:`uncancel` de la même manière." -#: library/asyncio-task.rst:1436 +#: library/asyncio-task.rst:1494 #, fuzzy msgid "" -"If end-user code is, for some reason, suppressing cancellation by catching :" -"exc:`CancelledError`, it needs to call this method to remove the " +"If end-user code is, for some reason, suppressing cancellation by " +"catching :exc:`CancelledError`, it needs to call this method to remove the " "cancellation state." msgstr "" "Si, pour une raison quelconque, le code de l'utilisateur final supprime " "l'annulation en interceptant :exc:`CancelledError`, il doit appeler cette " "méthode pour supprimer l'état d'annulation." -#: library/asyncio-task.rst:1440 +#: library/asyncio-task.rst:1498 msgid "" "When this method decrements the cancellation count to zero, the method " -"checks if a previous :meth:`cancel` call had arranged for :exc:" -"`CancelledError` to be thrown into the task. If it hasn't been thrown yet, " -"that arrangement will be rescinded (by resetting the internal " +"checks if a previous :meth:`cancel` call had arranged " +"for :exc:`CancelledError` to be thrown into the task. If it hasn't been " +"thrown yet, that arrangement will be rescinded (by resetting the internal " "``_must_cancel`` flag)." msgstr "" -#: library/asyncio-task.rst:1446 +#: library/asyncio-task.rst:1504 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: library/asyncio-task.rst:1451 +#: library/asyncio-task.rst:1509 msgid "" "Return the number of pending cancellation requests to this Task, i.e., the " "number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." msgstr "" "Renvoie le nombre de demandes d'annulation en attente à cette tâche, c'est-à-" -"dire le nombre d'appels à :meth:`cancel` moins le nombre d'appels à :meth:" -"`uncancel`." +"dire le nombre d'appels à :meth:`cancel` moins le nombre d'appels " +"à :meth:`uncancel`." -#: library/asyncio-task.rst:1455 +#: library/asyncio-task.rst:1513 msgid "" "Note that if this number is greater than zero but the Task is still " "executing, :meth:`cancelled` will still return ``False``. This is because " @@ -1826,18 +1929,29 @@ msgstr "" "empêcher en fin de compte la tâche d'être annulée si les demandes " "d'annulation tombent à zéro." -#: library/asyncio-task.rst:1461 +#: library/asyncio-task.rst:1519 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. See :meth:`uncancel` for more details." msgstr "" "Cette méthode est utilisée par les composants internes d'*asyncio* et ne " -"devrait pas être utilisée par le code de l'utilisateur final. Voir :meth:" -"`uncancel` pour plus de détails." +"devrait pas être utilisée par le code de l'utilisateur final. " +"Voir :meth:`uncancel` pour plus de détails." + +#, fuzzy +#~ msgid "Expected output:" +#~ msgstr "Sortie attendue ::" + +#~ msgid "" +#~ "If *name* is not ``None``, it is set as the name of the task " +#~ "using :meth:`Task.set_name`." +#~ msgstr "" +#~ "Si *name* n’est pas ``None``, il est défini comme le nom de la tâche en " +#~ "utilisant :meth:`Task.set_name`." #~ msgid "" -#~ "Create a task in this task group. The signature matches that of :func:" -#~ "`asyncio.create_task`." +#~ "Create a task in this task group. The signature matches that " +#~ "of :func:`asyncio.create_task`." #~ msgstr "" #~ "Crée une tâche dans ce groupe de tâches. La signature correspond à celle " #~ "de :func:`asyncio.create_task`." @@ -1922,8 +2036,8 @@ msgstr "" #~ "low-level :func:`asyncio.ensure_future` function can be used instead::" #~ msgstr "" #~ "Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " -#~ "antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." -#~ "ensure_future` peut-être utilisée ::" +#~ "antérieures à la 3.7, la fonction de bas-" +#~ "niveau :func:`asyncio.ensure_future` peut-être utilisée ::" #~ msgid "" #~ "asyncio also supports legacy :ref:`generator-based " @@ -1976,11 +2090,12 @@ msgstr "" #~ "coroutines." #~ msgid "" -#~ "Generator-based coroutines should be decorated with :func:`@asyncio." -#~ "coroutine `, although this is not enforced." +#~ "Generator-based coroutines should be decorated " +#~ "with :func:`@asyncio.coroutine `, although this is not " +#~ "enforced." #~ msgstr "" -#~ "Les coroutines basées sur des générateurs doivent être décorées avec :" -#~ "func:`@asyncio.coroutine `, même si ce n'est pas " +#~ "Les coroutines basées sur des générateurs doivent être décorées " +#~ "avec :func:`@asyncio.coroutine `, même si ce n'est pas " #~ "vérifié par l'interpréteur." #~ msgid "Decorator to mark generator-based coroutines." @@ -1996,8 +2111,8 @@ msgstr "" #~ msgid "" #~ "This decorator should not be used for :keyword:`async def` coroutines." #~ msgstr "" -#~ "Ce décorateur ne doit pas être utilisé avec des coroutines :keyword:" -#~ "`async def`." +#~ "Ce décorateur ne doit pas être utilisé avec des " +#~ "coroutines :keyword:`async def`." # pas de majuscule car suit un deux-points #~ msgid "Use :keyword:`async def` instead." diff --git a/library/asyncio.po b/library/asyncio.po index 8388dfc37..acab2e6dc 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-05-24 21:49-0400\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -15,15 +15,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.4.3\n" -#: library/asyncio.rst:91 +#: library/asyncio.rst:100 msgid "High-level APIs" msgstr "Bibliothèques de haut-niveau" -#: library/asyncio.rst:103 +#: library/asyncio.rst:113 msgid "Low-level APIs" msgstr "Bibliothèques de bas-niveau" -#: library/asyncio.rst:114 +#: library/asyncio.rst:124 msgid "Guides and Tutorials" msgstr "Guides et tutoriels" @@ -32,7 +32,7 @@ msgstr "Guides et tutoriels" msgid ":mod:`!asyncio` --- Asynchronous I/O" msgstr ":mod:`asyncio` — Entrées/Sorties asynchrones" -#: library/asyncio.rst:-1 +#: library/asyncio.rst:9 msgid "Hello World!" msgstr "Hello World !" @@ -63,12 +63,20 @@ msgstr "" "``asyncio`` est souvent le bon choix pour écrire du code réseau de haut-" "niveau et tributaire des entrées-sorties (*IO-bound*)." -#: library/asyncio.rst:32 +#: library/asyncio.rst:34 +msgid ":ref:`a-conceptual-overview-of-asyncio`" +msgstr "" + +#: library/asyncio.rst:35 +msgid "Explanation of the fundamentals of asyncio." +msgstr "" + +#: library/asyncio.rst:37 msgid "asyncio provides a set of **high-level** APIs to:" msgstr "" "``asyncio`` fournit des interfaces de programmation **haut-niveau** pour :" -#: library/asyncio.rst:34 +#: library/asyncio.rst:39 msgid "" ":ref:`run Python coroutines ` concurrently and have full control " "over their execution;" @@ -76,27 +84,27 @@ msgstr "" ":ref:`exécuter des coroutines Python ` de manière concurrente et " "d'avoir le contrôle total sur leur exécution ;" -#: library/asyncio.rst:37 +#: library/asyncio.rst:42 msgid "perform :ref:`network IO and IPC `;" msgstr "" "effectuer :ref:`des entrées/sorties réseau et de la communication inter-" "processus ` ;" -#: library/asyncio.rst:39 +#: library/asyncio.rst:44 msgid "control :ref:`subprocesses `;" msgstr "contrôler des :ref:`sous-processus ` ;" -#: library/asyncio.rst:41 +#: library/asyncio.rst:46 msgid "distribute tasks via :ref:`queues `;" msgstr "distribuer des tâches avec des :ref:`queues ` ;" -#: library/asyncio.rst:43 +#: library/asyncio.rst:48 msgid ":ref:`synchronize ` concurrent code;" msgstr "" ":ref:`synchroniser ` du code s'exécutant de manière " "concurrente ;" -#: library/asyncio.rst:45 +#: library/asyncio.rst:50 msgid "" "Additionally, there are **low-level** APIs for *library and framework " "developers* to:" @@ -104,20 +112,21 @@ msgstr "" "En plus, il existe des bibliothèques de **bas-niveau** pour que les " "*développeurs de bibliothèques et de frameworks* puissent :" -#: library/asyncio.rst:48 +#: library/asyncio.rst:53 #, fuzzy msgid "" "create and manage :ref:`event loops `, which provide " -"asynchronous APIs for :ref:`networking `, running :ref:" -"`subprocesses `, handling :ref:`OS signals " -"`, etc;" +"asynchronous APIs for :ref:`networking `, " +"running :ref:`subprocesses `, handling :ref:`OS " +"signals `, etc;" msgstr "" "créer et gérer des :ref:`boucles d'événements `, qui " -"fournissent des bibliothèques asynchrones de :meth:`réseau `, d'exécution de :meth:`subprocesses `, " -"de gestion de :meth:`signaux système `, etc ;" +"fournissent des bibliothèques asynchrones de :meth:`réseau " +"`, d'exécution de :meth:`subprocesses " +"`, de gestion de :meth:`signaux système " +"`, etc ;" -#: library/asyncio.rst:53 +#: library/asyncio.rst:58 msgid "" "implement efficient protocols using :ref:`transports `;" @@ -125,7 +134,7 @@ msgstr "" "implémenter des protocoles efficaces à l'aide de :ref:`transports ` ;" -#: library/asyncio.rst:56 +#: library/asyncio.rst:61 msgid "" ":ref:`bridge ` callback-based libraries and code with async/" "await syntax." @@ -135,7 +144,7 @@ msgstr "" #: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -143,17 +152,24 @@ msgid "" "availability` for more information." msgstr "" -#: library/asyncio.rst:64 +#: library/asyncio.rst:69 msgid "asyncio REPL" msgstr "" -#: library/asyncio.rst:65 +#: library/asyncio.rst:70 msgid "" -"You can experiment with an ``asyncio`` concurrent context in the :term:" -"`REPL`:" +"You can experiment with an ``asyncio`` concurrent context in " +"the :term:`REPL`:" msgstr "" -#: library/asyncio.rst:77 +#: library/asyncio.rst:82 +msgid "" +"This REPL provides limited compatibility with :envvar:`PYTHON_BASIC_REPL`. " +"It is recommended that the default REPL is used for full functionality and " +"the latest features." +msgstr "" + +#: library/asyncio.rst:86 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." @@ -161,21 +177,21 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``cpython.run_stdin`` sans " "argument." -#: library/asyncio.rst:79 +#: library/asyncio.rst:88 msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." msgstr "" -#: library/asyncio.rst:82 +#: library/asyncio.rst:91 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: library/asyncio.rst:90 +#: library/asyncio.rst:99 msgid "Reference" msgstr "Sommaire" -#: library/asyncio.rst:123 +#: library/asyncio.rst:133 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "" "Le code source d'``asyncio`` est disponible dans :source:`Lib/asyncio/`." diff --git a/library/asyncore.po b/library/asyncore.po new file mode 100644 index 000000000..0df632666 --- /dev/null +++ b/library/asyncore.po @@ -0,0 +1,37 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/asyncore.rst:2 +msgid ":mod:`!asyncore` --- Asynchronous socket handler" +msgstr "" + +#: library/asyncore.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.12 ` after being " +"deprecated in Python 3.6. The removal was decided in :pep:`594`." +msgstr "" + +#: library/asyncore.rst:14 +msgid "Applications should use the :mod:`asyncio` module instead." +msgstr "" + +#: library/asyncore.rst:16 +msgid "" +"The last version of Python that provided the :mod:`!asyncore` module was " +"`Python 3.11 `_." +msgstr "" diff --git a/library/atexit.po b/library/atexit.po index 0ab3ff091..c9aaba526 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-03-23 13:05-0600\n" "Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" @@ -20,24 +20,25 @@ msgstr "" msgid ":mod:`!atexit` --- Exit handlers" msgstr ":mod:`atexit` — Gestionnaire de fin de programme" -#: library/atexit.rst:12 +#: library/atexit.rst:9 +#, fuzzy msgid "" -"The :mod:`atexit` module defines functions to register and unregister " +"The :mod:`!atexit` module defines functions to register and unregister " "cleanup functions. Functions thus registered are automatically executed " -"upon normal interpreter termination. :mod:`atexit` runs these functions in " +"upon normal interpreter termination. :mod:`!atexit` runs these functions in " "the *reverse* order in which they were registered; if you register ``A``, " "``B``, and ``C``, at interpreter termination time they will be run in the " "order ``C``, ``B``, ``A``." msgstr "" "Le module :mod:`atexit` définit des fonctions pour inscrire et désinscrire " "des fonctions de nettoyage. Les fonctions ainsi inscrites sont " -"automatiquement exécutées au moment de l'arrêt normal de l'interpréteur. :" -"mod:`atexit` exécute ces fonctions dans l'ordre inverse dans lequel elles " -"ont été inscrites ; si vous inscrivez ``A``, ``B``, et ``C``, au moment de " -"l'arrêt de l'interpréteur elles seront exécutées dans l'ordre ``C``, ``B``, " -"``A``." +"automatiquement exécutées au moment de l'arrêt normal de " +"l'interpréteur. :mod:`atexit` exécute ces fonctions dans l'ordre inverse " +"dans lequel elles ont été inscrites ; si vous inscrivez ``A``, ``B``, et " +"``C``, au moment de l'arrêt de l'interpréteur elles seront exécutées dans " +"l'ordre ``C``, ``B``, ``A``." -#: library/atexit.rst:19 +#: library/atexit.rst:16 msgid "" "**Note:** The functions registered via this module are not called when the " "program is killed by a signal not handled by Python, when a Python fatal " @@ -47,13 +48,13 @@ msgstr "" "le programme est tué par un signal non géré par Python, quand une erreur " "fatale interne de Python est détectée, ou quand :func:`os._exit` est appelé." -#: library/atexit.rst:23 +#: library/atexit.rst:20 msgid "" "**Note:** The effect of registering or unregistering functions from within a " "cleanup function is undefined." msgstr "" -#: library/atexit.rst:26 +#: library/atexit.rst:23 msgid "" "When used with C-API subinterpreters, registered functions are local to the " "interpreter they were registered in." @@ -62,19 +63,19 @@ msgstr "" "fonctions inscrites sont locales à l'interpréteur dans lequel elles ont été " "inscrites." -#: library/atexit.rst:32 +#: library/atexit.rst:29 msgid "" "Register *func* as a function to be executed at termination. Any optional " -"arguments that are to be passed to *func* must be passed as arguments to :" -"func:`register`. It is possible to register the same function and arguments " -"more than once." +"arguments that are to be passed to *func* must be passed as arguments " +"to :func:`register`. It is possible to register the same function and " +"arguments more than once." msgstr "" "Inscrit *func* comme une fonction à exécuter au moment de l'arrêt de " "l'interpréteur. Tout argument optionnel qui doit être passé à *func* doit " "être passé comme argument à :func:`register`. Il est possible d'inscrire les " "mêmes fonctions et arguments plus d'une fois." -#: library/atexit.rst:37 +#: library/atexit.rst:34 msgid "" "At normal program termination (for instance, if :func:`sys.exit` is called " "or the main module's execution completes), all functions registered are " @@ -89,7 +90,7 @@ msgstr "" "normalement être importés avant les modules haut niveau et ainsi être " "nettoyés en dernier." -#: library/atexit.rst:43 +#: library/atexit.rst:40 msgid "" "If an exception is raised during execution of the exit handlers, a traceback " "is printed (unless :exc:`SystemExit` is raised) and the exception " @@ -102,7 +103,7 @@ msgstr "" "fois que tous les gestionnaires de fin de programme ont eu une chance de " "s'exécuter, la dernière exception à avoir été levée l'est de nouveau." -#: library/atexit.rst:48 +#: library/atexit.rst:45 msgid "" "This function returns *func*, which makes it possible to use it as a " "decorator." @@ -110,7 +111,7 @@ msgstr "" "Cette fonction renvoie *func*, ce qui rend possible de l'utiliser en tant " "que décorateur." -#: library/atexit.rst:52 +#: library/atexit.rst:49 msgid "" "Starting new threads or calling :func:`os.fork` from a registered function " "can lead to race condition between the main Python runtime thread freeing " @@ -118,20 +119,22 @@ msgid "" "try to use that state. This can lead to crashes rather than clean shutdown." msgstr "" -#: library/atexit.rst:58 +#: library/atexit.rst:55 msgid "" "Attempts to start a new thread or :func:`os.fork` a new process in a " "registered function now leads to :exc:`RuntimeError`." msgstr "" -#: library/atexit.rst:64 +#: library/atexit.rst:61 +#, fuzzy msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. :" -"func:`unregister` silently does nothing if *func* was not previously " -"registered. If *func* has been registered more than once, every occurrence " -"of that function in the :mod:`atexit` call stack will be removed. Equality " -"comparisons (``==``) are used internally during unregistration, so function " -"references do not need to have matching identities." +"Remove *func* from the list of functions to be run at interpreter " +"shutdown. :func:`unregister` silently does nothing if *func* was not " +"previously registered. If *func* has been registered more than once, every " +"occurrence of that function in the :mod:`!atexit` call stack will be " +"removed. Equality comparisons (``==``) are used internally during " +"unregistration, so function references do not need to have matching " +"identities." msgstr "" "Retire *func* de la liste des fonctions à exécuter au moment de l'arrêt de " "l'interpréteur. :func:`unregister` ne fait rien et reste silencieux si " @@ -141,23 +144,25 @@ msgstr "" "utilisée dans l'implémentation interne de la désinscription. Les références " "des fonctions n'ont donc pas besoin d'avoir la même identité." -#: library/atexit.rst:74 +#: library/atexit.rst:71 msgid "Module :mod:`readline`" msgstr "Module :mod:`readline`" -#: library/atexit.rst:75 +#: library/atexit.rst:72 +#, fuzzy msgid "" -"Useful example of :mod:`atexit` to read and write :mod:`readline` history " +"Useful example of :mod:`!atexit` to read and write :mod:`readline` history " "files." msgstr "" "Un exemple utile de l'usage de :mod:`atexit` pour lire et écrire des " "fichiers d'historique :mod:`readline`." -#: library/atexit.rst:82 -msgid ":mod:`atexit` Example" +#: library/atexit.rst:79 +#, fuzzy +msgid ":mod:`!atexit` Example" msgstr "Exemple avec :mod:`atexit`" -#: library/atexit.rst:84 +#: library/atexit.rst:81 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -170,19 +175,20 @@ msgstr "" "besoin que l'application fasse un appel explicite dans ce module au moment " "de l'arrêt de l'interpréteur. ::" -#: library/atexit.rst:107 +#: library/atexit.rst:104 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" msgstr "" -"Les arguments positionnels et nommés peuvent aussi être passés à :func:" -"`register` afin d'être repassés à la fonction inscrite lors de son appel ::" +"Les arguments positionnels et nommés peuvent aussi être passés " +"à :func:`register` afin d'être repassés à la fonction inscrite lors de son " +"appel ::" -#: library/atexit.rst:119 +#: library/atexit.rst:116 msgid "Usage as a :term:`decorator`::" msgstr "Utilisation en tant que :term:`décorateur ` ::" -#: library/atexit.rst:127 +#: library/atexit.rst:124 msgid "This only works with functions that can be called without arguments." msgstr "" "Ceci fonctionne uniquement avec des fonctions qui peuvent être appelées sans " diff --git a/library/audioop.po b/library/audioop.po new file mode 100644 index 000000000..74419821d --- /dev/null +++ b/library/audioop.po @@ -0,0 +1,33 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/audioop.rst:2 +msgid ":mod:`!audioop` --- Manipulate raw audio data" +msgstr "" + +#: library/audioop.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/audioop.rst:14 +msgid "" +"The last version of Python that provided the :mod:`!audioop` module was " +"`Python 3.12 `_." +msgstr "" diff --git a/library/audit_events.po b/library/audit_events.po index 8faa0cfca..ebd0eadbf 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2022-11-15 14:54+0100\n" "Last-Translator: Lucie Roux \n" "Language-Team: FRENCH \n" @@ -22,14 +22,14 @@ msgstr "Table des évènements d'audit" #: library/audit_events.rst:8 #, fuzzy msgid "" -"This table contains all events raised by :func:`sys.audit` or :c:func:" -"`PySys_Audit` calls throughout the CPython runtime and the standard " -"library. These calls were added in 3.8 or later (see :pep:`578`)." +"This table contains all events raised by :func:`sys.audit` " +"or :c:func:`PySys_Audit` calls throughout the CPython runtime and the " +"standard library. These calls were added in 3.8 or later (see :pep:`578`)." msgstr "" -"Cette table contient tous les évènements levés par les appels de :func:`sys." -"audit` ou :c:func:`PySys_Audit` durant l'exécution de CPython et de la " -"bibliothèque standard. Ces appels ont été ajoutés dans les versions 3.8.0 et " -"ultérieures." +"Cette table contient tous les évènements levés par les appels " +"de :func:`sys.audit` ou :c:func:`PySys_Audit` durant l'exécution de CPython " +"et de la bibliothèque standard. Ces appels ont été ajoutés dans les versions " +"3.8.0 et ultérieures." #: library/audit_events.rst:12 msgid "" @@ -124,13 +124,25 @@ msgid "``handle``, ``exit_code``" msgstr "``handle``, ``exit_code``" #: library/audit_events.rst:46 +msgid "_posixsubprocess.fork_exec" +msgstr "" + +#: library/audit_events.rst:46 +msgid "``exec_list``, ``args``, ``env``" +msgstr "" + +#: library/audit_events.rst:48 msgid "ctypes.PyObj_FromPtr" msgstr "ctypes.PyObj_FromPtr" -#: library/audit_events.rst:46 +#: library/audit_events.rst:48 msgid "``obj``" msgstr "``obj``" +#: library/audit_events.rst:51 +msgid "The ``_posixsubprocess.fork_exec`` internal audit event." +msgstr "" + #, fuzzy #~ msgid "audit events" #~ msgstr "Table des évènements d'audit" diff --git a/library/base64.po b/library/base64.po index bebabfb44..36935e642 100644 --- a/library/base64.po +++ b/library/base64.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 15:43+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -28,10 +28,11 @@ msgstr "**Code source :** :source:`Lib/base64.py`" #, fuzzy msgid "" "This module provides functions for encoding binary data to printable ASCII " -"characters and decoding such encodings back to binary data. It provides " -"encoding and decoding functions for the encodings specified in :rfc:`4648`, " -"which defines the Base16, Base32, and Base64 algorithms, and for the de-" -"facto standard Ascii85 and Base85 encodings." +"characters and decoding such encodings back to binary data. This includes " +"the :ref:`encodings specified in ` :rfc:`4648` (Base64, " +"Base32 and Base16), the :ref:`Base85 encoding ` specified in " +"`PDF 2.0 `_, and non-standard " +"variants of Base85 used elsewhere." msgstr "" "Ce module fournit des fonctions permettant de coder des données binaires en " "caractères ASCII affichables ainsi que de décoder ces caractères vers des " @@ -40,43 +41,32 @@ msgstr "" "algorithmes base16, base32 et base64, ainsi que les encodages standards *de " "facto* Ascii85 et base85." -#: library/base64.rst:22 +#: library/base64.rst:24 #, fuzzy msgid "" -"The :rfc:`4648` encodings are suitable for encoding binary data so that it " -"can be safely sent by email, used as parts of URLs, or included as part of " -"an HTTP POST request. The encoding algorithm is not the same as the :" -"program:`uuencode` program." -msgstr "" -"Les encodages définis par la :rfc:`3548` sont adaptés au codage des données " -"binaires pour leur transfert par courriel, comme éléments d'une URL ou d'une " -"requête HTTP POST. L'algorithme d'encodage ne doit pas être confondu avec le " -"programme :program:`uuencode`." - -#: library/base64.rst:27 +"There are two interfaces provided by this module. The modern interface " +"supports encoding :term:`bytes-like objects ` to " +"ASCII :class:`bytes`, and decoding :term:`bytes-like objects ` or strings containing ASCII to :class:`bytes`. Both base-64 " +"alphabets defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are " +"supported." +msgstr "" +"Ce module présente deux interfaces. L'interface moderne gère l'encodage " +"d':term:`objets octet-compatibles ` en :class:`bytes` " +"ASCII ainsi que le décodage d':term:`objets octet-compatibles ` ou de chaînes de caractères contenant de l'ASCII en :class:`bytes`. " +"Les deux alphabets de l'algorithme base64 définis par la :rfc:`3548` (normal " +"et sûr pour les systèmes de fichiers ou URL) sont gérés." + +#: library/base64.rst:30 #, fuzzy msgid "" -"There are two interfaces provided by this module. The modern interface " -"supports encoding :term:`bytes-like objects ` to ASCII :" -"class:`bytes`, and decoding :term:`bytes-like objects ` " -"or strings containing ASCII to :class:`bytes`. Both base-64 alphabets " -"defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." -msgstr "" -"Ce module présente deux interfaces. L'interface moderne gère l'encodage d':" -"term:`objets octet-compatibles ` en :class:`bytes` ASCII " -"ainsi que le décodage d':term:`objets octet-compatibles ` " -"ou de chaînes de caractères contenant de l'ASCII en :class:`bytes`. Les deux " -"alphabets de l'algorithme base64 définis par la :rfc:`3548` (normal et sûr " -"pour les systèmes de fichiers ou URL) sont gérés." - -#: library/base64.rst:33 -msgid "" -"The legacy interface does not support decoding from strings, but it does " -"provide functions for encoding and decoding to and from :term:`file objects " -"`. It only supports the Base64 standard alphabet, and it adds " -"newlines every 76 characters as per :rfc:`2045`. Note that if you are " -"looking for :rfc:`2045` support you probably want to be looking at the :mod:" -"`email` package instead." +"The :ref:`legacy interface ` does not support decoding from " +"strings, but it does provide functions for encoding and decoding to and " +"from :term:`file objects `. It only supports the Base64 " +"standard alphabet, and it adds newlines every 76 characters as " +"per :rfc:`2045`. Note that if you are looking for :rfc:`2045` support you " +"probably want to be looking at the :mod:`email` package instead." msgstr "" "L'interface historique ne permet pas le décodage des chaînes de caractères " "mais fournit des fonctions permettant d'encoder et décoder depuis et vers " @@ -86,7 +76,7 @@ msgstr "" "probablement ce que vous cherchez si vous souhaitez une implémentation de " "la :rfc:`2045`." -#: library/base64.rst:41 +#: library/base64.rst:38 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of the " "modern interface." @@ -95,7 +85,7 @@ msgstr "" "sont désormais acceptées par les fonctions de décodage de l'interface " "moderne." -#: library/base64.rst:45 +#: library/base64.rst:42 msgid "" "Any :term:`bytes-like objects ` are now accepted by all " "encoding and decoding functions in this module. Ascii85/Base85 support " @@ -105,11 +95,23 @@ msgstr "" "acceptés par l'ensemble des fonctions d'encodage et de décodage de ce " "module. La gestion de Ascii85/base85 a été ajoutée." -#: library/base64.rst:49 -msgid "The modern interface provides:" -msgstr "L'interface moderne propose :" +#: library/base64.rst:50 +msgid "RFC 4648 Encodings" +msgstr "" + +#: library/base64.rst:52 +#, fuzzy +msgid "" +"The :rfc:`4648` encodings are suitable for encoding binary data so that it " +"can be safely sent by email, used as parts of URLs, or included as part of " +"an HTTP POST request." +msgstr "" +"Les encodages définis par la :rfc:`3548` sont adaptés au codage des données " +"binaires pour leur transfert par courriel, comme éléments d'une URL ou d'une " +"requête HTTP POST. L'algorithme d'encodage ne doit pas être confondu avec le " +"programme :program:`uuencode`." -#: library/base64.rst:53 +#: library/base64.rst:58 msgid "" "Encode the :term:`bytes-like object` *s* using Base64 and return the " "encoded :class:`bytes`." @@ -117,7 +119,7 @@ msgstr "" "Encode un :term:`objet octet-compatible ` *s* en " "utilisant l'algorithme base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:56 +#: library/base64.rst:61 #, fuzzy msgid "" "Optional *altchars* must be a :term:`bytes-like object` of length 2 which " @@ -133,14 +135,24 @@ msgstr "" "système de fichiers. La valeur par défaut est ``None``, auquel cas " "l'alphabet standard base64 est utilisé." -#: library/base64.rst:61 +#: library/base64.rst:66 msgid "" -"May assert or raise a :exc:`ValueError` if the length of *altchars* is not " -"2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " -"object`." +"If *padded* is true (default), pad the encoded data with the '=' character " +"to a size multiple of 4. If *padded* is false, do not add the pad characters." msgstr "" -#: library/base64.rst:67 +#: library/base64.rst:323 +msgid "" +"If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at " +"most every *wrapcol* characters. If *wrapcol* is zero (default), do not " +"insert any newlines." +msgstr "" + +#: library/base64.rst:183 library/base64.rst:231 +msgid "Added the *padded* and *wrapcol* parameters." +msgstr "" + +#: library/base64.rst:81 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -149,7 +161,7 @@ msgstr "" "de caractères ASCII *s* encodée en base64 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:70 +#: library/base64.rst:84 #, fuzzy msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " @@ -160,38 +172,77 @@ msgstr "" "moins égale à 2 (les caractères additionnels sont ignorés) qui spécifie un " "alphabet alternatif pour les délimiteurs ``+`` et ``/``." -#: library/base64.rst:74 +#: library/base64.rst:88 +msgid "" +"If *padded* is true, the last group of 4 base 64 alphabet characters must be " +"padded with the '=' character. If *padded* is false, padding is neither " +"required nor recognized: the '=' character is not treated as padding but as " +"a non-alphabet character, which means it is silently discarded when " +"*validate* is false, or causes an :exc:`~binascii.Error` when *validate* is " +"true unless b'=' is included in *ignorechars*." +msgstr "" + +#: library/base64.rst:96 msgid "" "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "" "Une exception :exc:`binascii.Error` est levée si *s* n'est pas remplie à une " "longueur attendue." -#: library/base64.rst:77 +#: library/base64.rst:99 msgid "" -"If *validate* is ``False`` (the default), characters that are neither in the " -"normal base-64 alphabet nor the alternative alphabet are discarded prior to " -"the padding check. If *validate* is ``True``, these non-alphabet characters " -"in the input result in a :exc:`binascii.Error`." +"If *ignorechars* is specified, it should be a :term:`bytes-like object` " +"containing characters to ignore from the input when *validate* is true. If " +"*ignorechars* contains the pad character ``'='``, the pad characters " +"presented before the end of the encoded data and the excess pad characters " +"will be ignored. The default value of *validate* is ``True`` if " +"*ignorechars* is specified, ``False`` otherwise." +msgstr "" + +#: library/base64.rst:107 +#, fuzzy +msgid "" +"If *validate* is false, characters that are neither in the normal base-64 " +"alphabet nor (if *ignorechars* is not specified) the alternative alphabet " +"are discarded prior to the padding check, but the ``+`` and ``/`` characters " +"keep their meaning if they are not in *altchars* (they will be discarded in " +"future Python versions)." msgstr "" "Si *validate* est ``False`` (par défaut), les caractères qui ne sont ni dans " "l'alphabet base64 normal, ni dans l'alphabet alternatif, sont ignorés avant " "la vérification de la longueur du remplissage. Si *validate* est ``True``, " -"les caractères hors de l'alphabet de l'entrée produisent une :exc:`binascii." -"Error`." +"les caractères hors de l'alphabet de l'entrée produisent " +"une :exc:`binascii.Error`." + +#: library/base64.rst:114 +msgid "" +"If *validate* is true, these non-alphabet characters in the input result in " +"a :exc:`binascii.Error`." +msgstr "" -#: library/base64.rst:83 +#: library/base64.rst:117 msgid "" -"For more information about the strict base64 check, see :func:`binascii." -"a2b_base64`" +"If *canonical* is true, non-zero padding bits are rejected. " +"See :func:`binascii.a2b_base64` for details." +msgstr "" + +#: library/base64.rst:120 +msgid "" +"For more information about the strict base64 check, " +"see :func:`binascii.a2b_base64`" +msgstr "" + +#: library/base64.rst:220 library/base64.rst:247 +msgid "Added the *canonical*, *ignorechars*, and *padded* parameters." msgstr "" -#: library/base64.rst:85 +#: library/base64.rst:125 msgid "" -"May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." +"Accepting the ``+`` and ``/`` characters with an alternative alphabet is now " +"deprecated." msgstr "" -#: library/base64.rst:89 +#: library/base64.rst:132 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." @@ -199,40 +250,55 @@ msgstr "" "Encode un :term:`objet octet-compatible ` *s* en " "utilisant l'alphabet standard base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:95 +#: library/base64.rst:138 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." msgstr "" "Décode un :term:`objet octet-compatible ` ou une chaîne " -"de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie les :" -"class:`bytes` décodés." +"de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie " +"les :class:`bytes` décodés." -#: library/base64.rst:101 +#: library/base64.rst:144 +#, fuzzy msgid "" "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " "alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" "`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. " -"The result can still contain ``=``." +"The result can still contain ``=`` if *padded* is true (default)." msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "un alphabet sûr pour les URL et systèmes de fichiers qui substitue ``-`` et " -"``_`` à ``+`` et ``/`` dans l'alphabet standard base64 et renvoie les :class:" -"`bytes` encodés." +"``_`` à ``+`` et ``/`` dans l'alphabet standard base64 et renvoie " +"les :class:`bytes` encodés." -#: library/base64.rst:110 +#: library/base64.rst:150 +msgid "Added the *padded* parameter." +msgstr "" + +#: library/base64.rst:156 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " "filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " -"instead of ``/`` in the standard Base64 alphabet, and return the decoded :" -"class:`bytes`." +"instead of ``/`` in the standard Base64 alphabet, and return the " +"decoded :class:`bytes`." msgstr "" "Décode un :term:`objet octet-compatible ` ou une chaîne " "de caractères ASCII *s* utilisant un alphabet sûr pour les URL et systèmes " "de fichiers qui substitue ``-`` et ``_`` à ``+`` et ``/`` dans l'alphabet " "standard base64 et renvoie les :class:`bytes` décodés." -#: library/base64.rst:119 +#: library/base64.rst:162 +msgid "" +"Added the *padded* parameter. Padding of input is no longer required by " +"default." +msgstr "" + +#: library/base64.rst:166 +msgid "Accepting the ``+`` and ``/`` characters is now deprecated." +msgstr "" + +#: library/base64.rst:172 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." @@ -240,7 +306,20 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base32 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:125 +#: library/base64.rst:175 +msgid "" +"If *padded* is true (default), pad the encoded data with the '=' character " +"to a size multiple of 8. If *padded* is false, do not add the pad characters." +msgstr "" + +#: library/base64.rst:256 library/base64.rst:421 +msgid "" +"If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at " +"most every *wrapcol* characters. If *wrapcol* is zero (default), do not add " +"any newlines." +msgstr "" + +#: library/base64.rst:189 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -249,7 +328,7 @@ msgstr "" "de caractères ASCII *s* encodé en base32 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:176 +#: library/base64.rst:269 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." @@ -258,7 +337,7 @@ msgstr "" "en minuscules est acceptable comme entrée. Pour des raisons de sécurité, " "cette option est à ``False`` par défaut." -#: library/base64.rst:132 +#: library/base64.rst:196 #, fuzzy msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " @@ -277,7 +356,33 @@ msgstr "" "la lettre O). Pour des raisons de sécurité, le défaut est ``None``, de telle " "sorte que 0 et 1 ne sont pas autorisés dans l'entrée." -#: library/base64.rst:180 +#: library/base64.rst:203 +msgid "" +"If *padded* is true, the last group of 8 base 32 alphabet characters must be " +"padded with the '=' character. If *padded* is false, padding is neither " +"required nor recognized: the '=' character is not treated as padding but as " +"a non-alphabet character, which means it raises an :exc:`~binascii.Error` " +"unless b'=' is included in *ignorechars*." +msgstr "" + +#: library/base64.rst:273 library/base64.rst:439 +#, fuzzy +msgid "" +"*ignorechars* should be a :term:`bytes-like object` containing characters to " +"ignore from the input." +msgstr "" +"*ignorechars* doit être un :term:`bytes-like object` ou une chaîne ASCII " +"contenant des caractères à ignorer dans l'entrée. Il ne doit contenir que " +"des caractères d'espacement et contient par défaut l'ensemble des caractères " +"d'espacement de l'alphabet ASCII." + +#: library/base64.rst:213 +msgid "" +"If *canonical* is true, non-zero padding bits are rejected. " +"See :func:`binascii.a2b_base32` for details." +msgstr "" + +#: library/base64.rst:276 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." @@ -285,19 +390,19 @@ msgstr "" "Une exception :exc:`binascii.Error` est levée si *s* n'est pas remplie à une " "longueur attendue ou si elle contient des caractères hors de l'alphabet." -#: library/base64.rst:146 +#: library/base64.rst:226 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:154 +#: library/base64.rst:237 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:157 +#: library/base64.rst:240 msgid "" "This version does not allow the digit 0 (zero) to the letter O (oh) and " "digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " @@ -305,7 +410,7 @@ msgid "" "interchangeable." msgstr "" -#: library/base64.rst:167 +#: library/base64.rst:253 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." @@ -313,7 +418,11 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base16 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:173 +#: library/base64.rst:388 library/base64.rst:430 +msgid "Added the *wrapcol* parameter." +msgstr "" + +#: library/base64.rst:266 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -322,7 +431,68 @@ msgstr "" "de caractères ASCII *s* encodé en base16 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:187 +#: library/base64.rst:280 +msgid "Added the *ignorechars* parameter." +msgstr "" + +#: library/base64.rst:287 +msgid "Base85 Encodings" +msgstr "" + +#: library/base64.rst:289 +msgid "" +"Base85 encoding is a family of algorithms which represent four bytes using " +"five ASCII characters. Originally implemented in the Unix ``btoa(1)`` " +"utility, a version of it was later adopted by Adobe in the PostScript " +"language and is standardized in PDF 2.0 (ISO 32000-2). This version, in both " +"its ``btoa`` and PDF variants, is implemented by :func:`a85encode`." +msgstr "" + +#: library/base64.rst:296 +msgid "" +"A separate version, using a different output character set, was defined as " +"an April Fool's joke in :rfc:`1924` but is now used by Git and other " +"software. This version is implemented by :func:`b85encode`." +msgstr "" + +#: library/base64.rst:300 +msgid "" +"Finally, a third version, using yet another output character set designed " +"for safe inclusion in programming language strings, is defined by ZeroMQ and " +"implemented here by :func:`z85encode`." +msgstr "" + +#: library/base64.rst:304 +msgid "" +"The functions present in this module differ in how they handle the following:" +msgstr "" + +#: library/base64.rst:306 +msgid "Whether to include and expect enclosing ``<~`` and ``~>`` markers." +msgstr "" + +#: library/base64.rst:307 +msgid "Whether to fold the input into multiple lines." +msgstr "" + +#: library/base64.rst:308 +msgid "The set of ASCII characters used for encoding." +msgstr "" + +#: library/base64.rst:309 +msgid "Compact encodings of sequences of spaces and null bytes." +msgstr "" + +#: library/base64.rst:310 +msgid "The encoding of zero-padding bytes applied to the input." +msgstr "" + +#: library/base64.rst:312 +msgid "" +"Refer to the documentation of the individual functions for more information." +msgstr "" + +#: library/base64.rst:316 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." @@ -330,46 +500,35 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme Ascii85 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:190 +#: library/base64.rst:319 +#, fuzzy msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " -"feature is not supported by the \"standard\" Ascii85 encoding." +"feature is not supported by the standard encoding used in PDF." msgstr "" "L'option *foldspaces* permet d'utiliser la séquence spéciale 'y' à la place " "de quatre espaces consécutives (ASCII ``0x20``) comme pris en charge par " "*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " "Ascii85." -#: library/base64.rst:194 -#, fuzzy -msgid "" -"*wrapcol* controls whether the output should have newline (``b'\\n'``) " -"characters added to it. If this is non-zero, each output line will be at " -"most this many characters long, excluding the trailing newline." -msgstr "" -"*wrapcol* contrôle l'ajout de caractères de saut de ligne (``b'\\n'``) à la " -"sortie. Chaque ligne de sortie contient au maximum *wrapcol* caractères si " -"cette option diffère de zéro." - -#: library/base64.rst:198 +#: library/base64.rst:327 msgid "" -"*pad* controls whether the input is padded to a multiple of 4 before " -"encoding. Note that the ``btoa`` implementation always pads." +"*pad* controls whether zero-padding applied to the end of the input is fully " +"retained in the output encoding, as done by ``btoa``, producing an exact " +"multiple of 5 bytes of output. This is not part of the standard encoding " +"used in PDF, as it does not preserve the length of the data." msgstr "" -"*pad* spécifie l'ajout de caractères de remplissage (*padding* en anglais) à " -"l'entrée jusqu'à ce que sa longueur soit un multiple de 4 avant encodage. " -"Notez que l'implémentation ``btoa`` effectue systématiquement ce remplissage." -#: library/base64.rst:201 +#: library/base64.rst:333 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " -"``~>``, which is used by the Adobe implementation." +"``~>``, as in a PostScript base-85 string literal. Note that while " +"ASCII85Decode streams in PDF documents *must* be terminated with ``~>``, " +"they *must not* use a leading ``<~``." msgstr "" -"*adobe* contrôle si oui ou non la séquence encodée d'octets est encadrée par " -"``<~`` et ``~>`` comme utilisé dans l'implémentation Adobe." -#: library/base64.rst:209 +#: library/base64.rst:343 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." @@ -378,38 +537,50 @@ msgstr "" "de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:212 +#: library/base64.rst:346 +#, fuzzy msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " -"is not supported by the \"standard\" Ascii85 encoding." +"is not supported by the standard Ascii85 encoding used in PDF and PostScript." msgstr "" "L'option *foldspaces* permet d'utiliser la séquence spéciale 'y' à la place " "de quatre espaces consécutives (ASCII ``0x20``) comme pris en charge par " "*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " "Ascii85." -#: library/base64.rst:216 +#: library/base64.rst:351 msgid "" -"*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " -"is framed with <~ and ~>)." +"*adobe* controls whether the ``<~`` and ``~>`` markers are present. While " +"the leading ``<~`` is not required, the input must end with ``~>``, or " +"a :exc:`ValueError` is raised." msgstr "" -"*adobe* indique si la séquence d'entrée utilise le format Adobe Ascii85 " -"(c'est-à-dire utilise l'encadrement par ``<~`` et ``~>``)." -#: library/base64.rst:219 +#: library/base64.rst:355 +#, fuzzy msgid "" -"*ignorechars* should be a :term:`bytes-like object` or ASCII string " -"containing characters to ignore from the input. This should only contain " -"whitespace characters, and by default contains all whitespace characters in " -"ASCII." +"*ignorechars* should be a :term:`bytes-like object` containing characters to " +"ignore from the input. This should only contain whitespace characters, and " +"by default contains all whitespace characters in ASCII." msgstr "" "*ignorechars* doit être un :term:`bytes-like object` ou une chaîne ASCII " "contenant des caractères à ignorer dans l'entrée. Il ne doit contenir que " "des caractères d'espacement et contient par défaut l'ensemble des caractères " "d'espacement de l'alphabet ASCII." -#: library/base64.rst:229 +#: library/base64.rst:360 +msgid "" +"If *canonical* is true, non-canonical encodings are rejected. " +"See :func:`binascii.a2b_ascii85` for details." +msgstr "" + +#: library/base64.rst:365 +msgid "" +"Added the *canonical* parameter. Single-character final groups are now " +"always rejected as encoding violations." +msgstr "" + +#: library/base64.rst:373 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." @@ -418,54 +589,73 @@ msgstr "" "l'algorithme base85 (tel qu'utilisé par exemple par le programme *git-diff* " "sur des données binaires) et renvoie les :class:`bytes` encodés." -#: library/base64.rst:232 +#: library/base64.rst:376 msgid "" -"If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " -"multiple of 4 bytes before encoding." +"The input is padded with ``b'\\0'`` so its length is a multiple of 4 bytes " +"before encoding. If *pad* is true, all the resulting characters are " +"retained in the output, which will always be a multiple of 5 bytes, and thus " +"the length of the data may not be preserved on decoding." msgstr "" -"Si *pad* est vrai, des caractères de remplissage ``b'\\0'`` (*padding* en " -"anglais) sont ajoutés à l'entrée jusqu'à ce que sa longueur soit un multiple " -"de 4 octets avant encodage." -#: library/base64.rst:240 +#: library/base64.rst:394 +#, fuzzy msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " -"return the decoded :class:`bytes`. Padding is implicitly removed, if " -"necessary." +"return the decoded :class:`bytes`." msgstr "" "Décode un :term:`objet octet-compatible ` ou une chaîne " -"de caractères ASCII *b* encodé en base85 et renvoie les :class:`bytes` " -"décodés. Les caractères de remplissage sont implicitement retirés si " -"nécessaire." +"de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " +"décodés." + +#: library/base64.rst:442 +msgid "" +"If *canonical* is true, non-canonical encodings are rejected. " +"See :func:`binascii.a2b_base85` for details." +msgstr "" -#: library/base64.rst:249 +#: library/base64.rst:447 +msgid "" +"Added the *canonical* and *ignorechars* parameters. Single-character final " +"groups are now always rejected as encoding violations." +msgstr "" + +#: library/base64.rst:413 #, fuzzy msgid "" "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and " -"return the encoded :class:`bytes`. See `Z85 specification `_ for more information." +"return the encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet octet-compatible ` *s* en " +"utilisant l'algorithme base64 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:416 +msgid "" +"The input is padded with ``b'\\0'`` so its length is a multiple of 4 bytes " +"before encoding. If *pad* is true, all the resulting characters are " +"retained in the output, which will always be a multiple of 5 bytes, as " +"required by the ZeroMQ standard." msgstr "" -"Encode un :term:`objet byte-compatible ` *s* en utilisant " -"l'algorithme base85 (tel qu'utilisé par exemple par le programme *git-diff* " -"sur des données binaires) et renvoie les :class:`bytes` encodés." -#: library/base64.rst:258 +#: library/base64.rst:427 +msgid "The *pad* parameter was added." +msgstr "" + +#: library/base64.rst:436 #, fuzzy msgid "" "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and " -"return the decoded :class:`bytes`. See `Z85 specification `_ for more information." +"return the decoded :class:`bytes`." msgstr "" "Décode un :term:`objet octet-compatible ` ou une chaîne " -"de caractères ASCII *b* encodé en base85 et renvoie les :class:`bytes` " -"décodés. Les caractères de remplissage sont implicitement retirés si " -"nécessaire." +"de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " +"décodés." -#: library/base64.rst:265 -msgid "The legacy interface:" +#: library/base64.rst:456 +#, fuzzy +msgid "Legacy Interface" msgstr "L'interface historique :" -#: library/base64.rst:269 +#: library/base64.rst:460 msgid "" "Decode the contents of the binary *input* file and write the resulting " "binary data to the *output* file. *input* and *output* must be :term:`file " @@ -473,11 +663,11 @@ msgid "" "returns an empty bytes object." msgstr "" "Décode le contenu d'un fichier binaire *input* et écrit les données binaires " -"résultantes dans le fichier *output*. *input* et *output* doivent être des :" -"term:`objets fichiers `. *input* est lu jusqu'à ce que ``input." -"readline()`` renvoie un objet *bytes* vide." +"résultantes dans le fichier *output*. *input* et *output* doivent être " +"des :term:`objets fichiers `. *input* est lu jusqu'à ce que " +"``input.readline()`` renvoie un objet *bytes* vide." -#: library/base64.rst:277 +#: library/base64.rst:468 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." @@ -486,14 +676,15 @@ msgstr "" "contenir une ou plusieurs lignes de données encodées en base64 et renvoie " "les :class:`bytes` décodés." -#: library/base64.rst:285 +#: library/base64.rst:476 msgid "" "Encode the contents of the binary *input* file and write the resulting " -"base64 encoded data to the *output* file. *input* and *output* must be :term:" -"`file objects `. *input* will be read until ``input.read()`` " -"returns an empty bytes object. :func:`encode` inserts a newline character " -"(``b'\\n'``) after every 76 bytes of the output, as well as ensuring that " -"the output always ends with a newline, as per :rfc:`2045` (MIME)." +"base64 encoded data to the *output* file. *input* and *output* must " +"be :term:`file objects `. *input* will be read until " +"``input.read()`` returns an empty bytes object. :func:`encode` inserts a " +"newline character (``b'\\n'``) after every 76 bytes of the output, as well " +"as ensuring that the output always ends with a newline, as per :rfc:`2045` " +"(MIME)." msgstr "" "Encode le contenu du fichier binaire *input* et écrit les données encodées " "en base64 résultantes dans le fichier *output. *input* et *output* doivent " @@ -503,7 +694,7 @@ msgstr "" "sortie et assure que celle-ci se termine par une nouvelle ligne, comme " "spécifié par la :rfc:`2045` (MIME)." -#: library/base64.rst:295 +#: library/base64.rst:486 msgid "" "Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " "data, and return :class:`bytes` containing the base64-encoded data, with " @@ -516,33 +707,33 @@ msgstr "" "(``b'\\n'``) est inséré tous les 76 octets de sortie et celle-ci se termine " "par une nouvelle ligne, comme spécifié par la :rfc:`2045` (MIME)." -#: library/base64.rst:303 +#: library/base64.rst:494 msgid "An example usage of the module:" msgstr "Un exemple d'utilisation du module :" -#: library/base64.rst:316 +#: library/base64.rst:507 msgid "Security Considerations" msgstr "Considérations de sécurité" -#: library/base64.rst:318 +#: library/base64.rst:509 msgid "" "A new security considerations section was added to :rfc:`4648` (section 12); " "it's recommended to review the security section for any code deployed to " "production." msgstr "" -#: library/base64.rst:323 +#: library/base64.rst:514 msgid "Module :mod:`binascii`" msgstr "Module :mod:`binascii`" -#: library/base64.rst:324 +#: library/base64.rst:515 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" "Module secondaire contenant les conversions ASCII vers binaire et binaire " "vers ASCII." -#: library/base64.rst:326 +#: library/base64.rst:517 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " @@ -552,7 +743,7 @@ msgstr "" "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies*" -#: library/base64.rst:327 +#: library/base64.rst:518 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." @@ -560,6 +751,105 @@ msgstr "" "La Section 5.2, \"*Base64 Content-Transfer-Encoding*\", donne la définition " "de l'encodage base64." +#: library/base64.rst:521 +msgid "" +"`ISO 32000-2 Portable document format - Part 2: PDF 2.0 `_" +msgstr "" + +#: library/base64.rst:522 +msgid "" +"Section 7.4.3, \"ASCII85Decode Filter,\" provides the definition of the " +"Ascii85 encoding used in PDF and PostScript, including the output character " +"set and the details of data length preservation using zero-padding and " +"partial output groups." +msgstr "" + +#: library/base64.rst:527 +msgid "`ZeroMQ RFC 32/Z85 `_" +msgstr "" + +#: library/base64.rst:528 +msgid "" +"The \"Formal Specification\" section provides the character set used in Z85." +msgstr "" + +#, fuzzy +#~ msgid "" +#~ "*wrapcol* controls whether the output should have newline (``b'\\n'``) " +#~ "characters added to it. If this is non-zero, each output line will be at " +#~ "most this many characters long, excluding the trailing newline." +#~ msgstr "" +#~ "*wrapcol* contrôle l'ajout de caractères de saut de ligne (``b'\\n'``) à " +#~ "la sortie. Chaque ligne de sortie contient au maximum *wrapcol* " +#~ "caractères si cette option diffère de zéro." + +#~ msgid "" +#~ "*pad* controls whether the input is padded to a multiple of 4 before " +#~ "encoding. Note that the ``btoa`` implementation always pads." +#~ msgstr "" +#~ "*pad* spécifie l'ajout de caractères de remplissage (*padding* en " +#~ "anglais) à l'entrée jusqu'à ce que sa longueur soit un multiple de 4 " +#~ "avant encodage. Notez que l'implémentation ``btoa`` effectue " +#~ "systématiquement ce remplissage." + +#~ msgid "" +#~ "*adobe* controls whether the encoded byte sequence is framed with ``<~`` " +#~ "and ``~>``, which is used by the Adobe implementation." +#~ msgstr "" +#~ "*adobe* contrôle si oui ou non la séquence encodée d'octets est encadrée " +#~ "par ``<~`` et ``~>`` comme utilisé dans l'implémentation Adobe." + +#~ msgid "" +#~ "*adobe* controls whether the input sequence is in Adobe Ascii85 format " +#~ "(i.e. is framed with <~ and ~>)." +#~ msgstr "" +#~ "*adobe* indique si la séquence d'entrée utilise le format Adobe Ascii85 " +#~ "(c'est-à-dire utilise l'encadrement par ``<~`` et ``~>``)." + +#~ msgid "" +#~ "If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " +#~ "multiple of 4 bytes before encoding." +#~ msgstr "" +#~ "Si *pad* est vrai, des caractères de remplissage ``b'\\0'`` (*padding* en " +#~ "anglais) sont ajoutés à l'entrée jusqu'à ce que sa longueur soit un " +#~ "multiple de 4 octets avant encodage." + +#~ msgid "" +#~ "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* " +#~ "and return the decoded :class:`bytes`. Padding is implicitly removed, if " +#~ "necessary." +#~ msgstr "" +#~ "Décode un :term:`objet octet-compatible ` ou une " +#~ "chaîne de caractères ASCII *b* encodé en base85 et renvoie " +#~ "les :class:`bytes` décodés. Les caractères de remplissage sont " +#~ "implicitement retirés si nécessaire." + +#, fuzzy +#~ msgid "" +#~ "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) " +#~ "and return the encoded :class:`bytes`. See `Z85 specification `_ for more information." +#~ msgstr "" +#~ "Encode un :term:`objet byte-compatible ` *s* en " +#~ "utilisant l'algorithme base85 (tel qu'utilisé par exemple par le " +#~ "programme *git-diff* sur des données binaires) et renvoie " +#~ "les :class:`bytes` encodés." + +#, fuzzy +#~ msgid "" +#~ "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and " +#~ "return the decoded :class:`bytes`. See `Z85 specification `_ for more information." +#~ msgstr "" +#~ "Décode un :term:`objet octet-compatible ` ou une " +#~ "chaîne de caractères ASCII *b* encodé en base85 et renvoie " +#~ "les :class:`bytes` décodés. Les caractères de remplissage sont " +#~ "implicitement retirés si nécessaire." + +#~ msgid "The modern interface provides:" +#~ msgstr "L'interface moderne propose :" + #~ msgid "base64" #~ msgstr "base64" diff --git a/library/bdb.po b/library/bdb.po index a75adfde4..f6e3cf58d 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -25,7 +25,7 @@ msgstr "**Code source :** :source:`Lib/bdb.py`" #: library/bdb.rst:11 msgid "" -"The :mod:`bdb` module handles basic debugger functions, like setting " +"The :mod:`!bdb` module handles basic debugger functions, like setting " "breakpoints or managing execution via the debugger." msgstr "" @@ -38,7 +38,8 @@ msgid "Exception raised by the :class:`Bdb` class for quitting the debugger." msgstr "" #: library/bdb.rst:21 -msgid "The :mod:`bdb` module also defines two classes:" +#, fuzzy +msgid "The :mod:`!bdb` module also defines two classes:" msgstr "Le module :mod:`bdb` définis deux classes :" #: library/bdb.rst:25 @@ -58,10 +59,10 @@ msgstr "" #: library/bdb.rst:33 msgid "" "When creating a breakpoint, its associated :attr:`file name ` should " -"be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:" -"`hit ` will be counted when the first line of that function is " -"executed. A :attr:`conditional ` breakpoint always counts a :attr:" -"`hit `." +"be in canonical form. If a :attr:`funcname` is defined, a " +"breakpoint :attr:`hit ` will be counted when the first line of that " +"function is executed. A :attr:`conditional ` breakpoint always counts " +"a :attr:`hit `." msgstr "" #: library/bdb.rst:39 @@ -158,8 +159,8 @@ msgstr "" #: library/bdb.rst:110 msgid "" -"Dictionary of :class:`Breakpoint` instances indexed by (:attr:`file`, :attr:" -"`line`) tuples." +"Dictionary of :class:`Breakpoint` instances indexed by " +"(:attr:`file`, :attr:`line`) tuples." msgstr "" #: library/bdb.rst:115 @@ -177,8 +178,8 @@ msgstr "" #: library/bdb.rst:125 msgid "" "This class takes care of the details of the trace facility; a derived class " -"should implement user interaction. The standard debugger class (:class:`pdb." -"Pdb`) is an example." +"should implement user interaction. The standard debugger class " +"(:class:`pdb.Pdb`) is an example." msgstr "" #: library/bdb.rst:129 @@ -191,288 +192,304 @@ msgid "" msgstr "" #: library/bdb.rst:135 +msgid "" +"The *backend* argument specifies the backend to use for :class:`Bdb`. It can " +"be either ``'settrace'`` or ``'monitoring'``. ``'settrace'`` " +"uses :func:`sys.settrace` which has the best backward compatibility. The " +"``'monitoring'`` backend uses the new :mod:`sys.monitoring` that was " +"introduced in Python 3.12, which can be much more efficient because it can " +"disable unused events. We are trying to keep the exact interfaces for both " +"backends, but there are some differences. The debugger developers are " +"encouraged to use the ``'monitoring'`` backend to achieve better performance." +msgstr "" + +#: library/bdb.rst:145 #, fuzzy msgid "Added the *skip* parameter." msgstr "L'argument *skip*." -#: library/bdb.rst:138 +#: library/bdb.rst:148 +#, fuzzy +msgid "Added the *backend* parameter." +msgstr "L'argument *skip*." + +#: library/bdb.rst:151 msgid "" "The following methods of :class:`Bdb` normally don't need to be overridden." msgstr "" -#: library/bdb.rst:142 +#: library/bdb.rst:155 msgid "Return canonical form of *filename*." msgstr "" -#: library/bdb.rst:144 +#: library/bdb.rst:157 msgid "" -"For real file names, the canonical form is an operating-system-dependent, :" -"func:`case-normalized ` :func:`absolute path `. A *filename* with angle brackets, such as ``\"\"`` " -"generated in interactive mode, is returned unchanged." +"For real file names, the canonical form is an operating-system-" +"dependent, :func:`case-normalized ` :func:`absolute path " +"`. A *filename* with angle brackets, such as " +"``\"\"`` generated in interactive mode, is returned unchanged." msgstr "" -#: library/bdb.rst:151 +#: library/bdb.rst:164 +msgid "" +"Start tracing. For ``'settrace'`` backend, this method is equivalent to " +"``sys.settrace(self.trace_dispatch)``" +msgstr "" + +#: library/bdb.rst:171 msgid "" -"Set the :attr:`!botframe`, :attr:`!stopframe`, :attr:`!returnframe` and :" -"attr:`quitting ` attributes with values ready to start " +"Stop tracing. For ``'settrace'`` backend, this method is equivalent to " +"``sys.settrace(None)``" +msgstr "" + +#: library/bdb.rst:178 +msgid "" +"Set the :attr:`!botframe`, :attr:`!stopframe`, :attr:`!returnframe` " +"and :attr:`quitting ` attributes with values ready to start " "debugging." msgstr "" -#: library/bdb.rst:156 +#: library/bdb.rst:183 msgid "" "This function is installed as the trace function of debugged frames. Its " "return value is the new trace function (in most cases, that is, itself)." msgstr "" -#: library/bdb.rst:159 +#: library/bdb.rst:186 msgid "" "The default implementation decides how to dispatch a frame, depending on the " "type of event (passed as a string) that is about to be executed. *event* can " "be one of the following:" msgstr "" -#: library/bdb.rst:163 +#: library/bdb.rst:190 msgid "``\"line\"``: A new line of code is going to be executed." msgstr "" -#: library/bdb.rst:164 +#: library/bdb.rst:191 msgid "" "``\"call\"``: A function is about to be called, or another code block " "entered." msgstr "" -#: library/bdb.rst:166 +#: library/bdb.rst:193 msgid "``\"return\"``: A function or other code block is about to return." msgstr "" -#: library/bdb.rst:167 +#: library/bdb.rst:194 msgid "``\"exception\"``: An exception has occurred." msgstr "``\"exception\"`` : Une exception est survenue." -#: library/bdb.rst:168 -msgid "``\"c_call\"``: A C function is about to be called." -msgstr "``\"c_call\"`` : Une fonction C est sur le point d'être appelée." - -#: library/bdb.rst:169 -msgid "``\"c_return\"``: A C function has returned." -msgstr "``\"c_return\"`` : Une fonction C s'est terminée." - -#: library/bdb.rst:170 -msgid "``\"c_exception\"``: A C function has raised an exception." +#: library/bdb.rst:196 +msgid "For all the events, specialized functions (see below) are called." msgstr "" -#: library/bdb.rst:172 -msgid "" -"For the Python events, specialized functions (see below) are called. For " -"the C events, no action is taken." -msgstr "" - -#: library/bdb.rst:175 +#: library/bdb.rst:198 msgid "The *arg* parameter depends on the previous event." msgstr "Le paramètre *arg* dépend de l'événement précédent." -#: library/bdb.rst:177 +#: library/bdb.rst:200 msgid "" "See the documentation for :func:`sys.settrace` for more information on the " -"trace function. For more information on code and frame objects, refer to :" -"ref:`types`." +"trace function. For more information on code and frame objects, refer " +"to :ref:`types`." msgstr "" -#: library/bdb.rst:183 +#: library/bdb.rst:206 msgid "" -"If the debugger should stop on the current line, invoke the :meth:" -"`user_line` method (which should be overridden in subclasses). Raise a :exc:" -"`BdbQuit` exception if the :attr:`quitting ` flag is set " -"(which can be set from :meth:`user_line`). Return a reference to the :meth:" -"`trace_dispatch` method for further tracing in that scope." +"If the debugger should stop on the current line, invoke " +"the :meth:`user_line` method (which should be overridden in subclasses). " +"Raise a :exc:`BdbQuit` exception if the :attr:`quitting ` " +"flag is set (which can be set from :meth:`user_line`). Return a reference " +"to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:191 +#: library/bdb.rst:214 msgid "" -"If the debugger should stop on this function call, invoke the :meth:" -"`user_call` method (which should be overridden in subclasses). Raise a :exc:" -"`BdbQuit` exception if the :attr:`quitting ` flag is set " -"(which can be set from :meth:`user_call`). Return a reference to the :meth:" -"`trace_dispatch` method for further tracing in that scope." +"If the debugger should stop on this function call, invoke " +"the :meth:`user_call` method (which should be overridden in subclasses). " +"Raise a :exc:`BdbQuit` exception if the :attr:`quitting ` " +"flag is set (which can be set from :meth:`user_call`). Return a reference " +"to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:199 +#: library/bdb.rst:222 msgid "" -"If the debugger should stop on this function return, invoke the :meth:" -"`user_return` method (which should be overridden in subclasses). Raise a :" -"exc:`BdbQuit` exception if the :attr:`quitting ` flag is set " -"(which can be set from :meth:`user_return`). Return a reference to the :" -"meth:`trace_dispatch` method for further tracing in that scope." +"If the debugger should stop on this function return, invoke " +"the :meth:`user_return` method (which should be overridden in subclasses). " +"Raise a :exc:`BdbQuit` exception if the :attr:`quitting ` " +"flag is set (which can be set from :meth:`user_return`). Return a reference " +"to the :meth:`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:207 +#: library/bdb.rst:230 msgid "" -"If the debugger should stop at this exception, invokes the :meth:" -"`user_exception` method (which should be overridden in subclasses). Raise a :" -"exc:`BdbQuit` exception if the :attr:`quitting ` flag is set " -"(which can be set from :meth:`user_exception`). Return a reference to the :" -"meth:`trace_dispatch` method for further tracing in that scope." +"If the debugger should stop at this exception, invokes " +"the :meth:`user_exception` method (which should be overridden in " +"subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting " +"` flag is set (which can be set from :meth:`user_exception`). " +"Return a reference to the :meth:`trace_dispatch` method for further tracing " +"in that scope." msgstr "" -#: library/bdb.rst:213 +#: library/bdb.rst:236 msgid "" "Normally derived classes don't override the following methods, but they may " "if they want to redefine the definition of stopping and breakpoints." msgstr "" -#: library/bdb.rst:218 +#: library/bdb.rst:241 msgid "Return ``True`` if *module_name* matches any skip pattern." msgstr "" -#: library/bdb.rst:222 +#: library/bdb.rst:245 msgid "Return ``True`` if *frame* is below the starting frame in the stack." msgstr "" -#: library/bdb.rst:226 +#: library/bdb.rst:249 msgid "Return ``True`` if there is an effective breakpoint for this line." msgstr "" -#: library/bdb.rst:228 +#: library/bdb.rst:251 msgid "" "Check whether a line or function breakpoint exists and is in effect. Delete " "temporary breakpoints based on information from :func:`effective`." msgstr "" -#: library/bdb.rst:233 +#: library/bdb.rst:256 msgid "Return ``True`` if any breakpoint exists for *frame*'s filename." msgstr "" -#: library/bdb.rst:235 +#: library/bdb.rst:258 msgid "" "Derived classes should override these methods to gain control over debugger " "operation." msgstr "" -#: library/bdb.rst:240 +#: library/bdb.rst:263 msgid "" "Called from :meth:`dispatch_call` if a break might stop inside the called " "function." msgstr "" -#: library/bdb.rst:243 +#: library/bdb.rst:266 msgid "" "*argument_list* is not used anymore and will always be ``None``. The " "argument is kept for backwards compatibility." msgstr "" -#: library/bdb.rst:248 +#: library/bdb.rst:271 msgid "" -"Called from :meth:`dispatch_line` when either :meth:`stop_here` or :meth:" -"`break_here` returns ``True``." +"Called from :meth:`dispatch_line` when either :meth:`stop_here` " +"or :meth:`break_here` returns ``True``." msgstr "" -#: library/bdb.rst:253 +#: library/bdb.rst:276 msgid "" "Called from :meth:`dispatch_return` when :meth:`stop_here` returns ``True``." msgstr "" -#: library/bdb.rst:257 +#: library/bdb.rst:280 msgid "" "Called from :meth:`dispatch_exception` when :meth:`stop_here` returns " "``True``." msgstr "" -#: library/bdb.rst:262 +#: library/bdb.rst:285 msgid "Handle how a breakpoint must be removed when it is a temporary one." msgstr "" -#: library/bdb.rst:264 +#: library/bdb.rst:287 msgid "This method must be implemented by derived classes." msgstr "" -#: library/bdb.rst:267 +#: library/bdb.rst:290 msgid "" "Derived classes and clients can call the following methods to affect the " "stepping state." msgstr "" -#: library/bdb.rst:272 +#: library/bdb.rst:295 msgid "Stop after one line of code." msgstr "Arrête après une ligne de code." -#: library/bdb.rst:276 +#: library/bdb.rst:299 msgid "Stop on the next line in or below the given frame." msgstr "" -#: library/bdb.rst:280 +#: library/bdb.rst:303 msgid "Stop when returning from the given frame." msgstr "" -#: library/bdb.rst:284 +#: library/bdb.rst:307 msgid "" "Stop when the line with the *lineno* greater than the current one is reached " "or when returning from current frame." msgstr "" -#: library/bdb.rst:289 +#: library/bdb.rst:312 msgid "" "Start debugging from *frame*. If *frame* is not specified, debugging starts " "from caller's frame." msgstr "" -#: library/bdb.rst:292 +#: library/bdb.rst:315 msgid "" ":func:`set_trace` will enter the debugger immediately, rather than on the " "next line of code to be executed." msgstr "" -#: library/bdb.rst:298 +#: library/bdb.rst:321 msgid "" "Stop only at breakpoints or when finished. If there are no breakpoints, set " "the system trace function to ``None``." msgstr "" -#: library/bdb.rst:305 +#: library/bdb.rst:328 msgid "" "Set the :attr:`!quitting` attribute to ``True``. This raises :exc:`BdbQuit` " "in the next call to one of the :meth:`!dispatch_\\*` methods." msgstr "" -#: library/bdb.rst:309 +#: library/bdb.rst:332 msgid "" "Derived classes and clients can call the following methods to manipulate " "breakpoints. These methods return a string containing an error message if " "something went wrong, or ``None`` if all is well." msgstr "" -#: library/bdb.rst:315 +#: library/bdb.rst:338 msgid "" "Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* " "passed as argument, return an error message. The *filename* should be in " "canonical form, as described in the :meth:`canonic` method." msgstr "" -#: library/bdb.rst:321 +#: library/bdb.rst:344 msgid "" "Delete the breakpoints in *filename* and *lineno*. If none were set, return " "an error message." msgstr "" -#: library/bdb.rst:326 +#: library/bdb.rst:349 msgid "" -"Delete the breakpoint which has the index *arg* in the :attr:`Breakpoint." -"bpbynumber`. If *arg* is not numeric or out of range, return an error " -"message." +"Delete the breakpoint which has the index *arg* in " +"the :attr:`Breakpoint.bpbynumber`. If *arg* is not numeric or out of range, " +"return an error message." msgstr "" -#: library/bdb.rst:332 +#: library/bdb.rst:355 msgid "" "Delete all breakpoints in *filename*. If none were set, return an error " "message." msgstr "" -#: library/bdb.rst:337 +#: library/bdb.rst:360 msgid "" "Delete all existing breakpoints. If none were set, return an error message." msgstr "" -#: library/bdb.rst:342 +#: library/bdb.rst:365 msgid "" "Return a breakpoint specified by the given number. If *arg* is a string, it " "will be converted to a number. If *arg* is a non-numeric string, if the " @@ -480,139 +497,168 @@ msgid "" "raised." msgstr "" -#: library/bdb.rst:351 +#: library/bdb.rst:374 msgid "Return ``True`` if there is a breakpoint for *lineno* in *filename*." msgstr "" -#: library/bdb.rst:355 +#: library/bdb.rst:378 msgid "" "Return all breakpoints for *lineno* in *filename*, or an empty list if none " "are set." msgstr "" -#: library/bdb.rst:360 +#: library/bdb.rst:383 msgid "Return all breakpoints in *filename*, or an empty list if none are set." msgstr "" -#: library/bdb.rst:364 +#: library/bdb.rst:387 msgid "Return all breakpoints that are set." msgstr "Donne tous les points d'arrêt définis." -#: library/bdb.rst:367 +#: library/bdb.rst:390 +msgid "" +"Derived classes and clients can call the following methods to disable and " +"restart events to achieve better performance. These methods only work when " +"using the ``'monitoring'`` backend." +msgstr "" + +#: library/bdb.rst:396 +msgid "" +"Disable the current event until the next time :func:`restart_events` is " +"called. This is helpful when the debugger is not interested in the current " +"line." +msgstr "" + +#: library/bdb.rst:404 +msgid "" +"Restart all the disabled events. This function is automatically called in " +"``dispatch_*`` methods after ``user_*`` methods are called. If the " +"``dispatch_*`` methods are not overridden, the disabled events will be " +"restarted after each user interaction." +msgstr "" + +#: library/bdb.rst:412 msgid "" "Derived classes and clients can call the following methods to get a data " "structure representing a stack trace." msgstr "" -#: library/bdb.rst:372 +#: library/bdb.rst:417 msgid "Return a list of (frame, lineno) tuples in a stack trace, and a size." msgstr "" -#: library/bdb.rst:374 +#: library/bdb.rst:419 msgid "" "The most recently called frame is last in the list. The size is the number " "of frames below the frame where the debugger was invoked." msgstr "" -#: library/bdb.rst:379 +#: library/bdb.rst:424 msgid "" "Return a string with information about a stack entry, which is a ``(frame, " "lineno)`` tuple. The return string contains:" msgstr "" -#: library/bdb.rst:382 +#: library/bdb.rst:427 msgid "The canonical filename which contains the frame." msgstr "" -#: library/bdb.rst:383 +#: library/bdb.rst:428 #, fuzzy msgid "The function name or ``\"\"``." msgstr "Le nom de la fonction, ou ``\"\"``." -#: library/bdb.rst:384 +#: library/bdb.rst:429 msgid "The input arguments." msgstr "Les arguments donnés." -#: library/bdb.rst:385 +#: library/bdb.rst:430 msgid "The return value." msgstr "Le résultat." -#: library/bdb.rst:386 +#: library/bdb.rst:431 msgid "The line of code (if it exists)." msgstr "La ligne de code (si elle existe)." -#: library/bdb.rst:389 +#: library/bdb.rst:434 msgid "" "The following two methods can be called by clients to use a debugger to " "debug a :term:`statement`, given as a string." msgstr "" -#: library/bdb.rst:394 +#: library/bdb.rst:439 msgid "" "Debug a statement executed via the :func:`exec` function. *globals* " "defaults to :attr:`!__main__.__dict__`, *locals* defaults to *globals*." msgstr "" -#: library/bdb.rst:399 +#: library/bdb.rst:444 msgid "" "Debug an expression executed via the :func:`eval` function. *globals* and " "*locals* have the same meaning as in :meth:`run`." msgstr "" -#: library/bdb.rst:404 +#: library/bdb.rst:449 msgid "For backwards compatibility. Calls the :meth:`run` method." msgstr "" -#: library/bdb.rst:408 +#: library/bdb.rst:453 msgid "Debug a single function call, and return its result." msgstr "" -#: library/bdb.rst:411 +#: library/bdb.rst:456 msgid "Finally, the module defines the following functions:" msgstr "" -#: library/bdb.rst:415 +#: library/bdb.rst:460 msgid "" -"Return ``True`` if we should break here, depending on the way the :class:" -"`Breakpoint` *b* was set." +"Return ``True`` if we should break here, depending on the way " +"the :class:`Breakpoint` *b* was set." msgstr "" -#: library/bdb.rst:418 +#: library/bdb.rst:463 msgid "" -"If it was set via line number, it checks if :attr:`b.line ` is the same as the one in *frame*. If the breakpoint was set via :" -"attr:`function name `, we have to check we are in " -"the right *frame* (the right function) and if we are on its first executable " -"line." +"If it was set via line number, it checks if :attr:`b.line " +"` is the same as the one in *frame*. If the breakpoint " +"was set via :attr:`function name `, we have to " +"check we are in the right *frame* (the right function) and if we are on its " +"first executable line." msgstr "" -#: library/bdb.rst:427 +#: library/bdb.rst:472 msgid "" "Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as " "the breakpoint to act upon." msgstr "" -#: library/bdb.rst:430 +#: library/bdb.rst:475 msgid "" -"The *active breakpoint* is the first entry in :attr:`bplist ` for the (:attr:`file `, :attr:`line `) (which must exist) that is :attr:`enabled `, for which :func:`checkfuncname` is true, and that has neither a " +"The *active breakpoint* is the first entry in :attr:`bplist " +"` for the (:attr:`file " +"`, :attr:`line `) (which must " +"exist) that is :attr:`enabled `, for " +"which :func:`checkfuncname` is true, and that has neither a " "false :attr:`condition ` nor positive :attr:`ignore " "` count. The *flag*, meaning that a temporary " -"breakpoint should be deleted, is ``False`` only when the :attr:`cond ` cannot be evaluated (in which case, :attr:`ignore ` count is ignored)." +"breakpoint should be deleted, is ``False`` only when the :attr:`cond " +"` cannot be evaluated (in which case, :attr:`ignore " +"` count is ignored)." msgstr "" -#: library/bdb.rst:441 +#: library/bdb.rst:486 msgid "If no such entry exists, then ``(None, None)`` is returned." msgstr "" -#: library/bdb.rst:446 +#: library/bdb.rst:491 msgid "Start debugging with a :class:`Bdb` instance from caller's frame." msgstr "" +#~ msgid "``\"c_call\"``: A C function is about to be called." +#~ msgstr "``\"c_call\"`` : Une fonction C est sur le point d'être appelée." + +#~ msgid "``\"c_return\"``: A C function has returned." +#~ msgstr "``\"c_return\"`` : Une fonction C s'est terminée." + #~ msgid "If it is temporary or not." #~ msgstr "S'il est temporaire ou non." diff --git a/library/binary.po b/library/binary.po index 1435010a1..ca729c2ba 100644 --- a/library/binary.po +++ b/library/binary.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2017-11-07 23:13+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -45,5 +45,5 @@ msgid "" "In addition, see the documentation for Python's built-in binary data types " "in :ref:`binaryseq`." msgstr "" -"En complément, consultez la documentation des types natifs binaires dans :" -"ref:`binaryseq`." +"En complément, consultez la documentation des types natifs binaires " +"dans :ref:`binaryseq`." diff --git a/library/binascii.po b/library/binascii.po index e67838562..b49d8df1b 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2020-05-10 13:40+0200\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -18,15 +18,15 @@ msgstr "" #: library/binascii.rst:2 #, fuzzy msgid ":mod:`!binascii` --- Convert between binary and ASCII" -msgstr ":mod:`binascii` --- Conversion entre binaire et ASCII" +msgstr ":mod:`binascii` — Conversion entre binaire et ASCII" #: library/binascii.rst:13 #, fuzzy msgid "" -"The :mod:`binascii` module contains a number of methods to convert between " +"The :mod:`!binascii` module contains a number of methods to convert between " "binary and various ASCII-encoded binary representations. Normally, you will " "not use these functions directly but use wrapper modules like :mod:`base64` " -"instead. The :mod:`binascii` module contains low-level functions written in " +"instead. The :mod:`!binascii` module contains low-level functions written in " "C for greater speed that are used by the higher-level modules." msgstr "" "Le module :mod:`binascii` contient des méthodes pour convertir entre binaire " @@ -44,9 +44,10 @@ msgid "" "the buffer protocol)." msgstr "" "La fonction ``a2b_*`` accepte des chaînes de caractères contenant seulement " -"des caractères ASCII. D’autres fonctions acceptent seulement des objets :" -"term:`bytes et similaire ` (tel que :class:`bytes`, :" -"class:`bytearray` et autres objets qui supportent le protocole tampon)." +"des caractères ASCII. D’autres fonctions acceptent seulement des " +"objets :term:`bytes et similaire ` (tel " +"que :class:`bytes`, :class:`bytearray` et autres objets qui supportent le " +"protocole tampon)." #: library/binascii.rst:27 msgid "ASCII-only unicode strings are now accepted by the ``a2b_*`` functions." @@ -55,7 +56,8 @@ msgstr "" "sont désormais acceptées par les fonctions ``a2b_*``." #: library/binascii.rst:31 -msgid "The :mod:`binascii` module defines the following functions:" +#, fuzzy +msgid "The :mod:`!binascii` module defines the following functions:" msgstr "Le module :mod:`binascii` définit les fonctions suivantes :" #: library/binascii.rst:36 @@ -85,7 +87,7 @@ msgstr "" msgid "Added the *backtick* parameter." msgstr "Ajout du paramètre *backtick*." -#: library/binascii.rst:53 +#: library/binascii.rst:54 msgid "" "Convert a block of base64 data back to binary and return the binary data. " "More than one line may be passed at a time." @@ -93,55 +95,342 @@ msgstr "" "Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " "binaire. Plus d’une ligne peut être passé à la fois." -#: library/binascii.rst:56 +#: library/binascii.rst:57 +msgid "" +"Optional *alphabet* must be a :class:`bytes` object of length 64 which " +"specifies an alternative alphabet." +msgstr "" + +#: library/binascii.rst:60 +msgid "" +"If *padded* is true, the last group of 4 base 64 alphabet characters must be " +"padded with the '=' character. If *padded* is false, padding is neither " +"required nor recognized: the '=' character is not treated as padding but as " +"a non-alphabet character, which means it is silently discarded when " +"*strict_mode* is false, or causes an :exc:`~binascii.Error` when " +"*strict_mode* is true unless b'=' is included in *ignorechars*." +msgstr "" + +#: library/binascii.rst:68 +msgid "" +"If *ignorechars* is specified, it should be a :term:`bytes-like object` " +"containing characters to ignore from the input when *strict_mode* is true. " +"If *ignorechars* contains the pad character ``'='``, the pad characters " +"presented before the end of the encoded data and the excess pad characters " +"will be ignored. The default value of *strict_mode* is ``True`` if " +"*ignorechars* is specified, ``False`` otherwise." +msgstr "" + +#: library/binascii.rst:76 msgid "" "If *strict_mode* is true, only valid base64 data will be converted. Invalid " "base64 data will raise :exc:`binascii.Error`." msgstr "" -#: library/binascii.rst:59 +#: library/binascii.rst:79 msgid "Valid base64:" msgstr "" -#: library/binascii.rst:61 -msgid "Conforms to :rfc:`3548`." +#: library/binascii.rst:81 +msgid "Conforms to :rfc:`4648`." msgstr "" -#: library/binascii.rst:62 +#: library/binascii.rst:82 msgid "Contains only characters from the base64 alphabet." msgstr "" -#: library/binascii.rst:63 +#: library/binascii.rst:83 msgid "" "Contains no excess data after padding (including excess padding, newlines, " "etc.)." msgstr "" -#: library/binascii.rst:64 +#: library/binascii.rst:84 msgid "Does not start with a padding." msgstr "" -#: library/binascii.rst:66 +#: library/binascii.rst:86 +msgid "" +"If *canonical* is true, non-zero padding bits in the last group are rejected " +"with :exc:`binascii.Error`, enforcing canonical encoding as defined " +"in :rfc:`4648` section 3.5. This check is independent of *strict_mode*." +msgstr "" + +#: library/binascii.rst:90 #, fuzzy msgid "Added the *strict_mode* parameter." msgstr "Ajout du paramètre *backtick*." -#: library/binascii.rst:72 +#: library/binascii.rst:93 +msgid "" +"Added the *alphabet*, *canonical*, *ignorechars*, and *padded* parameters." +msgstr "" + +#: library/binascii.rst:99 +msgid "" +"Convert binary data to a line(s) of ASCII characters in base64 coding, as " +"specified in :rfc:`4648`." +msgstr "" + +#: library/binascii.rst:102 +msgid "" +"If *padded* is true (default), pad the encoded data with the '=' character " +"to a size multiple of 4. If *padded* is false, do not add the pad characters." +msgstr "" + +#: library/binascii.rst:166 library/binascii.rst:280 +msgid "" +"If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at " +"most every *wrapcol* characters. If *wrapcol* is zero (default), do not " +"insert any newlines." +msgstr "" + +#: library/binascii.rst:110 +msgid "" +"If *newline* is true (default), a newline character will be added at the end " +"of the output." +msgstr "" + +#: library/binascii.rst:113 +msgid "Added the *newline* parameter." +msgstr "Ajout du paramètre *newline*." + +#: library/binascii.rst:116 +#, fuzzy +msgid "Added the *alphabet*, *padded* and *wrapcol* parameters." +msgstr "Ajout du paramètre *newline*." + +#: library/binascii.rst:122 +#, fuzzy +msgid "Convert Ascii85 data back to binary and return the binary data." +msgstr "" +"Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " +"binaire. Plus d’une ligne peut être passé à la fois." + +#: library/binascii.rst:124 +msgid "" +"Valid Ascii85 data contains characters from the Ascii85 alphabet in groups " +"of five (except for the final group, which may have from two to five " +"characters). Each group encodes 32 bits of binary data in the range from " +"``0`` to ``2 ** 32 - 1``, inclusive. The special character ``z`` is accepted " +"as a short form of the group ``!!!!!``, which encodes four consecutive null " +"bytes. A single-character final group is always rejected as an encoding " +"violation." +msgstr "" + +#: library/binascii.rst:132 +msgid "" +"*foldspaces* is a flag that specifies whether the 'y' short sequence should " +"be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " +"is not supported by the \"standard\" Ascii85 encoding." +msgstr "" + +#: library/binascii.rst:136 +msgid "" +"*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " +"``~>``, as in a PostScript base-85 string literal. If *adobe* is true, a " +"leading ``<~`` is optionally accepted, while a trailing ``~>`` is " +"*required*, and :exc:`binascii.Error` is raised if it is not found." +msgstr "" + +#: library/binascii.rst:142 +msgid "" +"*ignorechars* should be a :term:`bytes-like object` containing characters to " +"ignore from the input. This should only contain whitespace characters." +msgstr "" + +#: library/binascii.rst:146 msgid "" -"Convert binary data to a line of ASCII characters in base64 coding. The " -"return value is the converted line, including a newline char if *newline* is " -"true. The output of this function conforms to :rfc:`3548`." +"If *canonical* is true, non-canonical encodings are rejected " +"with :exc:`binascii.Error`. Here \"canonical\" means the encoding " +"that :func:`b2a_ascii85` would produce: the ``z`` abbreviation must be used " +"for all-zero groups (rather than ``!!!!!``), and partial final groups must " +"use the same padding digits as the encoder." +msgstr "" + +#: library/binascii.rst:152 +msgid "Invalid Ascii85 data will raise :exc:`binascii.Error`." +msgstr "" + +#: library/binascii.rst:159 +#, fuzzy +msgid "" +"Convert binary data to a formatted sequence of ASCII characters in Ascii85 " +"coding. The return value is the converted data." msgstr "" "Convertit les données binaires en une ligne de caractères ASCII en codage " "base 64. La valeur de renvoyée et la ligne convertie, incluant un caractère " "de nouvelle ligne si *newline* est vraie. La sortie de cette fonction se " "conforme à :rfc:`3548`." -#: library/binascii.rst:76 -msgid "Added the *newline* parameter." -msgstr "Ajout du paramètre *newline*." +#: library/binascii.rst:162 +msgid "" +"*foldspaces* is an optional flag that uses the special short sequence 'y' " +"instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " +"feature is not supported by the \"standard\" Ascii85 encoding." +msgstr "" -#: library/binascii.rst:82 +#: library/binascii.rst:170 +msgid "" +"If *pad* is true, the zero-padding applied to the end of the input is fully " +"retained in the output encoding, as done by ``btoa``, producing an exact " +"multiple of 5 bytes of output. This is not part of the standard encoding " +"used in PDF, as it does not preserve the length of the data." +msgstr "" + +#: library/binascii.rst:176 +msgid "" +"*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " +"``~>``, as in a PostScript base-85 string literal. Note that while " +"ASCII85Decode streams in PDF documents *must* be terminated with ``~>``, " +"they *must not* use a leading ``<~``." +msgstr "" + +#: library/binascii.rst:186 +#, fuzzy +msgid "" +"Convert Base85 data back to binary and return the binary data. More than one " +"line may be passed at a time." +msgstr "" +"Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " +"binaire. Plus d’une ligne peut être passé à la fois." + +#: library/binascii.rst:189 +msgid "" +"Valid Base85 data contains characters from the Base85 alphabet in groups of " +"five (except for the final group, which may have from two to five " +"characters). Each group encodes 32 bits of binary data in the range from " +"``0`` to ``2 ** 32 - 1``, inclusive. A single-character final group is " +"always rejected as an encoding violation." +msgstr "" + +#: library/binascii.rst:195 +msgid "" +"Optional *alphabet* must be a :class:`bytes` object of length 85 which " +"specifies an alternative alphabet." +msgstr "" + +#: library/binascii.rst:367 +msgid "" +"*ignorechars* should be a :term:`bytes-like object` containing characters to " +"ignore from the input." +msgstr "" + +#: library/binascii.rst:201 +msgid "" +"If *canonical* is true, non-canonical encodings are rejected " +"with :exc:`binascii.Error`. Here \"canonical\" means the encoding " +"that :func:`b2a_base85` would produce: partial final groups must use the " +"same padding digits as the encoder." +msgstr "" + +#: library/binascii.rst:206 +msgid "Invalid Base85 data will raise :exc:`binascii.Error`." +msgstr "" + +#: library/binascii.rst:213 +#, fuzzy +msgid "" +"Convert binary data to a line of ASCII characters in Base85 coding. The " +"return value is the converted line." +msgstr "" +"Convertit les données binaires en une ligne de caractères ASCII en codage " +"base 64. La valeur de renvoyée et la ligne convertie, incluant un caractère " +"de nouvelle ligne si *newline* est vraie. La sortie de cette fonction se " +"conforme à :rfc:`3548`." + +#: library/binascii.rst:216 +msgid "" +"Optional *alphabet* must be a :term:`bytes-like object` of length 85 which " +"specifies an alternative alphabet." +msgstr "" + +#: library/binascii.rst:223 +msgid "" +"If *pad* is true, the zero-padding applied to the end of the input is " +"retained in the output, which will always be a multiple of 5 bytes, and thus " +"the length of the data may not be preserved on decoding." +msgstr "" + +#: library/binascii.rst:233 +#, fuzzy +msgid "Convert base32 data back to binary and return the binary data." +msgstr "" +"Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " +"binaire. Plus d’une ligne peut être passé à la fois." + +#: library/binascii.rst:235 +msgid "" +"Valid base32 data contains characters from the base32 alphabet specified " +"in :rfc:`4648` in groups of eight (if necessary, the final group is padded " +"to eight characters with ``=``). Each group encodes 40 bits of binary data " +"in the range from ``0`` to ``2 ** 40 - 1``, inclusive." +msgstr "" + +#: library/binascii.rst:241 +msgid "" +"This function does not map lowercase characters (which are invalid in " +"standard base32) to their uppercase counterparts, nor does it contextually " +"map ``0`` to ``O`` and ``1`` to ``I``/``L`` as :rfc:`4648` allows." +msgstr "" + +#: library/binascii.rst:246 +msgid "" +"Optional *alphabet* must be a :class:`bytes` object of length 32 which " +"specifies an alternative alphabet." +msgstr "" + +#: library/binascii.rst:249 +msgid "" +"If *padded* is true, the last group of 8 base 32 alphabet characters must be " +"padded with the '=' character. If *padded* is false, the '=' character is " +"treated as other non-alphabet characters (depending on the value of " +"*ignorechars*)." +msgstr "" + +#: library/binascii.rst:254 +msgid "" +"*ignorechars* should be a :term:`bytes-like object` containing characters to " +"ignore from the input. If *ignorechars* contains the pad character ``'='``, " +"the pad characters presented before the end of the encoded data and the " +"excess pad characters will be ignored." +msgstr "" + +#: library/binascii.rst:260 +msgid "" +"If *canonical* is true, non-zero padding bits in the last group are rejected " +"with :exc:`binascii.Error`, enforcing canonical encoding as defined " +"in :rfc:`4648` section 3.5." +msgstr "" + +#: library/binascii.rst:264 +msgid "Invalid base32 data will raise :exc:`binascii.Error`." +msgstr "" + +#: library/binascii.rst:270 +#, fuzzy +msgid "" +"Convert binary data to a line of ASCII characters in base32 coding, as " +"specified in :rfc:`4648`. The return value is the converted line." +msgstr "" +"Convertit les données binaires en une ligne de caractères ASCII en codage " +"base 64. La valeur de renvoyée et la ligne convertie, incluant un caractère " +"de nouvelle ligne si *newline* est vraie. La sortie de cette fonction se " +"conforme à :rfc:`3548`." + +#: library/binascii.rst:273 +msgid "" +"Optional *alphabet* must be a :term:`bytes-like object` of length 32 which " +"specifies an alternative alphabet." +msgstr "" + +#: library/binascii.rst:276 +msgid "" +"If *padded* is true (default), pad the encoded data with the '=' character " +"to a size multiple of 8. If *padded* is false, do not add the pad characters." +msgstr "" + +#: library/binascii.rst:288 msgid "" "Convert a block of quoted-printable data back to binary and return the " "binary data. More than one line may be passed at a time. If the optional " @@ -152,7 +441,7 @@ msgstr "" "optionnel *header* est présent et vrai, les traits soulignés seront décodés " "en espaces." -#: library/binascii.rst:89 +#: library/binascii.rst:295 msgid "" "Convert binary data to a line(s) of ASCII characters in quoted-printable " "encoding. The return value is the converted line(s). If the optional " @@ -175,7 +464,7 @@ msgstr "" "caractères de nouvelle ligne seront également encodés ; sinon la conversion " "de saut de ligne pourrait corrompre le flux de données binaire." -#: library/binascii.rst:102 +#: library/binascii.rst:308 msgid "" "Compute a 16-bit CRC value of *data*, starting with *value* as the initial " "CRC, and return the result. This uses the CRC-CCITT polynomial *x*:sup:`16` " @@ -183,11 +472,11 @@ msgid "" "used in the binhex4 format." msgstr "" "Calcule une valeur en CRC 16-bit de *data*, commençant par *value* comme CRC " -"initial et renvoie le résultat. Ceci utilise le CRC-CCITT polynomial *x*:sup:" -"`16` + *x*:sup:`12` + *x*:sup:`5` + 1, souvent représenté comme *0x1021*. Ce " -"CRC est utilisé dans le format *binhex4*." +"initial et renvoie le résultat. Ceci utilise le CRC-CCITT polynomial " +"*x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1, souvent représenté comme " +"*0x1021*. Ce CRC est utilisé dans le format *binhex4*." -#: library/binascii.rst:110 +#: library/binascii.rst:316 #, fuzzy msgid "" "Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an " @@ -202,11 +491,11 @@ msgstr "" "conçu pour être utilisé comme un algorithme de somme de contrôle, il ne " "convient pas comme algorithme de hachage général. Utiliser comme suit ::" -#: library/binascii.rst:122 +#: library/binascii.rst:328 msgid "The result is always unsigned." msgstr "Renvoie une valeur non-signée." -#: library/binascii.rst:128 +#: library/binascii.rst:334 msgid "" "Return the hexadecimal representation of the binary *data*. Every byte of " "*data* is converted into the corresponding 2-digit hex representation. The " @@ -216,7 +505,7 @@ msgstr "" "*data* est converti en la représentation 2 chiffres correspondante. L’objet " "octets renvoyé est donc deux fois plus long que la longueur de *data*." -#: library/binascii.rst:132 +#: library/binascii.rst:338 msgid "" "Similar functionality (but returning a text string) is also conveniently " "accessible using the :meth:`bytes.hex` method." @@ -224,7 +513,7 @@ msgstr "" "Fonctionnalité similaire est également commodément accessible en utilisant " "la méthode :meth:`bytes.hex`." -#: library/binascii.rst:135 +#: library/binascii.rst:341 msgid "" "If *sep* is specified, it must be a single character str or bytes object. It " "will be inserted in the output after every *bytes_per_sep* input bytes. " @@ -237,11 +526,11 @@ msgstr "" "droite de la sortie. Si vous souhaitez compter à partir de la gauche, " "indiquez une valeur *bytes_per_sep* négative." -#: library/binascii.rst:150 +#: library/binascii.rst:356 msgid "The *sep* and *bytes_per_sep* parameters were added." msgstr "ajout des paramètres *sep* et *bytes_per_sep*." -#: library/binascii.rst:156 +#: library/binascii.rst:362 msgid "" "Return the binary data represented by the hexadecimal string *hexstr*. This " "function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even " @@ -253,23 +542,28 @@ msgstr "" "*hexstr* doit contenir un nombre pair de chiffres hexadécimaux (qui peuvent " "être en majuscule ou minuscule), sinon une exception :exc:`Error` est levée." -#: library/binascii.rst:161 +#: library/binascii.rst:370 +#, fuzzy msgid "" -"Similar functionality (accepting only text string arguments, but more " -"liberal towards whitespace) is also accessible using the :meth:`bytes." -"fromhex` class method." +"Similar functionality (but more liberal towards whitespace) is also " +"accessible using the :meth:`bytes.fromhex` class method." msgstr "" "Une fonctionnalité similaire (n’acceptant que les arguments de chaîne de " "texte, mais plus libérale vis-à-vis des espaces blancs) est également " "accessible en utilisant la méthode de classe :meth:`bytes.fromhex`." -#: library/binascii.rst:167 +#: library/binascii.rst:373 +#, fuzzy +msgid "Added the *ignorechars* parameter." +msgstr "Ajout du paramètre *newline*." + +#: library/binascii.rst:379 msgid "Exception raised on errors. These are usually programming errors." msgstr "" "Exception levée en cas d'erreurs. Ce sont typiquement des erreurs de " "programmation." -#: library/binascii.rst:172 +#: library/binascii.rst:384 msgid "" "Exception raised on incomplete data. These are usually not programming " "errors, but may be handled by reading a little more data and trying again." @@ -278,21 +572,66 @@ msgstr "" "d’erreurs de programmation, mais elles peuvent être traitées en lisant un " "peu plus de données et en réessayant." -#: library/binascii.rst:178 +#: library/binascii.rst:390 +msgid "The Base 64 alphabet according to :rfc:`4648`." +msgstr "" + +#: library/binascii.rst:396 +msgid "" +"The \"URL and filename safe\" Base 64 alphabet according to :rfc:`4648`." +msgstr "" + +#: library/binascii.rst:402 +msgid "The uuencoding alphabet." +msgstr "" + +#: library/binascii.rst:408 +msgid "" +"The Base 64 alphabet used in the :manpage:`crypt(3)` routine and in the " +"GEDCOM format." +msgstr "" + +#: library/binascii.rst:414 +msgid "The Base 64 alphabet used in BinHex 4 (HQX) within the classic Mac OS." +msgstr "" + +#: library/binascii.rst:420 +msgid "The Base85 alphabet." +msgstr "" + +#: library/binascii.rst:426 +msgid "The Ascii85 alphabet." +msgstr "" + +#: library/binascii.rst:432 +msgid "The `Z85 `_ alphabet." +msgstr "" + +#: library/binascii.rst:438 +msgid "The Base 32 alphabet according to :rfc:`4648`." +msgstr "" + +#: library/binascii.rst:444 +msgid "" +"The \"Extended Hex\" Base 32 alphabet according to :rfc:`4648`. Data encoded " +"with this alphabet maintains its sort order during bitwise comparisons." +msgstr "" + +#: library/binascii.rst:453 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/binascii.rst:179 +#: library/binascii.rst:454 msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" "Support de l’encodage *base64-style* conforme RFC en base 16, 32, 64 et 85." -#: library/binascii.rst:182 +#: library/binascii.rst:457 msgid "Module :mod:`quopri`" msgstr "Module :mod:`quopri`" -#: library/binascii.rst:183 +#: library/binascii.rst:458 msgid "Support for quoted-printable encoding used in MIME email messages." msgstr "" "Support de l’encodage *quote-printable* utilisé par les messages *email* " diff --git a/library/bisect.po b/library/bisect.po index 8571c5878..6086e8d01 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-10-17 12:13+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!bisect` --- Array bisection algorithm" msgstr ":mod:`bisect` — Algorithme de bissection de listes" -#: library/bisect.rst:10 +#: library/bisect.rst:7 msgid "**Source code:** :source:`Lib/bisect.py`" msgstr "**Code source :** :source:`Lib/bisect.py`" -#: library/bisect.rst:14 +#: library/bisect.rst:11 #, fuzzy msgid "" "This module provides support for maintaining a list in sorted order without " @@ -40,22 +40,33 @@ msgstr "" "algorithme, le mieux est d'aller lire le code source de ce module (les " "conditions sur les limites y étant justes !)." -#: library/bisect.rst:19 +#: library/bisect.rst:16 msgid "" -"The module is called :mod:`bisect` because it uses a basic bisection " +"The module is called :mod:`!bisect` because it uses a basic bisection " "algorithm to do its work. Unlike other bisection tools that search for a " "specific value, the functions in this module are designed to locate an " -"insertion point. Accordingly, the functions never call an :meth:`~object." -"__eq__` method to determine whether a value has been found. Instead, the " -"functions only call the :meth:`~object.__lt__` method and will return an " -"insertion point between values in an array." +"insertion point. Accordingly, the functions never call " +"an :meth:`~object.__eq__` method to determine whether a value has been " +"found. Instead, the functions only call the :meth:`~object.__lt__` method " +"and will return an insertion point between values in an array." msgstr "" -#: library/bisect.rst:29 +#: library/bisect.rst:26 +msgid "" +"The functions in this module are not thread-safe. If multiple threads " +"concurrently use :mod:`!bisect` functions on the same sequence, this may " +"result in undefined behaviour. Likewise, if the provided sequence is mutated " +"by a different thread while a :mod:`!bisect` function is operating on it, " +"the result is undefined. For example, using :py:func:`~bisect.insort_left` " +"on the same list from multiple threads may result in the list becoming " +"unsorted." +msgstr "" + +#: library/bisect.rst:36 msgid "The following functions are provided:" msgstr "Les fonctions suivantes sont fournies :" -#: library/bisect.rst:34 +#: library/bisect.rst:41 msgid "" "Locate the insertion point for *x* in *a* to maintain sorted order. The " "parameters *lo* and *hi* may be used to specify a subset of the list which " @@ -71,7 +82,7 @@ msgstr "" "l'entrée existante. Si *a* est déjà triée, la valeur renvoyée peut " "directement être utilisée comme premier paramètre de ``list.insert()``." -#: library/bisect.rst:41 +#: library/bisect.rst:48 #, fuzzy msgid "" "The returned insertion point *ip* partitions the array *a* into two slices " @@ -83,7 +94,7 @@ msgstr "" "que, pour la moitié de gauche : ``all(val < x for val in a[lo : i])``, et " "pour la partie de droite : ``all(val >= x for val in a[i : hi])``." -#: library/bisect.rst:46 +#: library/bisect.rst:53 #, fuzzy msgid "" "*key* specifies a :term:`key function` of one argument that is used to " @@ -95,17 +106,17 @@ msgstr "" "valeurs renvoyées par la fonction clé. Par défaut, les éléments sont " "comparés directement." -#: library/bisect.rst:50 +#: library/bisect.rst:57 msgid "" "If *key* is ``None``, the elements are compared directly and no key function " "is called." msgstr "" -#: library/bisect.rst:67 library/bisect.rst:105 +#: library/bisect.rst:74 library/bisect.rst:112 msgid "Added the *key* parameter." msgstr "ajout du paramètre *key*." -#: library/bisect.rst:60 +#: library/bisect.rst:67 #, fuzzy msgid "" "Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point " @@ -114,7 +125,7 @@ msgstr "" "Semblable à :func:`bisect_left`, mais renvoie un point d'insertion après (à " "droite) d'une potentielle entrée existante valant *x* dans *a*." -#: library/bisect.rst:63 +#: library/bisect.rst:70 #, fuzzy msgid "" "The returned insertion point *ip* partitions the array *a* into two slices " @@ -126,38 +137,38 @@ msgstr "" "que, pour la moitié de gauche : ``all(val <= x for val in a[lo : i])`` et " "pour la moitié de droite : ``all(val > x for val in a[i : hi])``." -#: library/bisect.rst:73 +#: library/bisect.rst:80 msgid "Insert *x* in *a* in sorted order." msgstr "Insère *x* dans *a* en préservant l'ordre." -#: library/bisect.rst:75 +#: library/bisect.rst:82 #, fuzzy msgid "" "This function first runs :py:func:`~bisect.bisect_left` to locate an " -"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert " -"*x* at the appropriate position to maintain sort order." +"insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to " +"insert *x* at the appropriate position to maintain sort order." msgstr "" "Cette fonction commence par appliquer :func:`bisect_left` pour déterminer la " "position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " "ajouter *x* à l'endroit adéquat." -#: library/bisect.rst:99 +#: library/bisect.rst:106 msgid "" "To support inserting records in a table, the *key* function (if any) is " "applied to *x* for the search step but not for the insertion step." msgstr "" -#: library/bisect.rst:102 +#: library/bisect.rst:109 #, fuzzy msgid "" "Keep in mind that the *O*\\ (log *n*) search is dominated by the slow *O*\\ " "(*n*) insertion step." msgstr "" "Gardez à l'esprit que la complexité logarithmique :math:`O(\\ln(n))` de la " -"recherche est dominée par la lenteur de l'insertion, de complexité linéaire :" -"math:`O(n)`." +"recherche est dominée par la lenteur de l'insertion, de complexité " +"linéaire :math:`O(n)`." -#: library/bisect.rst:92 +#: library/bisect.rst:99 #, fuzzy msgid "" "Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after " @@ -166,21 +177,21 @@ msgstr "" "Similaire à :func:`insort_left`, mais en insérant *x* dans *a* après une " "potentielle entrée existante égale à *x*." -#: library/bisect.rst:95 +#: library/bisect.rst:102 #, fuzzy msgid "" "This function first runs :py:func:`~bisect.bisect_right` to locate an " -"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert " -"*x* at the appropriate position to maintain sort order." +"insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to " +"insert *x* at the appropriate position to maintain sort order." msgstr "" -"Le principe est le même que :func:`insort_left`, mais avec :func:" -"`bisect_right`." +"Le principe est le même que :func:`insort_left`, mais " +"avec :func:`bisect_right`." -#: library/bisect.rst:110 +#: library/bisect.rst:117 msgid "Performance Notes" msgstr "Notes sur la performance" -#: library/bisect.rst:112 +#: library/bisect.rst:119 msgid "" "When writing time sensitive code using *bisect()* and *insort()*, keep these " "thoughts in mind:" @@ -188,7 +199,7 @@ msgstr "" "Pour écrire du code sensible à la performance utilisant ``bisect()`` et " "``insort()``, prenez en compte ces quelques considérations :" -#: library/bisect.rst:115 +#: library/bisect.rst:122 msgid "" "Bisection is effective for searching ranges of values. For locating specific " "values, dictionaries are more performant." @@ -196,7 +207,7 @@ msgstr "" "La bissection est une bonne idée pour rechercher une plage de valeurs. Pour " "une seule valeur, mieux vaut un dictionnaire." -#: library/bisect.rst:118 +#: library/bisect.rst:125 #, fuzzy msgid "" "The *insort()* functions are *O*\\ (*n*) because the logarithmic search step " @@ -205,16 +216,16 @@ msgstr "" "Les fonctions d'insertion dans une liste classée ont une complexité linéaire " "car c'est le coût d'une insertion, même si la recherche est logarithmique." -#: library/bisect.rst:121 +#: library/bisect.rst:128 #, fuzzy msgid "" "The search functions are stateless and discard key function results after " "they are used. Consequently, if the search functions are used in a loop, " "the key function may be called again and again on the same array elements. " -"If the key function isn't fast, consider wrapping it with :py:func:" -"`functools.cache` to avoid duplicate computations. Alternatively, consider " -"searching an array of precomputed keys to locate the insertion point (as " -"shown in the examples section below)." +"If the key function isn't fast, consider wrapping it " +"with :py:func:`functools.cache` to avoid duplicate computations. " +"Alternatively, consider searching an array of precomputed keys to locate the " +"insertion point (as shown in the examples section below)." msgstr "" "Les fonctions de recherche ne maintiennent pas d'état et ne conservent pas " "le résultat de la fonction clé après utilisation. Par conséquent, si elles " @@ -225,7 +236,7 @@ msgstr "" "sur un tableau de clés pré-calculées pour trouver le point d'insertion (voir " "les exemples plus bas)." -#: library/bisect.rst:131 +#: library/bisect.rst:138 #, fuzzy msgid "" "`Sorted Collections `_ is a " @@ -236,7 +247,7 @@ msgstr "" "est un module de haute performance qui fait appel à *bisect* pour maintenir " "des données ordonnées." -#: library/bisect.rst:135 +#: library/bisect.rst:142 msgid "" "The `SortedCollection recipe `_ uses bisect to build a full-featured collection class " @@ -250,11 +261,11 @@ msgstr "" "fonction clef. Les clefs sont pré-calculées pour économiser des appels " "inutiles à la fonction clef durant les recherches." -#: library/bisect.rst:143 +#: library/bisect.rst:150 msgid "Searching Sorted Lists" msgstr "Chercher dans des listes triées" -#: library/bisect.rst:145 +#: library/bisect.rst:152 #, fuzzy msgid "" "The above `bisect functions`_ are useful for finding insertion points but " @@ -267,11 +278,11 @@ msgstr "" "rechercher des éléments. Les cinq fonctions suivantes montrent comment les " "transformer en recherche plus classique pour les listes triées ::" -#: library/bisect.rst:187 +#: library/bisect.rst:194 msgid "Examples" msgstr "Exemples" -#: library/bisect.rst:191 +#: library/bisect.rst:198 #, fuzzy msgid "" "The :py:func:`~bisect.bisect` function can be useful for numeric table " @@ -285,14 +296,14 @@ msgstr "" "en se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 " "vaut 'B', etc ::" -#: library/bisect.rst:203 +#: library/bisect.rst:210 msgid "" "The :py:func:`~bisect.bisect` and :py:func:`~bisect.insort` functions also " "work with lists of tuples. The *key* argument can serve to extract the " "field used for ordering records in a table::" msgstr "" -#: library/bisect.rst:237 +#: library/bisect.rst:244 #, fuzzy msgid "" "If the key function is expensive, it is possible to avoid repeated function " @@ -302,21 +313,21 @@ msgstr "" "chercher l'indice de l'enregistrement en question ::" #~ msgid "" -#~ "Insert *x* in *a* in sorted order. This is equivalent to ``a." -#~ "insert(bisect.bisect_left(a, x, lo, hi), x)`` assuming that *a* is " +#~ "Insert *x* in *a* in sorted order. This is equivalent to " +#~ "``a.insert(bisect.bisect_left(a, x, lo, hi), x)`` assuming that *a* is " #~ "already sorted. Keep in mind that the O(log n) search is dominated by " #~ "the slow O(n) insertion step." #~ msgstr "" -#~ "Insère *x* dans *a* en conservant le tri. C'est l'équivalent de ``a." -#~ "insert(bisect.bisect_left(a, x, lo, hi), x)``, tant que *a* est déjà " +#~ "Insère *x* dans *a* en conservant le tri. C'est l'équivalent de " +#~ "``a.insert(bisect.bisect_left(a, x, lo, hi), x)``, tant que *a* est déjà " #~ "triée. Gardez en tête que bien que la recherche ne coûte que O(log n), " #~ "l'insertion coûte O(n)." #~ msgid "" -#~ "Unlike the :func:`sorted` function, it does not make sense for the :func:" -#~ "`bisect` functions to have *key* or *reversed* arguments because that " -#~ "would lead to an inefficient design (successive calls to bisect functions " -#~ "would not \"remember\" all of the previous key lookups)." +#~ "Unlike the :func:`sorted` function, it does not make sense for " +#~ "the :func:`bisect` functions to have *key* or *reversed* arguments " +#~ "because that would lead to an inefficient design (successive calls to " +#~ "bisect functions would not \"remember\" all of the previous key lookups)." #~ msgstr "" #~ "Contrairement à la fonction :func:`sorted`, ça n'aurait pas de sens pour " #~ "la fonction :func:`bisect` d'avoir un paramètre *key* ou *reversed*, qui " diff --git a/library/builtins.po b/library/builtins.po index f45a4dbfa..94f3e31e5 100644 --- a/library/builtins.po +++ b/library/builtins.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2018-07-29 00:46+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -23,13 +23,13 @@ msgstr ":mod:`builtins` — Objets natifs" #, fuzzy msgid "" "This module provides direct access to all 'built-in' identifiers of Python; " -"for example, ``builtins.open`` is the full name for the built-in function :" -"func:`open`." +"for example, ``builtins.open`` is the full name for the built-in " +"function :func:`open`." msgstr "" "Ce module fournit un accès direct aux identifiants 'natifs' de Python; par " -"exemple, ``builtins.open`` est le nom complet pour la fonction native :func:" -"`open`. Voir :ref:`built-in-funcs` et :ref:`built-in-consts` pour plus de " -"documentation." +"exemple, ``builtins.open`` est le nom complet pour la fonction " +"native :func:`open`. Voir :ref:`built-in-funcs` et :ref:`built-in-consts` " +"pour plus de documentation." #: library/builtins.rst:12 msgid "" @@ -50,9 +50,9 @@ msgstr "" msgid "" "As an implementation detail, most modules have the name ``__builtins__`` " "made available as part of their globals. The value of ``__builtins__`` is " -"normally either this module or the value of this module's :attr:`~object." -"__dict__` attribute. Since this is an implementation detail, it may not be " -"used by alternate implementations of Python." +"normally either this module or the value of this " +"module's :attr:`~object.__dict__` attribute. Since this is an implementation " +"detail, it may not be used by alternate implementations of Python." msgstr "" "Spécificité de l'implémentation: La plupart des modules ont ``__builtins__`` " "dans leurs globales. La valeur de ``__builtins__`` est classiquement soit " diff --git a/library/bz2.po b/library/bz2.po index ef229bfeb..da24af0a6 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 15:44+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!bz2` --- Support for :program:`bzip2` compression" msgstr ":mod:`bz2` — Prise en charge de la compression :program:`bzip2`" -#: library/bz2.rst:12 +#: library/bz2.rst:7 msgid "**Source code:** :source:`Lib/bz2.py`" msgstr "**Code Source :** :source:`Lib/bz2.py`" -#: library/bz2.rst:16 +#: library/bz2.rst:11 msgid "" "This module provides a comprehensive interface for compressing and " "decompressing data using the bzip2 compression algorithm." @@ -32,11 +32,12 @@ msgstr "" "Ce module fournit une interface complète pour compresser et décompresser les " "données en utilisant l'algorithme de compression *bzip2*." -#: library/bz2.rst:19 -msgid "The :mod:`bz2` module contains:" +#: library/bz2.rst:14 +#, fuzzy +msgid "The :mod:`!bz2` module contains:" msgstr "Le module :mod:`bz2` contient :" -#: library/bz2.rst:21 +#: library/bz2.rst:16 msgid "" "The :func:`.open` function and :class:`BZ2File` class for reading and " "writing compressed files." @@ -44,7 +45,7 @@ msgstr "" "La fonction :func:`.open` et la classe :class:`BZ2File` pour lire et écrire " "des fichiers compressés." -#: library/bz2.rst:23 +#: library/bz2.rst:18 msgid "" "The :class:`BZ2Compressor` and :class:`BZ2Decompressor` classes for " "incremental (de)compression." @@ -52,7 +53,7 @@ msgstr "" "Les classes :class:`BZ2Compressor` et :class:`BZ2Decompressor` pour la " "(dé)compression incrémentielle." -#: library/bz2.rst:25 +#: library/bz2.rst:20 msgid "" "The :func:`compress` and :func:`decompress` functions for one-shot " "(de)compression." @@ -60,11 +61,19 @@ msgstr "" "Les fonctions :func:`compress` et :func:`decompress` pour la (dé)compression " "en une seule fois." -#: library/bz2.rst:30 +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + +#: library/bz2.rst:27 msgid "(De)compression of files" msgstr "(Dé)compression de fichiers" -#: library/bz2.rst:34 +#: library/bz2.rst:31 msgid "" "Open a bzip2-compressed file in binary or text mode, returning a :term:`file " "object`." @@ -72,17 +81,17 @@ msgstr "" "Ouvre un fichier compressé par *bzip2* en mode binaire ou texte, le " "renvoyant en :term:`file object`." -#: library/bz2.rst:37 +#: library/bz2.rst:34 msgid "" "As with the constructor for :class:`BZ2File`, the *filename* argument can be " "an actual filename (a :class:`str` or :class:`bytes` object), or an existing " "file object to read from or write to." msgstr "" "Tout comme avec le constructeur pour la classe :class:`BZ2File`, l'argument " -"*filename* peut être un nom de fichier réel (un objet :class:`str` ou :class:" -"`bytes`), ou un objet fichier existant à lire ou à écrire." +"*filename* peut être un nom de fichier réel (un objet :class:`str` " +"ou :class:`bytes`), ou un objet fichier existant à lire ou à écrire." -#: library/bz2.rst:41 +#: library/bz2.rst:38 msgid "" "The *mode* argument can be any of ``'r'``, ``'rb'``, ``'w'``, ``'wb'``, " "``'x'``, ``'xb'``, ``'a'`` or ``'ab'`` for binary mode, or ``'rt'``, " @@ -92,49 +101,49 @@ msgstr "" "``'xb'``, ``'a'`` ou ``'ab'`` pour le mode binaire, ou ``'rt'``, ``'wt'``, " "``'xt'`` ou ``'at'`` pour le mode texte. Il vaut par défaut ``'rb'``." -#: library/bz2.rst:45 +#: library/bz2.rst:42 msgid "" -"The *compresslevel* argument is an integer from 1 to 9, as for the :class:" -"`BZ2File` constructor." +"The *compresslevel* argument is an integer from 1 to 9, as for " +"the :class:`BZ2File` constructor." msgstr "" "L'argument *compresslevel* est un entier de 1 à 9, comme pour le " "constructeur :class:`BZ2File`." -#: library/bz2.rst:48 +#: library/bz2.rst:45 msgid "" "For binary mode, this function is equivalent to the :class:`BZ2File` " "constructor: ``BZ2File(filename, mode, compresslevel=compresslevel)``. In " "this case, the *encoding*, *errors* and *newline* arguments must not be " "provided." msgstr "" -"Pour le mode binaire, cette fonction est équivalente au constructeur :class:" -"`BZ2File` : ``BZ2File(filename, mode, compresslevel=compresslevel)``. Dans " -"ce cas, les arguments *encoding*, *errors* et *newline* arguments ne doivent " -"pas être fournis." +"Pour le mode binaire, cette fonction est équivalente au " +"constructeur :class:`BZ2File` : ``BZ2File(filename, mode, " +"compresslevel=compresslevel)``. Dans ce cas, les arguments *encoding*, " +"*errors* et *newline* arguments ne doivent pas être fournis." -#: library/bz2.rst:53 +#: library/bz2.rst:50 msgid "" -"For text mode, a :class:`BZ2File` object is created, and wrapped in an :" -"class:`io.TextIOWrapper` instance with the specified encoding, error " +"For text mode, a :class:`BZ2File` object is created, and wrapped in " +"an :class:`io.TextIOWrapper` instance with the specified encoding, error " "handling behavior, and line ending(s)." msgstr "" "Pour le mode texte, un objet :class:`BZ2File` est créé et encapsulé dans une " "instance :class:`io.TextIOWrapper` avec l'encodage spécifié, le comportement " "de gestion des erreurs et les fins de ligne." -#: library/bz2.rst:175 +#: library/bz2.rst:172 msgid "The ``'x'`` (exclusive creation) mode was added." msgstr "Le mode ``'x'`` (création exclusive) est ajouté." -#: library/bz2.rst:182 +#: library/bz2.rst:179 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: library/bz2.rst:68 +#: library/bz2.rst:65 msgid "Open a bzip2-compressed file in binary mode." msgstr "Ouvre un fichier *bzip2* en mode binaire." -#: library/bz2.rst:70 +#: library/bz2.rst:67 msgid "" "If *filename* is a :class:`str` or :class:`bytes` object, open the named " "file directly. Otherwise, *filename* should be a :term:`file object`, which " @@ -144,7 +153,7 @@ msgstr "" "fichier directement. Autrement, *filename* doit être un :term:`file object`, " "qui est utilisé pour lire ou écrire les données compressées." -#: library/bz2.rst:74 +#: library/bz2.rst:71 msgid "" "The *mode* argument can be either ``'r'`` for reading (default), ``'w'`` for " "overwriting, ``'x'`` for exclusive creation, or ``'a'`` for appending. These " @@ -156,7 +165,7 @@ msgstr "" "peuvent également être écrits respectivement comme ``'rb'``, ``'wb'``, " "``'xb'`` et ``'ab'``." -#: library/bz2.rst:79 +#: library/bz2.rst:76 msgid "" "If *filename* is a file object (rather than an actual file name), a mode of " "``'w'`` does not truncate the file, and is instead equivalent to ``'a'``." @@ -164,7 +173,7 @@ msgstr "" "Si *filename* est un objet fichier (plutôt que le nom de fichier réel), le " "mode ``'w'`` ne tronque pas le fichier, mais équivaut à ``'a'``." -#: library/bz2.rst:82 +#: library/bz2.rst:79 msgid "" "If *mode* is ``'w'`` or ``'a'``, *compresslevel* can be an integer between " "``1`` and ``9`` specifying the level of compression: ``1`` produces the " @@ -175,7 +184,7 @@ msgstr "" "compression la moins forte, et ``9`` (par défaut) la compression la plus " "forte." -#: library/bz2.rst:86 +#: library/bz2.rst:83 msgid "" "If *mode* is ``'r'``, the input file may be the concatenation of multiple " "compressed streams." @@ -183,23 +192,25 @@ msgstr "" "Si *mode* est ``'r'``, le fichier d'entrée peut être la concaténation de " "plusieurs flux compressés." -#: library/bz2.rst:89 +#: library/bz2.rst:86 #, fuzzy msgid "" -":class:`BZ2File` provides all of the members specified by the :class:`io." -"BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` and :meth:`~io." -"IOBase.truncate`. Iteration and the :keyword:`with` statement are supported." +":class:`BZ2File` provides all of the members specified by " +"the :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` " +"and :meth:`~io.IOBase.truncate`. Iteration and the :keyword:`with` statement " +"are supported." msgstr "" -":class:`BZ2File` fournit tous les membres spécifiés par la classe :class:`io." -"BufferedIOBase`, excepté les méthodes :meth:`detach` et :meth:`truncate`. " -"L'itération et l'instruction :keyword:`with` sont prises en charge." +":class:`BZ2File` fournit tous les membres spécifiés par la " +"classe :class:`io.BufferedIOBase`, excepté les méthodes :meth:`detach` " +"et :meth:`truncate`. L'itération et l'instruction :keyword:`with` sont " +"prises en charge." -#: library/bz2.rst:94 +#: library/bz2.rst:91 #, fuzzy msgid ":class:`BZ2File` also provides the following methods and attributes:" msgstr ":class:`BZ2File` fournit aussi la méthode suivante :" -#: library/bz2.rst:98 +#: library/bz2.rst:95 msgid "" "Return buffered data without advancing the file position. At least one byte " "of data will be returned (unless at EOF). The exact number of bytes returned " @@ -209,68 +220,68 @@ msgstr "" "Au moins un octet de donnée (sauf l'EOF) est renvoyé. Le nombre exact " "d'octets renvoyés n'est pas spécifié." -#: library/bz2.rst:102 +#: library/bz2.rst:99 msgid "" -"While calling :meth:`peek` does not change the file position of the :class:" -"`BZ2File`, it may change the position of the underlying file object (e.g. if " -"the :class:`BZ2File` was constructed by passing a file object for " -"*filename*)." +"While calling :meth:`peek` does not change the file position of " +"the :class:`BZ2File`, it may change the position of the underlying file " +"object (e.g. if the :class:`BZ2File` was constructed by passing a file " +"object for *filename*)." msgstr "" "Bien que l'appel à la méthode :meth:`peek` ne change pas la position du " "fichier de la classe :class:`BZ2File`, il peut changer la position de " "l'objet fichier sous-jacent (e.g. si la classe :class:`BZ2File` a été " "construite en passant un objet fichier à *filename*)." -#: library/bz2.rst:111 +#: library/bz2.rst:108 msgid "Return the file descriptor for the underlying file." msgstr "" -#: library/bz2.rst:117 +#: library/bz2.rst:114 msgid "Return whether the file was opened for reading." msgstr "" -#: library/bz2.rst:123 +#: library/bz2.rst:120 msgid "Return whether the file supports seeking." msgstr "" -#: library/bz2.rst:129 +#: library/bz2.rst:126 msgid "Return whether the file was opened for writing." msgstr "" -#: library/bz2.rst:135 +#: library/bz2.rst:132 msgid "" "Read up to *size* uncompressed bytes, while trying to avoid making multiple " "reads from the underlying stream. Reads up to a buffer's worth of data if " "size is negative." msgstr "" -#: library/bz2.rst:139 +#: library/bz2.rst:136 msgid "Returns ``b''`` if the file is at EOF." msgstr "" -#: library/bz2.rst:145 +#: library/bz2.rst:142 msgid "Read bytes into *b*." msgstr "" -#: library/bz2.rst:147 +#: library/bz2.rst:144 msgid "Returns the number of bytes read (0 for EOF)." msgstr "" -#: library/bz2.rst:153 +#: library/bz2.rst:150 msgid "``'rb'`` for reading and ``'wb'`` for writing." msgstr "" -#: library/bz2.rst:159 +#: library/bz2.rst:156 msgid "" "The bzip2 file name. Equivalent to the :attr:`~io.FileIO.name` attribute of " "the underlying :term:`file object`." msgstr "" -#: library/bz2.rst:165 +#: library/bz2.rst:162 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/bz2.rst:168 +#: library/bz2.rst:165 msgid "" "Support was added for *filename* being a :term:`file object` instead of an " "actual filename." @@ -278,7 +289,7 @@ msgstr "" "La gestion de *filename* comme :term:`file object` au lieu d'un nom de " "fichier réel a été ajoutée." -#: library/bz2.rst:172 +#: library/bz2.rst:169 msgid "" "The ``'a'`` (append) mode was added, along with support for reading multi-" "stream files." @@ -286,7 +297,7 @@ msgstr "" "Le mode ``'a'`` (ajout) a été ajouté, avec la prise en charge de la lecture " "des fichiers *multiflux*." -#: library/bz2.rst:178 +#: library/bz2.rst:175 msgid "" "The :meth:`~io.BufferedIOBase.read` method now accepts an argument of " "``None``." @@ -294,7 +305,7 @@ msgstr "" "La méthode :meth:`~io.BufferedIOBase.read` accepte maintenant un argument " "``None``." -#: library/bz2.rst:185 +#: library/bz2.rst:182 msgid "" "The *buffering* parameter has been removed. It was ignored and deprecated " "since Python 3.0. Pass an open file object to control how the file is opened." @@ -303,12 +314,12 @@ msgstr "" "Python 3.0. Passez un objet fichier déjà ouvert si vous voulez contrôler la " "façon dont le fichier est ouvert." -#: library/bz2.rst:190 +#: library/bz2.rst:187 msgid "The *compresslevel* parameter became keyword-only." msgstr "" "Le paramètre *compresslevel* est devenu un paramètre exclusivement nommé." -#: library/bz2.rst:192 +#: library/bz2.rst:189 msgid "" "This class is thread unsafe in the face of multiple simultaneous readers or " "writers, just like its equivalent classes in :mod:`gzip` and :mod:`lzma` " @@ -318,11 +329,11 @@ msgstr "" "plusieurs lecteurs ou compresseurs. C'était déjà le cas depuis toujours des " "classes analogues dans les modules :mod:`gzip` et :mod:`lzma`." -#: library/bz2.rst:199 +#: library/bz2.rst:196 msgid "Incremental (de)compression" msgstr "(Dé)compression incrémentielle" -#: library/bz2.rst:203 +#: library/bz2.rst:200 msgid "" "Create a new compressor object. This object may be used to compress data " "incrementally. For one-shot compression, use the :func:`compress` function " @@ -332,7 +343,7 @@ msgstr "" "compresser les données de manière incrémentielle. Pour une compression en " "une seule fois, utilisez à la place la fonction :func:`compress`." -#: library/bz2.rst:295 +#: library/bz2.rst:292 msgid "" "*compresslevel*, if given, must be an integer between ``1`` and ``9``. The " "default is ``9``." @@ -340,7 +351,7 @@ msgstr "" "*compresslevel*, s'il est fourni, doit être un entier entre ``1`` et ``9``. " "Sa valeur par défaut est ``9``." -#: library/bz2.rst:212 +#: library/bz2.rst:209 msgid "" "Provide data to the compressor object. Returns a chunk of compressed data if " "possible, or an empty byte string otherwise." @@ -348,15 +359,15 @@ msgstr "" "Fournit la donnée à l'objet compresseur. Renvoie un bloc de données " "compressées si possible, ou autrement une chaîne d'octet vide." -#: library/bz2.rst:215 +#: library/bz2.rst:212 msgid "" -"When you have finished providing data to the compressor, call the :meth:" -"`flush` method to finish the compression process." +"When you have finished providing data to the compressor, call " +"the :meth:`flush` method to finish the compression process." msgstr "" "Quand vous avez fini de fournir des données au compresseur, appelez la " "méthode :meth:`flush` pour finir le processus de compression." -#: library/bz2.rst:221 +#: library/bz2.rst:218 msgid "" "Finish the compression process. Returns the compressed data left in internal " "buffers." @@ -364,14 +375,14 @@ msgstr "" "Finit le processus de compression. Renvoie la donnée compressée restante " "dans les tampons internes." -#: library/bz2.rst:224 +#: library/bz2.rst:221 msgid "" "The compressor object may not be used after this method has been called." msgstr "" "L'objet compresseur ne peut pas être utilisé après que cette méthode a été " "appelée." -#: library/bz2.rst:229 +#: library/bz2.rst:226 msgid "" "Create a new decompressor object. This object may be used to decompress data " "incrementally. For one-shot compression, use the :func:`decompress` function " @@ -381,7 +392,7 @@ msgstr "" "décompresser les données de manière incrémentielle. Pour une compression en " "une seule fois, utilisez à la place la fonction :func:`decompress`." -#: library/bz2.rst:234 +#: library/bz2.rst:231 msgid "" "This class does not transparently handle inputs containing multiple " "compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If you " @@ -389,12 +400,12 @@ msgid "" "must use a new decompressor for each stream." msgstr "" "Cette classe ne gère pas de manière transparente les entrées contenant " -"plusieurs flux compressés, à la différence de :func:`decompress` et :class:" -"`BZ2File`. Si vous avez besoin de décompresser une entrée *multiflux* avec " -"la classe :class:`BZ2Decompressor`, vous devez utiliser un nouveau " -"décompresseur pour chaque flux." +"plusieurs flux compressés, à la différence de :func:`decompress` " +"et :class:`BZ2File`. Si vous avez besoin de décompresser une entrée " +"*multiflux* avec la classe :class:`BZ2Decompressor`, vous devez utiliser un " +"nouveau décompresseur pour chaque flux." -#: library/bz2.rst:241 +#: library/bz2.rst:238 msgid "" "Decompress *data* (a :term:`bytes-like object`), returning uncompressed data " "as bytes. Some of *data* may be buffered internally, for use in later calls " @@ -407,7 +418,7 @@ msgstr "" "méthode :meth:`decompress`. La donnée renvoyée doit être concaténée avec la " "sortie des appels précédents à la méthode :meth:`decompress`." -#: library/bz2.rst:247 +#: library/bz2.rst:244 msgid "" "If *max_length* is nonnegative, returns at most *max_length* bytes of " "decompressed data. If this limit is reached and further output can be " @@ -421,7 +432,7 @@ msgstr "" "Dans ce cas, lors de l'appel suivant à la méthode :meth:`~.decompress`, vous " "pouvez fournir ``b''`` dans *data* afin d'obtenir la suite de la sortie." -#: library/bz2.rst:254 +#: library/bz2.rst:251 msgid "" "If all of the input data was decompressed and returned (either because this " "was less than *max_length* bytes, or because *max_length* was negative), " @@ -431,30 +442,30 @@ msgstr "" "qu'il y avait moins de *max_length* octets, ou parce que *max_length* était " "négatif), l'attribut :attr:`~.needs_input` sera configuré sur ``True``." -#: library/bz2.rst:259 +#: library/bz2.rst:256 #, fuzzy msgid "" -"Attempting to decompress data after the end of stream is reached raises an :" -"exc:`EOFError`. Any data found after the end of the stream is ignored and " -"saved in the :attr:`~.unused_data` attribute." +"Attempting to decompress data after the end of stream is reached raises " +"an :exc:`EOFError`. Any data found after the end of the stream is ignored " +"and saved in the :attr:`~.unused_data` attribute." msgstr "" "Essayer de décompresser des données après que la fin du flux soit atteinte " "lève une erreur ``EOFError``. Toute donnée trouvée après la fin du flux est " "ignorée et sauvegardée dans l'attribut :attr:`~.unused_data`." -#: library/bz2.rst:263 +#: library/bz2.rst:260 msgid "Added the *max_length* parameter." msgstr "Ajout du paramètre *max_length*." -#: library/bz2.rst:268 +#: library/bz2.rst:265 msgid "``True`` if the end-of-stream marker has been reached." msgstr "``True`` si le marqueur de fin de flux a été atteint." -#: library/bz2.rst:275 +#: library/bz2.rst:272 msgid "Data found after the end of the compressed stream." msgstr "Donnée trouvée après la fin du flux compressé." -#: library/bz2.rst:277 +#: library/bz2.rst:274 msgid "" "If this attribute is accessed before the end of the stream has been reached, " "its value will be ``b''``." @@ -462,7 +473,7 @@ msgstr "" "Si l'attribut est accédé avant que la fin du flux ait été atteint, sa valeur " "sera ``b''``." -#: library/bz2.rst:282 +#: library/bz2.rst:279 msgid "" "``False`` if the :meth:`.decompress` method can provide more decompressed " "data before requiring new uncompressed input." @@ -470,25 +481,25 @@ msgstr "" "``False`` si la méthode :meth:`.decompress` peut fournir plus de données " "décompressées avant l'acquisition d'une nouvelle entrée non compressée." -#: library/bz2.rst:289 +#: library/bz2.rst:286 msgid "One-shot (de)compression" msgstr "(Dé)compression en une fois" -#: library/bz2.rst:293 +#: library/bz2.rst:290 msgid "Compress *data*, a :term:`bytes-like object `." msgstr "Compresse *data*, un :term:`bytes-like object `." -#: library/bz2.rst:298 +#: library/bz2.rst:295 msgid "For incremental compression, use a :class:`BZ2Compressor` instead." msgstr "" -"Pour la compression incrémentielle, utilisez à la place la classe :class:" -"`BZ2Compressor`." +"Pour la compression incrémentielle, utilisez à la place la " +"classe :class:`BZ2Compressor`." -#: library/bz2.rst:303 +#: library/bz2.rst:300 msgid "Decompress *data*, a :term:`bytes-like object `." msgstr "Décompresse *data*, un :term:`bytes-like object `." -#: library/bz2.rst:305 +#: library/bz2.rst:302 msgid "" "If *data* is the concatenation of multiple compressed streams, decompress " "all of the streams." @@ -496,27 +507,28 @@ msgstr "" "Si *data* est la concaténation de multiples flux compressés, décompresse " "tous les flux." -#: library/bz2.rst:308 +#: library/bz2.rst:305 msgid "For incremental decompression, use a :class:`BZ2Decompressor` instead." msgstr "" -"Pour une décompression incrémentielle, utilisez à la place la classe :class:" -"`BZ2Decompressor`." +"Pour une décompression incrémentielle, utilisez à la place la " +"classe :class:`BZ2Decompressor`." -#: library/bz2.rst:310 +#: library/bz2.rst:307 msgid "Support for multi-stream inputs was added." msgstr "Prise en charge des entrées *multiflux*." -#: library/bz2.rst:316 +#: library/bz2.rst:313 msgid "Examples of usage" msgstr "Exemples d'utilisation" -#: library/bz2.rst:318 -msgid "Below are some examples of typical usage of the :mod:`bz2` module." +#: library/bz2.rst:315 +#, fuzzy +msgid "Below are some examples of typical usage of the :mod:`!bz2` module." msgstr "" "Ci-dessous, nous présentons quelques exemples typiques de l'utilisation du " "module :mod:`bz2`." -#: library/bz2.rst:320 +#: library/bz2.rst:317 msgid "" "Using :func:`compress` and :func:`decompress` to demonstrate round-trip " "compression:" @@ -524,13 +536,13 @@ msgstr "" "Utilise les fonctions :func:`compress` et :func:`decompress` pour démontrer " "une compression aller-retour :" -#: library/bz2.rst:338 +#: library/bz2.rst:335 msgid "Using :class:`BZ2Compressor` for incremental compression:" msgstr "" "Utilise la classe :class:`BZ2Compressor` pour une compression " "incrémentielle :" -#: library/bz2.rst:356 +#: library/bz2.rst:353 #, fuzzy msgid "" "The example above uses a very \"nonrandom\" stream of data (a stream of " @@ -542,17 +554,18 @@ msgstr "" "compresser, alors que les données répétitives ou ordonnées donnent " "généralement un taux de compression élevé." -#: library/bz2.rst:360 +#: library/bz2.rst:357 msgid "Writing and reading a bzip2-compressed file in binary mode:" msgstr "" "Écriture et lecture en mode binaire d'un fichier compressé avec *bzip2* :" #~ msgid "" -#~ "The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:" -#~ "`writable`, :meth:`read1` and :meth:`readinto` methods were added." +#~ "The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`, :meth:`read1` " +#~ "and :meth:`readinto` methods were added." #~ msgstr "" -#~ "Les méthodes :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:" -#~ "`writable`, :meth:`read1` et :meth:`readinto` ont été ajoutées." +#~ "Les " +#~ "méthodes :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`, :meth:`read1` " +#~ "et :meth:`readinto` ont été ajoutées." #~ msgid "" #~ "All of the classes in this module may safely be accessed from multiple " diff --git a/library/calendar.po b/library/calendar.po index 65f9f4872..44446c196 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-11-19 12:21-0500\n" "Last-Translator: Édith Viau \n" "Language-Team: FRENCH \n" @@ -21,11 +21,11 @@ msgstr "" msgid ":mod:`!calendar` --- General calendar-related functions" msgstr ":mod:`calendar` — Fonctions calendaires générales" -#: library/calendar.rst:10 +#: library/calendar.rst:8 msgid "**Source code:** :source:`Lib/calendar.py`" msgstr "**Code source :** :source:`Lib/calendar.py`" -#: library/calendar.rst:14 +#: library/calendar.rst:12 msgid "" "This module allows you to output calendars like the Unix :program:`cal` " "program, and provides additional useful functions related to the calendar. " @@ -35,15 +35,16 @@ msgid "" "Parameters that specify dates are given as integers. For related " "functionality, see also the :mod:`datetime` and :mod:`time` modules." msgstr "" -"Ce module permet d'afficher un calendrier comme le fait le programme Unix :" -"program:`cal`, et il fournit des fonctions utiles relatives au calendrier. " -"Par défaut, ces calendriers ont le lundi comme premier jour de la semaine et " -"le dimanche comme dernier jour. Utilisez :func:`setfirstweekday` pour " -"définir le premier jour de la semaine à dimanche (6) ou à tout autre jour de " -"la semaine. Les paramètres pour spécifier les dates sont donnés sous forme " -"de nombres entiers. Voir aussi les modules :mod:`datetime` et :mod:`time`." +"Ce module permet d'afficher un calendrier comme le fait le programme " +"Unix :program:`cal`, et il fournit des fonctions utiles relatives au " +"calendrier. Par défaut, ces calendriers ont le lundi comme premier jour de " +"la semaine et le dimanche comme dernier jour. " +"Utilisez :func:`setfirstweekday` pour définir le premier jour de la semaine " +"à dimanche (6) ou à tout autre jour de la semaine. Les paramètres pour " +"spécifier les dates sont donnés sous forme de nombres entiers. Voir aussi " +"les modules :mod:`datetime` et :mod:`time`." -#: library/calendar.rst:22 +#: library/calendar.rst:20 msgid "" "The functions and classes defined in this module use an idealized calendar, " "the current Gregorian calendar extended indefinitely in both directions. " @@ -62,18 +63,18 @@ msgstr "" "comme prescrit par la norme ISO 8601. L'année 0 est 1 avant JC, l'année " "``-1`` est 2 avant JC et ainsi de suite." -#: library/calendar.rst:33 +#: library/calendar.rst:31 msgid "" "Creates a :class:`Calendar` object. *firstweekday* is an integer specifying " -"the first day of the week. :const:`MONDAY` is ``0`` (the default), :const:" -"`SUNDAY` is ``6``." +"the first day of the week. :const:`MONDAY` is ``0`` (the " +"default), :const:`SUNDAY` is ``6``." msgstr "" "Crée un objet :class:`Calendar`. *firstweekday* est un entier spécifiant le " "premier jour de la semaine, valant par défaut ``0`` (soit :const:`MONDAY` " "pour lundi), pouvant aller jusqu'à ``6`` (soit :const:`SUNDAY` pour " "dimanche)." -#: library/calendar.rst:36 +#: library/calendar.rst:34 msgid "" "A :class:`Calendar` object provides several methods that can be used for " "preparing the calendar data for formatting. This class doesn't do any " @@ -83,20 +84,50 @@ msgstr "" "pour préparer les données du calendrier pour le formatage. Cette classe ne " "fait pas de formatage elle-même. Il s'agit du travail des sous-classes." -#: library/calendar.rst:41 -msgid ":class:`Calendar` instances have the following methods:" +#: library/calendar.rst:39 +#, fuzzy +msgid ":class:`Calendar` instances have the following methods and attributes:" msgstr "Les instances de :class:`Calendar` ont les méthodes suivantes :" +#: library/calendar.rst:43 +msgid "The first weekday as an integer (0--6)." +msgstr "" + #: library/calendar.rst:45 msgid "" -"Return an iterator for the week day numbers that will be used for one week. " -"The first value from the iterator will be the same as the value of the :attr:" -"`firstweekday` property." +"This property can also be set and read " +"using :meth:`~Calendar.setfirstweekday` " +"and :meth:`~Calendar.getfirstweekday` respectively." +msgstr "" + +#: library/calendar.rst:51 +msgid "Return an :class:`int` for the current first weekday (0--6)." +msgstr "" + +#: library/calendar.rst:53 +msgid "Identical to reading the :attr:`~Calendar.firstweekday` property." +msgstr "" + +#: library/calendar.rst:57 +msgid "" +"Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)." +msgstr "" + +#: library/calendar.rst:59 +msgid "Identical to setting the :attr:`~Calendar.firstweekday` property." +msgstr "" + +#: library/calendar.rst:63 +#, fuzzy +msgid "" +"Return an iterator for the weekday numbers that will be used for one week. " +"The first value from the iterator will be the same as the value of " +"the :attr:`~Calendar.firstweekday` property." msgstr "" "Renvoie un itérateur sur les numéros des jours d'une semaine. La première " "valeur est donc la même que la valeur de la propriété :attr:`firstweekday`." -#: library/calendar.rst:52 +#: library/calendar.rst:70 msgid "" "Return an iterator for the month *month* (1--12) in the year *year*. This " "iterator will return all days (as :class:`datetime.date` objects) for the " @@ -108,55 +139,58 @@ msgstr "" "de :class:`datetime.date`) ainsi que tous les jours avant le début du mois " "et après la fin du mois nécessaires pour obtenir des semaines complètes." -#: library/calendar.rst:60 +#: library/calendar.rst:78 msgid "" -"Return an iterator for the month *month* in the year *year* similar to :meth:" -"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " -"Days returned will simply be day of the month numbers. For the days outside " -"of the specified month, the day number is ``0``." +"Return an iterator for the month *month* in the year *year* similar " +"to :meth:`itermonthdates`, but not restricted by the :class:`datetime.date` " +"range. Days returned will simply be day of the month numbers. For the days " +"outside of the specified month, the day number is ``0``." msgstr "" -"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, comme :" -"meth:`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." -"date`. Les jours renvoyés sont simplement les numéros des jours du mois. " -"Pour les jours en dehors du mois spécifié, le numéro du jour est ``0``." +"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, " +"comme :meth:`itermonthdates`, sans être limité par l'intervalle " +"de :class:`datetime.date`. Les jours renvoyés sont simplement les numéros " +"des jours du mois. Pour les jours en dehors du mois spécifié, le numéro du " +"jour est ``0``." -#: library/calendar.rst:68 +#: library/calendar.rst:86 +#, fuzzy msgid "" -"Return an iterator for the month *month* in the year *year* similar to :meth:" -"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " -"Days returned will be tuples consisting of a day of the month number and a " -"week day number." +"Return an iterator for the month *month* in the year *year* similar " +"to :meth:`itermonthdates`, but not restricted by the :class:`datetime.date` " +"range. Days returned will be tuples consisting of a day of the month number " +"and a weekday number." msgstr "" -"Renvoie un itérateur sur les jours du mois *month* de l'année *year* comme :" -"meth:`itermonthdates`, sans être limité par la plage :class:`datetime.date`. " -"Les jours renvoyés sont des paires composées du numéro du jour dans le mois " -"et du numéro du jour dans la semaine." +"Renvoie un itérateur sur les jours du mois *month* de l'année *year* " +"comme :meth:`itermonthdates`, sans être limité par la " +"plage :class:`datetime.date`. Les jours renvoyés sont des paires composées " +"du numéro du jour dans le mois et du numéro du jour dans la semaine." -#: library/calendar.rst:76 +#: library/calendar.rst:94 msgid "" -"Return an iterator for the month *month* in the year *year* similar to :meth:" -"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " -"Days returned will be tuples consisting of a year, a month and a day of the " -"month numbers." +"Return an iterator for the month *month* in the year *year* similar " +"to :meth:`itermonthdates`, but not restricted by the :class:`datetime.date` " +"range. Days returned will be tuples consisting of a year, a month and a day " +"of the month numbers." msgstr "" -"Renvoie un itérateur sur les jours du *month* de l'année *year*, comme :meth:" -"`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." -"date`. Les jours sont renvoyés sous forme de triplets composés du numéro de " -"l'année, du mois et du jour dans le mois." +"Renvoie un itérateur sur les jours du *month* de l'année *year*, " +"comme :meth:`itermonthdates`, sans être limité par l'intervalle " +"de :class:`datetime.date`. Les jours sont renvoyés sous forme de triplets " +"composés du numéro de l'année, du mois et du jour dans le mois." -#: library/calendar.rst:86 +#: library/calendar.rst:104 msgid "" -"Return an iterator for the month *month* in the year *year* similar to :meth:" -"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " -"Days returned will be tuples consisting of a year, a month, a day of the " -"month, and a day of the week numbers." +"Return an iterator for the month *month* in the year *year* similar " +"to :meth:`itermonthdates`, but not restricted by the :class:`datetime.date` " +"range. Days returned will be tuples consisting of a year, a month, a day of " +"the month, and a day of the week numbers." msgstr "" -"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, comme :" -"meth:`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." -"date`. Le jours sont renvoyés sous forme de quadruplets contenant le numéro " -"de l'année, du mois, du jour du mois et du jour de la semaine." +"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, " +"comme :meth:`itermonthdates`, sans être limité par l'intervalle " +"de :class:`datetime.date`. Le jours sont renvoyés sous forme de quadruplets " +"contenant le numéro de l'année, du mois, du jour du mois et du jour de la " +"semaine." -#: library/calendar.rst:96 +#: library/calendar.rst:114 msgid "" "Return a list of the weeks in the month *month* of the *year* as full " "weeks. Weeks are lists of seven :class:`datetime.date` objects." @@ -164,7 +198,7 @@ msgstr "" "Renvoie la liste des semaines complètes du mois *month* de l'année *year*. " "Les semaines sont des listes de sept objets :class:`datetime.date`." -#: library/calendar.rst:102 +#: library/calendar.rst:120 msgid "" "Return a list of the weeks in the month *month* of the *year* as full " "weeks. Weeks are lists of seven tuples of day numbers and weekday numbers." @@ -173,7 +207,7 @@ msgstr "" "Les semaines sont des listes de sept paires contenant le numéro du jour dans " "le mois et du numéro du jour dans la semaine." -#: library/calendar.rst:109 +#: library/calendar.rst:127 msgid "" "Return a list of the weeks in the month *month* of the *year* as full " "weeks. Weeks are lists of seven day numbers." @@ -181,7 +215,7 @@ msgstr "" "Renvoie la liste des semaines complètes du mois *month* de l'année *year*. " "Les semaines sont une liste de sept numéros de jours." -#: library/calendar.rst:115 +#: library/calendar.rst:133 msgid "" "Return the data for the specified year ready for formatting. The return " "value is a list of month rows. Each month row contains up to *width* months " @@ -191,46 +225,89 @@ msgstr "" "Renvoie ce qu'il faut pour afficher correctement une année. La valeur " "renvoyée est une liste de lignes de mois. Chaque ligne mensuelle contient " "jusqu'à *width* mois (avec une valeur par défaut à 3). Chaque mois contient " -"de 4 à 6 semaines et chaque semaine 1 à 7 jours. Les jours sont des objets :" -"class:`datetime.date`." +"de 4 à 6 semaines et chaque semaine 1 à 7 jours. Les jours sont des " +"objets :class:`datetime.date`." -#: library/calendar.rst:123 +#: library/calendar.rst:141 msgid "" -"Return the data for the specified year ready for formatting (similar to :" -"meth:`yeardatescalendar`). Entries in the week lists are tuples of day " +"Return the data for the specified year ready for formatting (similar " +"to :meth:`yeardatescalendar`). Entries in the week lists are tuples of day " "numbers and weekday numbers. Day numbers outside this month are zero." msgstr "" -"Renvoie ce qu'il faut pour afficher correctement une année, (similaire à :" -"meth:`yeardatescalendar`). Les listes des semaines contiennent des paires " +"Renvoie ce qu'il faut pour afficher correctement une année, (similaire " +"à :meth:`yeardatescalendar`). Les listes des semaines contiennent des paires " "contenant le numéro du jour du mois et le numéro du jour de la semaine. Les " "numéro des jours en dehors de ce mois sont à zéro." -#: library/calendar.rst:130 +#: library/calendar.rst:148 msgid "" -"Return the data for the specified year ready for formatting (similar to :" -"meth:`yeardatescalendar`). Entries in the week lists are day numbers. Day " -"numbers outside this month are zero." +"Return the data for the specified year ready for formatting (similar " +"to :meth:`yeardatescalendar`). Entries in the week lists are day numbers. " +"Day numbers outside this month are zero." msgstr "" -"Renvoie ce qu'il faut pour afficher correctement une année, (similaire à :" -"meth:`yeardatescalendar`). Les listes de semaines contiennent des numéros de " -"jours. Les numéros de jours en dehors de ce mois sont de zéro." +"Renvoie ce qu'il faut pour afficher correctement une année, (similaire " +"à :meth:`yeardatescalendar`). Les listes de semaines contiennent des numéros " +"de jours. Les numéros de jours en dehors de ce mois sont de zéro." -#: library/calendar.rst:137 +#: library/calendar.rst:155 msgid "This class can be used to generate plain text calendars." msgstr "" "Cette classe peut être utilisée pour générer des calendriers en texte brut." -#: library/calendar.rst:139 +#: library/calendar.rst:157 msgid ":class:`TextCalendar` instances have the following methods:" msgstr "Les instances :class:`TextCalendar` exposent les méthodes suivantes :" -#: library/calendar.rst:143 +#: library/calendar.rst:161 +#, fuzzy +msgid "" +"Print a week's calendar as returned by :meth:`formatweek` and without a " +"final newline." +msgstr "" +"Affiche le calendrier d'un mois tel que renvoyé par :meth:`formatmonth`." + +#: library/calendar.rst:167 +msgid "" +"Return a string representing a single day formatted with the given *width*. " +"If *theday* is ``0``, return a string of spaces of the specified width, " +"representing an empty day. The *weekday* parameter is unused." +msgstr "" + +#: library/calendar.rst:174 +#, fuzzy +msgid "" +"Return a single week in a string with no newline. If *w* is provided, it " +"specifies the width of the date columns, which are centered. Depends on the " +"first weekday as specified in the constructor or set by " +"the :meth:`setfirstweekday` method." +msgstr "" +"Donne le calendrier d'un mois dans une chaîne multi-ligne. Si *w* est " +"fourni, il spécifie la largeur des colonnes de date, qui sont centrées. Si " +"*l* est donné, il spécifie le nombre de lignes que chaque semaine utilisera. " +"Le résultat varie en fonction du premier jour de la semaine spécifié dans le " +"constructeur ou défini par la méthode :meth:`setfirstweekday`." + +#: library/calendar.rst:182 +msgid "" +"Return a string representing the name of a single weekday formatted to the " +"specified *width*. The *weekday* parameter is an integer representing the " +"day of the week, where ``0`` is Monday and ``6`` is Sunday." +msgstr "" + +#: library/calendar.rst:189 +msgid "" +"Return a string containing the header row of weekday names, formatted with " +"the given *width* for each column. The names depend on the locale settings " +"and are padded to the specified width." +msgstr "" + +#: library/calendar.rst:196 msgid "" "Return a month's calendar in a multi-line string. If *w* is provided, it " "specifies the width of the date columns, which are centered. If *l* is " "given, it specifies the number of lines that each week will use. Depends on " -"the first weekday as specified in the constructor or set by the :meth:" -"`setfirstweekday` method." +"the first weekday as specified in the constructor or set by " +"the :meth:`setfirstweekday` method." msgstr "" "Donne le calendrier d'un mois dans une chaîne multi-ligne. Si *w* est " "fourni, il spécifie la largeur des colonnes de date, qui sont centrées. Si " @@ -238,19 +315,27 @@ msgstr "" "Le résultat varie en fonction du premier jour de la semaine spécifié dans le " "constructeur ou défini par la méthode :meth:`setfirstweekday`." -#: library/calendar.rst:152 +#: library/calendar.rst:205 +msgid "" +"Return a string representing the month's name centered within the specified " +"*width*. If *withyear* is ``True``, include the year in the output. The " +"*theyear* and *themonth* parameters specify the year and month for the name " +"to be formatted respectively." +msgstr "" + +#: library/calendar.rst:213 msgid "Print a month's calendar as returned by :meth:`formatmonth`." msgstr "" "Affiche le calendrier d'un mois tel que renvoyé par :meth:`formatmonth`." -#: library/calendar.rst:157 +#: library/calendar.rst:218 msgid "" "Return a *m*-column calendar for an entire year as a multi-line string. " "Optional parameters *w*, *l*, and *c* are for date column width, lines per " "week, and number of spaces between month columns, respectively. Depends on " -"the first weekday as specified in the constructor or set by the :meth:" -"`setfirstweekday` method. The earliest year for which a calendar can be " -"generated is platform-dependent." +"the first weekday as specified in the constructor or set by " +"the :meth:`setfirstweekday` method. The earliest year for which a calendar " +"can be generated is platform-dependent." msgstr "" "Renvoie un calendrier de *m* colonnes pour une année entière sous forme de " "chaîne multi-ligne. Les paramètres facultatifs *w*, *l* et *c* correspondent " @@ -260,23 +345,23 @@ msgstr "" "méthode :meth:`setfirstweekday`. La première année pour laquelle un " "calendrier peut être généré, dépend de la plateforme." -#: library/calendar.rst:167 +#: library/calendar.rst:228 msgid "" "Print the calendar for an entire year as returned by :meth:`formatyear`." msgstr "" -"Affiche le calendrier pour une année entière comme renvoyé par :meth:" -"`formatyear`." +"Affiche le calendrier pour une année entière comme renvoyé " +"par :meth:`formatyear`." -#: library/calendar.rst:172 +#: library/calendar.rst:233 msgid "This class can be used to generate HTML calendars." msgstr "Cette classe peut être utilisée pour générer des calendriers HTML." -#: library/calendar.rst:175 +#: library/calendar.rst:236 msgid ":class:`!HTMLCalendar` instances have the following methods:" msgstr "" "Les instances de :class:`!HTMLCalendar` utilisent les méthodes suivantes :" -#: library/calendar.rst:179 +#: library/calendar.rst:240 msgid "" "Return a month's calendar as an HTML table. If *withyear* is true the year " "will be included in the header, otherwise just the month name will be used." @@ -285,7 +370,7 @@ msgstr "" "*withyear* est vrai l'année sera inclue dans l'en-tête, sinon seul le nom du " "mois sera utilisé." -#: library/calendar.rst:186 +#: library/calendar.rst:247 msgid "" "Return a year's calendar as an HTML table. *width* (defaulting to 3) " "specifies the number of months per row." @@ -293,13 +378,14 @@ msgstr "" "Renvoie le calendrier d'une année sous la forme d'une table HTML. *width* " "(par défaut à 3) spécifie le nombre de mois par ligne." -#: library/calendar.rst:192 +#: library/calendar.rst:253 +#, fuzzy msgid "" "Return a year's calendar as a complete HTML page. *width* (defaulting to 3) " "specifies the number of months per row. *css* is the name for the cascading " "style sheet to be used. :const:`None` can be passed if no style sheet should " "be used. *encoding* specifies the encoding to be used for the output " -"(defaulting to the system default encoding)." +"(defaulting to ``'utf-8'``)." msgstr "" "Renvoie le calendrier d'une année sous la forme d'une page HTML complète. " "*width* (par défaut à 3) spécifie le nombre de mois par ligne. *css* est le " @@ -308,7 +394,7 @@ msgstr "" "l'encodage à utiliser pour les données de sortie (par défaut l'encodage par " "défaut du système)." -#: library/calendar.rst:201 +#: library/calendar.rst:262 #, fuzzy msgid "" "Return a month name as an HTML table row. If *withyear* is true the year " @@ -318,7 +404,7 @@ msgstr "" "*withyear* est vrai l'année sera inclue dans l'en-tête, sinon seul le nom du " "mois sera utilisé." -#: library/calendar.rst:206 +#: library/calendar.rst:267 msgid "" ":class:`!HTMLCalendar` has the following attributes you can override to " "customize the CSS classes used by the calendar:" @@ -326,28 +412,28 @@ msgstr "" ":class:`!HTMLCalendar` possède les attributs suivants que vous pouvez " "surcharger pour personnaliser les classes CSS utilisées par le calendrier :" -#: library/calendar.rst:211 +#: library/calendar.rst:272 msgid "" "A list of CSS classes used for each weekday. The default class list is::" msgstr "" "Une liste de classes CSS utilisées pour chaque jour de la semaine. La liste " "par défaut de la classe est ::" -#: library/calendar.rst:215 +#: library/calendar.rst:276 msgid "more styles can be added for each day::" msgstr "davantage de styles peuvent être ajoutés pour chaque jour ::" -#: library/calendar.rst:219 +#: library/calendar.rst:280 msgid "Note that the length of this list must be seven items." msgstr "Notez que la longueur de cette liste doit être de sept éléments." -#: library/calendar.rst:224 +#: library/calendar.rst:285 msgid "The CSS class for a weekday occurring in the previous or coming month." msgstr "" "La classe CSS pour le jour de la semaine apparaissant dans le mois précédent " "ou à venir." -#: library/calendar.rst:231 +#: library/calendar.rst:292 msgid "" "A list of CSS classes used for weekday names in the header row. The default " "is the same as :attr:`cssclasses`." @@ -355,7 +441,7 @@ msgstr "" "Une liste de classes CSS utilisées pour les noms des jours de la semaine " "dans la ligne d'en-tête. Par défaut les mêmes que :attr:`cssclasses`." -#: library/calendar.rst:239 +#: library/calendar.rst:300 msgid "" "The month's head CSS class (used by :meth:`formatmonthname`). The default " "value is ``\"month\"``." @@ -363,31 +449,31 @@ msgstr "" "La classe CSS du mois en en-tête (utilisé par :meth:`formatmonthname`). La " "valeur par défaut est ``\"month\"``." -#: library/calendar.rst:247 +#: library/calendar.rst:308 msgid "" "The CSS class for the whole month's table (used by :meth:`formatmonth`). The " "default value is ``\"month\"``." msgstr "" -"La classe CSS pour la table du mois entière (utilisé par :meth:" -"`formatmonth`). La valeur par défaut est ``\"month\"``." +"La classe CSS pour la table du mois entière (utilisé " +"par :meth:`formatmonth`). La valeur par défaut est ``\"month\"``." -#: library/calendar.rst:255 +#: library/calendar.rst:316 msgid "" -"The CSS class for the whole year's table of tables (used by :meth:" -"`formatyear`). The default value is ``\"year\"``." +"The CSS class for the whole year's table of tables (used " +"by :meth:`formatyear`). The default value is ``\"year\"``." msgstr "" -"La classe CSS pour la table entière des tables de l'année (utilisé par :meth:" -"`formatyear`). La valeur par défaut est ``\"year\"``." +"La classe CSS pour la table entière des tables de l'année (utilisé " +"par :meth:`formatyear`). La valeur par défaut est ``\"year\"``." -#: library/calendar.rst:263 +#: library/calendar.rst:324 msgid "" -"The CSS class for the table head for the whole year (used by :meth:" -"`formatyear`). The default value is ``\"year\"``." +"The CSS class for the table head for the whole year (used " +"by :meth:`formatyear`). The default value is ``\"year\"``." msgstr "" -"La classe CSS pour l'en-tête de la table pour l'année entière (utilisé par :" -"meth:`formatyear`). La valeur par défaut est ``\"year\"``." +"La classe CSS pour l'en-tête de la table pour l'année entière (utilisé " +"par :meth:`formatyear`). La valeur par défaut est ``\"year\"``." -#: library/calendar.rst:269 +#: library/calendar.rst:330 msgid "" "Note that although the naming for the above described class attributes is " "singular (e.g. ``cssclass_month`` ``cssclass_noday``), one can replace the " @@ -398,12 +484,12 @@ msgstr "" "la seule classe CSS par une liste de classes CSS séparées par une espace, " "par exemple ::" -#: library/calendar.rst:275 +#: library/calendar.rst:336 msgid "Here is an example how :class:`!HTMLCalendar` can be customized::" msgstr "" "Voici un exemple de comment peut être personnalisée :class:`!HTMLCalendar` ::" -#: library/calendar.rst:287 +#: library/calendar.rst:348 msgid "" "This subclass of :class:`TextCalendar` can be passed a locale name in the " "constructor and will return month and weekday names in the specified locale." @@ -412,7 +498,7 @@ msgstr "" "de :class:`TextCalendar`. Elle renvoie les noms des mois et des jours de la " "semaine dans la locale précisée." -#: library/calendar.rst:293 +#: library/calendar.rst:354 msgid "" "This subclass of :class:`HTMLCalendar` can be passed a locale name in the " "constructor and will return month and weekday names in the specified locale." @@ -421,7 +507,7 @@ msgstr "" "de :class:`HTMLCalendar`. Elle renvoie les noms des mois et des jours de la " "semaine dans la locale précisée." -#: library/calendar.rst:299 +#: library/calendar.rst:360 #, fuzzy msgid "" "The constructor, :meth:`!formatweekday` and :meth:`!formatmonthname` methods " @@ -435,38 +521,38 @@ msgstr "" "appliqué à l'ensemble du processus, elles ne sont pas verrouillées ni " "isolées par un fil d'exécution." -#: library/calendar.rst:305 +#: library/calendar.rst:366 msgid "For simple text calendars this module provides the following functions." msgstr "" "Pour les calendriers texte simples ce module fournit les fonctions suivantes." -#: library/calendar.rst:309 +#: library/calendar.rst:370 msgid "" "Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The " -"values :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:" -"`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, and :const:`SUNDAY` are " -"provided for convenience. For example, to set the first weekday to Sunday::" +"values :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, " +"and :const:`SUNDAY` are provided for convenience. For example, to set the " +"first weekday to Sunday::" msgstr "" "Fixe le jour de la semaine (``0`` pour lundi, ``6`` pour dimanche) qui " -"débute chaque semaine. Les valeurs :const:`MONDAY`, :const:`TUESDAY`, :const:" -"`WEDNESDAY`, :const:`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, et :" -"const:`SUNDAY` sont fournies par commodité. Par exemple, pour fixer le " +"débute chaque semaine. Les " +"valeurs :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, " +"et :const:`SUNDAY` sont fournies par commodité. Par exemple, pour fixer le " "premier jour de la semaine à dimanche ::" -#: library/calendar.rst:320 +#: library/calendar.rst:381 msgid "Returns the current setting for the weekday to start each week." msgstr "" "Renvoie le réglage courant pour le jour de la semaine débutant chaque " "semaine." -#: library/calendar.rst:325 +#: library/calendar.rst:386 msgid "" "Returns :const:`True` if *year* is a leap year, otherwise :const:`False`." msgstr "" -"Renvoie :const:`True` si *year* est une année bissextile, sinon :const:" -"`False`." +"Renvoie :const:`True` si *year* est une année bissextile, " +"sinon :const:`False`." -#: library/calendar.rst:330 +#: library/calendar.rst:391 msgid "" "Returns the number of leap years in the range from *y1* to *y2* (exclusive), " "where *y1* and *y2* are years." @@ -474,12 +560,12 @@ msgstr "" "Renvoie le nombre d'années bissextiles dans la période de *y1* à *y2* (non " "inclus), où *y1* et *y2* sont des années." -#: library/calendar.rst:333 +#: library/calendar.rst:394 msgid "This function works for ranges spanning a century change." msgstr "" "Cette fonction marche pour les périodes couvrant un changement de siècle." -#: library/calendar.rst:338 +#: library/calendar.rst:399 msgid "" "Returns the day of the week (``0`` is Monday) for *year* (``1970``--...), " "*month* (``1``--``12``), *day* (``1``--``31``)." @@ -487,7 +573,7 @@ msgstr "" "Renvoie le jour de la semaine (``0`` pour lundi) pour *year* (``1970``-- …), " "*month* (``1``--``12``), *day* (``1``--``31``)." -#: library/calendar.rst:344 +#: library/calendar.rst:405 msgid "" "Return a header containing abbreviated weekday names. *n* specifies the " "width in characters for one weekday." @@ -495,16 +581,17 @@ msgstr "" "Renvoie un en-tête contenant les jours de la semaine en abrégé. *n* spécifie " "la largeur en caractères pour un jour de la semaine." -#: library/calendar.rst:350 +#: library/calendar.rst:411 +#, fuzzy msgid "" -"Returns weekday of first day of the month and number of days in month, for " +"Returns weekday of first day of the month and number of days in month, for " "the specified *year* and *month*." msgstr "" "Renvoie le jour de la semaine correspondant au premier jour du mois et le " "nombre de jours dans le mois, pour l'année *year* et le mois *month* " "spécifiés." -#: library/calendar.rst:356 +#: library/calendar.rst:417 msgid "" "Returns a matrix representing a month's calendar. Each row represents a " "week; days outside of the month are represented by zeros. Each week begins " @@ -515,55 +602,58 @@ msgstr "" "des zéros. Chaque semaine débute avec le lundi à moins de l'avoir modifié " "avec :func:`setfirstweekday`." -#: library/calendar.rst:363 +#: library/calendar.rst:424 msgid "Prints a month's calendar as returned by :func:`month`." msgstr "Affiche le calendrier d'un mois tel que renvoyé par :func:`month`." -#: library/calendar.rst:368 +#: library/calendar.rst:429 #, fuzzy msgid "" -"Returns a month's calendar in a multi-line string using the :meth:" -"`~TextCalendar.formatmonth` of the :class:`TextCalendar` class." +"Returns a month's calendar in a multi-line string using " +"the :meth:`~TextCalendar.formatmonth` of the :class:`TextCalendar` class." msgstr "" "Renvoie le calendrier d'un mois dans une chaîne multi-lignes en utilisant la " "méthode :meth:`formatmonth` de la classe :class:`TextCalendar`." -#: library/calendar.rst:374 +#: library/calendar.rst:435 msgid "" "Prints the calendar for an entire year as returned by :func:`calendar`." msgstr "" -"Affiche le calendrier pour une année entière tel que renvoyé par :func:" -"`calendar`." +"Affiche le calendrier pour une année entière tel que renvoyé " +"par :func:`calendar`." -#: library/calendar.rst:379 +#: library/calendar.rst:440 #, fuzzy msgid "" "Returns a 3-column calendar for an entire year as a multi-line string using " "the :meth:`~TextCalendar.formatyear` of the :class:`TextCalendar` class." msgstr "" "Renvoie un calendrier sur 3 colonnes pour une année entière dans une chaîne " -"multi-lignes en utilisant la méthode :meth:`formatyear` de la classe :class:" -"`TextCalendar`." +"multi-lignes en utilisant la méthode :meth:`formatyear` de la " +"classe :class:`TextCalendar`." -#: library/calendar.rst:385 +#: library/calendar.rst:446 +#, fuzzy msgid "" "An unrelated but handy function that takes a time tuple such as returned by " "the :func:`~time.gmtime` function in the :mod:`time` module, and returns the " "corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX " -"encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' " +"encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each other's " "inverse." msgstr "" "Une fonction sans rapport mais pratique, qui prend un *n*-uplet temporel tel " -"que celui renvoyé par la fonction :func:`~time.gmtime` dans le module :mod:" -"`time`, et renvoie la valeur d'horodatage Unix (*timestamp* en anglais) " -"correspondante, en supposant une époque de 1970, et l'encodage POSIX. En " -"fait, :func:`time.gmtime` et :func:`timegm` sont l'inverse l'un de l'autre." +"que celui renvoyé par la fonction :func:`~time.gmtime` dans le " +"module :mod:`time`, et renvoie la valeur d'horodatage Unix (*timestamp* en " +"anglais) correspondante, en supposant une époque de 1970, et l'encodage " +"POSIX. En fait, :func:`time.gmtime` et :func:`timegm` sont l'inverse l'un de " +"l'autre." -#: library/calendar.rst:392 -msgid "The :mod:`calendar` module exports the following data attributes:" +#: library/calendar.rst:453 +#, fuzzy +msgid "The :mod:`!calendar` module exports the following data attributes:" msgstr "Le module :mod:`calendar` exporte les attributs suivants :" -#: library/calendar.rst:396 +#: library/calendar.rst:457 #, fuzzy msgid "" "A sequence that represents the days of the week in the current locale, where " @@ -572,7 +662,7 @@ msgstr "" "Un tableau qui représente les jours de la semaine pour les paramètres " "régionaux actifs." -#: library/calendar.rst:406 +#: library/calendar.rst:467 #, fuzzy msgid "" "A sequence that represents the abbreviated days of the week in the current " @@ -581,7 +671,7 @@ msgstr "" "Un tableau qui représente les jours de la semaine en abrégé pour les " "paramètres régionaux actifs." -#: library/calendar.rst:421 +#: library/calendar.rst:482 #, fuzzy msgid "" "Aliases for the days of the week, where ``MONDAY`` is ``0`` and ``SUNDAY`` " @@ -590,26 +680,35 @@ msgstr "" "Alias pour les nombres des jours de la semaine. Lundi (``MONDAY``) est ``0`` " "et dimanche (``SUNDAY``) est ``6``." -#: library/calendar.rst:429 +#: library/calendar.rst:490 msgid "" "Enumeration defining days of the week as integer constants. The members of " -"this enumeration are exported to the module scope as :data:`MONDAY` through :" -"data:`SUNDAY`." +"this enumeration are exported to the module scope as :data:`MONDAY` " +"through :data:`SUNDAY`." msgstr "" -#: library/calendar.rst:438 +#: library/calendar.rst:499 #, fuzzy msgid "" "A sequence that represents the months of the year in the current locale. " "This follows normal convention of January being month number 1, so it has a " -"length of 13 and ``month_name[0]`` is the empty string." +"length of 13 and ``month_name[0]`` is the empty string." msgstr "" "Un tableau qui représente les mois de l'année pour les paramètres régionaux " "actifs. Ceux-ci respectent la convention usuelle où janvier est le mois " "numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la chaîne " "vide." -#: library/calendar.rst:449 +#: library/calendar.rst:509 +msgid "" +"In locales with alternative month names forms, the :data:`!month_name` " +"sequence may not be suitable when a month name stands by itself and not as " +"part of a date. For instance, in Greek and in many Slavic and Baltic " +"languages, :data:`!month_name` will produce the month in genitive case. " +"Use :data:`standalone_month_name` for a form suitable for standalone use." +msgstr "" + +#: library/calendar.rst:518 #, fuzzy msgid "" "A sequence that represents the abbreviated months of the year in the current " @@ -621,7 +720,39 @@ msgstr "" "le mois numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la " "chaîne vide." -#: library/calendar.rst:470 +#: library/calendar.rst:528 +msgid "" +"In locales with alternative month names forms, the :data:`!month_abbr` " +"sequence may not be suitable when a month name stands by itself and not as " +"part of a date. Use :data:`standalone_month_abbr` for a form suitable for " +"standalone use." +msgstr "" + +#: library/calendar.rst:535 +#, fuzzy +msgid "" +"A sequence that represents the months of the year in the current locale in " +"the standalone form if the locale provides one. Else it is equivalent " +"to :data:`month_name`." +msgstr "" +"Un tableau qui représente les mois de l'année pour les paramètres régionaux " +"actifs. Ceux-ci respectent la convention usuelle où janvier est le mois " +"numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la chaîne " +"vide." + +#: library/calendar.rst:544 +#, fuzzy +msgid "" +"A sequence that represents the abbreviated months of the year in the current " +"locale in the standalone form if the locale provides one. Else it is " +"equivalent to :data:`month_abbr`." +msgstr "" +"Un tableau qui représente les mois de l'année en abrégé pour les paramètres " +"régionaux actifs. Celui-ci respectent la convention usuelle où janvier est " +"le mois numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la " +"chaîne vide." + +#: library/calendar.rst:564 #, fuzzy msgid "" "Aliases for the months of the year, where ``JANUARY`` is ``1`` and " @@ -630,43 +761,49 @@ msgstr "" "Alias pour les nombres des jours de la semaine. Lundi (``MONDAY``) est ``0`` " "et dimanche (``SUNDAY``) est ``6``." -#: library/calendar.rst:478 +#: library/calendar.rst:572 msgid "" "Enumeration defining months of the year as integer constants. The members of " "this enumeration are exported to the module scope as :data:`JANUARY` " "through :data:`DECEMBER`." msgstr "" -#: library/calendar.rst:485 +#: library/calendar.rst:579 #, fuzzy -msgid "The :mod:`calendar` module defines the following exceptions:" +msgid "The :mod:`!calendar` module defines the following exceptions:" msgstr "Le module :mod:`calendar` exporte les attributs suivants :" -#: library/calendar.rst:489 +#: library/calendar.rst:583 msgid "" -"A subclass of :exc:`ValueError`, raised when the given month number is " -"outside of the range 1-12 (inclusive)." +"A subclass of :exc:`ValueError` and :exc:`IndexError`, raised when the given " +"month number is outside of the range 1-12 (inclusive)." msgstr "" -#: library/calendar.rst:494 +#: library/calendar.rst:586 +msgid "" +":exc:`IllegalMonthError` is now also a subclass of :exc:`ValueError`. New " +"code should avoid catching :exc:`IndexError`." +msgstr "" + +#: library/calendar.rst:593 msgid "The invalid month number." msgstr "" -#: library/calendar.rst:499 +#: library/calendar.rst:598 msgid "" "A subclass of :exc:`ValueError`, raised when the given weekday number is " "outside of the range 0-6 (inclusive)." msgstr "" -#: library/calendar.rst:504 +#: library/calendar.rst:603 msgid "The invalid weekday number." msgstr "" -#: library/calendar.rst:509 +#: library/calendar.rst:608 msgid "Module :mod:`datetime`" msgstr "Module :mod:`datetime`" -#: library/calendar.rst:510 +#: library/calendar.rst:609 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." @@ -674,98 +811,111 @@ msgstr "" "Interface orientée objet pour les dates et les heures avec des " "fonctionnalités similaires au module :mod:`time`." -#: library/calendar.rst:513 +#: library/calendar.rst:612 msgid "Module :mod:`time`" msgstr "Module :mod:`time`" -#: library/calendar.rst:514 +#: library/calendar.rst:613 msgid "Low-level time related functions." msgstr "Fonctions bas niveau relatives au temps." -#: library/calendar.rst:520 -msgid "Command-Line Usage" +#: library/calendar.rst:619 +#, fuzzy +msgid "Command-line usage" msgstr "Utilisation en ligne de commande." -#: library/calendar.rst:524 +#: library/calendar.rst:623 msgid "" -"The :mod:`calendar` module can be executed as a script from the command line " -"to interactively print a calendar." +"The :mod:`!calendar` module can be executed as a script from the command " +"line to interactively print a calendar." msgstr "" -#: library/calendar.rst:534 +#: library/calendar.rst:633 msgid "For example, to print a calendar for the year 2000:" msgstr "" -#: library/calendar.rst:577 +#: library/calendar.rst:676 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/calendar.rst:584 +#: library/calendar.rst:683 msgid "Show the help message and exit." msgstr "Affiche un message d'aide et quitte." -#: library/calendar.rst:589 +#: library/calendar.rst:688 msgid "The locale to use for month and weekday names. Defaults to English." msgstr "" -#: library/calendar.rst:595 +#: library/calendar.rst:694 msgid "" -"The encoding to use for output. :option:`--encoding` is required if :option:" -"`--locale` is set." +"The encoding to use for output. :option:`--encoding` is required " +"if :option:`--locale` is set." msgstr "" -#: library/calendar.rst:601 +#: library/calendar.rst:700 msgid "Print the calendar to the terminal as text, or as an HTML document." msgstr "" -#: library/calendar.rst:607 +#: library/calendar.rst:706 msgid "" "The weekday to start each week. Must be a number between 0 (Monday) and 6 " "(Sunday). Defaults to 0." msgstr "" -#: library/calendar.rst:615 +#: library/calendar.rst:714 msgid "The year to print the calendar for. Defaults to the current year." msgstr "" -#: library/calendar.rst:621 +#: library/calendar.rst:720 msgid "" "The month of the specified :option:`year` to print the calendar for. Must be " -"a number between 1 and 12, and may only be used in text mode. Defaults to " -"printing a calendar for the full year." +"a number between 1 and 12. Defaults to printing a calendar for the full year." msgstr "" -#: library/calendar.rst:627 +#: library/calendar.rst:725 msgid "*Text-mode options:*" msgstr "" -#: library/calendar.rst:631 +#: library/calendar.rst:729 msgid "" "The width of the date column in terminal columns. The date is printed " "centred in the column. Any value lower than 2 is ignored. Defaults to 2." msgstr "" -#: library/calendar.rst:639 +#: library/calendar.rst:737 msgid "" "The number of lines for each week in terminal rows. The date is printed top-" "aligned. Any value lower than 1 is ignored. Defaults to 1." msgstr "" -#: library/calendar.rst:647 +#: library/calendar.rst:745 msgid "" "The space between months in columns. Any value lower than 2 is ignored. " "Defaults to 6." msgstr "" -#: library/calendar.rst:654 +#: library/calendar.rst:752 msgid "The number of months printed per row. Defaults to 3." msgstr "" -#: library/calendar.rst:658 +#: library/calendar.rst:755 +msgid "" +"By default, today's date is highlighted in color and can be :ref:`controlled " +"using environment variables `." +msgstr "" + +#: library/calendar.rst:759 +msgid "" +"By default, the month is now also highlighted in color, and the days of the " +"week are also in color. This behavior can be :ref:`controlled using " +"environment variables `." +msgstr "" + +#: library/calendar.rst:764 msgid "*HTML-mode options:*" msgstr "" -#: library/calendar.rst:662 +#: library/calendar.rst:768 msgid "" "The path of a CSS stylesheet to use for the calendar. This must either be " "relative to the generated HTML, or an absolute HTTP or ``file:///`` URL." diff --git a/library/cgi.po b/library/cgi.po new file mode 100644 index 000000000..28ffd2b8a --- /dev/null +++ b/library/cgi.po @@ -0,0 +1,40 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/cgi.rst:2 +msgid ":mod:`!cgi` --- Common Gateway Interface support" +msgstr "" + +#: library/cgi.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/cgi.rst:14 +msgid "" +"A fork of the module on PyPI can be used instead: :pypi:`legacy-cgi`. This " +"is a copy of the cgi module, no longer maintained or supported by the core " +"Python team." +msgstr "" + +#: library/cgi.rst:18 +msgid "" +"The last version of Python that provided the :mod:`!cgi` module was `Python " +"3.12 `_." +msgstr "" diff --git a/library/cgitb.po b/library/cgitb.po new file mode 100644 index 000000000..ede007ed4 --- /dev/null +++ b/library/cgitb.po @@ -0,0 +1,40 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/cgitb.rst:2 +msgid ":mod:`!cgitb` --- Traceback manager for CGI scripts" +msgstr "" + +#: library/cgitb.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/cgitb.rst:14 +msgid "" +"A fork of the module on PyPI can now be used instead: :pypi:`legacy-cgi`. " +"This is a copy of the cgi module, no longer maintained or supported by the " +"core Python team." +msgstr "" + +#: library/cgitb.rst:18 +msgid "" +"The last version of Python that provided the :mod:`!cgitb` module was " +"`Python 3.12 `_." +msgstr "" diff --git a/library/chunk.po b/library/chunk.po new file mode 100644 index 000000000..8f4f6d3b7 --- /dev/null +++ b/library/chunk.po @@ -0,0 +1,33 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/chunk.rst:2 +msgid ":mod:`!chunk` --- Read IFF chunked data" +msgstr "" + +#: library/chunk.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/chunk.rst:14 +msgid "" +"The last version of Python that provided the :mod:`!chunk` module was " +"`Python 3.12 `_." +msgstr "" diff --git a/library/cmath.po b/library/cmath.po index 39db8faee..a24baa819 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-05-28 20:19+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -53,33 +53,325 @@ msgstr "" #: library/cmath.rst:26 msgid "" "For example, the :func:`cmath.sqrt` function has a branch cut along the " -"negative real axis. An argument of ``complex(-2.0, -0.0)`` is treated as " -"though it lies *below* the branch cut, and so gives a result on the negative " -"imaginary axis::" +"negative real axis. An argument of ``-2-0j`` is treated as though it lies " +"*below* the branch cut, and so gives a result on the negative imaginary " +"axis::" msgstr "" #: library/cmath.rst:34 msgid "" -"But an argument of ``complex(-2.0, 0.0)`` is treated as though it lies above " -"the branch cut::" +"But an argument of ``-2+0j`` is treated as though it lies above the branch " +"cut::" msgstr "" #: library/cmath.rst:42 -msgid "Conversions to and from polar coordinates" +#, fuzzy +msgid "**Conversions to and from polar coordinates**" msgstr "Conversion vers et à partir de coordonnées polaires" #: library/cmath.rst:44 +msgid ":func:`phase(z) `" +msgstr "" + +#: library/cmath.rst:44 +#, fuzzy +msgid "Return the phase of *z*" +msgstr "Renvoie le sinus de *x*." + +#: library/cmath.rst:45 +msgid ":func:`polar(z) `" +msgstr "" + +#: library/cmath.rst:45 +#, fuzzy +msgid "Return the representation of *z* in polar coordinates" +msgstr "Conversion vers et à partir de coordonnées polaires" + +#: library/cmath.rst:46 +msgid ":func:`rect(r, phi) `" +msgstr "" + +#: library/cmath.rst:46 +#, fuzzy +msgid "Return the complex number *z* with polar coordinates *r* and *phi*" +msgstr "" +"Renvoie le nombre complexe *x* dont les coordonnées polaires sont *r* et " +"*phi*. Équivalent à ``r * (math.cos(phi) + math.sin(phi)*1j)``." + +#: library/cmath.rst:48 +#, fuzzy +msgid "**Power and logarithmic functions**" +msgstr "Fonctions logarithme et exponentielle" + +#: library/cmath.rst:50 +msgid ":func:`exp(z) `" +msgstr "" + +#: library/cmath.rst:50 +msgid "Return *e* raised to the power *z*" +msgstr "" + +#: library/cmath.rst:51 +msgid ":func:`log(z[, base]) `" +msgstr "" + +#: library/cmath.rst:51 +msgid "Return the logarithm of *z* to the given *base* (*e* by default)" +msgstr "" + +#: library/cmath.rst:52 +msgid ":func:`log10(z) `" +msgstr "" + +#: library/cmath.rst:52 +#, fuzzy +msgid "Return the base-10 logarithm of *z*" +msgstr "Renvoie la tangente de *x*." + +#: library/cmath.rst:53 +msgid ":func:`sqrt(z) `" +msgstr "" + +#: library/cmath.rst:53 +#, fuzzy +msgid "Return the square root of *z*" +msgstr "Renvoie le sinus de *x*." + +#: library/cmath.rst:55 +#, fuzzy +msgid "**Trigonometric functions**" +msgstr "Fonctions trigonométriques" + +#: library/cmath.rst:57 +msgid ":func:`acos(z) `" +msgstr "" + +#: library/cmath.rst:57 +#, fuzzy +msgid "Return the arc cosine of *z*" +msgstr "Renvoie le cosinus de *x*." + +#: library/cmath.rst:58 +msgid ":func:`asin(z) `" +msgstr "" + +#: library/cmath.rst:58 +#, fuzzy +msgid "Return the arc sine of *z*" +msgstr "Renvoie le cosinus de *x*." + +#: library/cmath.rst:59 +msgid ":func:`atan(z) `" +msgstr "" + +#: library/cmath.rst:59 +#, fuzzy +msgid "Return the arc tangent of *z*" +msgstr "Renvoie la tangente de *x*." + +#: library/cmath.rst:60 +msgid ":func:`cos(z) `" +msgstr "" + +#: library/cmath.rst:60 +#, fuzzy +msgid "Return the cosine of *z*" +msgstr "Renvoie le cosinus de *x*." + +#: library/cmath.rst:61 +msgid ":func:`sin(z) `" +msgstr "" + +#: library/cmath.rst:61 +#, fuzzy +msgid "Return the sine of *z*" +msgstr "Renvoie le sinus de *x*." + +#: library/cmath.rst:62 +msgid ":func:`tan(z) `" +msgstr "" + +#: library/cmath.rst:62 +#, fuzzy +msgid "Return the tangent of *z*" +msgstr "Renvoie la tangente de *x*." + +#: library/cmath.rst:64 +#, fuzzy +msgid "**Hyperbolic functions**" +msgstr "Fonctions hyperboliques" + +#: library/cmath.rst:66 +msgid ":func:`acosh(z) `" +msgstr "" + +#: library/cmath.rst:66 +#, fuzzy +msgid "Return the inverse hyperbolic cosine of *z*" +msgstr "Renvoie le cosinus hyperbolique de *x*." + +#: library/cmath.rst:67 +msgid ":func:`asinh(z) `" +msgstr "" + +#: library/cmath.rst:67 +#, fuzzy +msgid "Return the inverse hyperbolic sine of *z*" +msgstr "Renvoie le sinus hyperbolique de *x*." + +#: library/cmath.rst:68 +msgid ":func:`atanh(z) `" +msgstr "" + +#: library/cmath.rst:68 +#, fuzzy +msgid "Return the inverse hyperbolic tangent of *z*" +msgstr "Renvoie la tangente hyperbolique de *x*." + +#: library/cmath.rst:69 +msgid ":func:`cosh(z) `" +msgstr "" + +#: library/cmath.rst:69 +#, fuzzy +msgid "Return the hyperbolic cosine of *z*" +msgstr "Renvoie le cosinus hyperbolique de *x*." + +#: library/cmath.rst:70 +msgid ":func:`sinh(z) `" +msgstr "" + +#: library/cmath.rst:70 +#, fuzzy +msgid "Return the hyperbolic sine of *z*" +msgstr "Renvoie le sinus hyperbolique de *x*." + +#: library/cmath.rst:71 +msgid ":func:`tanh(z) `" +msgstr "" + +#: library/cmath.rst:71 +#, fuzzy +msgid "Return the hyperbolic tangent of *z*" +msgstr "Renvoie la tangente hyperbolique de *x*." + +#: library/cmath.rst:73 +#, fuzzy +msgid "**Classification functions**" +msgstr "Fonctions de classifications" + +#: library/cmath.rst:75 +msgid ":func:`isfinite(z) `" +msgstr "" + +#: library/cmath.rst:75 +msgid "Check if all components of *z* are finite" +msgstr "" + +#: library/cmath.rst:76 +msgid ":func:`isinf(z) `" +msgstr "" + +#: library/cmath.rst:76 +msgid "Check if any component of *z* is infinite" +msgstr "" + +#: library/cmath.rst:77 +msgid ":func:`isnan(z) `" +msgstr "" + +#: library/cmath.rst:77 +msgid "Check if any component of *z* is a NaN" +msgstr "" + +#: library/cmath.rst:78 +msgid ":func:`isclose(a, b, *, rel_tol, abs_tol) `" +msgstr "" + +#: library/cmath.rst:78 +#, fuzzy +msgid "Check if the values *a* and *b* are close to each other" +msgstr "" +"Renvoie ``True`` si les valeurs *a* et *b* sont proches l'une de l'autre, et " +"``False`` sinon." + +#: library/cmath.rst:80 +#, fuzzy +msgid "**Constants**" +msgstr "Constantes" + +#: library/cmath.rst:82 +msgid ":data:`pi`" +msgstr "" + +#: library/cmath.rst:82 +msgid "*π* = 3.141592..." +msgstr "" + +#: library/cmath.rst:83 +msgid ":data:`e`" +msgstr "" + +#: library/cmath.rst:83 +msgid "*e* = 2.718281..." +msgstr "" + +#: library/cmath.rst:84 +msgid ":data:`tau`" +msgstr "" + +#: library/cmath.rst:84 +msgid "*τ* = 2\\ *π* = 6.283185..." +msgstr "" + +#: library/cmath.rst:85 +msgid ":data:`inf`" +msgstr "" + +#: library/cmath.rst:85 +msgid "Positive infinity" +msgstr "" + +#: library/cmath.rst:86 +msgid ":data:`infj`" +msgstr "" + +#: library/cmath.rst:86 +msgid "Pure imaginary infinity" +msgstr "" + +#: library/cmath.rst:87 +msgid ":data:`nan`" +msgstr "" + +#: library/cmath.rst:87 +msgid "\"Not a number\" (NaN)" +msgstr "" + +#: library/cmath.rst:88 +msgid ":data:`nanj`" +msgstr "" + +#: library/cmath.rst:88 +msgid "Pure imaginary NaN" +msgstr "" + +#: library/cmath.rst:93 +msgid "Conversions to and from polar coordinates" +msgstr "Conversion vers et à partir de coordonnées polaires" + +#: library/cmath.rst:95 #, fuzzy msgid "" "A Python complex number ``z`` is stored internally using *rectangular* or " -"*Cartesian* coordinates. It is completely determined by its *real part* ``z." -"real`` and its *imaginary part* ``z.imag``." +"*Cartesian* coordinates. It is completely determined by its *real part* " +"``z.real`` and its *imaginary part* ``z.imag``." msgstr "" "Un nombre complexe Python ``z`` est stocké de manière interne en coordonnées " "*cartésiennes*. Il est entièrement défini par sa *partie réelle* ``z.real`` " "et sa *partie complexe* ``z.imag``. En d'autres termes ::" -#: library/cmath.rst:48 +#: library/cmath.rst:99 msgid "" "*Polar coordinates* give an alternative way to represent a complex number. " "In polar coordinates, a complex number *z* is defined by the modulus *r* and " @@ -96,7 +388,7 @@ msgstr "" "trigonométrique), mesuré en radians, à partir de l'axe X positif, et vers le " "segment de droite joignant *z* à l'origine." -#: library/cmath.rst:55 +#: library/cmath.rst:106 msgid "" "The following functions can be used to convert from the native rectangular " "coordinates to polar coordinates and back." @@ -105,14 +397,14 @@ msgstr "" "coordonnées rectangulaires natives vers les coordonnées polaires, et vice-" "versa." -#: library/cmath.rst:60 +#: library/cmath.rst:111 #, fuzzy msgid "" -"Return the phase of *x* (also known as the *argument* of *x*), as a float. " -"``phase(x)`` is equivalent to ``math.atan2(x.imag, x.real)``. The result " +"Return the phase of *z* (also known as the *argument* of *z*), as a float. " +"``phase(z)`` is equivalent to ``math.atan2(z.imag, z.real)``. The result " "lies in the range [-\\ *π*, *π*], and the branch cut for this operation lies " "along the negative real axis. The sign of the result is the same as the " -"sign of ``x.imag``, even when ``x.imag`` is zero::" +"sign of ``z.imag``, even when ``z.imag`` is zero::" msgstr "" "Renvoie l'argument de *x*, dans un nombre flottant. ``phase(x)`` est " "équivalent à ``math.atan2(x.imag, x.real)``. Le résultat se situe dans " @@ -122,52 +414,55 @@ msgstr "" "utilisés actuellement), cela signifie que le signe du résultat est le même " "que ``x.imag`` même quand ``x.imag`` vaut zéro ::" -#: library/cmath.rst:74 +#: library/cmath.rst:125 +#, fuzzy msgid "" -"The modulus (absolute value) of a complex number *x* can be computed using " -"the built-in :func:`abs` function. There is no separate :mod:`cmath` module " -"function for this operation." +"The modulus (absolute value) of a complex number *z* can be computed using " +"the built-in :func:`abs` function. There is no separate :mod:`!cmath` " +"module function for this operation." msgstr "" "Le module (valeur absolue) d'un nombre complexe *x* peut être calculé en " "utilisant la primitive :func:`abs`. Il n'y a pas de fonction spéciale du " "module :mod:`cmath` pour cette opération." -#: library/cmath.rst:81 +#: library/cmath.rst:132 +#, fuzzy msgid "" -"Return the representation of *x* in polar coordinates. Returns a pair ``(r, " -"phi)`` where *r* is the modulus of *x* and phi is the phase of *x*. " -"``polar(x)`` is equivalent to ``(abs(x), phase(x))``." +"Return the representation of *z* in polar coordinates. Returns a pair ``(r, " +"phi)`` where *r* is the modulus of *z* and *phi* is the phase of *z*. " +"``polar(z)`` is equivalent to ``(abs(z), phase(z))``." msgstr "" "Renvoie la représentation de *x* en coordonnées polaires. Renvoie une paire " "``(r, phi)`` où *r* est le module de *x* et phi est l'argument de *x*. " "``polar(x)`` est équivalent à ``(abs(x), phase(x))``." -#: library/cmath.rst:89 +#: library/cmath.rst:140 #, fuzzy msgid "" -"Return the complex number *x* with polar coordinates *r* and *phi*. " +"Return the complex number *z* with polar coordinates *r* and *phi*. " "Equivalent to ``complex(r * math.cos(phi), r * math.sin(phi))``." msgstr "" "Renvoie le nombre complexe *x* dont les coordonnées polaires sont *r* et " "*phi*. Équivalent à ``r * (math.cos(phi) + math.sin(phi)*1j)``." -#: library/cmath.rst:94 +#: library/cmath.rst:145 msgid "Power and logarithmic functions" msgstr "Fonctions logarithme et exponentielle" -#: library/cmath.rst:98 +#: library/cmath.rst:149 +#, fuzzy msgid "" -"Return *e* raised to the power *x*, where *e* is the base of natural " +"Return *e* raised to the power *z*, where *e* is the base of natural " "logarithms." msgstr "" "Renvoie *e* élevé à la puissance *x*, où *e* est la base des logarithmes " "naturels." -#: library/cmath.rst:104 +#: library/cmath.rst:155 #, fuzzy msgid "" -"Returns the logarithm of *x* to the given *base*. If the *base* is not " -"specified, returns the natural logarithm of *x*. There is one branch cut, " +"Return the logarithm of *z* to the given *base*. If the *base* is not " +"specified, returns the natural logarithm of *z*. There is one branch cut, " "from 0 along the negative real axis to -∞." msgstr "" "Renvoie le logarithme de *x* dans la *base* précisée. Si la *base* n'est pas " @@ -175,28 +470,30 @@ msgstr "" "coupure, partant de 0 sur l'axe réel négatif et vers ``-∞``, continue par au-" "dessus." -#: library/cmath.rst:111 +#: library/cmath.rst:162 +#, fuzzy msgid "" -"Return the base-10 logarithm of *x*. This has the same branch cut as :func:" -"`log`." +"Return the base-10 logarithm of *z*. This has the same branch cut " +"as :func:`log`." msgstr "" -"Renvoie le logarithme en base 10 de *x*. Elle a la même coupure que :func:" -"`log`." +"Renvoie le logarithme en base 10 de *x*. Elle a la même coupure " +"que :func:`log`." -#: library/cmath.rst:117 +#: library/cmath.rst:168 +#, fuzzy msgid "" -"Return the square root of *x*. This has the same branch cut as :func:`log`." +"Return the square root of *z*. This has the same branch cut as :func:`log`." msgstr "" "Renvoie la racine carrée de *x*. Elle a la même coupure que :func:`log`." -#: library/cmath.rst:121 +#: library/cmath.rst:172 msgid "Trigonometric functions" msgstr "Fonctions trigonométriques" -#: library/cmath.rst:125 +#: library/cmath.rst:176 #, fuzzy msgid "" -"Return the arc cosine of *x*. There are two branch cuts: One extends right " +"Return the arc cosine of *z*. There are two branch cuts: One extends right " "from 1 along the real axis to ∞. The other extends left from -1 along the " "real axis to -∞." msgstr "" @@ -204,16 +501,17 @@ msgstr "" "l'axe réel vers ∞, continue par en-dessous ; l'autre allant de ``-1`` sur " "l'axe réel vers ``-∞``, continue par au-dessus." -#: library/cmath.rst:132 +#: library/cmath.rst:183 +#, fuzzy msgid "" -"Return the arc sine of *x*. This has the same branch cuts as :func:`acos`." +"Return the arc sine of *z*. This has the same branch cuts as :func:`acos`." msgstr "" "Renvoie l'arc sinus de *x*. Elle a les mêmes coupures que :func:`acos`." -#: library/cmath.rst:137 +#: library/cmath.rst:188 #, fuzzy msgid "" -"Return the arc tangent of *x*. There are two branch cuts: One extends from " +"Return the arc tangent of *z*. There are two branch cuts: One extends from " "``1j`` along the imaginary axis to ``∞j``. The other extends from ``-1j`` " "along the imaginary axis to ``-∞j``." msgstr "" @@ -221,35 +519,38 @@ msgstr "" "l'axe imaginaire vers ``∞j``, continue par la droite ; l'autre allant de " "``-1j`` sur l'axe imaginaire vers ``-∞j``, continue par la gauche." -#: library/cmath.rst:144 -msgid "Return the cosine of *x*." +#: library/cmath.rst:195 +#, fuzzy +msgid "Return the cosine of *z*." msgstr "Renvoie le cosinus de *x*." -#: library/cmath.rst:149 -msgid "Return the sine of *x*." +#: library/cmath.rst:200 +#, fuzzy +msgid "Return the sine of *z*." msgstr "Renvoie le sinus de *x*." -#: library/cmath.rst:154 -msgid "Return the tangent of *x*." +#: library/cmath.rst:205 +#, fuzzy +msgid "Return the tangent of *z*." msgstr "Renvoie la tangente de *x*." -#: library/cmath.rst:158 +#: library/cmath.rst:209 msgid "Hyperbolic functions" msgstr "Fonctions hyperboliques" -#: library/cmath.rst:162 +#: library/cmath.rst:213 #, fuzzy msgid "" -"Return the inverse hyperbolic cosine of *x*. There is one branch cut, " +"Return the inverse hyperbolic cosine of *z*. There is one branch cut, " "extending left from 1 along the real axis to -∞." msgstr "" "Renvoie l'arc cosinus hyperbolique de *x*. Il y a une coupure, allant de 1 " "sur l'axe réel vers ``-∞``, continue par au-dessus." -#: library/cmath.rst:168 +#: library/cmath.rst:219 #, fuzzy msgid "" -"Return the inverse hyperbolic sine of *x*. There are two branch cuts: One " +"Return the inverse hyperbolic sine of *z*. There are two branch cuts: One " "extends from ``1j`` along the imaginary axis to ``∞j``. The other extends " "from ``-1j`` along the imaginary axis to ``-∞j``." msgstr "" @@ -257,10 +558,10 @@ msgstr "" "de ``1j`` sur l'axe imaginaire vers ``∞j``, continue par la droite ; l'autre " "allant de ``-1j`` sur l'axe imaginaire vers ``∞j``, continue par la gauche." -#: library/cmath.rst:175 +#: library/cmath.rst:226 #, fuzzy msgid "" -"Return the inverse hyperbolic tangent of *x*. There are two branch cuts: One " +"Return the inverse hyperbolic tangent of *z*. There are two branch cuts: One " "extends from ``1`` along the real axis to ``∞``. The other extends from " "``-1`` along the real axis to ``-∞``." msgstr "" @@ -268,47 +569,53 @@ msgstr "" "allant de ``1`` sur l'axe réel allant vers ``∞``, continue par en-dessous ; " "l'autre allant de ``-1`` sur l'axe réel vers ``-∞``, continue par au-dessus." -#: library/cmath.rst:182 -msgid "Return the hyperbolic cosine of *x*." +#: library/cmath.rst:233 +#, fuzzy +msgid "Return the hyperbolic cosine of *z*." msgstr "Renvoie le cosinus hyperbolique de *x*." -#: library/cmath.rst:187 -msgid "Return the hyperbolic sine of *x*." +#: library/cmath.rst:238 +#, fuzzy +msgid "Return the hyperbolic sine of *z*." msgstr "Renvoie le sinus hyperbolique de *x*." -#: library/cmath.rst:192 -msgid "Return the hyperbolic tangent of *x*." +#: library/cmath.rst:243 +#, fuzzy +msgid "Return the hyperbolic tangent of *z*." msgstr "Renvoie la tangente hyperbolique de *x*." -#: library/cmath.rst:196 +#: library/cmath.rst:247 msgid "Classification functions" msgstr "Fonctions de classifications" -#: library/cmath.rst:200 +#: library/cmath.rst:251 +#, fuzzy msgid "" -"Return ``True`` if both the real and imaginary parts of *x* are finite, and " +"Return ``True`` if both the real and imaginary parts of *z* are finite, and " "``False`` otherwise." msgstr "" "Renvoie ``True`` si la partie réelle *et* la partie imaginaire de *x* sont " "finies, et ``False`` sinon." -#: library/cmath.rst:208 +#: library/cmath.rst:259 +#, fuzzy msgid "" -"Return ``True`` if either the real or the imaginary part of *x* is an " +"Return ``True`` if either the real or the imaginary part of *z* is an " "infinity, and ``False`` otherwise." msgstr "" "Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " "est infinie, et ``False`` sinon." -#: library/cmath.rst:214 +#: library/cmath.rst:265 +#, fuzzy msgid "" -"Return ``True`` if either the real or the imaginary part of *x* is a NaN, " +"Return ``True`` if either the real or the imaginary part of *z* is a NaN, " "and ``False`` otherwise." msgstr "" "Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " "est NaN, et ``False`` sinon." -#: library/cmath.rst:220 +#: library/cmath.rst:271 msgid "" "Return ``True`` if the values *a* and *b* are close to each other and " "``False`` otherwise." @@ -316,21 +623,25 @@ msgstr "" "Renvoie ``True`` si les valeurs *a* et *b* sont proches l'une de l'autre, et " "``False`` sinon." -#: library/cmath.rst:223 +#: library/cmath.rst:274 +#, fuzzy msgid "" "Whether or not two values are considered close is determined according to " -"given absolute and relative tolerances." +"given absolute and relative tolerances. If no errors occur, the result will " +"be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``." msgstr "" "Déterminer si deux valeurs sont proches se fait à l'aide des tolérances " "absolues et relatives données en paramètres." -#: library/cmath.rst:226 +#: library/cmath.rst:278 +#, fuzzy msgid "" "*rel_tol* is the relative tolerance -- it is the maximum allowed difference " "between *a* and *b*, relative to the larger absolute value of *a* or *b*. " "For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default " "tolerance is ``1e-09``, which assures that the two values are the same " -"within about 9 decimal digits. *rel_tol* must be greater than zero." +"within about 9 decimal digits. *rel_tol* must be nonnegative and less than " +"``1.0``." msgstr "" "*rel_tol* est la tolérance relative -- c'est la différence maximale permise " "entre *a* et *b*, relativement à la plus grande valeur de *a* ou de *b*. Par " @@ -339,23 +650,16 @@ msgstr "" "mêmes à partir de la 9\\ :sup:`e` décimale. *rel_tol* doit être supérieur à " "zéro." -#: library/cmath.rst:232 +#: library/cmath.rst:285 msgid "" -"*abs_tol* is the minimum absolute tolerance -- useful for comparisons near " -"zero. *abs_tol* must be at least zero." +"*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be " +"nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed " +"as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any ``x`` and " +"rel_tol less than ``1.0``. So add an appropriate positive abs_tol argument " +"to the call." msgstr "" -"*abs_tol* est la tolérance absolue minimale -- utile pour les comparaisons " -"proches de zéro. *abs_tol* doit valoir au moins zéro." -#: library/cmath.rst:235 -msgid "" -"If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * " -"max(abs(a), abs(b)), abs_tol)``." -msgstr "" -"Si aucune erreur n'est rencontrée, le résultat sera : ``abs(a-b) <= " -"max(rel_tol * max(abs(a), abs(b)), abs_tol)``." - -#: library/cmath.rst:238 +#: library/cmath.rst:291 msgid "" "The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be " "handled according to IEEE rules. Specifically, ``NaN`` is not considered " @@ -368,32 +672,32 @@ msgstr "" "``NaN`` inclus. ``inf`` et ``-inf`` ne sont considérés proches que d'eux-" "mêmes." -#: library/cmath.rst:247 +#: library/cmath.rst:300 msgid ":pep:`485` -- A function for testing approximate equality" msgstr ":pep:`485` -- Une fonction pour tester des égalités approximées" -#: library/cmath.rst:251 +#: library/cmath.rst:304 msgid "Constants" msgstr "Constantes" -#: library/cmath.rst:255 +#: library/cmath.rst:308 msgid "The mathematical constant *π*, as a float." msgstr "La constante mathématique *π*, en tant que flottant." -#: library/cmath.rst:260 +#: library/cmath.rst:313 msgid "The mathematical constant *e*, as a float." msgstr "La constante mathématique *e*, en tant que flottant." -#: library/cmath.rst:265 +#: library/cmath.rst:318 msgid "The mathematical constant *τ*, as a float." msgstr "La constante mathématique *τ*, sous forme de flottant." -#: library/cmath.rst:272 +#: library/cmath.rst:325 msgid "Floating-point positive infinity. Equivalent to ``float('inf')``." msgstr "" "Nombre à virgule flottante positif infini. Équivaut à ``float('inf')``." -#: library/cmath.rst:279 +#: library/cmath.rst:332 msgid "" "Complex number with zero real part and positive infinity imaginary part. " "Equivalent to ``complex(0.0, float('inf'))``." @@ -401,15 +705,16 @@ msgstr "" "Nombre complexe dont la partie réelle vaut zéro et la partie imaginaire un " "infini positif. Équivalent à ``complex(0.0, float('inf'))``." -#: library/cmath.rst:287 +#: library/cmath.rst:340 +#, fuzzy msgid "" "A floating-point \"not a number\" (NaN) value. Equivalent to " -"``float('nan')``." +"``float('nan')``. See also :data:`math.nan`." msgstr "" "Un nombre à virgule flottante *NaN* (*Not a number*). Équivalent à " "``float('nan')``." -#: library/cmath.rst:295 +#: library/cmath.rst:348 msgid "" "Complex number with zero real part and NaN imaginary part. Equivalent to " "``complex(0.0, float('nan'))``." @@ -417,14 +722,15 @@ msgstr "" "Nombre complexe dont la partie réelle vaut zéro et la partie imaginaire vaut " "un *NaN*. Équivalent à ``complex(0.0, float('nan'))``." -#: library/cmath.rst:303 +#: library/cmath.rst:356 +#, fuzzy msgid "" "Note that the selection of functions is similar, but not identical, to that " "in module :mod:`math`. The reason for having two modules is that some users " "aren't interested in complex numbers, and perhaps don't even know what they " "are. They would rather have ``math.sqrt(-1)`` raise an exception than " -"return a complex number. Also note that the functions defined in :mod:" -"`cmath` always return a complex number, even if the answer can be expressed " +"return a complex number. Also note that the functions defined in :mod:`!" +"cmath` always return a complex number, even if the answer can be expressed " "as a real number (in which case the complex number has an imaginary part of " "zero)." msgstr "" @@ -437,7 +743,7 @@ msgstr "" "toujours un nombre complexe, même si le résultat peut être exprimé à l'aide " "d'un nombre réel (en quel cas la partie imaginaire du complexe vaut zéro)." -#: library/cmath.rst:311 +#: library/cmath.rst:364 msgid "" "A note on branch cuts: They are curves along which the given function fails " "to be continuous. They are a necessary feature of many complex functions. " @@ -455,7 +761,7 @@ msgstr "" "plus d'informations. Pour des informations sur les choix des coupures à des " "fins numériques, voici une bonne référence :" -#: library/cmath.rst:321 +#: library/cmath.rst:374 msgid "" "Kahan, W: Branch cuts for complex elementary functions; or, Much ado about " "nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the " @@ -465,6 +771,20 @@ msgstr "" "nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the " "art in numerical analysis. Clarendon Press (1987) pp165--211." +#~ msgid "" +#~ "*abs_tol* is the minimum absolute tolerance -- useful for comparisons " +#~ "near zero. *abs_tol* must be at least zero." +#~ msgstr "" +#~ "*abs_tol* est la tolérance absolue minimale -- utile pour les " +#~ "comparaisons proches de zéro. *abs_tol* doit valoir au moins zéro." + +#~ msgid "" +#~ "If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * " +#~ "max(abs(a), abs(b)), abs_tol)``." +#~ msgstr "" +#~ "Si aucune erreur n'est rencontrée, le résultat sera : ``abs(a-b) <= " +#~ "max(rel_tol * max(abs(a), abs(b)), abs_tol)``." + #~ msgid "module" #~ msgstr "module" diff --git a/library/cmd.po b/library/cmd.po index 0fd95779a..f34a75c36 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-21 12:43+0200\n" "Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!cmd` --- Support for line-oriented command interpreters" msgstr ":mod:`cmd` — Interpréteurs en ligne de commande." -#: library/cmd.rst:9 +#: library/cmd.rst:7 msgid "**Source code:** :source:`Lib/cmd.py`" msgstr "**Code source:** :source:`Lib/cmd.py`" -#: library/cmd.rst:13 +#: library/cmd.rst:11 msgid "" "The :class:`Cmd` class provides a simple framework for writing line-oriented " "command interpreters. These are often useful for test harnesses, " @@ -36,7 +36,7 @@ msgstr "" "des tests, pour des outils administratifs, et pour des prototypes destinés à " "être intégrés à une interface plus sophistiquée." -#: library/cmd.rst:20 +#: library/cmd.rst:18 msgid "" "A :class:`Cmd` instance or subclass instance is a line-oriented interpreter " "framework. There is no good reason to instantiate :class:`Cmd` itself; " @@ -45,68 +45,68 @@ msgid "" "methods." msgstr "" "Une instance de :class:`Cmd` ou d'une classe en héritant est un *framework* " -"orienté ligne de commande. Il n'y a pas de bonne raison d'instancier :class:" -"`Cmd` directement. Elle est plutôt utile en tant que classe mère d'une " -"classe-interprète que vous définirez afin d'hériter des méthodes de :class:" -"`Cmd` et d'encapsuler les opérations." +"orienté ligne de commande. Il n'y a pas de bonne raison " +"d'instancier :class:`Cmd` directement. Elle est plutôt utile en tant que " +"classe mère d'une classe-interprète que vous définirez afin d'hériter des " +"méthodes de :class:`Cmd` et d'encapsuler les opérations." -#: library/cmd.rst:25 +#: library/cmd.rst:23 msgid "" "The optional argument *completekey* is the :mod:`readline` name of a " -"completion key; it defaults to :kbd:`Tab`. If *completekey* is not :const:" -"`None` and :mod:`readline` is available, command completion is done " -"automatically." +"completion key; it defaults to :kbd:`Tab`. If *completekey* is " +"not :const:`None` and :mod:`readline` is available, command completion is " +"done automatically." msgstr "" "L'argument facultatif *completekey* est le nom :mod:`readline` d'une touche " -"de complétion. Si *completekey* ne vaut pas :const:`None` et que :mod:" -"`readline` est disponible, la complétion de commandes est faite " +"de complétion. Si *completekey* ne vaut pas :const:`None` et " +"que :mod:`readline` est disponible, la complétion de commandes est faite " "automatiquement." -#: library/cmd.rst:29 +#: library/cmd.rst:27 msgid "" -"The default, ``'tab'``, is treated specially, so that it refers to the :kbd:" -"`Tab` key on every :data:`readline.backend`. Specifically, if :data:" -"`readline.backend` is ``editline``, ``Cmd`` will use ``'^I'`` instead of " -"``'tab'``. Note that other values are not treated this way, and might only " -"work with a specific backend." +"The default, ``'tab'``, is treated specially, so that it refers to " +"the :kbd:`Tab` key on every :data:`readline.backend`. Specifically, " +"if :data:`readline.backend` is ``editline``, ``Cmd`` will use ``'^I'`` " +"instead of ``'tab'``. Note that other values are not treated this way, and " +"might only work with a specific backend." msgstr "" -#: library/cmd.rst:36 +#: library/cmd.rst:34 msgid "" "The optional arguments *stdin* and *stdout* specify the input and output " "file objects that the Cmd instance or subclass instance will use for input " -"and output. If not specified, they will default to :data:`sys.stdin` and :" -"data:`sys.stdout`." +"and output. If not specified, they will default to :data:`sys.stdin` " +"and :data:`sys.stdout`." msgstr "" "Les arguments facultatifs *stdin* et *stdout* spécifient les objets-fichiers " "de lecture et d'écriture que l'instance de Cmd ou d'une classe fille " "utilisera comme entrée et sortie. Si ces arguments ne sont pas spécifiés, " -"ils prendront comme valeur par défaut :data:`sys.stdin` et :data:`sys." -"stdout`." +"ils prendront comme valeur par défaut :data:`sys.stdin` " +"et :data:`sys.stdout`." -#: library/cmd.rst:41 +#: library/cmd.rst:39 msgid "" -"If you want a given *stdin* to be used, make sure to set the instance's :" -"attr:`use_rawinput` attribute to ``False``, otherwise *stdin* will be " -"ignored." +"If you want a given *stdin* to be used, make sure to set the " +"instance's :attr:`use_rawinput` attribute to ``False``, otherwise *stdin* " +"will be ignored." msgstr "" "Si vous souhaitez qu'un *stdin* donné soit utilisé, assurez-vous que " "l'attribut :attr:`use_rawinput` de l'instance vaille ``False``, faute de " "quoi *stdin* sera ignoré." -#: library/cmd.rst:45 +#: library/cmd.rst:43 msgid "``completekey='tab'`` is replaced by ``'^I'`` for ``editline``." msgstr "" -#: library/cmd.rst:52 +#: library/cmd.rst:50 msgid "Cmd Objects" msgstr "Objets Cmd" -#: library/cmd.rst:54 +#: library/cmd.rst:52 msgid "A :class:`Cmd` instance has the following methods:" msgstr "Une instance de :class:`Cmd` possède les méthodes suivantes :" -#: library/cmd.rst:59 +#: library/cmd.rst:57 msgid "" "Repeatedly issue a prompt, accept input, parse an initial prefix off the " "received input, and dispatch to action methods, passing them the remainder " @@ -116,7 +116,7 @@ msgstr "" "soustrait un préfixe initial de l'entrée reçue et envoie aux méthodes " "d'opération la partie restante de l'entrée reçue." -#: library/cmd.rst:63 +#: library/cmd.rst:61 msgid "" "The optional argument is a banner or intro string to be issued before the " "first prompt (this overrides the :attr:`intro` class attribute)." @@ -125,27 +125,28 @@ msgstr "" "d'introduction à afficher avant la première invite de commande (il redéfinit " "l'attribut de classe :attr:`intro`)." -#: library/cmd.rst:66 +#: library/cmd.rst:64 msgid "" -"If the :mod:`readline` module is loaded, input will automatically inherit :" -"program:`bash`\\ -like history-list editing (e.g. :kbd:`Control-P` scrolls " -"back to the last command, :kbd:`Control-N` forward to the next one, :kbd:" -"`Control-F` moves the cursor to the right non-destructively, :kbd:`Control-" -"B` moves the cursor to the left non-destructively, etc.)." +"If the :mod:`readline` module is loaded, input will automatically " +"inherit :program:`bash`\\ -like history-list editing (e.g. :kbd:`Control-P` " +"scrolls back to the last command, :kbd:`Control-N` forward to the next " +"one, :kbd:`Control-F` moves the cursor to the right non-" +"destructively, :kbd:`Control-B` moves the cursor to the left non-" +"destructively, etc.)." msgstr "" "Si le module :mod:`readline` est chargé, l'entrée héritera automatiquement " -"d'une édition d'historique similaire à :program:`bash` (Par exemple, :kbd:" -"`Control-P` reviendra à la dernière commande, :kbd:`Control-N` avancera à la " -"suivante, :kbd:`Control-F` déplace le curseur vers la droite, :kbd:`Control-" -"B` déplace le curseur vers la gauche, etc...)." +"d'une édition d'historique similaire à :program:`bash` (Par " +"exemple, :kbd:`Control-P` reviendra à la dernière commande, :kbd:`Control-N` " +"avancera à la suivante, :kbd:`Control-F` déplace le curseur vers la " +"droite, :kbd:`Control-B` déplace le curseur vers la gauche, etc...)." -#: library/cmd.rst:72 +#: library/cmd.rst:70 msgid "An end-of-file on input is passed back as the string ``'EOF'``." msgstr "" "Une caractère de fin de fichier est transmis via la chaîne de caractères " "``'EOF'``." -#: library/cmd.rst:78 +#: library/cmd.rst:76 #, fuzzy msgid "" "An interpreter instance will recognize a command name ``foo`` if and only if " @@ -161,7 +162,7 @@ msgstr "" "caractère ``'!'`` sont également un cas particulier: elles sont envoyées à " "la méthode :meth:`do_shell` (si une telle méthode est définie)." -#: library/cmd.rst:84 +#: library/cmd.rst:82 #, fuzzy msgid "" "This method will return when the :meth:`postcmd` method returns a true " @@ -172,7 +173,7 @@ msgstr "" "vraie. L'argument *stop* de :meth:`postcmd` est la valeur de retour de la " "méthode :meth:`do_\\*` correspondant à la commande." -#: library/cmd.rst:88 +#: library/cmd.rst:86 #, fuzzy msgid "" "If completion is enabled, completing commands will be done automatically, " @@ -185,56 +186,58 @@ msgid "" "the argument is in." msgstr "" "Si la complétion est activée, la complétion de commandes sera faite " -"automatiquement; et la complétion d'arguments sera faite en appelant :meth:" -"`complete_foo` avec les arguments *text*, *line*, *begidx*, et *endidx*. " -"*text* est le préfixe que nous cherchons à faire coïncider: toutes les " -"valeurs renvoyées doivent commencer par ce préfixe. *line* est la ligne " -"d'entrée actuelle sans les espaces blancs de début. *begidx* et *endidx* " -"sont les index de début et de fin du préfixe, ils pourraient être utilisés " -"pour fournir différentes complétions en fonction de la position de " +"automatiquement; et la complétion d'arguments sera faite en " +"appelant :meth:`complete_foo` avec les arguments *text*, *line*, *begidx*, " +"et *endidx*. *text* est le préfixe que nous cherchons à faire coïncider: " +"toutes les valeurs renvoyées doivent commencer par ce préfixe. *line* est la " +"ligne d'entrée actuelle sans les espaces blancs de début. *begidx* et " +"*endidx* sont les index de début et de fin du préfixe, ils pourraient être " +"utilisés pour fournir différentes complétions en fonction de la position de " "l'argument." -#: library/cmd.rst:99 +#: library/cmd.rst:97 #, fuzzy msgid "" "All subclasses of :class:`Cmd` inherit a predefined :meth:`!do_help`. This " -"method, called with an argument ``'bar'``, invokes the corresponding method :" -"meth:`!help_bar`, and if that is not present, prints the docstring of :meth:" -"`!do_bar`, if available. With no argument, :meth:`!do_help` lists all " -"available help topics (that is, all commands with corresponding :meth:`!" +"method, called with an argument ``'bar'``, invokes the corresponding " +"method :meth:`!help_bar`, and if that is not present, prints the docstring " +"of :meth:`!do_bar`, if available. With no argument, :meth:`!do_help` lists " +"all available help topics (that is, all commands with corresponding :meth:`!" "help_\\*` methods or commands that have docstrings), and also lists any " "undocumented commands." msgstr "" -"Toutes les classes filles de :class:`Cmd` héritent d'une méthode :meth:" -"`do_help` prédéfinie. Cette méthode appellera la méthode :meth:`help_bar` " -"lorsqu'elle est appelée avec un argument ``'bar'``. Si celle-ci n'est pas " -"définie, elle affichera la *docstring* de :meth:`do_bar`, (si elle a une " -"*docstring*). Sans argument, :meth:`do_help` listera tous les sujets d'aide " -"(c'est à dire, toutes les commandes avec une méthode :meth:`help_\\\\*` " -"correspondante ou commande ayant une *docstring*, elle lisera aussi les " -"commandes non documentées." - -#: library/cmd.rst:110 +"Toutes les classes filles de :class:`Cmd` héritent d'une " +"méthode :meth:`do_help` prédéfinie. Cette méthode appellera la " +"méthode :meth:`help_bar` lorsqu'elle est appelée avec un argument ``'bar'``. " +"Si celle-ci n'est pas définie, elle affichera la *docstring* " +"de :meth:`do_bar`, (si elle a une *docstring*). Sans " +"argument, :meth:`do_help` listera tous les sujets d'aide (c'est à dire, " +"toutes les commandes avec une méthode :meth:`help_\\\\*` correspondante ou " +"commande ayant une *docstring*, elle lisera aussi les commandes non " +"documentées." + +#: library/cmd.rst:108 #, fuzzy msgid "" "Interpret the argument as though it had been typed in response to the " -"prompt. This may be overridden, but should not normally need to be; see the :" -"meth:`precmd` and :meth:`postcmd` methods for useful execution hooks. The " -"return value is a flag indicating whether interpretation of commands by the " -"interpreter should stop. If there is a :meth:`!do_\\*` method for the " +"prompt. This may be overridden, but should not normally need to be; see " +"the :meth:`precmd` and :meth:`postcmd` methods for useful execution hooks. " +"The return value is a flag indicating whether interpretation of commands by " +"the interpreter should stop. If there is a :meth:`!do_\\*` method for the " "command *str*, the return value of that method is returned, otherwise the " "return value from the :meth:`default` method is returned." msgstr "" "Interprète l'argument comme si il avait été entré en réponse à l'invite de " "commande. Cette méthode peut être surchargée, mais ne devrait normalement " -"pas avoir besoin de l'être; voir les méthodes :meth:`precmd` et :meth:" -"`postcmd` pour altérer l'exécution d'une commande. La valeur de retour est " -"un *flag* indiquant si l'interprétation de commandes par l'interpréteur " -"devrait arrêter. S'il existe une méthode :meth:`do_\\*` pour la commande " -"*str*, la valeur de retour de cette méthode est renvoyée. Dans le cas " -"contraire, la valeur de retour de la méthode :meth:`default` est renvoyée." +"pas avoir besoin de l'être; voir les méthodes :meth:`precmd` " +"et :meth:`postcmd` pour altérer l'exécution d'une commande. La valeur de " +"retour est un *flag* indiquant si l'interprétation de commandes par " +"l'interpréteur devrait arrêter. S'il existe une méthode :meth:`do_\\*` pour " +"la commande *str*, la valeur de retour de cette méthode est renvoyée. Dans " +"le cas contraire, la valeur de retour de la méthode :meth:`default` est " +"renvoyée." -#: library/cmd.rst:121 +#: library/cmd.rst:119 msgid "" "Method called when an empty line is entered in response to the prompt. If " "this method is not overridden, it repeats the last nonempty command entered." @@ -243,7 +246,7 @@ msgstr "" "commande. Si cette méthode n'est pas surchargée, elle répète la dernière " "commande non-vide entrée." -#: library/cmd.rst:127 +#: library/cmd.rst:125 msgid "" "Method called on an input line when the command prefix is not recognized. If " "this method is not overridden, it prints an error message and returns." @@ -252,17 +255,17 @@ msgstr "" "reconnu. Si cette méthode n'est pas surchargée, elle affiche un message " "d'erreur et s'arrête." -#: library/cmd.rst:133 +#: library/cmd.rst:131 #, fuzzy msgid "" "Method called to complete an input line when no command-specific :meth:`!" "complete_\\*` method is available. By default, it returns an empty list." msgstr "" -"Méthode appelée pour compléter une ligne entrée quand aucune méthode :meth:" -"`complete_\\*` spécifique à la commande n'est disponible. Par défaut, elle " -"renvoie une liste vide." +"Méthode appelée pour compléter une ligne entrée quand aucune " +"méthode :meth:`complete_\\*` spécifique à la commande n'est disponible. Par " +"défaut, elle renvoie une liste vide." -#: library/cmd.rst:139 +#: library/cmd.rst:137 msgid "" "Method called to display a list of strings as a compact set of columns. Each " "column is only as wide as necessary. Columns are separated by two spaces for " @@ -273,12 +276,12 @@ msgstr "" "minimale. Les colonnes sont séparées par deux espaces pour faciliter la " "lecture." -#: library/cmd.rst:146 +#: library/cmd.rst:144 msgid "" "Hook method executed just before the command line *line* is interpreted, but " -"after the input prompt is generated and issued. This method is a stub in :" -"class:`Cmd`; it exists to be overridden by subclasses. The return value is " -"used as the command which will be executed by the :meth:`onecmd` method; " +"after the input prompt is generated and issued. This method is a stub " +"in :class:`Cmd`; it exists to be overridden by subclasses. The return value " +"is used as the command which will be executed by the :meth:`onecmd` method; " "the :meth:`precmd` implementation may re-write the command or simply return " "*line* unchanged." msgstr "" @@ -289,7 +292,7 @@ msgstr "" "exécutée par la méthode :meth:`onecmd`. L'implémentation de :meth:`precmd` " "peut réécrire la commande ou simplement renvoyer *line* sans modification." -#: library/cmd.rst:156 +#: library/cmd.rst:154 msgid "" "Hook method executed just after a command dispatch is finished. This method " "is a stub in :class:`Cmd`; it exists to be overridden by subclasses. *line* " @@ -300,100 +303,100 @@ msgid "" "corresponds to *stop*; returning false will cause interpretation to continue." msgstr "" "Méthode de rappel exécutée juste après qu'une commande ait été exécutée. " -"Cette méthode existe afin d'être surchargée par des classes filles de :class:" -"`Cmd`. *line* est la ligne de commande ayant été exécutée et *stop* est un " -"*flag* indiquant si l'exécution sera terminée après un appel à :meth:" -"`postcmd`. *stop* sera la valeur de retour de :meth:`onecmd`. La valeur de " -"retour de cette méthode sera utilisée comme nouvelle valeur pour le *flag* " -"interne correspondant à *stop*. Renvoyer *False* permettra à " +"Cette méthode existe afin d'être surchargée par des classes filles " +"de :class:`Cmd`. *line* est la ligne de commande ayant été exécutée et " +"*stop* est un *flag* indiquant si l'exécution sera terminée après un appel " +"à :meth:`postcmd`. *stop* sera la valeur de retour de :meth:`onecmd`. La " +"valeur de retour de cette méthode sera utilisée comme nouvelle valeur pour " +"le *flag* interne correspondant à *stop*. Renvoyer *False* permettra à " "l'interprétation de continuer." -#: library/cmd.rst:167 +#: library/cmd.rst:165 msgid "" "Hook method executed once when :meth:`cmdloop` is called. This method is a " "stub in :class:`Cmd`; it exists to be overridden by subclasses." msgstr "" "Méthode de rappel exécutée une fois lorsque :meth:`cmdloop` est appelée. " -"Cette méthode existe afin d'être surchargée par des classes filles de :class:" -"`Cmd`." +"Cette méthode existe afin d'être surchargée par des classes filles " +"de :class:`Cmd`." -#: library/cmd.rst:173 +#: library/cmd.rst:171 msgid "" "Hook method executed once when :meth:`cmdloop` is about to return. This " "method is a stub in :class:`Cmd`; it exists to be overridden by subclasses." msgstr "" "Méthode de rappel exécutée une fois lorsque :meth:`cmdloop` va s'arrêter. " -"Cette méthode existe afin d'être surchargée par des classes filles de :class:" -"`Cmd`." +"Cette méthode existe afin d'être surchargée par des classes filles " +"de :class:`Cmd`." -#: library/cmd.rst:177 +#: library/cmd.rst:175 msgid "" "Instances of :class:`Cmd` subclasses have some public instance variables:" msgstr "" "Les instances de classes filles de :class:`Cmd` possèdent des variables " "d'instance publiques :" -#: library/cmd.rst:181 +#: library/cmd.rst:179 msgid "The prompt issued to solicit input." msgstr "L'invite de commande affiché pour solliciter une entrée." -#: library/cmd.rst:186 +#: library/cmd.rst:184 msgid "The string of characters accepted for the command prefix." msgstr "La chaîne de caractères acceptée en tant que préfixe de commande." -#: library/cmd.rst:191 +#: library/cmd.rst:189 msgid "The last nonempty command prefix seen." msgstr "Le dernier préfixe de commande non-vide vu." -#: library/cmd.rst:196 +#: library/cmd.rst:194 msgid "" -"A list of queued input lines. The cmdqueue list is checked in :meth:" -"`cmdloop` when new input is needed; if it is nonempty, its elements will be " -"processed in order, as if entered at the prompt." +"A list of queued input lines. The cmdqueue list is checked " +"in :meth:`cmdloop` when new input is needed; if it is nonempty, its elements " +"will be processed in order, as if entered at the prompt." msgstr "" -"Une liste de lignes entrées en file. La liste *cmdqueue* est vérifiée dans :" -"meth:`cmdloop` lorsqu'une nouvelle entrée est nécessitée; si elle n'est pas " -"vide, ses éléments seront traités dans l'ordre, comme si ils avaient entrés " -"dans l'invite de commande." +"Une liste de lignes entrées en file. La liste *cmdqueue* est vérifiée " +"dans :meth:`cmdloop` lorsqu'une nouvelle entrée est nécessitée; si elle " +"n'est pas vide, ses éléments seront traités dans l'ordre, comme si ils " +"avaient entrés dans l'invite de commande." -#: library/cmd.rst:203 +#: library/cmd.rst:201 msgid "" -"A string to issue as an intro or banner. May be overridden by giving the :" -"meth:`cmdloop` method an argument." +"A string to issue as an intro or banner. May be overridden by giving " +"the :meth:`cmdloop` method an argument." msgstr "" "Une chaîne de caractères à afficher en introduction ou bannière. Peut être " "surchargée en passant un argument à la méthode :meth:`cmdloop`." -#: library/cmd.rst:209 +#: library/cmd.rst:207 msgid "" "The header to issue if the help output has a section for documented commands." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " "commandes documentées." -#: library/cmd.rst:214 +#: library/cmd.rst:212 #, fuzzy msgid "" "The header to issue if the help output has a section for miscellaneous help " -"topics (that is, there are :meth:`!help_\\*` methods without corresponding :" -"meth:`!do_\\*` methods)." +"topics (that is, there are :meth:`!help_\\*` methods without " +"corresponding :meth:`!do_\\*` methods)." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour divers " "sujets (c'est-à-dire qu'il existe des méthodes :meth:`help_\\*` sans " "méthodes :meth:`do_\\*` correspondantes)." -#: library/cmd.rst:221 +#: library/cmd.rst:219 #, fuzzy msgid "" "The header to issue if the help output has a section for undocumented " -"commands (that is, there are :meth:`!do_\\*` methods without corresponding :" -"meth:`!help_\\*` methods)." +"commands (that is, there are :meth:`!do_\\*` methods without " +"corresponding :meth:`!help_\\*` methods)." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " -"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:" -"`dop_\\*` sans méthodes :meth:`help_\\*` correspondantes)." +"commandes non documentées (c'est-à-dire qu'il existe des " +"méthodes :meth:`dop_\\*` sans méthodes :meth:`help_\\*` correspondantes)." -#: library/cmd.rst:228 +#: library/cmd.rst:226 msgid "" "The character used to draw separator lines under the help-message headers. " "If empty, no ruler line is drawn. It defaults to ``'='``." @@ -402,38 +405,40 @@ msgstr "" "têtes de messages d'aide. Si il est vide, aucune ligne de séparation n'est " "affichée. Par défaut, ce caractère vaut ``'='``." -#: library/cmd.rst:234 +#: library/cmd.rst:232 #, fuzzy msgid "" "A flag, defaulting to true. If true, :meth:`cmdloop` uses :func:`input` to " -"display a prompt and read the next command; if false, :data:`sys.stdout." -"write() ` and :data:`sys.stdin.readline() ` are used. " -"(This means that by importing :mod:`readline`, on systems that support it, " -"the interpreter will automatically support :program:`Emacs`\\ -like line " -"editing and command-history keystrokes.)" +"display a prompt and read the next command; if " +"false, :data:`sys.stdout.write() ` " +"and :data:`sys.stdin.readline() ` are used. (This means that by " +"importing :mod:`readline`, on systems that support it, the interpreter will " +"automatically support :program:`Emacs`\\ -like line editing and command-" +"history keystrokes.)" msgstr "" "Un *flag*, valant *True* par défaut. Si ce *flag* est vrai, :meth:`cmdloop` " "utilise :func:`input` pour afficher une invite de commande et lire la " -"prochaine commande; si il est faux, :meth:`sys.stdout.write` et :meth:`sys." -"stdin.readline` sont utilisées. (Cela signifie qu'en important :mod:" -"`readline` sur les systèmes qui le supportent, l'interpréteur va " -"automatiquement supporter une édition de ligne similaire à :program:`Emacs` " -"ainsi que des touches d'historique de commande)." +"prochaine commande; si il est faux, :meth:`sys.stdout.write` " +"et :meth:`sys.stdin.readline` sont utilisées. (Cela signifie qu'en " +"important :mod:`readline` sur les systèmes qui le supportent, l'interpréteur " +"va automatiquement supporter une édition de ligne similaire " +"à :program:`Emacs` ainsi que des touches d'historique de commande)." -#: library/cmd.rst:244 +#: library/cmd.rst:242 msgid "Cmd Example" msgstr "Exemple" -#: library/cmd.rst:248 +#: library/cmd.rst:244 +#, fuzzy msgid "" -"The :mod:`cmd` module is mainly useful for building custom shells that let a " -"user work with a program interactively." +"The :mod:`!cmd` module is mainly useful for building custom shells that let " +"a user work with a program interactively." msgstr "" "Le module :mod:`cmd` est utile pour produire des invites de commande " "permettant à l'utilisateur de travailler avec un programme de manière " "interactive." -#: library/cmd.rst:251 +#: library/cmd.rst:247 msgid "" "This section presents a simple example of how to build a shell around a few " "of the commands in the :mod:`turtle` module." @@ -441,28 +446,28 @@ msgstr "" "Cette section présente un exemple simple de comment produire une invite de " "commande autour de quelques commandes du module :mod:`turtle`." -#: library/cmd.rst:254 +#: library/cmd.rst:250 #, fuzzy msgid "" -"Basic turtle commands such as :meth:`~turtle.forward` are added to a :class:" -"`Cmd` subclass with method named :meth:`!do_forward`. The argument is " -"converted to a number and dispatched to the turtle module. The docstring is " -"used in the help utility provided by the shell." +"Basic turtle commands such as :meth:`~turtle.forward` are added to " +"a :class:`Cmd` subclass with method named :meth:`!do_forward`. The argument " +"is converted to a number and dispatched to the turtle module. The docstring " +"is used in the help utility provided by the shell." msgstr "" "Des commandes *turtle* basiques telles que :meth:`~turtle.forward` sont " -"ajoutées à une classe fille de :class:`Cmd` avec la méthode appelée :meth:" -"`do_forward`. L'argument est converti en nombre et envoyé au module " -"*turtle*. La *docstring* est utilisée dans l'utilitaire d'aide fourni par " -"l'invite de commande." +"ajoutées à une classe fille de :class:`Cmd` avec la méthode " +"appelée :meth:`do_forward`. L'argument est converti en nombre et envoyé au " +"module *turtle*. La *docstring* est utilisée dans l'utilitaire d'aide fourni " +"par l'invite de commande." -#: library/cmd.rst:259 +#: library/cmd.rst:255 #, fuzzy msgid "" "The example also includes a basic record and playback facility implemented " "with the :meth:`~Cmd.precmd` method which is responsible for converting the " "input to lowercase and writing the commands to a file. The :meth:`!" -"do_playback` method reads the file and adds the recorded commands to the :" -"attr:`~Cmd.cmdqueue` for immediate playback::" +"do_playback` method reads the file and adds the recorded commands to " +"the :attr:`~Cmd.cmdqueue` for immediate playback::" msgstr "" "L'exemple inclut également un utilitaire d'enregistrement et de *playback* " "implémenté avec la méthode :meth:`~Cmd.precmd`, qui est responsable du " @@ -470,7 +475,7 @@ msgstr "" "fichier. La méthode :meth:`do_playback` lit le fichier et ajoute les " "commandes enregistrées à :attr:`cmdqueue` pour être rejouées immédiatement ::" -#: library/cmd.rst:340 +#: library/cmd.rst:336 msgid "" "Here is a sample session with the turtle shell showing the help functions, " "using blank lines to repeat commands, and the simple record and playback " diff --git a/library/cmdline.po b/library/cmdline.po index da0a0ce2a..85d22b82a 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -1,14 +1,12 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,218 +15,218 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: library/cmdline.rst:3 -msgid "Modules command-line interface (CLI)" -msgstr "" - #: library/cmdline.rst:5 -msgid "The following modules have a command-line interface." +msgid "Modules command-line interface (CLI)" msgstr "" #: library/cmdline.rst:7 -msgid ":ref:`ast `" -msgstr "" - -#: library/cmdline.rst:8 -msgid ":ref:`asyncio `" +msgid "The following modules have a command-line interface." msgstr "" #: library/cmdline.rst:9 -msgid ":mod:`base64`" +msgid ":ref:`ast `" msgstr "" #: library/cmdline.rst:10 -msgid ":ref:`calendar `" +msgid ":ref:`asyncio `" msgstr "" #: library/cmdline.rst:11 -msgid ":mod:`code`" +msgid ":mod:`base64`" msgstr "" #: library/cmdline.rst:12 -msgid ":ref:`compileall `" +msgid ":ref:`calendar `" msgstr "" #: library/cmdline.rst:13 -msgid ":mod:`cProfile`: see :ref:`profile `" +msgid ":mod:`code`" msgstr "" #: library/cmdline.rst:14 -msgid ":ref:`difflib `" +msgid ":ref:`compileall `" msgstr "" #: library/cmdline.rst:15 -msgid ":ref:`dis `" +msgid "``cProfile``: see :ref:`profiling.tracing `" msgstr "" #: library/cmdline.rst:16 -msgid ":mod:`doctest`" +msgid ":ref:`dis `" msgstr "" #: library/cmdline.rst:17 -msgid ":mod:`!encodings.rot_13`" +msgid ":ref:`doctest `" msgstr "" #: library/cmdline.rst:18 -msgid ":mod:`ensurepip`" +msgid ":mod:`!encodings.rot_13`" msgstr "" #: library/cmdline.rst:19 -msgid ":mod:`filecmp`" +msgid ":ref:`ensurepip `" msgstr "" #: library/cmdline.rst:20 -msgid ":mod:`fileinput`" +msgid ":mod:`filecmp`" msgstr "" #: library/cmdline.rst:21 -msgid ":mod:`ftplib`" +msgid ":mod:`fileinput`" msgstr "" #: library/cmdline.rst:22 -msgid ":ref:`gzip `" +msgid ":mod:`ftplib`" msgstr "" #: library/cmdline.rst:23 -msgid ":ref:`http.server `" +msgid ":ref:`gzip `" msgstr "" #: library/cmdline.rst:24 -msgid ":mod:`!idlelib`" +msgid ":ref:`http.server `" msgstr "" #: library/cmdline.rst:25 -msgid ":ref:`inspect `" +msgid ":ref:`idlelib `" msgstr "" #: library/cmdline.rst:26 -msgid ":ref:`json.tool `" +msgid ":ref:`inspect `" msgstr "" #: library/cmdline.rst:27 -msgid ":mod:`mimetypes`" +msgid ":ref:`json `" msgstr "" #: library/cmdline.rst:28 -msgid ":mod:`pdb`" +msgid ":ref:`mimetypes `" msgstr "" #: library/cmdline.rst:29 -msgid ":mod:`pickle`" +msgid ":ref:`pdb `" msgstr "" #: library/cmdline.rst:30 -msgid ":ref:`pickletools `" +msgid ":ref:`pickle `" msgstr "" #: library/cmdline.rst:31 -msgid ":mod:`platform`" +msgid ":ref:`pickletools `" msgstr "" #: library/cmdline.rst:32 -msgid ":mod:`poplib`" +msgid ":ref:`platform `" msgstr "" #: library/cmdline.rst:33 -msgid ":ref:`profile `" +msgid ":mod:`poplib`" msgstr "" #: library/cmdline.rst:34 -msgid ":mod:`pstats`" +msgid ":ref:`profiling.sampling `" msgstr "" #: library/cmdline.rst:35 -msgid ":ref:`py_compile `" +msgid ":ref:`profiling.tracing `" msgstr "" #: library/cmdline.rst:36 -msgid ":mod:`pyclbr`" +msgid ":ref:`pstats `" msgstr "" #: library/cmdline.rst:37 -msgid ":mod:`pydoc`" +msgid ":ref:`py_compile `" msgstr "" #: library/cmdline.rst:38 -msgid ":mod:`quopri`" +msgid ":mod:`pyclbr`" msgstr "" #: library/cmdline.rst:39 -msgid ":ref:`random `" +msgid ":mod:`pydoc`" msgstr "" #: library/cmdline.rst:40 -msgid ":mod:`runpy`" +msgid ":mod:`quopri`" msgstr "" #: library/cmdline.rst:41 -msgid ":ref:`site `" +msgid ":ref:`random `" msgstr "" #: library/cmdline.rst:42 -msgid ":ref:`sqlite3 `" +msgid ":mod:`runpy`" msgstr "" #: library/cmdline.rst:43 -msgid ":ref:`symtable `" +msgid ":ref:`site `" msgstr "" #: library/cmdline.rst:44 -msgid ":ref:`sysconfig `" +msgid ":ref:`sqlite3 `" msgstr "" #: library/cmdline.rst:45 -msgid ":mod:`tabnanny`" +msgid ":ref:`symtable `" msgstr "" #: library/cmdline.rst:46 -msgid ":ref:`tarfile `" +msgid ":ref:`sysconfig `" msgstr "" #: library/cmdline.rst:47 -msgid ":mod:`!this`" +msgid ":mod:`tabnanny`" msgstr "" #: library/cmdline.rst:48 -msgid ":ref:`timeit `" +msgid ":ref:`tarfile `" msgstr "" #: library/cmdline.rst:49 -msgid ":ref:`tokenize `" +msgid ":mod:`!this`" msgstr "" #: library/cmdline.rst:50 -msgid ":ref:`trace `" +msgid ":ref:`timeit `" msgstr "" #: library/cmdline.rst:51 -msgid ":mod:`turtledemo`" +msgid ":ref:`tokenize `" msgstr "" #: library/cmdline.rst:52 -msgid ":ref:`unittest `" +msgid ":ref:`trace `" msgstr "" #: library/cmdline.rst:53 -msgid ":ref:`uuid `" +msgid ":mod:`turtledemo`" msgstr "" #: library/cmdline.rst:54 -msgid ":mod:`venv`" +msgid ":ref:`unittest `" msgstr "" #: library/cmdline.rst:55 -msgid ":mod:`webbrowser`" +msgid ":ref:`uuid `" msgstr "" #: library/cmdline.rst:56 -msgid ":ref:`zipapp `" +msgid ":ref:`venv `" msgstr "" #: library/cmdline.rst:57 -msgid ":ref:`zipfile `" +msgid ":ref:`webbrowser `" +msgstr "" + +#: library/cmdline.rst:58 +msgid ":ref:`zipapp `" msgstr "" #: library/cmdline.rst:59 +msgid ":ref:`zipfile `" +msgstr "" + +#: library/cmdline.rst:61 msgid "See also the :ref:`Python command-line interface `." msgstr "" diff --git a/library/cmdlinelibs.po b/library/cmdlinelibs.po new file mode 100644 index 000000000..229446891 --- /dev/null +++ b/library/cmdlinelibs.po @@ -0,0 +1,30 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/cmdlinelibs.rst:5 +msgid "Command-line interface libraries" +msgstr "" + +#: library/cmdlinelibs.rst:7 +msgid "" +"The modules described in this chapter assist with implementing command line " +"and terminal interfaces for applications." +msgstr "" + +#: library/cmdlinelibs.rst:10 +msgid "Here's an overview:" +msgstr "" diff --git a/library/code.po b/library/code.po index c6d21bece..d6ed49830 100644 --- a/library/code.po +++ b/library/code.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -39,37 +39,45 @@ msgid "" "``'__console__'`` and key ``'__doc__'`` set to ``None``." msgstr "" -#: library/code.rst:28 +#: library/code.rst:25 +msgid "" +"Note that functions and classes objects created under an :class:`!" +"InteractiveInterpreter` instance will belong to the namespace specified by " +"*locals*. They are only pickleable if *locals* is the namespace of an " +"existing module." +msgstr "" + +#: library/code.rst:34 msgid "" "Closely emulate the behavior of the interactive Python interpreter. This " "class builds on :class:`InteractiveInterpreter` and adds prompting using the " "familiar ``sys.ps1`` and ``sys.ps2``, and input buffering. If *local_exit* " -"is true, ``exit()`` and ``quit()`` in the console will not raise :exc:" -"`SystemExit`, but instead return to the calling code." +"is true, ``exit()`` and ``quit()`` in the console will not " +"raise :exc:`SystemExit`, but instead return to the calling code." msgstr "" -#: library/code.rst:52 +#: library/code.rst:58 msgid "Added *local_exit* parameter." msgstr "" -#: library/code.rst:39 +#: library/code.rst:45 msgid "" "Convenience function to run a read-eval-print loop. This creates a new " "instance of :class:`InteractiveConsole` and sets *readfunc* to be used as " "the :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is " "provided, it is passed to the :class:`InteractiveConsole` constructor for " "use as the default namespace for the interpreter loop. If *local_exit* is " -"provided, it is passed to the :class:`InteractiveConsole` constructor. The :" -"meth:`~InteractiveConsole.interact` method of the instance is then run with " -"*banner* and *exitmsg* passed as the banner and exit message to use, if " +"provided, it is passed to the :class:`InteractiveConsole` constructor. " +"The :meth:`~InteractiveConsole.interact` method of the instance is then run " +"with *banner* and *exitmsg* passed as the banner and exit message to use, if " "provided. The console object is discarded after use." msgstr "" -#: library/code.rst:49 +#: library/code.rst:55 msgid "Added *exitmsg* parameter." msgstr "" -#: library/code.rst:57 +#: library/code.rst:63 msgid "" "This function is useful for programs that want to emulate Python's " "interpreter main loop (a.k.a. the read-eval-print loop). The tricky part is " @@ -79,7 +87,7 @@ msgid "" "real interpreter main loop." msgstr "" -#: library/code.rst:64 +#: library/code.rst:70 msgid "" "*source* is the source string; *filename* is the optional filename from " "which source was read, defaulting to ``''``; and *symbol* is the " @@ -87,7 +95,7 @@ msgid "" "``'eval'`` or ``'exec'``." msgstr "" -#: library/code.rst:69 +#: library/code.rst:75 msgid "" "Returns a code object (the same as ``compile(source, filename, symbol)``) if " "the command is complete and valid; ``None`` if the command is incomplete; " @@ -96,32 +104,32 @@ msgid "" "contains an invalid literal." msgstr "" -#: library/code.rst:79 +#: library/code.rst:85 msgid "Interactive Interpreter Objects" msgstr "" -#: library/code.rst:84 +#: library/code.rst:90 msgid "" "Compile and run some source in the interpreter. Arguments are the same as " "for :func:`compile_command`; the default for *filename* is ``''``, " "and for *symbol* is ``'single'``. One of several things can happen:" msgstr "" -#: library/code.rst:88 +#: library/code.rst:94 msgid "" -"The input is incorrect; :func:`compile_command` raised an exception (:exc:" -"`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be printed " -"by calling the :meth:`showsyntaxerror` method. :meth:`runsource` returns " -"``False``." +"The input is incorrect; :func:`compile_command` raised an exception " +"(:exc:`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be " +"printed by calling the :meth:`showsyntaxerror` method. :meth:`runsource` " +"returns ``False``." msgstr "" -#: library/code.rst:93 +#: library/code.rst:99 msgid "" "The input is incomplete, and more input is required; :func:`compile_command` " "returned ``None``. :meth:`runsource` returns ``True``." msgstr "" -#: library/code.rst:96 +#: library/code.rst:102 msgid "" "The input is complete; :func:`compile_command` returned a code object. The " "code is executed by calling the :meth:`runcode` (which also handles run-time " @@ -129,27 +137,27 @@ msgid "" "``False``." msgstr "" -#: library/code.rst:100 +#: library/code.rst:106 msgid "" -"The return value can be used to decide whether to use ``sys.ps1`` or ``sys." -"ps2`` to prompt the next line." +"The return value can be used to decide whether to use ``sys.ps1`` or " +"``sys.ps2`` to prompt the next line." msgstr "" -#: library/code.rst:106 +#: library/code.rst:112 msgid "" "Execute a code object. When an exception occurs, :meth:`showtraceback` is " -"called to display a traceback. All exceptions are caught except :exc:" -"`SystemExit`, which is allowed to propagate." +"called to display a traceback. All exceptions are caught " +"except :exc:`SystemExit`, which is allowed to propagate." msgstr "" -#: library/code.rst:110 +#: library/code.rst:116 msgid "" "A note about :exc:`KeyboardInterrupt`: this exception may occur elsewhere in " "this code, and may not always be caught. The caller should be prepared to " "deal with it." msgstr "" -#: library/code.rst:117 +#: library/code.rst:123 msgid "" "Display the syntax error that just occurred. This does not display a stack " "trace because there isn't one for syntax errors. If *filename* is given, it " @@ -158,38 +166,38 @@ msgid "" "string. The output is written by the :meth:`write` method." msgstr "" -#: library/code.rst:126 +#: library/code.rst:132 msgid "" "Display the exception that just occurred. We remove the first stack item " "because it is within the interpreter object implementation. The output is " "written by the :meth:`write` method." msgstr "" -#: library/code.rst:130 +#: library/code.rst:136 msgid "" "The full chained traceback is displayed instead of just the primary " "traceback." msgstr "" -#: library/code.rst:136 +#: library/code.rst:142 msgid "" "Write a string to the standard error stream (``sys.stderr``). Derived " "classes should override this to provide the appropriate output handling as " "needed." msgstr "" -#: library/code.rst:143 +#: library/code.rst:149 msgid "Interactive Console Objects" msgstr "" -#: library/code.rst:145 +#: library/code.rst:151 msgid "" -"The :class:`InteractiveConsole` class is a subclass of :class:" -"`InteractiveInterpreter`, and so offers all the methods of the interpreter " -"objects as well as the following additions." +"The :class:`InteractiveConsole` class is a subclass " +"of :class:`InteractiveInterpreter`, and so offers all the methods of the " +"interpreter objects as well as the following additions." msgstr "" -#: library/code.rst:152 +#: library/code.rst:158 msgid "" "Closely emulate the interactive Python console. The optional *banner* " "argument specify the banner to print before the first interaction; by " @@ -199,22 +207,22 @@ msgid "" "close!)." msgstr "" -#: library/code.rst:158 +#: library/code.rst:164 msgid "" "The optional *exitmsg* argument specifies an exit message printed when " "exiting. Pass the empty string to suppress the exit message. If *exitmsg* is " "not given or ``None``, a default message is printed." msgstr "" -#: library/code.rst:162 +#: library/code.rst:168 msgid "To suppress printing any banner, pass an empty string." msgstr "" -#: library/code.rst:165 +#: library/code.rst:171 msgid "Print an exit message when exiting." msgstr "" -#: library/code.rst:171 +#: library/code.rst:177 msgid "" "Push a line of source text to the interpreter. The line should not have a " "trailing newline; it may have internal newlines. The line is appended to a " @@ -227,14 +235,14 @@ msgid "" "same as :meth:`!runsource`)." msgstr "" -#: library/code.rst:183 +#: library/code.rst:189 msgid "Remove any unhandled source text from the input buffer." msgstr "" -#: library/code.rst:188 +#: library/code.rst:194 msgid "" "Write a prompt and read a line. The returned line does not include the " -"trailing newline. When the user enters the EOF key sequence, :exc:" -"`EOFError` is raised. The base implementation reads from ``sys.stdin``; a " -"subclass may replace this with a different implementation." +"trailing newline. When the user enters the EOF key " +"sequence, :exc:`EOFError` is raised. The base implementation reads from " +"``sys.stdin``; a subclass may replace this with a different implementation." msgstr "" diff --git a/library/codecs.po b/library/codecs.po index e5238e344..03bec0b62 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-21 12:43+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!codecs` --- Codec registry and base classes" msgstr ":mod:`codecs` — Registre des codecs et classes de base associées" -#: library/codecs.rst:11 +#: library/codecs.rst:7 msgid "**Source code:** :source:`Lib/codecs.py`" msgstr "**Code source :** :source:`Lib/codecs.py`" -#: library/codecs.rst:23 +#: library/codecs.rst:19 #, fuzzy msgid "" "This module defines base classes for standard Python codecs (encoders and " @@ -45,11 +45,11 @@ msgstr "" "(type *bytes* de Python) mais il existe aussi des codecs qui encodent du " "texte vers du texte et des *bytes* vers des *bytes*. Les codecs " "personnalisés peuvent encoder et décoder des types arbitraires, mais " -"l'utilisation de certaines fonctionnalités du module est restreinte aux :" -"term:`encodeurs de texte ` ou aux codecs qui encodent vers :" -"class:`bytes`." +"l'utilisation de certaines fonctionnalités du module est restreinte " +"aux :term:`encodeurs de texte ` ou aux codecs qui encodent " +"vers :class:`bytes`." -#: library/codecs.rst:33 +#: library/codecs.rst:29 msgid "" "The module defines the following functions for encoding and decoding with " "any codec:" @@ -57,71 +57,95 @@ msgstr "" "Le module définit les fonctions suivantes pour encoder et décoder à l'aide " "de n'importe quel codec :" -#: library/codecs.rst:38 +#: library/codecs.rst:34 msgid "Encodes *obj* using the codec registered for *encoding*." msgstr "Encode *obj* en utilisant le codec enregistré pour *encoding*." -#: library/codecs.rst:40 +#: library/codecs.rst:36 msgid "" "*Errors* may be given to set the desired error handling scheme. The default " -"error handler is ``'strict'`` meaning that encoding errors raise :exc:" -"`ValueError` (or a more codec specific subclass, such as :exc:" -"`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more " +"error handler is ``'strict'`` meaning that encoding errors " +"raise :exc:`ValueError` (or a more codec specific subclass, such " +"as :exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more " "information on codec error handling." msgstr "" "Vous pouvez spécifier *errors* pour définir la façon de gérer les erreurs. " "Le gestionnaire d'erreurs par défaut est ``'strict'``, ce qui veut dire " "qu'une erreur lors de l'encodage lève :exc:`ValueError` (ou une sous-classe " -"spécifique du codec, telle que :exc:`UnicodeEncodeError`). Référez-vous aux :" -"ref:`classes de base des codecs ` pour plus " +"spécifique du codec, telle que :exc:`UnicodeEncodeError`). Référez-vous " +"aux :ref:`classes de base des codecs ` pour plus " "d'informations sur la gestion des erreurs par les codecs." -#: library/codecs.rst:48 +#: library/codecs.rst:44 msgid "Decodes *obj* using the codec registered for *encoding*." msgstr "Décode *obj* en utilisant le codec enregistré pour *encoding*." -#: library/codecs.rst:50 +#: library/codecs.rst:46 msgid "" "*Errors* may be given to set the desired error handling scheme. The default " -"error handler is ``'strict'`` meaning that decoding errors raise :exc:" -"`ValueError` (or a more codec specific subclass, such as :exc:" -"`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more " +"error handler is ``'strict'`` meaning that decoding errors " +"raise :exc:`ValueError` (or a more codec specific subclass, such " +"as :exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more " "information on codec error handling." msgstr "" "Vous pouvez spécifier *errors* pour définir la façon de gérer les erreurs. " "Le gestionnaire d'erreurs par défaut est ``'strict'``, ce qui veut dire " "qu'une erreur lors du décodage lève :exc:`ValueError` (ou une sous-classe " -"spécifique du codec, telle que :exc:`UnicodeDecodeError`). Référez-vous aux :" -"ref:`classes de base des codecs ` pour plus " +"spécifique du codec, telle que :exc:`UnicodeDecodeError`). Référez-vous " +"aux :ref:`classes de base des codecs ` pour plus " "d'informations sur la gestion des erreurs par les codecs." -#: library/codecs.rst:56 +#: library/codecs.rst:54 +msgid "" +"Return a mapping suitable for encoding with a custom single-byte encoding. " +"Given a :class:`str` *string* of up to 256 characters representing a " +"decoding table, returns either a compact internal mapping object " +"``EncodingMap`` or a :class:`dictionary ` mapping character ordinals " +"to byte values. Raises a :exc:`TypeError` on invalid input." +msgstr "" + +#: library/codecs.rst:60 msgid "The full details for each codec can also be looked up directly:" msgstr "" "Les détails complets de chaque codec peuvent être examinés directement :" -#: library/codecs.rst:60 +#: library/codecs.rst:64 msgid "" -"Looks up the codec info in the Python codec registry and returns a :class:" -"`CodecInfo` object as defined below." +"Looks up the codec info in the Python codec registry and returns " +"a :class:`CodecInfo` object as defined below." msgstr "" "Recherche les informations relatives au codec dans le registre des codecs de " "Python et renvoie l'objet :class:`CodecInfo` tel que défini ci-dessous." -#: library/codecs.rst:63 +#: library/codecs.rst:67 +#, fuzzy msgid "" -"Encodings are first looked up in the registry's cache. If not found, the " -"list of registered search functions is scanned. If no :class:`CodecInfo` " -"object is found, a :exc:`LookupError` is raised. Otherwise, the :class:" -"`CodecInfo` object is stored in the cache and returned to the caller." +"This function first normalizes the *encoding*: all ASCII letters are " +"converted to lower case, spaces are replaced with hyphens. Then encoding is " +"looked up in the registry's cache. If not found, the list of registered " +"search functions is scanned. If no :class:`CodecInfo` object is found, " +"a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is " +"stored in the cache and returned to the caller." msgstr "" "Les encodeurs sont recherchés en priorité dans le cache du registre. S'ils " "n'y sont pas, la liste des fonctions de recherche enregistrées est passée en " -"revue. Si aucun objet :class:`CodecInfo` n'est trouvé, une :exc:" -"`LookupError` est levée. Sinon, l'objet :class:`CodecInfo` est mis en cache " -"et renvoyé vers l'appelant." +"revue. Si aucun objet :class:`CodecInfo` n'est trouvé, " +"une :exc:`LookupError` est levée. Sinon, l'objet :class:`CodecInfo` est mis " +"en cache et renvoyé vers l'appelant." + +#: library/codecs.rst:74 +msgid "" +"Any characters except ASCII letters and digits and a dot are converted to " +"underscore." +msgstr "" + +#: library/codecs.rst:77 +msgid "" +"No characters are converted to underscore anymore. Spaces are converted to " +"hyphens." +msgstr "" -#: library/codecs.rst:70 +#: library/codecs.rst:84 msgid "" "Codec details when looking up the codec registry. The constructor arguments " "are stored in attributes of the same name:" @@ -129,49 +153,49 @@ msgstr "" "Les détails d'un codec trouvé dans le registre des codecs. Les arguments du " "constructeur sont stockés dans les attributs éponymes :" -#: library/codecs.rst:76 +#: library/codecs.rst:90 msgid "The name of the encoding." msgstr "Le nom de l'encodeur." -#: library/codecs.rst:82 +#: library/codecs.rst:96 msgid "" "The stateless encoding and decoding functions. These must be functions or " -"methods which have the same interface as the :meth:`~Codec.encode` and :meth:" -"`~Codec.decode` methods of Codec instances (see :ref:`Codec Interface `). The functions or methods are expected to work in a stateless " -"mode." +"methods which have the same interface as the :meth:`~Codec.encode` " +"and :meth:`~Codec.decode` methods of Codec instances (see :ref:`Codec " +"Interface `). The functions or methods are expected to work " +"in a stateless mode." msgstr "" "Les fonctions d'encodage et de décodage. Ces fonctions ou méthodes doivent " -"avoir la même interface que les méthodes :meth:`~Codec.encode` et :meth:" -"`~Codec.decode` des instances de Codec (voir :ref:`Interface des codecs " -"`). Les fonctions et méthodes sont censées fonctionner sans " -"état interne." +"avoir la même interface que les méthodes :meth:`~Codec.encode` " +"et :meth:`~Codec.decode` des instances de Codec (voir :ref:`Interface des " +"codecs `). Les fonctions et méthodes sont censées fonctionner " +"sans état interne." -#: library/codecs.rst:92 +#: library/codecs.rst:106 msgid "" "Incremental encoder and decoder classes or factory functions. These have to " -"provide the interface defined by the base classes :class:" -"`IncrementalEncoder` and :class:`IncrementalDecoder`, respectively. " -"Incremental codecs can maintain state." +"provide the interface defined by the base " +"classes :class:`IncrementalEncoder` and :class:`IncrementalDecoder`, " +"respectively. Incremental codecs can maintain state." msgstr "" "Classes d'encodeurs et de décodeurs incrémentaux ou fonctions usines. Elles " "doivent avoir respectivement les mêmes interfaces que celles définies par " -"les classes de base :class:`IncrementalEncoder` et :class:" -"`IncrementalDecoder`. Les codecs incrémentaux peuvent conserver des états " -"internes." +"les classes de base :class:`IncrementalEncoder` " +"et :class:`IncrementalDecoder`. Les codecs incrémentaux peuvent conserver " +"des états internes." -#: library/codecs.rst:101 +#: library/codecs.rst:115 msgid "" "Stream writer and reader classes or factory functions. These have to provide " -"the interface defined by the base classes :class:`StreamWriter` and :class:" -"`StreamReader`, respectively. Stream codecs can maintain state." +"the interface defined by the base classes :class:`StreamWriter` " +"and :class:`StreamReader`, respectively. Stream codecs can maintain state." msgstr "" "Classes d'écriture et de lecture de flux ou fonctions usines. Elles doivent " -"avoir les mêmes interfaces que celles définies par les classes de base :" -"class:`StreamWriter` et :class:`StreamReader`, respectivement. Les codecs de " -"flux peuvent conserver un état interne." +"avoir les mêmes interfaces que celles définies par les classes de " +"base :class:`StreamWriter` et :class:`StreamReader`, respectivement. Les " +"codecs de flux peuvent conserver un état interne." -#: library/codecs.rst:106 +#: library/codecs.rst:120 msgid "" "To simplify access to the various codec components, the module provides " "these additional functions which use :func:`lookup` for the codec lookup:" @@ -180,25 +204,25 @@ msgstr "" "fournit les fonctions supplémentaires suivantes qui utilisent :func:`lookup` " "pour la recherche du codec :" -#: library/codecs.rst:111 +#: library/codecs.rst:125 msgid "" "Look up the codec for the given encoding and return its encoder function." msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa fonction " "d'encodage." -#: library/codecs.rst:120 library/codecs.rst:154 +#: library/codecs.rst:134 library/codecs.rst:168 msgid "Raises a :exc:`LookupError` in case the encoding cannot be found." msgstr "Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé." -#: library/codecs.rst:118 +#: library/codecs.rst:132 msgid "" "Look up the codec for the given encoding and return its decoder function." msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa fonction de " "décodage." -#: library/codecs.rst:125 +#: library/codecs.rst:139 msgid "" "Look up the codec for the given encoding and return its incremental encoder " "class or factory function." @@ -206,7 +230,7 @@ msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa classe " "d'encodage incrémental ou la fonction usine." -#: library/codecs.rst:128 +#: library/codecs.rst:142 msgid "" "Raises a :exc:`LookupError` in case the encoding cannot be found or the " "codec doesn't support an incremental encoder." @@ -214,7 +238,7 @@ msgstr "" "Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé ou si " "le codec ne gère pas l'encodage incrémental." -#: library/codecs.rst:134 +#: library/codecs.rst:148 msgid "" "Look up the codec for the given encoding and return its incremental decoder " "class or factory function." @@ -222,7 +246,7 @@ msgstr "" "Recherche le codec pour l'encodage *encoding* et renvoie sa classe de " "décodage incrémental ou la fonction usine." -#: library/codecs.rst:137 +#: library/codecs.rst:151 msgid "" "Raises a :exc:`LookupError` in case the encoding cannot be found or the " "codec doesn't support an incremental decoder." @@ -230,23 +254,23 @@ msgstr "" "Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé ou si " "le codec ne gère pas le décodage incrémental." -#: library/codecs.rst:143 +#: library/codecs.rst:157 msgid "" -"Look up the codec for the given encoding and return its :class:" -"`StreamReader` class or factory function." +"Look up the codec for the given encoding and return " +"its :class:`StreamReader` class or factory function." msgstr "" -"Recherche le codec pour l'encodage *encoding* et renvoie sa classe :class:" -"`StreamReader` ou la fonction usine." +"Recherche le codec pour l'encodage *encoding* et renvoie sa " +"classe :class:`StreamReader` ou la fonction usine." -#: library/codecs.rst:151 +#: library/codecs.rst:165 msgid "" -"Look up the codec for the given encoding and return its :class:" -"`StreamWriter` class or factory function." +"Look up the codec for the given encoding and return " +"its :class:`StreamWriter` class or factory function." msgstr "" -"Recherche le codec pour l'encodage *encoding* et renvoie sa classe :class:" -"`StreamWriter` ou la fonction usine." +"Recherche le codec pour l'encodage *encoding* et renvoie sa " +"classe :class:`StreamWriter` ou la fonction usine." -#: library/codecs.rst:156 +#: library/codecs.rst:170 msgid "" "Custom codecs are made available by registering a suitable codec search " "function:" @@ -254,14 +278,13 @@ msgstr "" "Les codecs personnalisés sont mis à disposition en enregistrant une fonction " "de recherche de codecs adaptée :" -#: library/codecs.rst:161 +#: library/codecs.rst:175 #, fuzzy msgid "" "Register a codec search function. Search functions are expected to take one " -"argument, being the encoding name in all lower case letters with hyphens and " -"spaces converted to underscores, and return a :class:`CodecInfo` object. In " -"case a search function cannot find a given encoding, it should return " -"``None``." +"argument, being the encoding name in all lower case letters with spaces " +"converted to hyphens, and return a :class:`CodecInfo` object. In case a " +"search function cannot find a given encoding, it should return ``None``." msgstr "" "Enregistre une fonction de recherche de codec. Il convient qu'une fonction " "de recherche prenne un argument, le nom de l'encodage écrit en lettres " @@ -269,17 +292,13 @@ msgstr "" "recherche ne trouve pas un encodage donné, il convient qu'elle renvoie `` " "None``." -#: library/codecs.rst:167 -msgid "Hyphens and spaces are converted to underscore." -msgstr "" - -#: library/codecs.rst:173 +#: library/codecs.rst:184 msgid "" "Unregister a codec search function and clear the registry's cache. If the " "search function is not registered, do nothing." msgstr "" -#: library/codecs.rst:179 +#: library/codecs.rst:190 msgid "" "While the builtin :func:`open` and the associated :mod:`io` module are the " "recommended approach for working with encoded text files, this module " @@ -292,11 +311,11 @@ msgstr "" "qui permettent l'utilisation d'une plus large gamme de codecs si vous " "travaillez avec des fichiers binaires :" -#: library/codecs.rst:186 +#: library/codecs.rst:197 msgid "" -"Open an encoded file using the given *mode* and return an instance of :class:" -"`StreamReaderWriter`, providing transparent encoding/decoding. The default " -"file mode is ``'r'``, meaning to open the file in read mode." +"Open an encoded file using the given *mode* and return an instance " +"of :class:`StreamReaderWriter`, providing transparent encoding/decoding. The " +"default file mode is ``'r'``, meaning to open the file in read mode." msgstr "" "Ouvre un fichier encodé en utilisant le *mode* donné et renvoie une instance " "de :class:`StreamReaderWriter`, permettant un encodage-décodage transparent. " @@ -304,7 +323,7 @@ msgstr "" "est ouvert en lecture." # Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:192 +#: library/codecs.rst:203 #, fuzzy msgid "" "If *encoding* is not ``None``, then the underlying encoded files are always " @@ -318,7 +337,7 @@ msgstr "" "acceptable pour la fonction native :func:`open` ; le ``'b'`` est " "automatiquement ajouté." -#: library/codecs.rst:198 +#: library/codecs.rst:209 msgid "" "*encoding* specifies the encoding which is to be used for the file. Any " "encoding that encodes to and decodes from bytes is allowed, and the data " @@ -329,7 +348,7 @@ msgstr "" "données pris en charge par les méthodes relatives aux fichiers dépendent du " "codec utilisé." -#: library/codecs.rst:202 +#: library/codecs.rst:213 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'`` which causes a :exc:`ValueError` to be raised in case an " @@ -339,20 +358,24 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:205 +#: library/codecs.rst:216 msgid "" "*buffering* has the same meaning as for the built-in :func:`open` function. " "It defaults to -1 which means that the default buffer size will be used." msgstr "" -"*buffering* a la même signification que pour la fonction native :func:" -"`open`. Il vaut ``-1`` par défaut, ce qui signifie que la taille par défaut " -"du tampon est utilisée." +"*buffering* a la même signification que pour la fonction " +"native :func:`open`. Il vaut ``-1`` par défaut, ce qui signifie que la " +"taille par défaut du tampon est utilisée." -#: library/codecs.rst:208 +#: library/codecs.rst:219 msgid "The ``'U'`` mode has been removed." msgstr "le mode ``'U``` a été enlevé." -#: library/codecs.rst:214 +#: library/codecs.rst:224 +msgid ":func:`codecs.open` has been superseded by :func:`open`." +msgstr "" + +#: library/codecs.rst:229 msgid "" "Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " "provides transparent transcoding. The original file is closed when the " @@ -362,7 +385,7 @@ msgstr "" "qui fournit un transcodage transparent. Le fichier original est fermé quand " "la version encapsulée est fermée." -#: library/codecs.rst:218 +#: library/codecs.rst:233 msgid "" "Data written to the wrapped file is decoded according to the given " "*data_encoding* and then written to the original file as bytes using " @@ -375,13 +398,13 @@ msgstr "" "original sont décodés conformément à *file_encoding* et le résultat est " "encodé en utilisant *data_encoding*." -#: library/codecs.rst:224 +#: library/codecs.rst:239 msgid "If *file_encoding* is not given, it defaults to *data_encoding*." msgstr "" "Si *file_encoding* n'est pas spécifié, la valeur par défaut est " "*data_encoding*." -#: library/codecs.rst:226 +#: library/codecs.rst:241 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'``, which causes :exc:`ValueError` to be raised in case an " @@ -391,53 +414,66 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:233 +#: library/codecs.rst:248 +#, fuzzy msgid "" "Uses an incremental encoder to iteratively encode the input provided by " -"*iterator*. This function is a :term:`generator`. The *errors* argument (as " -"well as any other keyword argument) is passed through to the incremental " -"encoder." +"*iterator*. *iterator* must yield :class:`str` objects. This function is " +"a :term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental encoder." msgstr "" "Utilise un encodeur incrémental pour encoder de manière itérative l'entrée " "fournie par *iterator*. Cette fonction est un :term:`générateur " "`. L'argument *errors* (ainsi que tout autre argument passé par " "son nom) est transmis à l'encodeur incrémental." -#: library/codecs.rst:238 +#: library/codecs.rst:253 msgid "" "This function requires that the codec accept text :class:`str` objects to " "encode. Therefore it does not support bytes-to-bytes encoders such as " "``base64_codec``." msgstr "" -"Cette fonction nécessite que le codec accepte les objets texte (classe :" -"class:`str`) en entrée. Par conséquent, il ne prend pas en charge les " -"encodeurs *bytes* vers *bytes* tels que ``base64_codec``." +"Cette fonction nécessite que le codec accepte les objets texte " +"(classe :class:`str`) en entrée. Par conséquent, il ne prend pas en charge " +"les encodeurs *bytes* vers *bytes* tels que ``base64_codec``." -#: library/codecs.rst:245 +#: library/codecs.rst:260 +#, fuzzy msgid "" "Uses an incremental decoder to iteratively decode the input provided by " -"*iterator*. This function is a :term:`generator`. The *errors* argument (as " -"well as any other keyword argument) is passed through to the incremental " -"decoder." +"*iterator*. *iterator* must yield :class:`bytes` objects. This function is " +"a :term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental decoder." msgstr "" "Utilise un décodeur incrémental pour décoder de manière itérative l'entrée " "fournie par *iterator*. Cette fonction est un :term:`générateur`. L'argument " "*errors* (ainsi que tout autre argument passé par son nom) est transmis au " "décodeur incrémental." -#: library/codecs.rst:250 +#: library/codecs.rst:265 msgid "" "This function requires that the codec accept :class:`bytes` objects to " "decode. Therefore it does not support text-to-text encoders such as " -"``rot_13``, although ``rot_13`` may be used equivalently with :func:" -"`iterencode`." +"``rot_13``, although ``rot_13`` may be used equivalently " +"with :func:`iterencode`." msgstr "" "Cette fonction requiert que le codec accepte les objets :class:`bytes` en " "entrée. Par conséquent, elle ne prend pas en charge les encodeurs de texte " "vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " "manière équivalente avec :func:`iterencode`." -#: library/codecs.rst:256 +#: library/codecs.rst:273 +msgid "" +"Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-" +"compatible object ` or :class:`str` (encoded to UTF-8 before " +"processing), and their length in bytes." +msgstr "" + +#: library/codecs.rst:277 +msgid "The *errors* argument is ignored." +msgstr "" + +#: library/codecs.rst:285 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" @@ -445,34 +481,36 @@ msgstr "" "Le module fournit également les constantes suivantes qui sont utiles pour " "lire et écrire les fichiers dépendants de la plateforme :" -#: library/codecs.rst:271 +#: library/codecs.rst:300 msgid "" "These constants define various byte sequences, being Unicode byte order " "marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " "streams to indicate the byte order used, and in UTF-8 as a Unicode " -"signature. :const:`BOM_UTF16` is either :const:`BOM_UTF16_BE` or :const:" -"`BOM_UTF16_LE` depending on the platform's native byte order, :const:`BOM` " -"is an alias for :const:`BOM_UTF16`, :const:`BOM_LE` for :const:" -"`BOM_UTF16_LE` and :const:`BOM_BE` for :const:`BOM_UTF16_BE`. The others " -"represent the BOM in UTF-8 and UTF-32 encodings." +"signature. :const:`BOM_UTF16` is either :const:`BOM_UTF16_BE` " +"or :const:`BOM_UTF16_LE` depending on the platform's native byte " +"order, :const:`BOM` is an alias for :const:`BOM_UTF16`, :const:`BOM_LE` " +"for :const:`BOM_UTF16_LE` and :const:`BOM_BE` for :const:`BOM_UTF16_BE`. The " +"others represent the BOM in UTF-8 and UTF-32 encodings." msgstr "" "Ces constantes définissent diverses séquences d'octets, les marques d'ordre " "d'octets (BOM pour *byte order mark* en anglais) Unicode pour plusieurs " "encodages. Elles sont utilisées dans les flux de données UTF-16 et UTF-32 " "pour indiquer l'ordre des octets utilisé, et dans UTF-8 comme signature " -"Unicode. :const:`BOM_UTF16` vaut soit :const:`BOM_UTF16_BE`, soit :const:" -"`BOM_UTF16_LE` selon le boutisme natif de la plateforme, :const:`BOM` est un " -"alias pour :const:`BOM_UTF16`, :const:`BOM_LE` pour :const:`BOM_UTF16_LE` " +"Unicode. :const:`BOM_UTF16` vaut soit :const:`BOM_UTF16_BE`, " +"soit :const:`BOM_UTF16_LE` selon le boutisme natif de la " +"plateforme, :const:`BOM` est un alias " +"pour :const:`BOM_UTF16`, :const:`BOM_LE` pour :const:`BOM_UTF16_LE` " "et :const:`BOM_BE` pour :const:`BOM_UTF16_BE`. Les autres sont les marques " "BOM dans les encodages UTF-8 et UTF-32." -#: library/codecs.rst:285 +#: library/codecs.rst:314 msgid "Codec Base Classes" msgstr "Classes de base de codecs" -#: library/codecs.rst:287 +#: library/codecs.rst:316 +#, fuzzy msgid "" -"The :mod:`codecs` module defines a set of base classes which define the " +"The :mod:`!codecs` module defines a set of base classes which define the " "interfaces for working with codec objects, and can also be used as the basis " "for custom codec implementations." msgstr "" @@ -481,7 +519,7 @@ msgstr "" "peuvent également être utilisées comme base pour des implémentations de " "codecs personnalisés." -#: library/codecs.rst:291 +#: library/codecs.rst:320 msgid "" "Each codec has to define four interfaces to make it usable as codec in " "Python: stateless encoder, stateless decoder, stream reader and stream " @@ -496,11 +534,11 @@ msgstr "" "Les auteurs de codecs doivent également définir comment le codec gère les " "erreurs d'encodage et de décodage." -#: library/codecs.rst:302 +#: library/codecs.rst:331 msgid "Error Handlers" msgstr "Gestionnaires d'erreurs" -#: library/codecs.rst:304 +#: library/codecs.rst:333 #, fuzzy msgid "" "To simplify and standardize error handling, codecs may implement different " @@ -512,28 +550,28 @@ msgstr "" "les gestionnaires correspondants implémentés par tous les codecs Python " "standards :" -#: library/codecs.rst:324 +#: library/codecs.rst:353 #, fuzzy msgid "" "The following error handlers can be used with all Python :ref:`standard-" "encodings` codecs:" msgstr "" -"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" -"`encodeurs de texte ` :" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour " +"les :term:`encodeurs de texte ` :" -#: library/codecs.rst:373 library/codecs.rst:393 +#: library/codecs.rst:402 library/codecs.rst:422 msgid "Value" msgstr "Valeur" -#: library/codecs.rst:373 library/codecs.rst:1331 library/codecs.rst:1454 +#: library/codecs.rst:402 library/codecs.rst:1379 library/codecs.rst:1536 msgid "Meaning" msgstr "Signification" -#: library/codecs.rst:332 +#: library/codecs.rst:361 msgid "``'strict'``" msgstr "``'strict'``" -#: library/codecs.rst:332 +#: library/codecs.rst:361 #, fuzzy msgid "" "Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " @@ -542,11 +580,11 @@ msgstr "" "Lève :exc:`UnicodeError` (ou une sous-classe) ; c'est la valeur par défaut. " "Implémenté dans :func:`strict_errors`." -#: library/codecs.rst:336 +#: library/codecs.rst:365 msgid "``'ignore'``" msgstr "``'ignore'``" -#: library/codecs.rst:336 +#: library/codecs.rst:365 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." @@ -554,11 +592,11 @@ msgstr "" "Ignore les données incorrectement formatées et continue sans rien signaler. " "Implémenté dans :func:`ignore_errors`." -#: library/codecs.rst:340 +#: library/codecs.rst:369 msgid "``'replace'``" msgstr "``'replace'``" -#: library/codecs.rst:340 +#: library/codecs.rst:369 #, fuzzy msgid "" "Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " @@ -569,23 +607,24 @@ msgstr "" "caractère de substitution officiel ``U+FFFD`` pour les codecs natifs lors du " "décodage et ``?`` lors de l'encodage. Implémenté dans :func:`replace_errors`." -#: library/codecs.rst:346 +#: library/codecs.rst:375 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: library/codecs.rst:346 +#: library/codecs.rst:375 msgid "" "Replace with backslashed escape sequences. On encoding, use hexadecimal form " -"of Unicode code point with formats :samp:`\\\\x{hh}` :samp:`\\\\u{xxxx}` :" -"samp:`\\\\U{xxxxxxxx}`. On decoding, use hexadecimal form of byte value with " -"format :samp:`\\\\x{hh}`. Implemented in :func:`backslashreplace_errors`." +"of Unicode code point with formats :samp:`\\\\x{hh}` :samp:`\\\\u{xxxx}" +"` :samp:`\\\\U{xxxxxxxx}`. On decoding, use hexadecimal form of byte value " +"with format :samp:`\\\\x{hh}`. Implemented " +"in :func:`backslashreplace_errors`." msgstr "" -#: library/codecs.rst:355 +#: library/codecs.rst:384 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: library/codecs.rst:355 +#: library/codecs.rst:384 msgid "" "On decoding, replace byte with individual surrogate code ranging from " "``U+DC80`` to ``U+DCFF``. This code will then be turned back into the same " @@ -597,63 +636,63 @@ msgstr "" "départ quand le gestionnaire d'erreurs ``'surrogateescape'`` est utilisé " "pour l'encodage des données (voir la :pep:`383` pour plus de détails)." -#: library/codecs.rst:369 +#: library/codecs.rst:398 #, fuzzy msgid "" -"The following error handlers are only applicable to encoding (within :term:" -"`text encodings `):" +"The following error handlers are only applicable to encoding " +"(within :term:`text encodings `):" msgstr "" -"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" -"`encodeurs de texte ` :" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour " +"les :term:`encodeurs de texte ` :" -#: library/codecs.rst:375 +#: library/codecs.rst:404 msgid "``'xmlcharrefreplace'``" msgstr "``'xmlcharrefreplace'``" -#: library/codecs.rst:375 +#: library/codecs.rst:404 #, fuzzy msgid "" "Replace with XML/HTML numeric character reference, which is a decimal form " -"of Unicode code point with format :samp:`&#{num};`. Implemented in :func:" -"`xmlcharrefreplace_errors`." +"of Unicode code point with format :samp:`&#{num};`. Implemented " +"in :func:`xmlcharrefreplace_errors`." msgstr "" "Remplace avec la référence de caractère XML adaptée (uniquement pour " "l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." -#: library/codecs.rst:381 +#: library/codecs.rst:410 msgid "``'namereplace'``" msgstr "``'namereplace'``" -#: library/codecs.rst:381 +#: library/codecs.rst:410 #, fuzzy msgid "" "Replace with ``\\N{...}`` escape sequences, what appears in the braces is " -"the Name property from Unicode Character Database. Implemented in :func:" -"`namereplace_errors`." +"the Name property from Unicode Character Database. Implemented " +"in :func:`namereplace_errors`." msgstr "" "Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " "l'encodage). Implémenté dans :func:`namereplace_errors`." -#: library/codecs.rst:390 +#: library/codecs.rst:419 msgid "" "In addition, the following error handler is specific to the given codecs:" msgstr "" "En plus, le gestionnaire d'erreurs suivant est spécifique aux codecs " "suivants :" -#: library/codecs.rst:393 +#: library/codecs.rst:422 msgid "Codecs" msgstr "Codecs" -#: library/codecs.rst:395 +#: library/codecs.rst:424 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: library/codecs.rst:395 +#: library/codecs.rst:424 msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" msgstr "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" -#: library/codecs.rst:395 +#: library/codecs.rst:424 #, fuzzy msgid "" "Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " @@ -664,13 +703,13 @@ msgstr "" "traitent normalement la présence d'un code de substitution comme une erreur." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:402 +#: library/codecs.rst:431 msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." msgstr "" "les gestionnaires d'erreurs ``'surrogateescape'`` et ``'surrogatepass'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:405 +#: library/codecs.rst:434 #, fuzzy msgid "" "The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " @@ -680,12 +719,12 @@ msgstr "" "codecs utf-16\\* et utf-32\\*." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:409 +#: library/codecs.rst:438 msgid "The ``'namereplace'`` error handler." msgstr "le gestionnaire d'erreurs ``'namereplace'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:412 +#: library/codecs.rst:441 #, fuzzy msgid "" "The ``'backslashreplace'`` error handler now works with decoding and " @@ -694,7 +733,7 @@ msgstr "" "le gestionnaire d'erreurs ``'backslashreplace'`` fonctionne maintenant pour " "le décodage et la traduction." -#: library/codecs.rst:416 +#: library/codecs.rst:445 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" @@ -702,96 +741,97 @@ msgstr "" "L'ensemble des valeurs autorisées peut être étendu en enregistrant un " "nouveau gestionnaire d'erreurs nommé :" -#: library/codecs.rst:421 +#: library/codecs.rst:450 msgid "" "Register the error handling function *error_handler* under the name *name*. " "The *error_handler* argument will be called during encoding and decoding in " "case of an error, when *name* is specified as the errors parameter." msgstr "" -#: library/codecs.rst:425 +#: library/codecs.rst:454 msgid "" -"For encoding, *error_handler* will be called with a :exc:" -"`UnicodeEncodeError` instance, which contains information about the location " -"of the error. The error handler must either raise this or a different " -"exception, or return a tuple with a replacement for the unencodable part of " -"the input and a position where encoding should continue. The replacement may " -"be either :class:`str` or :class:`bytes`. If the replacement is bytes, the " -"encoder will simply copy them into the output buffer. If the replacement is " -"a string, the encoder will encode the replacement. Encoding continues on " -"original input at the specified position. Negative position values will be " -"treated as being relative to the end of the input string. If the resulting " -"position is out of bound an :exc:`IndexError` will be raised." +"For encoding, *error_handler* will be called with " +"a :exc:`UnicodeEncodeError` instance, which contains information about the " +"location of the error. The error handler must either raise this or a " +"different exception, or return a tuple with a replacement for the " +"unencodable part of the input and a position where encoding should continue. " +"The replacement may be either :class:`str` or :class:`bytes`. If the " +"replacement is bytes, the encoder will simply copy them into the output " +"buffer. If the replacement is a string, the encoder will encode the " +"replacement. Encoding continues on original input at the specified position. " +"Negative position values will be treated as being relative to the end of the " +"input string. If the resulting position is out of bound an :exc:`IndexError` " +"will be raised." msgstr "" -#: library/codecs.rst:437 +#: library/codecs.rst:466 msgid "" "Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " "or :exc:`UnicodeTranslateError` will be passed to the handler and that the " "replacement from the error handler will be put into the output directly." msgstr "" -#: library/codecs.rst:442 +#: library/codecs.rst:471 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: library/codecs.rst:447 +#: library/codecs.rst:476 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: library/codecs.rst:449 +#: library/codecs.rst:478 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: library/codecs.rst:451 +#: library/codecs.rst:480 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:456 +#: library/codecs.rst:485 #, fuzzy msgid "Implements the ``'strict'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:458 +#: library/codecs.rst:487 msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." msgstr "" # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:463 +#: library/codecs.rst:492 #, fuzzy msgid "Implements the ``'ignore'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:465 +#: library/codecs.rst:494 msgid "" "Malformed data is ignored; encoding or decoding is continued without further " "notice." msgstr "" # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:471 +#: library/codecs.rst:500 #, fuzzy msgid "Implements the ``'replace'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:473 +#: library/codecs.rst:502 msgid "" "Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " "the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:479 +#: library/codecs.rst:508 #, fuzzy msgid "Implements the ``'backslashreplace'`` error handling." msgstr "le gestionnaire d'erreurs ``'namereplace'``." -#: library/codecs.rst:481 +#: library/codecs.rst:510 msgid "" "Malformed data is replaced by a backslashed escape sequence. On encoding, " "use the hexadecimal form of Unicode code point with formats :samp:`\\\\x{hh}" @@ -799,17 +839,17 @@ msgid "" "hexadecimal form of byte value with format :samp:`\\\\x{hh}`." msgstr "" -#: library/codecs.rst:487 +#: library/codecs.rst:516 msgid "Works with decoding and translating." msgstr "" -#: library/codecs.rst:493 +#: library/codecs.rst:522 msgid "" -"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" -"term:`text encoding` only)." +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding " +"within :term:`text encoding` only)." msgstr "" -#: library/codecs.rst:496 +#: library/codecs.rst:525 #, fuzzy msgid "" "The unencodable character is replaced by an appropriate XML/HTML numeric " @@ -819,13 +859,13 @@ msgstr "" "Remplace avec la référence de caractère XML adaptée (uniquement pour " "l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." -#: library/codecs.rst:503 +#: library/codecs.rst:532 msgid "" -"Implements the ``'namereplace'`` error handling (for encoding within :term:" -"`text encoding` only)." +"Implements the ``'namereplace'`` error handling (for encoding " +"within :term:`text encoding` only)." msgstr "" -#: library/codecs.rst:506 +#: library/codecs.rst:535 msgid "" "The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " "set of characters that appear in the braces is the Name property from " @@ -833,17 +873,17 @@ msgid "" "will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: library/codecs.rst:517 +#: library/codecs.rst:546 msgid "Stateless Encoding and Decoding" msgstr "" -#: library/codecs.rst:519 +#: library/codecs.rst:548 msgid "" "The base :class:`Codec` class defines these methods which also define the " "function interfaces of the stateless encoder and decoder:" msgstr "" -#: library/codecs.rst:527 +#: library/codecs.rst:556 msgid "" "Encodes the object *input* and returns a tuple (output object, length " "consumed). For instance, :term:`text encoding` converts a string object to a " @@ -851,26 +891,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: library/codecs.rst:554 +#: library/codecs.rst:583 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: library/codecs.rst:535 +#: library/codecs.rst:564 msgid "" -"The method may not store state in the :class:`Codec` instance. Use :class:" -"`StreamWriter` for codecs which have to keep state in order to make encoding " -"efficient." +"The method may not store state in the :class:`Codec` instance. " +"Use :class:`StreamWriter` for codecs which have to keep state in order to " +"make encoding efficient." msgstr "" -#: library/codecs.rst:539 +#: library/codecs.rst:568 msgid "" "The encoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:545 +#: library/codecs.rst:574 msgid "" "Decodes the object *input* and returns a tuple (output object, length " "consumed). For instance, for a :term:`text encoding`, decoding converts a " @@ -878,101 +918,101 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:550 +#: library/codecs.rst:579 msgid "" "For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " "or one which provides the read-only buffer interface -- for example, buffer " "objects and memory mapped files." msgstr "" -#: library/codecs.rst:557 +#: library/codecs.rst:586 msgid "" -"The method may not store state in the :class:`Codec` instance. Use :class:" -"`StreamReader` for codecs which have to keep state in order to make decoding " -"efficient." +"The method may not store state in the :class:`Codec` instance. " +"Use :class:`StreamReader` for codecs which have to keep state in order to " +"make decoding efficient." msgstr "" -#: library/codecs.rst:561 +#: library/codecs.rst:590 msgid "" "The decoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:566 +#: library/codecs.rst:595 msgid "Incremental Encoding and Decoding" msgstr "" -#: library/codecs.rst:568 +#: library/codecs.rst:597 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" "decoding the input isn't done with one call to the stateless encoder/decoder " -"function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:" -"meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. " -"The incremental encoder/decoder keeps track of the encoding/decoding process " -"during method calls." +"function, but with multiple calls to " +"the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` " +"method of the incremental encoder/decoder. The incremental encoder/decoder " +"keeps track of the encoding/decoding process during method calls." msgstr "" -#: library/codecs.rst:576 +#: library/codecs.rst:605 msgid "" -"The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" -"`~IncrementalDecoder.decode` method is the same as if all the single inputs " -"were joined into one, and this input was encoded/decoded with the stateless " -"encoder/decoder." +"The joined output of calls to " +"the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` " +"method is the same as if all the single inputs were joined into one, and " +"this input was encoded/decoded with the stateless encoder/decoder." msgstr "" -#: library/codecs.rst:585 +#: library/codecs.rst:614 msgid "IncrementalEncoder Objects" msgstr "" -#: library/codecs.rst:587 +#: library/codecs.rst:616 msgid "" "The :class:`IncrementalEncoder` class is used for encoding an input in " "multiple steps. It defines the following methods which every incremental " "encoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:594 +#: library/codecs.rst:623 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: library/codecs.rst:596 +#: library/codecs.rst:625 msgid "" "All incremental encoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:600 +#: library/codecs.rst:629 msgid "" "The :class:`IncrementalEncoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:604 +#: library/codecs.rst:633 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " -"error handling strategies during the lifetime of the :class:" -"`IncrementalEncoder` object." +"error handling strategies during the lifetime of " +"the :class:`IncrementalEncoder` object." msgstr "" -#: library/codecs.rst:612 +#: library/codecs.rst:641 msgid "" "Encodes *object* (taking the current state of the encoder into account) and " -"returns the resulting encoded object. If this is the last call to :meth:" -"`encode` *final* must be true (the default is false)." +"returns the resulting encoded object. If this is the last call " +"to :meth:`encode` *final* must be true (the default is false)." msgstr "" -#: library/codecs.rst:619 +#: library/codecs.rst:648 msgid "" -"Reset the encoder to the initial state. The output is discarded: call ``." -"encode(object, final=True)``, passing an empty byte or text string if " +"Reset the encoder to the initial state. The output is discarded: call " +"``.encode(object, final=True)``, passing an empty byte or text string if " "necessary, to reset the encoder and to get the output." msgstr "" -#: library/codecs.rst:626 +#: library/codecs.rst:655 msgid "" "Return the current state of the encoder which must be an integer. The " "implementation should make sure that ``0`` is the most common state. (States " @@ -981,65 +1021,65 @@ msgid "" "into an integer.)" msgstr "" -#: library/codecs.rst:635 +#: library/codecs.rst:664 msgid "" "Set the state of the encoder to *state*. *state* must be an encoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:642 +#: library/codecs.rst:671 msgid "IncrementalDecoder Objects" msgstr "" -#: library/codecs.rst:644 +#: library/codecs.rst:673 msgid "" "The :class:`IncrementalDecoder` class is used for decoding an input in " "multiple steps. It defines the following methods which every incremental " "decoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:651 +#: library/codecs.rst:680 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: library/codecs.rst:653 +#: library/codecs.rst:682 msgid "" "All incremental decoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:657 +#: library/codecs.rst:686 msgid "" "The :class:`IncrementalDecoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:661 +#: library/codecs.rst:690 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " -"error handling strategies during the lifetime of the :class:" -"`IncrementalDecoder` object." +"error handling strategies during the lifetime of " +"the :class:`IncrementalDecoder` object." msgstr "" -#: library/codecs.rst:669 +#: library/codecs.rst:698 msgid "" "Decodes *object* (taking the current state of the decoder into account) and " -"returns the resulting decoded object. If this is the last call to :meth:" -"`decode` *final* must be true (the default is false). If *final* is true the " -"decoder must decode the input completely and must flush all buffers. If this " -"isn't possible (e.g. because of incomplete byte sequences at the end of the " -"input) it must initiate error handling just like in the stateless case " -"(which might raise an exception)." +"returns the resulting decoded object. If this is the last call " +"to :meth:`decode` *final* must be true (the default is false). If *final* is " +"true the decoder must decode the input completely and must flush all " +"buffers. If this isn't possible (e.g. because of incomplete byte sequences " +"at the end of the input) it must initiate error handling just like in the " +"stateless case (which might raise an exception)." msgstr "" -#: library/codecs.rst:680 +#: library/codecs.rst:709 msgid "Reset the decoder to the initial state." msgstr "" -#: library/codecs.rst:685 +#: library/codecs.rst:714 msgid "" "Return the current state of the decoder. This must be a tuple with two " "items, the first must be the buffer containing the still undecoded input. " @@ -1054,59 +1094,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: library/codecs.rst:700 +#: library/codecs.rst:729 msgid "" "Set the state of the decoder to *state*. *state* must be a decoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:705 +#: library/codecs.rst:734 msgid "Stream Encoding and Decoding" msgstr "" -#: library/codecs.rst:708 +#: library/codecs.rst:737 msgid "" "The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " "working interfaces which can be used to implement new encoding submodules " "very easily. See :mod:`!encodings.utf_8` for an example of how this is done." msgstr "" -#: library/codecs.rst:716 +#: library/codecs.rst:745 msgid "StreamWriter Objects" msgstr "" -#: library/codecs.rst:718 +#: library/codecs.rst:747 msgid "" "The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " "the following methods which every stream writer must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:725 +#: library/codecs.rst:754 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: library/codecs.rst:727 +#: library/codecs.rst:756 msgid "" "All stream writers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:731 +#: library/codecs.rst:760 msgid "" "The *stream* argument must be a file-like object open for writing text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:734 +#: library/codecs.rst:763 msgid "" "The :class:`StreamWriter` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:738 +#: library/codecs.rst:767 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1114,70 +1154,70 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:744 +#: library/codecs.rst:773 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: library/codecs.rst:749 +#: library/codecs.rst:778 msgid "" "Writes the concatenated iterable of strings to the stream (possibly by " "reusing the :meth:`write` method). Infinite or very large iterables are not " "supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: library/codecs.rst:852 +#: library/codecs.rst:881 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: library/codecs.rst:759 +#: library/codecs.rst:788 msgid "" "Calling this method should ensure that the data on the output is put into a " "clean state that allows appending of new fresh data without having to rescan " "the whole stream to recover state." msgstr "" -#: library/codecs.rst:764 +#: library/codecs.rst:793 msgid "" "In addition to the above methods, the :class:`StreamWriter` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:771 +#: library/codecs.rst:800 msgid "StreamReader Objects" msgstr "" -#: library/codecs.rst:773 +#: library/codecs.rst:802 msgid "" "The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " "the following methods which every stream reader must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:780 +#: library/codecs.rst:809 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: library/codecs.rst:782 +#: library/codecs.rst:811 msgid "" "All stream readers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:786 +#: library/codecs.rst:815 msgid "" "The *stream* argument must be a file-like object open for reading text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:789 +#: library/codecs.rst:818 msgid "" "The :class:`StreamReader` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:793 +#: library/codecs.rst:822 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1185,24 +1225,24 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:797 +#: library/codecs.rst:826 msgid "" -"The set of allowed values for the *errors* argument can be extended with :" -"func:`register_error`." +"The set of allowed values for the *errors* argument can be extended " +"with :func:`register_error`." msgstr "" -#: library/codecs.rst:803 +#: library/codecs.rst:832 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: library/codecs.rst:805 +#: library/codecs.rst:834 msgid "" "The *chars* argument indicates the number of decoded code points or bytes to " "return. The :func:`read` method will never return more data than requested, " "but it might return less, if there is not enough available." msgstr "" -#: library/codecs.rst:810 +#: library/codecs.rst:839 msgid "" "The *size* argument indicates the approximate maximum number of encoded " "bytes or code points to read for decoding. The decoder can modify this " @@ -1211,13 +1251,13 @@ msgid "" "huge files in one step." msgstr "" -#: library/codecs.rst:817 +#: library/codecs.rst:846 msgid "" "The *firstline* flag indicates that it would be sufficient to only return " "the first line, if there are decoding errors on later lines." msgstr "" -#: library/codecs.rst:821 +#: library/codecs.rst:850 msgid "" "The method should use a greedy read strategy meaning that it should read as " "much data as is allowed within the definition of the encoding and the given " @@ -1225,68 +1265,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: library/codecs.rst:829 +#: library/codecs.rst:858 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: library/codecs.rst:831 +#: library/codecs.rst:860 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: library/codecs.rst:834 +#: library/codecs.rst:863 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: library/codecs.rst:840 +#: library/codecs.rst:869 msgid "" "Read all lines available on the input stream and return them as a list of " "lines." msgstr "" -#: library/codecs.rst:843 +#: library/codecs.rst:872 msgid "" "Line-endings are implemented using the codec's :meth:`decode` method and are " "included in the list entries if *keepends* is true." msgstr "" -#: library/codecs.rst:846 +#: library/codecs.rst:875 msgid "" -"*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" -"`read` method." +"*sizehint*, if given, is passed as the *size* argument to the " +"stream's :meth:`read` method." msgstr "" -#: library/codecs.rst:854 +#: library/codecs.rst:883 msgid "" "Note that no stream repositioning should take place. This method is " "primarily intended to be able to recover from decoding errors." msgstr "" -#: library/codecs.rst:858 +#: library/codecs.rst:887 msgid "" "In addition to the above methods, the :class:`StreamReader` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:864 +#: library/codecs.rst:893 msgid "StreamReaderWriter Objects" msgstr "" -#: library/codecs.rst:866 +#: library/codecs.rst:895 msgid "" "The :class:`StreamReaderWriter` is a convenience class that allows wrapping " "streams which work in both read and write modes." msgstr "" -#: library/codecs.rst:893 +#: library/codecs.rst:922 msgid "" -"The design is such that one can use the factory functions returned by the :" -"func:`lookup` function to construct the instance." +"The design is such that one can use the factory functions returned by " +"the :func:`lookup` function to construct the instance." msgstr "" -#: library/codecs.rst:875 +#: library/codecs.rst:904 msgid "" "Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " "object. *Reader* and *Writer* must be factory functions or classes providing " @@ -1295,24 +1335,24 @@ msgid "" "writers." msgstr "" -#: library/codecs.rst:880 +#: library/codecs.rst:909 msgid "" -":class:`StreamReaderWriter` instances define the combined interfaces of :" -"class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " +":class:`StreamReaderWriter` instances define the combined interfaces " +"of :class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " "other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:888 +#: library/codecs.rst:917 msgid "StreamRecoder Objects" msgstr "" -#: library/codecs.rst:890 +#: library/codecs.rst:919 msgid "" "The :class:`StreamRecoder` translates data from one encoding to another, " "which is sometimes useful when dealing with different encoding environments." msgstr "" -#: library/codecs.rst:899 +#: library/codecs.rst:928 msgid "" "Creates a :class:`StreamRecoder` instance which implements a two-way " "conversion: *encode* and *decode* work on the frontend — the data visible to " @@ -1320,17 +1360,17 @@ msgid "" "while *Reader* and *Writer* work on the backend — the data in *stream*." msgstr "" -#: library/codecs.rst:905 +#: library/codecs.rst:934 msgid "" "You can use these objects to do transparent transcodings, e.g., from Latin-1 " "to UTF-8 and back." msgstr "" -#: library/codecs.rst:908 +#: library/codecs.rst:937 msgid "The *stream* argument must be a file-like object." msgstr "" -#: library/codecs.rst:910 +#: library/codecs.rst:939 msgid "" "The *encode* and *decode* arguments must adhere to the :class:`Codec` " "interface. *Reader* and *Writer* must be factory functions or classes " @@ -1338,24 +1378,24 @@ msgid "" "interface respectively." msgstr "" -#: library/codecs.rst:915 +#: library/codecs.rst:944 msgid "" "Error handling is done in the same way as defined for the stream readers and " "writers." msgstr "" -#: library/codecs.rst:919 +#: library/codecs.rst:948 msgid "" -":class:`StreamRecoder` instances define the combined interfaces of :class:" -"`StreamReader` and :class:`StreamWriter` classes. They inherit all other " -"methods and attributes from the underlying stream." +":class:`StreamRecoder` instances define the combined interfaces " +"of :class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " +"other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:927 +#: library/codecs.rst:956 msgid "Encodings and Unicode" msgstr "" -#: library/codecs.rst:929 +#: library/codecs.rst:958 msgid "" "Strings are stored internally as sequences of code points in range " "``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " @@ -1367,7 +1407,7 @@ msgid "" "which are collectivity referred to as :term:`text encodings `." msgstr "" -#: library/codecs.rst:939 +#: library/codecs.rst:968 msgid "" "The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " "the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " @@ -1378,7 +1418,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: library/codecs.rst:947 +#: library/codecs.rst:976 msgid "" "There's another group of encodings (the so called charmap encodings) that " "choose a different subset of all Unicode code points and how these code " @@ -1388,37 +1428,45 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: library/codecs.rst:954 +#: library/codecs.rst:983 msgid "" "All of these encodings can only encode 256 of the 1114112 code points " "defined in Unicode. A simple and straightforward way that can store each " "Unicode code point, is to store each code point as four consecutive bytes. " "There are two possibilities: store the bytes in big endian or in little " "endian order. These two encodings are called ``UTF-32-BE`` and ``UTF-32-LE`` " -"respectively. Their disadvantage is that if e.g. you use ``UTF-32-BE`` on a " -"little endian machine you will always have to swap bytes on encoding and " -"decoding. ``UTF-32`` avoids this problem: bytes will always be in natural " -"endianness. When these bytes are read by a CPU with a different endianness, " -"then bytes have to be swapped though. To be able to detect the endianness of " -"a ``UTF-16`` or ``UTF-32`` byte sequence, there's the so called BOM (\"Byte " -"Order Mark\"). This is the Unicode character ``U+FEFF``. This character can " -"be prepended to every ``UTF-16`` or ``UTF-32`` byte sequence. The byte " -"swapped version of this character (``0xFFFE``) is an illegal character that " -"may not appear in a Unicode text. So when the first character in a " -"``UTF-16`` or ``UTF-32`` byte sequence appears to be a ``U+FFFE`` the bytes " -"have to be swapped on decoding. Unfortunately the character ``U+FEFF`` had a " -"second purpose as a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no " -"width and doesn't allow a word to be split. It can e.g. be used to give " -"hints to a ligature algorithm. With Unicode 4.0 using ``U+FEFF`` as a ``ZERO " -"WIDTH NO-BREAK SPACE`` has been deprecated (with ``U+2060`` (``WORD " -"JOINER``) assuming this role). Nevertheless Unicode software still must be " -"able to handle ``U+FEFF`` in both roles: as a BOM it's a device to determine " -"the storage layout of the encoded bytes, and vanishes once the byte sequence " -"has been decoded into a string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a " -"normal character that will be decoded like any other." -msgstr "" - -#: library/codecs.rst:980 +"respectively. Their disadvantage is that if, for example, you use ``UTF-32-" +"BE`` on a little endian machine you will always have to swap bytes on " +"encoding and decoding. Python's ``UTF-16`` and ``UTF-32`` codecs avoid this " +"problem by using the platform's native byte order when no BOM is present. " +"Python follows prevailing platform practice, so native-endian data round-" +"trips without redundant byte swapping, even though the Unicode Standard " +"defaults to big-endian when the byte order is unspecified. When these bytes " +"are read by a CPU with a different endianness, the bytes have to be swapped. " +"To be able to detect the endianness of a ``UTF-16`` or ``UTF-32`` byte " +"sequence, a BOM (\"Byte Order Mark\") is used. This is the Unicode character " +"``U+FEFF``. This character can be prepended to every ``UTF-16`` or " +"``UTF-32`` byte sequence. The byte swapped version of this character " +"(``0xFFFE``) is an illegal character that may not appear in a Unicode text. " +"When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is " +"``U+FFFE``, the bytes have to be swapped on decoding." +msgstr "" + +#: library/codecs.rst:1004 +msgid "" +"Unfortunately the character ``U+FEFF`` had a second purpose as a ``ZERO " +"WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow a " +"word to be split. It can e.g. be used to give hints to a ligature algorithm. " +"With Unicode 4.0 using ``U+FEFF`` as a ``ZERO WIDTH NO-BREAK SPACE`` has " +"been deprecated (with ``U+2060`` (``WORD JOINER``) assuming this role). " +"Nevertheless Unicode software still must be able to handle ``U+FEFF`` in " +"both roles: as a BOM it's a device to determine the storage layout of the " +"encoded bytes, and vanishes once the byte sequence has been decoded into a " +"string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a normal character that will " +"be decoded like any other." +msgstr "" + +#: library/codecs.rst:1014 msgid "" "There's another encoding that is able to encode the full range of Unicode " "characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " @@ -1429,60 +1477,60 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: library/codecs.rst:989 +#: library/codecs.rst:1023 msgid "Range" msgstr "*Range*" -#: library/codecs.rst:989 +#: library/codecs.rst:1023 #, fuzzy msgid "Encoding" msgstr "Encodages" -#: library/codecs.rst:991 +#: library/codecs.rst:1025 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: library/codecs.rst:991 +#: library/codecs.rst:1025 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: library/codecs.rst:993 +#: library/codecs.rst:1027 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: library/codecs.rst:993 +#: library/codecs.rst:1027 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: library/codecs.rst:995 +#: library/codecs.rst:1029 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: library/codecs.rst:995 +#: library/codecs.rst:1029 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:997 +#: library/codecs.rst:1031 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: library/codecs.rst:997 +#: library/codecs.rst:1031 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:1000 +#: library/codecs.rst:1034 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: library/codecs.rst:1002 +#: library/codecs.rst:1036 msgid "" "As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " "character in the decoded string (even if it's the first character) is " "treated as a ``ZERO WIDTH NO-BREAK SPACE``." msgstr "" -#: library/codecs.rst:1006 +#: library/codecs.rst:1040 msgid "" "Without external information it's impossible to reliably determine which " "encoding was used for encoding a string. Each charmap encoding can decode " @@ -1496,19 +1544,19 @@ msgid "" "charmap encoded file starts with these byte values (which would e.g. map to" msgstr "" -#: library/codecs.rst:0 +#: library/codecs.rst:1052 msgid "LATIN SMALL LETTER I WITH DIAERESIS" msgstr "LATIN SMALL LETTER I WITH DIAERESIS" -#: library/codecs.rst:0 +#: library/codecs.rst:1053 msgid "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" msgstr "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" -#: library/codecs.rst:0 +#: library/codecs.rst:1054 msgid "INVERTED QUESTION MARK" msgstr "INVERTED QUESTION MARK" -#: library/codecs.rst:1022 +#: library/codecs.rst:1056 msgid "" "in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " "can be correctly guessed from the byte sequence. So here the BOM is not used " @@ -1520,23 +1568,37 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: library/codecs.rst:1035 +#: library/codecs.rst:1069 msgid "Standard Encodings" msgstr "" -#: library/codecs.rst:1037 +#: library/codecs.rst:1071 msgid "" "Python comes with a number of codecs built-in, either implemented as C " "functions or with dictionaries as mapping tables. The following table lists " "the codecs by name, together with a few common aliases, and the languages " "for which the encoding is likely used. Neither the list of aliases nor the " "list of languages is meant to be exhaustive. Notice that spelling " -"alternatives that only differ in case or use a hyphen instead of an " -"underscore are also valid aliases; therefore, e.g. ``'utf-8'`` is a valid " -"alias for the ``'utf_8'`` codec." +"alternatives that only differ in case or use a space or a hyphen instead of " +"an underscore are also valid aliases because they are equivalent when " +"normalized by :func:`~encodings.normalize_encoding`. For example, " +"``'utf-8'`` is a valid alias for the ``'utf_8'`` codec." +msgstr "" + +#: library/codecs.rst:1083 +msgid "" +"The below table lists the most common aliases, for a complete list refer to " +"the source :source:`aliases.py ` file." +msgstr "" + +#: library/codecs.rst:1086 +msgid "" +"On Windows, ``cpXXX`` codecs are available for all code pages. But only " +"codecs listed in the following table are guaranteed to exist on other " +"platforms." msgstr "" -#: library/codecs.rst:1047 +#: library/codecs.rst:1092 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1546,11 +1608,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: library/codecs.rst:1055 +#: library/codecs.rst:1100 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: library/codecs.rst:1058 +#: library/codecs.rst:1103 msgid "" "Many of the character sets support the same languages. They vary in " "individual characters (e.g. whether the EURO SIGN is supported or not), and " @@ -1558,486 +1620,488 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: library/codecs.rst:1063 +#: library/codecs.rst:1108 msgid "an ISO 8859 codeset" msgstr "" -#: library/codecs.rst:1065 +#: library/codecs.rst:1110 msgid "" "a Microsoft Windows code page, which is typically derived from an 8859 " "codeset, but replaces control characters with additional graphic characters" msgstr "" -#: library/codecs.rst:1068 +#: library/codecs.rst:1113 msgid "an IBM EBCDIC code page" msgstr "" -#: library/codecs.rst:1070 +#: library/codecs.rst:1115 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1331 library/codecs.rst:1454 +#: library/codecs.rst:1379 library/codecs.rst:1536 msgid "Codec" msgstr "" -#: library/codecs.rst:1331 library/codecs.rst:1454 +#: library/codecs.rst:1379 library/codecs.rst:1536 msgid "Aliases" msgstr "" -#: library/codecs.rst:1075 +#: library/codecs.rst:1120 msgid "Languages" msgstr "" -#: library/codecs.rst:1077 +#: library/codecs.rst:1122 msgid "ascii" msgstr "*ascii*" -#: library/codecs.rst:1077 +#: library/codecs.rst:1122 msgid "646, us-ascii" msgstr "*646*, *us-ascii*" -#: library/codecs.rst:1083 library/codecs.rst:1091 +#: library/codecs.rst:1128 library/codecs.rst:1136 msgid "English" msgstr "Anglais" -#: library/codecs.rst:1079 +#: library/codecs.rst:1124 msgid "big5" msgstr "*big5*" -#: library/codecs.rst:1079 +#: library/codecs.rst:1124 msgid "big5-tw, csbig5" msgstr "*big5-tw*, *csbig5*" -#: library/codecs.rst:1081 library/codecs.rst:1140 +#: library/codecs.rst:1126 library/codecs.rst:1185 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" -#: library/codecs.rst:1081 +#: library/codecs.rst:1126 msgid "big5hkscs" msgstr "*big5hkscs*" -#: library/codecs.rst:1081 +#: library/codecs.rst:1126 msgid "big5-hkscs, hkscs" msgstr "*big5-hkscs*, *hkscs*" -#: library/codecs.rst:1083 +#: library/codecs.rst:1128 msgid "cp037" msgstr "*cp037*" -#: library/codecs.rst:1083 +#: library/codecs.rst:1128 msgid "IBM037, IBM039" msgstr "*IBM037*, *IBM039*" -#: library/codecs.rst:1085 +#: library/codecs.rst:1130 msgid "cp273" msgstr "*cp273*" -#: library/codecs.rst:1085 +#: library/codecs.rst:1130 msgid "273, IBM273, csIBM273" msgstr "*273*, *IBM273*, *csIBM273*" -#: library/codecs.rst:1085 +#: library/codecs.rst:1130 msgid "German" msgstr "Allemand" -#: library/codecs.rst:1089 +#: library/codecs.rst:1134 msgid "cp424" msgstr "*cp424*" -#: library/codecs.rst:1089 +#: library/codecs.rst:1134 msgid "EBCDIC-CP-HE, IBM424" msgstr "*EBCDIC-CP-HE*, *IBM424*" -#: library/codecs.rst:1109 library/codecs.rst:1163 library/codecs.rst:1226 +#: library/codecs.rst:1154 library/codecs.rst:1208 library/codecs.rst:1271 msgid "Hebrew" msgstr "Hébreux" -#: library/codecs.rst:1091 +#: library/codecs.rst:1136 msgid "cp437" msgstr "*cp437*" -#: library/codecs.rst:1091 +#: library/codecs.rst:1136 msgid "437, IBM437" msgstr "*437*, *IBM437*" -#: library/codecs.rst:1093 +#: library/codecs.rst:1138 msgid "cp500" msgstr "*cp500*" -#: library/codecs.rst:1093 +#: library/codecs.rst:1138 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" -#: library/codecs.rst:1102 library/codecs.rst:1150 library/codecs.rst:1210 -#: library/codecs.rst:1266 +#: library/codecs.rst:1147 library/codecs.rst:1195 library/codecs.rst:1255 +#: library/codecs.rst:1311 msgid "Western Europe" msgstr "Europe de l'ouest" -#: library/codecs.rst:1096 +#: library/codecs.rst:1141 msgid "cp720" msgstr "*cp720*" -#: library/codecs.rst:1123 library/codecs.rst:1222 +#: library/codecs.rst:1168 library/codecs.rst:1267 msgid "Arabic" msgstr "Arabe" -#: library/codecs.rst:1098 +#: library/codecs.rst:1143 msgid "cp737" msgstr "*cp737*" -#: library/codecs.rst:1129 library/codecs.rst:1159 library/codecs.rst:1259 +#: library/codecs.rst:1174 library/codecs.rst:1204 library/codecs.rst:1304 msgid "Greek" msgstr "Grec" -#: library/codecs.rst:1100 +#: library/codecs.rst:1145 msgid "cp775" msgstr "*cp775*" -#: library/codecs.rst:1100 +#: library/codecs.rst:1145 msgid "IBM775" msgstr "*IBM775*" -#: library/codecs.rst:1167 library/codecs.rst:1234 +#: library/codecs.rst:1212 library/codecs.rst:1279 msgid "Baltic languages" msgstr "Langues Baltiques" -#: library/codecs.rst:1102 +#: library/codecs.rst:1147 msgid "cp850" msgstr "*cp850*" -#: library/codecs.rst:1102 +#: library/codecs.rst:1147 msgid "850, IBM850" msgstr "*850*, *IBM850*" -#: library/codecs.rst:1104 +#: library/codecs.rst:1149 msgid "cp852" msgstr "*cp852*" -#: library/codecs.rst:1104 +#: library/codecs.rst:1149 msgid "852, IBM852" msgstr "*852*, *IBM852*" -#: library/codecs.rst:1152 library/codecs.rst:1263 +#: library/codecs.rst:1197 library/codecs.rst:1308 msgid "Central and Eastern Europe" msgstr "Europe centrale et Europe de l'Est" -#: library/codecs.rst:1106 +#: library/codecs.rst:1151 msgid "cp855" msgstr "*cp855*" -#: library/codecs.rst:1106 +#: library/codecs.rst:1151 msgid "855, IBM855" msgstr "*855*, *IBM855*" -#: library/codecs.rst:1154 library/codecs.rst:1256 -msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian" +#: library/codecs.rst:1199 library/codecs.rst:1301 +#, fuzzy +msgid "Belarusian, Bulgarian, Macedonian, Russian, Serbian" msgstr "Bulgare, Biélorusse, Macédonien, Russe, Serbe" -#: library/codecs.rst:1109 +#: library/codecs.rst:1154 msgid "cp856" msgstr "*cp856*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1156 msgid "cp857" msgstr "*cp857*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1156 msgid "857, IBM857" msgstr "*857*, *IBM857*" -#: library/codecs.rst:1144 library/codecs.rst:1228 library/codecs.rst:1268 +#: library/codecs.rst:1189 library/codecs.rst:1273 library/codecs.rst:1313 msgid "Turkish" msgstr "Turc" -#: library/codecs.rst:1113 +#: library/codecs.rst:1158 msgid "cp858" msgstr "*cp858*" -#: library/codecs.rst:1113 -msgid "858, IBM858" +#: library/codecs.rst:1158 +#, fuzzy +msgid "858, IBM00858" msgstr "*858*, *IBM858*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1160 msgid "cp860" msgstr "*cp860*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1160 msgid "860, IBM860" msgstr "*860*, *IBM860*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1160 msgid "Portuguese" msgstr "Portugais" -#: library/codecs.rst:1117 +#: library/codecs.rst:1162 msgid "cp861" msgstr "*cp861*" -#: library/codecs.rst:1117 +#: library/codecs.rst:1162 msgid "861, CP-IS, IBM861" msgstr "*861*, *CP-IS*, *IBM861*" -#: library/codecs.rst:1261 +#: library/codecs.rst:1306 msgid "Icelandic" msgstr "Islandais" -#: library/codecs.rst:1119 +#: library/codecs.rst:1164 msgid "cp862" msgstr "*cp862*" -#: library/codecs.rst:1119 +#: library/codecs.rst:1164 msgid "862, IBM862" msgstr "*862*, *IBM862*" -#: library/codecs.rst:1121 +#: library/codecs.rst:1166 msgid "cp863" msgstr "*cp863*" -#: library/codecs.rst:1121 +#: library/codecs.rst:1166 msgid "863, IBM863" msgstr "*863*, *IBM863*" -#: library/codecs.rst:1121 +#: library/codecs.rst:1166 msgid "Canadian" msgstr "Canadien" -#: library/codecs.rst:1123 +#: library/codecs.rst:1168 msgid "cp864" msgstr "*cp864*" -#: library/codecs.rst:1123 +#: library/codecs.rst:1168 msgid "IBM864" msgstr "*IBM864*" -#: library/codecs.rst:1125 +#: library/codecs.rst:1170 msgid "cp865" msgstr "*cp865*" -#: library/codecs.rst:1125 +#: library/codecs.rst:1170 msgid "865, IBM865" msgstr "*865*, *IBM865*" -#: library/codecs.rst:1125 +#: library/codecs.rst:1170 msgid "Danish, Norwegian" msgstr "" -#: library/codecs.rst:1127 +#: library/codecs.rst:1172 msgid "cp866" msgstr "*cp866*" -#: library/codecs.rst:1127 +#: library/codecs.rst:1172 msgid "866, IBM866" msgstr "*866*, *IBM866*" -#: library/codecs.rst:1244 +#: library/codecs.rst:1289 msgid "Russian" msgstr "Russe" -#: library/codecs.rst:1129 +#: library/codecs.rst:1174 msgid "cp869" msgstr "*cp869*" -#: library/codecs.rst:1129 +#: library/codecs.rst:1174 msgid "869, CP-GR, IBM869" msgstr "*869*, *CP-GR*, *IBM869*" -#: library/codecs.rst:1131 +#: library/codecs.rst:1176 msgid "cp874" msgstr "*cp874*" -#: library/codecs.rst:1131 +#: library/codecs.rst:1176 msgid "Thai" msgstr "" -#: library/codecs.rst:1133 +#: library/codecs.rst:1178 msgid "cp875" msgstr "*cp875*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1180 msgid "cp932" msgstr "*cp932*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1180 #, fuzzy msgid "932, ms932, mskanji, ms-kanji, windows-31j" msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" -#: library/codecs.rst:1171 library/codecs.rst:1175 library/codecs.rst:1195 -#: library/codecs.rst:1203 library/codecs.rst:1273 library/codecs.rst:1279 +#: library/codecs.rst:1216 library/codecs.rst:1220 library/codecs.rst:1240 +#: library/codecs.rst:1248 library/codecs.rst:1318 library/codecs.rst:1324 msgid "Japanese" msgstr "" -#: library/codecs.rst:1138 +#: library/codecs.rst:1183 msgid "cp949" msgstr "*cp949*" -#: library/codecs.rst:1138 +#: library/codecs.rst:1183 msgid "949, ms949, uhc" msgstr "*949*, *ms949*, *uhc*" -#: library/codecs.rst:1177 library/codecs.rst:1242 +#: library/codecs.rst:1222 library/codecs.rst:1287 msgid "Korean" msgstr "" -#: library/codecs.rst:1140 +#: library/codecs.rst:1185 msgid "cp950" msgstr "*cp950*" -#: library/codecs.rst:1140 +#: library/codecs.rst:1185 msgid "950, ms950" msgstr "*950*, *ms950*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1187 msgid "cp1006" msgstr "*cp1006*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1187 msgid "Urdu" msgstr "" -#: library/codecs.rst:1144 +#: library/codecs.rst:1189 msgid "cp1026" msgstr "*cp1026*" -#: library/codecs.rst:1144 +#: library/codecs.rst:1189 msgid "ibm1026" msgstr "*ibm1026*" -#: library/codecs.rst:1146 +#: library/codecs.rst:1191 msgid "cp1125" msgstr "*cp1125*" -#: library/codecs.rst:1146 +#: library/codecs.rst:1191 msgid "1125, ibm1125, cp866u, ruscii" msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" -#: library/codecs.rst:1250 +#: library/codecs.rst:1295 msgid "Ukrainian" msgstr "" -#: library/codecs.rst:1150 +#: library/codecs.rst:1195 msgid "cp1140" msgstr "*cp1140*" -#: library/codecs.rst:1150 -msgid "ibm1140" -msgstr "*ibm1140*" +#: library/codecs.rst:1195 +msgid "IBM01140" +msgstr "" -#: library/codecs.rst:1152 +#: library/codecs.rst:1197 msgid "cp1250" msgstr "*cp1250*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1197 msgid "windows-1250" msgstr "*windows-1250*" -#: library/codecs.rst:1154 +#: library/codecs.rst:1199 msgid "cp1251" msgstr "*cp1251*" -#: library/codecs.rst:1154 +#: library/codecs.rst:1199 msgid "windows-1251" msgstr "*windows-1251*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1202 msgid "cp1252" msgstr "*cp1252*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1202 msgid "windows-1252" msgstr "*windows-1252*" -#: library/codecs.rst:1159 +#: library/codecs.rst:1204 msgid "cp1253" msgstr "*cp1253*" -#: library/codecs.rst:1159 +#: library/codecs.rst:1204 msgid "windows-1253" msgstr "*windows-1253*" -#: library/codecs.rst:1161 +#: library/codecs.rst:1206 msgid "cp1254" msgstr "*cp1254*" -#: library/codecs.rst:1161 +#: library/codecs.rst:1206 msgid "windows-1254" msgstr "*windows-1254*" -#: library/codecs.rst:1163 +#: library/codecs.rst:1208 msgid "cp1255" msgstr "*cp1255*" -#: library/codecs.rst:1163 +#: library/codecs.rst:1208 msgid "windows-1255" msgstr "*windows-1255*" -#: library/codecs.rst:1165 +#: library/codecs.rst:1210 msgid "cp1256" msgstr "*cp1256*" -#: library/codecs.rst:1165 +#: library/codecs.rst:1210 msgid "windows-1256" msgstr "*windows-1256*" -#: library/codecs.rst:1167 +#: library/codecs.rst:1212 msgid "cp1257" msgstr "*cp1257*" -#: library/codecs.rst:1167 +#: library/codecs.rst:1212 msgid "windows-1257" msgstr "*windows-1257*" -#: library/codecs.rst:1169 +#: library/codecs.rst:1214 msgid "cp1258" msgstr "*cp1258*" -#: library/codecs.rst:1169 +#: library/codecs.rst:1214 msgid "windows-1258" msgstr "*windows-1258*" -#: library/codecs.rst:1169 +#: library/codecs.rst:1214 msgid "Vietnamese" msgstr "" -#: library/codecs.rst:1171 +#: library/codecs.rst:1216 msgid "euc_jp" msgstr "*euc_jp*" -#: library/codecs.rst:1171 +#: library/codecs.rst:1216 msgid "eucjp, ujis, u-jis" msgstr "*eucjp*, *ujis*, *u-jis*" -#: library/codecs.rst:1173 +#: library/codecs.rst:1218 msgid "euc_jis_2004" msgstr "*euc_jis_2004*" -#: library/codecs.rst:1173 +#: library/codecs.rst:1218 msgid "jisx0213, eucjis2004" msgstr "*jisx0213*, *eucjis2004*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1220 msgid "euc_jisx0213" msgstr "*euc_jisx0213*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1220 msgid "eucjisx0213" msgstr "*eucjisx0213*" -#: library/codecs.rst:1177 +#: library/codecs.rst:1222 msgid "euc_kr" msgstr "*euc_kr*" -#: library/codecs.rst:1177 +#: library/codecs.rst:1222 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "" "*euckr*, *korean*, *ksc5601*, *ks_c-5601*, *ks_c-5601-1987*, *ksx1001*, " "*ks_x-1001*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1226 msgid "gb2312" msgstr "*gb2312*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1226 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -2045,445 +2109,458 @@ msgstr "" "*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " "*gb2312-1980*, *gb2312-80*, *iso-ir-58*" -#: library/codecs.rst:1190 +#: library/codecs.rst:1235 msgid "Simplified Chinese" msgstr "" -#: library/codecs.rst:1186 +#: library/codecs.rst:1231 msgid "gbk" msgstr "*gbk*" -#: library/codecs.rst:1186 +#: library/codecs.rst:1231 msgid "936, cp936, ms936" msgstr "*936*, *cp936*, *ms936*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1233 msgid "Unified Chinese" msgstr "" -#: library/codecs.rst:1188 +#: library/codecs.rst:1233 msgid "gb18030" msgstr "*gb18030*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1233 msgid "gb18030-2000" msgstr "*gb18030-2000*" -#: library/codecs.rst:1190 +#: library/codecs.rst:1235 msgid "hz" msgstr "*hz*" -#: library/codecs.rst:1190 +#: library/codecs.rst:1235 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" -#: library/codecs.rst:1192 +#: library/codecs.rst:1237 msgid "iso2022_jp" msgstr "*iso2022_jp*" -#: library/codecs.rst:1192 +#: library/codecs.rst:1237 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" -#: library/codecs.rst:1195 +#: library/codecs.rst:1240 msgid "iso2022_jp_1" msgstr "*iso2022_jp_1*" -#: library/codecs.rst:1195 +#: library/codecs.rst:1240 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "*iso2022jp-1*, *iso-2022-jp-1*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1242 msgid "iso2022_jp_2" msgstr "*iso2022_jp_2*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1242 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "*iso2022jp-2*, *iso-2022-jp-2*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1242 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: library/codecs.rst:1200 +#: library/codecs.rst:1245 msgid "iso2022_jp_2004" msgstr "*iso2022_jp_2004*" -#: library/codecs.rst:1200 +#: library/codecs.rst:1245 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" -#: library/codecs.rst:1203 +#: library/codecs.rst:1248 msgid "iso2022_jp_3" msgstr "*iso2022_jp_3*" -#: library/codecs.rst:1203 +#: library/codecs.rst:1248 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "*iso2022jp-3*, *iso-2022-jp-3*" -#: library/codecs.rst:1205 +#: library/codecs.rst:1250 msgid "iso2022_jp_ext" msgstr "*iso2022_jp_ext*" -#: library/codecs.rst:1205 +#: library/codecs.rst:1250 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" -#: library/codecs.rst:1207 +#: library/codecs.rst:1252 msgid "iso2022_kr" msgstr "*iso2022_kr*" -#: library/codecs.rst:1207 +#: library/codecs.rst:1252 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1255 msgid "latin_1" msgstr "*latin_1*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1255 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "*iso-8859-1*, *iso8859-1*, *8859*, *cp819*, *latin*, *latin1*, *L1*" -#: library/codecs.rst:1213 +#: library/codecs.rst:1258 msgid "iso8859_2" msgstr "*iso8859_2*" -#: library/codecs.rst:1213 +#: library/codecs.rst:1258 msgid "iso-8859-2, latin2, L2" msgstr "*iso-8859-2*, *latin2*, *L2*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "iso8859_3" msgstr "*iso8859_3*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "iso-8859-3, latin3, L3" msgstr "*iso-8859-3*, *latin3*, *L3*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "Esperanto, Maltese" msgstr "" -#: library/codecs.rst:1217 +#: library/codecs.rst:1262 msgid "iso8859_4" msgstr "*iso8859_4*" -#: library/codecs.rst:1217 +#: library/codecs.rst:1262 msgid "iso-8859-4, latin4, L4" msgstr "*iso-8859-4*, *latin4*, *L4*" -#: library/codecs.rst:1219 +#: library/codecs.rst:1262 +#, fuzzy +msgid "Northern Europe" +msgstr "Europe de l'ouest" + +#: library/codecs.rst:1264 msgid "iso8859_5" msgstr "*iso8859_5*" -#: library/codecs.rst:1219 +#: library/codecs.rst:1264 msgid "iso-8859-5, cyrillic" msgstr "*iso-8859-5*, *cyrillic*" -#: library/codecs.rst:1222 +#: library/codecs.rst:1267 msgid "iso8859_6" msgstr "*iso8859_6*" -#: library/codecs.rst:1222 +#: library/codecs.rst:1267 msgid "iso-8859-6, arabic" msgstr "*iso-8859-6*, *arabic*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1269 msgid "iso8859_7" msgstr "*iso8859_7*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1269 msgid "iso-8859-7, greek, greek8" msgstr "*iso-8859-7*, *greek*, *greek8*" -#: library/codecs.rst:1226 +#: library/codecs.rst:1271 msgid "iso8859_8" msgstr "*iso8859_8*" -#: library/codecs.rst:1226 +#: library/codecs.rst:1271 msgid "iso-8859-8, hebrew" msgstr "*iso-8859-8*, *hebrew*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1273 msgid "iso8859_9" msgstr "*iso8859_9*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1273 msgid "iso-8859-9, latin5, L5" msgstr "*iso-8859-9*, *latin5*, *L5*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1275 msgid "iso8859_10" msgstr "*iso8859_10*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1275 msgid "iso-8859-10, latin6, L6" msgstr "*iso-8859-10*, *latin6*, *L6*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1275 msgid "Nordic languages" msgstr "" -#: library/codecs.rst:1232 +#: library/codecs.rst:1277 msgid "iso8859_11" msgstr "*iso8859_11*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1277 msgid "iso-8859-11, thai" msgstr "*iso-8859-11*, *thai*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1277 msgid "Thai languages" msgstr "" -#: library/codecs.rst:1234 +#: library/codecs.rst:1279 msgid "iso8859_13" msgstr "*iso8859_13*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1279 msgid "iso-8859-13, latin7, L7" msgstr "*iso-8859-13*, *latin7*, *L7*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1281 msgid "iso8859_14" msgstr "*iso8859_14*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1281 msgid "iso-8859-14, latin8, L8" msgstr "*iso-8859-14*, *latin8*, *L8*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1281 msgid "Celtic languages" msgstr "" -#: library/codecs.rst:1238 +#: library/codecs.rst:1283 msgid "iso8859_15" msgstr "*iso8859_15*" -#: library/codecs.rst:1238 +#: library/codecs.rst:1283 msgid "iso-8859-15, latin9, L9" msgstr "*iso-8859-15*, *latin9*, *L9*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1285 msgid "iso8859_16" msgstr "*iso8859_16*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1285 msgid "iso-8859-16, latin10, L10" msgstr "*iso-8859-16*, *latin10*, *L10*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1285 msgid "South-Eastern Europe" msgstr "" -#: library/codecs.rst:1242 +#: library/codecs.rst:1287 msgid "johab" msgstr "*johab*" -#: library/codecs.rst:1242 +#: library/codecs.rst:1287 msgid "cp1361, ms1361" msgstr "*cp1361*, *ms1361*" -#: library/codecs.rst:1244 +#: library/codecs.rst:1289 msgid "koi8_r" msgstr "*koi8_r*" -#: library/codecs.rst:1246 +#: library/codecs.rst:1291 msgid "koi8_t" msgstr "*koi8_t*" -#: library/codecs.rst:1246 +#: library/codecs.rst:1291 msgid "Tajik" msgstr "*Tajik*" -#: library/codecs.rst:1250 +#: library/codecs.rst:1295 msgid "koi8_u" msgstr "*koi8_u*" -#: library/codecs.rst:1252 +#: library/codecs.rst:1297 msgid "kz1048" msgstr "*kz1048*" -#: library/codecs.rst:1252 +#: library/codecs.rst:1297 msgid "kz_1048, strk1048_2002, rk1048" msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" -#: library/codecs.rst:1270 +#: library/codecs.rst:1315 msgid "Kazakh" msgstr "" -#: library/codecs.rst:1256 +#: library/codecs.rst:1301 msgid "mac_cyrillic" msgstr "*mac_cyrillic*" -#: library/codecs.rst:1256 +#: library/codecs.rst:1301 msgid "maccyrillic" msgstr "*maccyrillic*" -#: library/codecs.rst:1259 +#: library/codecs.rst:1304 msgid "mac_greek" msgstr "*mac_greek*" -#: library/codecs.rst:1259 +#: library/codecs.rst:1304 msgid "macgreek" msgstr "*macgreek*" -#: library/codecs.rst:1261 +#: library/codecs.rst:1306 msgid "mac_iceland" msgstr "*mac_iceland*" -#: library/codecs.rst:1261 +#: library/codecs.rst:1306 msgid "maciceland" msgstr "*maciceland*" -#: library/codecs.rst:1263 +#: library/codecs.rst:1308 msgid "mac_latin2" msgstr "*mac_latin2*" -#: library/codecs.rst:1263 +#: library/codecs.rst:1308 #, fuzzy msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "*maclatin2*, *maccentraleurope*" -#: library/codecs.rst:1266 +#: library/codecs.rst:1311 msgid "mac_roman" msgstr "*mac_roman*" -#: library/codecs.rst:1266 +#: library/codecs.rst:1311 msgid "macroman, macintosh" msgstr "*macroman*, *macintosh*" -#: library/codecs.rst:1268 +#: library/codecs.rst:1313 msgid "mac_turkish" msgstr "*mac_turkish*" -#: library/codecs.rst:1268 +#: library/codecs.rst:1313 msgid "macturkish" msgstr "*macturkish*" -#: library/codecs.rst:1270 +#: library/codecs.rst:1315 msgid "ptcp154" msgstr "*ptcp154*" -#: library/codecs.rst:1270 +#: library/codecs.rst:1315 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" -#: library/codecs.rst:1273 +#: library/codecs.rst:1318 msgid "shift_jis" msgstr "*shift_jis*" -#: library/codecs.rst:1273 +#: library/codecs.rst:1318 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" -#: library/codecs.rst:1276 +#: library/codecs.rst:1321 msgid "shift_jis_2004" msgstr "*shift_jis_2004*" -#: library/codecs.rst:1276 +#: library/codecs.rst:1321 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" -#: library/codecs.rst:1279 +#: library/codecs.rst:1324 msgid "shift_jisx0213" msgstr "*shift_jisx0213*" -#: library/codecs.rst:1279 +#: library/codecs.rst:1324 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" -#: library/codecs.rst:1282 +#: library/codecs.rst:1327 msgid "utf_32" msgstr "*utf_32*" -#: library/codecs.rst:1282 +#: library/codecs.rst:1327 msgid "U32, utf32" msgstr "*U32*, *utf32*" -#: library/codecs.rst:1284 library/codecs.rst:1288 library/codecs.rst:1292 -#: library/codecs.rst:1296 library/codecs.rst:1298 +#: library/codecs.rst:1329 library/codecs.rst:1333 library/codecs.rst:1337 +#: library/codecs.rst:1341 library/codecs.rst:1343 msgid "all languages" msgstr "" -#: library/codecs.rst:1284 +#: library/codecs.rst:1329 msgid "utf_32_be" msgstr "*utf_32_be*" -#: library/codecs.rst:1284 +#: library/codecs.rst:1329 msgid "UTF-32BE" msgstr "*UTF-32BE*" -#: library/codecs.rst:1286 +#: library/codecs.rst:1331 msgid "utf_32_le" msgstr "*utf_32_le*" -#: library/codecs.rst:1286 +#: library/codecs.rst:1331 msgid "UTF-32LE" msgstr "*UTF-32LE*" -#: library/codecs.rst:1288 +#: library/codecs.rst:1333 msgid "utf_16" msgstr "*utf_16*" -#: library/codecs.rst:1288 +#: library/codecs.rst:1333 msgid "U16, utf16" msgstr "*U16*, *utf16*" -#: library/codecs.rst:1290 +#: library/codecs.rst:1335 msgid "utf_16_be" msgstr "*utf_16_be*" -#: library/codecs.rst:1290 +#: library/codecs.rst:1335 msgid "UTF-16BE" msgstr "*UTF-16BE*" -#: library/codecs.rst:1292 +#: library/codecs.rst:1337 msgid "utf_16_le" msgstr "*utf_16_le*" -#: library/codecs.rst:1292 +#: library/codecs.rst:1337 msgid "UTF-16LE" msgstr "*UTF-16LE*" -#: library/codecs.rst:1294 +#: library/codecs.rst:1339 msgid "utf_7" msgstr "*utf_7*" -#: library/codecs.rst:1294 +#: library/codecs.rst:1339 msgid "U7, unicode-1-1-utf-7" msgstr "*U7*, *unicode-1-1-utf-7*" -#: library/codecs.rst:1296 +#: library/codecs.rst:1341 msgid "utf_8" msgstr "*utf_8*" -#: library/codecs.rst:1296 +#: library/codecs.rst:1341 #, fuzzy msgid "U8, UTF, utf8, cp65001" msgstr "*U8*, *UTF*, *utf8*" -#: library/codecs.rst:1298 +#: library/codecs.rst:1343 msgid "utf_8_sig" msgstr "*utf_8_sig*" -#: library/codecs.rst:1301 +#: library/codecs.rst:1343 +msgid "utf8-sig" +msgstr "" + +#: library/codecs.rst:1346 msgid "" "The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " "(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " "decode byte sequences that correspond to surrogate code points." msgstr "" -#: library/codecs.rst:1307 +#: library/codecs.rst:1352 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: library/codecs.rst:1312 +#: library/codecs.rst:1355 +msgid "On Windows, ``cpXXX`` codecs are now available for all code pages." +msgstr "" + +#: library/codecs.rst:1360 msgid "Python Specific Encodings" msgstr "" -#: library/codecs.rst:1314 +#: library/codecs.rst:1362 msgid "" "A number of predefined codecs are specific to Python, so their codec names " "have no meaning outside Python. These are listed in the tables below based " @@ -2493,268 +2570,384 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: library/codecs.rst:1322 +#: library/codecs.rst:1370 msgid "Text Encodings" msgstr "" -#: library/codecs.rst:1324 +#: library/codecs.rst:1372 msgid "" -"The following codecs provide :class:`str` to :class:`bytes` encoding and :" -"term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " -"text encodings." +"The following codecs provide :class:`str` to :class:`bytes` encoding " +"and :term:`bytes-like object` to :class:`str` decoding, similar to the " +"Unicode text encodings." msgstr "" -#: library/codecs.rst:1333 +#: library/codecs.rst:1381 msgid "idna" msgstr "idna" -#: library/codecs.rst:1333 +#: library/codecs.rst:1381 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: library/codecs.rst:1339 +#: library/codecs.rst:1387 msgid "mbcs" msgstr "mbcs" -#: library/codecs.rst:1339 +#: library/codecs.rst:1387 msgid "ansi, dbcs" msgstr "" -#: library/codecs.rst:1339 +#: library/codecs.rst:1387 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1343 +#: library/codecs.rst:1391 msgid "oem" msgstr "" -#: library/codecs.rst:1343 +#: library/codecs.rst:1391 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid "palmos" msgstr "palmos" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid "Encoding of PalmOS 3.5." msgstr "" -#: library/codecs.rst:1351 +#: library/codecs.rst:1399 msgid "punycode" msgstr "punycode" -#: library/codecs.rst:1351 +#: library/codecs.rst:1399 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1355 +#: library/codecs.rst:1403 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: library/codecs.rst:1355 +#: library/codecs.rst:1403 msgid "" "Latin-1 encoding with :samp:`\\\\u{XXXX}` and :samp:`\\\\U{XXXXXXXX}` for " "other code points. Existing backslashes are not escaped in any way. It is " "used in the Python pickle protocol." msgstr "" -#: library/codecs.rst:1365 +#: library/codecs.rst:1413 msgid "undefined" msgstr "undefined" -#: library/codecs.rst:1365 +#: library/codecs.rst:1413 +msgid "This Codec should only be used for testing purposes." +msgstr "" + +#: library/codecs.rst:1417 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1370 +#: library/codecs.rst:1422 msgid "unicode_escape" msgstr "unicode_escape" -#: library/codecs.rst:1370 +#: library/codecs.rst:1422 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: library/codecs.rst:1382 +#: library/codecs.rst:1434 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1389 +#: library/codecs.rst:1441 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1391 +#: library/codecs.rst:1443 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: library/codecs.rst:1399 +#: library/codecs.rst:1451 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1401 +#: library/codecs.rst:1453 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: library/codecs.rst:1401 +#: library/codecs.rst:1453 msgid "base64, base_64" msgstr "base64, base_64" -#: library/codecs.rst:1401 +#: library/codecs.rst:1453 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1406 +#: library/codecs.rst:1458 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1401 +#: library/codecs.rst:1453 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1412 +#: library/codecs.rst:1464 msgid "bz2_codec" msgstr "bz2_codec" -#: library/codecs.rst:1412 +#: library/codecs.rst:1464 msgid "bz2" msgstr "bz2" -#: library/codecs.rst:1412 +#: library/codecs.rst:1464 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1412 +#: library/codecs.rst:1464 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1415 +#: library/codecs.rst:1467 msgid "hex_codec" msgstr "hex_codec" -#: library/codecs.rst:1415 +#: library/codecs.rst:1467 msgid "hex" msgstr "hex" -#: library/codecs.rst:1415 +#: library/codecs.rst:1467 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1415 +#: library/codecs.rst:1467 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1420 +#: library/codecs.rst:1472 msgid "quopri_codec" msgstr "quopri_codec" -#: library/codecs.rst:1420 +#: library/codecs.rst:1472 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1420 +#: library/codecs.rst:1472 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1420 +#: library/codecs.rst:1472 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1424 +#: library/codecs.rst:1476 msgid "uu_codec" msgstr "uu_codec" -#: library/codecs.rst:1424 +#: library/codecs.rst:1476 msgid "uu" msgstr "uu" -#: library/codecs.rst:1424 +#: library/codecs.rst:1476 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1427 +#: library/codecs.rst:1479 msgid "zlib_codec" msgstr "zlib_codec" -#: library/codecs.rst:1427 +#: library/codecs.rst:1479 msgid "zip, zlib" msgstr "zip, zlib" -#: library/codecs.rst:1427 +#: library/codecs.rst:1479 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1427 +#: library/codecs.rst:1479 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: library/codecs.rst:1431 +#: library/codecs.rst:1483 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: library/codecs.rst:1435 +#: library/codecs.rst:1487 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1438 +#: library/codecs.rst:1490 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1445 +#: library/codecs.rst:1497 +msgid "Standalone Codec Functions" +msgstr "" + +#: library/codecs.rst:1499 +msgid "" +"The following functions provide encoding and decoding functionality similar " +"to codecs, but are not available as named codecs " +"through :func:`codecs.encode` or :func:`codecs.decode`. They are used " +"internally (for example, by :mod:`pickle`) and behave similarly to the " +"``string_escape`` codec that was removed in Python 3." +msgstr "" + +#: library/codecs.rst:1506 +msgid "" +"Encode *input* using escape sequences. Similar to how :func:`repr` on bytes " +"produces escaped byte values." +msgstr "" + +#: library/codecs.rst:1509 +msgid "*input* must be a :class:`bytes` object." +msgstr "" + +#: library/codecs.rst:1520 +msgid "" +"Returns a tuple ``(output, length)`` where *output* is a :class:`bytes` " +"object and *length* is the number of bytes consumed." +msgstr "" + +#: library/codecs.rst:1516 +msgid "Decode *input* from escape sequences back to the original bytes." +msgstr "" + +#: library/codecs.rst:1518 +msgid "*input* must be a :term:`bytes-like object`." +msgstr "" + +#: library/codecs.rst:1527 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1447 +#: library/codecs.rst:1529 msgid "" -"The following codec provides a text transform: a :class:`str` to :class:" -"`str` mapping. It is not supported by :meth:`str.encode` (which only " -"produces :class:`bytes` output)." +"The following codec provides a text transform: a :class:`str` " +"to :class:`str` mapping. It is not supported by :meth:`str.encode` (which " +"only produces :class:`bytes` output)." msgstr "" -#: library/codecs.rst:1456 +#: library/codecs.rst:1538 msgid "rot_13" msgstr "rot_13" -#: library/codecs.rst:1456 +#: library/codecs.rst:1538 msgid "rot13" msgstr "rot13" -#: library/codecs.rst:1456 +#: library/codecs.rst:1538 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1461 +#: library/codecs.rst:1543 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1464 +#: library/codecs.rst:1546 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1469 +#: library/codecs.rst:1551 +msgid ":mod:`!encodings` --- Encodings package" +msgstr "" + +#: library/codecs.rst:1556 +msgid "This module implements the following functions:" +msgstr "" + +#: library/codecs.rst:1560 +msgid "Normalize encoding name *encoding*." +msgstr "" + +#: library/codecs.rst:1562 msgid "" -":mod:`encodings.idna` --- Internationalized Domain Names in Applications" +"Normalization works as follows: all non-alphanumeric characters except the " +"dot used for Python package names are collapsed and replaced with a single " +"underscore, leading and trailing underscores are removed. For example, ``' " +"-;#'`` becomes ``'_'``." +msgstr "" + +#: library/codecs.rst:1567 +msgid "Note that *encoding* should be ASCII only." msgstr "" -#: library/codecs.rst:1475 +#: library/codecs.rst:1571 +msgid "" +"The following functions should not be used directly, except for testing " +"purposes; :func:`codecs.lookup` should be used instead." +msgstr "" + +#: library/codecs.rst:1577 +msgid "" +"Search for the codec module corresponding to the given encoding name " +"*encoding*." +msgstr "" + +#: library/codecs.rst:1580 +msgid "" +"This function first normalizes the *encoding* " +"using :func:`normalize_encoding`, then looks for a corresponding alias. It " +"attempts to import a codec module from the encodings package using either " +"the alias or the normalized name. If the module is found and defines a valid " +"``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, " +"the codec is cached and returned." +msgstr "" + +#: library/codecs.rst:1587 +msgid "" +"If the codec module defines a ``getaliases()`` function any returned aliases " +"are registered for future use." +msgstr "" + +#: library/codecs.rst:1593 +msgid "" +"Search for a Windows code page encoding *encoding* of the form ``cpXXXX``." +msgstr "" + +#: library/codecs.rst:1595 +msgid "" +"If the code page is valid and supported, return a :class:`codecs.CodecInfo` " +"object for it." +msgstr "" + +#: library/codecs.rst:1683 +msgid "Availability" +msgstr "Disponibilité" + +#: library/codecs.rst:1603 +msgid "This module implements the following exception:" +msgstr "" + +#: library/codecs.rst:1607 +msgid "Raised when a codec is invalid or incompatible." +msgstr "" + +#: library/codecs.rst:1611 +msgid "" +":mod:`!encodings.idna` --- Internationalized Domain Names in Applications" +msgstr "" + +#: library/codecs.rst:1616 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2762,27 +2955,27 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1480 +#: library/codecs.rst:1621 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " "third-party :pypi:`idna` module." msgstr "" -#: library/codecs.rst:1483 +#: library/codecs.rst:1624 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " -"domain names. A domain name containing non-ASCII characters (such as ``www." -"Alliancefrançaise.nu``) is converted into an ASCII-compatible encoding (ACE, " -"such as ``www.xn--alliancefranaise-npb.nu``). The ACE form of the domain " -"name is then used in all places where arbitrary characters are not allowed " -"by the protocol, such as DNS queries, HTTP :mailheader:`Host` fields, and so " -"on. This conversion is carried out in the application; if possible invisible " -"to the user: The application should transparently convert Unicode domain " -"labels to IDNA on the wire, and convert back ACE labels to Unicode before " -"presenting them to the user." +"domain names. A domain name containing non-ASCII characters (such as " +"``www.Alliancefrançaise.nu``) is converted into an ASCII-compatible encoding " +"(ACE, such as ``www.xn--alliancefranaise-npb.nu``). The ACE form of the " +"domain name is then used in all places where arbitrary characters are not " +"allowed by the protocol, such as DNS queries, HTTP :mailheader:`Host` " +"fields, and so on. This conversion is carried out in the application; if " +"possible invisible to the user: The application should transparently convert " +"Unicode domain labels to IDNA on the wire, and convert back ACE labels to " +"Unicode before presenting them to the user." msgstr "" -#: library/codecs.rst:1494 +#: library/codecs.rst:1635 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2793,70 +2986,66 @@ msgid "" "the :mod:`socket` module transparently converts Unicode host names to ACE, " "so that applications need not be concerned about converting host names " "themselves when they pass them to the socket module. On top of that, modules " -"that have host names as function parameters, such as :mod:`http.client` and :" -"mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also " +"that have host names as function parameters, such as :mod:`http.client` " +"and :mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also " "transparently sends an IDNA hostname in the :mailheader:`Host` field if it " "sends that field at all)." msgstr "" -#: library/codecs.rst:1507 +#: library/codecs.rst:1648 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: library/codecs.rst:1511 +#: library/codecs.rst:1652 msgid "" -"The module :mod:`encodings.idna` also implements the nameprep procedure, " +"The module :mod:`!encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" "insensitivity of international domain names, and to unify similar " "characters. The nameprep functions can be used directly if desired." msgstr "" -#: library/codecs.rst:1519 +#: library/codecs.rst:1660 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: library/codecs.rst:1525 +#: library/codecs.rst:1666 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: library/codecs.rst:1531 +#: library/codecs.rst:1672 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1535 -msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" +#: library/codecs.rst:1676 +msgid ":mod:`!encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1540 +#: library/codecs.rst:1681 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1542 -msgid "Availability" -msgstr "" - -#: library/codecs.rst:1544 +#: library/codecs.rst:1685 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: library/codecs.rst:1548 +#: library/codecs.rst:1689 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1553 -msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" +#: library/codecs.rst:1694 +msgid ":mod:`!encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: library/codecs.rst:1559 +#: library/codecs.rst:1699 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " @@ -2865,6 +3054,9 @@ msgid "" "skipped." msgstr "" +#~ msgid "ibm1140" +#~ msgstr "*ibm1140*" + #, fuzzy #~ msgid "Unicode" #~ msgstr "punycode" @@ -2918,11 +3110,11 @@ msgstr "" #~ msgstr ":ref:`Disponibilité ` : Windows uniquement." #~ msgid "" -#~ "Replace with backslashed escape sequences. Implemented in :func:" -#~ "`backslashreplace_errors`." +#~ "Replace with backslashed escape sequences. Implemented " +#~ "in :func:`backslashreplace_errors`." #~ msgstr "" -#~ "Remplace avec une séquence échappée par des antislashs. Implémenté dans :" -#~ "func:`backslashreplace_errors`." +#~ "Remplace avec une séquence échappée par des antislashs. Implémenté " +#~ "dans :func:`backslashreplace_errors`." # Pas de majuscule en début car suit un deux-points. #~ msgid "" diff --git a/library/codeop.po b/library/codeop.po index a3bee25fa..3b7fc9fef 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 20:25+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,13 +20,14 @@ msgstr "" msgid ":mod:`!codeop` --- Compile Python code" msgstr ":mod:`codeop` — Compilation de code Python" -#: library/codeop.rst:10 +#: library/codeop.rst:7 msgid "**Source code:** :source:`Lib/codeop.py`" msgstr "**Code source :** :source:`Lib/codeop.py`" -#: library/codeop.rst:14 +#: library/codeop.rst:11 +#, fuzzy msgid "" -"The :mod:`codeop` module provides utilities upon which the Python read-eval-" +"The :mod:`!codeop` module provides utilities upon which the Python read-eval-" "print loop can be emulated, as is done in the :mod:`code` module. As a " "result, you probably don't want to use the module directly; if you want to " "include such a loop in your program you probably want to use the :mod:`code` " @@ -38,11 +39,11 @@ msgstr "" "destiné à être utilisé directement ; pour inclure un REPL dans un programme, " "il est préférable d'utiliser le module :mod:`code`." -#: library/codeop.rst:20 +#: library/codeop.rst:17 msgid "There are two parts to this job:" msgstr "Cette tâche se divise en deux parties :" -#: library/codeop.rst:22 +#: library/codeop.rst:19 #, fuzzy msgid "" "Being able to tell if a line of input completes a Python statement: in " @@ -52,7 +53,7 @@ msgstr "" "achève une instruction : en bref, savoir s'il faut afficher « ``>>>`` » ou " "« ``...`` » à sa suite." -#: library/codeop.rst:25 +#: library/codeop.rst:22 #, fuzzy msgid "" "Remembering which future statements the user has entered, so subsequent " @@ -61,19 +62,20 @@ msgstr "" "Conserver les instructions déjà entrées par l'utilisateur, afin que les " "entrées suivantes puissent êtres compilées avec elles." -#: library/codeop.rst:28 +#: library/codeop.rst:25 +#, fuzzy msgid "" -"The :mod:`codeop` module provides a way of doing each of these things, and a " -"way of doing them both." +"The :mod:`!codeop` module provides a way of doing each of these things, and " +"a way of doing them both." msgstr "" "Le module :mod:`codeop` fournit un moyen d'effectuer ces deux parties, " "individuellement ou simultanément." -#: library/codeop.rst:31 +#: library/codeop.rst:28 msgid "To do just the former:" msgstr "Pour ne faire que la première partie :" -#: library/codeop.rst:35 +#: library/codeop.rst:32 #, fuzzy msgid "" "Tries to compile *source*, which should be a string of Python code and " @@ -88,30 +90,31 @@ msgstr "" "*filename* (``''`` par défaut). Renvoie ``None`` si *source* n'est " "*pas* du code Python valide, mais un *début* de code Python valide." -#: library/codeop.rst:41 +#: library/codeop.rst:38 msgid "" -"If there is a problem with *source*, an exception will be raised. :exc:" -"`SyntaxError` is raised if there is invalid Python syntax, and :exc:" -"`OverflowError` or :exc:`ValueError` if there is an invalid literal." +"If there is a problem with *source*, an exception will be " +"raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, " +"and :exc:`OverflowError` or :exc:`ValueError` if there is an invalid literal." msgstr "" -"En cas de problème avec *source*, une exception est levée ; :exc:" -"`SyntaxError` si la syntaxe Python est incorrecte, et :exc:`OverflowError` " -"ou :exc:`ValueError` si un littéral invalide est rencontré." +"En cas de problème avec *source*, une exception est " +"levée ; :exc:`SyntaxError` si la syntaxe Python est incorrecte, " +"et :exc:`OverflowError` ou :exc:`ValueError` si un littéral invalide est " +"rencontré." -#: library/codeop.rst:45 +#: library/codeop.rst:42 #, fuzzy msgid "" "The *symbol* argument determines whether *source* is compiled as a statement " "(``'single'``, the default), as a sequence of :term:`statement` (``'exec'``) " -"or as an :term:`expression` (``'eval'``). Any other value will cause :exc:" -"`ValueError` to be raised." +"or as an :term:`expression` (``'eval'``). Any other value will " +"cause :exc:`ValueError` to be raised." msgstr "" "L'argument *symbol* détermine si *source* est compilée comme une instruction " "(``'single'``, par défaut), comme une suite d'instructions (``'exec'``), ou " -"comme une :term:`expression` (``'eval'``). Toute autre valeur lèvera :exc:" -"`ValueError`." +"comme une :term:`expression` (``'eval'``). Toute autre valeur " +"lèvera :exc:`ValueError`." -#: library/codeop.rst:52 +#: library/codeop.rst:49 msgid "" "It is possible (but not likely) that the parser stops parsing with a " "successful outcome before reaching the end of the source; in this case, " @@ -126,7 +129,7 @@ msgstr "" "mémoire non-initialisée. Ceci sera corrigé quand l'interface de l'analyseur " "aura été améliorée." -#: library/codeop.rst:61 +#: library/codeop.rst:58 #, fuzzy msgid "" "Instances of this class have :meth:`~object.__call__` methods identical in " @@ -137,11 +140,11 @@ msgid "" msgstr "" "Les instances de cette classe ont des méthodes :meth:`__call__` de signature " "identique à la fonction native :func:`compile`, à la différence près que si " -"l'instance compile du code source contenant une instruction :mod:" -"`__future__`, l'instance s'en « souviendra » et compilera tous les codes " -"sources suivants avec cette instruction activée." +"l'instance compile du code source contenant une " +"instruction :mod:`__future__`, l'instance s'en « souviendra » et compilera " +"tous les codes sources suivants avec cette instruction activée." -#: library/codeop.rst:70 +#: library/codeop.rst:67 #, fuzzy msgid "" "Instances of this class have :meth:`~object.__call__` methods identical in " diff --git a/library/collections.abc.po b/library/collections.abc.po index 43fefb289..6fba78d01 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,61 +5,61 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2021-03-21 16:06+0100\n" -"Last-Translator: Loc Cosnier \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 10:48+0200\n" +"Last-Translator: Julien Palard \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" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 3.38.0\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.6\n" #: library/collections.abc.rst:2 #, fuzzy msgid ":mod:`!collections.abc` --- Abstract Base Classes for Containers" msgstr "" -":mod:`collections.abc` --- Classes de base abstraites pour les conteneurs" +":mod:`collections.abc` — Classes de base abstraites pour les conteneurs" -#: library/collections.abc.rst:10 +#: library/collections.abc.rst:7 msgid "Formerly, this module was part of the :mod:`collections` module." msgstr "Auparavant, ce module faisait partie du module :mod:`collections`." -#: library/collections.abc.rst:13 +#: library/collections.abc.rst:10 msgid "**Source code:** :source:`Lib/_collections_abc.py`" msgstr "**Code source :** :source:`Lib/_collections_abc.py`" -#: library/collections.abc.rst:23 +#: library/collections.abc.rst:20 #, fuzzy msgid "" "This module provides :term:`abstract base classes ` " "that can be used to test whether a class provides a particular interface; " -"for example, whether it is :term:`hashable` or whether it is a :term:" -"`mapping`." +"for example, whether it is :term:`hashable` or whether it is " +"a :term:`mapping`." msgstr "" "Ce module fournit :term:`des classes de base abstraites ` qui peuvent être utilisées pour vérifier si une classe fournit une " "interface particulière (par exemple, savoir s'il s'agit d'un hachable ou " "d'une table de correspondance)." -#: library/collections.abc.rst:27 +#: library/collections.abc.rst:24 msgid "" "An :func:`issubclass` or :func:`isinstance` test for an interface works in " "one of three ways." msgstr "" -#: library/collections.abc.rst:30 +#: library/collections.abc.rst:27 msgid "" -"1) A newly written class can inherit directly from one of the abstract base " +"A newly written class can inherit directly from one of the abstract base " "classes. The class must supply the required abstract methods. The " "remaining mixin methods come from inheritance and can be overridden if " "desired. Other methods may be added as needed:" msgstr "" -#: library/collections.abc.rst:50 +#: library/collections.abc.rst:47 msgid "" -"2) Existing classes and built-in classes can be registered as \"virtual " +"Existing classes and built-in classes can be registered as \"virtual " "subclasses\" of the ABCs. Those classes should define the full API " "including all of the abstract methods and all of the mixin methods. This " "lets users rely on :func:`issubclass` or :func:`isinstance` tests to " @@ -67,22 +67,22 @@ msgid "" "rule is for methods that are automatically inferred from the rest of the API:" msgstr "" -#: library/collections.abc.rst:76 +#: library/collections.abc.rst:73 msgid "" "In this example, class :class:`!D` does not need to define ``__contains__``, " "``__iter__``, and ``__reversed__`` because the :ref:`in-operator " -"`, the :term:`iteration ` logic, and the :func:" -"`reversed` function automatically fall back to using ``__getitem__`` and " -"``__len__``." +"`, the :term:`iteration ` logic, and " +"the :func:`reversed` function automatically fall back to using " +"``__getitem__`` and ``__len__``." msgstr "" -#: library/collections.abc.rst:82 +#: library/collections.abc.rst:79 msgid "" -"3) Some simple interfaces are directly recognizable by the presence of the " +"Some simple interfaces are directly recognizable by the presence of the " "required methods (unless those methods have been set to :const:`None`):" msgstr "" -#: library/collections.abc.rst:99 +#: library/collections.abc.rst:95 msgid "" "Complex interfaces do not support this last technique because an interface " "is more than just the presence of method names. Interfaces specify " @@ -92,17 +92,17 @@ msgid "" "insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`." msgstr "" -#: library/collections.abc.rst:107 +#: library/collections.abc.rst:103 msgid "" "These abstract classes now support ``[]``. See :ref:`types-genericalias` " "and :pep:`585`." msgstr "" -#: library/collections.abc.rst:114 +#: library/collections.abc.rst:110 msgid "Collections Abstract Base Classes" msgstr "Classes de base abstraites de collections" -#: library/collections.abc.rst:116 +#: library/collections.abc.rst:112 msgid "" "The collections module offers the following :term:`ABCs `:" @@ -110,149 +110,149 @@ msgstr "" "Le module collections apporte les :term:`ABC ` " "suivantes :" -#: library/collections.abc.rst:121 +#: library/collections.abc.rst:117 msgid "ABC" msgstr "ABC" -#: library/collections.abc.rst:121 +#: library/collections.abc.rst:117 msgid "Inherits from" msgstr "Hérite de" -#: library/collections.abc.rst:121 +#: library/collections.abc.rst:117 msgid "Abstract Methods" msgstr "Méthodes abstraites" -#: library/collections.abc.rst:121 +#: library/collections.abc.rst:117 msgid "Mixin Methods" msgstr "Méthodes *mixin*" -#: library/collections.abc.rst:123 +#: library/collections.abc.rst:119 #, fuzzy msgid ":class:`Container` [1]_" msgstr ":class:`Container`" -#: library/collections.abc.rst:123 +#: library/collections.abc.rst:119 msgid "``__contains__``" msgstr "``__contains__``" -#: library/collections.abc.rst:124 +#: library/collections.abc.rst:120 #, fuzzy msgid ":class:`Hashable` [1]_" msgstr ":class:`Hashable`" -#: library/collections.abc.rst:124 +#: library/collections.abc.rst:120 msgid "``__hash__``" msgstr "``__hash__``" -#: library/collections.abc.rst:125 +#: library/collections.abc.rst:121 #, fuzzy msgid ":class:`Iterable` [1]_ [2]_" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:125 library/collections.abc.rst:126 +#: library/collections.abc.rst:121 library/collections.abc.rst:122 msgid "``__iter__``" msgstr "``__iter__``" -#: library/collections.abc.rst:126 +#: library/collections.abc.rst:122 #, fuzzy msgid ":class:`Iterator` [1]_" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:126 library/collections.abc.rst:127 +#: library/collections.abc.rst:122 library/collections.abc.rst:123 msgid ":class:`Iterable`" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:126 +#: library/collections.abc.rst:122 msgid "``__next__``" msgstr "``__next__``" -#: library/collections.abc.rst:127 +#: library/collections.abc.rst:123 #, fuzzy msgid ":class:`Reversible` [1]_" msgstr ":class:`Reversible`" -#: library/collections.abc.rst:127 +#: library/collections.abc.rst:123 msgid "``__reversed__``" msgstr "``__reversed__``" -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:124 #, fuzzy msgid ":class:`Generator` [1]_" msgstr ":class:`Generator`" -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:124 msgid ":class:`Iterator`" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:128 library/collections.abc.rst:176 +#: library/collections.abc.rst:124 library/collections.abc.rst:173 msgid "``send``, ``throw``" msgstr "``send``, ``throw``" -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:124 msgid "``close``, ``__iter__``, ``__next__``" msgstr "``close``, ``__iter__``, ``__next__``" -#: library/collections.abc.rst:129 +#: library/collections.abc.rst:125 #, fuzzy msgid ":class:`Sized` [1]_" msgstr ":class:`Sized`" -#: library/collections.abc.rst:129 library/collections.abc.rst:168 +#: library/collections.abc.rst:125 msgid "``__len__``" msgstr "``__len__``" -#: library/collections.abc.rst:130 +#: library/collections.abc.rst:126 #, fuzzy msgid ":class:`Callable` [1]_" msgstr ":class:`Callable`" -#: library/collections.abc.rst:130 +#: library/collections.abc.rst:126 msgid "``__call__``" msgstr "``__call__``" -#: library/collections.abc.rst:131 +#: library/collections.abc.rst:127 #, fuzzy msgid ":class:`Collection` [1]_" msgstr ":class:`Collection`" -#: library/collections.abc.rst:131 +#: library/collections.abc.rst:127 msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" -#: library/collections.abc.rst:131 library/collections.abc.rst:147 +#: library/collections.abc.rst:127 library/collections.abc.rst:143 msgid "``__contains__``, ``__iter__``, ``__len__``" msgstr "``__contains__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:135 library/collections.abc.rst:138 -#: library/collections.abc.rst:144 +#: library/collections.abc.rst:131 library/collections.abc.rst:134 +#: library/collections.abc.rst:140 msgid ":class:`Sequence`" msgstr ":class:`Sequence`" -#: library/collections.abc.rst:135 +#: library/collections.abc.rst:131 msgid ":class:`Reversible`, :class:`Collection`" msgstr ":class:`Reversible`, :class:`Collection`" -#: library/collections.abc.rst:135 library/collections.abc.rst:144 +#: library/collections.abc.rst:131 library/collections.abc.rst:140 msgid "``__getitem__``, ``__len__``" msgstr "``__getitem__``, ``__len__``" -#: library/collections.abc.rst:135 +#: library/collections.abc.rst:131 msgid "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" msgstr "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``" -#: library/collections.abc.rst:138 +#: library/collections.abc.rst:134 msgid ":class:`MutableSequence`" msgstr ":class:`MutableSequence`" -#: library/collections.abc.rst:138 +#: library/collections.abc.rst:134 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" -#: library/collections.abc.rst:138 +#: library/collections.abc.rst:134 #, fuzzy msgid "" "Inherited :class:`Sequence` methods and ``append``, ``clear``, ``reverse``, " @@ -261,39 +261,41 @@ msgstr "" "Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, " "``extend``, ``pop``, ``remove`` et ``__iadd__``" -#: library/collections.abc.rst:144 +#: library/collections.abc.rst:140 msgid ":class:`ByteString`" msgstr ":class:`ByteString`" -#: library/collections.abc.rst:144 +#: library/collections.abc.rst:140 msgid "Inherited :class:`Sequence` methods" msgstr "Méthodes héritées de :class:`Sequence`" -#: library/collections.abc.rst:147 library/collections.abc.rst:151 +#: library/collections.abc.rst:143 library/collections.abc.rst:148 msgid ":class:`Set`" msgstr ":class:`Set`" -#: library/collections.abc.rst:147 library/collections.abc.rst:157 +#: library/collections.abc.rst:143 library/collections.abc.rst:154 msgid ":class:`Collection`" msgstr ":class:`Collection`" -#: library/collections.abc.rst:147 +#: library/collections.abc.rst:143 +#, fuzzy msgid "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " -"``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" +"``__and__``, ``__or__``, ``__sub__``, ``__rsub__``, ``__xor__``, " +"``__rxor__`` and ``isdisjoint``" msgstr "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__`` et ``isdisjoint``" -#: library/collections.abc.rst:151 +#: library/collections.abc.rst:148 msgid ":class:`MutableSet`" msgstr ":class:`MutableSet`" -#: library/collections.abc.rst:151 +#: library/collections.abc.rst:148 msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" -#: library/collections.abc.rst:151 +#: library/collections.abc.rst:148 msgid "" "Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" @@ -301,15 +303,15 @@ msgstr "" "Méthodes héritées de :class:`Set`, et ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__`` et ``__isub__``" -#: library/collections.abc.rst:157 library/collections.abc.rst:161 +#: library/collections.abc.rst:154 library/collections.abc.rst:158 msgid ":class:`Mapping`" msgstr ":class:`Mapping`" -#: library/collections.abc.rst:157 +#: library/collections.abc.rst:154 msgid "``__getitem__``, ``__iter__``, ``__len__``" msgstr "``__getitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:157 +#: library/collections.abc.rst:154 msgid "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__ne__``" @@ -317,17 +319,17 @@ msgstr "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__`` et " "``__ne__``" -#: library/collections.abc.rst:161 +#: library/collections.abc.rst:158 msgid ":class:`MutableMapping`" msgstr ":class:`MutableMapping`" -#: library/collections.abc.rst:161 +#: library/collections.abc.rst:158 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:161 +#: library/collections.abc.rst:158 msgid "" "Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " "``update``, and ``setdefault``" @@ -335,115 +337,120 @@ msgstr "" "Méthodes héritées de :class:`Mapping`, et ``pop``, ``popitem``, ``clear``, " "``update`` et ``setdefault``" -#: library/collections.abc.rst:168 +#: library/collections.abc.rst:165 msgid ":class:`MappingView`" msgstr ":class:`MappingView`" -#: library/collections.abc.rst:168 +#: library/collections.abc.rst:165 msgid ":class:`Sized`" msgstr ":class:`Sized`" -#: library/collections.abc.rst:169 +#: library/collections.abc.rst:165 +#, fuzzy +msgid "``__init__``, ``__len__`` and ``__repr__``" +msgstr "``__getitem__``, ``__iter__``, ``__len__``" + +#: library/collections.abc.rst:166 msgid ":class:`ItemsView`" msgstr ":class:`ItemsView`" -#: library/collections.abc.rst:169 library/collections.abc.rst:171 +#: library/collections.abc.rst:166 library/collections.abc.rst:168 msgid ":class:`MappingView`, :class:`Set`" msgstr ":class:`MappingView`, :class:`Set`" -#: library/collections.abc.rst:169 library/collections.abc.rst:171 -#: library/collections.abc.rst:173 +#: library/collections.abc.rst:166 library/collections.abc.rst:168 +#: library/collections.abc.rst:170 msgid "``__contains__``, ``__iter__``" msgstr "``__contains__``, ``__iter__``" -#: library/collections.abc.rst:171 +#: library/collections.abc.rst:168 msgid ":class:`KeysView`" msgstr ":class:`KeysView`" -#: library/collections.abc.rst:173 +#: library/collections.abc.rst:170 msgid ":class:`ValuesView`" msgstr ":class:`ValuesView`" -#: library/collections.abc.rst:173 +#: library/collections.abc.rst:170 msgid ":class:`MappingView`, :class:`Collection`" msgstr ":class:`MappingView`, :class:`Collection`" -#: library/collections.abc.rst:175 +#: library/collections.abc.rst:172 #, fuzzy msgid ":class:`Awaitable` [1]_" msgstr ":class:`Awaitable`" -#: library/collections.abc.rst:175 +#: library/collections.abc.rst:172 msgid "``__await__``" msgstr "``__await__``" -#: library/collections.abc.rst:176 +#: library/collections.abc.rst:173 #, fuzzy msgid ":class:`Coroutine` [1]_" msgstr ":class:`Coroutine`" -#: library/collections.abc.rst:176 +#: library/collections.abc.rst:173 msgid ":class:`Awaitable`" msgstr ":class:`Awaitable`" -#: library/collections.abc.rst:176 +#: library/collections.abc.rst:173 msgid "``close``" msgstr "``close``" -#: library/collections.abc.rst:177 +#: library/collections.abc.rst:174 #, fuzzy msgid ":class:`AsyncIterable` [1]_" msgstr ":class:`AsyncIterable`" -#: library/collections.abc.rst:177 library/collections.abc.rst:178 +#: library/collections.abc.rst:174 library/collections.abc.rst:175 msgid "``__aiter__``" msgstr "``__aiter__``" -#: library/collections.abc.rst:178 +#: library/collections.abc.rst:175 #, fuzzy msgid ":class:`AsyncIterator` [1]_" msgstr ":class:`AsyncIterator`" -#: library/collections.abc.rst:178 +#: library/collections.abc.rst:175 msgid ":class:`AsyncIterable`" msgstr ":class:`AsyncIterable`" -#: library/collections.abc.rst:178 +#: library/collections.abc.rst:175 msgid "``__anext__``" msgstr "``__anext__``" -#: library/collections.abc.rst:179 +#: library/collections.abc.rst:176 #, fuzzy msgid ":class:`AsyncGenerator` [1]_" msgstr ":class:`AsyncGenerator`" -#: library/collections.abc.rst:179 +#: library/collections.abc.rst:176 msgid ":class:`AsyncIterator`" msgstr ":class:`AsyncIterator`" -#: library/collections.abc.rst:179 +#: library/collections.abc.rst:176 msgid "``asend``, ``athrow``" msgstr "``asend``, ``athrow``" -#: library/collections.abc.rst:179 +#: library/collections.abc.rst:176 msgid "``aclose``, ``__aiter__``, ``__anext__``" msgstr "``aclose``, ``__aiter__``, ``__anext__``" -#: library/collections.abc.rst:180 +#: library/collections.abc.rst:177 #, fuzzy msgid ":class:`Buffer` [1]_" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:180 +#: library/collections.abc.rst:177 #, fuzzy msgid "``__buffer__``" msgstr "``__iter__``" -#: library/collections.abc.rst:185 +#: library/collections.abc.rst:182 msgid "Footnotes" msgstr "Notes" -#: library/collections.abc.rst:186 +#: library/collections.abc.rst:183 msgid "" "These ABCs override :meth:`~abc.ABCMeta.__subclasshook__` to support testing " "an interface by verifying the required methods are present and have not been " @@ -451,193 +458,234 @@ msgid "" "interfaces require registration or direct subclassing." msgstr "" -#: library/collections.abc.rst:192 +#: library/collections.abc.rst:189 #, fuzzy msgid "" "Checking ``isinstance(obj, Iterable)`` detects classes that are registered " "as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but " "it does not detect classes that iterate with the :meth:`~object.__getitem__` " -"method. The only reliable way to determine whether an object is :term:" -"`iterable` is to call ``iter(obj)``." +"method. The only reliable way to determine whether an object " +"is :term:`iterable` is to call ``iter(obj)``." msgstr "" "Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont " -"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:" -"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :" -"meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:" -"`itérable ` est d'appeler ``iter(obj)``." +"enregistrées comme :class:`Iterable` ou qui possèdent une " +"méthode :meth:`__iter__`, mais ne détecte pas les classes qui itèrent avec " +"la méthode :meth:`__getitem__`. Le seul moyen fiable de déterminer si un " +"objet est :term:`itérable ` est d'appeler ``iter(obj)``." -#: library/collections.abc.rst:200 +#: library/collections.abc.rst:197 #, fuzzy msgid "Collections Abstract Base Classes -- Detailed Descriptions" msgstr "Classes de base abstraites de collections" -#: library/collections.abc.rst:205 +#: library/collections.abc.rst:202 #, fuzzy msgid "ABC for classes that provide the :meth:`~object.__contains__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__contains__`." -#: library/collections.abc.rst:209 +#: library/collections.abc.rst:206 #, fuzzy msgid "ABC for classes that provide the :meth:`~object.__hash__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__hash__`." -#: library/collections.abc.rst:213 +#: library/collections.abc.rst:210 #, fuzzy msgid "ABC for classes that provide the :meth:`~object.__len__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__len__`." -#: library/collections.abc.rst:217 +#: library/collections.abc.rst:214 #, fuzzy msgid "ABC for classes that provide the :meth:`~object.__call__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__call__`." -#: library/collections.abc.rst:219 +#: library/collections.abc.rst:216 msgid "" "See :ref:`annotating-callables` for details on how to use :class:`!Callable` " "in type annotations." msgstr "" -#: library/collections.abc.rst:224 +#: library/collections.abc.rst:221 #, fuzzy msgid "ABC for classes that provide the :meth:`~container.__iter__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__iter__`." -#: library/collections.abc.rst:226 +#: library/collections.abc.rst:223 #, fuzzy msgid "" "Checking ``isinstance(obj, Iterable)`` detects classes that are registered " "as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but " "it does not detect classes that iterate with the :meth:`~object.__getitem__` " -"method. The only reliable way to determine whether an object is :term:" -"`iterable` is to call ``iter(obj)``." +"method. The only reliable way to determine whether an object " +"is :term:`iterable` is to call ``iter(obj)``." msgstr "" "Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont " -"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:" -"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :" -"meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:" -"`itérable ` est d'appeler ``iter(obj)``." +"enregistrées comme :class:`Iterable` ou qui possèdent une " +"méthode :meth:`__iter__`, mais ne détecte pas les classes qui itèrent avec " +"la méthode :meth:`__getitem__`. Le seul moyen fiable de déterminer si un " +"objet est :term:`itérable ` est d'appeler ``iter(obj)``." -#: library/collections.abc.rst:235 +#: library/collections.abc.rst:232 msgid "ABC for sized iterable container classes." msgstr "ABC pour les classes de conteneurs itérables et *sized*." -#: library/collections.abc.rst:241 +#: library/collections.abc.rst:238 msgid "" -"ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" -"`~iterator.__next__` methods. See also the definition of :term:`iterator`." +"ABC for classes that provide the :meth:`~iterator.__iter__` " +"and :meth:`~iterator.__next__` methods. See also the definition " +"of :term:`iterator`." msgstr "" "ABC pour les classes qui définissent les méthodes :meth:`~iterator.__iter__` " "et :meth:`~iterator.__next__`. Voir aussi la définition d':term:`itérateur " "`." -#: library/collections.abc.rst:247 +#: library/collections.abc.rst:244 #, fuzzy msgid "" "ABC for iterable classes that also provide the :meth:`~object.__reversed__` " "method." msgstr "" -"ABC pour les classes d'itérables qui implémentent également la méthode :meth:" -"`__reversed__`." +"ABC pour les classes d'itérables qui implémentent également la " +"méthode :meth:`__reversed__`." -#: library/collections.abc.rst:254 +#: library/collections.abc.rst:251 #, fuzzy msgid "" -"ABC for :term:`generator` classes that implement the protocol defined in :" -"pep:`342` that extends :term:`iterators ` with the :meth:" -"`~generator.send`, :meth:`~generator.throw` and :meth:`~generator.close` " -"methods." +"ABC for :term:`generator` classes that implement the protocol defined " +"in :pep:`342` that extends :term:`iterators ` with " +"the :meth:`~generator.send`, :meth:`~generator.throw` " +"and :meth:`~generator.close` methods." msgstr "" "ABC pour les classes de générateurs qui implémentent le protocole défini " -"dans la :pep:`342` qui étend les itérateurs avec les méthodes :meth:" -"`~generator.send`, :meth:`~generator.throw` et :meth:`~generator.close`. " -"Voir aussi la définition de :term:`générateur `." +"dans la :pep:`342` qui étend les itérateurs avec les " +"méthodes :meth:`~generator.send`, :meth:`~generator.throw` " +"et :meth:`~generator.close`. Voir aussi la définition de :term:`générateur " +"`." -#: library/collections.abc.rst:259 +#: library/collections.abc.rst:256 msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`!Generator` in type annotations." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`!Generator` in type annotations." msgstr "" -#: library/collections.abc.rst:268 +#: library/collections.abc.rst:265 msgid "ABCs for read-only and mutable :term:`sequences `." msgstr "ABC pour les :term:`séquences ` immuables et mutables." -#: library/collections.abc.rst:270 +#: library/collections.abc.rst:267 #, fuzzy msgid "" -"Implementation note: Some of the mixin methods, such as :meth:`~container." -"__iter__`, :meth:`~object.__reversed__` and :meth:`index`, make repeated " -"calls to the underlying :meth:`~object.__getitem__` method. Consequently, " +"Implementation note: Some of the mixin methods, such " +"as :meth:`~container.__iter__`, :meth:`~object.__reversed__`, " +"and :meth:`~sequence.index` make repeated calls to the " +"underlying :meth:`~object.__getitem__` method. Consequently, " "if :meth:`~object.__getitem__` is implemented with constant access speed, " "the mixin methods will have linear performance; however, if the underlying " "method is linear (as it would be with a linked list), the mixins will have " "quadratic performance and will likely need to be overridden." msgstr "" -"Note pour l'implémentation : quelques méthodes *mixin*, comme :meth:" -"`__iter__`, :meth:`__reversed__` et :meth:`index`, font des appels répétés à " -"la méthode sous-jacente :meth:`__getitem__`. Ainsi, si :meth:`__getitem__` " -"est implémentée avec une vitesse d'accès constante, les méthodes *mixin* " -"auront une performance linéaire ; cependant, si elle est linéaire, les " -"*mixin* auront une performance quadratique, il serait alors judicieux de les " -"surcharger." +"Note pour l'implémentation : quelques méthodes *mixin*, " +"comme :meth:`__iter__`, :meth:`__reversed__` et :meth:`index`, font des " +"appels répétés à la méthode sous-jacente :meth:`__getitem__`. Ainsi, " +"si :meth:`__getitem__` est implémentée avec une vitesse d'accès constante, " +"les méthodes *mixin* auront une performance linéaire ; cependant, si elle " +"est linéaire, les *mixin* auront une performance quadratique, il serait " +"alors judicieux de les surcharger." #: library/collections.abc.rst:279 -msgid "The index() method added support for *stop* and *start* arguments." +msgid "Return first index of *value*." +msgstr "" + +#: library/collections.abc.rst:281 +msgid "Raises :exc:`ValueError` if the value is not present." msgstr "" -"La méthode index() a ajouté le support des arguments *start* et *stop*." #: library/collections.abc.rst:283 msgid "" -"The :class:`ByteString` ABC has been deprecated. For use in typing, prefer a " -"union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`. For " -"use as an ABC, prefer :class:`Sequence` or :class:`collections.abc.Buffer`." +"Supporting the *start* and *stop* arguments is optional, but recommended." +msgstr "" + +#: library/collections.abc.rst:285 +#, fuzzy +msgid "" +"The :meth:`~sequence.index` method gained support for the *stop* and *start* " +"arguments." +msgstr "" +"La méthode index() a ajouté le support des arguments *start* et *stop*." + +#: library/collections.abc.rst:289 +msgid "The :class:`ByteString` ABC has been deprecated." msgstr "" #: library/collections.abc.rst:292 +msgid "" +"Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " +"implements the :ref:`buffer protocol ` at runtime. For use in " +"type annotations, either use :class:`Buffer` or a union that explicitly " +"specifies the types your code supports (e.g., ``bytes | bytearray | " +"memoryview``)." +msgstr "" + +#: library/collections.abc.rst:298 +msgid "" +":class:`!ByteString` was originally intended to be an abstract class that " +"would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " +"However, since the ABC never had any methods, knowing that an object was an " +"instance of :class:`!ByteString` never actually told you anything useful " +"about the object. Other common buffer types such as :class:`memoryview` were " +"also never understood as subtypes of :class:`!ByteString` (either at runtime " +"or by static type checkers)." +msgstr "" + +#: library/collections.abc.rst:306 +msgid "See :pep:`PEP 688 <688#current-options>` for more details." +msgstr "" + +#: library/collections.abc.rst:311 #, fuzzy msgid "ABCs for read-only and mutable :ref:`sets `." msgstr "ABC pour les ensembles immuables et mutables." -#: library/collections.abc.rst:297 +#: library/collections.abc.rst:316 msgid "ABCs for read-only and mutable :term:`mappings `." msgstr "" "ABC pour les :term:`tables de correspondances ` immuables et " "mutables." -#: library/collections.abc.rst:304 +#: library/collections.abc.rst:323 msgid "" "ABCs for mapping, items, keys, and values :term:`views `." msgstr "" "ABC pour les :term:`vues` de *mappings* (tableaux de " "correspondances), d'éléments, de clés et de valeurs." -#: library/collections.abc.rst:308 +#: library/collections.abc.rst:327 #, fuzzy msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " -"expressions. Custom implementations must provide the :meth:`~object." -"__await__` method." +"expressions. Custom implementations must provide " +"the :meth:`~object.__await__` method." msgstr "" "ABC pour les objets :term:`awaitables `, qui peuvent être " "utilisés dans les expressions :keyword:`await`. Les implémentations " "personnalisées doivent définir la méthode :meth:`__await__`." -#: library/collections.abc.rst:312 +#: library/collections.abc.rst:331 msgid "" -":term:`Coroutine ` objects and instances of the :class:" -"`~collections.abc.Coroutine` ABC are all instances of this ABC." +":term:`Coroutine ` objects and instances of " +"the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC." msgstr "" -"Les objets :term:`coroutines ` et les instances de l'ABC :class:" -"`~collections.abc.Coroutine` sont tous des instances de cette ABC." +"Les objets :term:`coroutines ` et les instances de " +"l'ABC :class:`~collections.abc.Coroutine` sont tous des instances de cette " +"ABC." -#: library/collections.abc.rst:316 +#: library/collections.abc.rst:335 #, fuzzy msgid "" "In CPython, generator-based coroutines (:term:`generators ` " -"decorated with :func:`@types.coroutine `) are *awaitables*, " -"even though they do not have an :meth:`~object.__await__` method. Using " -"``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:" -"`inspect.isawaitable` to detect them." +"decorated with :deco:`types.coroutine`) are *awaitables*, even though they " +"do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, " +"Awaitable)`` for them will return ``False``. Use :func:`inspect.isawaitable` " +"to detect them." msgstr "" "En CPython, les coroutines basées sur les générateurs (les générateurs " "décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " @@ -646,30 +694,32 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:326 +#: library/collections.abc.rst:345 #, fuzzy msgid "" "ABC for :term:`coroutine` compatible classes. These implement the following " -"methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" -"`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations " -"must also implement :meth:`~object.__await__`. All :class:`Coroutine` " -"instances are also instances of :class:`Awaitable`." +"methods, defined in :ref:`coroutine-" +"objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, " +"and :meth:`~coroutine.close`. Custom implementations must also " +"implement :meth:`~object.__await__`. All :class:`Coroutine` instances are " +"also instances of :class:`Awaitable`." msgstr "" "ABC pour les classes compatibles avec les coroutines. Elles implémentent les " -"méthodes suivantes, définies dans :ref:`coroutine-objects` : :meth:" -"`~coroutine.send`, :meth:`~coroutine.throw` et :meth:`~coroutine.close`. Les " -"implémentations personnalisées doivent également fournir :meth:`__await__`. " -"Toutes les instances de :class:`Coroutine` sont également des instances de :" -"class:`Awaitable`. Voir aussi la définition de :term:`coroutine`." +"méthodes suivantes, définies dans :ref:`coroutine-" +"objects` : :meth:`~coroutine.send`, :meth:`~coroutine.throw` " +"et :meth:`~coroutine.close`. Les implémentations personnalisées doivent " +"également fournir :meth:`__await__`. Toutes les instances " +"de :class:`Coroutine` sont également des instances de :class:`Awaitable`. " +"Voir aussi la définition de :term:`coroutine`." -#: library/collections.abc.rst:334 +#: library/collections.abc.rst:353 #, fuzzy msgid "" "In CPython, generator-based coroutines (:term:`generators ` " -"decorated with :func:`@types.coroutine `) are *awaitables*, " -"even though they do not have an :meth:`~object.__await__` method. Using " -"``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:" -"`inspect.isawaitable` to detect them." +"decorated with :deco:`types.coroutine`) are *awaitables*, even though they " +"do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, " +"Coroutine)`` for them will return ``False``. Use :func:`inspect.isawaitable` " +"to detect them." msgstr "" "En CPython, les coroutines basées sur les générateurs (les générateurs " "décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " @@ -678,14 +728,14 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:340 +#: library/collections.abc.rst:359 msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`!Coroutine` in type annotations. The variance and order of type parameters " -"correspond to those of :class:`Generator`." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`!Coroutine` in type annotations. The variance and order of " +"type parameters correspond to those of :class:`Generator`." msgstr "" -#: library/collections.abc.rst:349 +#: library/collections.abc.rst:368 #, fuzzy msgid "" "ABC for classes that provide an ``__aiter__`` method. See also the " @@ -694,7 +744,7 @@ msgstr "" "ABC pour les classes qui définissent la méthode ``__aiter__``. Voir aussi la " "définition d':term:`itérable asynchrone `." -#: library/collections.abc.rst:356 +#: library/collections.abc.rst:375 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." @@ -703,7 +753,7 @@ msgstr "" "``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone " "`." -#: library/collections.abc.rst:363 +#: library/collections.abc.rst:382 #, fuzzy msgid "" "ABC for :term:`asynchronous generator` classes that implement the protocol " @@ -712,23 +762,23 @@ msgstr "" "ABC pour les classes de générateurs asynchrones qui implémentent le " "protocole défini dans la :pep:`525` et dans la :pep:`492`." -#: library/collections.abc.rst:366 +#: library/collections.abc.rst:385 msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`!AsyncGenerator` in type annotations." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`!AsyncGenerator` in type annotations." msgstr "" -#: library/collections.abc.rst:373 +#: library/collections.abc.rst:392 msgid "" "ABC for classes that provide the :meth:`~object.__buffer__` method, " "implementing the :ref:`buffer protocol `. See :pep:`688`." msgstr "" -#: library/collections.abc.rst:379 +#: library/collections.abc.rst:398 msgid "Examples and Recipes" msgstr "Exemples et recettes" -#: library/collections.abc.rst:381 +#: library/collections.abc.rst:400 #, fuzzy msgid "" "ABCs allow us to ask classes or instances if they provide particular " @@ -737,55 +787,57 @@ msgstr "" "Ces ABC permettent de demander à des classes ou à des instances si elles " "fournissent des fonctionnalités particulières, par exemple ::" -#: library/collections.abc.rst:388 +#: library/collections.abc.rst:407 #, fuzzy msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " "classes supporting container APIs. For example, to write a class supporting " "the full :class:`Set` API, it is only necessary to supply the three " -"underlying abstract methods: :meth:`~object.__contains__`, :meth:`~container." -"__iter__`, and :meth:`~object.__len__`. The ABC supplies the remaining " -"methods such as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`::" +"underlying abstract " +"methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, " +"and :meth:`~object.__len__`. The ABC supplies the remaining methods such " +"as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`::" msgstr "" "Une partie des ABC sont également utiles en tant que *mixins* : cela rend " "plus facile le développement de classes qui gèrent des API de conteneurs. " "Par exemple, pour écrire une classe qui gère l'API entière de :class:`Set`, " "il est uniquement nécessaire de fournir les trois méthodes sous-jacentes " "abstraites :meth:`__contains__`, :meth:`__iter__` et :meth:`__len__`. L'ABC " -"apporte les méthodes restantes, comme :meth:`__and__` et :meth:" -"`isdisjoint` ::" +"apporte les méthodes restantes, comme :meth:`__and__` " +"et :meth:`isdisjoint` ::" -#: library/collections.abc.rst:417 +#: library/collections.abc.rst:436 msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgstr "" "Notes à propos de l'utilisation de :class:`Set` et :class:`MutableSet` comme " "*mixin* :" -#: library/collections.abc.rst:420 +#: library/collections.abc.rst:439 #, fuzzy msgid "" "Since some set operations create new sets, the default mixin methods need a " "way to create new instances from an :term:`iterable`. The class constructor " "is assumed to have a signature in the form ``ClassName(iterable)``. That " -"assumption is factored-out to an internal :class:`classmethod` called :meth:" -"`!_from_iterable` which calls ``cls(iterable)`` to produce a new set. If " -"the :class:`Set` mixin is being used in a class with a different constructor " -"signature, you will need to override :meth:`!_from_iterable` with a " -"classmethod or regular method that can construct new instances from an " -"iterable argument." +"assumption is factored-out to an internal :class:`classmethod` " +"called :meth:`!_from_iterable` which calls ``cls(iterable)`` to produce a " +"new set. If the :class:`Set` mixin is being used in a class with a different " +"constructor signature, you will need to override :meth:`!_from_iterable` " +"with a classmethod or regular method that can construct new instances from " +"an iterable argument." msgstr "" "Comme une partie des opérations sur les ensembles créent de nouveaux " "ensembles, les méthodes *mixins* par défaut ont besoin d'un moyen de créer " "de nouvelles instances à partir d'un itérable. Le constructeur de classe est " "supposé avoir une signature de la forme ``ClassName(iterable)``. Cette " -"supposition est faite par une méthode de classe interne appelée :meth:" -"`_from_iterable` qui appelle ``cls(iterable)`` pour construire un nouvel " -"ensemble. Si le :class:`Set` *mixin* est utilisé dans une classe avec un " -"constructeur de signature différente, vous devez surcharger :meth:" -"`_from_iterable` avec une méthode de classe ou une méthode ordinaire qui " -"peut construire de nouvelles instances à partir d'un argument itérable." +"supposition est faite par une méthode de classe interne " +"appelée :meth:`_from_iterable` qui appelle ``cls(iterable)`` pour construire " +"un nouvel ensemble. Si le :class:`Set` *mixin* est utilisé dans une classe " +"avec un constructeur de signature différente, vous devez " +"surcharger :meth:`_from_iterable` avec une méthode de classe ou une méthode " +"ordinaire qui peut construire de nouvelles instances à partir d'un argument " +"itérable." -#: library/collections.abc.rst:431 +#: library/collections.abc.rst:450 #, fuzzy msgid "" "To override the comparisons (presumably for speed, as the semantics are " @@ -796,7 +848,7 @@ msgstr "" "sémantique est fixe), il faut redéfinir :meth:`__le__` et :meth:`__ge__`, " "puis les autres opérations seront automatiquement adaptées." -#: library/collections.abc.rst:437 +#: library/collections.abc.rst:456 #, fuzzy msgid "" "The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash " @@ -808,10 +860,11 @@ msgstr "" "La classe *mixin* :class:`Set` apporte une méthode :meth:`_hash` pour " "calculer une valeur de hachage pour l'ensemble ; cependant :meth:`__hash__` " "n'est pas défini car tous les ensembles ne sont pas hachables ou immuables. " -"Pour rendre un ensemble hachable en utilisant les *mixins*, héritez de :meth:" -"`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = Set._hash``." +"Pour rendre un ensemble hachable en utilisant les *mixins*, héritez " +"de :meth:`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = " +"Set._hash``." -#: library/collections.abc.rst:445 +#: library/collections.abc.rst:464 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." @@ -819,15 +872,17 @@ msgstr "" "`OrderedSet recipe `_ pour un " "exemple construit sur :class:`MutableSet`." -#: library/collections.abc.rst:448 +#: library/collections.abc.rst:467 msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgstr "" -"Pour plus d'informations à propos des ABC, voir le module :mod:`abc` et la :" -"pep:`3119`." +"Pour plus d'informations à propos des ABC, voir le module :mod:`abc` et " +"la :pep:`3119`." #~ msgid "" -#~ "ABCs for classes that provide respectively the methods :meth:" -#~ "`__contains__`, :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`." +#~ "ABCs for classes that provide respectively the " +#~ "methods :meth:`__contains__`, :meth:`__hash__`, :meth:`__len__`, " +#~ "and :meth:`__call__`." #~ msgstr "" -#~ "ABC pour les classes qui définissent respectivement les méthodes :meth:" -#~ "`__contains__`, :meth:`__hash__`, :meth:`__len__` et :meth:`__call__`." +#~ "ABC pour les classes qui définissent respectivement les " +#~ "méthodes :meth:`__contains__`, :meth:`__hash__`, :meth:`__len__` " +#~ "et :meth:`__call__`." diff --git a/library/collections.po b/library/collections.po index ea6f252c6..125cc4321 100644 --- a/library/collections.po +++ b/library/collections.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 20:46+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -21,113 +21,113 @@ msgstr "" msgid ":mod:`!collections` --- Container datatypes" msgstr ":mod:`collections` — Types de données de conteneurs" -#: library/collections.rst:10 +#: library/collections.rst:7 msgid "**Source code:** :source:`Lib/collections/__init__.py`" msgstr "**Code source :** :source:`Lib/collections/__init__.py`" -#: library/collections.rst:20 +#: library/collections.rst:17 msgid "" "This module implements specialized container datatypes providing " -"alternatives to Python's general purpose built-in containers, :class:" -"`dict`, :class:`list`, :class:`set`, and :class:`tuple`." +"alternatives to Python's general purpose built-in " +"containers, :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple`." msgstr "" "Ce module implémente des types de données de conteneurs spécialisés qui " -"apportent des alternatives aux conteneurs natifs de Python plus généraux :" -"class:`dict`, :class:`list`, :class:`set` et :class:`tuple`." +"apportent des alternatives aux conteneurs natifs de Python plus " +"généraux :class:`dict`, :class:`list`, :class:`set` et :class:`tuple`." -#: library/collections.rst:25 +#: library/collections.rst:22 msgid ":func:`namedtuple`" msgstr ":func:`namedtuple`" -#: library/collections.rst:25 +#: library/collections.rst:22 msgid "factory function for creating tuple subclasses with named fields" msgstr "" "fonction permettant de créer des sous-classes de ``tuple`` avec des champs " "nommés" -#: library/collections.rst:26 +#: library/collections.rst:23 msgid ":class:`deque`" msgstr ":class:`deque`" -#: library/collections.rst:26 +#: library/collections.rst:23 msgid "list-like container with fast appends and pops on either end" msgstr "" "conteneur se comportant comme une liste avec des ajouts et retraits rapides " "à chaque extrémité" -#: library/collections.rst:27 +#: library/collections.rst:24 msgid ":class:`ChainMap`" msgstr ":class:`ChainMap`" -#: library/collections.rst:27 +#: library/collections.rst:24 msgid "dict-like class for creating a single view of multiple mappings" msgstr "" "classe semblable aux dictionnaires qui crée une unique vue à partir de " "plusieurs dictionnaires" -#: library/collections.rst:28 +#: library/collections.rst:25 msgid ":class:`Counter`" msgstr ":class:`Counter`" -#: library/collections.rst:28 +#: library/collections.rst:25 #, fuzzy msgid "dict subclass for counting :term:`hashable` objects" msgstr "sous-classe de ``dict`` pour compter des objets hachables" -#: library/collections.rst:29 +#: library/collections.rst:26 msgid ":class:`OrderedDict`" msgstr ":class:`OrderedDict`" -#: library/collections.rst:29 +#: library/collections.rst:26 msgid "dict subclass that remembers the order entries were added" msgstr "" "sous-classe de ``dict`` qui garde en mémoire l'ordre dans lequel les entrées " "ont été ajoutées" -#: library/collections.rst:30 +#: library/collections.rst:27 msgid ":class:`defaultdict`" msgstr ":class:`defaultdict`" -#: library/collections.rst:30 +#: library/collections.rst:27 msgid "dict subclass that calls a factory function to supply missing values" msgstr "" "sous-classe de ``dict`` qui appelle une fonction de fabrication en cas de " "valeur manquante" -#: library/collections.rst:31 +#: library/collections.rst:28 msgid ":class:`UserDict`" msgstr ":class:`UserDict`" -#: library/collections.rst:31 +#: library/collections.rst:28 msgid "wrapper around dictionary objects for easier dict subclassing" msgstr "" "surcouche autour des objets dictionnaires pour faciliter l'héritage de " "``dict``" -#: library/collections.rst:32 +#: library/collections.rst:29 msgid ":class:`UserList`" msgstr ":class:`UserList`" -#: library/collections.rst:32 +#: library/collections.rst:29 msgid "wrapper around list objects for easier list subclassing" msgstr "" "surcouche autour des objets listes pour faciliter l'héritage de ``list``" -#: library/collections.rst:33 +#: library/collections.rst:30 msgid ":class:`UserString`" msgstr ":class:`UserString`" -#: library/collections.rst:33 +#: library/collections.rst:30 msgid "wrapper around string objects for easier string subclassing" msgstr "" "surcouche autour des objets chaînes de caractères pour faciliter l'héritage " "de ``str``" -#: library/collections.rst:38 +#: library/collections.rst:35 msgid ":class:`ChainMap` objects" msgstr "Objets :class:`ChainMap`" -#: library/collections.rst:42 +#: library/collections.rst:39 msgid "" "A :class:`ChainMap` class is provided for quickly linking a number of " "mappings so they can be treated as a single unit. It is often much faster " @@ -136,17 +136,17 @@ msgid "" msgstr "" "Le module fournit une classe :class:`ChainMap` afin de réunir rapidement " "plusieurs dictionnaires en une unique entité. Cela est souvent plus rapide " -"que de créer un nouveau dictionnaire et d'effectuer plusieurs appels de :" -"meth:`~dict.update`." +"que de créer un nouveau dictionnaire et d'effectuer plusieurs appels " +"de :meth:`~dict.update`." -#: library/collections.rst:46 +#: library/collections.rst:43 msgid "" "The class can be used to simulate nested scopes and is useful in templating." msgstr "" "Cette classe peut être utilisée pour simuler des portées imbriquées, elle " "est aussi utile pour le *templating*." -#: library/collections.rst:50 +#: library/collections.rst:47 msgid "" "A :class:`ChainMap` groups multiple dicts or other mappings together to " "create a single, updateable view. If no *maps* are specified, a single " @@ -158,7 +158,7 @@ msgstr "" "paramètre *maps* est vide, un dictionnaire vide est fourni de telle manière " "qu'une nouvelle chaîne possède toujours au moins un dictionnaire." -#: library/collections.rst:54 +#: library/collections.rst:51 msgid "" "The underlying mappings are stored in a list. That list is public and can " "be accessed or updated using the *maps* attribute. There is no other state." @@ -167,7 +167,7 @@ msgstr "" "publique et peut être consultée ou mise à jour via l'attribut *maps*. Il n'y " "a pas d'autre état." -#: library/collections.rst:57 +#: library/collections.rst:54 msgid "" "Lookups search the underlying mappings successively until a key is found. " "In contrast, writes, updates, and deletions only operate on the first " @@ -177,7 +177,7 @@ msgstr "" "la première clé correspondante. En revanche, les écritures, mises à jour et " "suppressions n'affectent que le premier dictionnaire." -#: library/collections.rst:60 +#: library/collections.rst:57 msgid "" "A :class:`ChainMap` incorporates the underlying mappings by reference. So, " "if one of the underlying mappings gets updated, those changes will be " @@ -187,7 +187,7 @@ msgstr "" "référence. Ainsi, si l'un d'eux est modifié, les changements affectent " "également la :class:`ChainMap`." -#: library/collections.rst:64 +#: library/collections.rst:61 msgid "" "All of the usual dictionary methods are supported. In addition, there is a " "*maps* attribute, a method for creating new subcontexts, and a property for " @@ -198,7 +198,7 @@ msgstr "" "contextes et une propriété pour accéder à tous les dictionnaires sous-" "jacents excepté le premier :" -#: library/collections.rst:70 +#: library/collections.rst:67 msgid "" "A user updateable list of mappings. The list is ordered from first-searched " "to last-searched. It is the only stored state and can be modified to change " @@ -210,7 +210,7 @@ msgstr "" "pour changer l'ordre de recherche. La liste doit toujours contenir au moins " "un dictionnaire." -#: library/collections.rst:77 +#: library/collections.rst:74 msgid "" "Returns a new :class:`ChainMap` containing a new map followed by all of the " "maps in the current instance. If ``m`` is specified, it becomes the new map " @@ -230,32 +230,33 @@ msgstr "" "être mis à jour sans altérer les valeurs dans les dictionnaires parents." # Pas de majuscule car suit deux points. -#: library/collections.rst:86 +#: library/collections.rst:83 msgid "The optional ``m`` parameter was added." msgstr "ajout du paramètre optionnel ``m``." -#: library/collections.rst:89 +#: library/collections.rst:86 msgid "Keyword arguments support was added." msgstr "prise en charge des arguments par mot-clé." -#: library/collections.rst:94 +#: library/collections.rst:91 msgid "" "Property returning a new :class:`ChainMap` containing all of the maps in the " "current instance except the first one. This is useful for skipping the " -"first map in the search. Use cases are similar to those for the :keyword:" -"`nonlocal` keyword used in :term:`nested scopes `. The use " -"cases also parallel those for the built-in :func:`super` function. A " -"reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``." +"first map in the search. Use cases are similar to those for " +"the :keyword:`nonlocal` keyword used in :term:`nested scopes `. The use cases also parallel those for the built-in :func:`super` " +"function. A reference to ``d.parents`` is equivalent to: " +"``ChainMap(*d.maps[1:])``." msgstr "" "Propriété qui renvoie un nouvel objet :class:`ChainMap` contenant tous les " "dictionnaires de l'instance actuelle hormis le premier. Cette propriété est " "utile pour ignorer le premier dictionnaire dans les recherches ; son " -"utilisation rappelle le mot-clé :keyword:`nonlocal` (utilisé pour les :term:" -"`portées imbriquées `), ou bien la fonction native :func:" -"`super`. Une référence à ``d.parents`` est équivalente à : ``ChainMap(*d." -"maps[1:])``." +"utilisation rappelle le mot-clé :keyword:`nonlocal` (utilisé pour " +"les :term:`portées imbriquées `), ou bien la fonction " +"native :func:`super`. Une référence à ``d.parents`` est équivalente à : " +"``ChainMap(*d.maps[1:])``." -#: library/collections.rst:102 +#: library/collections.rst:99 #, fuzzy msgid "" "Note, the iteration order of a :class:`ChainMap` is determined by scanning " @@ -264,7 +265,7 @@ msgstr "" "Notez que l'itération de :class:`ChainMap()` se fait en parcourant les " "tableaux de correspondances du dernier jusqu'au premier ::" -#: library/collections.rst:110 +#: library/collections.rst:107 msgid "" "This gives the same ordering as a series of :meth:`dict.update` calls " "starting with the last mapping::" @@ -272,13 +273,13 @@ msgstr "" "Cela produit le même ordre qu'une suite d'appels à :meth:`dict.update` en " "commençant par le dernier tableau de correspondances ::" -#: library/collections.rst:118 +#: library/collections.rst:115 msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." msgstr "" -"Ajout de la gestion des opérateurs ``|`` et ``|=`` tels que définis dans :" -"pep:`584`." +"Ajout de la gestion des opérateurs ``|`` et ``|=`` tels que définis " +"dans :pep:`584`." -#: library/collections.rst:123 +#: library/collections.rst:120 msgid "" "The `MultiContext class `_ in the Enthought `CodeTools package " @@ -290,22 +291,22 @@ msgstr "" "github.com/enthought/codetools>`_ d'Enthought possède des options pour gérer " "l'écriture dans n'importe quel dictionnaire de la chaîne." -#: library/collections.rst:129 +#: library/collections.rst:126 msgid "" "Django's `Context class `_ for templating is a read-only chain of mappings. It " -"also features pushing and popping of contexts similar to the :meth:" -"`~collections.ChainMap.new_child` method and the :attr:`~collections." -"ChainMap.parents` property." +"also features pushing and popping of contexts similar to " +"the :meth:`~collections.ChainMap.new_child` method and " +"the :attr:`~collections.ChainMap.parents` property." msgstr "" "La `classe de contexte de Django `_ pour la création de modèles est une chaîne de " "dictionnaires en lecture seule. Elle comporte également des fonctionnalités " -"d'ajouts et de retraits de contextes similaires à la méthode :meth:" -"`~collections.ChainMap.new_child` et à la propriété :attr:`~collections." -"ChainMap.parents`." +"d'ajouts et de retraits de contextes similaires à la " +"méthode :meth:`~collections.ChainMap.new_child` et à la " +"propriété :attr:`~collections.ChainMap.parents`." -#: library/collections.rst:136 +#: library/collections.rst:133 #, fuzzy msgid "" "The `Nested Contexts recipe `_." +"A `greatly simplified read-only version of Chainmap `_." msgstr "" "Une `version grandement simplifiée de Chainmap en lecture seule `_." -#: library/collections.rst:146 +#: library/collections.rst:143 msgid ":class:`ChainMap` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`ChainMap`" -#: library/collections.rst:148 +#: library/collections.rst:145 msgid "This section shows various approaches to working with chained maps." msgstr "" "Cette partie montre diverses approches afin de travailler avec les " "dictionnaires chaînés." -#: library/collections.rst:151 +#: library/collections.rst:148 msgid "Example of simulating Python's internal lookup chain::" msgstr "Exemple 1 : simulation de la chaîne de recherche interne de Python ::" -#: library/collections.rst:156 +#: library/collections.rst:153 msgid "" "Example of letting user specified command-line arguments take precedence " "over environment variables which in turn take precedence over default " @@ -349,15 +350,15 @@ msgstr "" "Exemple 2 : spécification d'une hiérarchie pour les options : ligne de " "commande, variable d'environnement, valeurs par défaut ::" -#: library/collections.rst:173 +#: library/collections.rst:170 msgid "" "Example patterns for using the :class:`ChainMap` class to simulate nested " "contexts::" msgstr "" -"Exemple 3 : modèles pour simuler des contextes imbriqués avec la classe :" -"class:`ChainMap` ::" +"Exemple 3 : modèles pour simuler des contextes imbriqués avec la " +"classe :class:`ChainMap` ::" -#: library/collections.rst:192 +#: library/collections.rst:189 msgid "" "The :class:`ChainMap` class only makes updates (writes and deletions) to the " "first mapping in the chain while lookups will search the full chain. " @@ -370,11 +371,11 @@ msgstr "" "profondeur, on peut facilement faire une sous-classe qui met à jour les clés " "trouvées de la chaîne en profondeur ::" -#: library/collections.rst:223 +#: library/collections.rst:220 msgid ":class:`Counter` objects" msgstr "Objets :class:`Counter`" -#: library/collections.rst:225 +#: library/collections.rst:222 msgid "" "A counter tool is provided to support convenient and rapid tallies. For " "example::" @@ -382,7 +383,7 @@ msgstr "" "Ce module fournit un outil pour effectuer rapidement et facilement des " "dénombrements. Par exemple ::" -#: library/collections.rst:245 +#: library/collections.rst:244 #, fuzzy msgid "" "A :class:`Counter` is a :class:`dict` subclass for counting :term:`hashable` " @@ -398,7 +399,7 @@ msgstr "" "entiers relatifs (positifs, négatifs ou nuls). La classe :class:`Counter` " "est similaire aux sacs ou aux multiensembles dans d'autres langages." -#: library/collections.rst:251 +#: library/collections.rst:250 msgid "" "Elements are counted from an *iterable* or initialized from another " "*mapping* (or counter):" @@ -406,7 +407,7 @@ msgstr "" "Les éléments sont comptés à partir d'un itérable ou initialisés à partir " "d'un autre dictionnaire (ou compteur) :" -#: library/collections.rst:259 +#: library/collections.rst:258 msgid "" "Counter objects have a dictionary interface except that they return a zero " "count for missing items instead of raising a :exc:`KeyError`:" @@ -415,7 +416,7 @@ msgstr "" "qu'ils renvoient zéro au lieu de lever une exception :exc:`KeyError` pour " "des éléments manquants :" -#: library/collections.rst:266 +#: library/collections.rst:265 msgid "" "Setting a count to zero does not remove an element from a counter. Use " "``del`` to remove it entirely:" @@ -423,7 +424,7 @@ msgstr "" "Mettre un comptage à zéro pour un élément ne le retire pas de l'objet " "Counter. Il faut utiliser ``del`` pour le supprimer complètement :" -#: library/collections.rst:274 +#: library/collections.rst:273 #, fuzzy msgid "" "As a :class:`dict` subclass, :class:`Counter` inherited the capability to " @@ -438,7 +439,7 @@ msgstr "" "ordonnés d'abord en fonction de la recherche d'apparition pour l'opérande de " "gauche, puis dans l'ordre d'apparition de l'opérande de droite." -#: library/collections.rst:280 +#: library/collections.rst:279 #, fuzzy msgid "" "Counter objects support additional methods beyond those available for all " @@ -447,7 +448,7 @@ msgstr "" "En plus des méthodes disponibles pour tous les dictionnaires, les objets " "compteurs gèrent trois méthodes supplémentaires :" -#: library/collections.rst:285 +#: library/collections.rst:284 msgid "" "Return an iterator over elements repeating each as many times as its count. " "Elements are returned in the order first encountered. If an element's count " @@ -458,7 +459,7 @@ msgstr "" "lequel ils sont rencontrés pour la première fois. Si le comptage d'un " "élément est strictement inférieur à 1, alors :meth:`elements` l'ignore." -#: library/collections.rst:295 +#: library/collections.rst:294 msgid "" "Return a list of the *n* most common elements and their counts from the most " "common to the least. If *n* is omitted or ``None``, :meth:`most_common` " @@ -471,37 +472,38 @@ msgstr "" "éléments qui ont le même nombre d'occurrences sont ordonnés par l'ordre " "selon lequel ils ont été rencontrés pour la première fois :" -#: library/collections.rst:305 +#: library/collections.rst:306 msgid "" "Elements are subtracted from an *iterable* or from another *mapping* (or " "counter). Like :meth:`dict.update` but subtracts counts instead of " "replacing them. Both inputs and outputs may be zero or negative." msgstr "" "Les éléments sont soustraits à partir d'un itérable ou d'un autre " -"dictionnaire (ou compteur). Cette méthode se comporte comme :meth:`dict." -"update` mais soustrait les nombres d'occurrences au lieu de les remplacer. " -"Les entrées et sorties peuvent être négatives ou nulles." +"dictionnaire (ou compteur). Cette méthode se comporte " +"comme :meth:`dict.update` mais soustrait les nombres d'occurrences au lieu " +"de les remplacer. Les entrées et sorties peuvent être négatives ou nulles." -#: library/collections.rst:319 +#: library/collections.rst:320 msgid "Compute the sum of the counts." msgstr "Calcule la somme totale des nombres d'occurrences." -#: library/collections.rst:327 +#: library/collections.rst:328 +#, fuzzy msgid "" "The usual dictionary methods are available for :class:`Counter` objects " -"except for two which work differently for counters." +"except for these two which work differently for counters:" msgstr "" -"Les méthodes usuelles des dictionnaires sont disponibles pour les objets :" -"class:`Counter` à l'exception de deux méthodes qui fonctionnent différemment " -"pour les compteurs." +"Les méthodes usuelles des dictionnaires sont disponibles pour les " +"objets :class:`Counter` à l'exception de deux méthodes qui fonctionnent " +"différemment pour les compteurs." -#: library/collections.rst:332 +#: library/collections.rst:333 msgid "This class method is not implemented for :class:`Counter` objects." msgstr "" -"Cette méthode de classe n'est pas implémentée pour les objets :class:" -"`Counter`." +"Cette méthode de classe n'est pas implémentée pour les " +"objets :class:`Counter`." -#: library/collections.rst:336 +#: library/collections.rst:339 msgid "" "Elements are counted from an *iterable* or added-in from another *mapping* " "(or counter). Like :meth:`dict.update` but adds counts instead of replacing " @@ -509,12 +511,12 @@ msgid "" "sequence of ``(key, value)`` pairs." msgstr "" "Les éléments sont comptés à partir d'un itérable ou ajoutés d'un autre " -"dictionnaire (ou compteur). Cette méthode se comporte comme :meth:`dict." -"update` mais additionne les nombres d'occurrences au lieu de les remplacer. " -"De plus, l'itérable doit être une séquence d'éléments et non une séquence de " -"paires ``(clé, valeur)``." +"dictionnaire (ou compteur). Cette méthode se comporte " +"comme :meth:`dict.update` mais additionne les nombres d'occurrences au lieu " +"de les remplacer. De plus, l'itérable doit être une séquence d'éléments et " +"non une séquence de paires ``(clé, valeur)``." -#: library/collections.rst:341 +#: library/collections.rst:344 msgid "" "Counters support rich comparison operators for equality, subset, and " "superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of " @@ -527,11 +529,11 @@ msgstr "" "``>=``. Les éléments dont le nombre d'occurrences est à zéro sont ignorés. " "Par exemple, on a ``Counter(a=1) == Counter(a=1, b=0)``." -#: library/collections.rst:346 +#: library/collections.rst:349 msgid "Rich comparison operations were added." msgstr "ajout des comparaisons riches." -#: library/collections.rst:349 +#: library/collections.rst:352 msgid "" "In equality tests, missing elements are treated as having zero counts. " "Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered " @@ -541,24 +543,26 @@ msgstr "" "dans les tests d'égalité. On avait auparavant ``Counter(a=3) != Counter(a=3, " "b=0)``." -#: library/collections.rst:354 +#: library/collections.rst:357 msgid "Common patterns for working with :class:`Counter` objects::" msgstr "Opérations usuelles sur les objets :class:`Counter` ::" -#: library/collections.rst:366 +#: library/collections.rst:369 #, fuzzy msgid "" "Several mathematical operations are provided for combining :class:`Counter` " "objects to produce multisets (counters that have counts greater than zero). " "Addition and subtraction combine counters by adding or subtracting the " "counts of corresponding elements. Intersection and union return the minimum " -"and maximum of corresponding counts. Equality and inclusion compare " -"corresponding counts. Each operation can accept inputs with signed counts, " -"but the output will exclude results with counts of zero or less." -msgstr "" -"Quelques opérations mathématiques sont fournies pour combiner des objets :" -"class:`Counter` afin de créer des multiensembles (des compteurs dont les " -"dénombrements des éléments sont strictement supérieurs à zéro). Les " +"and maximum of corresponding counts. Symmetric difference returns the " +"difference between the maximum and minimum of the corresponding counts. " +"Equality and inclusion compare corresponding counts. Each operation can " +"accept inputs with signed counts, but the output will exclude results with " +"counts of zero or below." +msgstr "" +"Quelques opérations mathématiques sont fournies pour combiner des " +"objets :class:`Counter` afin de créer des multiensembles (des compteurs dont " +"les dénombrements des éléments sont strictement supérieurs à zéro). Les " "additions et soustractions combinent les compteurs en ajoutant ou " "retranchant les nombres d'occurrences des éléments correspondants. Les " "intersections et unions renvoient les minimums et maximums des comptages " @@ -566,7 +570,7 @@ msgstr "" "comptages relatifs, mais la sortie exclut les résultats avec des comptages " "négatifs ou nuls." -#: library/collections.rst:391 +#: library/collections.rst:398 msgid "" "Unary addition and subtraction are shortcuts for adding an empty counter or " "subtracting from an empty counter." @@ -575,14 +579,22 @@ msgstr "" "raccourcis pour respectivement additionner un compteur avec un compteur vide " "ou et pour retrancher un compteur d'un compteur vide." -#: library/collections.rst:400 +#: library/collections.rst:407 msgid "" "Added support for unary plus, unary minus, and in-place multiset operations." msgstr "" "Ajout de la gestion des additions et soustractions unaires, et des " "remplacements dans les multiensembles." -#: library/collections.rst:405 +#: library/collections.rst:410 +#, fuzzy +msgid "" +"Added support for the symmetric difference multiset operation, ``c ^ d``." +msgstr "" +"Ajout de la gestion des additions et soustractions unaires, et des " +"remplacements dans les multiensembles." + +#: library/collections.rst:415 msgid "" "Counters were primarily designed to work with positive integers to represent " "running counts; however, care was taken to not unnecessarily preclude use " @@ -595,7 +607,7 @@ msgstr "" "n'ont pas été écartés. Pour vous aider dans ces cas particuliers, cette " "section documente la plage minimale et les restrictions de type." -#: library/collections.rst:410 +#: library/collections.rst:420 msgid "" "The :class:`Counter` class itself is a dictionary subclass with no " "restrictions on its keys and values. The values are intended to be numbers " @@ -606,7 +618,7 @@ msgstr "" "vocation à être des nombres représentants des comptages, mais il est " "*possible* de stocker n'importe quel type de valeur." -#: library/collections.rst:414 +#: library/collections.rst:424 msgid "" "The :meth:`~Counter.most_common` method requires only that the values be " "orderable." @@ -614,13 +626,13 @@ msgstr "" "La méthode :meth:`~Counter.most_common` exige uniquement que les valeurs " "soient ordonnables." -#: library/collections.rst:416 +#: library/collections.rst:426 msgid "" "For in-place operations such as ``c[key] += 1``, the value type need only " "support addition and subtraction. So fractions, floats, and decimals would " -"work and negative values are supported. The same is also true for :meth:" -"`~Counter.update` and :meth:`~Counter.subtract` which allow negative and " -"zero values for both inputs and outputs." +"work and negative values are supported. The same is also true " +"for :meth:`~Counter.update` and :meth:`~Counter.subtract` which allow " +"negative and zero values for both inputs and outputs." msgstr "" "Les opérations de remplacement telles que ``c[key] += 1`` exigent une valeur " "dont le type gère l'addition et la soustraction. Cela inclut donc les " @@ -628,7 +640,7 @@ msgstr "" "même pour :meth:`~Counter.update` et :meth:`~Cointer.substract` qui " "acceptent des valeurs négatives ou nulles dans les entrées et sorties." -#: library/collections.rst:422 +#: library/collections.rst:432 msgid "" "The multiset methods are designed only for use cases with positive values. " "The inputs may be negative or zero, but only outputs with positive values " @@ -641,7 +653,7 @@ msgstr "" "positives sont créées. Il n'y a pas de restriction de type, mais les types " "des valeurs doivent gérer l'addition, la soustraction et la comparaison." -#: library/collections.rst:427 +#: library/collections.rst:437 msgid "" "The :meth:`~Counter.elements` method requires integer counts. It ignores " "zero and negative counts." @@ -649,31 +661,32 @@ msgstr "" "La méthode :meth:`~Counter.elements` exige des valeurs entières et ignore " "les valeurs négatives ou nulles." -#: library/collections.rst:432 +#: library/collections.rst:442 msgid "" -"`Bag class `_ in Smalltalk." +"`Bag class `_ in Smalltalk." msgstr "" -"`Bag class `_ dans Smalltalk." +"`Bag class `_ dans Smalltalk." -#: library/collections.rst:435 +#: library/collections.rst:445 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" "L'article Wikipédia sur les `multiensembles `_ sur Wikipédia (ou `l'article en anglais `_)." +"Multiensemble>`_ sur Wikipédia (ou `l'article en anglais `_)." -#: library/collections.rst:437 +#: library/collections.rst:447 msgid "" "`C++ multisets `_ tutorial with examples." msgstr "" -"Des guides et exemples à propos des `multiensembles en C++ `_." +"Des guides et exemples à propos des `multiensembles en C++ `_." -#: library/collections.rst:440 +#: library/collections.rst:450 msgid "" "For mathematical operations on multisets and their use cases, see *Knuth, " "Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " @@ -683,30 +696,30 @@ msgstr "" "applications, voir *Knuth, Donald. The Art of Computer Programming Volume " "II, Section 4.6.3, Exercise 19*." -#: library/collections.rst:444 +#: library/collections.rst:454 msgid "" "To enumerate all distinct multisets of a given size over a given set of " "elements, see :func:`itertools.combinations_with_replacement`::" msgstr "" "Pour lister tous les multiensembles distincts de même taille parmi un " -"ensemble donné d'éléments, voir :func:`itertools." -"combinations_with_replacement` ::" +"ensemble donné d'éléments, " +"voir :func:`itertools.combinations_with_replacement` ::" -#: library/collections.rst:451 +#: library/collections.rst:461 msgid ":class:`deque` objects" msgstr "Objets :class:`deque`" -#: library/collections.rst:455 +#: library/collections.rst:465 msgid "" "Returns a new deque object initialized left-to-right (using :meth:`append`) " "with data from *iterable*. If *iterable* is not specified, the new deque is " "empty." msgstr "" -"Renvoie un nouvel objet *deque* initialisé de gauche à droite (en utilisant :" -"meth:`append`) avec les données d'*iterable*. Si *iterable* n'est pas " -"spécifié, alors la nouvelle *deque* est vide." +"Renvoie un nouvel objet *deque* initialisé de gauche à droite (en " +"utilisant :meth:`append`) avec les données d'*iterable*. Si *iterable* n'est " +"pas spécifié, alors la nouvelle *deque* est vide." -#: library/collections.rst:458 +#: library/collections.rst:468 #, fuzzy msgid "" "Deques are a generalization of stacks and queues (the name is pronounced " @@ -722,7 +735,7 @@ msgstr "" "vue de la mémoire des deux côtés de la *deque*, avec approximativement la " "même performance en *O(1)* dans les deux sens." -#: library/collections.rst:463 +#: library/collections.rst:473 #, fuzzy msgid "" "Though :class:`list` objects support similar operations, they are optimized " @@ -736,7 +749,7 @@ msgstr "" "position de la représentation des données sous-jacentes entraînent des coûts " "de déplacement de mémoire en *O(n)*." -#: library/collections.rst:469 +#: library/collections.rst:479 msgid "" "If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " "length. Otherwise, the deque is bounded to the specified maximum length. " @@ -755,32 +768,39 @@ msgstr "" "Elles sont aussi utiles pour le suivi de transactions et autres lots de " "données où seule l'activité récente est intéressante." -#: library/collections.rst:478 +#: library/collections.rst:487 +msgid "Deques are :ref:`generic ` over the type of their contents." +msgstr "" + +#: library/collections.rst:490 msgid "Deque objects support the following methods:" msgstr "Les objets *deques* gèrent les méthodes suivantes :" -#: library/collections.rst:482 -msgid "Add *x* to the right side of the deque." +#: library/collections.rst:494 +#, fuzzy +msgid "Add *item* to the right side of the deque." msgstr "Ajoute *x* à l'extrémité droite de la *deque*." -#: library/collections.rst:487 -msgid "Add *x* to the left side of the deque." +#: library/collections.rst:499 +#, fuzzy +msgid "Add *item* to the left side of the deque." msgstr "Ajoute *x* à l'extrémité gauche de la *deque*." -#: library/collections.rst:492 +#: library/collections.rst:504 msgid "Remove all elements from the deque leaving it with length 0." msgstr "" "Supprime tous les éléments de la *deque* et la laisse avec une longueur de 0." -#: library/collections.rst:497 +#: library/collections.rst:509 msgid "Create a shallow copy of the deque." msgstr "Crée une copie superficielle de la *deque*." -#: library/collections.rst:504 -msgid "Count the number of deque elements equal to *x*." +#: library/collections.rst:516 +#, fuzzy +msgid "Count the number of deque elements equal to *value*." msgstr "Compte le nombre d'éléments de la *deque* égaux à *x*." -#: library/collections.rst:511 +#: library/collections.rst:523 msgid "" "Extend the right side of the deque by appending elements from the iterable " "argument." @@ -788,7 +808,7 @@ msgstr "" "Étend la *deque* en ajoutant les éléments de l'itérable en argument à son " "extrémité droite." -#: library/collections.rst:517 +#: library/collections.rst:529 msgid "" "Extend the left side of the deque by appending elements from *iterable*. " "Note, the series of left appends results in reversing the order of elements " @@ -798,29 +818,31 @@ msgstr "" "gauche. Dans ce cas, notez que la série d'ajouts inverse l'ordre des " "éléments de l'argument itérable." -#: library/collections.rst:524 +#: library/collections.rst:536 +#, fuzzy msgid "" -"Return the position of *x* in the deque (at or after index *start* and " +"Return the position of *value* in the deque (at or after index *start* and " "before index *stop*). Returns the first match or raises :exc:`ValueError` " "if not found." msgstr "" "Renvoie la position de *x* dans la *deque* (à partir de *start* inclus et " -"jusqu'à *stop* exclus). Renvoie la première correspondance ou lève :exc:" -"`ValueError` si aucune n'est trouvée." +"jusqu'à *stop* exclus). Renvoie la première correspondance ou " +"lève :exc:`ValueError` si aucune n'est trouvée." -#: library/collections.rst:533 -msgid "Insert *x* into the deque at position *i*." +#: library/collections.rst:545 +#, fuzzy +msgid "Insert *value* into the deque at position *index*." msgstr "Insère *x* dans la *deque* à la position *i*." -#: library/collections.rst:535 +#: library/collections.rst:547 msgid "" -"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" -"exc:`IndexError` is raised." +"If the insertion would cause a bounded deque to grow beyond *maxlen*, " +"an :exc:`IndexError` is raised." msgstr "" "Si une insertion provoque un dépassement de la taille limitée d'une *deque*, " "alors elle lève une exception :exc:`IndexError`." -#: library/collections.rst:543 +#: library/collections.rst:555 msgid "" "Remove and return an element from the right side of the deque. If no " "elements are present, raises an :exc:`IndexError`." @@ -828,7 +850,7 @@ msgstr "" "Retire et renvoie un élément de l'extrémité droite de la *deque*. S'il n'y a " "aucun élément, lève une exception :exc:`IndexError`." -#: library/collections.rst:549 +#: library/collections.rst:561 msgid "" "Remove and return an element from the left side of the deque. If no elements " "are present, raises an :exc:`IndexError`." @@ -836,21 +858,21 @@ msgstr "" "Retire et renvoie un élément de l'extrémité gauche de la *deque*. S'il n'y a " "aucun élément, lève une exception :exc:`IndexError`." -#: library/collections.rst:555 +#: library/collections.rst:567 msgid "" -"Remove the first occurrence of *value*. If not found, raises a :exc:" -"`ValueError`." +"Remove the first occurrence of *value*. If not found, raises " +"a :exc:`ValueError`." msgstr "" "Supprime la première occurrence de *value*. Si aucune occurrence n'est " "trouvée, lève une exception :exc:`ValueError`." -#: library/collections.rst:561 +#: library/collections.rst:573 msgid "Reverse the elements of the deque in-place and then return ``None``." msgstr "" "Inverse le sens des éléments de la *deque* sans créer de copie et renvoie " "``None``." -#: library/collections.rst:568 +#: library/collections.rst:580 msgid "" "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " "left." @@ -858,7 +880,7 @@ msgstr "" "Décale les éléments de la *deque* de *n* places vers la droite (le dernier " "élément revient au début). Si *n* est négatif, décale vers la gauche." -#: library/collections.rst:571 +#: library/collections.rst:583 msgid "" "When the deque is not empty, rotating one step to the right is equivalent to " "``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " @@ -868,16 +890,16 @@ msgstr "" "équivaut à ``d.appendleft(d.pop())`` et un décalage d'une place vers la " "gauche est équivalent à ``d.append(d.popleft())``." -#: library/collections.rst:576 +#: library/collections.rst:588 msgid "Deque objects also provide one read-only attribute:" msgstr "" "Les objets *deques* fournissent également un attribut en lecture seule :" -#: library/collections.rst:580 +#: library/collections.rst:592 msgid "Maximum size of a deque or ``None`` if unbounded." msgstr "La taille maximale d'une *deque*, ou ``None`` si illimitée." -#: library/collections.rst:585 +#: library/collections.rst:597 #, fuzzy msgid "" "In addition to the above, deques support iteration, pickling, ``len(d)``, " @@ -888,13 +910,14 @@ msgid "" "instead." msgstr "" "En plus des méthodes précédentes, les *deques* gèrent l'itération, la " -"sérialisation, ``len(d)``, ``reversed(d)``, ``copy.copy(d)``, ``copy." -"deepcopy(d)``, le test d'appartenance avec l'opérateur :keyword:`in`, et les " -"références en indice telles que ``d[0]`` pour accéder au premier élément. " -"L'accès par indice est en *O(1)* aux extrémités mais en *O(n)* au milieu. " -"Pour des accès aléatoires rapides, il est préférable d'utiliser des listes." +"sérialisation, ``len(d)``, ``reversed(d)``, ``copy.copy(d)``, " +"``copy.deepcopy(d)``, le test d'appartenance avec l'opérateur :keyword:`in`, " +"et les références en indice telles que ``d[0]`` pour accéder au premier " +"élément. L'accès par indice est en *O(1)* aux extrémités mais en *O(n)* au " +"milieu. Pour des accès aléatoires rapides, il est préférable d'utiliser des " +"listes." -#: library/collections.rst:591 +#: library/collections.rst:603 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." @@ -902,20 +925,20 @@ msgstr "" "Depuis la version 3.5, les *deques* gèrent ``__add__()``, ``__mul__()`` et " "``__imul__()``." -#: library/collections.rst:594 +#: library/collections.rst:606 msgid "Example:" msgstr "Exemple :" -#: library/collections.rst:651 +#: library/collections.rst:663 msgid ":class:`deque` Recipes" msgstr "Cas pratiques utilisant :class:`deque`" -#: library/collections.rst:653 +#: library/collections.rst:665 msgid "This section shows various approaches to working with deques." msgstr "" "Cette partie montre diverses approches afin de travailler avec les *deques*." -#: library/collections.rst:655 +#: library/collections.rst:667 msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" @@ -923,7 +946,7 @@ msgstr "" "Les *deques* à taille limitée apportent une fonctionnalité similaire au " "filtre ``tail`` d'Unix ::" -#: library/collections.rst:663 +#: library/collections.rst:675 msgid "" "Another approach to using deques is to maintain a sequence of recently added " "elements by appending to the right and popping to the left::" @@ -932,14 +955,14 @@ msgstr "" "d'éléments récemment ajoutés en les ajoutant à droite et en retirant les " "anciens par la gauche ::" -#: library/collections.rst:678 +#: library/collections.rst:690 msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" -"class:`deque`. Values are yielded from the active iterator in position " -"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." -"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." -"rotate` method::" +"robin_scheduling>`_ can be implemented with input iterators stored in " +"a :class:`deque`. Values are yielded from the active iterator in position " +"zero. If that iterator is exhausted, it can be removed " +"with :meth:`~deque.popleft`; otherwise, it can be cycled back to the end " +"with the :meth:`~deque.rotate` method::" msgstr "" "Un `ordonnancement en round-robin `_ peut être implémenté avec des entrées itérateurs " @@ -948,82 +971,90 @@ msgstr "" "avec la méthode :meth:`~deque.popleft` ; ou bien il peut être remis à la fin " "avec la méthode :meth:`~ deque.rotate` ::" -#: library/collections.rst:697 +#: library/collections.rst:709 msgid "" "The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " "slicing and deletion. For example, a pure Python implementation of ``del " "d[n]`` relies on the ``rotate()`` method to position elements to be popped::" msgstr "" "La méthode :meth:`~deque.rotate` apporte une façon d'implémenter la " -"sélection d'intervalle (*slicing*) et les suppressions pour les :class:" -"`deques`. Par exemple, une implémentation de ``del d[n]`` en Python pur " -"utilise la méthode ``rotate()`` pour mettre en position les éléments à " -"éjecter ::" +"sélection d'intervalle (*slicing*) et les suppressions pour " +"les :class:`deques`. Par exemple, une implémentation de ``del d[n]`` en " +"Python pur utilise la méthode ``rotate()`` pour mettre en position les " +"éléments à éjecter ::" -#: library/collections.rst:706 +#: library/collections.rst:718 msgid "" -"To implement :class:`deque` slicing, use a similar approach applying :meth:" -"`~deque.rotate` to bring a target element to the left side of the deque. " -"Remove old entries with :meth:`~deque.popleft`, add new entries with :meth:" -"`~deque.extend`, and then reverse the rotation. With minor variations on " -"that approach, it is easy to implement Forth style stack manipulations such " -"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``." +"To implement :class:`deque` slicing, use a similar approach " +"applying :meth:`~deque.rotate` to bring a target element to the left side of " +"the deque. Remove old entries with :meth:`~deque.popleft`, add new entries " +"with :meth:`~deque.extend`, and then reverse the rotation. With minor " +"variations on that approach, it is easy to implement Forth style stack " +"manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, " +"``rot``, and ``roll``." msgstr "" "Pour implémenter le *slicing* pour les :class:`deques `, il est " -"possible d'utiliser une approche similaire en appliquant :meth:`~deque." -"rotate` afin d'apporter un élément cible à l'extrémité gauche de la *deque*. " -"On éjecte les anciennes entrées avec :meth:`~deque.popleft` et on ajoute les " -"nouvelles avec :meth:`~deque.extend`, puis on inverse la rotation. Il est " -"aisé d'implémenter les manipulations des piles inspirées du Forth telles que " +"possible d'utiliser une approche similaire en " +"appliquant :meth:`~deque.rotate` afin d'apporter un élément cible à " +"l'extrémité gauche de la *deque*. On éjecte les anciennes entrées " +"avec :meth:`~deque.popleft` et on ajoute les nouvelles " +"avec :meth:`~deque.extend`, puis on inverse la rotation. Il est aisé " +"d'implémenter les manipulations des piles inspirées du Forth telles que " "``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot`` et ``roll``." -#: library/collections.rst:716 +#: library/collections.rst:728 msgid ":class:`defaultdict` objects" msgstr "Objets :class:`defaultdict`" -#: library/collections.rst:720 +#: library/collections.rst:734 msgid "" "Return a new dictionary-like object. :class:`defaultdict` is a subclass of " "the built-in :class:`dict` class. It overrides one method and adds one " "writable instance variable. The remaining functionality is the same as for " "the :class:`dict` class and is not documented here." msgstr "" -"Renvoie un nouvel objet qui se comporte comme un dictionnaire. :class:" -"`defaultdict` est une sous-classe de la classe native :class:`dict`. Elle " -"surcharge une méthode et ajoute une variable d'instance modifiable. Les " -"autres fonctionnalités sont les mêmes que celles des objets :class:`dict` et " -"ne sont pas documentées ici." +"Renvoie un nouvel objet qui se comporte comme un " +"dictionnaire. :class:`defaultdict` est une sous-classe de la classe " +"native :class:`dict`. Elle surcharge une méthode et ajoute une variable " +"d'instance modifiable. Les autres fonctionnalités sont les mêmes que celles " +"des objets :class:`dict` et ne sont pas documentées ici." -#: library/collections.rst:725 +#: library/collections.rst:739 msgid "" -"The first argument provides the initial value for the :attr:" -"`default_factory` attribute; it defaults to ``None``. All remaining " -"arguments are treated the same as if they were passed to the :class:`dict` " -"constructor, including keyword arguments." +"The first argument provides the initial value for " +"the :attr:`default_factory` attribute; it defaults to ``None``. All " +"remaining arguments are treated the same as if they were passed to " +"the :class:`dict` constructor, including keyword arguments." msgstr "" -"Le premier argument fournit la valeur initiale de l'attribut :attr:" -"`default_factory` qui doit être un objet appelable sans paramètre ou " -"``None``, sa valeur par défaut. Tous les autres arguments sont traités comme " -"si on les passait au constructeur de :class:`dict`, y compris les arguments " -"nommés." +"Le premier argument fournit la valeur initiale de " +"l'attribut :attr:`default_factory` qui doit être un objet appelable sans " +"paramètre ou ``None``, sa valeur par défaut. Tous les autres arguments sont " +"traités comme si on les passait au constructeur de :class:`dict`, y compris " +"les arguments nommés." -#: library/collections.rst:731 +#: library/collections.rst:744 +msgid "" +":class:`!defaultdict`\\s are :ref:`generic ` over two types, " +"signifying (respectively) the types of the dictionary's keys and values." +msgstr "" + +#: library/collections.rst:748 msgid "" ":class:`defaultdict` objects support the following method in addition to the " "standard :class:`dict` operations:" msgstr "" -"En plus des opérations usuelles de :class:`dict`, les objets :class:" -"`defaultdict` gèrent les méthodes supplémentaires suivantes :" +"En plus des opérations usuelles de :class:`dict`, les " +"objets :class:`defaultdict` gèrent les méthodes supplémentaires suivantes :" -#: library/collections.rst:736 +#: library/collections.rst:753 msgid "" -"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" -"`KeyError` exception with the *key* as argument." +"If the :attr:`default_factory` attribute is ``None``, this raises " +"a :exc:`KeyError` exception with the *key* as argument." msgstr "" -"Si l'attribut :attr:`default_factory` est ``None``, lève une exception :exc:" -"`KeyError` avec *key* comme argument." +"Si l'attribut :attr:`default_factory` est ``None``, lève une " +"exception :exc:`KeyError` avec *key* comme argument." -#: library/collections.rst:739 +#: library/collections.rst:756 msgid "" "If :attr:`default_factory` is not ``None``, it is called without arguments " "to provide a default value for the given *key*, this value is inserted in " @@ -1033,7 +1064,7 @@ msgstr "" "argument pour fournir une valeur par défaut pour la *key* demandée. Cette " "valeur est insérée dans le dictionnaire avec pour clé *key* et est renvoyée." -#: library/collections.rst:743 +#: library/collections.rst:760 msgid "" "If calling :attr:`default_factory` raises an exception this exception is " "propagated unchanged." @@ -1041,56 +1072,57 @@ msgstr "" "Si appeler :attr:`default_factory` lève une exception, celle-ci est " "transmise inchangée." -#: library/collections.rst:746 +#: library/collections.rst:763 #, fuzzy msgid "" -"This method is called by the :meth:`~object.__getitem__` method of the :" -"class:`dict` class when the requested key is not found; whatever it returns " -"or raises is then returned or raised by :meth:`~object.__getitem__`." +"This method is called by the :meth:`~object.__getitem__` method of " +"the :class:`dict` class when the requested key is not found; whatever it " +"returns or raises is then returned or raised by :meth:`~object.__getitem__`." msgstr "" -"Cette méthode est appelée par la méthode :meth:`__getitem__` de la classe :" -"class:`dict` lorsque la clé demandée n'est pas trouvée. Ce qu'elle renvoie " -"ou lève est alors renvoyé ou levé par :meth:`__getitem__`." +"Cette méthode est appelée par la méthode :meth:`__getitem__` de la " +"classe :class:`dict` lorsque la clé demandée n'est pas trouvée. Ce qu'elle " +"renvoie ou lève est alors renvoyé ou levé par :meth:`__getitem__`." -#: library/collections.rst:750 +#: library/collections.rst:767 #, fuzzy msgid "" -"Note that :meth:`__missing__` is *not* called for any operations besides :" -"meth:`~object.__getitem__`. This means that :meth:`get` will, like normal " -"dictionaries, return ``None`` as a default rather than using :attr:" -"`default_factory`." +"Note that :meth:`__missing__` is *not* called for any operations " +"besides :meth:`~object.__getitem__`. This means that :meth:`~dict.get` will, " +"like normal dictionaries, return ``None`` as a default rather than " +"using :attr:`default_factory`." msgstr "" "Remarquez que :meth:`__missing__` n'est *pas* appelée pour les opérations " "autres que :meth:`__getitem__`. Cela signifie que :meth:`get` renvoie " "``None`` comme les dictionnaires natifs dans les cas triviaux et n'utilise " "pas :attr:`default_factory`." -#: library/collections.rst:756 +#: library/collections.rst:773 msgid ":class:`defaultdict` objects support the following instance variable:" msgstr "Les objets :class:`defaultdict` gèrent la variable d'instance :" -#: library/collections.rst:761 +#: library/collections.rst:778 +#, fuzzy msgid "" -"This attribute is used by the :meth:`__missing__` method; it is initialized " -"from the first argument to the constructor, if present, or to ``None``, if " -"absent." +"This attribute is used by the :meth:`~defaultdict.__missing__` method; it is " +"initialized from the first argument to the constructor, if present, or to " +"``None``, if absent." msgstr "" "Cet attribut est utilisé par la méthode :meth:`__missing__` ; il est " "initialisé par le premier argument passé au constructeur, s'il est spécifié, " "sinon par ``None``." -#: library/collections.rst:1191 +#: library/collections.rst:1211 msgid "" "Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." msgstr "" "ajout des opérateurs fusion (``|``) et mise-à-jour (``|=``) tels que définis " "dans :pep:`584`." -#: library/collections.rst:771 +#: library/collections.rst:788 msgid ":class:`defaultdict` Examples" msgstr "Exemples utilisant :class:`defaultdict`" -#: library/collections.rst:773 +#: library/collections.rst:790 msgid "" "Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " "to group a sequence of key-value pairs into a dictionary of lists:" @@ -1099,15 +1131,16 @@ msgstr "" "le regroupement d'une séquence de paires clé-valeur en un dictionnaire de " "listes :" -#: library/collections.rst:784 +#: library/collections.rst:801 msgid "" "When each key is encountered for the first time, it is not already in the " -"mapping; so an entry is automatically created using the :attr:`~defaultdict." -"default_factory` function which returns an empty :class:`list`. The :meth:" -"`list.append` operation then attaches the value to the new list. When keys " -"are encountered again, the look-up proceeds normally (returning the list for " -"that key) and the :meth:`list.append` operation adds another value to the " -"list. This technique is simpler and faster than an equivalent technique " +"mapping; so an entry is automatically created using " +"the :attr:`~defaultdict.default_factory` function which returns an " +"empty :class:`list`. The :meth:`list.append` operation then attaches the " +"value to the new list. When keys are encountered again, the look-up " +"proceeds normally (returning the list for that key) and " +"the :meth:`list.append` operation adds another value to the list. This " +"technique is simpler and faster than an equivalent technique " "using :meth:`dict.setdefault`:" msgstr "" "Lorsque chaque clé est rencontrée pour la première fois, elle n'est pas " @@ -1120,29 +1153,29 @@ msgstr "" "technique est plus simple et plus rapide qu'une technique équivalente " "utilisant :meth:`dict.setdefault` :" -#: library/collections.rst:799 +#: library/collections.rst:816 msgid "" -"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" -"class:`defaultdict` useful for counting (like a bag or multiset in other " -"languages):" +"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes " +"the :class:`defaultdict` useful for counting (like a bag or multiset in " +"other languages):" msgstr "" "Utiliser :class:`int` comme :attr:`~defaultdict.default_factory` rend la " "classe :class:`defaultdict` pratique pour le comptage (comme un sac ou multi-" "ensemble dans d'autres langages) :" -#: library/collections.rst:811 +#: library/collections.rst:828 msgid "" -"When a letter is first encountered, it is missing from the mapping, so the :" -"attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " -"default count of zero. The increment operation then builds up the count for " -"each letter." +"When a letter is first encountered, it is missing from the mapping, so " +"the :attr:`~defaultdict.default_factory` function calls :func:`int` to " +"supply a default count of zero. The increment operation then builds up the " +"count for each letter." msgstr "" "Quand une lettre est rencontrée pour la première fois, elle n'est pas dans " "le dictionnaire, donc la fonction :attr:`~defaultdict.default_factory` " "appelle :func:`int` pour mettre un nouveau compteur à zéro. L'incrémentation " "augmente ensuite le comptage pour chaque lettre." -#: library/collections.rst:815 +#: library/collections.rst:832 msgid "" "The function :func:`int` which always returns zero is just a special case of " "constant functions. A faster and more flexible way to create constant " @@ -1154,21 +1187,21 @@ msgstr "" "une fonction constante est d'utiliser une fonction lambda qui peut fournir " "n'importe quelle valeur constante (pas seulement zéro) :" -#: library/collections.rst:828 +#: library/collections.rst:845 msgid "" -"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" -"class:`defaultdict` useful for building a dictionary of sets:" +"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes " +"the :class:`defaultdict` useful for building a dictionary of sets:" msgstr "" "Utiliser :class:`set` comme :attr:`~defaultdict.default_factory` rend la " "classe :class:`defaultdict` pratique pour créer un dictionnaire d'ensembles :" -#: library/collections.rst:841 +#: library/collections.rst:858 msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" msgstr "" ":func:`namedtuple` : fonction de construction pour *n*-uplets avec des " "champs nommés" -#: library/collections.rst:843 +#: library/collections.rst:860 msgid "" "Named tuples assign meaning to each position in a tuple and allow for more " "readable, self-documenting code. They can be used wherever regular tuples " @@ -1181,13 +1214,15 @@ msgstr "" "possibilité d'accéder à leurs champs grâce à leur nom au lieu de leur index " "de position." -#: library/collections.rst:849 +#: library/collections.rst:866 +#, fuzzy msgid "" "Returns a new tuple subclass named *typename*. The new subclass is used to " "create tuple-like objects that have fields accessible by attribute lookup as " "well as being indexable and iterable. Instances of the subclass also have a " -"helpful docstring (with typename and field_names) and a helpful :meth:" -"`__repr__` method which lists the tuple contents in a ``name=value`` format." +"helpful docstring (with *typename* and *field_names*) and a " +"helpful :meth:`~object.__repr__` method which lists the tuple contents in a " +"``name=value`` format." msgstr "" "Renvoie une nouvelle sous-classe de ``tuple`` appelée *typename*. Elle est " "utilisée pour créer des objets se comportant comme les *n*-uplets qui ont " @@ -1197,7 +1232,7 @@ msgstr "" "méthode :meth:`__repr__` pratique qui liste le contenu du *n*-uplet au " "format ``nom=valeur``." -#: library/collections.rst:855 +#: library/collections.rst:873 msgid "" "The *field_names* are a sequence of strings such as ``['x', 'y']``. " "Alternatively, *field_names* can be a single string with each fieldname " @@ -1208,21 +1243,22 @@ msgstr "" "sont séparés par un espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, " "y'``." -#: library/collections.rst:859 +#: library/collections.rst:877 msgid "" "Any valid Python identifier may be used for a fieldname except for names " "starting with an underscore. Valid identifiers consist of letters, digits, " -"and underscores but do not start with a digit or underscore and cannot be a :" -"mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*." +"and underscores but do not start with a digit or underscore and cannot be " +"a :mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or " +"*raise*." msgstr "" "N'importe quel identifiant Python peut être utilisé pour un nom de champ " "hormis ceux commençant par un tiret bas. Les identifiants valides peuvent " "contenir des lettres, des chiffres (sauf en première position) et des tirets " -"bas (sauf en première position). Un identifiant ne peut pas être un :mod:" -"`keyword` tel que ``class``, ``for``, ``return``, ``global``, ``pass`` ou " -"``raise``." +"bas (sauf en première position). Un identifiant ne peut pas être " +"un :mod:`keyword` tel que ``class``, ``for``, ``return``, ``global``, " +"``pass`` ou ``raise``." -#: library/collections.rst:865 +#: library/collections.rst:883 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1234,7 +1270,7 @@ msgstr "" "'ghi', 'abc']`` est converti en ``['abc, '_1', 'ghi', '_3']`` afin " "d'éliminer le mot-clé ``def`` et le doublon de ``abc``." -#: library/collections.rst:870 +#: library/collections.rst:888 msgid "" "*defaults* can be ``None`` or an :term:`iterable` of default values. Since " "fields with a default value must come after any fields without a default, " @@ -1250,7 +1286,7 @@ msgstr "" "'z']`` et les valeurs par défaut ``(1, 2)``, alors ``x`` est un argument " "obligatoire tandis que ``y`` et ``y`` valent par défaut ``1`` et ``2``." -#: library/collections.rst:877 +#: library/collections.rst:895 #, fuzzy msgid "" "If *module* is defined, the :attr:`~type.__module__` attribute of the named " @@ -1259,7 +1295,7 @@ msgstr "" "Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` " "du *n*-uplet nommé." -#: library/collections.rst:880 +#: library/collections.rst:898 msgid "" "Named tuple instances do not have per-instance dictionaries, so they are " "lightweight and require no more memory than regular tuples." @@ -1268,7 +1304,7 @@ msgstr "" "sont donc légères et ne requièrent pas plus de mémoire que les *n*-uplets " "natifs." -#: library/collections.rst:883 +#: library/collections.rst:901 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." @@ -1276,11 +1312,11 @@ msgstr "" "Pour permettre la sérialisation, la classe de *n*-uplet nommée doit être " "assignée à une variable qui correspond à *typename*." -#: library/collections.rst:886 +#: library/collections.rst:904 msgid "Added support for *rename*." msgstr "Gestion de *rename*." -#: library/collections.rst:889 +#: library/collections.rst:907 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." @@ -1288,30 +1324,33 @@ msgstr "" "Les paramètres *verbose* et *rename* deviennent des :ref:`arguments " "obligatoirement nommés `." -#: library/collections.rst:893 +#: library/collections.rst:911 msgid "Added the *module* parameter." msgstr "Ajout du paramètre *module*." -#: library/collections.rst:896 -msgid "Removed the *verbose* parameter and the :attr:`_source` attribute." +#: library/collections.rst:914 +#, fuzzy +msgid "Removed the *verbose* parameter and the :attr:`!_source` attribute." msgstr "Suppression du paramètre *verbose* et de l'attribut :attr:`_source`." -#: library/collections.rst:899 +#: library/collections.rst:917 +#, fuzzy msgid "" -"Added the *defaults* parameter and the :attr:`_field_defaults` attribute." +"Added the *defaults* parameter and " +"the :attr:`~somenamedtuple._field_defaults` attribute." msgstr "" "Ajout du paramètre *defaults* et de l'attribut :attr:`_field_defaults`." -#: library/collections.rst:919 +#: library/collections.rst:937 msgid "" "Named tuples are especially useful for assigning field names to result " "tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" msgstr "" "Les *n*-uplets nommés sont particulièrement utiles pour associer des noms de " -"champs à des *n*-uplets renvoyés par les modules :mod:`csv` ou :mod:" -"`sqlite3` ::" +"champs à des *n*-uplets renvoyés par les modules :mod:`csv` " +"ou :mod:`sqlite3` ::" -#: library/collections.rst:935 +#: library/collections.rst:953 msgid "" "In addition to the methods inherited from tuples, named tuples support three " "additional methods and two attributes. To prevent conflicts with field " @@ -1321,14 +1360,14 @@ msgstr "" "implémentent trois méthodes et deux attributs supplémentaires. Pour éviter " "les conflits avec noms de champs, leurs noms commencent par un tiret bas." -#: library/collections.rst:941 +#: library/collections.rst:959 msgid "" "Class method that makes a new instance from an existing sequence or iterable." msgstr "" "Méthode de classe qui construit une nouvelle instance à partir d'une " "séquence ou d'un itérable existant." -#: library/collections.rst:951 +#: library/collections.rst:969 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" @@ -1336,11 +1375,11 @@ msgstr "" "Renvoie un nouveau :class:`dict` qui associe chaque nom de champ à sa valeur " "correspondante :" -#: library/collections.rst:960 +#: library/collections.rst:978 msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." msgstr "Renvoie un :class:`OrderedDict` au lieu d'un :class:`dict` natif." -#: library/collections.rst:963 +#: library/collections.rst:981 msgid "" "Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " "Python 3.7, regular dicts are guaranteed to be ordered. If the extra " @@ -1353,7 +1392,7 @@ msgstr "" "nécessaires, la solution préconisée est de convertir le résultat vers le " "type souhaité : ``OrderedDict(nt._asdict())``." -#: library/collections.rst:972 +#: library/collections.rst:990 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" @@ -1361,18 +1400,18 @@ msgstr "" "Renvoie une nouvelle instance du *n*-uplet nommé en remplaçant les champs " "spécifiés par leurs nouvelles valeurs ::" -#: library/collections.rst:982 +#: library/collections.rst:1000 msgid "" "Named tuples are also supported by generic function :func:`copy.replace`." msgstr "" -#: library/collections.rst:984 +#: library/collections.rst:1002 msgid "" "Raise :exc:`TypeError` instead of :exc:`ValueError` for invalid keyword " "arguments." msgstr "" -#: library/collections.rst:990 +#: library/collections.rst:1008 msgid "" "Tuple of strings listing the field names. Useful for introspection and for " "creating new named tuple types from existing named tuples." @@ -1381,19 +1420,19 @@ msgstr "" "l'introspection et pour créer de nouveaux types de *n*-uplets nommés à " "partir d'existants." -#: library/collections.rst:1005 +#: library/collections.rst:1023 msgid "Dictionary mapping field names to default values." msgstr "Dictionnaire qui assigne les valeurs par défaut aux noms des champs." -#: library/collections.rst:1015 +#: library/collections.rst:1033 msgid "" -"To retrieve a field whose name is stored in a string, use the :func:" -"`getattr` function:" +"To retrieve a field whose name is stored in a string, use " +"the :func:`getattr` function:" msgstr "" "Pour récupérer un champ dont le nom est une chaîne de caractères, utilisez " "la fonction :func:`getattr` :" -#: library/collections.rst:1021 +#: library/collections.rst:1039 msgid "" "To convert a dictionary to a named tuple, use the double-star-operator (as " "described in :ref:`tut-unpacking-arguments`):" @@ -1401,7 +1440,7 @@ msgstr "" "Pour convertir un dictionnaire en *n*-uplet nommé, utilisez l'opérateur " "double-étoile (comme expliqué dans :ref:`tut-unpacking-arguments`) :" -#: library/collections.rst:1028 +#: library/collections.rst:1046 msgid "" "Since a named tuple is a regular Python class, it is easy to add or change " "functionality with a subclass. Here is how to add a calculated field and a " @@ -1411,7 +1450,7 @@ msgstr "" "nommés grâce à l'héritage puisqu'il s'agit de simples classes. Voici comment " "ajouter un champ calculé avec une longueur fixe d'affichage :" -#: library/collections.rst:1047 +#: library/collections.rst:1065 msgid "" "The subclass shown above sets ``__slots__`` to an empty tuple. This helps " "keep memory requirements low by preventing the creation of instance " @@ -1421,7 +1460,7 @@ msgstr "" "permet de garder une emprunte mémoire faible en empêchant la création de " "dictionnaire d'instance." -#: library/collections.rst:1050 +#: library/collections.rst:1068 msgid "" "Subclassing is not useful for adding new, stored fields. Instead, simply " "create a new named tuple type from the :attr:`~somenamedtuple._fields` " @@ -1431,7 +1470,7 @@ msgstr "" "préférable de simplement créer un nouveau type de *n*-uplet nommé avec " "l'attribut :attr:`~somenamedtuple._fields` :" -#: library/collections.rst:1055 +#: library/collections.rst:1073 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" @@ -1439,11 +1478,11 @@ msgstr "" "Les *docstrings* peuvent être personnalisées en modifiant directement " "l'attribut ``__doc__`` :" -#: library/collections.rst:1064 +#: library/collections.rst:1082 msgid "Property docstrings became writeable." msgstr "La propriété devient éditable." -#: library/collections.rst:1069 +#: library/collections.rst:1087 msgid "" "See :class:`typing.NamedTuple` for a way to add type hints for named " "tuples. It also provides an elegant notation using the :keyword:`class` " @@ -1453,7 +1492,7 @@ msgstr "" "type pour les *n*-uplets nommés. Cela propose aussi une notation élégante " "utilisant le mot-clé :keyword:`class` ::" -#: library/collections.rst:1078 +#: library/collections.rst:1096 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." @@ -1461,7 +1500,7 @@ msgstr "" "Voir :meth:`types.SimpleNamespace` pour un espace de nommage mutable basé " "sur un dictionnaire sous-jacent à la place d'un *n*-uplet." -#: library/collections.rst:1081 +#: library/collections.rst:1099 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." @@ -1470,11 +1509,11 @@ msgstr "" "ajouter automatiquement des méthodes spéciales générées aux classes définies " "par l’utilisateur." -#: library/collections.rst:1086 +#: library/collections.rst:1104 msgid ":class:`OrderedDict` objects" msgstr "Objets :class:`OrderedDict`" -#: library/collections.rst:1088 +#: library/collections.rst:1106 msgid "" "Ordered dictionaries are just like regular dictionaries but have some extra " "capabilities relating to ordering operations. They have become less " @@ -1486,11 +1525,11 @@ msgstr "" "moins importants puisque la classe native :class:`dict` sait se souvenir de " "l'ordre d'insertion (cette fonctionnalité a été garantie par Python 3.7)." -#: library/collections.rst:1094 +#: library/collections.rst:1112 msgid "Some differences from :class:`dict` still remain:" msgstr "Quelques différences persistent vis-à-vis de :class:`dict` :" -#: library/collections.rst:1096 +#: library/collections.rst:1114 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." @@ -1499,7 +1538,7 @@ msgstr "" "opérations de correspondance. Garder une trace de l'ordre d'insertion était " "secondaire." -#: library/collections.rst:1099 +#: library/collections.rst:1117 msgid "" "The :class:`OrderedDict` was designed to be good at reordering operations. " "Space efficiency, iteration speed, and the performance of update operations " @@ -1509,7 +1548,7 @@ msgstr "" "opérations de ré-arrangement. L'occupation mémoire, la vitesse de parcours " "et les performances de mise à jour étaient secondaires." -#: library/collections.rst:1103 +#: library/collections.rst:1121 #, fuzzy msgid "" "The :class:`OrderedDict` algorithm can handle frequent reordering operations " @@ -1518,72 +1557,77 @@ msgid "" msgstr "" "Algorithmiquement, :class:`OrderedDict` gère mieux les ré-arrangements " "fréquents que :class:`dict`. Ceci la rend adaptée pour suivre les accès les " -"plus récents (par exemple pour implémenter un `cache LRU `_ pour *Least " -"Recently Used* en anglais)." +"plus récents (par exemple pour implémenter un `cache LRU `_ pour " +"*Least Recently Used* en anglais)." -#: library/collections.rst:1107 +#: library/collections.rst:1125 msgid "" "The equality operation for :class:`OrderedDict` checks for matching order." msgstr "" "Le test d'égalité de :class:`OrderedDict` vérifie si l'ordre correspond." -#: library/collections.rst:1109 +#: library/collections.rst:1127 msgid "" "A regular :class:`dict` can emulate the order sensitive equality test with " "``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``." msgstr "" -#: library/collections.rst:1112 +#: library/collections.rst:1130 +#, fuzzy msgid "" -"The :meth:`popitem` method of :class:`OrderedDict` has a different " -"signature. It accepts an optional argument to specify which item is popped." +"The :meth:`~OrderedDict.popitem` method of :class:`OrderedDict` has a " +"different signature. It accepts an optional argument to specify which item " +"is popped." msgstr "" "La méthode :meth:`popitem` de :class:`OrderedDict` possède une signature " "différente. Elle accepte un argument optionnel pour spécifier quel élément " "doit être enlevé." -#: library/collections.rst:1115 +#: library/collections.rst:1133 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` " "with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." msgstr "" -#: library/collections.rst:1118 +#: library/collections.rst:1136 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` " "with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the " "leftmost (first) item if it exists." msgstr "" -#: library/collections.rst:1122 +#: library/collections.rst:1140 +#, fuzzy msgid "" -":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently " -"reposition an element to an endpoint." +":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to " +"efficiently reposition an element to an endpoint." msgstr "" ":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer " "efficacement un élément à la fin." -#: library/collections.rst:1125 +#: library/collections.rst:1143 msgid "" "A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, " "last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its " "associated value to the rightmost (last) position." msgstr "" -#: library/collections.rst:1129 +#: library/collections.rst:1147 msgid "" "A regular :class:`dict` does not have an efficient equivalent for " "OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its " "associated value to the leftmost (first) position." msgstr "" -#: library/collections.rst:1133 -msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method." +#: library/collections.rst:1151 +#, fuzzy +msgid "" +"Until Python 3.8, :class:`dict` lacked a :meth:`~object.__reversed__` method." msgstr "" "Avant Python 3.8, :class:`dict` n'a pas de méthode :meth:`__reversed__`." -#: library/collections.rst:1138 +#: library/collections.rst:1158 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." @@ -1591,7 +1635,7 @@ msgstr "" "Renvoie une instance d'une sous-classe de :class:`dict` qui possède des " "méthodes spécialisées pour redéfinir l'ordre du dictionnaire." -#: library/collections.rst:1145 +#: library/collections.rst:1165 msgid "" "The :meth:`popitem` method for ordered dictionaries returns and removes a " "(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" @@ -1605,7 +1649,7 @@ msgstr "" "paires sont renvoyées comme pour une file, c'est-à-dire premier entré, " "premier sorti (en anglais :abbr:`FIFO (first-in, first-out)`)." -#: library/collections.rst:1152 +#: library/collections.rst:1172 #, fuzzy msgid "" "Move an existing *key* to either end of an ordered dictionary. The item is " @@ -1617,7 +1661,7 @@ msgstr "" "à gauche sinon. Lève une exception :exc:`KeyError` si la clé *key* n'est pas " "trouvée :" -#: library/collections.rst:1169 +#: library/collections.rst:1189 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." @@ -1625,50 +1669,53 @@ msgstr "" "En plus des méthodes usuelles des dictionnaires, les dictionnaires ordonnés " "gèrent l'itération en sens inverse grâce à :func:`reversed`." -#: library/collections.rst:1174 +#: library/collections.rst:1194 msgid "" "Equality tests between :class:`OrderedDict` objects are order-sensitive and " "are roughly equivalent to ``list(od1.items())==list(od2.items())``." msgstr "" -#: library/collections.rst:1177 +#: library/collections.rst:1197 #, fuzzy msgid "" -"Equality tests between :class:`OrderedDict` objects and other :class:" -"`~collections.abc.Mapping` objects are order-insensitive like regular " -"dictionaries. This allows :class:`OrderedDict` objects to be substituted " -"anywhere a regular dictionary is used." +"Equality tests between :class:`OrderedDict` objects and " +"other :class:`~collections.abc.Mapping` objects are order-insensitive like " +"regular dictionaries. This allows :class:`OrderedDict` objects to be " +"substituted anywhere a regular dictionary is used." msgstr "" "Les tests d'égalité entre deux objets :class:`OrderedDict` sont sensibles à " -"l'ordre et sont implémentés comme ceci : ``list(od1.items() == list(od2." -"items())``. Les tests d'égalité entre un objet :class:`OrderedDict` et un " -"objet :class:`~collections.abc.Mapping` ne sont pas sensibles à l'ordre " -"(comme les dictionnaires natifs). Cela permet substituer des objets :class:" -"`OrderedDict` partout où les dictionnaires natifs sont utilisés." +"l'ordre et sont implémentés comme ceci : ``list(od1.items() == " +"list(od2.items())``. Les tests d'égalité entre un objet :class:`OrderedDict` " +"et un objet :class:`~collections.abc.Mapping` ne sont pas sensibles à " +"l'ordre (comme les dictionnaires natifs). Cela permet substituer des " +"objets :class:`OrderedDict` partout où les dictionnaires natifs sont " +"utilisés." -#: library/collections.rst:1182 +#: library/collections.rst:1202 msgid "" -"The items, keys, and values :term:`views ` of :class:" -"`OrderedDict` now support reverse iteration using :func:`reversed`." +"The items, keys, and values :term:`views ` " +"of :class:`OrderedDict` now support reverse iteration using :func:`reversed`." msgstr "" -"Les :term:`vues ` d'éléments, de clés et de valeurs de :" -"class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " +"Les :term:`vues ` d'éléments, de clés et de valeurs " +"de :class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " "utilisant :func:`reversed`." -#: library/collections.rst:1186 +#: library/collections.rst:1206 +#, fuzzy msgid "" "With the acceptance of :pep:`468`, order is retained for keyword arguments " -"passed to the :class:`OrderedDict` constructor and its :meth:`update` method." +"passed to the :class:`OrderedDict` constructor and its :meth:`~dict.update` " +"method." msgstr "" "Suite à l'acceptation de la :pep:`468`, l'ordre des arguments nommés passés " "au constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est " "conservé." -#: library/collections.rst:1196 +#: library/collections.rst:1216 msgid ":class:`OrderedDict` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" -#: library/collections.rst:1198 +#: library/collections.rst:1218 msgid "" "It is straightforward to create an ordered dictionary variant that remembers " "the order the keys were *last* inserted. If a new entry overwrites an " @@ -1680,19 +1727,19 @@ msgstr "" "entrée écrase une existante, la position d'insertion d'origine est modifiée " "et déplacée à la fin ::" -#: library/collections.rst:1210 +#: library/collections.rst:1230 msgid "" -"An :class:`OrderedDict` would also be useful for implementing variants of :" -"func:`functools.lru_cache`:" +"An :class:`OrderedDict` would also be useful for implementing variants " +"of :func:`functools.lru_cache`:" msgstr "" "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " "de :func:`functools.lru_cache` :" -#: library/collections.rst:1309 +#: library/collections.rst:1329 msgid ":class:`UserDict` objects" msgstr "Objets :class:`UserDict`" -#: library/collections.rst:1311 +#: library/collections.rst:1331 msgid "" "The class, :class:`UserDict` acts as a wrapper around dictionary objects. " "The need for this class has been partially supplanted by the ability to " @@ -1705,13 +1752,13 @@ msgstr "" "travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " "comme attribut." -#: library/collections.rst:1319 +#: library/collections.rst:1341 +#, fuzzy msgid "" "Class that simulates a dictionary. The instance's contents are kept in a " -"regular dictionary, which is accessible via the :attr:`data` attribute of :" -"class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is " -"initialized with its contents; note that a reference to *initialdata* will " -"not be kept, allowing it to be used for other purposes." +"regular dictionary, which is accessible via the :attr:`data` attribute " +"of :class:`!UserDict` instances. If arguments are provided, they are used " +"to initialize :attr:`data`, like a regular dictionary." msgstr "" "Classe simulant un dictionnaire. Les instances de :class:`UserDict` " "possèdent un attribut :attr:`data` où est stocké leur contenu sous forme de " @@ -1719,26 +1766,39 @@ msgstr "" "initialisé avec son contenu. Remarquez qu'une référence vers *initialdata* " "n'est pas conservée, ce qui permet de l'utiliser pour d'autres tâches." -#: library/collections.rst:1325 +#: library/collections.rst:1346 +#, fuzzy msgid "" -"In addition to supporting the methods and operations of mappings, :class:" -"`UserDict` instances provide the following attribute:" +"In addition to supporting the methods and operations of mappings, :class:`!" +"UserDict` instances provide the following attribute:" msgstr "" "En plus de gérer les méthodes et opérations des dictionnaires, les instances " "de :class:`UserDict` fournissent l'attribut suivant :" -#: library/collections.rst:1330 +#: library/collections.rst:1351 msgid "" "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "" -"Un dictionnaire natif où est stocké le contenu de la classe :class:" -"`UserDict`." +"Un dictionnaire natif où est stocké le contenu de la " +"classe :class:`UserDict`." -#: library/collections.rst:1336 +#: library/collections.rst:1354 +msgid ":class:`!UserDict` instances also override the following method:" +msgstr "" + +#: library/collections.rst:1358 +msgid "" +"Remove and return a ``(key, value)`` pair from the wrapped dictionary. Pairs " +"are returned in the same order as ``data.popitem()``. (For the " +"default :meth:`dict.popitem`, this order is :abbr:`LIFO (last-in, first-" +"out)`.) If the dictionary is empty, raises a :exc:`KeyError`." +msgstr "" + +#: library/collections.rst:1364 msgid ":class:`UserList` objects" msgstr "Objets :class:`UserList`" -#: library/collections.rst:1338 +#: library/collections.rst:1366 msgid "" "This class acts as a wrapper around list objects. It is a useful base class " "for your own list-like classes which can inherit from them and override " @@ -1750,7 +1810,7 @@ msgstr "" "et surcharger les méthodes existantes ou en ajouter de nouvelles. Ainsi, on " "peut ajouter de nouveaux comportements aux listes." -#: library/collections.rst:1343 +#: library/collections.rst:1371 msgid "" "The need for this class has been partially supplanted by the ability to " "subclass directly from :class:`list`; however, this class can be easier to " @@ -1761,37 +1821,37 @@ msgstr "" "de travailler avec cette classe, car la liste sous-jacente est accessible " "via un attribut." -#: library/collections.rst:1349 +#: library/collections.rst:1377 msgid "" "Class that simulates a list. The instance's contents are kept in a regular " -"list, which is accessible via the :attr:`data` attribute of :class:" -"`UserList` instances. The instance's contents are initially set to a copy " -"of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, " -"for example a real Python list or a :class:`UserList` object." +"list, which is accessible via the :attr:`data` attribute " +"of :class:`UserList` instances. The instance's contents are initially set " +"to a copy of *list*, defaulting to the empty list ``[]``. *list* can be any " +"iterable, for example a real Python list or a :class:`UserList` object." msgstr "" "Classe simulant une liste. Les instances de :class:`UserList` possèdent un " "attribut :attr:`UserList` où est stocké leur contenu sous forme de liste " "native. Il est initialement une copie de *list*, ou ``[]`` par défaut. " -"*list* peut être un itérable, par exemple une liste native ou un objet :" -"class:`UserList`." +"*list* peut être un itérable, par exemple une liste native ou un " +"objet :class:`UserList`." -#: library/collections.rst:1355 +#: library/collections.rst:1383 msgid "" -"In addition to supporting the methods and operations of mutable sequences, :" -"class:`UserList` instances provide the following attribute:" +"In addition to supporting the methods and operations of mutable " +"sequences, :class:`UserList` instances provide the following attribute:" msgstr "" "En plus de gérer les méthodes et opérations des séquences mutables, les " "instances de :class:`UserList` possèdent l'attribut suivant :" -#: library/collections.rst:1360 +#: library/collections.rst:1388 msgid "" -"A real :class:`list` object used to store the contents of the :class:" -"`UserList` class." +"A real :class:`list` object used to store the contents of " +"the :class:`UserList` class." msgstr "" -"Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :" -"class:`UserList`." +"Un objet :class:`list` natif utilisé pour stocker le contenu de la " +"classe :class:`UserList`." -#: library/collections.rst:1363 +#: library/collections.rst:1391 msgid "" "**Subclassing requirements:** Subclasses of :class:`UserList` are expected " "to offer a constructor which can be called with either no arguments or one " @@ -1807,7 +1867,7 @@ msgstr "" "constructeur doit pouvoir être appelé avec un unique paramètre, un objet " "séquence utilisé comme source de données." -#: library/collections.rst:1370 +#: library/collections.rst:1398 msgid "" "If a derived class does not wish to comply with this requirement, all of the " "special methods supported by this class will need to be overridden; please " @@ -1819,11 +1879,11 @@ msgstr "" "de consulter les sources pour obtenir des informations sur les méthodes qui " "doivent être fournies dans ce cas." -#: library/collections.rst:1376 +#: library/collections.rst:1404 msgid ":class:`UserString` objects" msgstr "Objets :class:`UserString`" -#: library/collections.rst:1378 +#: library/collections.rst:1406 msgid "" "The class, :class:`UserString` acts as a wrapper around string objects. The " "need for this class has been partially supplanted by the ability to subclass " @@ -1836,7 +1896,7 @@ msgstr "" "plus facile de travailler avec cette classe, car la chaîne de caractère sous-" "jacente est accessible via un attribut." -#: library/collections.rst:1386 +#: library/collections.rst:1414 msgid "" "Class that simulates a string object. The instance's content is kept in a " "regular string object, which is accessible via the :attr:`data` attribute " @@ -1844,29 +1904,29 @@ msgid "" "to a copy of *seq*. The *seq* argument can be any object which can be " "converted into a string using the built-in :func:`str` function." msgstr "" -"Classe simulant une chaîne de caractères. Les instances de :class:" -"`UserString` possèdent un attribut :attr:`data` où est stocké leur contenu " -"sous forme de chaîne de caractères native. Le contenu de l'instance est " -"initialement une copie de *seq*, qui peut être n'importe quel objet " +"Classe simulant une chaîne de caractères. Les instances " +"de :class:`UserString` possèdent un attribut :attr:`data` où est stocké leur " +"contenu sous forme de chaîne de caractères native. Le contenu de l'instance " +"est initialement une copie de *seq*, qui peut être n'importe quel objet " "convertible en chaîne de caractère avec la fonction native :func:`str`." -#: library/collections.rst:1393 +#: library/collections.rst:1421 msgid "" -"In addition to supporting the methods and operations of strings, :class:" -"`UserString` instances provide the following attribute:" +"In addition to supporting the methods and operations of " +"strings, :class:`UserString` instances provide the following attribute:" msgstr "" "En plus de gérer les méthodes et opérations sur les chaînes de caractères, " "les instances de :class:`UserString` possèdent l'attribut suivant :" -#: library/collections.rst:1398 +#: library/collections.rst:1426 msgid "" -"A real :class:`str` object used to store the contents of the :class:" -"`UserString` class." +"A real :class:`str` object used to store the contents of " +"the :class:`UserString` class." msgstr "" -"Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :" -"class:`UserString`." +"Un objet :class:`str` natif utilisé pour stocker le contenu de la " +"classe :class:`UserString`." -#: library/collections.rst:1401 +#: library/collections.rst:1429 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." @@ -1875,9 +1935,9 @@ msgstr "" "``format_map``, ``isprintable`` et ``maketrans``." #~ msgid "" -#~ "Moved :ref:`collections-abstract-base-classes` to the :mod:`collections." -#~ "abc` module. For backwards compatibility, they continue to be visible in " -#~ "this module through Python 3.9." +#~ "Moved :ref:`collections-abstract-base-classes` to " +#~ "the :mod:`collections.abc` module. For backwards compatibility, they " +#~ "continue to be visible in this module through Python 3.9." #~ msgstr "" #~ "Les :ref:`collections-abstract-base-classes` ont été déplacées vers le " #~ "module :mod:`collections.abc`. Pour assurer la rétrocompatibilité, elles " diff --git a/library/colorsys.po b/library/colorsys.po index d92a39420..92bb00751 100644 --- a/library/colorsys.po +++ b/library/colorsys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2020-09-25 17:03-0600\n" "Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" @@ -20,16 +20,16 @@ msgstr "" msgid ":mod:`!colorsys` --- Conversions between color systems" msgstr ":mod:`colorsys` — Conversions entre les systèmes de couleurs" -#: library/colorsys.rst:9 +#: library/colorsys.rst:7 msgid "**Source code:** :source:`Lib/colorsys.py`" msgstr "**Code source :** :source:`Lib/colorsys.py`" -#: library/colorsys.rst:13 +#: library/colorsys.rst:11 #, fuzzy msgid "" -"The :mod:`colorsys` module defines bidirectional conversions of color values " -"between colors expressed in the RGB (Red Green Blue) color space used in " -"computer monitors and three other coordinate systems: YIQ, HLS (Hue " +"The :mod:`!colorsys` module defines bidirectional conversions of color " +"values between colors expressed in the RGB (Red Green Blue) color space used " +"in computer monitors and three other coordinate systems: YIQ, HLS (Hue " "Lightness Saturation) and HSV (Hue Saturation Value). Coordinates in all of " "these color spaces are floating-point values. In the YIQ space, the Y " "coordinate is between 0 and 1, but the I and Q coordinates can be positive " @@ -45,54 +45,55 @@ msgstr "" "positives ou négatives. Dans tous les autres espaces, les coordonnées sont " "toutes comprises entre 0 et 1." -#: library/colorsys.rst:23 +#: library/colorsys.rst:21 msgid "" "More information about color spaces can be found at https://poynton.ca/" -"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-spaces." -"htm." +"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-" +"spaces.htm." msgstr "" -"Consultez https://poynton.ca/ColorFAQ.html et https://www.cambridgeincolour." -"com/tutorials/color-spaces.htm pour plus d'informations concernant les " -"espaces colorimétriques." +"Consultez https://poynton.ca/ColorFAQ.html et https://" +"www.cambridgeincolour.com/tutorials/color-spaces.htm pour plus " +"d'informations concernant les espaces colorimétriques." -#: library/colorsys.rst:27 -msgid "The :mod:`colorsys` module defines the following functions:" +#: library/colorsys.rst:25 +#, fuzzy +msgid "The :mod:`!colorsys` module defines the following functions:" msgstr "Le module :mod:`colorsys` définit les fonctions suivantes :" -#: library/colorsys.rst:32 +#: library/colorsys.rst:30 msgid "Convert the color from RGB coordinates to YIQ coordinates." msgstr "" "Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées YIQ." -#: library/colorsys.rst:37 +#: library/colorsys.rst:35 msgid "Convert the color from YIQ coordinates to RGB coordinates." msgstr "" "Convertit la couleur des coordonnées YIQ vers les coordonnées RGB (RVB)." -#: library/colorsys.rst:42 +#: library/colorsys.rst:40 msgid "Convert the color from RGB coordinates to HLS coordinates." msgstr "" "Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées HLS " "(TSV)." -#: library/colorsys.rst:47 +#: library/colorsys.rst:45 msgid "Convert the color from HLS coordinates to RGB coordinates." msgstr "" "Convertit la couleur des coordonnées HLS (TSV) vers les coordonnées RGB " "(RVB)." -#: library/colorsys.rst:52 +#: library/colorsys.rst:50 msgid "Convert the color from RGB coordinates to HSV coordinates." msgstr "" "Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées HSV " "(TSV)." -#: library/colorsys.rst:57 +#: library/colorsys.rst:55 msgid "Convert the color from HSV coordinates to RGB coordinates." msgstr "" "Convertit la couleur des coordonnées HSV (TSV) vers les coordonnées RGB " "(RVB)." -#: library/colorsys.rst:59 +#: library/colorsys.rst:57 msgid "Example::" msgstr "Exemple ::" diff --git a/library/compileall.po b/library/compileall.po index 01498c8ce..112e0a586 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2022-10-18 16:06+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -43,7 +43,7 @@ msgstr "" #: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -112,15 +112,33 @@ msgstr "" "pour utilisation dans les traces d'appels et autres messages si le fichier " "source n'existe pas au moment de l'exécution." -#: library/compileall.rst:61 +#: library/compileall.rst:60 +#, fuzzy msgid "" -"Remove (``-s``) or append (``-p``) the given prefix of paths recorded in the " -"``.pyc`` files. Cannot be combined with ``-d``." +"Remove the given prefix from paths recorded in the ``.pyc`` files. Paths are " +"made relative to the prefix." msgstr "" "Retire (``-s``) ou ajoute (``-p``) le préfixe aux chemins stockés dans les " "fichiers ``.pyc``. Cette option ne peut pas être combinée avec ``-d``." +#: library/compileall.rst:63 +msgid "This option can be used with ``-p`` but not with ``-d``." +msgstr "" + #: library/compileall.rst:67 +#, fuzzy +msgid "" +"Prepend the given prefix to paths recorded in the ``.pyc`` files. Use ``-p /" +"`` to make the paths absolute." +msgstr "" +"Retire (``-s``) ou ajoute (``-p``) le préfixe aux chemins stockés dans les " +"fichiers ``.pyc``. Cette option ne peut pas être combinée avec ``-d``." + +#: library/compileall.rst:70 +msgid "This option can be used with ``-s`` but not with ``-d``." +msgstr "" + +#: library/compileall.rst:74 msgid "" "regex is used to search the full path to each file considered for " "compilation, and if the regex produces a match, the file is skipped." @@ -128,7 +146,7 @@ msgstr "" "Exclut tous les fichiers dont les noms correspondent à l'expression " "régulière *regex*." -#: library/compileall.rst:72 +#: library/compileall.rst:79 msgid "" "Read the file ``list`` and add each line that it contains to the list of " "files and directories to compile. If ``list`` is ``-``, read lines from " @@ -137,7 +155,7 @@ msgstr "" "Ajoute chaque ligne du fichier *list* aux fichiers et dossiers à compiler. " "*list* peut être ``-``, auquel cas le script lit l'entrée standard." -#: library/compileall.rst:78 +#: library/compileall.rst:85 msgid "" "Write the byte-code files to their legacy locations and names, which may " "overwrite byte-code files created by another version of Python. The default " @@ -150,7 +168,7 @@ msgstr "" "Elles permettent à différentes versions de l'interpréteur Python de " "coexister en conservant chacune ses propres fichiers ``.pyc``." -#: library/compileall.rst:85 +#: library/compileall.rst:92 msgid "" "Control the maximum recursion level for subdirectories. If this is given, " "then ``-l`` option will not be taken into account. :program:`python -m " @@ -162,17 +180,17 @@ msgstr "" "compileall -r 0` revient au même que :program:`python -m " "compileall -l`." -#: library/compileall.rst:92 +#: library/compileall.rst:99 #, fuzzy msgid "" "Use *N* workers to compile the files within the given directory. If ``0`` is " "used, then the result of :func:`os.process_cpu_count` will be used." msgstr "" "Effectue la compilation avec *N* processus parallèles. Si *N* vaut 0, autant " -"de processus sont créés que la machine dispose de processeurs (résultat de :" -"func:`os.cpu_count()`)." +"de processus sont créés que la machine dispose de processeurs (résultat " +"de :func:`os.cpu_count()`)." -#: library/compileall.rst:98 +#: library/compileall.rst:105 msgid "" "Control how the generated byte-code files are invalidated at runtime. The " "``timestamp`` value, means that ``.pyc`` files with the source timestamp and " @@ -180,9 +198,9 @@ msgid "" "values cause hash-based pycs to be generated. Hash-based pycs embed a hash " "of the source file contents rather than a timestamp. See :ref:`pyc-" "invalidation` for more information on how Python validates bytecode cache " -"files at runtime. The default is ``timestamp`` if the :envvar:" -"`SOURCE_DATE_EPOCH` environment variable is not set, and ``checked-hash`` if " -"the ``SOURCE_DATE_EPOCH`` environment variable is set." +"files at runtime. The default is ``timestamp`` if " +"the :envvar:`SOURCE_DATE_EPOCH` environment variable is not set, and " +"``checked-hash`` if the ``SOURCE_DATE_EPOCH`` environment variable is set." msgstr "" "Définit la manière dont les fichiers de code intermédiaire seront invalidés " "au moment de l'exécution. Avec ``timestamp``, les fichiers ``.pyc`` générés " @@ -195,7 +213,7 @@ msgstr "" "d'environnement :envvar:`SOURCE_DATE_EPOCH` a été réglée, elle devient " "``checked-hash``." -#: library/compileall.rst:111 +#: library/compileall.rst:118 msgid "" "Compile with the given optimization level. May be used multiple times to " "compile for multiple levels at a time (for example, ``compileall -o 1 -o " @@ -205,11 +223,11 @@ msgstr "" "plusieurs fois afin de compiler pour plusieurs niveaux d'un seul coup (par " "exemple, ``compileall -o 1 -o 2``)." -#: library/compileall.rst:117 +#: library/compileall.rst:124 msgid "Ignore symlinks pointing outside the given directory." msgstr "Ignore les liens symboliques qui redirigent en dehors du dossier." -#: library/compileall.rst:121 +#: library/compileall.rst:128 msgid "" "If two ``.pyc`` files with different optimization level have the same " "content, use hard links to consolidate duplicate files." @@ -218,11 +236,11 @@ msgstr "" "différents ont finalement le même contenu, emploie des liens physiques pour " "les fusionner." -#: library/compileall.rst:124 +#: library/compileall.rst:131 msgid "Added the ``-i``, ``-b`` and ``-h`` options." msgstr "ajout des options ``-i``, ``-b`` et ``-h``." -#: library/compileall.rst:127 +#: library/compileall.rst:134 msgid "" "Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option was changed " "to a multilevel value. ``-b`` will always produce a byte-code file ending " @@ -232,22 +250,22 @@ msgstr "" "prendre plusieurs niveaux). ``-b`` produit toujours un fichier de code " "intermédiaire portant l'extension ``.pyc``, et jamais ``.pyo``." -#: library/compileall.rst:132 +#: library/compileall.rst:139 msgid "Added the ``--invalidation-mode`` option." msgstr "ajout de l'option ``--invalidation-mode``." -#: library/compileall.rst:135 +#: library/compileall.rst:142 msgid "" "Added the ``-s``, ``-p``, ``-e`` and ``--hardlink-dupes`` options. Raised " "the default recursion limit from 10 to :py:func:`sys.getrecursionlimit()`. " "Added the possibility to specify the ``-o`` option multiple times." msgstr "" "ajout des options ``-s``, ``-p``, ``-e`` et ``--hardlink-dupes``. " -"Rehaussement de la limite de récursion par défaut à :py:func:`sys." -"getrecursionlimit()` au lieu de 10 précédemment. L'option ``-o`` peut être " -"passée plusieurs fois." +"Rehaussement de la limite de récursion par défaut " +"à :py:func:`sys.getrecursionlimit()` au lieu de 10 précédemment. L'option ``-" +"o`` peut être passée plusieurs fois." -#: library/compileall.rst:142 +#: library/compileall.rst:149 msgid "" "There is no command-line option to control the optimization level used by " "the :func:`compile` function, because the Python interpreter itself already " @@ -255,38 +273,38 @@ msgid "" msgstr "" "Il n'y a pas d'option en ligne de commande pour contrôler le niveau " "d'optimisation utilisé par la fonction :func:`compile`. Il suffit en effet " -"d'utiliser l'option ``-O`` de l'interpréteur Python lui-même : :program:" -"`python -O -m compileall`." +"d'utiliser l'option ``-O`` de l'interpréteur Python lui-" +"même : :program:`python -O -m compileall`." -#: library/compileall.rst:146 +#: library/compileall.rst:153 #, fuzzy msgid "" -"Similarly, the :func:`compile` function respects the :data:`sys." -"pycache_prefix` setting. The generated bytecode cache will only be useful " -"if :func:`compile` is run with the same :data:`sys.pycache_prefix` (if any) " -"that will be used at runtime." +"Similarly, the :func:`compile` function respects " +"the :data:`sys.pycache_prefix` setting. The generated bytecode cache will " +"only be useful if :func:`compile` is run with the " +"same :data:`sys.pycache_prefix` (if any) that will be used at runtime." msgstr "" -"De même, la fonction :func:`compile` utilise le réglage :attr:`sys." -"pycache_prefix`. Le code intermédiaire généré ne pourra servir que dans la " -"mesure où :func:`compile` est exécutée avec la même valeur de :attr:`sys." -"pycache_prefix` (si tant est qu'elle soit définie) que celle en vigueur au " -"moment d'exécuter le programme." +"De même, la fonction :func:`compile` utilise le " +"réglage :attr:`sys.pycache_prefix`. Le code intermédiaire généré ne pourra " +"servir que dans la mesure où :func:`compile` est exécutée avec la même " +"valeur de :attr:`sys.pycache_prefix` (si tant est qu'elle soit définie) que " +"celle en vigueur au moment d'exécuter le programme." -#: library/compileall.rst:152 +#: library/compileall.rst:159 msgid "Public functions" msgstr "Fonctions publiques" -#: library/compileall.rst:156 +#: library/compileall.rst:163 msgid "" -"Recursively descend the directory tree named by *dir*, compiling all :file:`." -"py` files along the way. Return a true value if all the files compiled " -"successfully, and a false value otherwise." +"Recursively descend the directory tree named by *dir*, compiling " +"all :file:`.py` files along the way. Return a true value if all the files " +"compiled successfully, and a false value otherwise." msgstr "" -"Parcourt récursivement le dossier *dir*, en compilant tous les fichiers :" -"file:`.py`. Renvoie une valeur vraie si tous les fichiers ont été compilés " -"sans erreur, et une valeur fausse dans le cas contraire." +"Parcourt récursivement le dossier *dir*, en compilant tous les " +"fichiers :file:`.py`. Renvoie une valeur vraie si tous les fichiers ont été " +"compilés sans erreur, et une valeur fausse dans le cas contraire." -#: library/compileall.rst:160 +#: library/compileall.rst:167 msgid "" "The *maxlevels* parameter is used to limit the depth of the recursion; it " "defaults to ``sys.getrecursionlimit()``." @@ -294,7 +312,7 @@ msgstr "" "Le paramètre *maxlevels* permet de limiter la profondeur de récursion. Sa " "valeur par défaut est celle de ``sys.getrecursionlimit()``." -#: library/compileall.rst:163 +#: library/compileall.rst:170 msgid "" "If *ddir* is given, it is prepended to the path to each file being compiled " "for use in compilation time tracebacks, and is also compiled in to the byte-" @@ -308,7 +326,7 @@ msgstr "" "fichiers de code intermédiaire, pour utilisation dans les traces et autres " "messages si le fichier source n'existe pas au moment de l'exécution." -#: library/compileall.rst:169 +#: library/compileall.rst:176 msgid "" "If *force* is true, modules are re-compiled even if the timestamps are up to " "date." @@ -316,7 +334,7 @@ msgstr "" "Si *force* est vrai, les modules sont recompilés même si leurs horodatages " "sont à jour." -#: library/compileall.rst:172 +#: library/compileall.rst:179 msgid "" "If *rx* is given, its ``search`` method is called on the complete path to " "each file considered for compilation, and if it returns a true value, the " @@ -325,10 +343,10 @@ msgid "" msgstr "" "Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " "de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " -"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." -"Pattern `)." +"est sauté. *rx* sera habituellement une expression régulière " +"(objet :ref:`re.Pattern `)." -#: library/compileall.rst:254 +#: library/compileall.rst:261 msgid "" "If *quiet* is ``False`` or ``0`` (the default), the filenames and other " "information are printed to standard out. Set to ``1``, only errors are " @@ -339,7 +357,7 @@ msgstr "" "``1``, seules les erreurs sont affichées. Avec ``2``, aucune sortie n'est " "émise." -#: library/compileall.rst:258 +#: library/compileall.rst:265 msgid "" "If *legacy* is true, byte-code files are written to their legacy locations " "and names, which may overwrite byte-code files created by another version of " @@ -349,12 +367,12 @@ msgid "" msgstr "" "Si *legacy* est vrai, les fichiers de code intermédiaire sont nommés et " "placés selon l'ancienne méthode, en écrasant éventuellement ceux générés par " -"une autre version de Python. Par défaut, les règles décrites dans la :pep:" -"`3147` s'appliquent. Elles permettent à différentes versions de " +"une autre version de Python. Par défaut, les règles décrites dans " +"la :pep:`3147` s'appliquent. Elles permettent à différentes versions de " "l'interpréteur Python de coexister en conservant chacune ses propres " "fichiers ``.pyc``." -#: library/compileall.rst:264 +#: library/compileall.rst:271 msgid "" "*optimize* specifies the optimization level for the compiler. It is passed " "to the built-in :func:`compile` function. Accepts also a sequence of " @@ -367,14 +385,14 @@ msgstr "" "d'optimisation, ce qui permet de compiler chaque fichier :file:`.py` " "plusieurs fois en appliquant divers niveaux d'optimisation." -#: library/compileall.rst:191 +#: library/compileall.rst:198 msgid "" "The argument *workers* specifies how many workers are used to compile files " "in parallel. The default is to not use multiple workers. If the platform " "can't use multiple workers and *workers* argument is given, then sequential " "compilation will be used as a fallback. If *workers* is 0, the number of " -"cores in the system is used. If *workers* is lower than ``0``, a :exc:" -"`ValueError` will be raised." +"cores in the system is used. If *workers* is lower than ``0``, " +"a :exc:`ValueError` will be raised." msgstr "" "*workers* est le nombre de tâches lancées en parallèle pour la compilation. " "Par défaut, les fichiers sont compilés séquentiellement. Cette même " @@ -383,17 +401,18 @@ msgstr "" "tâches sont lancées que le système comporte de cœurs. Si *workers* est " "strictement négatif, une exception de type :exc:`ValueError` est levée." -#: library/compileall.rst:268 +#: library/compileall.rst:275 msgid "" -"*invalidation_mode* should be a member of the :class:`py_compile." -"PycInvalidationMode` enum and controls how the generated pycs are " -"invalidated at runtime." +"*invalidation_mode* should be a member of " +"the :class:`py_compile.PycInvalidationMode` enum and controls how the " +"generated pycs are invalidated at runtime." msgstr "" -"*invalidation_mode* doit être un membre de l'énumération :class:`py_compile." -"PycInvalidationMode` et détermine la manière dont les fichiers :file:`.pyc` " -"sont invalidés lorsque l'interpréteur tente de les utiliser." +"*invalidation_mode* doit être un membre de " +"l'énumération :class:`py_compile.PycInvalidationMode` et détermine la " +"manière dont les fichiers :file:`.pyc` sont invalidés lorsque l'interpréteur " +"tente de les utiliser." -#: library/compileall.rst:272 +#: library/compileall.rst:279 #, fuzzy msgid "" "The *stripdir*, *prependdir* and *limit_sl_dest* arguments correspond to the " @@ -404,7 +423,7 @@ msgstr "" "options ``-s``, ``-p`` et ``-e`` décrites plus haut. Ils peuvent être de " "type ``str``, ``bytes`` ou :py:class:`os.PathLike`." -#: library/compileall.rst:276 +#: library/compileall.rst:283 msgid "" "If *hardlink_dupes* is true and two ``.pyc`` files with different " "optimization level have the same content, use hard links to consolidate " @@ -413,58 +432,58 @@ msgstr "" "Un argument *hardlink_dupes* vrai correspond à l'utilisation de l'option ``--" "hardlink-dupes``." -#: library/compileall.rst:307 +#: library/compileall.rst:314 msgid "Added the *legacy* and *optimize* parameter." msgstr "ajout des paramètres *legacy* et *optimize*." -#: library/compileall.rst:212 +#: library/compileall.rst:219 msgid "Added the *workers* parameter." msgstr "ajout du paramètre *workers*." -#: library/compileall.rst:281 library/compileall.rst:310 +#: library/compileall.rst:288 library/compileall.rst:317 msgid "*quiet* parameter was changed to a multilevel value." msgstr "le paramètre *quiet* peut prendre plusieurs niveaux." -#: library/compileall.rst:284 library/compileall.rst:313 +#: library/compileall.rst:291 library/compileall.rst:320 msgid "" "The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files no " "matter what the value of *optimize* is." msgstr "" -"Lorsque le paramètre *legacy* est vrai, des fichiers ``.pyc``, et jamais ``." -"pyo``, sont générés, quel que soit le niveau d'optimisation." +"Lorsque le paramètre *legacy* est vrai, des fichiers ``.pyc``, et jamais " +"``.pyo``, sont générés, quel que soit le niveau d'optimisation." -#: library/compileall.rst:222 +#: library/compileall.rst:229 msgid "Accepts a :term:`path-like object`." msgstr "accepte un :term:`objet simili-chemin `." -#: library/compileall.rst:288 library/compileall.rst:317 +#: library/compileall.rst:295 library/compileall.rst:324 msgid "The *invalidation_mode* parameter was added." msgstr "ajout du paramètre *invalidation_mode*." -#: library/compileall.rst:291 library/compileall.rst:320 +#: library/compileall.rst:298 library/compileall.rst:327 #, fuzzy msgid "" "The *invalidation_mode* parameter's default value is updated to ``None``." msgstr "" "La valeur par défaut du paramètre *invalidation_mode* est changée à ``None``." -#: library/compileall.rst:231 +#: library/compileall.rst:238 msgid "Setting *workers* to 0 now chooses the optimal number of cores." msgstr "" "Un nombre de processus adapté à la machine est choisi lorsque *workers* vaut " "0." -#: library/compileall.rst:234 +#: library/compileall.rst:241 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " -"arguments. Default value of *maxlevels* was changed from ``10`` to ``sys." -"getrecursionlimit()``" +"arguments. Default value of *maxlevels* was changed from ``10`` to " +"``sys.getrecursionlimit()``" msgstr "" "ajout des arguments *stripdir*, *prependdir*, *limit_sl_dest* et " "*hardlink_dupes*. La valeur par défaut de *maxlevels* a été changée pour " "``sys.getrecursionlimit()`` (elle était de 10 auparavant)." -#: library/compileall.rst:240 +#: library/compileall.rst:247 msgid "" "Compile the file with path *fullname*. Return a true value if the file " "compiled successfully, and a false value otherwise." @@ -472,7 +491,7 @@ msgstr "" "Compile le fichier dont le chemin est donné par *fullname*. Renvoie une " "valeur vraie si et seulement si le fichier est compilé sans erreur." -#: library/compileall.rst:243 +#: library/compileall.rst:250 msgid "" "If *ddir* is given, it is prepended to the path to the file being compiled " "for use in compilation time tracebacks, and is also compiled in to the byte-" @@ -486,7 +505,7 @@ msgstr "" "code intermédiaire, pour utilisation dans les traces et autres messages si " "le fichier source n'existe pas au moment de l'exécution." -#: library/compileall.rst:249 +#: library/compileall.rst:256 msgid "" "If *rx* is given, its ``search`` method is passed the full path name to the " "file being compiled, and if it returns a true value, the file is not " @@ -496,10 +515,10 @@ msgid "" msgstr "" "Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " "de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " -"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." -"Pattern `)." +"est sauté. *rx* sera habituellement une expression régulière " +"(objet :ref:`re.Pattern `)." -#: library/compileall.rst:294 +#: library/compileall.rst:301 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " "arguments." @@ -507,29 +526,29 @@ msgstr "" "Ajout des arguments *stripdir*, *prependdir*, *limit_sl_dest* et " "*hardlink_dupes*." -#: library/compileall.rst:299 +#: library/compileall.rst:306 msgid "" "Byte-compile all the :file:`.py` files found along ``sys.path``. Return a " "true value if all the files compiled successfully, and a false value " "otherwise." msgstr "" -"Compile tous les fichiers :file:`.py` contenus dans les dossiers de ``sys." -"path``. Renvoie une valeur vraie s'ils ont tous été compilés sans erreur, et " -"une valeur fausse dans le cas contraire." +"Compile tous les fichiers :file:`.py` contenus dans les dossiers de " +"``sys.path``. Renvoie une valeur vraie s'ils ont tous été compilés sans " +"erreur, et une valeur fausse dans le cas contraire." -#: library/compileall.rst:302 +#: library/compileall.rst:309 msgid "" "If *skip_curdir* is true (the default), the current directory is not " -"included in the search. All other parameters are passed to the :func:" -"`compile_dir` function. Note that unlike the other compile functions, " -"``maxlevels`` defaults to ``0``." +"included in the search. All other parameters are passed to " +"the :func:`compile_dir` function. Note that unlike the other compile " +"functions, ``maxlevels`` defaults to ``0``." msgstr "" "Si *skip_curdir* est vrai (c'est le cas par défaut), le dossier courant est " -"exclu de la recherche. Les autres paramètres sont passés à :func:" -"`compile_dir`. Notez que contrairement aux autres fonctions de ce module, la " -"valeur par défaut de ``maxlevels`` est ``0``." +"exclu de la recherche. Les autres paramètres sont passés " +"à :func:`compile_dir`. Notez que contrairement aux autres fonctions de ce " +"module, la valeur par défaut de ``maxlevels`` est ``0``." -#: library/compileall.rst:323 +#: library/compileall.rst:330 msgid "" "To force a recompile of all the :file:`.py` files in the :file:`Lib/` " "subdirectory and all its subdirectories::" @@ -537,10 +556,10 @@ msgstr "" "Pour forcer la recompilation de tous les fichiers :file:`.py` dans le " "dossier :file:`Lib/` et tous ses sous-dossiers ::" -#: library/compileall.rst:340 +#: library/compileall.rst:347 msgid "Module :mod:`py_compile`" msgstr "Module :mod:`py_compile`" -#: library/compileall.rst:341 +#: library/compileall.rst:348 msgid "Byte-compile a single source file." msgstr "Compiler un fichier source unique." diff --git a/library/compression.po b/library/compression.po new file mode 100644 index 000000000..3af216abd --- /dev/null +++ b/library/compression.po @@ -0,0 +1,51 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/compression.rst:2 +msgid "The :mod:`!compression` package" +msgstr "" + +#: library/compression.rst:8 +msgid "" +"The :mod:`!compression` package contains the canonical compression modules " +"containing interfaces to several different compression algorithms. Some of " +"these modules have historically been available as separate modules; those " +"will continue to be available under their original names for compatibility " +"reasons, and will not be removed without a deprecation cycle. The use of " +"modules in :mod:`!compression` is encouraged where practical." +msgstr "" + +#: library/compression.rst:15 +msgid ":mod:`!compression.bz2` -- Re-exports :mod:`bz2`" +msgstr "" + +#: library/compression.rst:16 +msgid ":mod:`!compression.gzip` -- Re-exports :mod:`gzip`" +msgstr "" + +#: library/compression.rst:17 +msgid ":mod:`!compression.lzma` -- Re-exports :mod:`lzma`" +msgstr "" + +#: library/compression.rst:18 +msgid ":mod:`!compression.zlib` -- Re-exports :mod:`zlib`" +msgstr "" + +#: library/compression.rst:19 +msgid "" +":mod:`compression.zstd` -- Wrapper for the Zstandard compression library" +msgstr "" diff --git a/library/compression.zstd.po b/library/compression.zstd.po new file mode 100644 index 000000000..ae096e319 --- /dev/null +++ b/library/compression.zstd.po @@ -0,0 +1,1085 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/compression.zstd.rst:2 +msgid "" +":mod:`!compression.zstd` --- Compression compatible with the Zstandard format" +msgstr "" + +#: library/compression.zstd.rst:10 +msgid "**Source code:** :source:`Lib/compression/zstd/__init__.py`" +msgstr "" + +#: library/compression.zstd.rst:14 +msgid "" +"This module provides classes and functions for compressing and decompressing " +"data using the Zstandard (or *zstd*) compression algorithm. The `zstd manual " +"`__ describes " +"Zstandard as \"a fast lossless compression algorithm, targeting real-time " +"compression scenarios at zlib-level and better compression ratios.\" Also " +"included is a file interface that supports reading and writing the contents " +"of ``.zst`` files created by the :program:`zstd` utility, as well as raw " +"zstd compressed streams." +msgstr "" + +#: library/compression.zstd.rst:23 +msgid "The :mod:`!compression.zstd` module contains:" +msgstr "" + +#: library/compression.zstd.rst:25 +msgid "" +"The :func:`.open` function and :class:`ZstdFile` class for reading and " +"writing compressed files." +msgstr "" + +#: library/compression.zstd.rst:27 +msgid "" +"The :class:`ZstdCompressor` and :class:`ZstdDecompressor` classes for " +"incremental (de)compression." +msgstr "" + +#: library/compression.zstd.rst:29 +msgid "" +"The :func:`compress` and :func:`decompress` functions for one-shot " +"(de)compression." +msgstr "" +"Les fonctions :func:`compress` et :func:`decompress` pour la (dé)compression " +"en une seule fois." + +#: library/compression.zstd.rst:31 +msgid "" +"The :func:`train_dict` and :func:`finalize_dict` functions and " +"the :class:`ZstdDict` class to train and manage Zstandard dictionaries." +msgstr "" + +#: library/compression.zstd.rst:33 +msgid "" +"The :class:`CompressionParameter`, :class:`DecompressionParameter`, " +"and :class:`Strategy` classes for setting advanced (de)compression " +"parameters." +msgstr "" + +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + +#: library/compression.zstd.rst:40 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/compression.zstd.rst:44 +msgid "" +"This exception is raised when an error occurs during compression or " +"decompression, or while initializing the (de)compressor state." +msgstr "" + +#: library/compression.zstd.rst:49 +msgid "Reading and writing compressed files" +msgstr "Lire et écrire des fichiers compressés" + +#: library/compression.zstd.rst:54 +msgid "" +"Open a Zstandard-compressed file in binary or text mode, returning " +"a :term:`file object`." +msgstr "" + +#: library/compression.zstd.rst:57 +msgid "" +"The *file* argument can be either a file name (given as " +"a :class:`str`, :class:`bytes` or :term:`path-like ` " +"object), in which case the named file is opened, or it can be an existing " +"file object to read from or write to." +msgstr "" + +#: library/compression.zstd.rst:62 +msgid "" +"The mode argument can be either ``'rb'`` for reading (default), ``'wb'`` for " +"overwriting, ``'ab'`` for appending, or ``'xb'`` for exclusive creation. " +"These can equivalently be given as ``'r'``, ``'w'``, ``'a'``, and ``'x'`` " +"respectively. You may also open in text mode with ``'rt'``, ``'wt'``, " +"``'at'``, and ``'xt'`` respectively." +msgstr "" + +#: library/compression.zstd.rst:68 library/compression.zstd.rst:112 +msgid "" +"When reading, the *options* argument can be a dictionary providing advanced " +"decompression parameters; see :class:`DecompressionParameter` for detailed " +"information about supported parameters. The *zstd_dict* argument is " +"a :class:`ZstdDict` instance to be used during decompression. When reading, " +"if the *level* argument is not None, a :exc:`!TypeError` will be raised." +msgstr "" + +#: library/compression.zstd.rst:75 +msgid "" +"When writing, the *options* argument can be a dictionary providing advanced " +"compression parameters; see :class:`CompressionParameter` for detailed " +"information about supported parameters. The *level* argument is the " +"compression level to use when writing compressed data. Only one of *level* " +"or *options* may be non-None. The *zstd_dict* argument is " +"a :class:`ZstdDict` instance to be used during compression." +msgstr "" + +#: library/compression.zstd.rst:83 +msgid "" +"In binary mode, this function is equivalent to the :class:`ZstdFile` " +"constructor: ``ZstdFile(file, mode, ...)``. In this case, the *encoding*, " +"*errors*, and *newline* parameters must not be provided." +msgstr "" + +#: library/compression.zstd.rst:87 +msgid "" +"In text mode, a :class:`ZstdFile` object is created, and wrapped in " +"an :class:`io.TextIOWrapper` instance with the specified encoding, error " +"handling behavior, and line endings." +msgstr "" + +#: library/compression.zstd.rst:95 +msgid "Open a Zstandard-compressed file in binary mode." +msgstr "" + +#: library/compression.zstd.rst:97 +msgid "" +"A :class:`ZstdFile` can wrap an already-open :term:`file object`, or operate " +"directly on a named file. The *file* argument specifies either the file " +"object to wrap, or the name of the file to open (as " +"a :class:`str`, :class:`bytes` or :term:`path-like ` " +"object). If wrapping an existing file object, the wrapped file will not be " +"closed when the :class:`ZstdFile` is closed." +msgstr "" + +#: library/compression.zstd.rst:104 +msgid "" +"The *mode* argument can be either ``'rb'`` for reading (default), ``'wb'`` " +"for overwriting, ``'xb'`` for exclusive creation, or ``'ab'`` for appending. " +"These can equivalently be given as ``'r'``, ``'w'``, ``'x'`` and ``'a'`` " +"respectively." +msgstr "" + +#: library/compression.zstd.rst:109 +msgid "" +"If *file* is a file object (rather than an actual file name), a mode of " +"``'w'`` does not truncate the file, and is instead equivalent to ``'a'``." +msgstr "" + +#: library/compression.zstd.rst:119 +msgid "" +"When writing, the *options* argument can be a dictionary providing advanced " +"compression parameters; see :class:`CompressionParameter` for detailed " +"information about supported parameters. The *level* argument is the " +"compression level to use when writing compressed data. Only one of *level* " +"or *options* may be passed. The *zstd_dict* argument is a :class:`ZstdDict` " +"instance to be used during compression." +msgstr "" + +#: library/compression.zstd.rst:127 +msgid "" +":class:`!ZstdFile` supports all the members specified " +"by :class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach` " +"and :meth:`~io.IOBase.truncate`. Iteration and the :keyword:`with` statement " +"are supported." +msgstr "" + +#: library/compression.zstd.rst:132 +msgid "The following method and attributes are also provided:" +msgstr "" + +#: library/compression.zstd.rst:136 +msgid "" +"Return buffered data without advancing the file position. At least one byte " +"of data will be returned, unless EOF has been reached. The exact number of " +"bytes returned is unspecified (the *size* argument is ignored)." +msgstr "" +"Renvoie la donnée en mémoire-tampon sans progression de la position du " +"fichier. Au moins un octet de donnée sera renvoyé, jusqu'à ce que l'EOF soit " +"atteinte. Le nombre exact d'octets renvoyés demeure indéterminé (l'argument " +"*taille* est ignoré)." + +#: library/compression.zstd.rst:140 +msgid "" +"While calling :meth:`peek` does not change the file position of " +"the :class:`ZstdFile`, it may change the position of the underlying file " +"object (for example, if the :class:`ZstdFile` was constructed by passing a " +"file object for *file*)." +msgstr "" + +#: library/compression.zstd.rst:147 +msgid "``'rb'`` for reading and ``'wb'`` for writing." +msgstr "" + +#: library/compression.zstd.rst:151 +msgid "" +"The name of the Zstandard file. Equivalent to the :attr:`~io.FileIO.name` " +"attribute of the underlying :term:`file object`." +msgstr "" + +#: library/compression.zstd.rst:156 +msgid "Compressing and decompressing data in memory" +msgstr "Compresser et décompresser une donnée en mémoire" + +#: library/compression.zstd.rst:160 +msgid "" +"Compress *data* (a :term:`bytes-like object`), returning the compressed data " +"as a :class:`bytes` object." +msgstr "" + +#: library/compression.zstd.rst:163 library/compression.zstd.rst:207 +msgid "" +"The *level* argument is an integer controlling the level of compression. " +"*level* is an alternative to " +"setting :attr:`CompressionParameter.compression_level` in *options*. " +"Use :meth:`~CompressionParameter.bounds` " +"on :attr:`~CompressionParameter.compression_level` to get the values that " +"can be passed for *level*. If advanced compression options are needed, the " +"*level* argument must be omitted and in the *options* dictionary the :attr:`!" +"CompressionParameter.compression_level` parameter should be set." +msgstr "" + +#: library/compression.zstd.rst:172 library/compression.zstd.rst:216 +msgid "" +"The *options* argument is a Python dictionary containing advanced " +"compression parameters. The valid keys and values for compression parameters " +"are documented as part of the :class:`CompressionParameter` documentation." +msgstr "" + +#: library/compression.zstd.rst:176 +msgid "" +"The *zstd_dict* argument is an instance of :class:`ZstdDict` containing " +"trained data to improve compression efficiency. The " +"function :func:`train_dict` can be used to generate a Zstandard dictionary." +msgstr "" + +#: library/compression.zstd.rst:183 +msgid "" +"Decompress *data* (a :term:`bytes-like object`), returning the uncompressed " +"data as a :class:`bytes` object." +msgstr "" + +#: library/compression.zstd.rst:186 library/compression.zstd.rst:308 +msgid "" +"The *options* argument is a Python dictionary containing advanced " +"decompression parameters. The valid keys and values for compression " +"parameters are documented as part of the :class:`DecompressionParameter` " +"documentation." +msgstr "" + +#: library/compression.zstd.rst:191 library/compression.zstd.rst:313 +msgid "" +"The *zstd_dict* argument is an instance of :class:`ZstdDict` containing " +"trained data used during compression. This must be the same Zstandard " +"dictionary used during compression." +msgstr "" + +#: library/compression.zstd.rst:195 +msgid "" +"If *data* is the concatenation of multiple distinct compressed frames, " +"decompress all of these frames, and return the concatenation of the results." +msgstr "" + +#: library/compression.zstd.rst:201 +msgid "" +"Create a compressor object, which can be used to compress data incrementally." +msgstr "" +"Créé un objet compresseur, qui peut être utilisé pour compresser " +"incrémentalement une donnée." + +#: library/compression.zstd.rst:204 +msgid "" +"For a more convenient way of compressing a single chunk of data, see the " +"module-level function :func:`compress`." +msgstr "" + +#: library/compression.zstd.rst:220 +msgid "" +"The *zstd_dict* argument is an optional instance of :class:`ZstdDict` " +"containing trained data to improve compression efficiency. The " +"function :func:`train_dict` can be used to generate a Zstandard dictionary." +msgstr "" + +#: library/compression.zstd.rst:227 +msgid "" +"Compress *data* (a :term:`bytes-like object`), returning a :class:`bytes` " +"object with compressed data if possible, or otherwise an empty :class:`!" +"bytes` object. Some of *data* may be buffered internally, for use in later " +"calls to :meth:`!compress` and :meth:`~.flush`. The returned data should be " +"concatenated with the output of any previous calls to :meth:`~.compress`." +msgstr "" + +#: library/compression.zstd.rst:234 +msgid "" +"The *mode* argument is a :class:`ZstdCompressor` attribute, " +"either :attr:`~.CONTINUE`, :attr:`~.FLUSH_BLOCK`, or :attr:`~.FLUSH_FRAME`." +msgstr "" + +#: library/compression.zstd.rst:238 +msgid "" +"When all data has been provided to the compressor, call the :meth:`~.flush` " +"method to finish the compression process. If :meth:`~.compress` is called " +"with *mode* set to :attr:`~.FLUSH_FRAME`, :meth:`~.flush` should not be " +"called, as it would write out a new empty frame." +msgstr "" + +#: library/compression.zstd.rst:246 +msgid "" +"Finish the compression process, returning a :class:`bytes` object containing " +"any data stored in the compressor's internal buffers." +msgstr "" +"Conclut l'opération de compression, en renvoyant l'objet :class:`bytes` " +"constitué de toutes les données stockées dans les tampons interne du " +"compresseur." + +#: library/compression.zstd.rst:249 +msgid "" +"The *mode* argument is a :class:`ZstdCompressor` attribute, " +"either :attr:`~.FLUSH_BLOCK`, or :attr:`~.FLUSH_FRAME`." +msgstr "" + +#: library/compression.zstd.rst:254 +msgid "" +"Specify the amount of uncompressed data *size* that will be provided for the " +"next frame. *size* will be written into the frame header of the next frame " +"unless :attr:`CompressionParameter.content_size_flag` is ``False`` or ``0``. " +"A size of ``0`` means that the frame is empty. If *size* is ``None``, the " +"frame header will omit the frame size. Frames that include the uncompressed " +"data size require less memory to decompress, especially at higher " +"compression levels." +msgstr "" + +#: library/compression.zstd.rst:262 +msgid "" +"If :attr:`last_mode` is not :attr:`FLUSH_FRAME`, a :exc:`ValueError` is " +"raised as the compressor is not at the start of a frame. If the pledged size " +"does not match the actual size of data provided to :meth:`.compress`, future " +"calls to :meth:`!compress` or :meth:`flush` may raise :exc:`ZstdError` and " +"the last chunk of data may be lost." +msgstr "" + +#: library/compression.zstd.rst:269 +msgid "" +"After :meth:`flush` or :meth:`.compress` are called with " +"mode :attr:`FLUSH_FRAME`, the next frame will not include the frame size " +"into the header unless :meth:`!set_pledged_input_size` is called again." +msgstr "" + +#: library/compression.zstd.rst:275 +msgid "" +"Collect more data for compression, which may or may not generate output " +"immediately. This mode optimizes the compression ratio by maximizing the " +"amount of data per block and frame." +msgstr "" + +#: library/compression.zstd.rst:281 +msgid "" +"Complete and write a block to the data stream. The data returned so far can " +"be immediately decompressed. Past data can still be referenced in future " +"blocks generated by calls to :meth:`~.compress`, improving compression." +msgstr "" + +#: library/compression.zstd.rst:288 +msgid "" +"Complete and write out a frame. Future data provided to :meth:`~.compress` " +"will be written into a new frame and *cannot* reference past data." +msgstr "" + +#: library/compression.zstd.rst:294 +msgid "" +"The last mode passed to either :meth:`~.compress` or :meth:`~.flush`. The " +"value can be one of :attr:`~.CONTINUE`, :attr:`~.FLUSH_BLOCK`, " +"or :attr:`~.FLUSH_FRAME`. The initial value is :attr:`~.FLUSH_FRAME`, " +"signifying that the compressor is at the start of a new frame." +msgstr "" + +#: library/compression.zstd.rst:302 +msgid "" +"Create a decompressor object, which can be used to decompress data " +"incrementally." +msgstr "" +"Créé un objet de décompression, pour décompresser de façon incrémentale une " +"donnée." + +#: library/compression.zstd.rst:305 +msgid "" +"For a more convenient way of decompressing an entire compressed stream at " +"once, see the module-level function :func:`decompress`." +msgstr "" + +#: library/compression.zstd.rst:318 +msgid "" +"This class does not transparently handle inputs containing multiple " +"compressed frames, unlike the :func:`decompress` function " +"and :class:`ZstdFile` class. To decompress a multi-frame input, you should " +"use :func:`decompress`, :class:`ZstdFile` if working with a :term:`file " +"object`, or multiple :class:`!ZstdDecompressor` instances." +msgstr "" + +#: library/compression.zstd.rst:326 +msgid "" +"Decompress *data* (a :term:`bytes-like object`), returning uncompressed data " +"as bytes. Some of *data* may be buffered internally, for use in later calls " +"to :meth:`!decompress`. The returned data should be concatenated with the " +"output of any previous calls to :meth:`!decompress`." +msgstr "" + +#: library/compression.zstd.rst:332 +msgid "" +"If *max_length* is non-negative, the method returns at most *max_length* " +"bytes of decompressed data. If this limit is reached and further output can " +"be produced (or EOF is reached), the :attr:`~.needs_input` attribute will be " +"set to ``False``. In this case, the next call to :meth:`~.decompress` may " +"provide *data* as ``b''`` to obtain more of the output. The full content can " +"thus be read like::" +msgstr "" + +#: library/compression.zstd.rst:343 +msgid "" +"If all of the input data was decompressed and returned (either because this " +"was less than *max_length* bytes, or because *max_length* was negative), " +"the :attr:`~.needs_input` attribute will be set to ``True``." +msgstr "" +"Si toutes les données entrées ont été décompressées et renvoyées (soit parce " +"qu'il y avait moins de *max_length* octets, ou parce que *max_length* était " +"négatif), l'attribut :attr:`~.needs_input` sera configuré sur ``True``." + +#: library/compression.zstd.rst:348 +msgid "" +"Attempting to decompress data after the end of a frame will raise " +"a :exc:`ZstdError`. Any data found after the end of the frame is ignored and " +"saved in the :attr:`~.unused_data` attribute." +msgstr "" + +#: library/compression.zstd.rst:354 +msgid "``True`` if the end-of-stream marker has been reached." +msgstr "``True`` si le marqueur de fin de flux a été atteint." + +#: library/compression.zstd.rst:358 +msgid "Data found after the end of the compressed stream." +msgstr "Donnée trouvée après la fin du flux compressé." + +#: library/compression.zstd.rst:360 +msgid "Before the end of the stream is reached, this will be ``b''``." +msgstr "" + +#: library/compression.zstd.rst:364 +msgid "" +"``False`` if the :meth:`.decompress` method can provide more decompressed " +"data before requiring new compressed input." +msgstr "" + +#: library/compression.zstd.rst:369 +msgid "Zstandard dictionaries" +msgstr "" + +#: library/compression.zstd.rst:374 +msgid "" +"Train a Zstandard dictionary, returning a :class:`ZstdDict` instance. " +"Zstandard dictionaries enable more efficient compression of smaller sizes of " +"data, which is traditionally difficult to compress due to less repetition. " +"If you are compressing multiple similar groups of data (such as similar " +"files), Zstandard dictionaries can improve compression ratios and speed " +"significantly." +msgstr "" + +#: library/compression.zstd.rst:381 +msgid "" +"The *samples* argument (an iterable of :class:`bytes` objects), is the " +"population of samples used to train the Zstandard dictionary." +msgstr "" + +#: library/compression.zstd.rst:384 +msgid "" +"The *dict_size* argument, an integer, is the maximum size (in bytes) the " +"Zstandard dictionary should be. The Zstandard documentation suggests an " +"absolute maximum of no more than 100 KB, but the maximum can often be " +"smaller depending on the data. Larger dictionaries generally slow down " +"compression, but improve compression ratios. Smaller dictionaries lead to " +"faster compression, but reduce the compression ratio." +msgstr "" + +#: library/compression.zstd.rst:394 +msgid "" +"An advanced function for converting a \"raw content\" Zstandard dictionary " +"into a regular Zstandard dictionary. \"Raw content\" dictionaries are a " +"sequence of bytes that do not need to follow the structure of a normal " +"Zstandard dictionary." +msgstr "" + +#: library/compression.zstd.rst:399 +msgid "" +"The *zstd_dict* argument is a :class:`ZstdDict` instance with " +"the :attr:`~ZstdDict.dict_content` containing the raw dictionary contents." +msgstr "" + +#: library/compression.zstd.rst:402 +msgid "" +"The *samples* argument (an iterable of :class:`bytes` objects), contains " +"sample data for generating the Zstandard dictionary." +msgstr "" + +#: library/compression.zstd.rst:405 +msgid "" +"The *dict_size* argument, an integer, is the maximum size (in bytes) the " +"Zstandard dictionary should be. See :func:`train_dict` for suggestions on " +"the maximum dictionary size." +msgstr "" + +#: library/compression.zstd.rst:409 +msgid "" +"The *level* argument (an integer) is the compression level expected to be " +"passed to the compressors using this dictionary. The dictionary information " +"varies for each compression level, so tuning for the proper compression " +"level can make compression more efficient." +msgstr "" + +#: library/compression.zstd.rst:417 +msgid "" +"A wrapper around Zstandard dictionaries. Dictionaries can be used to improve " +"the compression of many small chunks of data. Use :func:`train_dict` if you " +"need to train a new dictionary from sample data." +msgstr "" + +#: library/compression.zstd.rst:421 +msgid "" +"The *dict_content* argument (a :term:`bytes-like object`), is the already " +"trained dictionary information." +msgstr "" + +#: library/compression.zstd.rst:424 +msgid "" +"The *is_raw* argument, a boolean, is an advanced parameter controlling the " +"meaning of *dict_content*. ``True`` means *dict_content* is a \"raw " +"content\" dictionary, without any format restrictions. ``False`` means " +"*dict_content* is an ordinary Zstandard dictionary, created from Zstandard " +"functions, for example, :func:`train_dict` or the external :program:`zstd` " +"CLI." +msgstr "" + +#: library/compression.zstd.rst:430 +msgid "" +"When passing a :class:`!ZstdDict` to a function, the :attr:`!" +"as_digested_dict` and :attr:`!as_undigested_dict` attributes can control how " +"the dictionary is loaded by passing them as the ``zstd_dict`` argument, for " +"example, ``compress(data, zstd_dict=zd.as_digested_dict)``. Digesting a " +"dictionary is a costly operation that occurs when loading a Zstandard " +"dictionary. When making multiple calls to compression or decompression, " +"passing a digested dictionary will reduce the overhead of loading the " +"dictionary." +msgstr "" + +#: library/compression.zstd.rst:439 +msgid "Difference for compression" +msgstr "" + +#: library/compression.zstd.rst:444 +msgid "Digested dictionary" +msgstr "" + +#: library/compression.zstd.rst:445 +msgid "Undigested dictionary" +msgstr "" + +#: library/compression.zstd.rst:446 +msgid "" +"Advanced parameters of the compressor which may be overridden by the " +"dictionary's parameters" +msgstr "" + +#: library/compression.zstd.rst:448 +msgid "" +"``window_log``, ``hash_log``, ``chain_log``, ``search_log``, ``min_match``, " +"``target_length``, ``strategy``, ``enable_long_distance_matching``, " +"``ldm_hash_log``, ``ldm_min_match``, ``ldm_bucket_size_log``, " +"``ldm_hash_rate_log``, and some non-public parameters." +msgstr "" + +#: library/compression.zstd.rst:453 +msgid "None" +msgstr "None" + +#: library/compression.zstd.rst:454 +msgid ":class:`!ZstdDict` internally caches the dictionary" +msgstr "" + +#: library/compression.zstd.rst:455 +msgid "" +"Yes. It's faster when loading a digested dictionary again with the same " +"compression level." +msgstr "" + +#: library/compression.zstd.rst:457 +msgid "" +"No. If you wish to load an undigested dictionary multiple times, consider " +"reusing a compressor object." +msgstr "" + +#: library/compression.zstd.rst:460 +msgid "" +"If passing a :class:`!ZstdDict` without any attribute, an undigested " +"dictionary is passed by default when compressing and a digested dictionary " +"is generated if necessary and passed by default when decompressing." +msgstr "" + +#: library/compression.zstd.rst:466 +msgid "" +"The content of the Zstandard dictionary, a ``bytes`` object. It's the same " +"as the *dict_content* argument in the ``__init__`` method. It can be used " +"with other programs, such as the ``zstd`` CLI program." +msgstr "" + +#: library/compression.zstd.rst:472 +msgid "Identifier of the Zstandard dictionary, a non-negative int value." +msgstr "" + +#: library/compression.zstd.rst:474 +msgid "" +"Non-zero means the dictionary is ordinary, created by Zstandard functions " +"and following the Zstandard format." +msgstr "" + +#: library/compression.zstd.rst:477 +msgid "" +"``0`` means a \"raw content\" dictionary, free of any format restriction, " +"used for advanced users." +msgstr "" + +#: library/compression.zstd.rst:482 +msgid "" +"The meaning of ``0`` for :attr:`!ZstdDict.dict_id` is different from the " +"``dictionary_id`` attribute to the :func:`get_frame_info` function." +msgstr "" + +#: library/compression.zstd.rst:488 +msgid "Load as a digested dictionary." +msgstr "" + +#: library/compression.zstd.rst:492 +msgid "Load as an undigested dictionary." +msgstr "" + +#: library/compression.zstd.rst:496 +msgid "Advanced parameter control" +msgstr "" + +#: library/compression.zstd.rst:500 +msgid "" +"An :class:`~enum.IntEnum` containing the advanced compression parameter keys " +"that can be used when compressing data." +msgstr "" + +#: library/compression.zstd.rst:503 library/compression.zstd.rst:737 +msgid "" +"The :meth:`~.bounds` method can be used on any attribute to get the valid " +"values for that parameter." +msgstr "" + +#: library/compression.zstd.rst:506 +msgid "" +"Parameters are optional; any omitted parameter will have it's value selected " +"automatically." +msgstr "" + +#: library/compression.zstd.rst:509 +msgid "" +"Example getting the lower and upper bound of :attr:`~.compression_level`::" +msgstr "" + +#: library/compression.zstd.rst:513 +msgid "Example setting the :attr:`~.window_log` to the maximum size::" +msgstr "" + +#: library/compression.zstd.rst:521 +msgid "" +"Return the tuple of int bounds, ``(lower, upper)``, of a compression " +"parameter. This method should be called on the attribute you wish to " +"retrieve the bounds of. For example, to get the valid values " +"for :attr:`~.compression_level`, one may check the result of " +"``CompressionParameter.compression_level.bounds()``." +msgstr "" + +#: library/compression.zstd.rst:527 library/compression.zstd.rst:755 +msgid "Both the lower and upper bounds are inclusive." +msgstr "" + +#: library/compression.zstd.rst:531 +msgid "" +"A high-level means of setting other compression parameters that affect the " +"speed and ratio of compressing data." +msgstr "" + +#: library/compression.zstd.rst:534 +msgid "" +"Regular compression levels are greater than ``0``. Values greater than " +"``20`` are considered \"ultra\" compression and require more memory than " +"other levels. Negative values can be used to trade off faster compression " +"for worse compression ratios." +msgstr "" + +#: library/compression.zstd.rst:539 +msgid "Setting the level to zero uses :attr:`COMPRESSION_LEVEL_DEFAULT`." +msgstr "" + +#: library/compression.zstd.rst:543 +msgid "" +"Maximum allowed back-reference distance the compressor can use when " +"compressing data, expressed as power of two, ``1 << window_log`` bytes. This " +"parameter greatly influences the memory usage of compression. Higher values " +"require more memory but gain better compression values." +msgstr "" + +#: library/compression.zstd.rst:548 library/compression.zstd.rst:557 +#: library/compression.zstd.rst:568 library/compression.zstd.rst:576 +#: library/compression.zstd.rst:587 library/compression.zstd.rst:602 +#: library/compression.zstd.rst:633 library/compression.zstd.rst:640 +#: library/compression.zstd.rst:648 library/compression.zstd.rst:656 +#: library/compression.zstd.rst:715 library/compression.zstd.rst:764 +msgid "A value of zero causes the value to be selected automatically." +msgstr "" + +#: library/compression.zstd.rst:552 +msgid "" +"Size of the initial probe table, as a power of two. The resulting memory " +"usage is ``1 << (hash_log+2)`` bytes. Larger tables improve compression " +"ratio of strategies <= :attr:`~Strategy.dfast`, and improve compression " +"speed of strategies > :attr:`~Strategy.dfast`." +msgstr "" + +#: library/compression.zstd.rst:561 +msgid "" +"Size of the multi-probe search table, as a power of two. The resulting " +"memory usage is ``1 << (chain_log+2)`` bytes. Larger tables result in better " +"and slower compression. This parameter has no effect for " +"the :attr:`~Strategy.fast` strategy. It's still useful when " +"using :attr:`~Strategy.dfast` strategy, in which case it defines a secondary " +"probe table." +msgstr "" + +#: library/compression.zstd.rst:572 +msgid "" +"Number of search attempts, as a power of two. More attempts result in better " +"and slower compression. This parameter is useless for :attr:`~Strategy.fast` " +"and :attr:`~Strategy.dfast` strategies." +msgstr "" + +#: library/compression.zstd.rst:580 +msgid "" +"Minimum size of searched matches. Larger values increase compression and " +"decompression speed, but decrease ratio. Note that Zstandard can still find " +"matches of smaller size, it just tweaks its search algorithm to look for " +"this size and larger. For all strategies < :attr:`~Strategy.btopt`, the " +"effective minimum is ``4``; for all strategies > :attr:`~Strategy.fast`, the " +"effective maximum is ``6``." +msgstr "" + +#: library/compression.zstd.rst:591 +msgid "The impact of this field depends on the selected :class:`Strategy`." +msgstr "" + +#: library/compression.zstd.rst:593 +msgid "" +"For strategies :attr:`~Strategy.btopt`, :attr:`~Strategy.btultra` " +"and :attr:`~Strategy.btultra2`, the value is the length of a match " +"considered \"good enough\" to stop searching. Larger values make compression " +"ratios better, but compresses slower." +msgstr "" + +#: library/compression.zstd.rst:598 +msgid "" +"For strategy :attr:`~Strategy.fast`, it is the distance between match " +"sampling. Larger values make compression faster, but with a worse " +"compression ratio." +msgstr "" + +#: library/compression.zstd.rst:606 +msgid "" +"The higher the value of selected strategy, the more complex the compression " +"technique used by zstd, resulting in higher compression ratios but slower " +"compression." +msgstr "" + +#: library/compression.zstd.rst:610 +msgid ":class:`Strategy`" +msgstr "" + +#: library/compression.zstd.rst:614 +msgid "" +"Long distance matching can be used to improve compression for large inputs " +"by finding large matches at greater distances. It increases memory usage and " +"window size." +msgstr "" + +#: library/compression.zstd.rst:618 +msgid "" +"``True`` or ``1`` enable long distance matching while ``False`` or ``0`` " +"disable it." +msgstr "" + +#: library/compression.zstd.rst:621 +msgid "" +"Enabling this parameter increases " +"default :attr:`~CompressionParameter.window_log` to 128 MiB except when " +"expressly set to a different value. This setting is enabled by default " +"if :attr:`!window_log` >= 128 MiB and the compression strategy " +">= :attr:`~Strategy.btopt` (compression level 16+)." +msgstr "" + +#: library/compression.zstd.rst:629 +msgid "" +"Size of the table for long distance matching, as a power of two. Larger " +"values increase memory usage and compression ratio, but decrease compression " +"speed." +msgstr "" + +#: library/compression.zstd.rst:637 +msgid "" +"Minimum match size for long distance matcher. Larger or too small values can " +"often decrease the compression ratio." +msgstr "" + +#: library/compression.zstd.rst:644 +msgid "" +"Log size of each bucket in the long distance matcher hash table for " +"collision resolution. Larger values improve collision resolution but " +"decrease compression speed." +msgstr "" + +#: library/compression.zstd.rst:652 +msgid "" +"Frequency of inserting/looking up entries into the long distance matcher " +"hash table. Larger values improve compression speed. Deviating far from the " +"default value will likely result in a compression ratio decrease." +msgstr "" + +#: library/compression.zstd.rst:660 +msgid "" +"Write the size of the data to be compressed into the Zstandard frame header " +"when known prior to compressing." +msgstr "" + +#: library/compression.zstd.rst:663 +msgid "This flag only takes effect under the following scenarios:" +msgstr "" + +#: library/compression.zstd.rst:665 +msgid "Calling :func:`compress` for one-shot compression" +msgstr "" + +#: library/compression.zstd.rst:666 +msgid "" +"Providing all of the data to be compressed in the frame in a " +"single :meth:`ZstdCompressor.compress` call, with " +"the :attr:`ZstdCompressor.FLUSH_FRAME` mode." +msgstr "" + +#: library/compression.zstd.rst:669 +msgid "" +"Calling :meth:`ZstdCompressor.set_pledged_input_size` with the exact amount " +"of data that will be provided to the compressor prior to any calls " +"to :meth:`ZstdCompressor.compress` for the current frame. :meth:`!" +"ZstdCompressor.set_pledged_input_size` must be called for each new frame." +msgstr "" + +#: library/compression.zstd.rst:675 +msgid "" +"All other compression calls may not write the size information into the " +"frame header." +msgstr "" + +#: library/compression.zstd.rst:678 +msgid "" +"``True`` or ``1`` enable the content size flag while ``False`` or ``0`` " +"disable it." +msgstr "" + +#: library/compression.zstd.rst:683 +msgid "" +"A four-byte checksum using XXHash64 of the uncompressed content is written " +"at the end of each frame. Zstandard's decompression code verifies the " +"checksum. If there is a mismatch a :class:`ZstdError` exception is raised." +msgstr "" + +#: library/compression.zstd.rst:688 +msgid "" +"``True`` or ``1`` enable checksum generation while ``False`` or ``0`` " +"disable it." +msgstr "" + +#: library/compression.zstd.rst:693 +msgid "" +"When compressing with a :class:`ZstdDict`, the dictionary's ID is written " +"into the frame header." +msgstr "" + +#: library/compression.zstd.rst:696 +msgid "" +"``True`` or ``1`` enable storing the dictionary ID while ``False`` or ``0`` " +"disable it." +msgstr "" + +#: library/compression.zstd.rst:701 +msgid "" +"Select how many threads will be spawned to compress in parallel. " +"When :attr:`!nb_workers` > 0, enables multi-threaded compression, a value of " +"``1`` means \"one-thread multi-threaded mode\". More workers improve speed, " +"but also increase memory usage and slightly reduce compression ratio." +msgstr "" + +#: library/compression.zstd.rst:706 +msgid "A value of zero disables multi-threading." +msgstr "" + +#: library/compression.zstd.rst:710 +msgid "" +"Size of a compression job, in bytes. This value is enforced only " +"when :attr:`~CompressionParameter.nb_workers` >= 1. Each compression job is " +"completed in parallel, so this value can indirectly impact the number of " +"active threads." +msgstr "" + +#: library/compression.zstd.rst:719 +msgid "" +"Sets how much data is reloaded from previous jobs (threads) for new jobs to " +"be used by the look behind window during compression. This value is only " +"used when :attr:`~CompressionParameter.nb_workers` >= 1. Acceptable values " +"vary from 0 to 9." +msgstr "" + +#: library/compression.zstd.rst:724 +msgid "0 means dynamically set the overlap amount" +msgstr "" + +#: library/compression.zstd.rst:725 +msgid "1 means no overlap" +msgstr "" + +#: library/compression.zstd.rst:726 +msgid "9 means use a full window size from the previous job" +msgstr "" + +#: library/compression.zstd.rst:728 +msgid "" +"Each increment halves/doubles the overlap size. \"8\" means an overlap of " +"``window_size/2``, \"7\" means an overlap of ``window_size/4``, etc." +msgstr "" + +#: library/compression.zstd.rst:733 +msgid "" +"An :class:`~enum.IntEnum` containing the advanced decompression parameter " +"keys that can be used when decompressing data. Parameters are optional; any " +"omitted parameter will have it's value selected automatically." +msgstr "" + +#: library/compression.zstd.rst:740 +msgid "Example setting the :attr:`~.window_log_max` to the maximum size::" +msgstr "" + +#: library/compression.zstd.rst:751 +msgid "" +"Return the tuple of int bounds, ``(lower, upper)``, of a decompression " +"parameter. This method should be called on the attribute you wish to " +"retrieve the bounds of." +msgstr "" + +#: library/compression.zstd.rst:759 +msgid "" +"The base-two logarithm of the maximum size of the window used during " +"decompression. This can be useful to limit the amount of memory used when " +"decompressing data. A larger maximum window size leads to faster " +"decompression." +msgstr "" + +#: library/compression.zstd.rst:769 +msgid "" +"An :class:`~enum.IntEnum` containing strategies for compression. Higher-" +"numbered strategies correspond to more complex and slower compression." +msgstr "" + +#: library/compression.zstd.rst:775 +msgid "" +"The values of attributes of :class:`!Strategy` are not necessarily stable " +"across zstd versions. Only the ordering of the attributes may be relied " +"upon. The attributes are listed below in order." +msgstr "" + +#: library/compression.zstd.rst:779 +msgid "The following strategies are available:" +msgstr "" + +#: library/compression.zstd.rst:801 +msgid "Miscellaneous" +msgstr "Divers" + +#: library/compression.zstd.rst:805 +msgid "" +"Retrieve a :class:`FrameInfo` object containing metadata about a Zstandard " +"frame. Frames contain metadata related to the compressed data they hold." +msgstr "" + +#: library/compression.zstd.rst:811 +msgid "Metadata related to a Zstandard frame." +msgstr "" + +#: library/compression.zstd.rst:815 +msgid "The size of the decompressed contents of the frame." +msgstr "" + +#: library/compression.zstd.rst:819 +msgid "" +"An integer representing the Zstandard dictionary ID needed for decompressing " +"the frame. ``0`` means the dictionary ID was not recorded in the frame " +"header. This may mean that a Zstandard dictionary is not needed, or that the " +"ID of a required dictionary was not recorded." +msgstr "" + +#: library/compression.zstd.rst:827 +msgid "The default compression level for Zstandard: ``3``." +msgstr "" + +#: library/compression.zstd.rst:832 +msgid "" +"Version number of the runtime zstd library as a tuple of integers (major, " +"minor, release)." +msgstr "" + +#: library/compression.zstd.rst:837 +msgid "Examples" +msgstr "Exemples" + +#: library/compression.zstd.rst:839 +msgid "Reading in a compressed file:" +msgstr "" + +#: library/compression.zstd.rst:848 +msgid "Creating a compressed file:" +msgstr "" + +#: library/compression.zstd.rst:858 +msgid "Compressing data in memory:" +msgstr "" + +#: library/compression.zstd.rst:867 +msgid "Incremental compression:" +msgstr "" + +#: library/compression.zstd.rst:881 +msgid "Writing compressed data to an already-open file:" +msgstr "" + +#: library/compression.zstd.rst:893 +msgid "Creating a compressed file using compression parameters:" +msgstr "" diff --git a/library/concurrency.po b/library/concurrency.po index d76923183..372d8b3e2 100644 --- a/library/concurrency.po +++ b/library/concurrency.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-03-11 14:38+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -33,7 +33,7 @@ msgstr "" "(coopération gérée par des évènements ou multitâche préemptif). En voici un " "survol :" -#: library/concurrency.rst:27 +#: library/concurrency.rst:28 msgid "The following are support modules for some of the above services:" msgstr "" "Les modules suivants servent de fondation pour certains services cités ci-" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index f0e7874b6..0ce402f61 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,27 +21,36 @@ msgstr ":mod:`concurrent.futures` -- Lancer des tâches en parallèle" #: library/concurrent.futures.rst:9 msgid "" -"**Source code:** :source:`Lib/concurrent/futures/thread.py` and :source:`Lib/" -"concurrent/futures/process.py`" +"**Source code:** :source:`Lib/concurrent/futures/thread.py`, :source:`Lib/" +"concurrent/futures/process.py`, and :source:`Lib/concurrent/futures/" +"interpreter.py`" msgstr "" -#: library/concurrent.futures.rst:14 +#: library/concurrent.futures.rst:15 msgid "" -"The :mod:`concurrent.futures` module provides a high-level interface for " +"The :mod:`!concurrent.futures` module provides a high-level interface for " "asynchronously executing callables." msgstr "" -#: library/concurrent.futures.rst:17 +#: library/concurrent.futures.rst:18 msgid "" -"The asynchronous execution can be performed with threads, using :class:" -"`ThreadPoolExecutor`, or separate processes, using :class:" -"`ProcessPoolExecutor`. Both implement the same interface, which is defined " -"by the abstract :class:`Executor` class." +"The asynchronous execution can be performed with threads, " +"using :class:`ThreadPoolExecutor` or :class:`InterpreterPoolExecutor`, or " +"separate processes, using :class:`ProcessPoolExecutor`. Each implements the " +"same interface, which is defined by the abstract :class:`Executor` class." +msgstr "" + +#: library/concurrent.futures.rst:24 +msgid "" +":class:`concurrent.futures.Future` must not be confused " +"with :class:`asyncio.Future`, which is designed for use with :mod:`asyncio` " +"tasks and coroutines. See the :doc:`asyncio's Future ` " +"documentation for a detailed comparison of the two." msgstr "" #: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -49,75 +58,84 @@ msgid "" "availability` for more information." msgstr "" -#: library/concurrent.futures.rst:25 +#: library/concurrent.futures.rst:32 msgid "Executor Objects" msgstr "" -#: library/concurrent.futures.rst:29 +#: library/concurrent.futures.rst:36 msgid "" "An abstract class that provides methods to execute calls asynchronously. It " "should not be used directly, but through its concrete subclasses." msgstr "" -#: library/concurrent.futures.rst:34 +#: library/concurrent.futures.rst:41 msgid "" "Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" -#: library/concurrent.futures.rst:44 +#: library/concurrent.futures.rst:51 msgid "Similar to :func:`map(fn, *iterables) ` except:" msgstr "" -#: library/concurrent.futures.rst:46 -msgid "the *iterables* are collected immediately rather than lazily;" +#: library/concurrent.futures.rst:53 +msgid "" +"The *iterables* are collected immediately rather than lazily, unless a " +"*buffersize* is specified to limit the number of submitted tasks whose " +"results have not yet been yielded. If the buffer is full, iteration over the " +"*iterables* pauses until a result is yielded from the buffer." msgstr "" -#: library/concurrent.futures.rst:48 +#: library/concurrent.futures.rst:58 msgid "" "*fn* is executed asynchronously and several calls to *fn* may be made " "concurrently." msgstr "" -#: library/concurrent.futures.rst:51 +#: library/concurrent.futures.rst:61 msgid "" -"The returned iterator raises a :exc:`TimeoutError` if :meth:`~iterator." -"__next__` is called and the result isn't available after *timeout* seconds " -"from the original call to :meth:`Executor.map`. *timeout* can be an int or a " -"float. If *timeout* is not specified or ``None``, there is no limit to the " -"wait time." +"The returned iterator raises a :exc:`TimeoutError` " +"if :meth:`~iterator.__next__` is called and the result isn't available after " +"*timeout* seconds from the original call to :meth:`Executor.map`. *timeout* " +"can be an int or a float. If *timeout* is not specified or ``None``, there " +"is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:57 +#: library/concurrent.futures.rst:67 msgid "" "If a *fn* call raises an exception, then that exception will be raised when " "its value is retrieved from the iterator." msgstr "" -#: library/concurrent.futures.rst:60 +#: library/concurrent.futures.rst:70 msgid "" "When using :class:`ProcessPoolExecutor`, this method chops *iterables* into " "a number of chunks which it submits to the pool as separate tasks. The " "(approximate) size of these chunks can be specified by setting *chunksize* " "to a positive integer. For very long iterables, using a large value for " "*chunksize* can significantly improve performance compared to the default " -"size of 1. With :class:`ThreadPoolExecutor`, *chunksize* has no effect." +"size of 1. With :class:`ThreadPoolExecutor` " +"and :class:`InterpreterPoolExecutor`, *chunksize* has no effect." +msgstr "" + +#: library/concurrent.futures.rst:79 +msgid "Added the *chunksize* parameter." msgstr "" -#: library/concurrent.futures.rst:68 -msgid "Added the *chunksize* argument." +#: library/concurrent.futures.rst:82 +msgid "Added the *buffersize* parameter." msgstr "" -#: library/concurrent.futures.rst:73 +#: library/concurrent.futures.rst:87 msgid "" "Signal the executor that it should free any resources that it is using when " -"the currently pending futures are done executing. Calls to :meth:`Executor." -"submit` and :meth:`Executor.map` made after shutdown will raise :exc:" -"`RuntimeError`." +"the currently pending futures are done executing. Calls " +"to :meth:`Executor.submit` and :meth:`Executor.map` made after shutdown will " +"raise :exc:`RuntimeError`." msgstr "" -#: library/concurrent.futures.rst:78 +#: library/concurrent.futures.rst:92 msgid "" "If *wait* is ``True`` then this method will not return until all the pending " "futures are done executing and the resources associated with the executor " @@ -128,58 +146,59 @@ msgid "" "are done executing." msgstr "" -#: library/concurrent.futures.rst:86 +#: library/concurrent.futures.rst:100 msgid "" "If *cancel_futures* is ``True``, this method will cancel all pending futures " "that the executor has not started running. Any futures that are completed or " "running won't be cancelled, regardless of the value of *cancel_futures*." msgstr "" -#: library/concurrent.futures.rst:91 +#: library/concurrent.futures.rst:105 msgid "" "If both *cancel_futures* and *wait* are ``True``, all futures that the " "executor has started running will be completed prior to this method " "returning. The remaining futures are cancelled." msgstr "" -#: library/concurrent.futures.rst:95 +#: library/concurrent.futures.rst:109 msgid "" -"You can avoid having to call this method explicitly if you use the :keyword:" -"`with` statement, which will shutdown the :class:`Executor` (waiting as if :" -"meth:`Executor.shutdown` were called with *wait* set to ``True``)::" +"You can avoid having to call this method explicitly if you use the executor " +"as a :term:`context manager` via the :keyword:`with` statement, which will " +"shutdown the :class:`Executor` (waiting as if :meth:`Executor.shutdown` were " +"called with *wait* set to ``True``)::" msgstr "" -#: library/concurrent.futures.rst:107 +#: library/concurrent.futures.rst:121 msgid "Added *cancel_futures*." msgstr "" -#: library/concurrent.futures.rst:112 +#: library/concurrent.futures.rst:126 msgid "ThreadPoolExecutor" msgstr "ThreadPoolExecutor" -#: library/concurrent.futures.rst:114 +#: library/concurrent.futures.rst:128 msgid "" ":class:`ThreadPoolExecutor` is an :class:`Executor` subclass that uses a " "pool of threads to execute calls asynchronously." msgstr "" -#: library/concurrent.futures.rst:117 +#: library/concurrent.futures.rst:131 msgid "" "Deadlocks can occur when the callable associated with a :class:`Future` " "waits on the results of another :class:`Future`. For example::" msgstr "" -#: library/concurrent.futures.rst:136 +#: library/concurrent.futures.rst:150 msgid "And::" msgstr "Et ::" -#: library/concurrent.futures.rst:150 +#: library/concurrent.futures.rst:166 msgid "" "An :class:`Executor` subclass that uses a pool of at most *max_workers* " "threads to execute calls asynchronously." msgstr "" -#: library/concurrent.futures.rst:153 +#: library/concurrent.futures.rst:169 msgid "" "All threads enqueued to ``ThreadPoolExecutor`` will be joined before the " "interpreter can exit. Note that the exit handler which does this is executed " @@ -189,7 +208,7 @@ msgid "" "``ThreadPoolExecutor`` not be used for long-running tasks." msgstr "" -#: library/concurrent.futures.rst:160 +#: library/concurrent.futures.rst:176 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker thread; *initargs* is a tuple of arguments passed to the " @@ -198,27 +217,27 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:166 +#: library/concurrent.futures.rst:182 msgid "" "If *max_workers* is ``None`` or not given, it will default to the number of " -"processors on the machine, multiplied by ``5``, assuming that :class:" -"`ThreadPoolExecutor` is often used to overlap I/O instead of CPU work and " -"the number of workers should be higher than the number of workers for :class:" -"`ProcessPoolExecutor`." +"processors on the machine, multiplied by ``5``, assuming " +"that :class:`ThreadPoolExecutor` is often used to overlap I/O instead of CPU " +"work and the number of workers should be higher than the number of workers " +"for :class:`ProcessPoolExecutor`." msgstr "" -#: library/concurrent.futures.rst:174 +#: library/concurrent.futures.rst:190 msgid "" -"Added the *thread_name_prefix* parameter to allow users to control the :" -"class:`threading.Thread` names for worker threads created by the pool for " -"easier debugging." +"Added the *thread_name_prefix* parameter to allow users to control " +"the :class:`threading.Thread` names for worker threads created by the pool " +"for easier debugging." msgstr "" -#: library/concurrent.futures.rst:179 library/concurrent.futures.rst:287 +#: library/concurrent.futures.rst:195 library/concurrent.futures.rst:405 msgid "Added the *initializer* and *initargs* arguments." msgstr "" -#: library/concurrent.futures.rst:182 +#: library/concurrent.futures.rst:198 msgid "" "Default value of *max_workers* is changed to ``min(32, os.cpu_count() + " "4)``. This default value preserves at least 5 workers for I/O bound tasks. " @@ -226,50 +245,178 @@ msgid "" "And it avoids using very large resources implicitly on many-core machines." msgstr "" -#: library/concurrent.futures.rst:188 +#: library/concurrent.futures.rst:204 msgid "" "ThreadPoolExecutor now reuses idle worker threads before starting " "*max_workers* worker threads too." msgstr "" -#: library/concurrent.futures.rst:191 +#: library/concurrent.futures.rst:207 msgid "" -"Default value of *max_workers* is changed to ``min(32, (os." -"process_cpu_count() or 1) + 4)``." +"Default value of *max_workers* is changed to ``min(32, " +"(os.process_cpu_count() or 1) + 4)``." msgstr "" -#: library/concurrent.futures.rst:199 +#: library/concurrent.futures.rst:215 msgid "ThreadPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:231 +#: library/concurrent.futures.rst:247 +#, fuzzy +msgid "InterpreterPoolExecutor" +msgstr "ThreadPoolExecutor" + +#: library/concurrent.futures.rst:251 +msgid "" +"The :class:`InterpreterPoolExecutor` class uses a pool of interpreters to " +"execute calls asynchronously. It is a :class:`ThreadPoolExecutor` subclass, " +"which means each worker is running in its own thread. The difference here is " +"that each worker has its own interpreter, and runs each task using that " +"interpreter." +msgstr "" + +#: library/concurrent.futures.rst:257 +msgid "" +"The biggest benefit to using interpreters instead of only threads is true " +"multi-core parallelism. Each interpreter has its own :term:`Global " +"Interpreter Lock `, so code running in one " +"interpreter can run on one CPU core, while code in another interpreter runs " +"unblocked on a different core." +msgstr "" + +#: library/concurrent.futures.rst:263 +msgid "" +"The tradeoff is that writing concurrent code for use with multiple " +"interpreters can take extra effort. However, this is because it forces you " +"to be deliberate about how and when interpreters interact, and to be " +"explicit about what data is shared between interpreters. This results in " +"several benefits that help balance the extra effort, including true multi-" +"core parallelism, For example, code written this way can make it easier to " +"reason about concurrency. Another major benefit is that you don't have to " +"deal with several of the big pain points of using threads, like race " +"conditions." +msgstr "" + +#: library/concurrent.futures.rst:273 +msgid "" +"Each worker's interpreter is isolated from all the other interpreters. " +"\"Isolated\" means each interpreter has its own runtime state and operates " +"completely independently. For example, if you redirect :data:`sys.stdout` " +"in one interpreter, it will not be automatically redirected to any other " +"interpreter. If you import a module in one interpreter, it is not " +"automatically imported in any other. You would need to import the module " +"separately in interpreter where you need it. In fact, each module imported " +"in an interpreter is a completely separate object from the same module in a " +"different interpreter, including :mod:`sys`, :mod:`builtins`, and even " +"``__main__``." +msgstr "" + +#: library/concurrent.futures.rst:285 +msgid "" +"Isolation means a mutable object, or other data, cannot be used by more than " +"one interpreter at the same time. That effectively means interpreters " +"cannot actually share such objects or data. Instead, each interpreter must " +"have its own copy, and you will have to synchronize any changes between the " +"copies manually. Immutable objects and data, like the builtin singletons, " +"strings, and tuples of immutable objects, don't have these limitations." +msgstr "" + +#: library/concurrent.futures.rst:293 +msgid "" +"Communicating and synchronizing between interpreters is most effectively " +"done using dedicated tools, like those proposed in :pep:`734`. One less " +"efficient alternative is to serialize with :mod:`pickle` and then send the " +"bytes over a shared :mod:`socket ` or :func:`pipe `." +msgstr "" + +#: library/concurrent.futures.rst:301 +msgid "" +"A :class:`ThreadPoolExecutor` subclass that executes calls asynchronously " +"using a pool of at most *max_workers* threads. Each thread runs tasks in " +"its own interpreter. The worker interpreters are isolated from each other, " +"which means each has its own runtime state and that they can't share any " +"mutable objects or other data. Each interpreter has its own :term:`Global " +"Interpreter Lock `, which means code run with this " +"executor has true multi-core parallelism." +msgstr "" + +#: library/concurrent.futures.rst:309 +msgid "" +"The optional *initializer* and *initargs* arguments have the same meaning as " +"for :class:`!ThreadPoolExecutor`: the initializer is run when each worker is " +"created, though in this case it is run in the worker's interpreter. The " +"executor serializes the *initializer* and *initargs* using :mod:`pickle` " +"when sending them to the worker's interpreter." +msgstr "" + +#: library/concurrent.futures.rst:317 +msgid "" +"The executor may replace uncaught exceptions from *initializer* " +"with :class:`~concurrent.interpreters.ExecutionFailed`." +msgstr "" + +#: library/concurrent.futures.rst:320 +msgid "Other caveats from parent :class:`ThreadPoolExecutor` apply here." +msgstr "" + +#: library/concurrent.futures.rst:322 +msgid "" +":meth:`~Executor.submit` and :meth:`~Executor.map` work like normal, except " +"the worker serializes the callable and arguments using :mod:`pickle` when " +"sending them to its interpreter. The worker likewise serializes the return " +"value when sending it back." +msgstr "" + +#: library/concurrent.futures.rst:327 +msgid "" +"When a worker's current task raises an uncaught exception, the worker always " +"tries to preserve the exception as-is. If that is successful then it also " +"sets the ``__cause__`` to a " +"corresponding :class:`~concurrent.interpreters.ExecutionFailed` instance, " +"which contains a summary of the original exception. In the uncommon case " +"that the worker is not able to preserve the original as-is then it directly " +"preserves the " +"corresponding :class:`~concurrent.interpreters.ExecutionFailed` instance " +"instead." +msgstr "" + +#: library/concurrent.futures.rst:339 msgid "ProcessPoolExecutor" msgstr "ProcessPoolExecutor" -#: library/concurrent.futures.rst:233 +#: library/concurrent.futures.rst:341 msgid "" "The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " -"uses a pool of processes to execute calls asynchronously. :class:" -"`ProcessPoolExecutor` uses the :mod:`multiprocessing` module, which allows " -"it to side-step the :term:`Global Interpreter Lock ` but also means that only picklable objects can be executed and " -"returned." +"uses a pool of processes to execute calls " +"asynchronously. :class:`ProcessPoolExecutor` uses the :mod:`multiprocessing` " +"module, which allows it to side-step the :term:`Global Interpreter Lock " +"` but also means that only picklable objects can be " +"executed and returned." msgstr "" -#: library/concurrent.futures.rst:240 +#: library/concurrent.futures.rst:348 msgid "" "The ``__main__`` module must be importable by worker subprocesses. This " "means that :class:`ProcessPoolExecutor` will not work in the interactive " "interpreter." msgstr "" -#: library/concurrent.futures.rst:243 +#: library/concurrent.futures.rst:351 msgid "" "Calling :class:`Executor` or :class:`Future` methods from a callable " "submitted to a :class:`ProcessPoolExecutor` will result in deadlock." msgstr "" -#: library/concurrent.futures.rst:248 +#: library/concurrent.futures.rst:354 +msgid "" +"Note that the restrictions on functions and arguments needing to picklable " +"as per :class:`multiprocessing.Process` apply when " +"using :meth:`~Executor.submit` and :meth:`~Executor.map` on " +"a :class:`ProcessPoolExecutor`. A function defined in a REPL or a lambda " +"should not be expected to work." +msgstr "" + +#: library/concurrent.futures.rst:361 msgid "" "An :class:`Executor` subclass that executes calls asynchronously using a " "pool of at most *max_workers* processes. If *max_workers* is ``None`` or " @@ -280,11 +427,11 @@ msgid "" "the default chosen will be at most ``61``, even if more processors are " "available. *mp_context* can be a :mod:`multiprocessing` context or ``None``. " "It will be used to launch the workers. If *mp_context* is ``None`` or not " -"given, the default :mod:`multiprocessing` context is used. See :ref:" -"`multiprocessing-start-methods`." +"given, the default :mod:`multiprocessing` context is used. " +"See :ref:`multiprocessing-start-methods`." msgstr "" -#: library/concurrent.futures.rst:262 +#: library/concurrent.futures.rst:375 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker process; *initargs* is a tuple of arguments passed to the " @@ -293,7 +440,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:268 +#: library/concurrent.futures.rst:381 msgid "" "*max_tasks_per_child* is an optional argument that specifies the maximum " "number of tasks a single process can execute before it will exit and be " @@ -304,72 +451,101 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: library/concurrent.futures.rst:276 +#: library/concurrent.futures.rst:390 msgid "" -"When one of the worker processes terminates abruptly, a :exc:`~concurrent." -"futures.process.BrokenProcessPool` error is now raised. Previously, " -"behaviour was undefined but operations on the executor or its futures would " -"often freeze or deadlock." +"Bugs have been reported when using the *max_tasks_per_child* feature that " +"can result in the :class:`ProcessPoolExecutor` hanging in some " +"circumstances. Follow its eventual resolution in :gh:`115634`." msgstr "" -#: library/concurrent.futures.rst:283 +#: library/concurrent.futures.rst:394 msgid "" -"The *mp_context* argument was added to allow users to control the " -"start_method for worker processes created by the pool." +"When one of the worker processes terminates abruptly, " +"a :exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised. " +"Previously, behaviour was undefined but operations on the executor or its " +"futures would often freeze or deadlock." msgstr "" -#: library/concurrent.futures.rst:290 +#: library/concurrent.futures.rst:401 msgid "" -"The default :mod:`multiprocessing` start method (see :ref:`multiprocessing-" -"start-methods`) will change away from *fork* in Python 3.14. Code that " -"requires *fork* be used for their :class:`ProcessPoolExecutor` should " -"explicitly specify that by passing a ``mp_context=multiprocessing." -"get_context(\"fork\")`` parameter." +"The *mp_context* argument was added to allow users to control the " +"start_method for worker processes created by the pool." msgstr "" -#: library/concurrent.futures.rst:297 +#: library/concurrent.futures.rst:407 msgid "" "The *max_tasks_per_child* argument was added to allow users to control the " "lifetime of workers in the pool." msgstr "" -#: library/concurrent.futures.rst:301 +#: library/concurrent.futures.rst:411 msgid "" -"On POSIX systems, if your application has multiple threads and the :mod:" -"`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." -"fork` function called internally to spawn workers may raise a :exc:" -"`DeprecationWarning`. Pass a *mp_context* configured to use a different " -"start method. See the :func:`os.fork` documentation for further explanation." +"On POSIX systems, if your application has multiple threads and " +"the :mod:`multiprocessing` context uses the ``\"fork\"`` start method: " +"The :func:`os.fork` function called internally to spawn workers may raise " +"a :exc:`DeprecationWarning`. Pass a *mp_context* configured to use a " +"different start method. See the :func:`os.fork` documentation for further " +"explanation." msgstr "" -#: library/concurrent.futures.rst:309 +#: library/concurrent.futures.rst:419 +msgid "" +"*max_workers* uses :func:`os.process_cpu_count` by default, instead " +"of :func:`os.cpu_count`." +msgstr "" + +#: library/concurrent.futures.rst:423 msgid "" -"*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" -"`os.cpu_count`." +"The default process start method (see :ref:`multiprocessing-start-methods`) " +"changed away from *fork*. If you require the *fork* start method " +"for :class:`ProcessPoolExecutor` you must explicitly pass " +"``mp_context=multiprocessing.get_context(\"fork\")``." msgstr "" -#: library/concurrent.futures.rst:316 +#: library/concurrent.futures.rst:431 +msgid "" +"Attempt to terminate all living worker processes immediately by " +"calling :meth:`Process.terminate ` on " +"each of them. Internally, it will also call :meth:`Executor.shutdown` to " +"ensure that all other resources associated with the executor are freed." +msgstr "" + +#: library/concurrent.futures.rst:436 library/concurrent.futures.rst:448 +msgid "" +"After calling this method the caller should no longer submit tasks to the " +"executor." +msgstr "" + +#: library/concurrent.futures.rst:443 +msgid "" +"Attempt to kill all living worker processes immediately by " +"calling :meth:`Process.kill ` on each of them. " +"Internally, it will also call :meth:`Executor.shutdown` to ensure that all " +"other resources associated with the executor are freed." +msgstr "" + +#: library/concurrent.futures.rst:456 msgid "ProcessPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:354 +#: library/concurrent.futures.rst:494 msgid "Future Objects" msgstr "" -#: library/concurrent.futures.rst:356 +#: library/concurrent.futures.rst:496 msgid "" "The :class:`Future` class encapsulates the asynchronous execution of a " "callable. :class:`Future` instances are created by :meth:`Executor.submit`." msgstr "" -#: library/concurrent.futures.rst:361 +#: library/concurrent.futures.rst:501 msgid "" "Encapsulates the asynchronous execution of a callable. :class:`Future` " "instances are created by :meth:`Executor.submit` and should not be created " "directly except for testing." msgstr "" -#: library/concurrent.futures.rst:367 +#: library/concurrent.futures.rst:507 msgid "" "Attempt to cancel the call. If the call is currently being executed or " "finished running and cannot be cancelled then the method will return " @@ -377,22 +553,22 @@ msgid "" "``True``." msgstr "" -#: library/concurrent.futures.rst:374 +#: library/concurrent.futures.rst:514 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: library/concurrent.futures.rst:378 +#: library/concurrent.futures.rst:518 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: library/concurrent.futures.rst:383 +#: library/concurrent.futures.rst:523 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: library/concurrent.futures.rst:388 +#: library/concurrent.futures.rst:528 msgid "" "Return the value returned by the call. If the call hasn't yet completed then " "this method will wait up to *timeout* seconds. If the call hasn't completed " @@ -401,18 +577,18 @@ msgid "" "no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:395 library/concurrent.futures.rst:409 +#: library/concurrent.futures.rst:535 library/concurrent.futures.rst:549 msgid "" "If the future is cancelled before completing then :exc:`.CancelledError` " "will be raised." msgstr "" -#: library/concurrent.futures.rst:398 +#: library/concurrent.futures.rst:538 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: library/concurrent.futures.rst:402 +#: library/concurrent.futures.rst:542 msgid "" "Return the exception raised by the call. If the call hasn't yet completed " "then this method will wait up to *timeout* seconds. If the call hasn't " @@ -421,18 +597,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:412 +#: library/concurrent.futures.rst:552 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: library/concurrent.futures.rst:416 +#: library/concurrent.futures.rst:556 msgid "" "Attaches the callable *fn* to the future. *fn* will be called, with the " "future as its only argument, when the future is cancelled or finishes " "running." msgstr "" -#: library/concurrent.futures.rst:420 +#: library/concurrent.futures.rst:560 msgid "" "Added callables are called in the order that they were added and are always " "called in a thread belonging to the process that added them. If the " @@ -441,92 +617,93 @@ msgid "" "behavior is undefined." msgstr "" -#: library/concurrent.futures.rst:426 +#: library/concurrent.futures.rst:566 msgid "" "If the future has already completed or been cancelled, *fn* will be called " "immediately." msgstr "" -#: library/concurrent.futures.rst:429 +#: library/concurrent.futures.rst:569 msgid "" -"The following :class:`Future` methods are meant for use in unit tests and :" -"class:`Executor` implementations." +"The following :class:`Future` methods are meant for use in unit tests " +"and :class:`Executor` implementations." msgstr "" -#: library/concurrent.futures.rst:434 +#: library/concurrent.futures.rst:574 msgid "" "This method should only be called by :class:`Executor` implementations " "before executing the work associated with the :class:`Future` and by unit " "tests." msgstr "" -#: library/concurrent.futures.rst:438 +#: library/concurrent.futures.rst:578 msgid "" -"If the method returns ``False`` then the :class:`Future` was cancelled, i." -"e. :meth:`Future.cancel` was called and returned ``True``. Any threads " +"If the method returns ``False`` then the :class:`Future` was cancelled, " +"i.e. :meth:`Future.cancel` was called and returned ``True``. Any threads " "waiting on the :class:`Future` completing (i.e. through :func:`as_completed` " "or :func:`wait`) will be woken up." msgstr "" -#: library/concurrent.futures.rst:443 +#: library/concurrent.futures.rst:583 msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " "will return ``True``." msgstr "" -#: library/concurrent.futures.rst:447 +#: library/concurrent.futures.rst:587 msgid "" -"This method can only be called once and cannot be called after :meth:`Future." -"set_result` or :meth:`Future.set_exception` have been called." +"This method can only be called once and cannot be called " +"after :meth:`Future.set_result` or :meth:`Future.set_exception` have been " +"called." msgstr "" -#: library/concurrent.futures.rst:453 +#: library/concurrent.futures.rst:593 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: library/concurrent.futures.rst:456 library/concurrent.futures.rst:469 +#: library/concurrent.futures.rst:596 library/concurrent.futures.rst:609 msgid "" "This method should only be used by :class:`Executor` implementations and " "unit tests." msgstr "" -#: library/concurrent.futures.rst:459 library/concurrent.futures.rst:472 +#: library/concurrent.futures.rst:599 library/concurrent.futures.rst:612 msgid "" -"This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" -"`Future` is already done." +"This method raises :exc:`concurrent.futures.InvalidStateError` if " +"the :class:`Future` is already done." msgstr "" -#: library/concurrent.futures.rst:466 +#: library/concurrent.futures.rst:606 msgid "" -"Sets the result of the work associated with the :class:`Future` to the :" -"class:`Exception` *exception*." +"Sets the result of the work associated with the :class:`Future` to " +"the :class:`Exception` *exception*." msgstr "" -#: library/concurrent.futures.rst:478 +#: library/concurrent.futures.rst:618 msgid "Module Functions" msgstr "" -#: library/concurrent.futures.rst:482 +#: library/concurrent.futures.rst:622 msgid "" -"Wait for the :class:`Future` instances (possibly created by different :class:" -"`Executor` instances) given by *fs* to complete. Duplicate futures given to " -"*fs* are removed and will be returned only once. Returns a named 2-tuple of " -"sets. The first set, named ``done``, contains the futures that completed " -"(finished or cancelled futures) before the wait completed. The second set, " -"named ``not_done``, contains the futures that did not complete (pending or " -"running futures)." +"Wait for the :class:`Future` instances (possibly created by " +"different :class:`Executor` instances) given by *fs* to complete. Duplicate " +"futures given to *fs* are removed and will be returned only once. Returns a " +"named 2-tuple of sets. The first set, named ``done``, contains the futures " +"that completed (finished or cancelled futures) before the wait completed. " +"The second set, named ``not_done``, contains the futures that did not " +"complete (pending or running futures)." msgstr "" -#: library/concurrent.futures.rst:490 +#: library/concurrent.futures.rst:630 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:494 +#: library/concurrent.futures.rst:634 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -534,36 +711,36 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/concurrent.futures.rst:500 +#: library/concurrent.futures.rst:640 msgid "Constant" msgstr "Constante" -#: library/concurrent.futures.rst:501 +#: library/concurrent.futures.rst:641 msgid "Description" msgstr "Description" -#: library/concurrent.futures.rst:504 +#: library/concurrent.futures.rst:644 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/concurrent.futures.rst:507 +#: library/concurrent.futures.rst:647 #, fuzzy msgid "" "The function will return when any future finishes by raising an exception. " -"If no future raises an exception then it is equivalent to :const:" -"`ALL_COMPLETED`." +"If no future raises an exception then it is equivalent " +"to :const:`ALL_COMPLETED`." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine en levant une " -"exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" -"`ALL_COMPLETED`." +"exception. Si aucun *futur* ne lève d'exception, équivaut " +"à :const:`ALL_COMPLETED`." -#: library/concurrent.futures.rst:512 +#: library/concurrent.futures.rst:652 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/concurrent.futures.rst:516 +#: library/concurrent.futures.rst:656 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -576,60 +753,69 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:529 +#: library/concurrent.futures.rst:669 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:530 +#: library/concurrent.futures.rst:670 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:535 +#: library/concurrent.futures.rst:675 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:541 +#: library/concurrent.futures.rst:681 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:545 +#: library/concurrent.futures.rst:685 msgid "" "A deprecated alias of :exc:`TimeoutError`, raised when a future operation " "exceeds the given timeout." msgstr "" -#: library/concurrent.futures.rst:550 +#: library/concurrent.futures.rst:690 msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "cette classe est devenue un alias de :exc:`TimeoutError`." -#: library/concurrent.futures.rst:555 +#: library/concurrent.futures.rst:695 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: library/concurrent.futures.rst:563 +#: library/concurrent.futures.rst:703 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: library/concurrent.futures.rst:572 +#: library/concurrent.futures.rst:712 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " -"is raised when one of the workers of a :class:`~concurrent.futures." -"ThreadPoolExecutor` has failed initializing." +"is raised when one of the workers of " +"a :class:`~concurrent.futures.ThreadPoolExecutor` has failed initializing." msgstr "" -#: library/concurrent.futures.rst:583 +#: library/concurrent.futures.rst:723 +msgid "" +"Derived from :exc:`~concurrent.futures.thread.BrokenThreadPool`, this " +"exception class is raised when one of the workers of " +"a :class:`~concurrent.futures.InterpreterPoolExecutor` has failed " +"initializing." +msgstr "" + +#: library/concurrent.futures.rst:734 msgid "" -"Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" -"`RuntimeError`), this exception class is raised when one of the workers of " -"a :class:`~concurrent.futures.ProcessPoolExecutor` has terminated in a non-" -"clean fashion (for example, if it was killed from the outside)." +"Derived from :exc:`~concurrent.futures.BrokenExecutor` " +"(formerly :exc:`RuntimeError`), this exception class is raised when one of " +"the workers of a :class:`~concurrent.futures.ProcessPoolExecutor` has " +"terminated in a non-clean fashion (for example, if it was killed from the " +"outside)." msgstr "" #~ msgid ":const:`FIRST_COMPLETED`" diff --git a/library/concurrent.interpreters.po b/library/concurrent.interpreters.po new file mode 100644 index 000000000..18ffb20b8 --- /dev/null +++ b/library/concurrent.interpreters.po @@ -0,0 +1,487 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/concurrent.interpreters.rst:2 +msgid "" +":mod:`!concurrent.interpreters` --- Multiple interpreters in the same process" +msgstr "" + +#: library/concurrent.interpreters.rst:9 +msgid "**Source code:** :source:`Lib/concurrent/interpreters`" +msgstr "" + +#: library/concurrent.interpreters.rst:13 +msgid "" +"The :mod:`!concurrent.interpreters` module constructs higher-level " +"interfaces on top of the lower level :mod:`!_interpreters` module." +msgstr "" + +#: library/concurrent.interpreters.rst:16 +msgid "" +"The module is primarily meant to provide a basic API for managing " +"interpreters (AKA \"subinterpreters\") and running things in them. Running " +"mostly involves switching to an interpreter (in the current thread) and " +"calling a function in that execution context." +msgstr "" + +#: library/concurrent.interpreters.rst:21 +msgid "" +"For concurrency, interpreters themselves (and this module) don't provide " +"much more than isolation, which on its own isn't useful. Actual concurrency " +"is available separately through :mod:`threads ` See `below " +"`_" +msgstr "" + +#: library/concurrent.interpreters.rst:28 +msgid ":class:`~concurrent.futures.InterpreterPoolExecutor`" +msgstr "" + +#: library/concurrent.interpreters.rst:29 +msgid "Combines threads with interpreters in a familiar interface." +msgstr "" + +#: library/concurrent.interpreters.rst:33 +msgid ":ref:`isolating-extensions-howto`" +msgstr "" + +#: library/concurrent.interpreters.rst:34 +msgid "How to update an extension module to support multiple interpreters." +msgstr "" + +#: library/concurrent.interpreters.rst:36 +msgid ":pep:`554`" +msgstr "" + +#: library/concurrent.interpreters.rst:38 +msgid ":pep:`734`" +msgstr "" + +#: library/concurrent.interpreters.rst:40 +msgid ":pep:`684`" +msgstr "" + +#: includes/wasm-notavail.rst:3 +msgid "Availability" +msgstr "Disponibilité" + +#: includes/wasm-notavail.rst:5 +msgid "" +"This module does not work or is not available on WebAssembly. See :ref:`wasm-" +"availability` for more information." +msgstr "" + +#: library/concurrent.interpreters.rst:48 +msgid "Key details" +msgstr "" + +#: library/concurrent.interpreters.rst:50 +msgid "" +"Before we dive in further, there are a small number of details to keep in " +"mind about using multiple interpreters:" +msgstr "" + +#: library/concurrent.interpreters.rst:53 +msgid "`isolated `_, by default" +msgstr "" + +#: library/concurrent.interpreters.rst:54 +msgid "no implicit threads" +msgstr "" + +#: library/concurrent.interpreters.rst:55 +msgid "not all PyPI packages support use in multiple interpreters yet" +msgstr "" + +#: library/concurrent.interpreters.rst:63 +msgid "Introduction" +msgstr "Introduction" + +#: library/concurrent.interpreters.rst:65 +msgid "" +"An \"interpreter\" is effectively the execution context of the Python " +"runtime. It contains all of the state the runtime needs to execute a " +"program. This includes things like the import state and builtins. (Each " +"thread, even if there's only the main thread, has some extra runtime state, " +"in addition to the current interpreter, related to the current exception and " +"the bytecode eval loop.)" +msgstr "" + +#: library/concurrent.interpreters.rst:72 +msgid "" +"The concept and functionality of the interpreter have been a part of Python " +"since version 2.2, but the feature was only available through the C-API and " +"not well known, and the `isolation `_ was relatively " +"incomplete until version 3.12." +msgstr "" + +#: library/concurrent.interpreters.rst:80 +msgid "Multiple Interpreters and Isolation" +msgstr "" + +#: library/concurrent.interpreters.rst:82 +msgid "" +"A Python implementation may support using multiple interpreters in the same " +"process. CPython has this support. Each interpreter is effectively " +"isolated from the others (with a limited number of carefully managed process-" +"global exceptions to the rule)." +msgstr "" + +#: library/concurrent.interpreters.rst:87 +msgid "" +"That isolation is primarily useful as a strong separation between distinct " +"logical components of a program, where you want to have careful control of " +"how those components interact." +msgstr "" + +#: library/concurrent.interpreters.rst:93 +msgid "" +"Interpreters in the same process can technically never be strictly isolated " +"from one another since there are few restrictions on memory access within " +"the same process. The Python runtime makes a best effort at isolation but " +"extension modules may easily violate that. Therefore, do not use multiple " +"interpreters in security-sensitive situations, where they shouldn't have " +"access to each other's data." +msgstr "" + +#: library/concurrent.interpreters.rst:101 +msgid "Running in an Interpreter" +msgstr "" + +#: library/concurrent.interpreters.rst:103 +msgid "" +"Running in a different interpreter involves switching to it in the current " +"thread and then calling some function. The runtime will execute the " +"function using the current interpreter's state. The :mod:`!" +"concurrent.interpreters` module provides a basic API for creating and " +"managing interpreters, as well as the switch-and-call operation." +msgstr "" + +#: library/concurrent.interpreters.rst:110 +msgid "" +"No other threads are automatically started for the operation. There is `a " +"helper `_ for that though. There is another " +"dedicated helper for calling the builtin :func:`exec` in an interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:115 +msgid "" +"When :func:`exec` (or :func:`eval`) are called in an interpreter, they run " +"using the interpreter's :mod:`!__main__` module as the \"globals\" " +"namespace. The same is true for functions that aren't associated with any " +"module. This is the same as how scripts invoked from the command-line run " +"in the :mod:`!__main__` module." +msgstr "" + +#: library/concurrent.interpreters.rst:125 +msgid "Concurrency and Parallelism" +msgstr "" + +#: library/concurrent.interpreters.rst:127 +msgid "" +"As noted earlier, interpreters do not provide any concurrency on their own. " +"They strictly represent the isolated execution context the runtime will use " +"*in the current thread*. That isolation makes them similar to processes, " +"but they still enjoy in-process efficiency, like threads." +msgstr "" + +#: library/concurrent.interpreters.rst:133 +msgid "" +"All that said, interpreters do naturally support certain flavors of " +"concurrency. There's a powerful side effect of that isolation. It enables a " +"different approach to concurrency than you can take with async or threads. " +"It's a similar concurrency model to CSP or the actor model, a model which is " +"relatively easy to reason about." +msgstr "" + +#: library/concurrent.interpreters.rst:140 +msgid "" +"You can take advantage of that concurrency model in a single thread, " +"switching back and forth between interpreters, Stackless-style. However, " +"this model is more useful when you combine interpreters with multiple " +"threads. This mostly involves starting a new thread, where you switch to " +"another interpreter and run what you want there." +msgstr "" + +#: library/concurrent.interpreters.rst:146 +msgid "" +"Each actual thread in Python, even if you're only running in the main " +"thread, has its own *current* execution context. Multiple threads can use " +"the same interpreter or different ones." +msgstr "" + +#: library/concurrent.interpreters.rst:150 +msgid "" +"At a high level, you can think of the combination of threads and " +"interpreters as threads with opt-in sharing." +msgstr "" + +#: library/concurrent.interpreters.rst:153 +msgid "" +"As a significant bonus, interpreters are sufficiently isolated that they do " +"not share the :term:`GIL`, which means combining threads with multiple " +"interpreters enables full multi-core parallelism. (This has been the case " +"since Python 3.12.)" +msgstr "" + +#: library/concurrent.interpreters.rst:159 +msgid "Communication Between Interpreters" +msgstr "" + +#: library/concurrent.interpreters.rst:161 +msgid "" +"In practice, multiple interpreters are useful only if we have a way to " +"communicate between them. This usually involves some form of message " +"passing, but can even mean sharing data in some carefully managed way." +msgstr "" + +#: library/concurrent.interpreters.rst:166 +msgid "" +"With this in mind, the :mod:`!concurrent.interpreters` module provides " +"a :class:`queue.Queue` implementation, available " +"through :func:`create_queue`." +msgstr "" + +#: library/concurrent.interpreters.rst:173 +msgid "\"Sharing\" Objects" +msgstr "" + +#: library/concurrent.interpreters.rst:175 +msgid "" +"Any data actually shared between interpreters loses the thread-safety " +"provided by the :term:`GIL`. There are various options for dealing with " +"this in extension modules. However, from Python code the lack of thread-" +"safety means objects can't actually be shared, with a few exceptions. " +"Instead, a copy must be created, which means mutable objects won't stay in " +"sync." +msgstr "" + +#: library/concurrent.interpreters.rst:182 +msgid "" +"By default, most objects are copied with :mod:`pickle` when they are passed " +"to another interpreter. Nearly all of the immutable builtin objects are " +"either directly shared or copied efficiently. For example:" +msgstr "" + +#: library/concurrent.interpreters.rst:186 +msgid ":const:`None`" +msgstr ":const:`None`" + +#: library/concurrent.interpreters.rst:187 +msgid ":class:`bool` (:const:`True` and :const:`False`)" +msgstr "" + +#: library/concurrent.interpreters.rst:188 +msgid ":class:`bytes`" +msgstr ":class:`bytes`" + +#: library/concurrent.interpreters.rst:189 +msgid ":class:`str`" +msgstr ":class:`str`" + +#: library/concurrent.interpreters.rst:190 +msgid ":class:`int`" +msgstr ":class:`int`" + +#: library/concurrent.interpreters.rst:191 +msgid ":class:`float`" +msgstr ":class:`float`" + +#: library/concurrent.interpreters.rst:192 +msgid ":class:`tuple` (of similarly supported objects)" +msgstr "" + +#: library/concurrent.interpreters.rst:194 +msgid "" +"There is a small number of Python types that actually share mutable data " +"between interpreters:" +msgstr "" + +#: library/concurrent.interpreters.rst:197 +msgid ":class:`memoryview`" +msgstr ":class:`memoryview`" + +#: library/concurrent.interpreters.rst:198 +msgid ":class:`Queue`" +msgstr ":class:`Queue`" + +#: library/concurrent.interpreters.rst:202 +msgid "Reference" +msgstr "Référence" + +#: library/concurrent.interpreters.rst:204 +msgid "This module defines the following functions:" +msgstr "Ce module définit les fonctions suivantes :" + +#: library/concurrent.interpreters.rst:208 +msgid "" +"Return a :class:`list` of :class:`Interpreter` objects, one for each " +"existing interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:213 +msgid "" +"Return an :class:`Interpreter` object for the currently running interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:218 +msgid "" +"Return an :class:`Interpreter` object for the main interpreter. This is the " +"interpreter the runtime created to run the :term:`REPL` or the script given " +"at the command-line. It is usually the only one." +msgstr "" + +#: library/concurrent.interpreters.rst:224 +msgid "" +"Initialize a new (idle) Python interpreter and return a :class:`Interpreter` " +"object for it." +msgstr "" + +#: library/concurrent.interpreters.rst:229 +msgid "" +"Initialize a new cross-interpreter queue and return a :class:`Queue` object " +"for it." +msgstr "" + +#: library/concurrent.interpreters.rst:234 +msgid "Interpreter objects" +msgstr "" + +#: library/concurrent.interpreters.rst:238 +msgid "A single interpreter in the current process." +msgstr "" + +#: library/concurrent.interpreters.rst:240 +msgid "" +"Generally, :class:`Interpreter` shouldn't be called directly. Instead, " +"use :func:`create` or one of the other module functions." +msgstr "" + +#: library/concurrent.interpreters.rst:245 +#: library/concurrent.interpreters.rst:251 +#: library/concurrent.interpreters.rst:330 +msgid "(read-only)" +msgstr "" + +#: library/concurrent.interpreters.rst:247 +msgid "The underlying interpreter's ID." +msgstr "" + +#: library/concurrent.interpreters.rst:253 +msgid "A string describing where the interpreter came from." +msgstr "" + +#: library/concurrent.interpreters.rst:257 +msgid "" +"Return ``True`` if the interpreter is currently executing code in its :mod:`!" +"__main__` module and ``False`` otherwise." +msgstr "" + +#: library/concurrent.interpreters.rst:262 +msgid "Finalize and destroy the interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:266 +msgid "Bind objects in the interpreter's :mod:`!__main__` module." +msgstr "" + +#: library/concurrent.interpreters.rst:268 +#: library/concurrent.interpreters.rst:325 +msgid "" +"Some objects are actually shared and some are copied efficiently, but most " +"are copied via :mod:`pickle`. See :ref:`interp-object-sharing`." +msgstr "" + +#: library/concurrent.interpreters.rst:273 +msgid "Run the given source code in the interpreter (in the current thread)." +msgstr "" + +#: library/concurrent.interpreters.rst:277 +msgid "" +"Return the result of calling running the given function in the interpreter " +"(in the current thread)." +msgstr "" + +#: library/concurrent.interpreters.rst:284 +msgid "Run the given function in the interpreter (in a new thread)." +msgstr "" + +#: library/concurrent.interpreters.rst:287 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/concurrent.interpreters.rst:291 +msgid "" +"This exception, a subclass of :exc:`Exception`, is raised when an " +"interpreter-related error happens." +msgstr "" + +#: library/concurrent.interpreters.rst:296 +msgid "" +"This exception, a subclass of :exc:`InterpreterError`, is raised when the " +"targeted interpreter no longer exists." +msgstr "" + +#: library/concurrent.interpreters.rst:301 +msgid "" +"This exception, a subclass of :exc:`InterpreterError`, is raised when the " +"running code raised an uncaught exception." +msgstr "" + +#: library/concurrent.interpreters.rst:306 +msgid "A basic snapshot of the exception raised in the other interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:312 +msgid "" +"This exception, a subclass of :exc:`TypeError`, is raised when an object " +"cannot be sent to another interpreter." +msgstr "" + +#: library/concurrent.interpreters.rst:317 +msgid "Communicating Between Interpreters" +msgstr "" + +#: library/concurrent.interpreters.rst:321 +msgid "" +"A wrapper around a low-level, cross-interpreter queue, which implements " +"the :class:`queue.Queue` interface. The underlying queue can only be " +"created through :func:`create_queue`." +msgstr "" + +#: library/concurrent.interpreters.rst:332 +msgid "The queue's ID." +msgstr "" + +#: library/concurrent.interpreters.rst:337 +msgid "" +"This exception, a subclass of :exc:`queue.Empty`, is raised from :meth:`!" +"Queue.get` and :meth:`!Queue.get_nowait` when the queue is empty." +msgstr "" + +#: library/concurrent.interpreters.rst:343 +msgid "" +"This exception, a subclass of :exc:`queue.Full`, is raised from :meth:`!" +"Queue.put` and :meth:`!Queue.put_nowait` when the queue is full." +msgstr "" + +#: library/concurrent.interpreters.rst:349 +msgid "Basic usage" +msgstr "Utilisation de base" + +#: library/concurrent.interpreters.rst:351 +msgid "Creating an interpreter and running code in it::" +msgstr "" diff --git a/library/concurrent.po b/library/concurrent.po index b8c015fb4..3fa84d791 100644 --- a/library/concurrent.po +++ b/library/concurrent.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2017-10-18 09:28+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -20,9 +20,17 @@ msgid "The :mod:`!concurrent` package" msgstr "Le paquet :mod:`concurrent`" #: library/concurrent.rst:4 -msgid "Currently, there is only one module in this package:" -msgstr "Il n'y a actuellement qu'un module dans ce paquet :" +msgid "This package contains the following modules:" +msgstr "" #: library/concurrent.rst:6 msgid ":mod:`concurrent.futures` -- Launching parallel tasks" msgstr ":mod:`concurrent.futures` -- Lancer des tâches en parallèle" + +#: library/concurrent.rst:7 +msgid "" +":mod:`concurrent.interpreters` -- Multiple interpreters in the same process" +msgstr "" + +#~ msgid "Currently, there is only one module in this package:" +#~ msgstr "Il n'y a actuellement qu'un module dans ce paquet :" diff --git a/library/configparser.po b/library/configparser.po index 36e7b2f2d..d82d49cff 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-10-31 11:21+0100\n" "Last-Translator: Hugo \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!configparser` --- Configuration file parser" msgstr ":mod:`configparser` — Lecture et écriture de fichiers de configuration" -#: library/configparser.rst:14 +#: library/configparser.rst:7 msgid "**Source code:** :source:`Lib/configparser.py`" msgstr "**Code source :** :source:`Lib/configparser.py`" -#: library/configparser.rst:24 +#: library/configparser.rst:17 msgid "" "This module provides the :class:`ConfigParser` class which implements a " "basic configuration language which provides a structure similar to what's " @@ -37,7 +37,7 @@ msgstr "" "écrire des programmes Python qui sont facilement configurables par " "l'utilisateur final." -#: library/configparser.rst:31 +#: library/configparser.rst:24 msgid "" "This library does *not* interpret or write the value-type prefixes used in " "the Windows Registry extended version of INI syntax." @@ -46,11 +46,18 @@ msgstr "" "permet de lire ou d'écrire des valeurs dans la base de registre Windows en " "utilisant divers préfixes." -#: library/configparser.rst:36 +#: library/configparser.rst:28 +msgid "" +"Be cautious when parsing data from untrusted sources. A malicious INI file " +"may cause the decoder to consume considerable CPU and memory resources. " +"Limiting the size of data to be parsed is recommended." +msgstr "" + +#: library/configparser.rst:34 msgid "Module :mod:`tomllib`" msgstr "Module :mod:`tomlib`" -#: library/configparser.rst:37 +#: library/configparser.rst:35 msgid "" "TOML is a well-specified format for application configuration files. It is " "specifically designed to be an improved version of INI." @@ -59,11 +66,11 @@ msgstr "" "d'application. Il est spécifiquement conçu pour être une version améliorée " "d'INI." -#: library/configparser.rst:40 +#: library/configparser.rst:38 msgid "Module :mod:`shlex`" msgstr "Module :mod:`shlex`" -#: library/configparser.rst:41 +#: library/configparser.rst:39 #, fuzzy msgid "" "Support for creating Unix shell-like mini-languages which can also be used " @@ -73,11 +80,11 @@ msgstr "" "programmation ressemblant au shell Unix, qui peuvent être utilisés comme " "alternative pour les fichiers de configuration d'une application." -#: library/configparser.rst:44 +#: library/configparser.rst:42 msgid "Module :mod:`json`" msgstr "Module :mod:`json`" -#: library/configparser.rst:45 +#: library/configparser.rst:43 #, fuzzy msgid "" "The ``json`` module implements a subset of JavaScript syntax which is " @@ -86,21 +93,22 @@ msgstr "" "Le module *json* implémente un sous-ensemble de la syntaxe JavaScript, qui " "peut aussi être utilisée à cet effet." -#: library/configparser.rst:61 +#: library/configparser.rst:59 msgid "Quick Start" msgstr "Premiers pas" -#: library/configparser.rst:63 +#: library/configparser.rst:61 msgid "Let's take a very basic configuration file that looks like this:" msgstr "" "Prenons pour exemple un fichier de configuration très simple ressemblant à " "ceci :" -#: library/configparser.rst:80 +#: library/configparser.rst:78 +#, fuzzy msgid "" "The structure of INI files is described `in the following section " "<#supported-ini-file-structure>`_. Essentially, the file consists of " -"sections, each of which contains keys with values. :mod:`configparser` " +"sections, each of which contains keys with values. :mod:`!configparser` " "classes can read and write such files. Let's start by creating the above " "configuration file programmatically." msgstr "" @@ -110,7 +118,7 @@ msgstr "" "Les classes du module :mod:`configparser` peuvent écrire et lire de tels " "fichiers. Commençons par le code qui permet de générer le fichier ci-dessus." -#: library/configparser.rst:104 +#: library/configparser.rst:102 msgid "" "As you can see, we can treat a config parser much like a dictionary. There " "are differences, `outlined later <#mapping-protocol-access>`_, but the " @@ -122,7 +130,7 @@ msgstr "" "protocol-access>`_, mais le comportement de l'instance est très proche de ce " "que vous pourriez attendre d'un dictionnaire." -#: library/configparser.rst:108 +#: library/configparser.rst:106 msgid "" "Now that we have created and saved a configuration file, let's read it back " "and explore the data it holds." @@ -131,7 +139,7 @@ msgstr "" "maintenant comment nous pouvons le lire et accéder aux données qu'il " "contient." -#: library/configparser.rst:143 +#: library/configparser.rst:141 msgid "" "As we can see above, the API is pretty straightforward. The only bit of " "magic involves the ``DEFAULT`` section which provides default values for all " @@ -144,23 +152,24 @@ msgstr "" "l’intérieur des sections ne sont pas sensibles à la casse et qu'elles sont " "stockées en minuscules. [1]_." -#: library/configparser.rst:993 +#: library/configparser.rst:1001 msgid "" -"It is possible to read several configurations into a single :class:" -"`ConfigParser`, where the most recently added configuration has the highest " -"priority. Any conflicting keys are taken from the more recent configuration " -"while the previously existing keys are retained. The example below reads in " -"an ``override.ini`` file, which will override any conflicting keys from the " -"``example.ini`` file." +"It is possible to read several configurations into a " +"single :class:`ConfigParser`, where the most recently added configuration " +"has the highest priority. Any conflicting keys are taken from the more " +"recent configuration while the previously existing keys are retained. The " +"example below reads in an ``override.ini`` file, which will override any " +"conflicting keys from the ``example.ini`` file." msgstr "" -"Il est possible de lire plusieurs configurations dans un seul objet :class:" -"`ConfigParser`, où la configuration ajoutée la plus récemment a la priorité " -"la plus élevée. Toutes les clés en conflit sont prises de la configuration " -"la plus récente tandis que les anciennes clés déjà existantes sont mises de " -"côté. L'exemple suivant lit un fichier ``override.ini`` qui prendra le " -"dessus sur toutes les clés en conflit avec le fichier ``exemple.ini``." +"Il est possible de lire plusieurs configurations dans un seul " +"objet :class:`ConfigParser`, où la configuration ajoutée la plus récemment a " +"la priorité la plus élevée. Toutes les clés en conflit sont prises de la " +"configuration la plus récente tandis que les anciennes clés déjà existantes " +"sont mises de côté. L'exemple suivant lit un fichier ``override.ini`` qui " +"prendra le dessus sur toutes les clés en conflit avec le fichier " +"``exemple.ini``." -#: library/configparser.rst:174 +#: library/configparser.rst:172 msgid "" "This behaviour is equivalent to a :meth:`ConfigParser.read` call with " "several files passed to the *filenames* parameter." @@ -168,11 +177,11 @@ msgstr "" "Ce comportement est équivalent à un appel à :meth:`ConfigParser.read` avec " "plusieurs fichiers passés dans le paramètre *filenames*." -#: library/configparser.rst:179 +#: library/configparser.rst:177 msgid "Supported Datatypes" msgstr "Types de données prises en charge" -#: library/configparser.rst:181 +#: library/configparser.rst:179 msgid "" "Config parsers do not guess datatypes of values in configuration files, " "always storing them internally as strings. This means that if you need " @@ -183,7 +192,7 @@ msgstr "" "stockées en tant que chaînes de caractères. Ainsi, si vous avez besoin d'un " "type différent, vous devez effectuer la conversion vous-même :" -#: library/configparser.rst:192 +#: library/configparser.rst:190 msgid "" "Since this task is so common, config parsers provide a range of handy getter " "methods to handle integers, floats and booleans. The last one is the most " @@ -204,7 +213,7 @@ msgstr "" "chaînes de caractères comme ``'yes'``-``'no'``, ``'on'``-``'off'``, " "``'true'``-``'false'`` et ``'1'``-``'0'`` [1]_. Par exemple :" -#: library/configparser.rst:209 +#: library/configparser.rst:207 msgid "" "Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide " "equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` " @@ -212,15 +221,16 @@ msgid "" "ones. [1]_" msgstr "" "En plus de :meth:`~ConfigParser.getboolean`, les lecteurs de configurations " -"fournissent également des méthodes similaires comme :meth:`~ConfigParser." -"getint` et :meth:`~ConfigParser.getfloat`. Vous pouvez enregistrer vos " -"propres convertisseurs et personnaliser ceux déjà fournis. [1]_" +"fournissent également des méthodes similaires " +"comme :meth:`~ConfigParser.getint` et :meth:`~ConfigParser.getfloat`. Vous " +"pouvez enregistrer vos propres convertisseurs et personnaliser ceux déjà " +"fournis. [1]_" -#: library/configparser.rst:215 +#: library/configparser.rst:213 msgid "Fallback Values" msgstr "Valeurs de substitution" -#: library/configparser.rst:217 +#: library/configparser.rst:215 #, fuzzy msgid "" "As with a dictionary, you can use a section's :meth:`~ConfigParser.get` " @@ -229,7 +239,7 @@ msgstr "" "Comme pour un dictionnaire, vous pouvez utiliser la méthode :meth:`get` " "d'une section en spécifiant une valeur de substitution :" -#: library/configparser.rst:230 +#: library/configparser.rst:228 #, fuzzy msgid "" "Please note that default values have precedence over fallback values. For " @@ -244,34 +254,34 @@ msgstr "" "la récupérer depuis la section ``'topsecret.server.com'``, nous obtenons la " "valeur par défaut, même en ayant spécifié une valeur de substitution :" -#: library/configparser.rst:241 +#: library/configparser.rst:239 #, fuzzy msgid "" -"One more thing to be aware of is that the parser-level :meth:`~ConfigParser." -"get` method provides a custom, more complex interface, maintained for " -"backwards compatibility. When using this method, a fallback value can be " -"provided via the ``fallback`` keyword-only argument:" +"One more thing to be aware of is that the parser-" +"level :meth:`~ConfigParser.get` method provides a custom, more complex " +"interface, maintained for backwards compatibility. When using this method, " +"a fallback value can be provided via the ``fallback`` keyword-only argument:" msgstr "" "Il est important de savoir que la méthode :meth:`get` appelée au niveau de " "l'analyseur fournit une interface particulière et plus complexe, qui est " "maintenue pour des raisons de rétrocompatibilité. Vous pouvez fournir une " "valeur de substitution via l'argument obligatoirement nommé ``fallback`` :" -#: library/configparser.rst:252 +#: library/configparser.rst:250 msgid "" -"The same ``fallback`` argument can be used with the :meth:`~ConfigParser." -"getint`, :meth:`~ConfigParser.getfloat` and :meth:`~ConfigParser.getboolean` " -"methods, for example:" +"The same ``fallback`` argument can be used with " +"the :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` " +"and :meth:`~ConfigParser.getboolean` methods, for example:" msgstr "" "L'argument ``fallback`` peut être utilisé de la même façon avec les " -"méthodes :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` et :" -"meth:`~ConfigParser.getboolean`. Par exemple :" +"méthodes :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` " +"et :meth:`~ConfigParser.getboolean`. Par exemple :" -#: library/configparser.rst:268 +#: library/configparser.rst:266 msgid "Supported INI File Structure" msgstr "Structure des fichiers *INI* prise en change" -#: library/configparser.rst:270 +#: library/configparser.rst:268 #, fuzzy msgid "" "A configuration file consists of sections, each led by a ``[section]`` " @@ -296,7 +306,7 @@ msgstr "" "vides peuvent être considérées comme faisant partie des valeurs multi " "lignes, en fonction de la configuration de l'analyseur." -#: library/configparser.rst:280 +#: library/configparser.rst:278 msgid "" "By default, a valid section name can be any string that does not contain '\\" "\\n'. To change this, see :attr:`ConfigParser.SECTCRE`." @@ -305,7 +315,7 @@ msgstr "" "caractères ne contenant pas le caractère ``'\\\\n'``. Pour modifier cela, " "voir :attr:`ConfigParser.SECTCRE`." -#: library/configparser.rst:283 +#: library/configparser.rst:281 msgid "" "The first section name may be omitted if the parser is configured to allow " "an unnamed top level section with ``allow_unnamed_section=True``. In this " @@ -313,7 +323,7 @@ msgid "" "``config[UNNAMED_SECTION]``." msgstr "" -#: library/configparser.rst:288 +#: library/configparser.rst:286 msgid "" "Configuration files may include comments, prefixed by specific characters " "(``#`` and ``;`` by default [1]_). Comments may appear on their own on an " @@ -324,25 +334,25 @@ msgstr "" "commentaires peuvent apparaître à l'emplacement d'une ligne vide, et peuvent " "aussi être indentés. [1]_" -#: library/configparser.rst:376 +#: library/configparser.rst:374 msgid "For example:" msgstr "Par exemple :" -#: library/configparser.rst:342 +#: library/configparser.rst:340 msgid "Unnamed Sections" msgstr "" -#: library/configparser.rst:344 +#: library/configparser.rst:342 msgid "" "The name of the first section (or unique) may be omitted and values " "retrieved by the :const:`UNNAMED_SECTION` attribute." msgstr "" -#: library/configparser.rst:361 +#: library/configparser.rst:359 msgid "Interpolation of values" msgstr "Interpolation des valeurs" -#: library/configparser.rst:363 +#: library/configparser.rst:361 msgid "" "On top of the core functionality, :class:`ConfigParser` supports " "interpolation. This means values can be preprocessed before returning them " @@ -352,7 +362,7 @@ msgstr "" "fonctionnalités de base. Cela signifie que les valeurs peuvent être traitées " "avant d'être renvoyées par les appels aux méthodes ``get()``." -#: library/configparser.rst:371 +#: library/configparser.rst:369 msgid "" "The default implementation used by :class:`ConfigParser`. It enables values " "to contain format strings which refer to other values in the same section, " @@ -365,7 +375,7 @@ msgstr "" "section spéciale par défaut [1]_. D'autres valeurs par défaut peuvent être " "fournies au moment de l'initialisation de cette classe." -#: library/configparser.rst:389 +#: library/configparser.rst:387 msgid "" "In the example above, :class:`ConfigParser` with *interpolation* set to " "``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of " @@ -382,24 +392,24 @@ msgstr "" "utilisées comme référence à l’intérieur des chaînes de formatage peuvent " "être définies dans le fichier de configuration dans n'importe quel ordre." -#: library/configparser.rst:396 +#: library/configparser.rst:394 msgid "" -"With ``interpolation`` set to ``None``, the parser would simply return " -"``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" +"With ``interpolation`` set to ``None``, the parser would simply return ``%" +"(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" "lumberjack`` as the value of ``my_dir``." msgstr "" -"Si l'attribut ``interpolation`` vaut ``None``, le lecteur renvoie " -"``%(my_dir)s/Pictures`` comme valeur pour ``my_pictures`` et ``%(home_dir)s/" +"Si l'attribut ``interpolation`` vaut ``None``, le lecteur renvoie ``%" +"(my_dir)s/Pictures`` comme valeur pour ``my_pictures`` et ``%(home_dir)s/" "lumberjack`` comme valeur pour ``my_dir``." -#: library/configparser.rst:404 +#: library/configparser.rst:402 msgid "" "An alternative handler for interpolation which implements a more advanced " "syntax, used for instance in ``zc.buildout``. Extended interpolation is " "using ``${section:option}`` to denote a value from a foreign section. " -"Interpolation can span multiple levels. For convenience, if the ``section:" -"`` part is omitted, interpolation defaults to the current section (and " -"possibly the default values from the special section)." +"Interpolation can span multiple levels. For convenience, if the " +"``section:`` part is omitted, interpolation defaults to the current section " +"(and possibly the default values from the special section)." msgstr "" "Autre façon de gérer l'interpolation en utilisant une syntaxe plus avancée, " "utilisée par exemple par ``zc.buildout``. Cette syntaxe étendue utilise la " @@ -409,7 +419,7 @@ msgstr "" "l'interpolation utilise la section courante par défaut (et, le cas échéant, " "les valeurs de la section par défaut spéciale)." -#: library/configparser.rst:411 +#: library/configparser.rst:409 msgid "" "For example, the configuration specified above with basic interpolation, " "would look like this with extended interpolation:" @@ -417,20 +427,21 @@ msgstr "" "Voici comment transformer la configuration ci-dessus avec la syntaxe " "d'interpolation étendue :" -#: library/configparser.rst:425 +#: library/configparser.rst:423 msgid "Values from other sections can be fetched as well:" msgstr "" "Vous pouvez également récupérer des valeurs appartenant aux autres sections :" -#: library/configparser.rst:447 +#: library/configparser.rst:445 msgid "Mapping Protocol Access" msgstr "Protocole d'accès associatif" -#: library/configparser.rst:451 +#: library/configparser.rst:449 +#, fuzzy msgid "" "Mapping protocol access is a generic name for functionality that enables " -"using custom objects as if they were dictionaries. In case of :mod:" -"`configparser`, the mapping interface implementation is using the " +"using custom objects as if they were dictionaries. In case of :mod:`!" +"configparser`, the mapping interface implementation is using the " "``parser['section']['option']`` notation." msgstr "" "Le terme « protocole d'accès associatif » est utilisé pour décrire la " @@ -439,7 +450,7 @@ msgstr "" "l’implémentation du protocole utilise la notation ``parser['section']" "['option']``." -#: library/configparser.rst:456 +#: library/configparser.rst:454 msgid "" "``parser['section']`` in particular returns a proxy for the section's data " "in the parser. This means that the values are not copied but they are taken " @@ -454,20 +465,21 @@ msgstr "" "mandataire pour une section, elles sont en réalité changées dans l'analyseur " "initial." -#: library/configparser.rst:462 +#: library/configparser.rst:460 +#, fuzzy msgid "" -":mod:`configparser` objects behave as close to actual dictionaries as " -"possible. The mapping interface is complete and adheres to the :class:" -"`~collections.abc.MutableMapping` ABC. However, there are a few differences " -"that should be taken into account:" +":mod:`!configparser` objects behave as close to actual dictionaries as " +"possible. The mapping interface is complete and adheres to " +"the :class:`~collections.abc.MutableMapping` ABC. However, there are a few " +"differences that should be taken into account:" msgstr "" "Les objets du module :mod:`configparser` se comportent le plus possible " "comme des vrais dictionnaires. L'interface est complète et suit les " -"définitions fournies par la classe abstraite :class:`~collections.abc." -"MutableMapping`. Cependant, il faut prendre en compte un certain nombre de " -"différences :" +"définitions fournies par la classe " +"abstraite :class:`~collections.abc.MutableMapping`. Cependant, il faut " +"prendre en compte un certain nombre de différences :" -#: library/configparser.rst:467 +#: library/configparser.rst:465 msgid "" "By default, all keys in sections are accessible in a case-insensitive manner " "[1]_. E.g. ``for option in parser[\"section\"]`` yields only " @@ -481,10 +493,10 @@ msgstr "" "c'est-à-dire des clés transformées en minuscules. De même, pour une section " "contenant la clé ``a``, les deux expressions suivantes renvoient ``True`` ::" -#: library/configparser.rst:475 +#: library/configparser.rst:473 msgid "" -"All sections include ``DEFAULTSECT`` values as well which means that ``." -"clear()`` on a section may not leave the section visibly empty. This is " +"All sections include ``DEFAULTSECT`` values as well which means that " +"``.clear()`` on a section may not leave the section visibly empty. This is " "because default values cannot be deleted from the section (because " "technically they are not there). If they are overridden in the section, " "deleting causes the default value to be visible again. Trying to delete a " @@ -496,28 +508,28 @@ msgstr "" "peuvent pas être supprimées de la section (car, techniquement, elles n'y " "sont pas présentes). Si vous détruisez une valeur par défaut qui a été " "écrasée dans une section, alors la valeur par défaut sera de nouveau " -"visible. Essayer de détruire une valeur par défaut lève l'exception :exc:" -"`KeyError`." +"visible. Essayer de détruire une valeur par défaut lève " +"l'exception :exc:`KeyError`." -#: library/configparser.rst:482 +#: library/configparser.rst:480 msgid "``DEFAULTSECT`` cannot be removed from the parser:" msgstr "La section ``DEFAULTSECT`` ne peut pas être supprimée :" # fausse alerte dans poedit - garder le point-virgule -#: library/configparser.rst:484 +#: library/configparser.rst:482 msgid "trying to delete it raises :exc:`ValueError`," msgstr "l'exception :exc:`ValueError` est levée si on essaye de la supprimer ;" # fausse alerte dans poedit - garder le point-virgule -#: library/configparser.rst:486 +#: library/configparser.rst:484 msgid "``parser.clear()`` leaves it intact," msgstr "appeler ``parser.clear()`` la laisse intacte ;" -#: library/configparser.rst:488 +#: library/configparser.rst:486 msgid "``parser.popitem()`` never returns it." msgstr "appeler ``parser.popitem()`` ne la renvoie jamais." -#: library/configparser.rst:490 +#: library/configparser.rst:488 msgid "" "``parser.get(section, option, **kwargs)`` - the second argument is **not** a " "fallback value. Note however that the section-level ``get()`` methods are " @@ -528,14 +540,14 @@ msgstr "" "``get()`` fournies par les sections sont compatibles à la fois avec le " "protocole associatif et avec l'API classique de *configparser*." -#: library/configparser.rst:494 +#: library/configparser.rst:492 msgid "" "``parser.items()`` is compatible with the mapping protocol (returns a list " "of *section_name*, *section_proxy* pairs including the DEFAULTSECT). " -"However, this method can also be invoked with arguments: ``parser." -"items(section, raw, vars)``. The latter call returns a list of *option*, " -"*value* pairs for a specified ``section``, with all interpolations expanded " -"(unless ``raw=True`` is provided)." +"However, this method can also be invoked with arguments: " +"``parser.items(section, raw, vars)``. The latter call returns a list of " +"*option*, *value* pairs for a specified ``section``, with all interpolations " +"expanded (unless ``raw=True`` is provided)." msgstr "" "La méthode ``parser.items()`` est compatible avec le protocole d'accès " "associatif et renvoie une liste de paires *section_name*, *section_proxy*, " @@ -545,7 +557,7 @@ msgstr "" "section spécifiée, en interprétant les interpolations (à moins d'utiliser " "``raw=True``)." -#: library/configparser.rst:501 +#: library/configparser.rst:499 msgid "" "The mapping protocol is implemented on top of the existing legacy API so " "that subclasses overriding the original interface still should have mappings " @@ -555,14 +567,15 @@ msgstr "" "sous-classes qui écrasent des méthodes de l'interface originale se " "comportent correctement du point de vue du protocole d'accès." -#: library/configparser.rst:507 +#: library/configparser.rst:505 msgid "Customizing Parser Behaviour" msgstr "Personnalisation du comportement de l'analyseur" -#: library/configparser.rst:509 +#: library/configparser.rst:507 +#, fuzzy msgid "" "There are nearly as many INI format variants as there are applications using " -"it. :mod:`configparser` goes a long way to provide support for the largest " +"it. :mod:`!configparser` goes a long way to provide support for the largest " "sensible set of INI styles available. The default functionality is mainly " "dictated by historical background and it's very likely that you will want to " "customize some of the features." @@ -574,21 +587,21 @@ msgstr "" "raisons historiques. De ce fait, il est très probable qu'il soit nécessaire " "de personnaliser certaines des fonctionnalités de ce module." -#: library/configparser.rst:515 +#: library/configparser.rst:513 #, fuzzy msgid "" "The most common way to change the way a specific config parser works is to " "use the :meth:`!__init__` options:" msgstr "" "La méthode la plus fréquemment utilisée pour changer la façon dont se " -"comporte un analyseur est d’utiliser les options de la méthode :meth:" -"`__init__` :" +"comporte un analyseur est d’utiliser les options de la " +"méthode :meth:`__init__` :" -#: library/configparser.rst:518 +#: library/configparser.rst:516 msgid "*defaults*, default value: ``None``" msgstr "*defaults*, valeur par défaut : ``None``" -#: library/configparser.rst:520 +#: library/configparser.rst:518 msgid "" "This option accepts a dictionary of key-value pairs which will be initially " "put in the ``DEFAULT`` section. This makes for an elegant way to support " @@ -601,21 +614,21 @@ msgstr "" "besoin de spécifier de valeurs lorsque celles-ci sont identiques aux valeurs " "par défaut documentées." -#: library/configparser.rst:525 +#: library/configparser.rst:523 #, fuzzy msgid "" -"Hint: if you want to specify default values for a specific section, use :" -"meth:`~ConfigParser.read_dict` before you read the actual file." +"Hint: if you want to specify default values for a specific section, " +"use :meth:`~ConfigParser.read_dict` before you read the actual file." msgstr "" "Conseil : utilisez la méthode :meth:`read_dict` avant de lire le ficher de " "configuration si vous voulez spécifier des valeurs par défaut pour une " "section spécifique." -#: library/configparser.rst:528 +#: library/configparser.rst:526 msgid "*dict_type*, default value: :class:`dict`" msgstr "*dict_type*, valeur par défaut : :class:`dict`" -#: library/configparser.rst:530 +#: library/configparser.rst:528 msgid "" "This option has a major impact on how the mapping protocol will behave and " "how the written configuration files look. With the standard dictionary, " @@ -628,7 +641,7 @@ msgstr "" "sont stockées dans l'ordre où elles ont été ajoutées à l'analyseur. Ceci est " "également vrai pour les options à l'intérieur des sections." -#: library/configparser.rst:535 +#: library/configparser.rst:533 msgid "" "An alternative dictionary type can be used for example to sort sections and " "options on write-back." @@ -636,7 +649,7 @@ msgstr "" "Si vous souhaitez classer les sections et les options lors de l'écriture par " "exemple, vous pouvez utiliser un type de dictionnaire différent." -#: library/configparser.rst:538 +#: library/configparser.rst:536 msgid "" "Please note: there are ways to add a set of key-value pairs in a single " "operation. When you use a regular dictionary in those operations, the order " @@ -646,16 +659,17 @@ msgstr "" "une seule opération. L'ordre des clés est préservé si vous utilisez un " "dictionnaire standard pour cela. Par exemple :" -#: library/configparser.rst:560 +#: library/configparser.rst:558 msgid "*allow_no_value*, default value: ``False``" msgstr "*allow_no_value*, valeur par défaut : ``False``" -#: library/configparser.rst:562 +#: library/configparser.rst:560 +#, fuzzy msgid "" "Some configuration files are known to include settings without values, but " -"which otherwise conform to the syntax supported by :mod:`configparser`. The " -"*allow_no_value* parameter to the constructor can be used to indicate that " -"such values should be accepted:" +"which otherwise conform to the syntax supported by :mod:`!configparser`. " +"The *allow_no_value* parameter to the constructor can be used to indicate " +"that such values should be accepted:" msgstr "" "Certains fichiers de configurations sont connus pour contenir des options " "sans valeur associée, tout en se conformant à la syntaxe prise en charge par " @@ -663,11 +677,11 @@ msgstr "" "valeurs sont acceptables, utilisez le paramètre *allow_no_value* lors de la " "construction de l'instance :" -#: library/configparser.rst:597 +#: library/configparser.rst:595 msgid "*delimiters*, default value: ``('=', ':')``" msgstr "*delimiters*, valeur par défaut : ``('=', ':')``" -#: library/configparser.rst:599 +#: library/configparser.rst:597 msgid "" "Delimiters are substrings that delimit keys from values within a section. " "The first occurrence of a delimiting substring on a line is considered a " @@ -678,27 +692,27 @@ msgstr "" "est considérée comme un délimiteur. Cela signifie que les valeurs peuvent " "contenir certains des délimiteurs (mais pas les clés)." -#: library/configparser.rst:603 +#: library/configparser.rst:601 msgid "" -"See also the *space_around_delimiters* argument to :meth:`ConfigParser." -"write`." +"See also the *space_around_delimiters* argument " +"to :meth:`ConfigParser.write`." msgstr "" -"Voir aussi l'argument *space_around_delimiters* de la méthode :meth:" -"`ConfigParser.write`." +"Voir aussi l'argument *space_around_delimiters* de la " +"méthode :meth:`ConfigParser.write`." -#: library/configparser.rst:606 +#: library/configparser.rst:604 msgid "*comment_prefixes*, default value: ``('#', ';')``" msgstr "" "*comment_prefixes* (préfixes de commentaire) — valeur par défaut : ``('#', " "';')``" -#: library/configparser.rst:608 +#: library/configparser.rst:606 msgid "*inline_comment_prefixes*, default value: ``None``" msgstr "" "*inline_comment_prefixes* (préfixes de commentaire en ligne) — valeur par " "défaut : ``('#', ';')``" -#: library/configparser.rst:610 +#: library/configparser.rst:608 msgid "" "Comment prefixes are strings that indicate the start of a valid comment " "within a config file. *comment_prefixes* are used only on otherwise empty " @@ -716,16 +730,17 @@ msgstr "" "préfixes utilisés pour les commentaires à l'emplacement d'une ligne vide " "sont ``'#'`` et ``';'``." -#: library/configparser.rst:617 +#: library/configparser.rst:615 +#, fuzzy msgid "" -"In previous versions of :mod:`configparser` behaviour matched " +"In previous versions of :mod:`!configparser` behaviour matched " "``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``." msgstr "" "Les précédentes versions du module :mod:`configparser` se comportent comme " "en utilisant ``comment_prefixes=('#',';')`` et " "``inline_comment_prefixes=(';',)``." -#: library/configparser.rst:621 +#: library/configparser.rst:619 msgid "" "Please note that config parsers don't support escaping of comment prefixes " "so using *inline_comment_prefixes* may prevent users from specifying option " @@ -742,37 +757,39 @@ msgstr "" "la seule façon de stocker des préfixes de commentaires au début d'une valeur " "multi lignes est d'interpoler ceux-ci, par exemple ::" -#: library/configparser.rst:667 +#: library/configparser.rst:665 msgid "*strict*, default value: ``True``" msgstr "*scrict*, valeur par défaut : ``True``" -#: library/configparser.rst:669 +#: library/configparser.rst:667 #, fuzzy msgid "" "When set to ``True``, the parser will not allow for any section or option " -"duplicates while reading from a single source (using :meth:`~ConfigParser." -"read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser." -"read_dict`). It is recommended to use strict parsers in new applications." +"duplicates while reading from a single source " +"(using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` " +"or :meth:`~ConfigParser.read_dict`). It is recommended to use strict " +"parsers in new applications." msgstr "" "Quand la valeur ``True`` est spécifiée, le parseur refuse toute section ou " -"option dupliquée lors de la lecture d'une source unique (lorsque :meth:" -"`read_file`, :meth:`read_string` ou :meth:`read_dict` sont utilisées). Il " -"est recommandé d'utiliser un mode de fonctionnement strict pour les " -"analyseurs employés par de nouvelles applications." +"option dupliquée lors de la lecture d'une source unique " +"(lorsque :meth:`read_file`, :meth:`read_string` ou :meth:`read_dict` sont " +"utilisées). Il est recommandé d'utiliser un mode de fonctionnement strict " +"pour les analyseurs employés par de nouvelles applications." -#: library/configparser.rst:674 +#: library/configparser.rst:672 +#, fuzzy msgid "" -"In previous versions of :mod:`configparser` behaviour matched " +"In previous versions of :mod:`!configparser` behaviour matched " "``strict=False``." msgstr "" "Les versions précédentes du module :mod:`configparser` se comportent comme " "en utilisant ``strict=False``." -#: library/configparser.rst:678 +#: library/configparser.rst:676 msgid "*empty_lines_in_values*, default value: ``True``" msgstr "*empty_lines_in_values*, valeur par défaut : ``True``" -#: library/configparser.rst:680 +#: library/configparser.rst:678 msgid "" "In config parsers, values can span multiple lines as long as they are " "indented more than the key that holds them. By default parsers also let " @@ -789,7 +806,7 @@ msgstr "" "est probable que l'utilisateur perde de vue la structure du fichier lorsque " "celui-ci devient long et complexe. Prenez par exemple :" -#: library/configparser.rst:695 +#: library/configparser.rst:693 msgid "" "This can be especially problematic for the user to see if she's using a " "proportional font to edit the file. That is why when your application does " @@ -804,7 +821,7 @@ msgstr "" "sont toujours interprétées comme séparant des clés. Dans l'exemple ci-" "dessus, cela produit deux clés : ``key`` et ``this``." -#: library/configparser.rst:701 +#: library/configparser.rst:699 msgid "" "*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: " "``\"DEFAULT\"``)" @@ -812,7 +829,7 @@ msgstr "" "*default_section*, valeur par défaut : ``configparser.DEFAULTSECT`` " "(autrement dit : ``\"DEFAULT\"``)" -#: library/configparser.rst:704 +#: library/configparser.rst:702 msgid "" "The convention of allowing a special section of default values for other " "sections or interpolation purposes is a powerful concept of this library, " @@ -821,9 +838,9 @@ msgid "" "other valid section name. Some typical values include: ``\"general\"`` or " "``\"common\"``. The name provided is used for recognizing default sections " "when reading from any source and is used when writing configuration back to " -"a file. Its current value can be retrieved using the ``parser_instance." -"default_section`` attribute and may be modified at runtime (i.e. to convert " -"files from one format to another)." +"a file. Its current value can be retrieved using the " +"``parser_instance.default_section`` attribute and may be modified at runtime " +"(i.e. to convert files from one format to another)." msgstr "" "La convention permettant d’autoriser une section spéciale de valeurs par " "défaut pour d’autres sections ou à des fins d’interpolation est un concept " @@ -839,19 +856,19 @@ msgstr "" "modifiée au moment de l’exécution (c’est-à-dire pour convertir des fichiers " "d’un format à un autre)." -#: library/configparser.rst:715 +#: library/configparser.rst:713 msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" msgstr "" "*interpolation*, valeur par défaut : ``configparser.BasicInterpolation``" -#: library/configparser.rst:717 +#: library/configparser.rst:715 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " "interpolation completely, ``ExtendedInterpolation()`` provides a more " "advanced variant inspired by ``zc.buildout``. More on the subject in the " -"`dedicated documentation section <#interpolation-of-values>`_. :class:" -"`RawConfigParser` has a default value of ``None``." +"`dedicated documentation section <#interpolation-of-" +"values>`_. :class:`RawConfigParser` has a default value of ``None``." msgstr "" "Le comportement d'interpolation peut être personnalisé en fournissant un " "gestionnaire personnalisé via l'argument *interpolation*. ``None`` peut être " @@ -861,37 +878,37 @@ msgstr "" "la documentation <#interpolation-of-values>`_. :class:`RowConfigParser` vaut " "``None`` par défaut." -#: library/configparser.rst:724 +#: library/configparser.rst:722 msgid "*converters*, default value: not set" msgstr "*converters*, valeur par défaut : non défini" -#: library/configparser.rst:726 +#: library/configparser.rst:724 msgid "" "Config parsers provide option value getters that perform type conversion. " "By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " "and :meth:`~ConfigParser.getboolean` are implemented. Should other getters " "be desirable, users may define them in a subclass or pass a dictionary where " "each key is a name of the converter and each value is a callable " -"implementing said conversion. For instance, passing ``{'decimal': decimal." -"Decimal}`` would add :meth:`!getdecimal` on both the parser object and all " -"section proxies. In other words, it will be possible to write both " +"implementing said conversion. For instance, passing ``{'decimal': " +"decimal.Decimal}`` would add :meth:`!getdecimal` on both the parser object " +"and all section proxies. In other words, it will be possible to write both " "``parser_instance.getdecimal('section', 'key', fallback=0)`` and " "``parser_instance['section'].getdecimal('key', 0)``." msgstr "" "Les analyseurs de configuration fournissent des fonctions de récupération de " -"valeurs qui effectuent la conversion par type. Par défaut, :meth:" -"`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` et :meth:" -"`~ConfigParser.getboolean` sont implémentées. Si vous désirez d’autres " -"fonctions de récupération de valeurs, vous pouvez les définir dans une sous-" -"classe ou transmettre un dictionnaire où chaque clé est le nom du " +"valeurs qui effectuent la conversion par type. Par " +"défaut, :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` " +"et :meth:`~ConfigParser.getboolean` sont implémentées. Si vous désirez " +"d’autres fonctions de récupération de valeurs, vous pouvez les définir dans " +"une sous-classe ou transmettre un dictionnaire où chaque clé est le nom du " "convertisseur et chaque valeur est une fonction implémentant ladite " -"conversion. Par exemple, passer ``{'decimal':decimal.Decimal}`` ajouterait :" -"meth:`!getdecimal` à la fois sur l’analyseur et sur tous les proxys de " -"section. En d’autres termes, il sera possible d’écrire à la fois " +"conversion. Par exemple, passer ``{'decimal':decimal.Decimal}`` " +"ajouterait :meth:`!getdecimal` à la fois sur l’analyseur et sur tous les " +"proxys de section. En d’autres termes, il sera possible d’écrire à la fois " "``parser_instance.getdecimal('section', 'key', fallback=0)`` et " "``parser_instance['section'].getdecimal('key', 0)``." -#: library/configparser.rst:737 +#: library/configparser.rst:735 msgid "" "If the converter needs to access the state of the parser, it can be " "implemented as a method on a config parser subclass. If the name of this " @@ -904,7 +921,7 @@ msgstr "" "disponible sur tous les proxys de section, sous la forme compatible avec un " "dictionnaire (voir l'exemple ``getdecimal()`` ci-dessus)." -#: library/configparser.rst:742 +#: library/configparser.rst:740 msgid "" "More advanced customization may be achieved by overriding default values of " "these parser attributes. The defaults are defined on the classes, so they " @@ -915,7 +932,7 @@ msgstr "" "sont définies sur les classes, elles peuvent donc être remplacées par des " "sous-classes ou par des attributs d'instance." -#: library/configparser.rst:748 +#: library/configparser.rst:746 msgid "" "By default when using :meth:`~ConfigParser.getboolean`, config parsers " "consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " @@ -930,13 +947,13 @@ msgstr "" "dictionnaire associant des chaînes de caractères à des valeurs booléennes. " "Par exemple :" -#: library/configparser.rst:766 +#: library/configparser.rst:764 msgid "" "Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" "``disabled``." msgstr "" -#: library/configparser.rst:772 +#: library/configparser.rst:770 msgid "" "This method transforms option names on every read, get, or set operation. " "The default converts the name to lowercase. This also means that when a " @@ -944,14 +961,14 @@ msgid "" "method if that's unsuitable. For example:" msgstr "" -#: library/configparser.rst:802 +#: library/configparser.rst:800 msgid "" "The optionxform function transforms option names to a canonical form. This " "should be an idempotent function: if the name is already in canonical form, " "it should be returned unchanged." msgstr "" -#: library/configparser.rst:809 +#: library/configparser.rst:807 msgid "" "A compiled regular expression used to parse section headers. The default " "matches ``[section]`` to the name ``\"section\"``. Whitespace is considered " @@ -960,49 +977,49 @@ msgid "" "example:" msgstr "" -#: library/configparser.rst:837 +#: library/configparser.rst:835 msgid "" "While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing " "option lines, it's not recommended to override it because that would " "interfere with constructor options *allow_no_value* and *delimiters*." msgstr "" -#: library/configparser.rst:843 +#: library/configparser.rst:841 msgid "Legacy API Examples" msgstr "" -#: library/configparser.rst:845 +#: library/configparser.rst:843 msgid "" -"Mainly because of backwards compatibility concerns, :mod:`configparser` " +"Mainly because of backwards compatibility concerns, :mod:`!configparser` " "provides also a legacy API with explicit ``get``/``set`` methods. While " "there are valid use cases for the methods outlined below, mapping protocol " "access is preferred for new projects. The legacy API is at times more " "advanced, low-level and downright counterintuitive." msgstr "" -#: library/configparser.rst:851 +#: library/configparser.rst:849 msgid "An example of writing to a configuration file::" msgstr "" -#: library/configparser.rst:874 +#: library/configparser.rst:872 msgid "An example of reading the configuration file again::" msgstr "" -#: library/configparser.rst:892 +#: library/configparser.rst:890 msgid "To get interpolation, use :class:`ConfigParser`::" msgstr "" -#: library/configparser.rst:925 +#: library/configparser.rst:923 msgid "" "Default values are available in both types of ConfigParsers. They are used " "in interpolation if an option used is not defined elsewhere. ::" msgstr "" -#: library/configparser.rst:943 +#: library/configparser.rst:941 msgid "ConfigParser Objects" msgstr "" -#: library/configparser.rst:947 +#: library/configparser.rst:951 msgid "" "The main configuration parser. When *defaults* is given, it is initialized " "into the dictionary of intrinsic defaults. When *dict_type* is given, it " @@ -1010,7 +1027,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: library/configparser.rst:952 +#: library/configparser.rst:956 msgid "" "When *delimiters* is given, it is used as the set of substrings that divide " "keys from values. When *comment_prefixes* is given, it will be used as the " @@ -1019,20 +1036,20 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: library/configparser.rst:958 +#: library/configparser.rst:962 msgid "" "When *strict* is ``True`` (the default), the parser won't allow for any " "section or option duplicates while reading from a single source (file, " -"string or dictionary), raising :exc:`DuplicateSectionError` or :exc:" -"`DuplicateOptionError`. When *empty_lines_in_values* is ``False`` (default: " -"``True``), each empty line marks the end of an option. Otherwise, internal " -"empty lines of a multiline option are kept as part of the value. When " -"*allow_no_value* is ``True`` (default: ``False``), options without values " -"are accepted; the value held for these is ``None`` and they are serialized " -"without the trailing delimiter." +"string or dictionary), raising :exc:`DuplicateSectionError` " +"or :exc:`DuplicateOptionError`. When *empty_lines_in_values* is ``False`` " +"(default: ``True``), each empty line marks the end of an option. Otherwise, " +"internal empty lines of a multiline option are kept as part of the value. " +"When *allow_no_value* is ``True`` (default: ``False``), options without " +"values are accepted; the value held for these is ``None`` and they are " +"serialized without the trailing delimiter." msgstr "" -#: library/configparser.rst:968 +#: library/configparser.rst:972 msgid "" "When *default_section* is given, it specifies the name for the special " "section holding default values for other sections and interpolation purposes " @@ -1042,7 +1059,7 @@ msgid "" "settings to a new config file." msgstr "" -#: library/configparser.rst:975 +#: library/configparser.rst:979 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -1051,16 +1068,16 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: library/configparser.rst:981 +#: library/configparser.rst:985 msgid "" -"All option names used in interpolation will be passed through the :meth:" -"`optionxform` method just like any other option name reference. For " -"example, using the default implementation of :meth:`optionxform` (which " -"converts option names to lower case), the values ``foo %(bar)s`` and ``foo " -"%(BAR)s`` are equivalent." +"All option names used in interpolation will be passed through " +"the :meth:`optionxform` method just like any other option name reference. " +"For example, using the default implementation of :meth:`optionxform` (which " +"converts option names to lower case), the values ``foo %(bar)s`` and ``foo %" +"(BAR)s`` are equivalent." msgstr "" -#: library/configparser.rst:987 +#: library/configparser.rst:991 msgid "" "When *converters* is given, it should be a dictionary where each key " "represents the name of a type converter and each value is a callable " @@ -1069,50 +1086,61 @@ msgid "" "object and section proxies." msgstr "" -#: library/configparser.rst:1018 +#: library/configparser.rst:997 +msgid "" +"When *allow_unnamed_section* is ``True`` (default: ``False``), the first " +"section name can be omitted. See the `\"Unnamed Sections\" section <#unnamed-" +"sections>`_." +msgstr "" + +#: library/configparser.rst:1026 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: library/configparser.rst:1021 +#: library/configparser.rst:1322 msgid "" "*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, " "*empty_lines_in_values*, *default_section* and *interpolation* were added." msgstr "" -#: library/configparser.rst:1026 +#: library/configparser.rst:1327 msgid "The *converters* argument was added." msgstr "" -#: library/configparser.rst:1029 +#: library/configparser.rst:1037 msgid "" "The *defaults* argument is read with :meth:`read_dict`, providing consistent " "behavior across the parser: non-string keys and values are implicitly " "converted to strings." msgstr "" -#: library/configparser.rst:1306 +#: library/configparser.rst:1330 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: library/configparser.rst:1038 +#: library/configparser.rst:1046 msgid "" "Raise a :exc:`MultilineContinuationError` when *allow_no_value* is ``True``, " "and a key without a value is continued with an indented line." msgstr "" -#: library/configparser.rst:1044 +#: library/configparser.rst:1334 +msgid "The *allow_unnamed_section* argument was added." +msgstr "" + +#: library/configparser.rst:1055 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: library/configparser.rst:1049 +#: library/configparser.rst:1060 msgid "" "Return a list of the sections available; the *default section* is not " "included in the list." msgstr "" -#: library/configparser.rst:1055 +#: library/configparser.rst:1066 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " @@ -1120,34 +1148,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:1060 +#: library/configparser.rst:1071 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: library/configparser.rst:1066 +#: library/configparser.rst:1077 msgid "" "Indicates whether the named *section* is present in the configuration. The " "*default section* is not acknowledged." msgstr "" -#: library/configparser.rst:1072 +#: library/configparser.rst:1083 msgid "Return a list of options available in the specified *section*." msgstr "" -#: library/configparser.rst:1077 +#: library/configparser.rst:1088 msgid "" -"If the given *section* exists, and contains the given *option*, return :" -"const:`True`; otherwise return :const:`False`. If the specified *section* " -"is :const:`None` or an empty string, DEFAULT is assumed." +"If the given *section* exists, and contains the given *option*, " +"return :const:`True`; otherwise return :const:`False`. If the specified " +"*section* is :const:`None` or an empty string, DEFAULT is assumed." msgstr "" -#: library/configparser.rst:1084 +#: library/configparser.rst:1095 msgid "" "Attempt to read and parse an iterable of filenames, returning a list of " "filenames which were successfully parsed." msgstr "" -#: library/configparser.rst:1087 +#: library/configparser.rst:1098 msgid "" "If *filenames* is a string, a :class:`bytes` object or a :term:`path-like " "object`, it is treated as a single filename. If a file named in *filenames* " @@ -1158,60 +1186,60 @@ msgid "" "be read." msgstr "" -#: library/configparser.rst:1096 +#: library/configparser.rst:1107 msgid "" "If none of the named files exist, the :class:`ConfigParser` instance will " "contain an empty dataset. An application which requires initial values to " -"be loaded from a file should load the required file or files using :meth:" -"`read_file` before calling :meth:`read` for any optional files::" +"be loaded from a file should load the required file or files " +"using :meth:`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: library/configparser.rst:1109 +#: library/configparser.rst:1120 msgid "" "Added the *encoding* parameter. Previously, all files were read using the " "default encoding for :func:`open`." msgstr "" -#: library/configparser.rst:1113 +#: library/configparser.rst:1124 #, fuzzy msgid "The *filenames* parameter accepts a :term:`path-like object`." msgstr "" "Le paramètre *filename* accepte un objet chemin-compatible :term:`path-like " "object`." -#: library/configparser.rst:1116 +#: library/configparser.rst:1127 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: library/configparser.rst:1122 +#: library/configparser.rst:1133 msgid "" "Read and parse configuration data from *f* which must be an iterable " "yielding Unicode strings (for example files opened in text mode)." msgstr "" -#: library/configparser.rst:1125 +#: library/configparser.rst:1136 msgid "" "Optional argument *source* specifies the name of the file being read. If " "not given and *f* has a :attr:`!name` attribute, that is used for *source*; " "the default is ``''``." msgstr "" -#: library/configparser.rst:1129 +#: library/configparser.rst:1140 msgid "Replaces :meth:`!readfp`." msgstr "" -#: library/configparser.rst:1134 +#: library/configparser.rst:1145 msgid "Parse configuration data from a string." msgstr "" -#: library/configparser.rst:1136 +#: library/configparser.rst:1147 msgid "" "Optional argument *source* specifies a context-specific name of the string " "passed. If not given, ``''`` is used. This should commonly be a " "filesystem path or a URL." msgstr "" -#: library/configparser.rst:1145 +#: library/configparser.rst:1156 msgid "" "Load configuration from any object that provides a dict-like ``items()`` " "method. Keys are section names, values are dictionaries with keys and " @@ -1220,17 +1248,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: library/configparser.rst:1151 +#: library/configparser.rst:1162 msgid "" "Optional argument *source* specifies a context-specific name of the " "dictionary passed. If not given, ```` is used." msgstr "" -#: library/configparser.rst:1154 +#: library/configparser.rst:1165 msgid "This method can be used to copy state between parsers." msgstr "" -#: library/configparser.rst:1161 +#: library/configparser.rst:1172 msgid "" "Get an *option* value for the named *section*. If *vars* is provided, it " "must be a dictionary. The *option* is looked up in *vars* (if provided), " @@ -1239,74 +1267,74 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: library/configparser.rst:1167 +#: library/configparser.rst:1178 msgid "" "All the ``'%'`` interpolations are expanded in the return values, unless the " "*raw* argument is true. Values for interpolation keys are looked up in the " "same manner as the option." msgstr "" -#: library/configparser.rst:1171 +#: library/configparser.rst:1182 msgid "" "Arguments *raw*, *vars* and *fallback* are keyword only to protect users " "from trying to use the third argument as the *fallback* fallback (especially " "when using the mapping protocol)." msgstr "" -#: library/configparser.rst:1179 +#: library/configparser.rst:1190 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to an integer. See :meth:`get` for explanation of *raw*, *vars* and " "*fallback*." msgstr "" -#: library/configparser.rst:1186 +#: library/configparser.rst:1197 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a floating-point number. See :meth:`get` for explanation of *raw*, " "*vars* and *fallback*." msgstr "" -#: library/configparser.rst:1193 +#: library/configparser.rst:1204 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a Boolean value. Note that the accepted values for the option are " "``'1'``, ``'yes'``, ``'true'``, and ``'on'``, which cause this method to " "return ``True``, and ``'0'``, ``'no'``, ``'false'``, and ``'off'``, which " "cause it to return ``False``. These string values are checked in a case-" -"insensitive manner. Any other value will cause it to raise :exc:" -"`ValueError`. See :meth:`get` for explanation of *raw*, *vars* and " -"*fallback*." +"insensitive manner. Any other value will cause it to " +"raise :exc:`ValueError`. See :meth:`get` for explanation of *raw*, *vars* " +"and *fallback*." msgstr "" -#: library/configparser.rst:1206 +#: library/configparser.rst:1217 msgid "" "When *section* is not given, return a list of *section_name*, " "*section_proxy* pairs, including DEFAULTSECT." msgstr "" -#: library/configparser.rst:1209 +#: library/configparser.rst:1220 msgid "" "Otherwise, return a list of *name*, *value* pairs for the options in the " -"given *section*. Optional arguments have the same meaning as for the :meth:" -"`get` method." +"given *section*. Optional arguments have the same meaning as for " +"the :meth:`get` method." msgstr "" -#: library/configparser.rst:1213 +#: library/configparser.rst:1224 msgid "" "Items present in *vars* no longer appear in the result. The previous " "behaviour mixed actual parser options with variables provided for " "interpolation." msgstr "" -#: library/configparser.rst:1221 +#: library/configparser.rst:1232 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. *option* and *value* must be " "strings; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:1228 +#: library/configparser.rst:1239 msgid "" "Write a representation of the configuration to the specified :term:`file " "object`, which must be opened in text mode (accepting strings). This " @@ -1315,27 +1343,33 @@ msgid "" "surrounded by spaces." msgstr "" -#: library/configparser.rst:1236 +#: library/configparser.rst:1245 +msgid "" +"Raises InvalidWriteError if this would write a representation which cannot " +"be accurately parsed by a future :meth:`read` call from this parser." +msgstr "" + +#: library/configparser.rst:1251 msgid "" "Comments in the original configuration file are not preserved when writing " "the configuration back. What is considered a comment, depends on the given " "values for *comment_prefix* and *inline_comment_prefix*." msgstr "" -#: library/configparser.rst:1244 +#: library/configparser.rst:1259 msgid "" "Remove the specified *option* from the specified *section*. If the section " "does not exist, raise :exc:`NoSectionError`. If the option existed to be " "removed, return :const:`True`; otherwise return :const:`False`." msgstr "" -#: library/configparser.rst:1252 +#: library/configparser.rst:1267 msgid "" "Remove the specified *section* from the configuration. If the section in " "fact existed, return ``True``. Otherwise return ``False``." msgstr "" -#: library/configparser.rst:1258 +#: library/configparser.rst:1273 msgid "" "Transforms the option name *option* as found in an input file or as passed " "in by client code to the form that should be used in the internal " @@ -1344,7 +1378,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: library/configparser.rst:1264 +#: library/configparser.rst:1279 msgid "" "You don't need to subclass the parser to use this method, you can also set " "it on an instance, to a function that takes a string argument and returns a " @@ -1352,30 +1386,30 @@ msgid "" "sensitive::" msgstr "" -#: library/configparser.rst:1272 +#: library/configparser.rst:1287 msgid "" "Note that when reading configuration files, whitespace around the option " "names is stripped before :meth:`optionxform` is called." msgstr "" -#: library/configparser.rst:1278 +#: library/configparser.rst:1293 msgid "" "A special object representing a section name used to reference the unnamed " "section (see :ref:`unnamed-sections`)." msgstr "" -#: library/configparser.rst:1283 +#: library/configparser.rst:1298 msgid "" -"The maximum depth for recursive interpolation for :meth:`~configparser." -"ConfigParser.get` when the *raw* parameter is false. This is relevant only " -"when the default *interpolation* is used." +"The maximum depth for recursive interpolation " +"for :meth:`~configparser.ConfigParser.get` when the *raw* parameter is " +"false. This is relevant only when the default *interpolation* is used." msgstr "" -#: library/configparser.rst:1291 +#: library/configparser.rst:1306 msgid "RawConfigParser Objects" msgstr "" -#: library/configparser.rst:1301 +#: library/configparser.rst:1317 msgid "" "Legacy variant of the :class:`ConfigParser`. It has interpolation disabled " "by default and allows for non-string section names, option names, and values " @@ -1383,37 +1417,47 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: library/configparser.rst:1311 +#: library/configparser.rst:1338 msgid "" "Consider using :class:`ConfigParser` instead which checks types of the " "values to be stored internally. If you don't want interpolation, you can " "use ``ConfigParser(interpolation=None)``." msgstr "" -#: library/configparser.rst:1318 +#: library/configparser.rst:1345 msgid "" -"Add a section named *section* to the instance. If a section by the given " -"name already exists, :exc:`DuplicateSectionError` is raised. If the " -"*default section* name is passed, :exc:`ValueError` is raised." +"Add a section named *section* or :const:`UNNAMED_SECTION` to the instance." msgstr "" -#: library/configparser.rst:1322 +#: library/configparser.rst:1347 +msgid "" +"If the given section already exists, :exc:`DuplicateSectionError` is raised. " +"If the *default section* name is passed, :exc:`ValueError` is raised. " +"If :const:`UNNAMED_SECTION` is passed and support is " +"disabled, :exc:`UnnamedSectionDisabledError` is raised." +msgstr "" + +#: library/configparser.rst:1352 msgid "" "Type of *section* is not checked which lets users create non-string named " "sections. This behaviour is unsupported and may cause internal errors." msgstr "" -#: library/configparser.rst:1328 +#: library/configparser.rst:1355 +msgid "Added support for :const:`UNNAMED_SECTION`." +msgstr "" + +#: library/configparser.rst:1361 msgid "" "If the given section exists, set the given option to the specified value; " -"otherwise raise :exc:`NoSectionError`. While it is possible to use :class:" -"`RawConfigParser` (or :class:`ConfigParser` with *raw* parameters set to " -"true) for *internal* storage of non-string values, full functionality " +"otherwise raise :exc:`NoSectionError`. While it is possible to " +"use :class:`RawConfigParser` (or :class:`ConfigParser` with *raw* parameters " +"set to true) for *internal* storage of non-string values, full functionality " "(including interpolation and output to files) can only be achieved using " "string values." msgstr "" -#: library/configparser.rst:1335 +#: library/configparser.rst:1368 msgid "" "This method lets users assign non-string values to keys internally. This " "behaviour is unsupported and will cause errors when attempting to write to a " @@ -1421,32 +1465,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: library/configparser.rst:1342 +#: library/configparser.rst:1375 msgid "Exceptions" msgstr "Exceptions" -#: library/configparser.rst:1346 -msgid "Base class for all other :mod:`configparser` exceptions." +#: library/configparser.rst:1379 +msgid "Base class for all other :mod:`!configparser` exceptions." msgstr "" -#: library/configparser.rst:1351 +#: library/configparser.rst:1384 msgid "Exception raised when a specified section is not found." msgstr "" -#: library/configparser.rst:1356 +#: library/configparser.rst:1389 msgid "" "Exception raised if :meth:`~ConfigParser.add_section` is called with the " "name of a section that is already present or in strict parsers when a " "section if found more than once in a single input file, string or dictionary." msgstr "" -#: library/configparser.rst:1360 +#: library/configparser.rst:1393 msgid "" -"Added the optional *source* and *lineno* attributes and parameters to :meth:" -"`!__init__`." +"Added the optional *source* and *lineno* attributes and parameters " +"to :meth:`!__init__`." msgstr "" -#: library/configparser.rst:1367 +#: library/configparser.rst:1400 msgid "" "Exception raised by strict parsers if a single option appears twice during " "reading from a single file, string or dictionary. This catches misspellings " @@ -1454,64 +1498,83 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: library/configparser.rst:1375 +#: library/configparser.rst:1408 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: library/configparser.rst:1381 +#: library/configparser.rst:1414 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: library/configparser.rst:1387 +#: library/configparser.rst:1420 msgid "" "Exception raised when string interpolation cannot be completed because the " -"number of iterations exceeds :const:`MAX_INTERPOLATION_DEPTH`. Subclass of :" -"exc:`InterpolationError`." +"number of iterations exceeds :const:`MAX_INTERPOLATION_DEPTH`. Subclass " +"of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1394 +#: library/configparser.rst:1427 msgid "" "Exception raised when an option referenced from a value does not exist. " "Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1400 +#: library/configparser.rst:1433 msgid "" "Exception raised when the source text into which substitutions are made does " "not conform to the required syntax. Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1406 +#: library/configparser.rst:1439 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: library/configparser.rst:1412 +#: library/configparser.rst:1444 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: library/configparser.rst:1414 +#: library/configparser.rst:1446 msgid "" "The ``filename`` attribute and :meth:`!__init__` constructor argument were " "removed. They have been available using the name ``source`` since 3.2." msgstr "" -#: library/configparser.rst:1420 +#: library/configparser.rst:1452 msgid "" "Exception raised when a key without a corresponding value is continued with " "an indented line." msgstr "" -#: library/configparser.rst:1426 +#: library/configparser.rst:1459 +msgid "" +"Exception raised when attempting to use the :const:`UNNAMED_SECTION` without " +"enabling it." +msgstr "" + +#: library/configparser.rst:1466 +msgid "" +"Exception raised when an attempted :meth:`ConfigParser.write` would not be " +"parsed accurately with a future :meth:`ConfigParser.read` call." +msgstr "" + +#: library/configparser.rst:1469 +msgid "" +"Ex: Writing a key beginning with the :attr:`ConfigParser.SECTCRE` pattern " +"would parse as a section header when read. Attempting to write this will " +"raise this exception." +msgstr "" + +#: library/configparser.rst:1476 msgid "Footnotes" msgstr "Notes" -#: library/configparser.rst:1427 +#: library/configparser.rst:1477 msgid "" "Config parsers allow for heavy customization. If you are interested in " "changing the behaviour outlined by the footnote reference, consult the " diff --git a/library/constants.po b/library/constants.po index 778a3afdb..7fe9af20a 100644 --- a/library/constants.po +++ b/library/constants.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 21:25+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -47,30 +47,32 @@ msgid "" "An object frequently used to represent the absence of a value, as when " "default arguments are not passed to a function. Assignments to ``None`` are " "illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of " -"the :data:`~types.NoneType` type." +"the :class:`~types.NoneType` type." msgstr "" "Objet utilisé fréquemment pour représenter l'absence de valeur, comme " "lorsque des arguments par défaut ne sont pas passés à une fonction. Les " -"assignations à ``None`` ne sont pas autorisées et lèvent une :exc:" -"`SyntaxError`. ``None`` est la seule instance du type :data:`NoneType`." +"assignations à ``None`` ne sont pas autorisées et lèvent " +"une :exc:`SyntaxError`. ``None`` est la seule instance du " +"type :data:`NoneType`." #: library/constants.rst:30 #, fuzzy msgid "" -"A special value which should be returned by the binary special methods (e." -"g. :meth:`~object.__eq__`, :meth:`~object.__lt__`, :meth:`~object.__add__`, :" -"meth:`~object.__rsub__`, etc.) to indicate that the operation is not " -"implemented with respect to the other type; may be returned by the in-place " -"binary special methods (e.g. :meth:`~object.__imul__`, :meth:`~object." -"__iand__`, etc.) for the same purpose. It should not be evaluated in a " -"boolean context. :data:`!NotImplemented` is the sole instance of the :data:" -"`types.NotImplementedType` type." +"A special value which should be returned by the binary special methods " +"(e.g. :meth:`~object.__eq__`, :meth:`~object.__lt__`, :meth:`~object.__add__`, :meth:`~object.__rsub__`, " +"etc.) to indicate that the operation is not implemented with respect to the " +"other type; may be returned by the in-place binary special methods " +"(e.g. :meth:`~object.__imul__`, :meth:`~object.__iand__`, etc.) for the same " +"purpose. It should not be evaluated in a boolean context. :data:`!" +"NotImplemented` is the sole instance of " +"the :class:`types.NotImplementedType` type." msgstr "" "Valeur spéciale qui devrait être renvoyée par les méthodes magiques à deux " -"opérandes (comme :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:" -"`__rsub__`, etc.) pour indiquer que l'opération n'est pas implémentée pour " -"l'autre type ; peut être renvoyée par les méthodes magiques augmentées à " -"deux opérandes (comme :meth:`__imul__`, :meth:`__iand__`, etc.) avec le même " +"opérandes " +"(comme :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`, " +"etc.) pour indiquer que l'opération n'est pas implémentée pour l'autre " +"type ; peut être renvoyée par les méthodes magiques augmentées à deux " +"opérandes (comme :meth:`__imul__`, :meth:`__iand__`, etc.) avec le même " "objectif. Elle ne doit pas être évaluée comme booléen. ``NotImplemented`` " "est la seule instance de :data:`types.NotImplementedType`." @@ -100,61 +102,66 @@ msgstr "Voir :ref:`implementing-the-arithmetic-operations` pour des exemples." #: library/constants.rst:51 #, fuzzy msgid "" -"``NotImplementedError`` and :data:`!NotImplemented` are not interchangeable, " -"even though they have similar names and purposes. See :exc:" -"`NotImplementedError` for details on when to use it." +":data:`!NotImplemented` and :exc:`!NotImplementedError` are not " +"interchangeable. This constant should only be used as described above; " +"see :exc:`NotImplementedError` for details on correct usage of the exception." msgstr "" "``NotImplementedError`` et ``NotImplemented`` ne sont pas interchangeables, " -"même s'ils ont un nom et un objectif similaire. Voir :exc:" -"`NotImplementedError` pour savoir quand l'utiliser." +"même s'ils ont un nom et un objectif similaire. " +"Voir :exc:`NotImplementedError` pour savoir quand l'utiliser." -#: library/constants.rst:55 +#: library/constants.rst:56 +msgid "Evaluating :data:`!NotImplemented` in a boolean context was deprecated." +msgstr "" + +#: library/constants.rst:59 #, fuzzy msgid "" -"Evaluating :data:`!NotImplemented` in a boolean context is deprecated. While " -"it currently evaluates as true, it will emit a :exc:`DeprecationWarning`. It " -"will raise a :exc:`TypeError` in a future version of Python." +"Evaluating :data:`!NotImplemented` in a boolean context now raises " +"a :exc:`TypeError`. It previously evaluated to :const:`True` and emitted " +"a :exc:`DeprecationWarning` since Python 3.9." msgstr "" "évaluer ``NotImplemented`` dans un contexte booléen est obsolète. Python " "l'évalue aujourd'hui à ``True`` mais émet un :exc:`DeprecationWarning`. Il " "lèvera une :exc:`TypeError` dans une version ultérieure de Python." -#: library/constants.rst:64 +#: library/constants.rst:68 +#, fuzzy msgid "" -"The same as the ellipsis literal \"``...``\". Special value used mostly in " -"conjunction with extended slicing syntax for user-defined container data " -"types. ``Ellipsis`` is the sole instance of the :data:`types.EllipsisType` " -"type." +"The same as the ellipsis literal \"``...``\", an object frequently used to " +"indicate that something is omitted. Assignment to ``Ellipsis`` is possible, " +"but assignment to ``...`` raises a :exc:`SyntaxError`. ``Ellipsis`` is the " +"sole instance of the :class:`types.EllipsisType` type." msgstr "" "Identique au littéral *points de suspension* (\"``...``\"). Valeur spéciale " "utilisée principalement de manière conjointe avec la syntaxe de découpage " "(*slicing*) étendu pour les conteneurs personnalisés. ``Ellipsis`` est la " "seule instance de :data:`types.EllipsisType`." -#: library/constants.rst:71 +#: library/constants.rst:76 msgid "" "This constant is true if Python was not started with an :option:`-O` option. " "See also the :keyword:`assert` statement." msgstr "" -"Cette constante est vraie si Python n'a pas été démarré avec une option :" -"option:`-O`. Voir aussi l'expression :keyword:`assert`." +"Cette constante est vraie si Python n'a pas été démarré avec une " +"option :option:`-O`. Voir aussi l'expression :keyword:`assert`." -#: library/constants.rst:77 +#: library/constants.rst:82 msgid "" "The names :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` " -"cannot be reassigned (assignments to them, even as an attribute name, raise :" -"exc:`SyntaxError`), so they can be considered \"true\" constants." +"cannot be reassigned (assignments to them, even as an attribute name, " +"raise :exc:`SyntaxError`), so they can be considered \"true\" constants." msgstr "" "Les noms :data:`None`, :data:`False`, :data:`True` et :data:`__debug__` ne " "peuvent pas être réassignés (des assignations à ces noms, ou aux noms de " "leurs attributs, lèvent une :exc:`SyntaxError`), donc ils peuvent être " "considérés comme des \"vraies\" constantes." -#: library/constants.rst:85 +#: library/constants.rst:90 msgid "Constants added by the :mod:`site` module" msgstr "Constantes ajoutées par le module :mod:`site`" -#: library/constants.rst:87 +#: library/constants.rst:92 msgid "" "The :mod:`site` module (which is imported automatically during startup, " "except if the :option:`-S` command-line option is given) adds several " @@ -167,28 +174,30 @@ msgstr "" "l'interpréteur interactif et ne devraient pas être utilisées par des " "programmes." -#: library/constants.rst:95 +#: library/constants.rst:100 +#, fuzzy msgid "" "Objects that when printed, print a message like \"Use quit() or Ctrl-D (i.e. " -"EOF) to exit\", and when called, raise :exc:`SystemExit` with the specified " -"exit code." +"EOF) to exit\", and when accessed directly in the interactive interpreter or " +"called as functions, raise :exc:`SystemExit` with the specified exit code." msgstr "" "Objets qui, lorsqu'ils sont représentés, affichent un message comme *\"Use " "quit() or Ctrl-D (i.e. EOF) to exit\"*, et lorsqu'ils sont appelés, lèvent " "un :exc:`SystemExit` avec le code de retour spécifié." -#: library/constants.rst:102 +#: library/constants.rst:108 #, fuzzy msgid "" "Object that when printed, prints the message \"Type help() for interactive " -"help, or help(object) for help about object.\", and when called, acts as " -"described :func:`elsewhere `." +"help, or help(object) for help about object.\", and when accessed directly " +"in the interactive interpreter, invokes the built-in help system " +"(see :func:`help`)." msgstr "" "Objet qui, lorsqu'il est affiché, affiche un message comme *\"Type license() " "to see the full license text\"*, et lorsqu'il est appelé, affiche le texte " "complet de la licence dans un style paginé (un écran à la fois)." -#: library/constants.rst:109 +#: library/constants.rst:116 msgid "" "Objects that when printed or called, print the text of copyright or credits, " "respectively." @@ -196,7 +205,7 @@ msgstr "" "Objets qui, lorsqu'ils sont affichés ou appelés, affichent le copyright ou " "les crédits, respectivement." -#: library/constants.rst:114 +#: library/constants.rst:121 msgid "" "Object that when printed, prints the message \"Type license() to see the " "full license text\", and when called, displays the full license text in a " diff --git a/library/contextlib.po b/library/contextlib.po index 5349db587..519b28b2b 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 21:37+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -28,13 +28,13 @@ msgstr "**Code source :** :source:`Lib/contextlib.py`" #: library/contextlib.rst:11 msgid "" -"This module provides utilities for common tasks involving the :keyword:" -"`with` statement. For more information see also :ref:`typecontextmanager` " -"and :ref:`context-managers`." +"This module provides utilities for common tasks involving " +"the :keyword:`with` statement. For more information see " +"also :ref:`typecontextmanager` and :ref:`context-managers`." msgstr "" -"Ce module fournit des utilitaires pour les tâches impliquant le mot-clé :" -"keyword:`with`. Pour plus d'informations voir aussi :ref:" -"`typecontextmanager` et :ref:`context-managers`." +"Ce module fournit des utilitaires pour les tâches impliquant le mot-" +"clé :keyword:`with`. Pour plus d'informations voir " +"aussi :ref:`typecontextmanager` et :ref:`context-managers`." #: library/contextlib.rst:17 msgid "Utilities" @@ -45,54 +45,59 @@ msgid "Functions and classes provided:" msgstr "Fonctions et classes fournies :" #: library/contextlib.rst:23 +#, fuzzy msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__enter__` and :meth:`object.__exit__`. A default implementation for :meth:" -"`object.__enter__` is provided which returns ``self`` while :meth:`object." -"__exit__` is an abstract method which by default returns ``None``. See also " -"the definition of :ref:`typecontextmanager`." +"An :term:`abstract base class` for classes that " +"implement :meth:`~object.__enter__` and :meth:`~object.__exit__`. A default " +"implementation for :meth:`~object.__enter__` is provided which returns " +"``self`` while :meth:`~object.__exit__` is an abstract method which by " +"default returns ``None``. See also the definition " +"of :ref:`typecontextmanager`." msgstr "" -":term:`Classe mère abstraite ` pour les classes qui " -"implémentent les méthodes :meth:`object.__enter__` et :meth:`object." -"__exit__`. Une implémentation par défaut de :meth:`object.__enter__` est " -"fournie, qui renvoie ``self``, et :meth:`object.__exit__` est une méthode " -"abstraite qui renvoie ``None`` par défaut. Voir aussi la définition de :ref:" -"`typecontextmanager`." +":term:`Classe abstraite ` pour les classes qui " +"implémentent les méthodes :meth:`object.__enter__` " +"et :meth:`object.__exit__`. Une implémentation par défaut " +"de :meth:`object.__enter__` est fournie, qui renvoie ``self``, " +"et :meth:`object.__exit__` est une méthode abstraite qui renvoie ``None`` " +"par défaut. Voir aussi la définition de :ref:`typecontextmanager`." #: library/contextlib.rst:34 +#, fuzzy msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__aenter__` and :meth:`object.__aexit__`. A default implementation for :meth:" -"`object.__aenter__` is provided which returns ``self`` while :meth:`object." -"__aexit__` is an abstract method which by default returns ``None``. See also " -"the definition of :ref:`async-context-managers`." +"An :term:`abstract base class` for classes that " +"implement :meth:`~object.__aenter__` and :meth:`~object.__aexit__`. A " +"default implementation for :meth:`~object.__aenter__` is provided which " +"returns ``self`` while :meth:`~object.__aexit__` is an abstract method which " +"by default returns ``None``. See also the definition of :ref:`async-context-" +"managers`." msgstr "" -":term:`Classe mère abstraite ` pour les classes qui " -"implémentent les méthodes :meth:`object.__aenter__` et :meth:`object." -"__aexit__`. Une implémentation par défaut de :meth:`object.__aenter__` est " -"fournie, qui renvoie ``self``, et :meth:`object.__aexit__` est une méthode " -"abstraite qui renvoie ``None`` par défaut. Voir aussi la définition de :ref:" -"`async-context-managers`." +":term:`Classe abstraite ` pour les classes qui " +"implémentent les méthodes :meth:`object.__aenter__` " +"et :meth:`object.__aexit__`. Une implémentation par défaut " +"de :meth:`object.__aenter__` est fournie, qui renvoie ``self``, " +"et :meth:`object.__aexit__` est une méthode abstraite qui renvoie ``None`` " +"par défaut. Voir aussi la définition de :ref:`async-context-managers`." #: library/contextlib.rst:46 #, fuzzy msgid "" "This function is a :term:`decorator` that can be used to define a factory " "function for :keyword:`with` statement context managers, without needing to " -"create a class or separate :meth:`~object.__enter__` and :meth:`~object." -"__exit__` methods." +"create a class or separate :meth:`~object.__enter__` " +"and :meth:`~object.__exit__` methods." msgstr "" "Cette fonction est un :term:`decorator` qui peut être utilisé pour définir " -"une fonction fabriquant des gestionnaires de contexte à utiliser avec :" -"keyword:`with`, sans nécessiter de créer une classe ou des méthodes :meth:" -"`__enter__` et :meth:`__exit__` séparées." +"une fonction fabriquant des gestionnaires de contexte à utiliser " +"avec :keyword:`with`, sans nécessiter de créer une classe ou des " +"méthodes :meth:`__enter__` et :meth:`__exit__` séparées." #: library/contextlib.rst:50 +#, fuzzy msgid "" "While many objects natively support use in with statements, sometimes a " "resource needs to be managed that isn't a context manager in its own right, " -"and doesn't implement a ``close()`` method for use with ``contextlib." -"closing``" +"and doesn't implement a ``close()`` method for use with " +"``contextlib.closing``." msgstr "" "Alors que de nombreux objets s'utilisent nativement dans des blocs *with*, " "on trouve parfois des ressources qui nécessitent d'être gérées mais ne sont " @@ -124,31 +129,32 @@ msgstr "" #: library/contextlib.rst:79 msgid "" -"At the point where the generator yields, the block nested in the :keyword:" -"`with` statement is executed. The generator is then resumed after the block " -"is exited. If an unhandled exception occurs in the block, it is reraised " -"inside the generator at the point where the yield occurred. Thus, you can " -"use a :keyword:`try`...\\ :keyword:`except`...\\ :keyword:`finally` " -"statement to trap the error (if any), or ensure that some cleanup takes " -"place. If an exception is trapped merely in order to log it or to perform " -"some action (rather than to suppress it entirely), the generator must " -"reraise that exception. Otherwise the generator context manager will " -"indicate to the :keyword:`!with` statement that the exception has been " -"handled, and execution will resume with the statement immediately following " -"the :keyword:`!with` statement." +"At the point where the generator yields, the block nested in " +"the :keyword:`with` statement is executed. The generator is then resumed " +"after the block is exited. If an unhandled exception occurs in the block, it " +"is reraised inside the generator at the point where the yield occurred. " +"Thus, you can use a :keyword:`try`...\\ :keyword:`except`..." +"\\ :keyword:`finally` statement to trap the error (if any), or ensure that " +"some cleanup takes place. If an exception is trapped merely in order to log " +"it or to perform some action (rather than to suppress it entirely), the " +"generator must reraise that exception. Otherwise the generator context " +"manager will indicate to the :keyword:`!with` statement that the exception " +"has been handled, and execution will resume with the statement immediately " +"following the :keyword:`!with` statement." msgstr "" "Au moment où le générateur produit une valeur, le bloc imbriqué sous " "l'instruction :keyword:`with` est exécuté. Le générateur est ensuite repris " "après la sortie du bloc. Si une exception non gérée survient dans le bloc, " "elle est relayée dans le générateur au niveau de l'instruction *yield*. " -"Ainsi, vous pouvez utiliser les instructions :keyword:`try`…\\ :keyword:" -"`except`…\\ :keyword:`finally` pour attraper l'erreur (s'il y a), ou vous " -"assurer qu'un nettoyage a bien lieu. Si une exception est attrapée dans " -"l'unique but d'être journalisée ou d'effectuer une action particulière " -"(autre que supprimer entièrement l'exception), le générateur se doit de la " -"relayer. Autrement le générateur gestionnaire de contexte doit indiquer à " -"l'instruction :keyword:`!with` que l'exception a été gérée, et l'exécution " -"reprend sur l'instruction qui suit directement le bloc :keyword:`!with`." +"Ainsi, vous pouvez utiliser les instructions :keyword:`try`…" +"\\ :keyword:`except`…\\ :keyword:`finally` pour attraper l'erreur (s'il y " +"a), ou vous assurer qu'un nettoyage a bien lieu. Si une exception est " +"attrapée dans l'unique but d'être journalisée ou d'effectuer une action " +"particulière (autre que supprimer entièrement l'exception), le générateur se " +"doit de la relayer. Autrement le générateur gestionnaire de contexte doit " +"indiquer à l'instruction :keyword:`!with` que l'exception a été gérée, et " +"l'exécution reprend sur l'instruction qui suit directement le " +"bloc :keyword:`!with`." #: library/contextlib.rst:91 msgid "" @@ -160,14 +166,14 @@ msgid "" "that context managers support multiple invocations in order to be used as " "decorators)." msgstr "" -"Le décorateur :func:`contextmanager` utilise la classe :class:" -"`ContextDecorator` afin que les gestionnaires de contexte qu'il crée " -"puissent être utilisés aussi bien en tant que décorateurs qu'avec des " -"instructions :keyword:`with`. Quand vous l'utilisez comme décorateur, une " -"nouvelle instance du générateur est créée à chaque appel de la fonction " -"(cela permet aux gestionnaires de contexte à usage unique créés par :func:" -"`contextmanager` de remplir la condition de pouvoir être invoqués plusieurs " -"fois afin d'être utilisés comme décorateurs)." +"Le décorateur :func:`contextmanager` utilise la " +"classe :class:`ContextDecorator` afin que les gestionnaires de contexte " +"qu'il crée puissent être utilisés aussi bien en tant que décorateurs qu'avec " +"des instructions :keyword:`with`. Quand vous l'utilisez comme décorateur, " +"une nouvelle instance du générateur est créée à chaque appel de la fonction " +"(cela permet aux gestionnaires de contexte à usage unique créés " +"par :func:`contextmanager` de remplir la condition de pouvoir être invoqués " +"plusieurs fois afin d'être utilisés comme décorateurs)." #: library/contextlib.rst:98 msgid "Use of :class:`ContextDecorator`." @@ -175,11 +181,11 @@ msgstr "Utilisation de la classe :class:`ContextDecorator`." #: library/contextlib.rst:104 msgid "" -"Similar to :func:`~contextlib.contextmanager`, but creates an :ref:" -"`asynchronous context manager `." +"Similar to :func:`~contextlib.contextmanager`, but creates " +"an :ref:`asynchronous context manager `." msgstr "" -"Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" -"`gestionnaire de contexte asynchrone `." +"Similaire à :func:`~contextlib.contextmanager`, mais crée " +"un :ref:`gestionnaire de contexte asynchrone `." #: library/contextlib.rst:107 #, fuzzy @@ -187,8 +193,8 @@ msgid "" "This function is a :term:`decorator` that can be used to define a factory " "function for :keyword:`async with` statement asynchronous context managers, " "without needing to create a class or separate :meth:`~object.__aenter__` " -"and :meth:`~object.__aexit__` methods. It must be applied to an :term:" -"`asynchronous generator` function." +"and :meth:`~object.__aexit__` methods. It must be applied to " +"an :term:`asynchronous generator` function." msgstr "" "Cette fonction est un :term:`decorator` qui peut être utilisé pour définir " "une fonction fabriquant des gestionnaires de contexte asynchrones à utiliser " @@ -207,8 +213,8 @@ msgid "" "as decorators or with :keyword:`async with` statements::" msgstr "" "Les gestionnaires de contexte définis avec :func:`asynccontextmanager` " -"peuvent s'utiliser comme décorateurs ou dans les instructions :keyword:" -"`async with` ::" +"peuvent s'utiliser comme décorateurs ou dans les " +"instructions :keyword:`async with` ::" #: library/contextlib.rst:149 msgid "" @@ -250,10 +256,11 @@ msgstr "" #: library/contextlib.rst:187 msgid "" "Most types managing resources support the :term:`context manager` protocol, " -"which closes *thing* on leaving the :keyword:`with` statement. As such, :" -"func:`!closing` is most useful for third party types that don't support " -"context managers. This example is purely for illustration purposes, as :func:" -"`~urllib.request.urlopen` would normally be used in a context manager." +"which closes *thing* on leaving the :keyword:`with` statement. As " +"such, :func:`!closing` is most useful for third party types that don't " +"support context managers. This example is purely for illustration purposes, " +"as :func:`~urllib.request.urlopen` would normally be used in a context " +"manager." msgstr "" #: library/contextlib.rst:196 @@ -281,10 +288,11 @@ msgid "" msgstr "" #: library/contextlib.rst:231 +#, fuzzy msgid "" -"Return a context manager that returns *enter_result* from ``__enter__``, but " -"otherwise does nothing. It is intended to be used as a stand-in for an " -"optional context manager, for example::" +"Return a context manager that returns *enter_result* " +"from :meth:`~object.__enter__`, but otherwise does nothing. It is intended " +"to be used as a stand-in for an optional context manager, for example::" msgstr "" "Renvoie un gestionnaire de contexte dont la méthode ``__enter__`` renvoie " "*enter_result*, mais ne fait rien d'autre. L'idée est de l'utiliser comme " @@ -300,8 +308,8 @@ msgid "" "It can also be used as a stand-in for :ref:`asynchronous context managers " "`::" msgstr "" -"Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" -"`gestionnaire de contexte asynchrone ` ::" +"Similaire à :func:`~contextlib.contextmanager`, mais crée " +"un :ref:`gestionnaire de contexte asynchrone ` ::" #: library/contextlib.rst:274 msgid ":term:`asynchronous context manager` support was added." @@ -345,31 +353,34 @@ msgstr "Ce gestionnaire de contexte est :ref:`réentrant `." #: library/contextlib.rst:315 msgid "" -"If the code within the :keyword:`!with` block raises a :exc:" -"`BaseExceptionGroup`, suppressed exceptions are removed from the group. Any " -"exceptions of the group which are not suppressed are re-raised in a new " -"group which is created using the original group's :meth:`~BaseExceptionGroup." -"derive` method." +"If the code within the :keyword:`!with` block raises " +"a :exc:`BaseExceptionGroup`, suppressed exceptions are removed from the " +"group. Any exceptions of the group which are not suppressed are re-raised " +"in a new group which is created using the original " +"group's :meth:`~BaseExceptionGroup.derive` method." msgstr "" #: library/contextlib.rst:323 msgid "" -"``suppress`` now supports suppressing exceptions raised as part of a :exc:" -"`BaseExceptionGroup`." +"``suppress`` now supports suppressing exceptions raised as part of " +"a :exc:`BaseExceptionGroup`." msgstr "" #: library/contextlib.rst:329 +#, fuzzy msgid "" -"Context manager for temporarily redirecting :data:`sys.stdout` to another " -"file or file-like object." +"Context manager for temporarily redirecting :data:`sys.stdout` to " +"another :term:`file object`." msgstr "" -"Gestionnaire de contexte servant à rediriger temporairement :data:`sys." -"stdout` vers un autre fichier ou objet fichier-compatible." +"Gestionnaire de contexte servant à rediriger " +"temporairement :data:`sys.stdout` vers un autre fichier ou objet fichier-" +"compatible." #: library/contextlib.rst:332 +#, fuzzy msgid "" "This tool adds flexibility to existing functions or classes whose output is " -"hardwired to stdout." +"hardwired to :data:`sys.stdout`." msgstr "" "Cet outil ajoute une certaine flexibilité aux fonctions ou classes " "existantes dont la sortie est envoyée vers la sortie standard." @@ -378,14 +389,14 @@ msgstr "" #, fuzzy msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " -"You can capture that output in a string by redirecting the output to an :" -"class:`io.StringIO` object. The replacement stream is returned from the " -"``__enter__`` method and so is available as the target of the :keyword:" -"`with` statement::" +"You can capture that output in a string by redirecting the output to " +"an :class:`io.StringIO` object. The replacement stream is returned from " +"the :meth:`~object.__enter__` method and so is available as the target of " +"the :keyword:`with` statement::" msgstr "" -"Par exemple, la sortie de :func:`help` est normalement envoyée vers *sys." -"stdout*. Vous pouvez capturer cette sortie dans une chaîne de caractères en " -"la redirigeant vers un objet :class:`io.StringIO` ::" +"Par exemple, la sortie de :func:`help` est normalement envoyée vers " +"*sys.stdout*. Vous pouvez capturer cette sortie dans une chaîne de " +"caractères en la redirigeant vers un objet :class:`io.StringIO` ::" #: library/contextlib.rst:345 msgid "" @@ -414,12 +425,14 @@ msgstr "" "utilitaires." #: library/contextlib.rst:369 +#, fuzzy msgid "" -"Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." -"stderr` to another file or file-like object." +"Similar to :func:`~contextlib.redirect_stdout` but redirecting the " +"global :data:`sys.stderr` to another :term:`file object`." msgstr "" -"Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." -"stderr` vers un autre fichier ou objet fichier-compatible." +"Similaire à :func:`~contextlib.redirect_stdout` mais " +"redirige :data:`sys.stderr` vers un autre fichier ou objet fichier-" +"compatible." #: library/contextlib.rst:379 msgid "" @@ -445,17 +458,19 @@ msgstr "" "utilisé comme décorateur." #: library/contextlib.rst:398 +#, fuzzy msgid "" -"Context managers inheriting from ``ContextDecorator`` have to implement " -"``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " -"exception handling even when used as a decorator." +"Context managers inheriting from ``ContextDecorator`` have to " +"implement :meth:`~object.__enter__` and :meth:`~object.__exit__` as normal. " +"``__exit__`` retains its optional exception handling even when used as a " +"decorator." msgstr "" "Les gestionnaires de contexte héritant de ``ContextDecorator`` doivent " "implémenter ``__enter__`` et ``__exit__`` comme habituellement. ``__exit__`` " "conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " "décorateur." -#: library/contextlib.rst:402 +#: library/contextlib.rst:403 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." @@ -463,26 +478,26 @@ msgstr "" "``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " "bénéficiez automatiquement de cette fonctionnalité." -#: library/contextlib.rst:405 +#: library/contextlib.rst:406 msgid "Example of ``ContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:490 +#: library/contextlib.rst:519 msgid "The class can then be used like this::" msgstr "" -#: library/contextlib.rst:436 +#: library/contextlib.rst:437 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" "Ce changement est simplement un sucre syntaxique pour les constructions de " "la forme suivante ::" -#: library/contextlib.rst:442 +#: library/contextlib.rst:443 msgid "``ContextDecorator`` lets you instead write::" msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" -#: library/contextlib.rst:448 +#: library/contextlib.rst:449 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." @@ -491,7 +506,7 @@ msgstr "" "seulement à un morceau en particulier (et gagner un niveau d'indentation est " "toujours appréciable)." -#: library/contextlib.rst:451 +#: library/contextlib.rst:452 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" @@ -499,7 +514,7 @@ msgstr "" "Les gestionnaires de contexte existants qui ont déjà une classe mère peuvent " "être étendus en utilisant ``ContextDecorator`` comme une *mixin* ::" -#: library/contextlib.rst:464 +#: library/contextlib.rst:465 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -512,20 +527,62 @@ msgstr "" "construction d'origine avec de multiples instructions :keyword:`!with` au " "sein de la fonction doit être utilisée." -#: library/contextlib.rst:474 -#, fuzzy +#: library/contextlib.rst:470 msgid "" -"Similar to :class:`ContextDecorator` but only for asynchronous functions." +"When the decorated callable is a generator function, coroutine function, or " +"asynchronous generator function, the returned wrapper is of the same kind " +"and keeps the context manager open for the lifetime of the iteration or " +"await rather than only for the call that creates the generator or coroutine " +"object. Wrapped generators and asynchronous generators are explicitly " +"closed when iteration ends, as if by :func:`closing` or :func:`aclosing`." +msgstr "" + +#: library/contextlib.rst:478 +msgid "" +"For asynchronous generators the wrapper re-yields each value with ``async " +"for``; values sent with :meth:`~agen.asend` and exceptions thrown " +"with :meth:`~agen.athrow` are not forwarded to the wrapped generator." msgstr "" -"Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " -"asynchrone." -#: library/contextlib.rst:476 +#: library/contextlib.rst:485 +msgid "" +"Decorating a generator function, coroutine function, or asynchronous " +"generator function now keeps the context manager open across iteration or " +"await. Previously the context manager exited as soon as the generator or " +"coroutine object was created." +msgstr "" + +#: library/contextlib.rst:494 +msgid "" +"Similar to :class:`ContextDecorator`, but the context manager is entered and " +"exited with :keyword:`async with`. Decorate coroutine functions and " +"asynchronous generator functions with this class; the returned wrapper is of " +"the same kind." +msgstr "" + +#: library/contextlib.rst:500 +msgid "" +"Synchronous functions and generators are accepted, but the wrapper is always " +"asynchronous, so the decorated callable must then be awaited or iterated " +"with ``async for``. If that change of calling convention is not intended, " +"use :class:`ContextDecorator` instead." +msgstr "" + +#: library/contextlib.rst:505 #, fuzzy msgid "Example of ``AsyncContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:515 +#: library/contextlib.rst:541 +msgid "" +"Decorating an asynchronous generator function now keeps the context manager " +"open across iteration. Previously the context manager exited as soon as the " +"generator object was created. Synchronous functions and synchronous " +"generator functions are also now accepted, with an asynchronous wrapper " +"returned." +msgstr "" + +#: library/contextlib.rst:551 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " @@ -536,7 +593,7 @@ msgstr "" "nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " "données d'entrée." -#: library/contextlib.rst:519 +#: library/contextlib.rst:555 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" @@ -544,13 +601,13 @@ msgstr "" "Par exemple, un ensemble de fichiers peut facilement être géré dans une " "unique instruction *with* comme suit ::" -#: library/contextlib.rst:528 +#: library/contextlib.rst:564 msgid "" "The :meth:`~object.__enter__` method returns the :class:`ExitStack` " "instance, and performs no additional operations." msgstr "" -#: library/contextlib.rst:531 +#: library/contextlib.rst:567 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -563,7 +620,7 @@ msgstr "" "que ces fonctions ne sont *pas* invoquées implicitement quand l'instance de " "la pile de contextes est collectée par le ramasse-miettes." -#: library/contextlib.rst:536 +#: library/contextlib.rst:572 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " @@ -573,7 +630,7 @@ msgstr "" "acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " "objets-fichiers) puissent être gérés correctement." -#: library/contextlib.rst:540 +#: library/contextlib.rst:576 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -583,13 +640,13 @@ msgid "" "updated state." msgstr "" "Comme les fonctions de rappel enregistrées sont invoquées dans l'ordre " -"inverse d'enregistrement, cela revient au même que si de multiples blocs :" -"keyword:`with` imbriqués avaient été utilisés avec l'ensemble de fonctions " -"enregistrées. Cela s'étend aussi à la gestion d'exceptions — si une fonction " -"de rappel intérieure supprime ou remplace une exception, alors les fonctions " -"extérieures reçoivent des arguments basés sur ce nouvel état." +"inverse d'enregistrement, cela revient au même que si de multiples " +"blocs :keyword:`with` imbriqués avaient été utilisés avec l'ensemble de " +"fonctions enregistrées. Cela s'étend aussi à la gestion d'exceptions — si " +"une fonction de rappel intérieure supprime ou remplace une exception, alors " +"les fonctions extérieures reçoivent des arguments basés sur ce nouvel état." -#: library/contextlib.rst:547 +#: library/contextlib.rst:583 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -601,18 +658,18 @@ msgstr "" "pour des gestionnaires de contexte de plus haut niveau qui manipulent la " "pile de sortie de manière spécifique à l'application." -#: library/contextlib.rst:556 +#: library/contextlib.rst:592 #, fuzzy msgid "" "Enters a new context manager and adds its :meth:`~object.__exit__` method to " "the callback stack. The return value is the result of the context manager's " "own :meth:`~object.__enter__` method." msgstr "" -"Entre dans un nouveau gestionnaire de contexte et ajoute sa méthode :meth:" -"`__exit__` à la pile d'appels. La valeur de retour est le résultat de la " -"méthode :meth:`__enter__` du gestionnaire de contexte donné." +"Entre dans un nouveau gestionnaire de contexte et ajoute sa " +"méthode :meth:`__exit__` à la pile d'appels. La valeur de retour est le " +"résultat de la méthode :meth:`__enter__` du gestionnaire de contexte donné." -#: library/contextlib.rst:560 +#: library/contextlib.rst:596 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." @@ -621,13 +678,19 @@ msgstr "" "feraient normalement s'ils étaient utilisés directement derrière une " "instruction :keyword:`with`." -#: library/contextlib.rst:563 +#: library/contextlib.rst:599 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a " "context manager." msgstr "" -#: library/contextlib.rst:569 +#: library/contextlib.rst:603 +msgid "" +"Added support for arbitrary descriptors :meth:`!__enter__` and :meth:`!" +"__exit__`." +msgstr "" + +#: library/contextlib.rst:609 #, fuzzy msgid "" "Adds a context manager's :meth:`~object.__exit__` method to the callback " @@ -636,30 +699,31 @@ msgstr "" "Ajoute la méthode :meth:`__exit__` d'un gestionnaire de contexte à la pile " "d'appels." -#: library/contextlib.rst:571 +#: library/contextlib.rst:611 #, fuzzy msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " -"an :meth:`~object.__enter__` implementation with a context manager's own :" -"meth:`~object.__exit__` method." +"an :meth:`~object.__enter__` implementation with a context manager's " +"own :meth:`~object.__exit__` method." msgstr "" "Comme ``__enter__`` n'est *pas* invoquée, cette méthode peut être utilisée " "pour couvrir une partie de l'implémentation de :meth:`__enter__` avec la " "propre méthode :meth:`__exit__` d'un gestionnaire de contexte." -#: library/contextlib.rst:575 +#: library/contextlib.rst:615 #, fuzzy msgid "" "If passed an object that is not a context manager, this method assumes it is " -"a callback with the same signature as a context manager's :meth:`~object." -"__exit__` method and adds it directly to the callback stack." +"a callback with the same signature as a context " +"manager's :meth:`~object.__exit__` method and adds it directly to the " +"callback stack." msgstr "" "Si l'argument passé n'est pas un gestionnaire de contexte, la méthode assume " -"qu'il s'agit d'une fonction de rappel avec la même signature que la méthode :" -"meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " -"la pile d'appels." +"qu'il s'agit d'une fonction de rappel avec la même signature que la " +"méthode :meth:`__exit__` des gestionnaires de contexte pour l'ajouter " +"directement à la pile d'appels." -#: library/contextlib.rst:579 +#: library/contextlib.rst:619 #, fuzzy msgid "" "By returning true values, these callbacks can suppress exceptions the same " @@ -669,7 +733,7 @@ msgstr "" "exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " "des gestionnaires de contexte." -#: library/contextlib.rst:582 +#: library/contextlib.rst:622 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." @@ -677,7 +741,11 @@ msgstr "" "L'objet passé en paramètre est renvoyé par la fonction, ce qui permet à la " "méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:587 +#: library/contextlib.rst:625 +msgid "Added support for arbitrary descriptors :meth:`!__exit__`." +msgstr "" + +#: library/contextlib.rst:630 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." @@ -685,7 +753,7 @@ msgstr "" "Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " "fonctions de rappel." -#: library/contextlib.rst:590 +#: library/contextlib.rst:633 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." @@ -694,7 +762,7 @@ msgstr "" "cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " "reçoivent jamais les détails de l'exception)." -#: library/contextlib.rst:593 +#: library/contextlib.rst:636 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." @@ -702,7 +770,7 @@ msgstr "" "La fonction passée en paramètre est renvoyée par la méthode, ce qui permet à " "la méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:598 +#: library/contextlib.rst:641 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -714,7 +782,7 @@ msgstr "" "la place, elles sont dorénavant invoquées quand la nouvelle pile sera close " "(soit explicitement soit implicitement à la fin d'un bloc :keyword:`with`)." -#: library/contextlib.rst:603 +#: library/contextlib.rst:646 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" @@ -722,7 +790,7 @@ msgstr "" "Par exemple, un groupe de fichiers peut être ouvert comme une opération " "« tout ou rien » comme suit ::" -#: library/contextlib.rst:617 +#: library/contextlib.rst:660 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " @@ -733,18 +801,19 @@ msgstr "" "et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " "exception n'est survenue." -#: library/contextlib.rst:624 +#: library/contextlib.rst:667 msgid "" -"An :ref:`asynchronous context manager `, similar to :" -"class:`ExitStack`, that supports combining both synchronous and asynchronous " -"context managers, as well as having coroutines for cleanup logic." +"An :ref:`asynchronous context manager `, similar " +"to :class:`ExitStack`, that supports combining both synchronous and " +"asynchronous context managers, as well as having coroutines for cleanup " +"logic." msgstr "" "Un :ref:`gestionnaire de contexte asynchrone `, " "similaire à :class:`ExitStack`, apte à combiner à la fois des gestionnaires " "de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " "pour la logique de nettoyage." -#: library/contextlib.rst:629 +#: library/contextlib.rst:672 #, fuzzy msgid "" "The :meth:`~ExitStack.close` method is not implemented; :meth:`aclose` must " @@ -753,7 +822,7 @@ msgstr "" "La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " "être utilisée." -#: library/contextlib.rst:634 +#: library/contextlib.rst:678 #, fuzzy msgid "" "Similar to :meth:`ExitStack.enter_context` but expects an asynchronous " @@ -762,13 +831,19 @@ msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:637 +#: library/contextlib.rst:681 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " "asynchronous context manager." msgstr "" -#: library/contextlib.rst:643 +#: library/contextlib.rst:685 +msgid "" +"Added support for arbitrary descriptors :meth:`!__aenter__` and :meth:`!" +"__aexit__`." +msgstr "" + +#: library/contextlib.rst:690 #, fuzzy msgid "" "Similar to :meth:`ExitStack.push` but expects either an asynchronous context " @@ -777,38 +852,43 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:648 +#: library/contextlib.rst:693 +msgid "Added support for arbitrary descriptors :meth:`!__aexit__`." +msgstr "" + +#: library/contextlib.rst:698 #, fuzzy msgid "Similar to :meth:`ExitStack.callback` but expects a coroutine function." msgstr "Similaire à :meth:`callback` mais attend une fonction coroutine." -#: library/contextlib.rst:652 +#: library/contextlib.rst:703 #, fuzzy msgid "Similar to :meth:`ExitStack.close` but properly handles awaitables." msgstr "" "Similaire à :meth:`close` mais gère correctement les tâches asynchrones." -#: library/contextlib.rst:654 +#: library/contextlib.rst:705 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:666 +#: library/contextlib.rst:717 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:668 +#: library/contextlib.rst:719 +#, fuzzy msgid "" "This section describes some examples and recipes for making effective use of " -"the tools provided by :mod:`contextlib`." +"the tools provided by :mod:`!contextlib`." msgstr "" "Cette section décrit quelques exemples et recettes pour décrire une " "utilisation réelle des outils fournis par :mod:`contextlib`." -#: library/contextlib.rst:673 +#: library/contextlib.rst:724 msgid "Supporting a variable number of context managers" msgstr "Gérer un nombre variable de gestionnaires de contexte" -#: library/contextlib.rst:675 +#: library/contextlib.rst:726 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -819,13 +899,13 @@ msgid "" msgstr "" "Le cas d'utilisation primaire de :class:`ExitStack` est celui décrit dans la " "documentation de la classe : gérer un nombre variable de gestionnaires de " -"contexte et d'autres opérations de nettoyage en une unique instruction :" -"keyword:`with`. La variabilité peut venir du nombre de gestionnaires de " -"contexte voulus découlant d'une entrée de l'utilisateur (comme ouvrir une " -"collection spécifique de fichiers de l'utilisateur), ou de certains " -"gestionnaires de contexte qui peuvent être optionnels ::" +"contexte et d'autres opérations de nettoyage en une unique " +"instruction :keyword:`with`. La variabilité peut venir du nombre de " +"gestionnaires de contexte voulus découlant d'une entrée de l'utilisateur " +"(comme ouvrir une collection spécifique de fichiers de l'utilisateur), ou de " +"certains gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:690 +#: library/contextlib.rst:741 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " @@ -835,60 +915,63 @@ msgstr "" "instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " "gèrent pas nativement le protocole des gestionnaires de contexte." -#: library/contextlib.rst:696 +#: library/contextlib.rst:747 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:698 +#: library/contextlib.rst:749 +#, fuzzy msgid "" -"It is occasionally desirable to catch exceptions from an ``__enter__`` " -"method implementation, *without* inadvertently catching exceptions from the :" -"keyword:`with` statement body or the context manager's ``__exit__`` method. " -"By using :class:`ExitStack` the steps in the context management protocol can " -"be separated slightly in order to allow this::" +"It is occasionally desirable to catch exceptions from " +"an :meth:`~object.__enter__` method implementation, *without* inadvertently " +"catching exceptions from the :keyword:`with` statement body or the context " +"manager's :meth:`~object.__exit__` method. By using :class:`ExitStack` the " +"steps in the context management protocol can be separated slightly in order " +"to allow this::" msgstr "" "Il est occasionnellement souhaitable d'attraper les exceptions depuis " "l'implémentation d'une méthode ``__enter__``, *sans* attraper par " "inadvertance les exceptions du corps de l'instruction :keyword:`with` ou de " -"la méthode ``__exit__`` des gestionnaires de contexte. En utilisant :class:" -"`ExitStack`, les étapes du protocole des gestionnaires de contexte peuvent " -"être légèrement séparées pour permettre le code suivant ::" +"la méthode ``__exit__`` des gestionnaires de contexte. En " +"utilisant :class:`ExitStack`, les étapes du protocole des gestionnaires de " +"contexte peuvent être légèrement séparées pour permettre le code suivant ::" -#: library/contextlib.rst:713 +#: library/contextlib.rst:764 msgid "" "Actually needing to do this is likely to indicate that the underlying API " -"should be providing a direct resource management interface for use with :" -"keyword:`try`/:keyword:`except`/:keyword:`finally` statements, but not all " -"APIs are well designed in that regard. When a context manager is the only " -"resource management API provided, then :class:`ExitStack` can make it easier " -"to handle various situations that can't be handled directly in a :keyword:" -"`with` statement." +"should be providing a direct resource management interface for use " +"with :keyword:`try`/:keyword:`except`/:keyword:`finally` statements, but not " +"all APIs are well designed in that regard. When a context manager is the " +"only resource management API provided, then :class:`ExitStack` can make it " +"easier to handle various situations that can't be handled directly in " +"a :keyword:`with` statement." msgstr "" "Avoir à faire cela est en fait surtout utile pour indiquer que l'*API* sous-" "jacente devrait fournir une interface directe de gestion des ressources à " -"utiliser avec les instructions :keyword:`try`/:keyword:`except`/:keyword:" -"`finally`, mais que toutes les *API* ne sont pas bien conçues dans cet " -"objectif. Quand un gestionnaire de contexte est la seule *API* de gestion " -"des ressources fournie, alors :class:`ExitStack` peut rendre plus facile la " -"gestion de plusieurs situations qui ne peuvent pas être traitées directement " -"dans une instruction :keyword:`with`." - -#: library/contextlib.rst:723 +"utiliser avec les " +"instructions :keyword:`try`/:keyword:`except`/:keyword:`finally`, mais que " +"toutes les *API* ne sont pas bien conçues dans cet objectif. Quand un " +"gestionnaire de contexte est la seule *API* de gestion des ressources " +"fournie, alors :class:`ExitStack` peut rendre plus facile la gestion de " +"plusieurs situations qui ne peuvent pas être traitées directement dans une " +"instruction :keyword:`with`." + +#: library/contextlib.rst:774 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:725 +#: library/contextlib.rst:776 #, fuzzy msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " -"useful in cleaning up an already allocated resource if later steps in the :" -"meth:`~object.__enter__` implementation fail." +"useful in cleaning up an already allocated resource if later steps in " +"the :meth:`~object.__enter__` implementation fail." msgstr "" "Comme indiqué dans la documentation de :meth:`ExitStack.push`, cette méthode " "peut être utile pour nettoyer une ressource déjà allouée si les dernières " "étapes de l'implémentation de :meth:`__enter__` échouent." -#: library/contextlib.rst:729 +#: library/contextlib.rst:780 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " @@ -898,11 +981,11 @@ msgstr "" "d'acquisition de ressources et de libération, avec une méthode de validation " "optionnelle, et qui les adapte au protocole des gestionnaires de contexte ::" -#: library/contextlib.rst:769 +#: library/contextlib.rst:820 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "Remplacer un ``try-finally`` avec une option variable" -#: library/contextlib.rst:771 +#: library/contextlib.rst:822 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -914,7 +997,7 @@ msgstr "" "ou non. Dans sa forme la plus simple (qui ne peut pas déjà être gérée avec " "juste une clause ``except``), cela ressemble à ::" -#: library/contextlib.rst:785 +#: library/contextlib.rst:836 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " @@ -925,7 +1008,7 @@ msgstr "" "codes d'installation et de nettoyage peuvent finir par être séparés par des " "sections de code arbitrairement longues." -#: library/contextlib.rst:789 +#: library/contextlib.rst:840 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " @@ -935,7 +1018,7 @@ msgstr "" "rappel pour être exécutée à la fin d'une instruction ``with``, et décider " "ensuite de passer l'exécution de cet appel ::" -#: library/contextlib.rst:801 +#: library/contextlib.rst:852 #, fuzzy msgid "" "This allows the intended cleanup behaviour to be made explicit up front, " @@ -944,7 +1027,7 @@ msgstr "" "Cela permet de rendre explicite dès le départ le comportement de nettoyage " "attendu, plutôt que de nécessiter une option séparée." -#: library/contextlib.rst:804 +#: library/contextlib.rst:855 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" @@ -952,18 +1035,18 @@ msgstr "" "Si une application particulière utilise beaucoup ce modèle, cela peut-être " "simplifié encore plus au moyen d'une petite classe d'aide ::" -#: library/contextlib.rst:822 +#: library/contextlib.rst:873 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " -"function, then it is still possible to use the decorator form of :meth:" -"`ExitStack.callback` to declare the resource cleanup in advance::" +"function, then it is still possible to use the decorator form " +"of :meth:`ExitStack.callback` to declare the resource cleanup in advance::" msgstr "" "Si le nettoyage de la ressource n'est pas déjà soigneusement embarqué dans " -"une fonction autonome, il est possible d'utiliser le décorateur :meth:" -"`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " -"avance ::" +"une fonction autonome, il est possible d'utiliser le " +"décorateur :meth:`ExitStack.callback` pour déclarer la fonction de nettoyage " +"de ressource en avance ::" -#: library/contextlib.rst:837 +#: library/contextlib.rst:888 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " @@ -974,12 +1057,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:843 +#: library/contextlib.rst:894 msgid "Using a context manager as a function decorator" msgstr "" "Utiliser un gestionnaire de contexte en tant que décorateur de fonction" -#: library/contextlib.rst:845 +#: library/contextlib.rst:896 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." @@ -988,7 +1071,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:848 +#: library/contextlib.rst:899 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -999,50 +1082,50 @@ msgstr "" "Par exemple, il est parfois utile d'emballer les fonctions ou blocs " "d'instructions avec un journaliseur qui pourrait suivre le temps d'exécution " "entre l'entrée et la sortie. Plutôt qu'écrire à la fois un décorateur et un " -"gestionnaire de contexte pour la même tâche, hériter de :class:" -"`ContextDecorator` fournit les deux fonctionnalités en une seule " +"gestionnaire de contexte pour la même tâche, hériter " +"de :class:`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:869 +#: library/contextlib.rst:920 msgid "Instances of this class can be used as both a context manager::" msgstr "" "Les instances de cette classe peuvent être utilisées comme gestionnaires de " "contexte ::" -#: library/contextlib.rst:875 +#: library/contextlib.rst:926 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:882 +#: library/contextlib.rst:933 #, fuzzy msgid "" "Note that there is one additional limitation when using context managers as " -"function decorators: there's no way to access the return value of :meth:" -"`~object.__enter__`. If that value is needed, then it is still necessary to " -"use an explicit ``with`` statement." +"function decorators: there's no way to access the return value " +"of :meth:`~object.__enter__`. If that value is needed, then it is still " +"necessary to use an explicit ``with`` statement." msgstr "" "Notez qu'il y a une autre limitation en utilisant les gestionnaires de " "contexte comme décorateurs : il n'y a aucune manière d'accéder à la valeur " "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:889 +#: library/contextlib.rst:940 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:890 +#: library/contextlib.rst:941 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -"La spécification, les motivations et des exemples de l'instruction :keyword:" -"`with` en Python." +"La spécification, les motivations et des exemples de " +"l'instruction :keyword:`with` en Python." -#: library/contextlib.rst:896 +#: library/contextlib.rst:947 msgid "Single use, reusable and reentrant context managers" msgstr "Gestionnaires de contexte à usage unique, réutilisables et réentrants" -#: library/contextlib.rst:898 +#: library/contextlib.rst:949 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -1050,34 +1133,35 @@ msgid "" "them a second time will trigger an exception or otherwise not work correctly." msgstr "" "La plupart des gestionnaires de contexte sont écrits d'une manière qui ne " -"leur permet que d'être utilisés une fois avec une instruction :keyword:" -"`with`. Ces gestionnaires de contexte à usage unique doivent être recréés " -"chaque fois qu'ils sont utilisés — tenter de les utiliser une seconde fois " -"lève une exception ou ne fonctionne pas correctement." +"leur permet que d'être utilisés une fois avec une " +"instruction :keyword:`with`. Ces gestionnaires de contexte à usage unique " +"doivent être recréés chaque fois qu'ils sont utilisés — tenter de les " +"utiliser une seconde fois lève une exception ou ne fonctionne pas " +"correctement." -#: library/contextlib.rst:904 +#: library/contextlib.rst:955 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " "where they are used (as shown in all of the usage examples above)." msgstr "" "Cette limitation commune signifie qu'il est généralement conseillé de créer " -"les gestionnaires de contexte directement dans l'en-tête du bloc :keyword:" -"`with` où ils sont utilisés (comme montré dans tous les exemples " -"d'utilisation au-dessus)." +"les gestionnaires de contexte directement dans l'en-tête du " +"bloc :keyword:`with` où ils sont utilisés (comme montré dans tous les " +"exemples d'utilisation au-dessus)." -#: library/contextlib.rst:908 +#: library/contextlib.rst:959 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " "IO operations using that file object." msgstr "" "Les fichiers sont un exemple de gestionnaires de contexte étant " -"effectivement à usage unique, puisque la première instruction :keyword:" -"`with` ferme le fichier, empêchant d'autres opérations d'entrée/sortie " -"d'être exécutées sur ce fichier." +"effectivement à usage unique, puisque la première " +"instruction :keyword:`with` ferme le fichier, empêchant d'autres opérations " +"d'entrée/sortie d'être exécutées sur ce fichier." -#: library/contextlib.rst:912 +#: library/contextlib.rst:963 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " @@ -1087,11 +1171,11 @@ msgstr "" "usage unique, et se plaindront du fait que le générateur sous-jacent ne " "produise plus de valeur si vous essayez de les utiliser une seconde fois ::" -#: library/contextlib.rst:940 +#: library/contextlib.rst:991 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:942 +#: library/contextlib.rst:993 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -1104,7 +1188,7 @@ msgstr "" "l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " "gestionnaire de contexte." -#: library/contextlib.rst:947 +#: library/contextlib.rst:998 #, fuzzy msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " @@ -1115,7 +1199,7 @@ msgstr "" "réentrant, comme le sont aussi :func:`suppress` et :func:`redirect_stdout`. " "Voici un très simple exemple d'utilisation réentrante ::" -#: library/contextlib.rst:966 +#: library/contextlib.rst:1017 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " @@ -1125,23 +1209,23 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:970 +#: library/contextlib.rst:1021 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " -"as it makes a global modification to the system state by binding :data:`sys." -"stdout` to a different stream." +"as it makes a global modification to the system state by " +"binding :data:`sys.stdout` to a different stream." msgstr "" -"Notez aussi qu'être réentrant ne signifie *pas* être *thread safe*. :func:" -"`redirect_stdout`, par exemple, n'est définitivement pas *thread safe*, " -"puisqu'il effectue des changements globaux sur l'état du système en " -"branchant :data:`sys.stdout` sur différents flux." +"Notez aussi qu'être réentrant ne signifie *pas* être *thread " +"safe*. :func:`redirect_stdout`, par exemple, n'est définitivement pas " +"*thread safe*, puisqu'il effectue des changements globaux sur l'état du " +"système en branchant :data:`sys.stdout` sur différents flux." -#: library/contextlib.rst:979 +#: library/contextlib.rst:1030 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:981 +#: library/contextlib.rst:1032 msgid "" "Distinct from both single use and reentrant context managers are " "\"reusable\" context managers (or, to be completely explicit, \"reusable, " @@ -1159,28 +1243,29 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:988 +#: library/contextlib.rst:1039 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " -"context manager (for a reentrant lock, it is necessary to use :class:" -"`threading.RLock` instead)." +"context manager (for a reentrant lock, it is necessary to " +"use :class:`threading.RLock` instead)." msgstr "" ":class:`threading.Lock` est un exemple de gestionnaire de contexte " "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:992 +#: library/contextlib.rst:1043 msgid "" -"Another example of a reusable, but not reentrant, context manager is :class:" -"`ExitStack`, as it invokes *all* currently registered callbacks when leaving " -"any with statement, regardless of where those callbacks were added::" +"Another example of a reusable, but not reentrant, context manager " +"is :class:`ExitStack`, as it invokes *all* currently registered callbacks " +"when leaving any with statement, regardless of where those callbacks were " +"added::" msgstr "" "Un autre exemple de gestionnaire de contexte réutilisable mais pas réentrant " "est :class:`ExitStack`, puisqu'il invoque *toutes* les fonctions de rappel " "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:1023 +#: library/contextlib.rst:1074 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -1192,10 +1277,17 @@ msgstr "" "imbriquer fait que la pile est vidée à la fin du *with* le plus imbriqué, ce " "qui n'est probablement pas le comportement voulu." -#: library/contextlib.rst:1028 +#: library/contextlib.rst:1079 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" msgstr "" -"Pour éviter ce problème, utilisez des instances différentes de :class:" -"`ExitStack` plutôt qu'une seule instance ::" +"Pour éviter ce problème, utilisez des instances différentes " +"de :class:`ExitStack` plutôt qu'une seule instance ::" + +#, fuzzy +#~ msgid "" +#~ "Similar to :class:`ContextDecorator` but only for asynchronous functions." +#~ msgstr "" +#~ "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " +#~ "asynchrone." diff --git a/library/contextvars.po b/library/contextvars.po index b9a35f4e2..7616ba153 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-04-08 19:57+0200\n" "Last-Translator: Martin Chlumsky \n" "Language-Team: FRENCH \n" @@ -20,7 +20,7 @@ msgstr "" msgid ":mod:`!contextvars` --- Context Variables" msgstr ":mod:`contextvars` — Variables de contexte" -#: library/contextvars.rst:11 +#: library/contextvars.rst:9 msgid "" "This module provides APIs to manage, store, and access context-local state. " "The :class:`~contextvars.ContextVar` class is used to declare and work with " @@ -30,54 +30,54 @@ msgid "" msgstr "" "Ce module fournit des API pour gérer, stocker et accéder à l'état local de " "contexte. La classe :class:`~contextvars.ContextVar` est utilisée pour " -"déclarer et travailler avec les *Variables de contexte*. La fonction :func:" -"`~contextvars.copy_context` et la classe :class:`~contextvars.Context` " -"doivent être utilisées pour la gestion du contexte actuel dans les " -"cadriciels asynchrones." +"déclarer et travailler avec les *Variables de contexte*. La " +"fonction :func:`~contextvars.copy_context` et la " +"classe :class:`~contextvars.Context` doivent être utilisées pour la gestion " +"du contexte actuel dans les cadriciels asynchrones." -#: library/contextvars.rst:17 +#: library/contextvars.rst:15 #, fuzzy msgid "" -"Context managers that have state should use Context Variables instead of :" -"func:`threading.local` to prevent their state from bleeding to other code " -"unexpectedly, when used in concurrent code." +"Context managers that have state should use Context Variables instead " +"of :func:`threading.local` to prevent their state from bleeding to other " +"code unexpectedly, when used in concurrent code." msgstr "" "Les gestionnaires de contexte, quand ils ont un état et quand ils sont " "utilisés dans du code s'exécutant de manière concurrente, doivent utiliser " "les variables de contexte au lieu de :func:`threading.local()` pour empêcher " "que leur état ne perturbe un autre fil de manière inattendue." -#: library/contextvars.rst:21 +#: library/contextvars.rst:19 msgid "See also :pep:`567` for additional details." msgstr "Voir aussi :pep:`567` pour plus de détails." -#: library/contextvars.rst:27 +#: library/contextvars.rst:25 msgid "Context Variables" msgstr "Variables de contexte" -#: library/contextvars.rst:31 +#: library/contextvars.rst:29 msgid "This class is used to declare a new Context Variable, e.g.::" msgstr "" "Cette classe est utilisée pour déclarer une nouvelle variable de contexte, " "p. ex ::" -#: library/contextvars.rst:35 +#: library/contextvars.rst:33 msgid "" "The required *name* parameter is used for introspection and debug purposes." msgstr "" "Le paramètre requis *name* est utilisé à des fins d'introspection et de " "débogage." -#: library/contextvars.rst:38 +#: library/contextvars.rst:36 msgid "" -"The optional keyword-only *default* parameter is returned by :meth:" -"`ContextVar.get` when no value for the variable is found in the current " -"context." +"The optional keyword-only *default* parameter is returned " +"by :meth:`ContextVar.get` when no value for the variable is found in the " +"current context." msgstr "" "Le paramètre nommé *default* est renvoyé par :meth:`ContextVar.get` quand " "aucune valeur n'est trouvée dans le contexte actuel pour la variable." -#: library/contextvars.rst:42 +#: library/contextvars.rst:40 msgid "" "**Important:** Context Variables should be created at the top module level " "and never in closures. :class:`Context` objects hold strong references to " @@ -85,20 +85,26 @@ msgid "" "garbage collected." msgstr "" "**Important :** les variables de contexte doivent être créées au plus haut " -"niveau du module et jamais dans des fermetures (*closures*). Les objets :" -"class:`Context` maintiennent des références fortes aux variables de contexte " -"ce qui empêche que les variables de contexte soient correctement nettoyées " -"par le ramasse-miette." +"niveau du module et jamais dans des fermetures (*closures*). Les " +"objets :class:`Context` maintiennent des références fortes aux variables de " +"contexte ce qui empêche que les variables de contexte soient correctement " +"nettoyées par le ramasse-miette." -#: library/contextvars.rst:49 +#: library/contextvars.rst:45 +msgid "" +":class:`!ContextVar`\\s are :ref:`generic ` over the type of their " +"contained value." +msgstr "" + +#: library/contextvars.rst:50 msgid "The name of the variable. This is a read-only property." msgstr "Nom de la variable. Cette propriété est en lecture seule." -#: library/contextvars.rst:55 +#: library/contextvars.rst:56 msgid "Return a value for the context variable for the current context." msgstr "Renvoie la valeur de la variable de contexte pour le contexte actuel." -#: library/contextvars.rst:57 +#: library/contextvars.rst:58 msgid "" "If there is no value for the variable in the current context, the method " "will:" @@ -106,14 +112,14 @@ msgstr "" "S'il n'y a pas de valeur pour la variable dans le contexte actuel, la " "méthode :" -#: library/contextvars.rst:60 +#: library/contextvars.rst:61 msgid "" "return the value of the *default* argument of the method, if provided; or" msgstr "" "renvoie la valeur de l'argument *default* passé à la méthode, s'il a été " "fourni ;" -#: library/contextvars.rst:63 +#: library/contextvars.rst:64 msgid "" "return the default value for the context variable, if it was created with " "one; or" @@ -124,56 +130,92 @@ msgstr "" # padpo se plaint ici pour le verbe lever mais on peut l'ignorer pour # préserver le présent de l'indicatif en accord avec les "renvoie" dans les # autres items de la liste. -#: library/contextvars.rst:66 +#: library/contextvars.rst:67 msgid "raise a :exc:`LookupError`." msgstr "ou lève une erreur :exc:`LookupError`." -#: library/contextvars.rst:70 +#: library/contextvars.rst:71 msgid "" "Call to set a new value for the context variable in the current context." msgstr "" "Assigne une nouvelle valeur à la variable de contexte dans le contexte " "actuel." -#: library/contextvars.rst:73 +#: library/contextvars.rst:74 msgid "" "The required *value* argument is the new value for the context variable." msgstr "" "L'argument requis *value* est la nouvelle valeur pour la variable de " "contexte." -#: library/contextvars.rst:76 +#: library/contextvars.rst:77 msgid "" "Returns a :class:`~contextvars.Token` object that can be used to restore the " "variable to its previous value via the :meth:`ContextVar.reset` method." msgstr "" "Renvoie un objet :class:`~contextvars.Token` qui peut être utilisé pour " -"rétablir la variable à sa valeur précédente par la méthode :meth:`ContextVar." -"reset`." +"rétablir la variable à sa valeur précédente par la " +"méthode :meth:`ContextVar.reset`." + +#: library/contextvars.rst:81 +msgid "" +"For convenience, the token object can be used as a context manager to avoid " +"calling :meth:`ContextVar.reset` manually::" +msgstr "" + +#: library/contextvars.rst:91 +msgid "It is a shorthand for::" +msgstr "" -#: library/contextvars.rst:82 +#: library/contextvars.rst:105 +msgid "Added support for using tokens as context managers." +msgstr "" + +#: library/contextvars.rst:109 msgid "" -"Reset the context variable to the value it had before the :meth:`ContextVar." -"set` that created the *token* was used." +"Reset the context variable to the value it had before " +"the :meth:`ContextVar.set` that created the *token* was used." msgstr "" "Réinitialise la variable de contexte à la valeur qu'elle avait avant l'appel " "de :meth:`ContextVar.set` qui a créé le *token*." -#: library/contextvars.rst:85 +#: library/contextvars.rst:112 msgid "For example::" msgstr "Par exemple ::" -#: library/contextvars.rst:99 +#: library/contextvars.rst:123 +msgid "The same *token* cannot be used twice." +msgstr "" + +#: library/contextvars.rst:128 +#, fuzzy msgid "" "*Token* objects are returned by the :meth:`ContextVar.set` method. They can " "be passed to the :meth:`ContextVar.reset` method to revert the value of the " -"variable to what it was before the corresponding *set*." +"variable to what it was before the corresponding *set*. A single token " +"cannot reset a context variable more than once." msgstr "" "Les objets *Token* sont renvoyés par la méthode :meth:`ContextVar.set`. Ils " "peuvent être passés à la méthode :meth:`ContextVar.reset` pour réaffecter la " "valeur de la variable à ce qu'elle était avant le *set* correspondant." -#: library/contextvars.rst:106 +#: library/contextvars.rst:133 +msgid "" +"Tokens support the :ref:`context manager protocol ` to " +"automatically reset context variables. See :meth:`ContextVar.set`." +msgstr "" + +#: library/contextvars.rst:136 +msgid "" +"Tokens are :ref:`generic ` over the same type as " +"the :class:`ContextVar` which created them." +msgstr "" + +#: library/contextvars.rst:141 +msgid "Added support for usage as a context manager." +msgstr "" + +#: library/contextvars.rst:145 msgid "" "A read-only property. Points to the :class:`ContextVar` object that created " "the token." @@ -181,30 +223,30 @@ msgstr "" "Propriété en lecture seule. Pointe vers l'objet :class:`ContextVar` qui a " "créé le token." -#: library/contextvars.rst:111 +#: library/contextvars.rst:150 #, fuzzy msgid "" -"A read-only property. Set to the value the variable had before the :meth:" -"`ContextVar.set` method call that created the token. It points to :attr:" -"`Token.MISSING` if the variable was not set before the call." +"A read-only property. Set to the value the variable had before " +"the :meth:`ContextVar.set` method call that created the token. It points " +"to :attr:`Token.MISSING` if the variable was not set before the call." msgstr "" "Propriété en lecture seule. Sa valeur est celle que la variable avait avant " "l'appel à la méthode :meth:`ContextVar.set` qui a créé le jeton. Elle pointe " "à :attr:`Token.MISSING` si la variable n'est pas définie avant l'appel." -#: library/contextvars.rst:118 +#: library/contextvars.rst:157 msgid "A marker object used by :attr:`Token.old_value`." msgstr "Objet marqueur utilisé par :attr:`Token.old_value`." -#: library/contextvars.rst:122 +#: library/contextvars.rst:161 msgid "Manual Context Management" msgstr "Gestion de contexte manuelle" -#: library/contextvars.rst:126 +#: library/contextvars.rst:165 msgid "Returns a copy of the current :class:`~contextvars.Context` object." msgstr "Renvoie une copie de l'objet :class:`~contextvars.Context` actuel." -#: library/contextvars.rst:128 +#: library/contextvars.rst:167 msgid "" "The following snippet gets a copy of the current context and prints all " "variables and their values that are set in it::" @@ -212,7 +254,7 @@ msgstr "" "Le fragment de code qui suit obtient une copie du contexte actuel et affiche " "toutes les variables avec leurs valeurs définies dans ce contexte ::" -#: library/contextvars.rst:134 +#: library/contextvars.rst:173 #, fuzzy msgid "" "The function has an *O*\\ (1) complexity, i.e. works equally fast for " @@ -223,36 +265,36 @@ msgstr "" "rapidement pour des contextes avec peu de variables de contexte que pour des " "contextes qui en ont beaucoup." -#: library/contextvars.rst:141 +#: library/contextvars.rst:180 msgid "A mapping of :class:`ContextVars ` to their values." msgstr "" "Tableau associatif entre :class:`ContextVars ` et leurs valeurs." -#: library/contextvars.rst:143 +#: library/contextvars.rst:182 msgid "" "``Context()`` creates an empty context with no values in it. To get a copy " "of the current context use the :func:`~contextvars.copy_context` function." msgstr "" "``Context()`` crée un contexte vide ne contenant aucune valeur. Pour obtenir " -"une copie du contexte actuel, utilisez la fonction :func:`~contextvars." -"copy_context`." +"une copie du contexte actuel, utilisez la " +"fonction :func:`~contextvars.copy_context`." -#: library/contextvars.rst:147 +#: library/contextvars.rst:186 msgid "" -"Each thread has its own effective stack of :class:`!Context` objects. The :" -"term:`current context` is the :class:`!Context` object at the top of the " -"current thread's stack. All :class:`!Context` objects in the stacks are " +"Each thread has its own effective stack of :class:`!Context` objects. " +"The :term:`current context` is the :class:`!Context` object at the top of " +"the current thread's stack. All :class:`!Context` objects in the stacks are " "considered to be *entered*." msgstr "" -#: library/contextvars.rst:152 +#: library/contextvars.rst:191 msgid "" "*Entering* a context, which can be done by calling its :meth:`~Context.run` " "method, makes the context the current context by pushing it onto the top of " "the current thread's context stack." msgstr "" -#: library/contextvars.rst:156 +#: library/contextvars.rst:195 msgid "" "*Exiting* from the current context, which can be done by returning from the " "callback passed to the :meth:`~Context.run` method, restores the current " @@ -260,24 +302,24 @@ msgid "" "off the top of the context stack." msgstr "" -#: library/contextvars.rst:161 +#: library/contextvars.rst:200 msgid "" "Since each thread has its own context stack, :class:`ContextVar` objects " "behave in a similar fashion to :func:`threading.local` when values are " "assigned in different threads." msgstr "" -#: library/contextvars.rst:165 +#: library/contextvars.rst:204 msgid "" "Attempting to enter an already entered context, including contexts entered " "in other threads, raises a :exc:`RuntimeError`." msgstr "" -#: library/contextvars.rst:168 +#: library/contextvars.rst:207 msgid "After exiting a context, it can later be re-entered (from any thread)." msgstr "" -#: library/contextvars.rst:170 +#: library/contextvars.rst:209 msgid "" "Any changes to :class:`ContextVar` values via the :meth:`ContextVar.set` " "method are recorded in the current context. The :meth:`ContextVar.get` " @@ -287,7 +329,7 @@ msgid "" "the context)." msgstr "" -#: library/contextvars.rst:177 +#: library/contextvars.rst:216 msgid "Context implements the :class:`collections.abc.Mapping` interface." msgstr "*Context* implémente l'interface :class:`collections.abc.Mapping`." @@ -301,7 +343,7 @@ msgstr "*Context* implémente l'interface :class:`collections.abc.Mapping`." # lequel est appelée la méthode  »run*. Renvoie### # library/contextvars.po:238: warning: Mot inconnu : run => ###xte sur lequel # est appelée la méthode  »run*. Renvoie### -#: library/contextvars.rst:181 +#: library/contextvars.rst:220 #, fuzzy msgid "" "Enters the Context, executes ``callable(*args, **kwargs)``, then exits the " @@ -312,16 +354,16 @@ msgstr "" "l'objet. Renvoie le résultat de l'exécution ou propage une exception s'il y " "en a une qui s'est produite." -#: library/contextvars.rst:185 +#: library/contextvars.rst:224 #, fuzzy msgid "Example:" msgstr "Par exemple ::" -#: library/contextvars.rst:233 +#: library/contextvars.rst:272 msgid "Return a shallow copy of the context object." msgstr "Renvoie une copie superficielle de l'objet de contexte." -#: library/contextvars.rst:237 +#: library/contextvars.rst:276 msgid "" "Return ``True`` if the *context* has a value for *var* set; return ``False`` " "otherwise." @@ -329,7 +371,7 @@ msgstr "" "Renvoie ``True`` si le *context* a une valeur pour *var* ; sinon renvoie " "``False``." -#: library/contextvars.rst:242 +#: library/contextvars.rst:281 msgid "" "Return the value of the *var* :class:`ContextVar` variable. If the variable " "is not set in the context object, a :exc:`KeyError` is raised." @@ -337,7 +379,7 @@ msgstr "" "Renvoie la valeur de la variable :class:`ContextVar` *var*. Si la variable " "n'est pas définie dans l'objet de contexte, une :exc:`KeyError` est levée." -#: library/contextvars.rst:248 +#: library/contextvars.rst:287 msgid "" "Return the value for *var* if *var* has the value in the context object. " "Return *default* otherwise. If *default* is not given, return ``None``." @@ -345,26 +387,26 @@ msgstr "" "Renvoie la valeur de *var* si *var* possède une valeur dans l'objet de " "contexte. Renvoie *default* sinon (ou ``None`` si *default* n'est pas donné)." -#: library/contextvars.rst:254 +#: library/contextvars.rst:293 msgid "Return an iterator over the variables stored in the context object." msgstr "" "Renvoie un itérateur sur les variables stockées dans l'objet de contexte." -#: library/contextvars.rst:259 +#: library/contextvars.rst:298 msgid "Return the number of variables set in the context object." msgstr "Renvoie le nombre de variables définies dans l'objet de contexte." -#: library/contextvars.rst:263 +#: library/contextvars.rst:302 msgid "Return a list of all variables in the context object." msgstr "Renvoie une liste de toutes les variables dans l'objet de contexte." -#: library/contextvars.rst:267 +#: library/contextvars.rst:306 msgid "Return a list of all variables' values in the context object." msgstr "" "Renvoie une liste de toutes les valeurs des variables dans l'objet de " "contexte." -#: library/contextvars.rst:272 +#: library/contextvars.rst:311 msgid "" "Return a list of 2-tuples containing all variables and their values in the " "context object." @@ -372,11 +414,11 @@ msgstr "" "Renvoie une liste de paires contenant toutes les variables et leurs valeurs " "dans l'objet de contexte." -#: library/contextvars.rst:277 +#: library/contextvars.rst:316 msgid "asyncio support" msgstr "Gestion avec *asyncio*" -#: library/contextvars.rst:279 +#: library/contextvars.rst:318 msgid "" "Context variables are natively supported in :mod:`asyncio` and are ready to " "be used without any extra configuration. For example, here is a simple echo " diff --git a/library/copy.po b/library/copy.po index e6fa9b124..ce270b422 100644 --- a/library/copy.po +++ b/library/copy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-02-21 17:18+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -141,8 +141,8 @@ msgid "" "This module does not copy types like module, method, stack trace, stack " "frame, file, socket, window, or any similar types. It does \"copy\" " "functions and classes (shallow and deeply), by returning the original object " -"unchanged; this is compatible with the way these are treated by the :mod:" -"`pickle` module." +"unchanged; this is compatible with the way these are treated by " +"the :mod:`pickle` module." msgstr "" "Ce module ne copie pas les types tels que module, méthode, trace d'appels, " "cadre de pile, fichier, socket, fenêtre, tableau, ou tout autre type " @@ -152,40 +152,42 @@ msgstr "" #: library/copy.rst:75 msgid "" -"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of " -"lists by assigning a slice of the entire list, for example, ``copied_list = " -"original_list[:]``." +"Shallow copies of many collections can be made using the " +"corresponding :meth:`!copy` method (such " +"as :meth:`list.copy`, :meth:`dict.copy` or :meth:`set.copy`), and of " +"sequences (such as lists or bytearrays) by making a slice of the entire " +"sequence (``sequence[:]``). However, these methods and slicing can create an " +"instance of the base type when copying an instance of a subclass, " +"whereas :func:`copy.copy` normally returns an instance of the same type." msgstr "" -"Les copies superficielles de dictionnaires peuvent être faites en utilisant :" -"meth:`dict.copy`, et de listes en affectant un ``slice`` de la liste, par " -"exemple, ``copied_list = original_list[:]``." -#: library/copy.rst:81 +#: library/copy.rst:85 +#, fuzzy msgid "" "Classes can use the same interfaces to control copying that they use to " "control pickling. See the description of module :mod:`pickle` for " -"information on these methods. In fact, the :mod:`copy` module uses the " +"information on these methods. In fact, the :mod:`!copy` module uses the " "registered pickle functions from the :mod:`copyreg` module." msgstr "" "Les classes peuvent utiliser les mêmes interfaces de contrôle que celles " "utilisées pour la sérialisation. Voir la description du module :mod:`pickle` " "pour plus d'informations sur ces méthodes. En effet, le module :mod:`copy` " -"utilise les fonctions de sérialisation enregistrées à partir du module :mod:" -"`copyreg`." +"utilise les fonctions de sérialisation enregistrées à partir du " +"module :mod:`copyreg`." -#: library/copy.rst:92 +#: library/copy.rst:96 msgid "" "In order for a class to define its own copy implementation, it can define " "special methods :meth:`~object.__copy__` and :meth:`~object.__deepcopy__`." msgstr "" -#: library/copy.rst:98 +#: library/copy.rst:102 msgid "" "Called to implement the shallow copy operation; no additional arguments are " "passed." msgstr "" -#: library/copy.rst:104 +#: library/copy.rst:108 #, fuzzy msgid "" "Called to implement the deep copy operation; it is passed one argument, the " @@ -200,29 +202,29 @@ msgstr "" "aucun argument supplémentaire n'est passé. La seconde est appelée pour " "implémenter l'opération de copie récursive ; elle reçoit un argument, le " "dictionnaire ``memo``. Si l'implémentation de :meth:`__deepcopy__` a besoin " -"de faire une copie récursive d'un composant, elle doit appeler la fonction :" -"func:`deepcopy` avec le composant comme premier argument et le dictionnaire " -"*memo* comme second argument." +"de faire une copie récursive d'un composant, elle doit appeler la " +"fonction :func:`deepcopy` avec le composant comme premier argument et le " +"dictionnaire *memo* comme second argument." -#: library/copy.rst:114 +#: library/copy.rst:118 msgid "" -"Function :func:`!copy.replace` is more limited than :func:`~copy.copy` and :" -"func:`~copy.deepcopy`, and only supports named tuples created by :func:" -"`~collections.namedtuple`, :mod:`dataclasses`, and other classes which " -"define method :meth:`~object.__replace__`." +"Function :func:`!copy.replace` is more limited than :func:`~copy.copy` " +"and :func:`~copy.deepcopy`, and only supports named tuples created " +"by :func:`~collections.namedtuple`, :mod:`dataclasses`, and other classes " +"which define method :meth:`~object.__replace__`." msgstr "" -#: library/copy.rst:122 +#: library/copy.rst:126 msgid "" "This method should create a new object of the same type, replacing fields " "with values from *changes*." msgstr "" -#: library/copy.rst:128 +#: library/copy.rst:134 msgid "Module :mod:`pickle`" msgstr "Module :mod:`pickle`" -#: library/copy.rst:129 +#: library/copy.rst:135 msgid "" "Discussion of the special methods used to support object state retrieval and " "restoration." @@ -230,5 +232,14 @@ msgstr "" "Discussion sur les méthodes spéciales utilisées pour gérer la récupération " "et la restauration de l'état d'un objet." +#~ msgid "" +#~ "Shallow copies of dictionaries can be made using :meth:`dict.copy`, and " +#~ "of lists by assigning a slice of the entire list, for example, " +#~ "``copied_list = original_list[:]``." +#~ msgstr "" +#~ "Les copies superficielles de dictionnaires peuvent être faites en " +#~ "utilisant :meth:`dict.copy`, et de listes en affectant un ``slice`` de la " +#~ "liste, par exemple, ``copied_list = original_list[:]``." + #~ msgid "module" #~ msgstr "module" diff --git a/library/copyreg.po b/library/copyreg.po index 5ed27a30f..d897ad2ed 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-11-23 15:14+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -25,8 +25,9 @@ msgid "**Source code:** :source:`Lib/copyreg.py`" msgstr "**Code source :** :source:`Lib/copyreg.py`" #: library/copyreg.rst:15 +#, fuzzy msgid "" -"The :mod:`copyreg` module offers a way to define functions used while " +"The :mod:`!copyreg` module offers a way to define functions used while " "pickling specific objects. The :mod:`pickle` and :mod:`copy` modules use " "those functions when pickling/copying those objects. The module provides " "configuration information about object constructors which are not classes. " @@ -46,16 +47,17 @@ msgid "" "(and hence not valid as a constructor), raises :exc:`TypeError`." msgstr "" "Déclare *object* comme étant un constructeur valide. Si *object* n'est pas " -"appelable (et n'est donc pas un constructeur valide), l'erreur :exc:" -"`TypeError` est levée." +"appelable (et n'est donc pas un constructeur valide), " +"l'erreur :exc:`TypeError` est levée." #: library/copyreg.rst:30 #, fuzzy msgid "" "Declares that *function* should be used as a \"reduction\" function for " "objects of type *type*. *function* must return either a string or a tuple " -"containing between two and six elements. See the :attr:`~pickle.Pickler." -"dispatch_table` for more details on the interface of *function*." +"containing between two and six elements. See " +"the :attr:`~pickle.Pickler.dispatch_table` for more details on the interface " +"of *function*." msgstr "" "Déclare que *function* devrait être utilisée en tant que fonction de " "*réduction* pour des objets de type *type*. *function* doit soit renvoyer " @@ -76,10 +78,10 @@ msgid "" "reduction functions." msgstr "" "Voir le module :mod:`pickle` pour plus de détails sur l'interface attendue " -"de *function* et *constructor*. Notez que l’attribut :attr:`~pickle.Pickler." -"dispatch_table` d'un objet ``pickler`` ou d'une sous-classe de :class:" -"`pickle.Pickler` peut aussi être utilisée pour déclarer des fonctions " -"réductrices." +"de *function* et *constructor*. Notez que " +"l’attribut :attr:`~pickle.Pickler.dispatch_table` d'un objet ``pickler`` ou " +"d'une sous-classe de :class:`pickle.Pickler` peut aussi être utilisée pour " +"déclarer des fonctions réductrices." #: library/copyreg.rst:43 msgid "Example" diff --git a/library/crypt.po b/library/crypt.po new file mode 100644 index 000000000..203ba1ca1 --- /dev/null +++ b/library/crypt.po @@ -0,0 +1,41 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/crypt.rst:2 +msgid ":mod:`!crypt` --- Function to check Unix passwords" +msgstr "" + +#: library/crypt.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.13 ` after being " +"deprecated in Python 3.11. The removal was decided in :pep:`594`." +msgstr "" + +#: library/crypt.rst:14 +msgid "" +"Applications can use the :mod:`hashlib` module from the standard library. " +"Other possible replacements are third-party libraries from " +"PyPI: :pypi:`legacycrypt`, :pypi:`bcrypt`, or :pypi:`argon2-cffi`. These are " +"not supported or maintained by the Python core team." +msgstr "" + +#: library/crypt.rst:19 +msgid "" +"The last version of Python that provided the :mod:`!crypt` module was " +"`Python 3.12 `_." +msgstr "" diff --git a/library/csv.po b/library/csv.po index 18e2107c1..b8495986b 100644 --- a/library/csv.po +++ b/library/csv.po @@ -5,26 +5,26 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2023-03-27 00:24+0200\n" -"Last-Translator: Mathieu Dupuy\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 10:48+0200\n" +"Last-Translator: Julien Palard \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" +"X-Generator: Poedit 3.6\n" #: library/csv.rst:2 #, fuzzy msgid ":mod:`!csv` --- CSV File Reading and Writing" msgstr ":mod:`csv` — Lecture et écriture de fichiers CSV" -#: library/csv.rst:9 +#: library/csv.rst:7 msgid "**Source code:** :source:`Lib/csv.py`" msgstr "**Code source :** :source:`Lib/csv.py`" -#: library/csv.rst:17 +#: library/csv.rst:15 msgid "" "The so-called CSV (Comma Separated Values) format is the most common import " "and export format for spreadsheets and databases. CSV format was used for " @@ -49,9 +49,10 @@ msgstr "" "module unique puisse manipuler efficacement ces données, masquant au " "programmeur les détails de lecture/écriture des données." -#: library/csv.rst:28 +#: library/csv.rst:26 +#, fuzzy msgid "" -"The :mod:`csv` module implements classes to read and write tabular data in " +"The :mod:`!csv` module implements classes to read and write tabular data in " "CSV format. It allows programmers to say, \"write this data in the format " "preferred by Excel,\" or \"read data from this file which was generated by " "Excel,\" without knowing the precise details of the CSV format used by " @@ -65,36 +66,38 @@ msgstr "" "Vous pouvez aussi décrire les formats CSV utilisés par d'autres applications " "ou définir vos propres spécialisations." -#: library/csv.rst:35 +#: library/csv.rst:33 +#, fuzzy msgid "" -"The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and " -"write sequences. Programmers can also read and write data in dictionary " +"The :mod:`!csv` module's :class:`reader` and :class:`writer` objects read " +"and write sequences. Programmers can also read and write data in dictionary " "form using the :class:`DictReader` and :class:`DictWriter` classes." msgstr "" "Les objets :class:`reader` et :class:`writer` du module :mod:`csv` lisent et " "écrivent des séquences. Vous pouvez aussi lire/écrire les données dans un " -"dictionnaire en utilisant les classes :class:`DictReader` et :class:" -"`DictWriter`." +"dictionnaire en utilisant les classes :class:`DictReader` " +"et :class:`DictWriter`." -#: library/csv.rst:41 +#: library/csv.rst:39 msgid ":pep:`305` - CSV File API" msgstr ":pep:`305` ­— Interface des fichiers CSV" -#: library/csv.rst:42 +#: library/csv.rst:40 msgid "The Python Enhancement Proposal which proposed this addition to Python." msgstr "" "La proposition d'amélioration de Python (PEP) qui a proposé cet ajout au " "langage." -#: library/csv.rst:48 +#: library/csv.rst:46 msgid "Module Contents" msgstr "Contenu du module" -#: library/csv.rst:50 -msgid "The :mod:`csv` module defines the following functions:" +#: library/csv.rst:48 +#, fuzzy +msgid "The :mod:`!csv` module defines the following functions:" msgstr "Le module :mod:`csv` définit les fonctions suivantes :" -#: library/csv.rst:58 +#: library/csv.rst:56 #, fuzzy msgid "" "Return a :ref:`reader object ` that will process lines from " @@ -110,26 +113,28 @@ msgid "" "formatting parameters, see section :ref:`csv-fmt-params`." msgstr "" "Renvoie un objet lecteur, qui itérera sur les lignes de l'objet *csvfile* " -"donné. *csvfile* peut être n'importe quel objet supportant le protocole :" -"term:`itérateur ` et renvoyant une chaîne de caractères chaque " -"fois que sa méthode :meth:`!__next__` est appelée — les :term:`fichiers " -"objets ` et les listes sont tous deux valables. Si *csvfile* " -"est un fichier, il doit être ouvert avec ``newline=''``. [1]_ Un paramètre " -"*dialect* optionnel peut être fourni pour définir un ensemble de paramètres " -"spécifiques à un dialecte CSV particulier. Il peut s'agir d'une instance de " -"sous-classe de :class:`Dialect` ou de l'une des chaînes renvoyées par la " +"donné. *csvfile* peut être n'importe quel objet supportant le " +"protocole :term:`itérateur ` et renvoyant une chaîne de caractères " +"chaque fois que sa méthode :meth:`!__next__` est appelée — " +"les :term:`fichiers objets ` et les listes sont tous deux " +"valables. Si *csvfile* est un fichier, il doit être ouvert avec " +"``newline=''``. [1]_ Un paramètre *dialect* optionnel peut être fourni pour " +"définir un ensemble de paramètres spécifiques à un dialecte CSV " +"particulier. Il peut s'agir d'une instance de sous-classe " +"de :class:`Dialect` ou de l'une des chaînes renvoyées par la " "fonction :func:`list_dialects`. Les autres arguments nommés optionnels " "(*fmtparams*) peuvent être spécifiés pour redéfinir des paramètres de " "formatage particuliers dans le dialecte utilisé. Pour des détails complets " "sur les dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-" "params`." -#: library/csv.rst:72 +#: library/csv.rst:70 +#, fuzzy msgid "" "Each row read from the csv file is returned as a list of strings. No " -"automatic data type conversion is performed unless the ``QUOTE_NONNUMERIC`` " -"format option is specified (in which case unquoted fields are transformed " -"into floats)." +"automatic data type conversion is performed unless " +"the :data:`QUOTE_NONNUMERIC` format option is specified (in which case " +"unquoted fields are transformed into floats)." msgstr "" "Chaque ligne lue depuis le fichier CSV est renvoyée comme une liste de " "chaînes de caractères. Aucune conversion automatique de type des données " @@ -137,11 +142,11 @@ msgstr "" "spécifiée (dans ce cas, les champs sans guillemets sont transformés en " "nombres flottants)." -#: library/csv.rst:106 library/csv.rst:219 +#: library/csv.rst:104 library/csv.rst:218 msgid "A short usage example::" msgstr "Un court exemple d'utilisation ::" -#: library/csv.rst:89 +#: library/csv.rst:87 #, fuzzy msgid "" "Return a writer object responsible for converting the user's data into " @@ -149,12 +154,12 @@ msgid "" "object with a :meth:`~io.TextIOBase.write` method. If *csvfile* is a file " "object, it should be opened with ``newline=''`` [1]_. An optional *dialect* " "parameter can be given which is used to define a set of parameters specific " -"to a particular CSV dialect. It may be an instance of a subclass of the :" -"class:`Dialect` class or one of the strings returned by the :func:" -"`list_dialects` function. The other optional *fmtparams* keyword arguments " -"can be given to override individual formatting parameters in the current " -"dialect. For full details about dialects and formatting parameters, see " -"the :ref:`csv-fmt-params` section. To make it as easy as possible to " +"to a particular CSV dialect. It may be an instance of a subclass of " +"the :class:`Dialect` class or one of the strings returned by " +"the :func:`list_dialects` function. The other optional *fmtparams* keyword " +"arguments can be given to override individual formatting parameters in the " +"current dialect. For full details about dialects and formatting parameters, " +"see the :ref:`csv-fmt-params` section. To make it as easy as possible to " "interface with modules which implement the DB API, the value :const:`None` " "is written as the empty string. While this isn't a reversible " "transformation, it makes it easier to dump SQL NULL data values to CSV files " @@ -167,21 +172,21 @@ msgstr "" "méthode :func:`write`. Si *csvfile* est un objet fichier, il doit être " "ouvert avec ``newline=''``. [1]_ Un paramètre *dialect* optionnel peut être " "fourni pour définir un ensemble de paramètres spécifiques à un dialecte CSV " -"particulier. Il peut s'agir d'une instance d’une sous-classe de :class:" -"`Dialect` ou de l'une des chaînes renvoyées par la fonction :func:" -"`list_dialects`. Les autres arguments nommés optionnels (*fmtparams*) " -"peuvent être spécifiés pour redéfinir des paramètres de formatage " -"particuliers dans le dialecte utilisé. Pour tous les détails sur les " -"dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-params`. " -"Pour faciliter au mieux l'interfaçage avec d'autres modules implémentant " -"l'interface *DB*, la valeur :const:`None` est convertie en une chaîne vide. " -"Bien que ce ne soit pas une transformation réversible, cela simplifie " -"l'exportation de données SQL *NULL* vers des fichiers CSV sans pré-traiter " -"les données renvoyées par un appel à ``cursor.fetch*``. Toutes les autres " -"données qui ne sont pas des chaînes de caractères sont transformées en " -"chaînes par un appel à :func:`str` avant d'être écrites." - -#: library/csv.rst:118 +"particulier. Il peut s'agir d'une instance d’une sous-classe " +"de :class:`Dialect` ou de l'une des chaînes renvoyées par la " +"fonction :func:`list_dialects`. Les autres arguments nommés optionnels " +"(*fmtparams*) peuvent être spécifiés pour redéfinir des paramètres de " +"formatage particuliers dans le dialecte utilisé. Pour tous les détails sur " +"les dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-" +"params`. Pour faciliter au mieux l'interfaçage avec d'autres modules " +"implémentant l'interface *DB*, la valeur :const:`None` est convertie en une " +"chaîne vide. Bien que ce ne soit pas une transformation réversible, cela " +"simplifie l'exportation de données SQL *NULL* vers des fichiers CSV sans pré-" +"traiter les données renvoyées par un appel à ``cursor.fetch*``. Toutes les " +"autres données qui ne sont pas des chaînes de caractères sont transformées " +"en chaînes par un appel à :func:`str` avant d'être écrites." + +#: library/csv.rst:116 msgid "" "Associate *dialect* with *name*. *name* must be a string. The dialect can " "be specified either by passing a sub-class of :class:`Dialect`, or by " @@ -190,35 +195,35 @@ msgid "" "parameters, see section :ref:`csv-fmt-params`." msgstr "" "Associe *dialect* avec *name*. *name* doit être une chaîne de caractères. " -"Le dialecte peut être spécifié en passant une instance d'une sous-classe de :" -"class:`Dialect`, des arguments nommés *fmtparams*, ou les deux, avec les " +"Le dialecte peut être spécifié en passant une instance d'une sous-classe " +"de :class:`Dialect`, des arguments nommés *fmtparams*, ou les deux, avec les " "arguments nommés redéfinissant les paramètres du dialecte. Pour tous les " -"détails sur les dialectes et paramètres de formatage, voir la section :ref:" -"`csv-fmt-params`." +"détails sur les dialectes et paramètres de formatage, voir la " +"section :ref:`csv-fmt-params`." -#: library/csv.rst:127 +#: library/csv.rst:125 msgid "" -"Delete the dialect associated with *name* from the dialect registry. An :" -"exc:`Error` is raised if *name* is not a registered dialect name." +"Delete the dialect associated with *name* from the dialect registry. " +"An :exc:`Error` is raised if *name* is not a registered dialect name." msgstr "" "Supprime le dialecte associé à *name* depuis le registre des dialectes. " "Une :exc:`Error` est levée si *name* n'est pas un nom de dialecte enregistré." -#: library/csv.rst:133 +#: library/csv.rst:131 msgid "" "Return the dialect associated with *name*. An :exc:`Error` is raised if " "*name* is not a registered dialect name. This function returns an " "immutable :class:`Dialect`." msgstr "" "Renvoie le dialecte associé à *name*. Une :exc:`Error` est levée si *name* " -"n'est pas un nom de dialecte enregistré. Cette fonction renvoie un objet :" -"class:`Dialect` immuable." +"n'est pas un nom de dialecte enregistré. Cette fonction renvoie un " +"objet :class:`Dialect` immuable." -#: library/csv.rst:139 +#: library/csv.rst:137 msgid "Return the names of all registered dialects." msgstr "Renvoie les noms de tous les dialectes enregistrés." -#: library/csv.rst:144 +#: library/csv.rst:143 msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." @@ -226,11 +231,12 @@ msgstr "" "Renvoie la taille de champ maximale actuelle autorisée par l'analyseur. Si " "*new_limit* est donnée, elle devient la nouvelle limite." -#: library/csv.rst:148 -msgid "The :mod:`csv` module defines the following classes:" +#: library/csv.rst:147 +#, fuzzy +msgid "The :mod:`!csv` module defines the following classes:" msgstr "Le module :mod:`csv` définit les classes suivantes :" -#: library/csv.rst:153 +#: library/csv.rst:152 msgid "" "Create an object that operates like a regular reader but maps the " "information in each row to a :class:`dict` whose keys are given by the " @@ -240,7 +246,7 @@ msgstr "" "informations de chaque ligne dans un :class:`dict` dont les clés sont " "données par le paramètre optionnel *fieldnames*." -#: library/csv.rst:157 +#: library/csv.rst:156 #, fuzzy msgid "" "The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " @@ -255,7 +261,7 @@ msgstr "" "utilisées comme noms de champs. Sans se soucier de comment sont déterminés " "les noms de champs, le dictionnaire préserve leur ordre original." -#: library/csv.rst:164 +#: library/csv.rst:163 msgid "" "If a row has more fields than fieldnames, the remaining data is put in a " "list and stored with the fieldname specified by *restkey* (which defaults to " @@ -269,29 +275,29 @@ msgstr "" "*fieldnames*, les valeurs manquantes sont remplacées par la valeur de " "*restval* (``None`` par défaut)." -#: library/csv.rst:170 +#: library/csv.rst:169 msgid "" -"All other optional or keyword arguments are passed to the underlying :class:" -"`reader` instance." +"All other optional or keyword arguments are passed to the " +"underlying :class:`reader` instance." msgstr "" -"Tous les autres arguments optionnels ou nommés sont passés à l'instance :" -"class:`reader` sous-jacente." +"Tous les autres arguments optionnels ou nommés sont passés à " +"l'instance :class:`reader` sous-jacente." -#: library/csv.rst:217 +#: library/csv.rst:216 msgid "" "If the argument passed to *fieldnames* is an iterator, it will be coerced to " "a :class:`list`." msgstr "" -#: library/csv.rst:175 +#: library/csv.rst:174 msgid "Returned rows are now of type :class:`OrderedDict`." msgstr "Les lignes renvoyées sont maintenant de type :class:`OrderedDict`." -#: library/csv.rst:178 +#: library/csv.rst:177 msgid "Returned rows are now of type :class:`dict`." msgstr "Les lignes renvoyées sont maintenant de type :class:`dict`." -#: library/csv.rst:199 +#: library/csv.rst:198 #, fuzzy msgid "" "Create an object which operates like a regular writer but maps dictionaries " @@ -302,10 +308,10 @@ msgid "" "written if the dictionary is missing a key in *fieldnames*. If the " "dictionary passed to the :meth:`~csvwriter.writerow` method contains a key " "not found in *fieldnames*, the optional *extrasaction* parameter indicates " -"what action to take. If it is set to ``'raise'``, the default value, a :exc:" -"`ValueError` is raised. If it is set to ``'ignore'``, extra values in the " -"dictionary are ignored. Any other optional or keyword arguments are passed " -"to the underlying :class:`writer` instance." +"what action to take. If it is set to ``'raise'``, the default value, " +"a :exc:`ValueError` is raised. If it is set to ``'ignore'``, extra values in " +"the dictionary are ignored. Any other optional or keyword arguments are " +"passed to the underlying :class:`writer` instance." msgstr "" "Crée un objet qui opère comme un transcripteur ordinaire mais qui produit " "les lignes de sortie depuis des dictionnaires. Le paramètre *fieldnames* " @@ -320,7 +326,7 @@ msgstr "" "excédentaires du dictionnaire sont ignorées. Les autres arguments optionnels " "ou nommés sont passés à l'instance :class:`writer` sous-jacente." -#: library/csv.rst:214 +#: library/csv.rst:213 msgid "" "Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " "of the :class:`DictWriter` class is not optional." @@ -328,33 +334,33 @@ msgstr "" "Notez que contrairement à la classe :class:`DictReader`, le paramètre " "*fieldnames* de :class:`DictWriter` n'est pas optionnel." -#: library/csv.rst:235 +#: library/csv.rst:234 msgid "" "The :class:`Dialect` class is a container class whose attributes contain " "information for how to handle doublequotes, whitespace, delimiters, etc. Due " "to the lack of a strict CSV specification, different applications produce " -"subtly different CSV data. :class:`Dialect` instances define how :class:" -"`reader` and :class:`writer` instances behave." +"subtly different CSV data. :class:`Dialect` instances define " +"how :class:`reader` and :class:`writer` instances behave." msgstr "" "La classe :class:`Dialect` est une classe dont les attributs contiennent des " "informations sur la façon de gérer les guillemets, les espaces, les " "délimiteurs, etc. En raison de l’absence d’une spécification CSV stricte, " "différentes applications produisent des données CSV subtilement différentes. " -"Les instances :class:`Dialect` définissent le comportement des instances :" -"class:`reader` et :class:`writer`." +"Les instances :class:`Dialect` définissent le comportement des " +"instances :class:`reader` et :class:`writer`." -#: library/csv.rst:241 +#: library/csv.rst:240 msgid "" "All available :class:`Dialect` names are returned by :func:`list_dialects`, " "and they can be registered with specific :class:`reader` and :class:`writer` " "classes through their initializer (``__init__``) functions like this::" msgstr "" -"Tous les noms disponibles de :class:`Dialect` sont renvoyés par :func:" -"`list_dialects`, et ils peuvent être enregistrés avec des classes :class:" -"`reader` et :class:`writer` spécifiques en passant par leur fonction " -"d’initialisation (``__init__``) comme ici ::" +"Tous les noms disponibles de :class:`Dialect` sont renvoyés " +"par :func:`list_dialects`, et ils peuvent être enregistrés avec des " +"classes :class:`reader` et :class:`writer` spécifiques en passant par leur " +"fonction d’initialisation (``__init__``) comme ici ::" -#: library/csv.rst:253 +#: library/csv.rst:252 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." @@ -362,7 +368,7 @@ msgstr "" "La classe :class:`excel` définit les propriétés usuelles d'un fichier CSV " "généré par Excel. Elle est enregistrée avec le nom de dialecte ``'excel'``." -#: library/csv.rst:259 +#: library/csv.rst:258 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " @@ -372,7 +378,7 @@ msgstr "" "CSV généré par Excel avec des tabulations comme séparateurs. Elle est " "enregistrée avec le nom de dialecte ``'excel-tab'``." -#: library/csv.rst:265 +#: library/csv.rst:264 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " @@ -383,44 +389,44 @@ msgstr "" "marqueur de fin de ligne et délimitant tous les champs par des guillemets. " "Elle est enregistrée avec le nom de dialecte ``'unix'``." -#: library/csv.rst:274 +#: library/csv.rst:273 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "" "La classe :class:`Sniffer` est utilisée pour déduire le format d'un fichier " "CSV." -#: library/csv.rst:276 +#: library/csv.rst:275 msgid "The :class:`Sniffer` class provides two methods:" msgstr "La classe :class:`Sniffer` fournit deux méthodes :" -#: library/csv.rst:280 +#: library/csv.rst:279 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " "is interpreted as a string containing possible valid delimiter characters." msgstr "" -"Analyse l'extrait donné (*sample*) et renvoie une sous-classe :class:" -"`Dialect` reflétant les paramètres trouvés. Si le paramètre optionnel " -"*delimiters* est donné, il est interprété comme une chaîne contenant tous " -"les caractères valides de séparation possibles." +"Analyse l'extrait donné (*sample*) et renvoie une sous-" +"classe :class:`Dialect` reflétant les paramètres trouvés. Si le paramètre " +"optionnel *delimiters* est donné, il est interprété comme une chaîne " +"contenant tous les caractères valides de séparation possibles." -#: library/csv.rst:288 +#: library/csv.rst:287 msgid "" -"Analyze the sample text (presumed to be in CSV format) and return :const:" -"`True` if the first row appears to be a series of column headers. Inspecting " -"each column, one of two key criteria will be considered to estimate if the " -"sample contains a header:" +"Analyze the sample text (presumed to be in CSV format) and " +"return :const:`True` if the first row appears to be a series of column " +"headers. Inspecting each column, one of two key criteria will be considered " +"to estimate if the sample contains a header:" msgstr "" -"Analyse l'extrait de texte (présumé être au format CSV) et renvoie :const:" -"`True` si la première ligne semble être une série d'en-têtes de colonnes. En " -"inspectant chaque colonne, l’un des deux critères clés sera pris en compte " -"pour estimer si l’échantillon contient un en-tête :" +"Analyse l'extrait de texte (présumé être au format CSV) et " +"renvoie :const:`True` si la première ligne semble être une série d'en-têtes " +"de colonnes. En inspectant chaque colonne, l’un des deux critères clés sera " +"pris en compte pour estimer si l’échantillon contient un en-tête :" -#: library/csv.rst:293 +#: library/csv.rst:292 msgid "the second through n-th rows contain numeric values" msgstr "les deuxième à n-ième lignes contiennent des valeurs numériques" -#: library/csv.rst:294 +#: library/csv.rst:293 msgid "" "the second through n-th rows contain strings where at least one value's " "length differs from that of the putative header of that column." @@ -428,16 +434,17 @@ msgstr "" "les deuxième à n-ième lignes contiennent des chaînes dont la longueur d’au " "moins une valeur diffère de celle de l’en-tête putatif de cette colonne." -#: library/csv.rst:297 +#: library/csv.rst:296 +#, fuzzy msgid "" -"Twenty rows after the first row are sampled; if more than half of columns + " -"rows meet the criteria, :const:`True` is returned." +"Twenty-one rows after the header are sampled; if more than half of the " +"columns + rows meet the criteria, :const:`True` is returned." msgstr "" "L'échantillon est composé des vingt lignes après la première ligne ; si plus " "de la moitié des colonnes + lignes répondent aux critères, :const:`True` est " "renvoyé." -#: library/csv.rst:302 +#: library/csv.rst:301 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." @@ -445,51 +452,64 @@ msgstr "" "Cette méthode est une heuristique discutable et peut produire tant des faux-" "positifs que des faux-négatifs." -#: library/csv.rst:305 +#: library/csv.rst:304 msgid "An example for :class:`Sniffer` use::" msgstr "Un exemple d'utilisation de :class:`Sniffer` ::" -#: library/csv.rst:316 -msgid "The :mod:`csv` module defines the following constants:" +#: library/csv.rst:315 +#, fuzzy +msgid "The :mod:`!csv` module defines the following constants:" msgstr "Le module :mod:`csv` définit les constantes suivantes :" -#: library/csv.rst:320 +#: library/csv.rst:319 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" "Indique aux objets :class:`writer` de délimiter tous les champs par des " "guillemets." -#: library/csv.rst:325 +#: library/csv.rst:324 +#, fuzzy msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " -"special characters such as *delimiter*, *quotechar* or any of the characters " -"in *lineterminator*." +"special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " +"any of the characters in *lineterminator*." msgstr "" "Indique aux objets :class:`writer` de ne délimiter ainsi que les champs " "contenant un caractère spécial comme *delimiter*, *quotechar* ou n'importe " "quel caractère de *lineterminator*." -#: library/csv.rst:332 +#: library/csv.rst:331 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" "Indique aux objets :class:`writer` de délimiter ainsi tous les champs non-" "numériques." -#: library/csv.rst:334 +#: library/csv.rst:333 #, fuzzy msgid "" -"Instructs :class:`reader` objects to convert all non-quoted fields to type " -"*float*." +"Instructs :class:`reader` objects to convert all non-quoted fields to " +"type :class:`float`." msgstr "" "Indique au lecteur de convertir tous les champs non délimités par des " "guillemets vers des *float*." -#: library/csv.rst:339 +#: library/csv.rst:336 msgid "" -"Instructs :class:`writer` objects to never quote fields. When the current " -"*delimiter* occurs in output data it is preceded by the current *escapechar* " -"character. If *escapechar* is not set, the writer will raise :exc:`Error` " -"if any characters that require escaping are encountered." +"Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, " +"or :class:`~enum.IntEnum`, have a string representation that cannot be " +"converted to :class:`float`. They cannot be read in " +"the :data:`QUOTE_NONNUMERIC` and :data:`QUOTE_STRINGS` modes." +msgstr "" + +#: library/csv.rst:344 +#, fuzzy +msgid "" +"Instructs :class:`writer` objects to never quote fields. When the current " +"*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " +"characters in *lineterminator* occurs in output data it is preceded by the " +"current *escapechar* character. If *escapechar* is not set, the writer will " +"raise :exc:`Error` if any characters that require escaping are encountered. " +"Set *quotechar* to ``None`` to prevent its escaping." msgstr "" "Indique aux objets :class:`writer` de ne jamais délimiter les champs par des " "guillemets. Quand le *delimiter* utilisé apparaît dans les données, il est " @@ -497,7 +517,7 @@ msgstr "" "pas précisé, le transcripteur lèvera une :exc:`Error` si un caractère " "nécessitant un échappement est rencontré." -#: library/csv.rst:344 +#: library/csv.rst:352 #, fuzzy msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " @@ -506,106 +526,127 @@ msgstr "" "Indique au :class:`reader` de ne pas opérer de traitement spécial sur les " "guillemets." -#: library/csv.rst:348 +#: library/csv.rst:356 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: library/csv.rst:352 +#: library/csv.rst:360 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: library/csv.rst:359 +#: library/csv.rst:367 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: library/csv.rst:363 +#: library/csv.rst:371 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: library/csv.rst:368 -msgid "The :mod:`csv` module defines the following exception:" +#: library/csv.rst:376 +#, fuzzy +msgid "The :mod:`!csv` module defines the following exception:" msgstr "Le module :mod:`csv` définit les exceptions suivantes :" -#: library/csv.rst:373 +#: library/csv.rst:381 msgid "Raised by any of the functions when an error is detected." msgstr "Levée par les fonctions du module quand une erreur détectée." -#: library/csv.rst:378 +#: library/csv.rst:386 msgid "Dialects and Formatting Parameters" msgstr "Dialectes et paramètres de formatage" -#: library/csv.rst:380 +#: library/csv.rst:388 #, fuzzy msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " "dialect is a subclass of the :class:`Dialect` class containing various " -"attributes describing the format of the CSV file. When creating :class:" -"`reader` or :class:`writer` objects, the programmer can specify a string or " -"a subclass of the :class:`Dialect` class as the dialect parameter. In " -"addition to, or instead of, the *dialect* parameter, the programmer can also " -"specify individual formatting parameters, which have the same names as the " -"attributes defined below for the :class:`Dialect` class." +"attributes describing the format of the CSV file. When " +"creating :class:`reader` or :class:`writer` objects, the programmer can " +"specify a string or a subclass of the :class:`Dialect` class as the dialect " +"parameter. In addition to, or instead of, the *dialect* parameter, the " +"programmer can also specify individual formatting parameters, which have the " +"same names as the attributes defined below for the :class:`Dialect` class." msgstr "" "Pour faciliter la spécification du format des entrées et sorties, les " "paramètres de formatage spécifiques sont regroupés en dialectes. Un " "dialecte est une sous-classe de :class:`Dialect` avec un ensemble de " -"méthodes spécifiques et une méthode :meth:`validate`. Quand un objet :class:" -"`reader` ou :class:`writer` est créé, vous pouvez spécifier une chaîne ou " -"une sous-classe de :class:`Dialect` comme paramètre *dialect*. En plus du " -"paramètre *dialect*, ou à sa place, vous pouvez aussi préciser des " +"méthodes spécifiques et une méthode :meth:`validate`. Quand un " +"objet :class:`reader` ou :class:`writer` est créé, vous pouvez spécifier une " +"chaîne ou une sous-classe de :class:`Dialect` comme paramètre *dialect*. En " +"plus du paramètre *dialect*, ou à sa place, vous pouvez aussi préciser des " "paramètres de formatage individuels, qui ont les mêmes noms que les " "attributs de :class:`Dialect` définis ci-dessous." -#: library/csv.rst:390 +#: library/csv.rst:398 msgid "Dialects support the following attributes:" msgstr "Les dialectes supportent les attributs suivants :" -#: library/csv.rst:395 +#: library/csv.rst:403 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" "Une chaîne d'un seul caractère utilisée pour séparer les champs. Elle vaut " "``','`` par défaut." -#: library/csv.rst:400 +#: library/csv.rst:408 msgid "" "Controls how instances of *quotechar* appearing inside a field should " -"themselves be quoted. When :const:`True`, the character is doubled. When :" -"const:`False`, the *escapechar* is used as a prefix to the *quotechar*. It " -"defaults to :const:`True`." +"themselves be quoted. When :const:`True`, the character is doubled. " +"When :const:`False`, the *escapechar* is used as a prefix to the " +"*quotechar*. It defaults to :const:`True`." msgstr "" "Contrôle comment les caractères *quotechar* dans le champ doivent être " "retranscrits. Quand ce paramètre vaut :const:`True`, le caractère est " "doublé. Quand il vaut :const:`False`, le caractère *escapechar* est utilisé " "comme préfixe à *quotechar*. Il vaut :const:`True` par défaut." -#: library/csv.rst:405 +#: library/csv.rst:413 msgid "" -"On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" -"exc:`Error` is raised if a *quotechar* is found in a field." +"On output, if *doublequote* is :const:`False` and no *escapechar* is " +"set, :exc:`Error` is raised if a *quotechar* is found in a field." msgstr "" "En écriture, si *doublequote* vaut :const:`False` et qu'aucun *escapechar* " "n'est précisé, une :exc:`Error` est levée si un *quotechar* est trouvé dans " "le champ." -#: library/csv.rst:411 +#: library/csv.rst:419 +msgid "" +"A one-character string used by the writer to escape characters that require " +"escaping:" +msgstr "" + +#: library/csv.rst:422 +msgid "" +"the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " +"characters in *lineterminator* are escaped if *quoting* is set " +"to :const:`QUOTE_NONE`;" +msgstr "" + +#: library/csv.rst:425 +msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" +msgstr "" + +#: library/csv.rst:426 +#, fuzzy +msgid "the *escapechar* itself." +msgstr "Un ``escapechar`` vide n'est pas autorisé." + +#: library/csv.rst:428 +#, fuzzy msgid "" -"A one-character string used by the writer to escape the *delimiter* if " -"*quoting* is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* " -"is :const:`False`. On reading, the *escapechar* removes any special meaning " -"from the following character. It defaults to :const:`None`, which disables " -"escaping." +"On reading, the *escapechar* removes any special meaning from the following " +"character. It defaults to :const:`None`, which disables escaping." msgstr "" "Une chaîne d'un seul caractère utilisée par le transcripteur pour échapper " "*delimiter* si *quoting* vaut :const:`QUOTE_NONE`, et pour échapper " @@ -613,19 +654,19 @@ msgstr "" "retire toute signification spéciale au caractère qui le suit. Elle vaut par " "défaut :const:`None`, ce qui désactive l'échappement." -#: library/csv.rst:416 +#: library/csv.rst:431 msgid "An empty *escapechar* is not allowed." msgstr "Un ``escapechar`` vide n'est pas autorisé." -#: library/csv.rst:421 +#: library/csv.rst:436 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "" -"La chaîne utilisée pour terminer les lignes produites par un :class:" -"`writer`. Elle vaut par défaut ``'\\r\\n'``." +"La chaîne utilisée pour terminer les lignes produites par " +"un :class:`writer`. Elle vaut par défaut ``'\\r\\n'``." -#: library/csv.rst:426 +#: library/csv.rst:441 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " @@ -635,41 +676,47 @@ msgstr "" "``'\\n'`` comme marqueurs de fin de ligne, et ignorer *lineterminator*. Ce " "comportement pourrait changer dans le futur." -#: library/csv.rst:433 +#: library/csv.rst:448 +#, fuzzy msgid "" "A one-character string used to quote fields containing special characters, " -"such as the *delimiter* or *quotechar*, or which contain new-line " -"characters. It defaults to ``'\"'``." +"such as the *delimiter* or the *quotechar*, or which contain new-line " +"characters (``'\\r'``, ``'\\n'`` or any of the characters in " +"*lineterminator*). It defaults to ``'\"'``. Can be set to ``None`` to " +"prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" "Une chaîne d'un seul caractère utilisée pour délimiter les champs contenant " "des caractères spéciaux, comme *delimiter* ou *quotechar*, ou contenant un " "caractère de fin de ligne. Elle vaut ``'\"'`` par défaut." -#: library/csv.rst:437 +#: library/csv.rst:455 msgid "An empty *quotechar* is not allowed." msgstr "Un ``quotechar`` vide n'est pas autorisé." -#: library/csv.rst:442 +#: library/csv.rst:460 #, fuzzy msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants ` and defaults to :const:`QUOTE_MINIMAL`." +"constants>` and defaults to :const:`QUOTE_MINIMAL` if *quotechar* is not " +"``None``, and :const:`QUOTE_NONE` otherwise." msgstr "" "Contrôle quand les guillemets doivent être générés par le transcripteur et " -"reconnus par le lecteur. Il peut prendre comme valeur l'une des constantes :" -"const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut par défaut :" -"const:`QUOTE_MINIMAL`." +"reconnus par le lecteur. Il peut prendre comme valeur l'une des " +"constantes :const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut " +"par défaut :const:`QUOTE_MINIMAL`." -#: library/csv.rst:449 +#: library/csv.rst:468 +#, fuzzy msgid "" "When :const:`True`, spaces immediately following the *delimiter* are " -"ignored. The default is :const:`False`." +"ignored. The default is :const:`False`. When combining ``delimiter=' '`` " +"with ``skipinitialspace=True``, unquoted empty fields are not allowed." msgstr "" "Quand il vaut :const:`True`, les espaces suivant directement *delimiter* " "sont ignorés. Il vaut :const:`False` par défaut." -#: library/csv.rst:455 +#: library/csv.rst:475 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." @@ -677,19 +724,19 @@ msgstr "" "Quand il vaut ``True``, une exception :exc:`Error` est levée lors de " "mauvaises entrées CSV. Il vaut ``False`` par défaut." -#: library/csv.rst:461 +#: library/csv.rst:481 msgid "Reader Objects" msgstr "Objets lecteurs" -#: library/csv.rst:463 +#: library/csv.rst:483 msgid "" -"Reader objects (:class:`DictReader` instances and objects returned by the :" -"func:`reader` function) have the following public methods:" +"Reader objects (:class:`DictReader` instances and objects returned by " +"the :func:`reader` function) have the following public methods:" msgstr "" "Les objets lecteurs (instances de :class:`DictReader` ou objets renvoyés par " "la fonction :func:`reader`) ont les méthodes publiques suivantes :" -#: library/csv.rst:468 +#: library/csv.rst:488 msgid "" "Return the next row of the reader's iterable object as a list (if the object " "was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " @@ -702,15 +749,15 @@ msgstr "" "utilisée. Généralement, vous devez appeler la méthode à l'aide de " "``next(reader)``." -#: library/csv.rst:474 +#: library/csv.rst:494 msgid "Reader objects have the following public attributes:" msgstr "Les objets lecteurs ont les attributs publics suivants :" -#: library/csv.rst:478 +#: library/csv.rst:498 msgid "A read-only description of the dialect in use by the parser." msgstr "Une description en lecture seule du dialecte utilisé par l'analyseur." -#: library/csv.rst:483 +#: library/csv.rst:503 msgid "" "The number of lines read from the source iterator. This is not the same as " "the number of records returned, as records can span multiple lines." @@ -719,11 +766,11 @@ msgstr "" "au nombre d'enregistrements renvoyés, puisque certains enregistrements " "peuvent s'étendre sur plusieurs lignes." -#: library/csv.rst:487 +#: library/csv.rst:507 msgid "DictReader objects have the following public attribute:" msgstr "Les objets *DictReader* ont les attributs publics suivants :" -#: library/csv.rst:491 +#: library/csv.rst:511 msgid "" "If not passed as a parameter when creating the object, this attribute is " "initialized upon first access or when the first record is read from the file." @@ -732,11 +779,11 @@ msgstr "" "est initialisé lors du premier accès ou quand le premier enregistrement est " "lu depuis le fichier." -#: library/csv.rst:498 +#: library/csv.rst:518 msgid "Writer Objects" msgstr "Objets transcripteurs" -#: library/csv.rst:500 +#: library/csv.rst:520 #, fuzzy msgid "" ":class:`writer` objects (:class:`DictWriter` instances and objects returned " @@ -758,7 +805,7 @@ msgstr "" "quelques problèmes pour d'autres programmes qui liraient ces fichiers CSV " "(en supposant qu'ils supportent les nombres complexes)." -#: library/csv.rst:511 +#: library/csv.rst:531 msgid "" "Write the *row* parameter to the writer's file object, formatted according " "to the current :class:`Dialect`. Return the return value of the call to the " @@ -768,11 +815,11 @@ msgstr "" "selon la classe :class:`Dialect` utilisée. Renvoie la valeur de retour de " "l'appel à la méthode *write* de l'objet fichier sous-jacent." -#: library/csv.rst:515 +#: library/csv.rst:535 msgid "Added support of arbitrary iterables." msgstr "Ajout du support d'itérables arbitraires." -#: library/csv.rst:520 +#: library/csv.rst:540 msgid "" "Write all elements in *rows* (an iterable of *row* objects as described " "above) to the writer's file object, formatted according to the current " @@ -782,20 +829,20 @@ msgstr "" "précédemment) vers le fichier associé au transcripteur, formatés selon le " "dialecte utilisé." -#: library/csv.rst:524 +#: library/csv.rst:544 msgid "Writer objects have the following public attribute:" msgstr "Les objets transcripteurs ont l’attribut public suivant :" -#: library/csv.rst:529 +#: library/csv.rst:549 msgid "A read-only description of the dialect in use by the writer." msgstr "" "Une description en lecture seule du dialecte utilisé par le transcripteur." -#: library/csv.rst:532 +#: library/csv.rst:552 msgid "DictWriter objects have the following public method:" msgstr "Les objets *DictWriter* ont la méthode publique suivante :" -#: library/csv.rst:537 +#: library/csv.rst:557 msgid "" "Write a row with the field names (as specified in the constructor) to the " "writer's file object, formatted according to the current dialect. Return the " @@ -803,46 +850,46 @@ msgid "" msgstr "" "Écrit une ligne avec le nom des en-têtes (comme définies dans le " "constructeur) dans l'objet fichier associé au transcripteur, formatée selon " -"le dialecte utilisé. Renvoie la valeur de retour de l'appel :meth:`csvwriter." -"writerow` utilisé en interne." +"le dialecte utilisé. Renvoie la valeur de retour de " +"l'appel :meth:`csvwriter.writerow` utilisé en interne." -#: library/csv.rst:542 +#: library/csv.rst:562 msgid "" -":meth:`writeheader` now also returns the value returned by the :meth:" -"`csvwriter.writerow` method it uses internally." +":meth:`writeheader` now also returns the value returned by " +"the :meth:`csvwriter.writerow` method it uses internally." msgstr "" ":meth:`writeheader` renvoie maintenant aussi la valeur renvoyée par la " "méthode :meth:`csvwriter.writerow` qu'il utilise en interne." -#: library/csv.rst:550 +#: library/csv.rst:570 msgid "Examples" msgstr "Exemples" -#: library/csv.rst:552 +#: library/csv.rst:572 msgid "The simplest example of reading a CSV file::" msgstr "Le plus simple exemple de lecture d'un fichier CSV ::" -#: library/csv.rst:560 +#: library/csv.rst:580 msgid "Reading a file with an alternate format::" msgstr "Lire un fichier avec un format alternatif ::" -#: library/csv.rst:568 +#: library/csv.rst:588 msgid "The corresponding simplest possible writing example is::" msgstr "Le plus simple exemple d'écriture correspondant est ::" -#: library/csv.rst:575 +#: library/csv.rst:595 msgid "" "Since :func:`open` is used to open a CSV file for reading, the file will by " -"default be decoded into unicode using the system default encoding (see :func:" -"`locale.getencoding`). To decode a file using a different encoding, use the " -"``encoding`` argument of open::" +"default be decoded into unicode using the system default encoding " +"(see :func:`locale.getencoding`). To decode a file using a different " +"encoding, use the ``encoding`` argument of open::" msgstr "" "Puisque :func:`open` est utilisée pour ouvrir un fichier CSV en lecture, le " "fichier sera par défaut décodé vers Unicode en utilisant l'encodage par " "défaut (voir :func:`locale.getencoding`). Pour décoder un fichier utilisant " "un encodage différent, utilisez l'argument ``encoding`` de *open* ::" -#: library/csv.rst:586 +#: library/csv.rst:606 msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." @@ -851,19 +898,19 @@ msgstr "" "celui par défaut du système : spécifiez l'encodage en argument lors de " "l'ouverture du fichier de sortie." -#: library/csv.rst:589 +#: library/csv.rst:609 msgid "Registering a new dialect::" msgstr "Enregistrer un nouveau dialecte ::" -#: library/csv.rst:596 +#: library/csv.rst:616 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" msgstr "" -"Un exemple d'utilisation un peu plus avancé du lecteur --- attrapant et " +"Un exemple d'utilisation un peu plus avancé du lecteur, attrapant et " "notifiant les erreurs ::" -#: library/csv.rst:608 +#: library/csv.rst:628 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" @@ -871,17 +918,18 @@ msgstr "" "Et bien que le module ne permette pas d'analyser directement des chaînes, " "cela peut être fait facilement ::" -#: library/csv.rst:617 +#: library/csv.rst:637 msgid "Footnotes" msgstr "Notes" -#: library/csv.rst:618 +#: library/csv.rst:638 +#, fuzzy msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " -"will not be interpreted correctly, and on platforms that use ``\\r\\n`` " -"linendings on write an extra ``\\r`` will be added. It should always be " -"safe to specify ``newline=''``, since the csv module does its own (:term:" -"`universal `) newline handling." +"will not be interpreted correctly, and on platforms that use ``\\r\\n`` line " +"endings on write an extra ``\\r`` will be added. It should always be safe " +"to specify ``newline=''``, since the csv module does its own " +"(:term:`universal `) newline handling." msgstr "" "Si ``newline=''`` n'est pas précisé, les caractères de fin de ligne " "embarqués dans des champs délimités par des guillemets ne seront pas " @@ -901,8 +949,8 @@ msgstr "" #~ msgid "" #~ "The :class:`Dialect` class is a container class relied on primarily for " -#~ "its attributes, which are used to define the parameters for a specific :" -#~ "class:`reader` or :class:`writer` instance." +#~ "its attributes, which are used to define the parameters for a " +#~ "specific :class:`reader` or :class:`writer` instance." #~ msgstr "" #~ "La classe :class:`Dialect` est une classe de conteneurs utilisée " #~ "principalement pour ses attributs, qui servent à définir des paramètres " diff --git a/library/ctypes.po b/library/ctypes.po index 871846479..a3a732bf5 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-09 08:06+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -20,13 +20,14 @@ msgstr "" msgid ":mod:`!ctypes` --- A foreign function library for Python" msgstr ":mod:`ctypes` — Bibliothèque Python d'appels à des fonctions externes" -#: library/ctypes.rst:9 +#: library/ctypes.rst:7 msgid "**Source code:** :source:`Lib/ctypes`" msgstr "" -#: library/ctypes.rst:13 +#: library/ctypes.rst:11 +#, fuzzy msgid "" -":mod:`ctypes` is a foreign function library for Python. It provides C " +":mod:`!ctypes` is a foreign function library for Python. It provides C " "compatible data types, and allows calling functions in DLLs or shared " "libraries. It can be used to wrap these libraries in pure Python." msgstr "" @@ -36,56 +37,66 @@ msgstr "" "partagées, rendant ainsi possible l'interfaçage de ces bibliothèques avec du " "pur code Python." -#: library/ctypes.rst:21 -msgid "ctypes tutorial" -msgstr "Didacticiel de *ctypes*" +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" -#: library/ctypes.rst:23 +#: library/ctypes.rst:19 msgid "" -"Note: The code samples in this tutorial use :mod:`doctest` to make sure that " -"they actually work. Since some code samples behave differently under Linux, " -"Windows, or macOS, they contain doctest directives in comments." +":mod:`!ctypes` provides low-level access to native libraries and the " +"process's memory, bypassing Python's safety mechanisms and allowing " +"execution of arbitrary native code. Incorrect use can corrupt data and " +"objects, reveal sensitive information, cause crashes, or otherwise " +"compromise the running process." msgstr "" -"Remarque : les exemples de code de ce didacticiel utilisent :mod:`doctest` " -"pour s'assurer de leur propre bon fonctionnement. Vu que certains de ces " -"exemples ont un comportement différent en Linux, Windows ou macOS, ils " -"contiennent des directives *doctest* dans les commentaires." -#: library/ctypes.rst:27 +#: library/ctypes.rst:29 +msgid "ctypes tutorial" +msgstr "Didacticiel de *ctypes*" + +#: library/ctypes.rst:31 msgid "" "Note: Some code samples reference the ctypes :class:`c_int` type. On " -"platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" -"`c_long`. So, you should not be confused if :class:`c_long` is printed if " -"you would expect :class:`c_int` --- they are actually the same type." +"platforms where ``sizeof(long) == sizeof(int)`` it is an alias " +"to :class:`c_long`. So, you should not be confused if :class:`c_long` is " +"printed if you would expect :class:`c_int` --- they are actually the same " +"type." msgstr "" "Remarque : le type :class:`c_int` du module apparaît dans certains de ces " "exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " -"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" -"`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " -"bien du même type." +"est un alias de :class:`c_long`. Ne soyez donc pas surpris " +"si :class:`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il " +"s'agit bien du même type." -#: library/ctypes.rst:35 +#: library/ctypes.rst:39 msgid "Loading dynamic link libraries" msgstr "Chargement des DLL" -#: library/ctypes.rst:37 +#: library/ctypes.rst:41 +#, fuzzy msgid "" -":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " -"objects, for loading dynamic link libraries." +":mod:`!ctypes` exports the :py:data:`~ctypes.cdll`, and on " +"Windows :py:data:`~ctypes.windll` and :py:data:`~ctypes.oledll` objects, for " +"loading dynamic link libraries." msgstr "" ":mod:`ctypes` fournit l'objet *cdll* pour charger des bibliothèques à liens " "dynamiques (et les objets *windll* et *oledll* en Windows)." -#: library/ctypes.rst:40 +#: library/ctypes.rst:45 #, fuzzy msgid "" -"You load libraries by accessing them as attributes of these objects. *cdll* " -"loads libraries which export functions using the standard ``cdecl`` calling " -"convention, while *windll* libraries call functions using the ``stdcall`` " -"calling convention. *oledll* also uses the ``stdcall`` calling convention, " -"and assumes the functions return a Windows :c:type:`!HRESULT` error code. " -"The error code is used to automatically raise an :class:`OSError` exception " -"when the function call fails." +"You load libraries by accessing them as attributes of these " +"objects. :py:data:`!cdll` loads libraries which export functions using the " +"standard ``cdecl`` calling convention, while :py:data:`!windll` libraries " +"call functions using the ``stdcall`` calling convention. :py:data:`~oledll` " +"also uses the ``stdcall`` calling convention, and assumes the functions " +"return a Windows :c:type:`!HRESULT` error code. The error code is used to " +"automatically raise an :class:`OSError` exception when the function call " +"fails." msgstr "" "Une bibliothèque se charge en y accédant comme un attribut de ces objets. " "*cdll* charge les bibliothèques qui exportent des fonctions utilisant la " @@ -96,15 +107,15 @@ msgstr "" "est utilisé pour lever automatiquement une :class:`OSError` quand l'appel de " "la fonction échoue." -#: library/ctypes.rst:48 +#: library/ctypes.rst:55 msgid "" -"Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" -"exc:`OSError`." +"Windows errors used to raise :exc:`WindowsError`, which is now an alias " +"of :exc:`OSError`." msgstr "" "En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " "maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:53 +#: library/ctypes.rst:60 #, fuzzy msgid "" "Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " @@ -115,11 +126,11 @@ msgstr "" "de Microsoft qui contient la plupart des fonctions standards C. Elle suit la " "convention d'appel *cdecl* ::" -#: library/ctypes.rst:65 +#: library/ctypes.rst:72 msgid "Windows appends the usual ``.dll`` file suffix automatically." msgstr "Windows ajoute le suffixe habituel ``.dll`` automatiquement." -#: library/ctypes.rst:68 +#: library/ctypes.rst:75 msgid "" "Accessing the standard C library through ``cdll.msvcrt`` will use an " "outdated version of the library that may be incompatible with the one being " @@ -132,14 +143,14 @@ msgstr "" "fonctionnalité native de Python, ou bien importer et utiliser le module " "``msvcrt``." -#: library/ctypes.rst:73 +#: library/ctypes.rst:80 #, fuzzy msgid "" -"On Linux, it is required to specify the filename *including* the extension " -"to load a library, so attribute access can not be used to load libraries. " -"Either the :meth:`~LibraryLoader.LoadLibrary` method of the dll loaders " -"should be used, or you should load the library by creating an instance of " -"CDLL by calling the constructor::" +"Other systems require the filename *including* the extension to load a " +"library, so attribute access can not be used to load libraries. Either " +"the :meth:`~LibraryLoader.LoadLibrary` method of the dll loaders should be " +"used, or you should load the library by creating an instance " +"of :py:class:`CDLL` by calling the constructor." msgstr "" "Pour charger une bibliothèque en Linux, il faut passer le nom du fichier " "*avec* son extension. Il est donc impossible de charger une bibliothèque en " @@ -147,15 +158,24 @@ msgstr "" "chargeurs de DLL, ou bien charger la bibliothèque en créant une instance de " "*CDLL* en appelant son constructeur ::" -#: library/ctypes.rst:92 +#: library/ctypes.rst:86 +#, fuzzy +msgid "For example, on Linux::" +msgstr "Par exemple ::" + +#: library/ctypes.rst:95 +msgid "On macOS::" +msgstr "" + +#: library/ctypes.rst:108 msgid "Accessing functions from loaded dlls" msgstr "Accès aux fonctions des DLL chargées" -#: library/ctypes.rst:94 +#: library/ctypes.rst:110 msgid "Functions are accessed as attributes of dll objects::" msgstr "Les fonctions sont alors des attributs des objets DLL ::" -#: library/ctypes.rst:108 +#: library/ctypes.rst:124 #, fuzzy msgid "" "Note that win32 system dlls like ``kernel32`` and ``user32`` often export " @@ -174,7 +194,7 @@ msgstr "" "qui décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " "qu'UNICODE est définie ou non) ::" -#: library/ctypes.rst:121 +#: library/ctypes.rst:137 msgid "" "*windll* does not try to select one of them by magic, you must access the " "version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " @@ -185,17 +205,17 @@ msgstr "" "les appelant ensuite avec des objets octets ou avec des chaînes de " "caractères, respectivement." -#: library/ctypes.rst:125 +#: library/ctypes.rst:141 msgid "" "Sometimes, dlls export functions with names which aren't valid Python " -"identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" -"`getattr` to retrieve the function::" +"identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to " +"use :func:`getattr` to retrieve the function::" msgstr "" "Les DLL exportent parfois des fonctions dont les noms ne sont pas des " "identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il " "faut utiliser :func:`getattr` pour accéder à la fonction ::" -#: library/ctypes.rst:133 +#: library/ctypes.rst:149 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " "functions can be accessed by indexing the dll object with the ordinal " @@ -205,11 +225,11 @@ msgstr "" "plutôt qu'à travers un nom. On accède à une fonction en indiçant l'objet DLL " "avec son index ::" -#: library/ctypes.rst:150 +#: library/ctypes.rst:166 msgid "Calling functions" msgstr "Appel de fonctions" -#: library/ctypes.rst:152 +#: library/ctypes.rst:168 #, fuzzy msgid "" "You can call these functions like any other Python callable. This example " @@ -221,14 +241,14 @@ msgstr "" "depuis l'*epoch* Unix, et la fonction ``GetModuleHandleA()``, qui renvoie un " "gestionnaire de module *win32*." -#: library/ctypes.rst:158 +#: library/ctypes.rst:174 msgid "" "On Windows, you can call the ``GetModuleHandleA()`` function, which returns " "a win32 module handle (passing ``None`` as single argument to call it with a " "``NULL`` pointer)::" msgstr "" -#: library/ctypes.rst:165 +#: library/ctypes.rst:181 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" @@ -236,7 +256,7 @@ msgstr "" "Une :exc:`ValueError` est levée quand on appelle une fonction ``stdcall`` " "avec la convention d'appel ``cdecl`` et vice-versa ::" -#: library/ctypes.rst:180 +#: library/ctypes.rst:196 msgid "" "To find out the correct calling convention you have to look into the C " "header file or the documentation for the function you want to call." @@ -244,9 +264,10 @@ msgstr "" "Pour déterminer la convention d'appel, il faut consulter l'en-tête C ou la " "documentation de la fonction à appeler." -#: library/ctypes.rst:183 +#: library/ctypes.rst:199 +#, fuzzy msgid "" -"On Windows, :mod:`ctypes` uses win32 structured exception handling to " +"On Windows, :mod:`!ctypes` uses win32 structured exception handling to " "prevent crashes from general protection faults when functions are called " "with invalid argument values::" msgstr "" @@ -256,303 +277,566 @@ msgstr "" "(*general protection faults*) du système, lorsque des fonctions sont " "appelées avec un nombre incorrect d'arguments ::" -#: library/ctypes.rst:193 +#: library/ctypes.rst:209 +#, fuzzy msgid "" -"There are, however, enough ways to crash Python with :mod:`ctypes`, so you " -"should be careful anyway. The :mod:`faulthandler` module can be helpful in " -"debugging crashes (e.g. from segmentation faults produced by erroneous C " -"library calls)." +"The :mod:`faulthandler` module can help debug crashes, such as segmentation " +"faults produced by erroneous C library calls." msgstr "" -"Cependant, il y a suffisamment de façons de faire planter Python avec :mod:" -"`ctypes`, donc il faut être prudent dans tous les cas. Le module :mod:" -"`faulthandler` est pratique pour déboguer les plantages (p. ex. dus à des " -"erreurs de segmentation produites par des appels erronés à la bibliothèque " -"C)." +"Cependant, il y a suffisamment de façons de faire planter Python " +"avec :mod:`ctypes`, donc il faut être prudent dans tous les cas. Le " +"module :mod:`faulthandler` est pratique pour déboguer les plantages (p. ex. " +"dus à des erreurs de segmentation produites par des appels erronés à la " +"bibliothèque C)." -#: library/ctypes.rst:198 +#: library/ctypes.rst:212 #, fuzzy msgid "" "``None``, integers, bytes objects and (unicode) strings are the only native " "Python objects that can directly be used as parameters in these function " "calls. ``None`` is passed as a C ``NULL`` pointer, bytes objects and strings " -"are passed as pointer to the memory block that contains their data (:c:expr:" -"`char *` or :c:expr:`wchar_t *`). Python integers are passed as the " -"platform's default C :c:expr:`int` type, their value is masked to fit into " -"the C type." +"are passed as pointer to the memory block that contains their data " +"(:c:expr:`char *` or :c:expr:`wchar_t *`). Python integers are passed as " +"the platform's default C :c:expr:`int` type, their value is masked to fit " +"into the C type." msgstr "" "``None``, les entiers, les objets octets et les chaînes de caractères " "(Unicode) sont les seuls types natifs de Python qui peuvent être directement " "passés en paramètres de ces appels de fonctions. ``None`` est passé comme le " "pointeur C ``NULL``, les objets octets et les chaînes de caractères sont " -"passés comme un pointeur sur le bloc mémoire qui contient la donnée (:c:type:" -"`char *` ou :c:type:`wchar_t *`). Les entiers Python sont passés comme le " -"type C :c:type:`int` par défaut de la plate-forme, un masque étant appliqué " -"pour qu'ils tiennent dans le type C." +"passés comme un pointeur sur le bloc mémoire qui contient la donnée " +"(:c:type:`char *` ou :c:type:`wchar_t *`). Les entiers Python sont passés " +"comme le type C :c:type:`int` par défaut de la plate-forme, un masque étant " +"appliqué pour qu'ils tiennent dans le type C." -#: library/ctypes.rst:205 +#: library/ctypes.rst:219 +#, fuzzy msgid "" "Before we move on calling functions with other parameter types, we have to " -"learn more about :mod:`ctypes` data types." +"learn more about :mod:`!ctypes` data types." msgstr "" "Avant de poursuivre sur l'appel de fonctions avec d'autres types de " -"paramètres, apprenons-en un peu plus sur les types de données de :mod:" -"`ctypes`." +"paramètres, apprenons-en un peu plus sur les types de données " +"de :mod:`ctypes`." -#: library/ctypes.rst:2213 +#: library/ctypes.rst:2553 msgid "Fundamental data types" msgstr "Types de données de base" -#: library/ctypes.rst:214 -msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" +#: library/ctypes.rst:228 +#, fuzzy +msgid ":mod:`!ctypes` defines a number of primitive C compatible data types:" msgstr "" ":mod:`ctypes` définit plusieurs types de donnée de base compatibles avec le " "C :" -#: library/ctypes.rst:217 +#: library/ctypes.rst:372 msgid "ctypes type" msgstr "Types de *ctypes*" -#: library/ctypes.rst:217 +#: library/ctypes.rst:373 msgid "C type" msgstr "Type C" -#: library/ctypes.rst:217 +#: library/ctypes.rst:374 msgid "Python type" msgstr "Type Python" -#: library/ctypes.rst:219 +#: library/ctypes.rst:375 +msgid ":py:attr:`~_SimpleCData._type_`" +msgstr "" + +#: library/ctypes.rst:237 msgid ":class:`c_bool`" msgstr ":class:`c_bool`" -#: library/ctypes.rst:219 +#: library/ctypes.rst:238 #, fuzzy msgid ":c:expr:`_Bool`" msgstr ":c:type:`_Bool`" -#: library/ctypes.rst:219 -msgid "bool (1)" -msgstr "*bool* (1)" +#: library/ctypes.rst:363 +#, fuzzy +msgid ":py:class:`bool`" +msgstr ":class:`c_bool`" + +#: library/ctypes.rst:240 +msgid "``'?'``" +msgstr "" -#: library/ctypes.rst:221 +#: library/ctypes.rst:241 msgid ":class:`c_char`" msgstr ":class:`c_char`" -#: library/ctypes.rst:225 +#: library/ctypes.rst:250 #, fuzzy msgid ":c:expr:`char`" msgstr ":c:type:`char`" -#: library/ctypes.rst:221 -msgid "1-character bytes object" +#: library/ctypes.rst:243 +#, fuzzy +msgid "1-character :py:class:`bytes`" msgstr "objet octet (*bytes*) de 1 caractère" -#: library/ctypes.rst:223 +#: library/ctypes.rst:244 +msgid "``'c'``" +msgstr "" + +#: library/ctypes.rst:245 msgid ":class:`c_wchar`" msgstr ":class:`c_wchar`" -#: library/ctypes.rst:223 +#: library/ctypes.rst:246 #, fuzzy msgid ":c:type:`wchar_t`" msgstr ":c:type:`wchar_t`" -#: library/ctypes.rst:223 -msgid "1-character string" +#: library/ctypes.rst:247 +#, fuzzy +msgid "1-character :py:class:`str`" msgstr "chaîne de caractères (*string*) de longueur 1" -#: library/ctypes.rst:225 +#: library/ctypes.rst:248 +msgid "``'u'``" +msgstr "" + +#: library/ctypes.rst:249 msgid ":class:`c_byte`" msgstr ":class:`c_byte`" -#: library/ctypes.rst:227 library/ctypes.rst:231 library/ctypes.rst:235 -#: library/ctypes.rst:239 library/ctypes.rst:243 library/ctypes.rst:248 -#: library/ctypes.rst:251 -msgid "int" -msgstr "*int*" +#: library/ctypes.rst:255 library/ctypes.rst:263 library/ctypes.rst:271 +#: library/ctypes.rst:279 library/ctypes.rst:287 library/ctypes.rst:295 +#: library/ctypes.rst:303 library/ctypes.rst:311 library/ctypes.rst:319 +#: library/ctypes.rst:327 library/ctypes.rst:331 +#, fuzzy +msgid ":py:class:`int`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:252 +msgid "``'b'``" +msgstr "" -#: library/ctypes.rst:227 +#: library/ctypes.rst:253 msgid ":class:`c_ubyte`" msgstr ":class:`c_ubyte`" -#: library/ctypes.rst:227 +#: library/ctypes.rst:254 #, fuzzy msgid ":c:expr:`unsigned char`" msgstr ":c:type:`unsigned char`" -#: library/ctypes.rst:229 +#: library/ctypes.rst:256 +msgid "``'B'``" +msgstr "" + +#: library/ctypes.rst:257 msgid ":class:`c_short`" msgstr ":class:`c_short`" -#: library/ctypes.rst:229 +#: library/ctypes.rst:258 #, fuzzy msgid ":c:expr:`short`" msgstr ":c:type:`short`" -#: library/ctypes.rst:231 +#: library/ctypes.rst:260 +msgid "``'h'``" +msgstr "" + +#: library/ctypes.rst:261 msgid ":class:`c_ushort`" msgstr ":class:`c_ushort`" -#: library/ctypes.rst:231 +#: library/ctypes.rst:262 #, fuzzy msgid ":c:expr:`unsigned short`" msgstr ":c:type:`unsigned short`" -#: library/ctypes.rst:233 +#: library/ctypes.rst:264 +msgid "``'H'``" +msgstr "" + +#: library/ctypes.rst:265 msgid ":class:`c_int`" msgstr ":class:`c_int`" -#: library/ctypes.rst:233 +#: library/ctypes.rst:266 #, fuzzy msgid ":c:expr:`int`" msgstr ":c:type:`int`" -#: library/ctypes.rst:235 +#: library/ctypes.rst:268 +msgid "``'i'`` \\*" +msgstr "" + +#: library/ctypes.rst:269 +#, fuzzy +msgid ":class:`c_int8`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:270 +#, fuzzy +msgid ":c:type:`int8_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:276 library/ctypes.rst:284 library/ctypes.rst:296 +#: library/ctypes.rst:304 library/ctypes.rst:328 library/ctypes.rst:332 +msgid "\\*" +msgstr "" + +#: library/ctypes.rst:273 +#, fuzzy +msgid ":class:`c_int16`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:274 +#, fuzzy +msgid ":c:type:`int16_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:277 +#, fuzzy +msgid ":class:`c_int32`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:278 +#, fuzzy +msgid ":c:type:`int32_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:281 +#, fuzzy +msgid ":class:`c_int64`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:282 +#, fuzzy +msgid ":c:type:`int64_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:285 msgid ":class:`c_uint`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:235 +#: library/ctypes.rst:286 #, fuzzy msgid ":c:expr:`unsigned int`" msgstr ":c:type:`unsigned int`" -#: library/ctypes.rst:237 +#: library/ctypes.rst:288 +msgid "``'I'`` \\*" +msgstr "" + +#: library/ctypes.rst:289 +#, fuzzy +msgid ":class:`c_uint8`" +msgstr ":class:`c_uint`" + +#: library/ctypes.rst:290 +#, fuzzy +msgid ":c:type:`uint8_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:293 +#, fuzzy +msgid ":class:`c_uint16`" +msgstr ":class:`c_uint`" + +#: library/ctypes.rst:294 +#, fuzzy +msgid ":c:type:`uint16_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:297 +#, fuzzy +msgid ":class:`c_uint32`" +msgstr ":class:`c_uint`" + +#: library/ctypes.rst:298 +#, fuzzy +msgid ":c:type:`uint32_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:301 +#, fuzzy +msgid ":class:`c_uint64`" +msgstr ":class:`c_uint`" + +#: library/ctypes.rst:302 +#, fuzzy +msgid ":c:type:`uint64_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:305 msgid ":class:`c_long`" msgstr ":class:`c_long`" -#: library/ctypes.rst:237 +#: library/ctypes.rst:306 #, fuzzy msgid ":c:expr:`long`" msgstr ":c:type:`long`" -#: library/ctypes.rst:239 +#: library/ctypes.rst:308 +msgid "``'l'``" +msgstr "" + +#: library/ctypes.rst:309 msgid ":class:`c_ulong`" msgstr ":class:`c_ulong`" -#: library/ctypes.rst:239 +#: library/ctypes.rst:310 #, fuzzy msgid ":c:expr:`unsigned long`" msgstr ":c:type:`unsigned long`" -#: library/ctypes.rst:241 +#: library/ctypes.rst:312 +msgid "``'L'``" +msgstr "" + +#: library/ctypes.rst:313 msgid ":class:`c_longlong`" msgstr ":class:`c_longlong`" -#: library/ctypes.rst:241 +#: library/ctypes.rst:314 #, fuzzy -msgid ":c:expr:`__int64` or :c:expr:`long long`" -msgstr ":c:type:`__int64` ou :c:type:`long long`" +msgid ":c:expr:`long long`" +msgstr ":c:type:`long`" -#: library/ctypes.rst:243 +#: library/ctypes.rst:316 +msgid "``'q'`` \\*" +msgstr "" + +#: library/ctypes.rst:317 msgid ":class:`c_ulonglong`" msgstr ":class:`c_ulonglong`" -#: library/ctypes.rst:243 +#: library/ctypes.rst:318 #, fuzzy -msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" -msgstr ":c:type:`unsigned __int64` ou :c:type:`unsigned long long`" +msgid ":c:expr:`unsigned long long`" +msgstr ":c:type:`unsigned long`" -#: library/ctypes.rst:246 +#: library/ctypes.rst:320 +msgid "``'Q'`` \\*" +msgstr "" + +#: library/ctypes.rst:321 msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" -#: library/ctypes.rst:246 +#: library/ctypes.rst:322 #, fuzzy msgid ":c:type:`size_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:248 +#: library/ctypes.rst:325 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" -#: library/ctypes.rst:248 +#: library/ctypes.rst:326 #, fuzzy -msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" -msgstr ":c:type:`ssize_t` ou :c:type:`Py_ssize_t`" +msgid ":c:type:`Py_ssize_t`" +msgstr ":c:type:`size_t`" -#: library/ctypes.rst:251 +#: library/ctypes.rst:329 #, fuzzy msgid ":class:`c_time_t`" msgstr ":class:`c_size_t`" -#: library/ctypes.rst:251 +#: library/ctypes.rst:330 #, fuzzy msgid ":c:type:`time_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:253 +#: library/ctypes.rst:333 msgid ":class:`c_float`" msgstr ":class:`c_float`" -#: library/ctypes.rst:253 +#: library/ctypes.rst:334 #, fuzzy msgid ":c:expr:`float`" msgstr ":c:type:`float`" -#: library/ctypes.rst:255 library/ctypes.rst:257 -msgid "float" -msgstr "*float*" +#: library/ctypes.rst:339 library/ctypes.rst:343 +#, fuzzy +msgid ":py:class:`float`" +msgstr ":class:`c_float`" + +#: library/ctypes.rst:336 +msgid "``'f'``" +msgstr "" -#: library/ctypes.rst:255 +#: library/ctypes.rst:337 msgid ":class:`c_double`" msgstr ":class:`c_double`" -#: library/ctypes.rst:255 +#: library/ctypes.rst:338 #, fuzzy msgid ":c:expr:`double`" msgstr ":c:type:`double`" -#: library/ctypes.rst:257 +#: library/ctypes.rst:340 +msgid "``'d'``" +msgstr "" + +#: library/ctypes.rst:341 msgid ":class:`c_longdouble`" msgstr ":class:`c_longdouble`" -#: library/ctypes.rst:257 +#: library/ctypes.rst:342 #, fuzzy msgid ":c:expr:`long double`" msgstr ":c:type:`long double`" -#: library/ctypes.rst:259 +#: library/ctypes.rst:344 +msgid "``'g'`` \\*" +msgstr "" + +#: library/ctypes.rst:345 msgid ":class:`c_char_p`" msgstr ":class:`c_char_p`" -#: library/ctypes.rst:259 +#: library/ctypes.rst:346 #, fuzzy msgid ":c:expr:`char *` (NUL terminated)" msgstr ":c:type:`char *` (terminé par NUL)" -#: library/ctypes.rst:259 -msgid "bytes object or ``None``" +#: library/ctypes.rst:347 +#, fuzzy +msgid ":py:class:`bytes` or ``None``" msgstr "objet octet (*bytes*) ou ``None``" -#: library/ctypes.rst:261 +#: library/ctypes.rst:348 +msgid "``'z'``" +msgstr "" + +#: library/ctypes.rst:349 msgid ":class:`c_wchar_p`" msgstr ":class:`c_wchar_p`" -#: library/ctypes.rst:261 +#: library/ctypes.rst:350 #, fuzzy msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr ":c:type:`wchar_t *` (terminé par NUL)" -#: library/ctypes.rst:261 -msgid "string or ``None``" +#: library/ctypes.rst:351 +#, fuzzy +msgid ":py:class:`str` or ``None``" msgstr "chaîne de caractères (*string*) ou ``None``" -#: library/ctypes.rst:263 +#: library/ctypes.rst:352 +msgid "``'Z'``" +msgstr "" + +#: library/ctypes.rst:353 msgid ":class:`c_void_p`" msgstr ":class:`c_void_p`" -#: library/ctypes.rst:263 +#: library/ctypes.rst:354 #, fuzzy msgid ":c:expr:`void *`" msgstr ":c:type:`void *`" -#: library/ctypes.rst:263 -msgid "int or ``None``" +#: library/ctypes.rst:355 +#, fuzzy +msgid ":py:class:`int` or ``None``" msgstr "*int* ou ``None``" -#: library/ctypes.rst:267 -msgid "The constructor accepts any object with a truth value." -msgstr "Le constructeur accepte n'importe quel objet convertible en booléen." +#: library/ctypes.rst:356 +msgid "``'P'``" +msgstr "" -#: library/ctypes.rst:269 +#: library/ctypes.rst:357 +#, fuzzy +msgid ":class:`py_object`" +msgstr ":class:`c_double`" + +#: library/ctypes.rst:358 +#, fuzzy +msgid ":c:expr:`PyObject *`" +msgstr ":c:type:`int`" + +#: library/ctypes.rst:359 +#, fuzzy +msgid ":py:class:`object`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:360 +msgid "``'O'``" +msgstr "" + +#: library/ctypes.rst:361 +msgid ":ref:`VARIANT_BOOL `" +msgstr "" + +#: library/ctypes.rst:362 +#, fuzzy +msgid ":c:expr:`short int`" +msgstr ":c:type:`short`" + +#: library/ctypes.rst:364 +msgid "``'v'``" +msgstr "" + +#: library/ctypes.rst:366 +msgid "" +"Additionally, if IEC 60559 compatible complex arithmetic (Annex G) is " +"supported in both C and ``libffi``, the following complex types are " +"available:" +msgstr "" + +#: library/ctypes.rst:376 +#, fuzzy +msgid ":class:`c_float_complex`" +msgstr ":class:`c_float`" + +#: library/ctypes.rst:377 +#, fuzzy +msgid ":c:expr:`float complex`" +msgstr ":c:type:`float`" + +#: library/ctypes.rst:382 library/ctypes.rst:386 +#, fuzzy +msgid ":py:class:`complex`" +msgstr ":class:`c_float`" + +#: library/ctypes.rst:379 +msgid "``'Zf'``" +msgstr "" + +#: library/ctypes.rst:380 +#, fuzzy +msgid ":class:`c_double_complex`" +msgstr ":class:`c_double`" + +#: library/ctypes.rst:381 +#, fuzzy +msgid ":c:expr:`double complex`" +msgstr ":c:type:`double`" + +#: library/ctypes.rst:383 +msgid "``'Zd'``" +msgstr "" + +#: library/ctypes.rst:384 +#, fuzzy +msgid ":class:`c_longdouble_complex`" +msgstr ":class:`c_longdouble`" + +#: library/ctypes.rst:385 +#, fuzzy +msgid ":c:expr:`long double complex`" +msgstr ":c:type:`long double`" + +#: library/ctypes.rst:387 +msgid "``'Zg'``" +msgstr "" + +#: library/ctypes.rst:389 +msgid "" +"The :py:attr:`~_SimpleCData._type_` types ``F``, ``D`` and ``G`` have been " +"replaced with ``Zf``, ``Zd`` and ``Zg``." +msgstr "" + +#: library/ctypes.rst:394 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" @@ -560,42 +844,53 @@ msgstr "" "Il est possible de créer chacun de ces types en les appelant avec une valeur " "d'initialisation du bon type et avec une valeur cohérente ::" -#: library/ctypes.rst:280 +#: library/ctypes.rst:405 +msgid "" +"The constructors for numeric types will convert input " +"using :py:meth:`~object.__bool__`, :py:meth:`~object.__index__` (for " +"``int``), :py:meth:`~object.__float__` or :py:meth:`~object.__complex__`. " +"This means :py:class:`~ctypes.c_bool` accepts any object with a truth value::" +msgstr "" + +#: library/ctypes.rst:415 msgid "" "Since these types are mutable, their value can also be changed afterwards::" msgstr "" "Ces types étant des mutables, leur valeur peut aussi être modifiée après " "coup ::" -#: library/ctypes.rst:292 +#: library/ctypes.rst:427 +#, fuzzy msgid "" -"Assigning a new value to instances of the pointer types :class:`c_char_p`, :" -"class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they " -"point to, *not the contents* of the memory block (of course not, because " -"Python bytes objects are immutable)::" +"Assigning a new value to instances of the pointer " +"types :class:`c_char_p`, :class:`c_wchar_p`, and :class:`c_void_p` changes " +"the *memory location* they point to, *not the contents* of the memory block " +"(of course not, because Python string objects are immutable)::" msgstr "" -"Affecter une nouvelle valeur à une instance de type pointeur — :class:" -"`c_char_p`, :class:`c_wchar_p` et :class:`c_void_p` — change *la zone " -"mémoire* sur laquelle elle pointe, et non *le contenu* de ce bloc mémoire " -"(c'est logique parce que les objets octets sont immuables en Python) ::" +"Affecter une nouvelle valeur à une instance de type pointeur " +"— :class:`c_char_p`, :class:`c_wchar_p` et :class:`c_void_p` — change *la " +"zone mémoire* sur laquelle elle pointe, et non *le contenu* de ce bloc " +"mémoire (c'est logique parce que les objets octets sont immuables en " +"Python) ::" -#: library/ctypes.rst:312 +#: library/ctypes.rst:447 msgid "" "You should be careful, however, not to pass them to functions expecting " -"pointers to mutable memory. If you need mutable memory blocks, ctypes has a :" -"func:`create_string_buffer` function which creates these in various ways. " -"The current memory block contents can be accessed (or changed) with the " -"``raw`` property; if you want to access it as NUL terminated string, use the " -"``value`` property::" +"pointers to mutable memory. If you need mutable memory blocks, ctypes has " +"a :func:`create_string_buffer` function which creates these in various " +"ways. The current memory block contents can be accessed (or changed) with " +"the ``raw`` property; if you want to access it as NUL terminated string, use " +"the ``value`` property::" msgstr "" "Cependant, prenez garde à ne pas en passer à des fonctions qui prennent en " "paramètre des pointeurs sur de la mémoire modifiable. S'il vous faut de la " -"mémoire modifiable, *ctypes* fournit la fonction :func:" -"`create_string_buffer` qui en crée de plusieurs façons. L'attribut ``raw`` " -"permet d'accéder à (ou de modifier) un bloc mémoire ; l'attribut ``value`` " -"permet d'y accéder comme à une chaîne de caractères terminée par NUL ::" +"mémoire modifiable, *ctypes* fournit la " +"fonction :func:`create_string_buffer` qui en crée de plusieurs façons. " +"L'attribut ``raw`` permet d'accéder à (ou de modifier) un bloc mémoire ; " +"l'attribut ``value`` permet d'y accéder comme à une chaîne de caractères " +"terminée par NUL ::" -#: library/ctypes.rst:336 +#: library/ctypes.rst:471 #, fuzzy msgid "" "The :func:`create_string_buffer` function replaces the old :func:`!c_buffer` " @@ -603,30 +898,31 @@ msgid "" "block containing unicode characters of the C type :c:type:`wchar_t`, use " "the :func:`create_unicode_buffer` function." msgstr "" -"La fonction :func:`create_string_buffer` remplace les fonctions :func:" -"`c_buffer` (qui en reste un alias) et :func:`c_string` des versions " -"antérieures de *ctypes*. La fonction :func:`create_unicode_buffer` crée un " -"bloc mémoire modifiable contenant des caractères Unicode du type C :c:type:" -"`wchar_t`." +"La fonction :func:`create_string_buffer` remplace les " +"fonctions :func:`c_buffer` (qui en reste un alias) et :func:`c_string` des " +"versions antérieures de *ctypes*. La fonction :func:`create_unicode_buffer` " +"crée un bloc mémoire modifiable contenant des caractères Unicode du type " +"C :c:type:`wchar_t`." -#: library/ctypes.rst:345 +#: library/ctypes.rst:480 msgid "Calling functions, continued" msgstr "Appel de fonctions, suite" -#: library/ctypes.rst:347 +#: library/ctypes.rst:482 msgid "" -"Note that printf prints to the real standard output channel, *not* to :data:" -"`sys.stdout`, so these examples will only work at the console prompt, not " -"from within *IDLE* or *PythonWin*::" +"Note that printf prints to the real standard output channel, *not* " +"to :data:`sys.stdout`, so these examples will only work at the console " +"prompt, not from within *IDLE* or *PythonWin*::" msgstr "" "*printf* utilise la vraie sortie standard, et non :data:`sys.stdout` ; les " "exemples suivants ne fonctionnent donc que dans une invite de commande et " "non depuis *IDLE* or *PythonWin* ::" -#: library/ctypes.rst:367 +#: library/ctypes.rst:502 +#, fuzzy msgid "" "As has been mentioned before, all Python types except integers, strings, and " -"bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " +"bytes objects have to be wrapped in their corresponding :mod:`!ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" "Comme mentionné plus haut, tous les types Python (les entiers, les chaînes " @@ -634,12 +930,12 @@ msgstr "" "leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " "type C requis ::" -#: library/ctypes.rst:379 +#: library/ctypes.rst:514 #, fuzzy msgid "Calling variadic functions" msgstr "Appel de fonctions" -#: library/ctypes.rst:381 +#: library/ctypes.rst:516 msgid "" "On a lot of platforms calling variadic functions through ctypes is exactly " "the same as calling functions with a fixed number of parameters. On some " @@ -648,53 +944,54 @@ msgid "" "functions." msgstr "" -#: library/ctypes.rst:386 +#: library/ctypes.rst:521 msgid "" "On those platforms it is required to specify the :attr:`~_CFuncPtr.argtypes` " "attribute for the regular, non-variadic, function arguments:" msgstr "" -#: library/ctypes.rst:393 +#: library/ctypes.rst:528 msgid "" "Because specifying the attribute does not inhibit portability it is advised " "to always specify :attr:`~_CFuncPtr.argtypes` for all variadic functions." msgstr "" -#: library/ctypes.rst:400 +#: library/ctypes.rst:535 msgid "Calling functions with your own custom data types" msgstr "Appel de fonctions avec des types de données personnalisés" -#: library/ctypes.rst:402 +#: library/ctypes.rst:537 #, fuzzy msgid "" -"You can also customize :mod:`ctypes` argument conversion to allow instances " -"of your own classes be used as function arguments. :mod:`ctypes` looks for " +"You can also customize :mod:`!ctypes` argument conversion to allow instances " +"of your own classes be used as function arguments. :mod:`!ctypes` looks for " "an :attr:`!_as_parameter_` attribute and uses this as the function argument. " -"The attribute must be an integer, string, bytes, a :mod:`ctypes` instance, " +"The attribute must be an integer, string, bytes, a :mod:`!ctypes` instance, " "or an object with an :attr:`!_as_parameter_` attribute::" msgstr "" -"Il est possible de personnaliser la conversion des arguments effectuée par :" -"mod:`ctypes` pour permettre de passer en argument des instances de vos " +"Il est possible de personnaliser la conversion des arguments effectuée " +"par :mod:`ctypes` pour permettre de passer en argument des instances de vos " "propres classes. :mod:`ctypes` recherche un attribut :attr:`_as_parameter_` " "et le prend comme argument à la fonction. Bien entendu, cet attribut doit " "être un entier, une chaîne de caractères ou des octets ::" -#: library/ctypes.rst:418 +#: library/ctypes.rst:553 #, fuzzy msgid "" "If you don't want to store the instance's data in the :attr:`!" "_as_parameter_` instance variable, you could define a :class:`property` " "which makes the attribute available on request." msgstr "" -"Si vous ne souhaitez pas stocker les données de l'instance dans la variable :" -"attr:`_as_parameter_` de l'instance, vous pouvez toujours définir une :class:" -"`propriété ` qui rend cet attribut disponible sur demande." +"Si vous ne souhaitez pas stocker les données de l'instance dans la " +"variable :attr:`_as_parameter_` de l'instance, vous pouvez toujours définir " +"une :class:`propriété ` qui rend cet attribut disponible sur " +"demande." -#: library/ctypes.rst:426 +#: library/ctypes.rst:561 msgid "Specifying the required argument types (function prototypes)" msgstr "Définition du type des arguments nécessaires (prototypes de fonction)" -#: library/ctypes.rst:428 +#: library/ctypes.rst:563 #, fuzzy msgid "" "It is possible to specify the required argument types of functions exported " @@ -703,7 +1000,7 @@ msgstr "" "Il est possible de définir le type des arguments demandés par une fonction " "exportée depuis une DLL en définissant son attribut :attr:`argtypes`." -#: library/ctypes.rst:431 +#: library/ctypes.rst:566 #, fuzzy msgid "" ":attr:`~_CFuncPtr.argtypes` must be a sequence of C data types (the :func:`!" @@ -718,7 +1015,7 @@ msgstr "" "selon la chaîne de formatage ; cela dit, elle se révèle pratique pour tester " "cette fonctionnalité) ::" -#: library/ctypes.rst:442 +#: library/ctypes.rst:577 msgid "" "Specifying a format protects against incompatible argument types (just as a " "prototype for a C function), and tries to convert the arguments to valid " @@ -728,57 +1025,59 @@ msgstr "" "(comme le fait le prototype d'une fonction C) et tente de convertir les " "arguments en des types valides ::" -#: library/ctypes.rst:454 +#: library/ctypes.rst:589 #, fuzzy msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`~_CData.from_param` class method for them to be " -"able to use them in the :attr:`~_CFuncPtr.argtypes` sequence. The :meth:" -"`~_CData.from_param` class method receives the Python object passed to the " -"function call, it should do a typecheck or whatever is needed to make sure " -"this object is acceptable, and then return the object itself, its :attr:`!" -"_as_parameter_` attribute, or whatever you want to pass as the C function " -"argument in this case. Again, the result should be an integer, string, " -"bytes, a :mod:`ctypes` instance, or an object with an :attr:`!" +"able to use them in the :attr:`~_CFuncPtr.argtypes` sequence. " +"The :meth:`~_CData.from_param` class method receives the Python object " +"passed to the function call, it should do a typecheck or whatever is needed " +"to make sure this object is acceptable, and then return the object itself, " +"its :attr:`!_as_parameter_` attribute, or whatever you want to pass as the C " +"function argument in this case. Again, the result should be an integer, " +"string, bytes, a :mod:`!ctypes` instance, or an object with an :attr:`!" "_as_parameter_` attribute." msgstr "" -"Pour appeler une fonction avec votre propre classe définie dans la séquence :" -"attr:`argtypes`, il est nécessaire d'implémenter une méthode de classe :meth:" -"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet " -"Python passé à la fonction et doit faire une vérification de type ou tout ce " -"qui est nécessaire pour s'assurer que l'objet est valide, puis renvoie " -"l'objet lui-même, son attribut :attr:`_as_parameter_`, ou tout ce que vous " -"voulez passer comme argument fonction C dans ce cas. Encore une fois, il " -"convient que le résultat soit un entier, une chaîne, des octets, une " -"instance :mod:`ctypes` ou un objet avec un attribut :attr:`_as_parameter_`." - -#: library/ctypes.rst:468 +"Pour appeler une fonction avec votre propre classe définie dans la " +"séquence :attr:`argtypes`, il est nécessaire d'implémenter une méthode de " +"classe :meth:`from_param`. La méthode de classe :meth:`from_param` récupère " +"l'objet Python passé à la fonction et doit faire une vérification de type ou " +"tout ce qui est nécessaire pour s'assurer que l'objet est valide, puis " +"renvoie l'objet lui-même, son attribut :attr:`_as_parameter_`, ou tout ce " +"que vous voulez passer comme argument fonction C dans ce cas. Encore une " +"fois, il convient que le résultat soit un entier, une chaîne, des octets, " +"une instance :mod:`ctypes` ou un objet avec un " +"attribut :attr:`_as_parameter_`." + +#: library/ctypes.rst:603 msgid "Return types" msgstr "Types de sortie" -#: library/ctypes.rst:478 +#: library/ctypes.rst:613 #, fuzzy msgid "" "By default functions are assumed to return the C :c:expr:`int` type. Other " "return types can be specified by setting the :attr:`~_CFuncPtr.restype` " "attribute of the function object." msgstr "" -"Le module suppose que toutes les fonctions renvoient par défaut un :c:type:" -"`int` C. Pour préciser un autre type de sortie, il faut définir l'attribut :" -"attr:`restype` de l'objet encapsulant la fonction." +"Le module suppose que toutes les fonctions renvoient par défaut " +"un :c:type:`int` C. Pour préciser un autre type de sortie, il faut définir " +"l'attribut :attr:`restype` de l'objet encapsulant la fonction." -#: library/ctypes.rst:482 +#: library/ctypes.rst:617 msgid "" -"The C prototype of :c:func:`time` is ``time_t time(time_t *)``. Because :c:" -"type:`time_t` might be of a different type than the default return type :c:" -"expr:`int`, you should specify the :attr:`!restype` attribute::" +"The C prototype of :c:func:`time` is ``time_t time(time_t *)``. " +"Because :c:type:`time_t` might be of a different type than the default " +"return type :c:expr:`int`, you should specify the :attr:`!restype` " +"attribute::" msgstr "" -#: library/ctypes.rst:488 +#: library/ctypes.rst:623 msgid "The argument types can be specified using :attr:`~_CFuncPtr.argtypes`::" msgstr "" -#: library/ctypes.rst:492 +#: library/ctypes.rst:627 #, fuzzy msgid "" "To call the function with a ``NULL`` pointer as first argument, use " @@ -787,7 +1086,7 @@ msgstr "" "Cet exemple appelle les deux fonctions avec un pointeur ``NULL`` (on utilise " "``None`` pour passer un pointeur ``NULL``) ::" -#: library/ctypes.rst:497 +#: library/ctypes.rst:632 #, fuzzy msgid "" "Here is a more advanced example, it uses the :func:`!strchr` function, which " @@ -797,7 +1096,7 @@ msgstr "" "prend en paramètres un pointeur vers une chaîne et un caractère. Elle " "renvoie un pointeur sur une chaîne de caractères ::" -#: library/ctypes.rst:510 +#: library/ctypes.rst:645 #, fuzzy msgid "" "If you want to avoid the :func:`ord(\"x\") ` calls above, you can set " @@ -808,7 +1107,7 @@ msgstr "" "l'attribut :attr:`argtypes` ; le second argument, un objet octet à un seul " "caractère, sera automatiquement converti en un caractère C ::" -#: library/ctypes.rst:529 +#: library/ctypes.rst:664 #, fuzzy msgid "" "You can also use a callable Python object (a function or a class for " @@ -825,7 +1124,7 @@ msgstr "" "pratique pour vérifier les codes d'erreurs des valeurs de retour et lever " "automatiquement des exceptions ::" -#: library/ctypes.rst:552 +#: library/ctypes.rst:687 msgid "" "``WinError`` is a function which will call Windows ``FormatMessage()`` api " "to get the string representation of an error code, and *returns* an " @@ -835,10 +1134,10 @@ msgstr "" "``WinError`` appelle l'API Windows ``FormatMessage()`` pour obtenir une " "représentation de la chaîne de caractères qui correspond au code d'erreur, " "et *renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " -"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" -"`GetLastError` pour le récupérer." +"code d'erreur. Si celui-ci n'est pas passé, elle " +"appelle :func:`GetLastError` pour le récupérer." -#: library/ctypes.rst:557 +#: library/ctypes.rst:692 #, fuzzy msgid "" "Please note that a much more powerful error checking mechanism is available " @@ -849,11 +1148,11 @@ msgstr "" "efficacement les erreurs ; référez-vous au manuel de référence pour plus de " "précisions." -#: library/ctypes.rst:565 +#: library/ctypes.rst:700 msgid "Passing pointers (or: passing parameters by reference)" msgstr "Passage de pointeurs (passage de paramètres par référence)" -#: library/ctypes.rst:567 +#: library/ctypes.rst:702 msgid "" "Sometimes a C api function expects a *pointer* to a data type as parameter, " "probably to write into the corresponding location, or if the data is too " @@ -865,13 +1164,14 @@ msgstr "" "correspondant ou si la donnée est trop grande pour pouvoir être passée par " "valeur. Ce mécanisme est appelé *passage de paramètres par référence*." -#: library/ctypes.rst:571 +#: library/ctypes.rst:706 +#, fuzzy msgid "" -":mod:`ctypes` exports the :func:`byref` function which is used to pass " -"parameters by reference. The same effect can be achieved with the :func:" -"`pointer` function, although :func:`pointer` does a lot more work since it " -"constructs a real pointer object, so it is faster to use :func:`byref` if " -"you don't need the pointer object in Python itself::" +":mod:`!ctypes` exports the :func:`byref` function which is used to pass " +"parameters by reference. The same effect can be achieved with " +"the :func:`pointer` function, although :func:`pointer` does a lot more work " +"since it constructs a real pointer object, so it is faster to " +"use :func:`byref` if you don't need the pointer object in Python itself::" msgstr "" ":mod:`ctypes` contient la fonction :func:`byref` qui permet de passer des " "paramètres par référence. La fonction :func:`pointer` a la même utilité, " @@ -879,34 +1179,35 @@ msgstr "" "pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " "Python, utiliser :func:`byref` est plus performant ::" -#: library/ctypes.rst:593 +#: library/ctypes.rst:728 msgid "Structures and unions" msgstr "Structures et unions" -#: library/ctypes.rst:595 +#: library/ctypes.rst:730 #, fuzzy msgid "" -"Structures and unions must derive from the :class:`Structure` and :class:" -"`Union` base classes which are defined in the :mod:`ctypes` module. Each " -"subclass must define a :attr:`~Structure._fields_` attribute. :attr:`!" -"_fields_` must be a list of *2-tuples*, containing a *field name* and a " -"*field type*." +"Structures and unions must derive from the :class:`Structure` " +"and :class:`Union` base classes which are defined in the :mod:`!ctypes` " +"module. Each subclass must define a :attr:`~Structure._fields_` " +"attribute. :attr:`!_fields_` must be a list of *2-tuples*, containing a " +"*field name* and a *field type*." msgstr "" -"Les structures et les unions doivent hériter des classes de base :class:" -"`Structure` et :class:`Union` définies dans le module :mod:`ctypes`. Chaque " -"sous-classe doit définir un attribut :attr:`_fields_`. :attr:`_fields_` doit " -"être une liste de *paires*, contenant un *nom de champ* et un *type de " -"champ*." +"Les structures et les unions doivent hériter des classes de " +"base :class:`Structure` et :class:`Union` définies dans le " +"module :mod:`ctypes`. Chaque sous-classe doit définir un " +"attribut :attr:`_fields_`. :attr:`_fields_` doit être une liste de *paires*, " +"contenant un *nom de champ* et un *type de champ*." -#: library/ctypes.rst:600 +#: library/ctypes.rst:735 +#, fuzzy msgid "" -"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " -"other derived :mod:`ctypes` type: structure, union, array, pointer." +"The field type must be a :mod:`!ctypes` type like :class:`c_int`, or any " +"other derived :mod:`!ctypes` type: structure, union, array, pointer." msgstr "" "Le type de champ doit être un type :mod:`ctypes` comme :class:`c_int` ou un " "type :mod:`ctypes` dérivé : structure, union, tableau ou pointeur." -#: library/ctypes.rst:603 +#: library/ctypes.rst:738 msgid "" "Here is a simple example of a POINT structure, which contains two integers " "named *x* and *y*, and also shows how to initialize a structure in the " @@ -916,7 +1217,7 @@ msgstr "" "et *y* et qui montre également comment instancier une structure avec le " "constructeur ::" -#: library/ctypes.rst:623 +#: library/ctypes.rst:758 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." @@ -925,7 +1226,7 @@ msgstr "" "structure peut elle-même contenir d'autres structures en prenant une " "structure comme type de champ." -#: library/ctypes.rst:626 +#: library/ctypes.rst:761 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" @@ -933,7 +1234,7 @@ msgstr "" "Voici une structure RECT qui contient deux POINTs *upperleft* et " "*lowerright* ::" -#: library/ctypes.rst:640 +#: library/ctypes.rst:775 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" @@ -941,18 +1242,21 @@ msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" -#: library/ctypes.rst:645 +#: library/ctypes.rst:780 +#, fuzzy msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " -"useful for debugging because they can provide useful information::" +"useful for debugging because they can provide useful information. " +"See :class:`CField`::" msgstr "" "Il est possible de récupérer les :term:`descripteurs ` des " "champs depuis la *classe*. Ils sont importants pour déboguer car ils " "contiennent des informations utiles ::" -#: library/ctypes.rst:659 +#: library/ctypes.rst:795 +#, fuzzy msgid "" -":mod:`ctypes` does not support passing unions or structures with bit-fields " +":mod:`!ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " "guaranteed by the library to work in the general case. Unions and " "structures with bit-fields should always be passed to functions by pointer." @@ -963,48 +1267,48 @@ msgstr "" "par la bibliothèque en général. Les unions et les structures avec des champs " "de bits doivent toujours être passées par pointeur." -#: library/ctypes.rst:665 -msgid "Structure/union alignment and byte order" +#: library/ctypes.rst:801 +#, fuzzy +msgid "Structure/union layout, alignment and byte order" msgstr "Alignement et boutisme des structures et des unions" -#: library/ctypes.rst:667 -#, fuzzy +#: library/ctypes.rst:803 +msgid "" +"By default, Structure and Union fields are laid out in the same way the C " +"compiler does it. It is possible to override this behavior entirely by " +"specifying a :attr:`~Structure._layout_` class attribute in the subclass " +"definition; see the attribute documentation for details." +msgstr "" + +#: library/ctypes.rst:808 msgid "" -"By default, Structure and Union fields are aligned in the same way the C " -"compiler does it. It is possible to override this behavior by specifying a :" -"attr:`~Structure._pack_` class attribute in the subclass definition. This " -"must be set to a positive integer and specifies the maximum alignment for " -"the fields. This is what ``#pragma pack(n)`` also does in MSVC. It is also " -"possible to set a minimum alignment for how the subclass itself is packed in " -"the same way ``#pragma align(n)`` works in MSVC. This can be achieved by " -"specifying a ::attr:`~Structure._align_` class attribute in the subclass " -"definition." +"It is possible to specify the maximum alignment for the fields and/or for " +"the structure itself by setting the class " +"attributes :attr:`~Structure._pack_` and/or :attr:`~Structure._align_`, " +"respectively. See the attribute documentation for details." msgstr "" -"Par défaut les champs d'une *Structure* ou d'une *Union* sont alignés de la " -"même manière que le ferait un compilateur C. Ce comportement peut être " -"redéfini en définissant l'attribut :attr:`_pack_` dans la définition de la " -"sous-classe. Ce champ doit être un entier positif et vaut l'alignement " -"maximal des champs. C'est ce que fait ``#pragma pack(n)`` pour MSVC." -#: library/ctypes.rst:677 +#: library/ctypes.rst:813 +#, fuzzy msgid "" -":mod:`ctypes` uses the native byte order for Structures and Unions. To " -"build structures with non-native byte order, you can use one of the :class:" -"`BigEndianStructure`, :class:`LittleEndianStructure`, :class:" -"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " -"classes cannot contain pointer fields." +":mod:`!ctypes` uses the native byte order for Structures and Unions. To " +"build structures with non-native byte order, you can use one of " +"the :class:`BigEndianStructure`, :class:`LittleEndianStructure`, :class:`BigEndianUnion`, " +"and :class:`LittleEndianUnion` base classes. These classes cannot contain " +"pointer fields." msgstr "" ":mod:`ctypes` suit le boutisme natif pour les *Structure* et les *Union*. " "Pour construire des structures avec un boutisme différent, utilisez les " -"classes de base :class:`BigEndianStructure`, :class:" -"`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" -"`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." +"classes de " +"base :class:`BigEndianStructure`, :class:`LittleEndianStructure`, :class:`BigEndianUnion` " +"ou :class:`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ " +"pointeur." -#: library/ctypes.rst:687 +#: library/ctypes.rst:823 msgid "Bit fields in structures and unions" msgstr "Champs de bits dans les structures et les unions" -#: library/ctypes.rst:689 +#: library/ctypes.rst:825 #, fuzzy msgid "" "It is possible to create structures and unions containing bit fields. Bit " @@ -1015,11 +1319,20 @@ msgstr "" "de bits. Seuls les entiers peuvent être des champs de bits, le nombre de " "bits est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" -#: library/ctypes.rst:707 +#: library/ctypes.rst:838 +msgid "" +"It is important to note that bit field allocation and layout in memory are " +"not defined as a C standard; their implementation is compiler-specific. By " +"default, Python will attempt to match the behavior of a \"native\" compiler " +"for the current platform. See the :attr:`~Structure._layout_` attribute for " +"details on the default behavior and how to change it." +msgstr "" + +#: library/ctypes.rst:849 msgid "Arrays" msgstr "Tableaux" -#: library/ctypes.rst:709 +#: library/ctypes.rst:851 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." @@ -1027,7 +1340,7 @@ msgstr "" "Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " "du même type." -#: library/ctypes.rst:711 +#: library/ctypes.rst:853 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" @@ -1035,7 +1348,7 @@ msgstr "" "La meilleure façon de créer des tableaux consiste à multiplier le type de " "donnée par un entier positif ::" -#: library/ctypes.rst:716 +#: library/ctypes.rst:858 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" @@ -1043,11 +1356,11 @@ msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" -#: library/ctypes.rst:732 +#: library/ctypes.rst:874 msgid "Instances are created in the usual way, by calling the class::" msgstr "Comme d'habitude, on crée les instances en appelant la classe ::" -#: library/ctypes.rst:738 +#: library/ctypes.rst:880 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." @@ -1055,23 +1368,24 @@ msgstr "" "Le code précédent affiche une suite de ``0 0`` car le contenu du tableau est " "initialisé avec des zéros." -#: library/ctypes.rst:741 +#: library/ctypes.rst:883 msgid "Initializers of the correct type can also be specified::" msgstr "Des valeurs d'initialisation du bon type peuvent être passées ::" -#: library/ctypes.rst:757 +#: library/ctypes.rst:899 msgid "Pointers" msgstr "Pointeurs" -#: library/ctypes.rst:759 +#: library/ctypes.rst:901 +#, fuzzy msgid "" -"Pointer instances are created by calling the :func:`pointer` function on a :" -"mod:`ctypes` type::" +"Pointer instances are created by calling the :func:`pointer` function on " +"a :mod:`!ctypes` type::" msgstr "" "On crée une instance de pointeur en appelant la fonction :func:`pointer` sur " "un type :mod:`ctypes` ::" -#: library/ctypes.rst:767 +#: library/ctypes.rst:909 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" @@ -1079,15 +1393,16 @@ msgstr "" "Les instances de pointeurs ont un attribut :attr:`~_Pointer.contents` qui " "renvoie l'objet pointé (l'objet ``i`` ci-dessus) ::" -#: library/ctypes.rst:774 +#: library/ctypes.rst:916 +#, fuzzy msgid "" -"Note that :mod:`ctypes` does not have OOR (original object return), it " +"Note that :mod:`!ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" "Attention, :mod:`ctypes` ne fait pas de ROI (retour de l'objet initial). Il " "crée un nouvel objet à chaque fois qu'on accède à un attribut ::" -#: library/ctypes.rst:783 +#: library/ctypes.rst:925 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " @@ -1097,15 +1412,15 @@ msgstr "" "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " "instance ::" -#: library/ctypes.rst:795 +#: library/ctypes.rst:937 msgid "Pointer instances can also be indexed with integers::" msgstr "Il est possible d'indexer les pointeurs par des entiers ::" -#: library/ctypes.rst:801 +#: library/ctypes.rst:943 msgid "Assigning to an integer index changes the pointed to value::" msgstr "Affecter à travers un indice change la valeur pointée ::" -#: library/ctypes.rst:810 +#: library/ctypes.rst:952 msgid "" "It is also possible to use indexes different from 0, but you must know what " "you're doing, just as in C: You can access or change arbitrary memory " @@ -1119,11 +1434,12 @@ msgstr "" "renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " "tableau et non sur un seul élément." -#: library/ctypes.rst:816 +#: library/ctypes.rst:958 +#, fuzzy msgid "" "Behind the scenes, the :func:`pointer` function does more than simply create " "pointer instances, it has to create pointer *types* first. This is done with " -"the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and " +"the :func:`POINTER` function, which accepts any :mod:`!ctypes` type, and " "returns a new type::" msgstr "" "Sous le capot, la fonction :func:`pointer` fait plus que simplement créer " @@ -1131,7 +1447,7 @@ msgstr "" "sur… ». Cela s'effectue avec la fonction :func:`POINTER`, qui prend en " "paramètre n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" -#: library/ctypes.rst:832 +#: library/ctypes.rst:974 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" @@ -1139,20 +1455,41 @@ msgstr "" "Appeler le pointeur sur type sans arguments crée un pointeur ``NULL``. Les " "pointeurs ``NULL`` s'évaluent à ``False`` ::" -#: library/ctypes.rst:840 +#: library/ctypes.rst:982 +#, fuzzy msgid "" -":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " +":mod:`!ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" ":mod:`ctypes` vérifie que le pointeur n'est pas ``NULL`` quand il en " "déréférence un (mais déréférencer des pointeurs non ``NULL`` invalides fait " "planter Python) ::" -#: library/ctypes.rst:859 +#: library/ctypes.rst:1000 +msgid "Thread safety without the GIL" +msgstr "" + +#: library/ctypes.rst:1002 +msgid "" +"From Python 3.13 onward, the :term:`GIL` can be disabled on the :term:`free-" +"threaded build`. In ctypes, reads and writes to a single object concurrently " +"is safe, but not across multiple objects:" +msgstr "" + +#: library/ctypes.rst:1011 +msgid "" +"In the above, it's only safe for one object to read and write to the address " +"at once if the GIL is disabled. So, ``pointer_a`` can be shared and written " +"to across multiple threads, but only if ``pointer_b`` is not also attempting " +"to do the same. If this is an issue, consider using " +"a :class:`threading.Lock` to synchronize access to memory:" +msgstr "" + +#: library/ctypes.rst:1031 msgid "Type conversions" msgstr "Conversions de type" -#: library/ctypes.rst:861 +#: library/ctypes.rst:1033 #, fuzzy msgid "" "Usually, ctypes does strict type checking. This means, if you have " @@ -1172,7 +1509,7 @@ msgstr "" "place de pointeurs, s'ils sont compatibles. Dans le cas de " "``POINTER(c_int)``, *ctypes* accepte des tableaux de *c_int* ::" -#: library/ctypes.rst:882 +#: library/ctypes.rst:1054 #, fuzzy msgid "" "In addition, if a function argument is explicitly declared to be a pointer " @@ -1184,19 +1521,20 @@ msgstr "" "De plus, si un paramètre de fonction est déclaré explicitement de type " "pointeur (comme ``POINTER(c_int)``) dans les :attr:`argtypes`, il est aussi " "possible de passer un objet du type pointé — ici, ``c_int`` — à la fonction. " -"*ctypes* appelle alors automatiquement la fonction de conversion :func:" -"`byref`." +"*ctypes* appelle alors automatiquement la fonction de " +"conversion :func:`byref`." -#: library/ctypes.rst:887 +#: library/ctypes.rst:1059 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" "Pour mettre un champ de type *POINTER* à ``NULL``, il faut lui affecter " "``None`` ::" -#: library/ctypes.rst:894 +#: library/ctypes.rst:1066 +#, fuzzy msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " -"type into another type. :mod:`ctypes` provides a :func:`cast` function " +"type into another type. :mod:`!ctypes` provides a :func:`cast` function " "which can be used in the same way. The ``Bar`` structure defined above " "accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its " "``values`` field, but not instances of other types::" @@ -1204,15 +1542,15 @@ msgstr "" "Parfois il faut gérer des incompatibilités entre les types. En C, il est " "possible de convertir un type en un autre. :mod:`ctypes` fournit la " "fonction :func:`cast` qui permet la même chose. La structure ``Bar`` ci-" -"dessus accepte des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:" -"`c_int` comme valeur pour le champ ``values``, mais pas des instances " -"d'autres types ::" +"dessus accepte des pointeurs ``POINTER(c_int)`` ou des tableaux " +"de :class:`c_int` comme valeur pour le champ ``values``, mais pas des " +"instances d'autres types ::" -#: library/ctypes.rst:906 +#: library/ctypes.rst:1078 msgid "For these cases, the :func:`cast` function is handy." msgstr "C'est là que la fonction :func:`cast` intervient." -#: library/ctypes.rst:908 +#: library/ctypes.rst:1080 msgid "" "The :func:`cast` function can be used to cast a ctypes instance into a " "pointer to a different ctypes data type. :func:`cast` takes two parameters, " @@ -1227,7 +1565,7 @@ msgstr "" "du second argument, qui pointe sur le même bloc mémoire que le premier " "argument ::" -#: library/ctypes.rst:919 +#: library/ctypes.rst:1091 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" @@ -1235,11 +1573,11 @@ msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" -#: library/ctypes.rst:932 +#: library/ctypes.rst:1104 msgid "Incomplete Types" msgstr "Types incomplets" -#: library/ctypes.rst:934 +#: library/ctypes.rst:1106 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " @@ -1249,26 +1587,26 @@ msgstr "" "membres ne sont pas encore définis. C'est l'équivalent d'une déclaration " "avancée en C, où la définition est fournie plus tard ::" -#: library/ctypes.rst:945 +#: library/ctypes.rst:1117 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" "Une traduction naïve, mais invalide, en code *ctypes* ressemblerait à ça ::" -#: library/ctypes.rst:958 +#: library/ctypes.rst:1130 #, fuzzy msgid "" "because the new ``class cell`` is not available in the class statement " -"itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" -"`~Structure._fields_` attribute later, after the class statement::" +"itself. In :mod:`!ctypes`, we can define the ``cell`` class and set " +"the :attr:`~Structure._fields_` attribute later, after the class statement::" msgstr "" "Cela ne fonctionne pas parce que la nouvelle ``class cell`` n'est pas " -"accessible dans la définition de la classe elle-même. Dans le module :mod:" -"`ctypes`, on définit la classe ``cell`` et on définira les :attr:`_fields_` " -"plus tard, après avoir défini la classe ::" +"accessible dans la définition de la classe elle-même. Dans le " +"module :mod:`ctypes`, on définit la classe ``cell`` et on définira " +"les :attr:`_fields_` plus tard, après avoir défini la classe ::" -#: library/ctypes.rst:970 +#: library/ctypes.rst:1142 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" @@ -1277,19 +1615,20 @@ msgstr "" "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " "pointeurs ::" -#: library/ctypes.rst:991 +#: library/ctypes.rst:1163 msgid "Callback functions" msgstr "Fonctions de rappel" -#: library/ctypes.rst:993 +#: library/ctypes.rst:1165 +#, fuzzy msgid "" -":mod:`ctypes` allows creating C callable function pointers from Python " +":mod:`!ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" ":mod:`ctypes` permet de créer des pointeurs de fonctions appelables par des " "appelables Python. On les appelle parfois *fonctions de rappel*." -#: library/ctypes.rst:996 +#: library/ctypes.rst:1168 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " @@ -1299,7 +1638,7 @@ msgstr "" "connaît la convention d'appel, le type de retour ainsi que le nombre et le " "type de paramètres que la fonction accepte." -#: library/ctypes.rst:1000 +#: library/ctypes.rst:1172 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1307,11 +1646,11 @@ msgid "" "calling convention." msgstr "" "La fabrique :func:`CFUNCTYPE` crée un type pour les fonctions de rappel qui " -"suivent la convention d'appel ``cdecl``. En Windows, c'est la fabrique :func:" -"`WINFUNCTYPE` qui crée un type pour les fonctions de rappel qui suivent la " -"convention d'appel ``stdcall``." +"suivent la convention d'appel ``cdecl``. En Windows, c'est la " +"fabrique :func:`WINFUNCTYPE` qui crée un type pour les fonctions de rappel " +"qui suivent la convention d'appel ``stdcall``." -#: library/ctypes.rst:1005 +#: library/ctypes.rst:1177 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " @@ -1320,7 +1659,7 @@ msgstr "" "Le premier paramètre de ces deux fonctions est le type de retour, et les " "suivants sont les types des arguments qu'attend la fonction de rappel." -#: library/ctypes.rst:1009 +#: library/ctypes.rst:1181 #, fuzzy msgid "" "I will present an example here which uses the standard C library's :c:func:`!" @@ -1332,7 +1671,7 @@ msgstr "" "l'emploi d'une fonction de rappel. Nous allons utiliser :c:func:`qsort` pour " "ordonner un tableau d'entiers ::" -#: library/ctypes.rst:1019 +#: library/ctypes.rst:1191 #, fuzzy msgid "" ":func:`!qsort` must be called with a pointer to the data to sort, the number " @@ -1349,7 +1688,7 @@ msgstr "" "négatif si le premier élément est plus petit que le second, zéro s'ils sont " "égaux et un entier positif sinon." -#: library/ctypes.rst:1025 +#: library/ctypes.rst:1197 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" @@ -1357,7 +1696,7 @@ msgstr "" "Ainsi notre fonction de rappel reçoit des pointeurs vers des entiers et doit " "renvoyer un entier. Créons d'abord le ``type`` pour la fonction de rappel ::" -#: library/ctypes.rst:1031 +#: library/ctypes.rst:1203 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" @@ -1365,22 +1704,22 @@ msgstr "" "Pour commencer, voici une fonction de rappel simple qui affiche les valeurs " "qu'on lui passe ::" -#: library/ctypes.rst:1041 +#: library/ctypes.rst:1213 msgid "The result::" msgstr "Résultat ::" -#: library/ctypes.rst:1051 +#: library/ctypes.rst:1223 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" "À présent, comparons pour de vrai les deux entiers et renvoyons un résultat " "utile ::" -#: library/ctypes.rst:1066 +#: library/ctypes.rst:1238 msgid "As we can easily check, our array is sorted now::" msgstr "" "Et comme il est facile de le voir, notre tableau est désormais classé ::" -#: library/ctypes.rst:1073 +#: library/ctypes.rst:1245 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" @@ -1388,10 +1727,11 @@ msgstr "" "Ces fonctions peuvent aussi être utilisées comme des décorateurs ; il est " "donc possible d'écrire ::" -#: library/ctypes.rst:1091 +#: library/ctypes.rst:1263 +#, fuzzy msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " -"are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " +"are used from C code. :mod:`!ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" "Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` " @@ -1399,7 +1739,7 @@ msgstr "" "tout seul et, si vous ne le faites pas, le ramasse-miette pourrait les " "libérer, ce qui fera planter votre programme quand un appel sera fait." -#: library/ctypes.rst:1095 +#: library/ctypes.rst:1267 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " @@ -1416,11 +1756,11 @@ msgstr "" "*pas* persistantes d'un appel à l'autre, même si les appels proviennent du " "même fil d'exécution C." -#: library/ctypes.rst:1105 +#: library/ctypes.rst:1277 msgid "Accessing values exported from dlls" msgstr "Accès aux variables exportées depuis une DLL" -#: library/ctypes.rst:1107 +#: library/ctypes.rst:1279 #, fuzzy msgid "" "Some shared libraries not only export functions, they also export variables. " @@ -1428,22 +1768,22 @@ msgid "" "runtime version number encoded in a single constant integer." msgstr "" "Certaines bibliothèques ne se contentent pas d'exporter des fonctions, elles " -"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :" -"c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" -"option:`-O` ou :option:`-OO` soit donnée au démarrage." +"exportent aussi des variables. Par exemple, la bibliothèque Python " +"exporte :c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que " +"l'option :option:`-O` ou :option:`-OO` soit donnée au démarrage." -#: library/ctypes.rst:1111 +#: library/ctypes.rst:1283 #, fuzzy msgid "" -":mod:`ctypes` can access values like this with the :meth:`~_CData.in_dll` " +":mod:`!ctypes` can access values like this with the :meth:`~_CData.in_dll` " "class methods of the type. *pythonapi* is a predefined symbol giving access " "to the Python C api::" msgstr "" -":mod:`ctypes` peut accéder à ce type de valeurs avec les méthodes de classe :" -"meth:`in_dll` du type considéré. *pythonapi* est un symbole prédéfini qui " -"donne accès à l'API C Python ::" +":mod:`ctypes` peut accéder à ce type de valeurs avec les méthodes de " +"classe :meth:`in_dll` du type considéré. *pythonapi* est un symbole " +"prédéfini qui donne accès à l'API C Python ::" -#: library/ctypes.rst:1119 +#: library/ctypes.rst:1291 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." @@ -1451,11 +1791,11 @@ msgstr "" "Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " "exemple complet de l'utilisation de pointeurs." -#: library/ctypes.rst:1122 +#: library/ctypes.rst:1294 msgid "Quoting the docs for that value:" msgstr "Citons la documentation :" -#: library/ctypes.rst:1124 +#: library/ctypes.rst:1296 #, fuzzy msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " @@ -1464,22 +1804,23 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" -"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" -"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées " +"de :c:type:`struct _frozen`, dont tous les membres de la dernière valent " "``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: library/ctypes.rst:1129 +#: library/ctypes.rst:1301 +#, fuzzy msgid "" "So manipulating this pointer could even prove useful. To restrict the " -"example size, we show only how this table can be read with :mod:`ctypes`::" +"example size, we show only how this table can be read with :mod:`!ctypes`::" msgstr "" "Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la " "taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " "avec :mod:`ctypes` ::" -#: library/ctypes.rst:1143 +#: library/ctypes.rst:1315 #, fuzzy msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " @@ -1488,7 +1829,7 @@ msgstr "" "Le type de donnée :c:type:`struct _frozen` ayant été défini, nous pouvons " "récupérer le pointeur vers le tableau ::" -#: library/ctypes.rst:1150 +#: library/ctypes.rst:1322 msgid "" "Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " "we can iterate over it, but we just have to make sure that our loop " @@ -1502,7 +1843,7 @@ msgstr "" "ou tard, il planterait probablement avec une erreur de segmentation ou " "autre, donc mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" -#: library/ctypes.rst:1166 +#: library/ctypes.rst:1338 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " @@ -1512,32 +1853,33 @@ msgstr "" "(indiqués par la valeur négative du membre *size*) est peu connu, cela ne " "sert qu'aux tests. Essayez avec ``import __hello__`` par exemple." -#: library/ctypes.rst:1174 +#: library/ctypes.rst:1346 msgid "Surprises" msgstr "Pièges" -#: library/ctypes.rst:1176 +#: library/ctypes.rst:1348 +#, fuzzy msgid "" -"There are some edges in :mod:`ctypes` where you might expect something other " -"than what actually happens." +"There are some edges in :mod:`!ctypes` where you might expect something " +"other than what actually happens." msgstr "" "Il y a quelques cas tordus dans :mod:`ctypes` où on peut s'attendre à un " "résultat différent de la réalité." -#: library/ctypes.rst:1179 +#: library/ctypes.rst:1351 msgid "Consider the following example::" msgstr "Examinons l'exemple suivant ::" -#: library/ctypes.rst:1199 +#: library/ctypes.rst:1371 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" "Diantre. On s'attendait certainement à ce que le dernier résultat affiche " -"``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc." -"b, rc.a`` ci-dessus sont les suivantes ::" +"``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = " +"rc.b, rc.a`` ci-dessus sont les suivantes ::" -#: library/ctypes.rst:1207 +#: library/ctypes.rst:1379 msgid "" "Note that ``temp0`` and ``temp1`` are objects still using the internal " "buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " @@ -1551,7 +1893,7 @@ msgstr "" "contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " "n'a pas l'effet escompté." -#: library/ctypes.rst:1213 +#: library/ctypes.rst:1385 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " @@ -1561,14 +1903,14 @@ msgstr "" "ou un *Array* ne copie *pas* le sous-objet, mais crée un objet interface qui " "accède au tampon sous-jacent de l'objet initial." -#: library/ctypes.rst:1217 +#: library/ctypes.rst:1389 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" "Un autre exemple de comportement *a priori* inattendu est le suivant ::" -#: library/ctypes.rst:1229 +#: library/ctypes.rst:1401 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." @@ -1576,7 +1918,7 @@ msgstr "" "La valeur d'une instance de :class:`c_char_p` ne peut être initialisée " "qu'avec un octet ou un entier." -#: library/ctypes.rst:1232 +#: library/ctypes.rst:1404 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1590,18 +1932,20 @@ msgstr "" "stocke pas l'objet même ; seuls ses ``contents`` le sont. Accéder au " "``contents`` crée un nouvel objet Python à chaque fois !" -#: library/ctypes.rst:1242 +#: library/ctypes.rst:1414 msgid "Variable-sized data types" msgstr "Types de données à taille flottante" -#: library/ctypes.rst:1244 +#: library/ctypes.rst:1416 +#, fuzzy msgid "" -":mod:`ctypes` provides some support for variable-sized arrays and structures." +":mod:`!ctypes` provides some support for variable-sized arrays and " +"structures." msgstr "" ":mod:`ctypes` assure la prise en charge des tableaux et des structures à " "taille flottante." -#: library/ctypes.rst:1246 +#: library/ctypes.rst:1418 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " "existing ctypes object. The function takes the object as first argument, " @@ -1616,7 +1960,7 @@ msgstr "" "unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " "cas ::" -#: library/ctypes.rst:1266 +#: library/ctypes.rst:1438 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " @@ -1626,9 +1970,10 @@ msgstr "" "tableau ? Vu que le type ne connaît que 4 éléments, on obtient une erreur si " "l'on accède aux suivants ::" -#: library/ctypes.rst:1278 +#: library/ctypes.rst:1450 +#, fuzzy msgid "" -"Another way to use variable-sized data types with :mod:`ctypes` is to use " +"Another way to use variable-sized data types with :mod:`!ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " "required size is already known, on a case by case basis." msgstr "" @@ -1637,265 +1982,95 @@ msgstr "" "dynamique de Python et de (re)définir le type de donnée une fois que la " "taille demandée est connue, au cas-par-cas." -#: library/ctypes.rst:1286 +#: library/ctypes.rst:1458 msgid "ctypes reference" msgstr "Référence du module" -#: library/ctypes.rst:1292 -msgid "Finding shared libraries" -msgstr "Recherche de bibliothèques partagées" - -#: library/ctypes.rst:1294 -msgid "" -"When programming in a compiled language, shared libraries are accessed when " -"compiling/linking a program, and when the program is run." -msgstr "" -"Les langages compilés ont besoin d'accéder aux bibliothèques partagées au " -"moment de la compilation, de l'édition de liens et pendant l'exécution du " -"programme." - -#: library/ctypes.rst:1297 -#, fuzzy -msgid "" -"The purpose of the :func:`~ctypes.util.find_library` function is to locate a " -"library in a way similar to what the compiler or runtime loader does (on " -"platforms with several versions of a shared library the most recent should " -"be loaded), while the ctypes library loaders act like when a program is run, " -"and call the runtime loader directly." -msgstr "" -"Le but de la fonction :func:`find_library` est de trouver une bibliothèque " -"de la même façon que le ferait le compilateur ou le chargeur (sur les plates-" -"formes avec plusieurs versions de la même bibliothèque, la plus récente est " -"chargée), alors que les chargeurs de bibliothèques de *ctypes* se comportent " -"de la même façon qu'un programme qui s'exécute, et appellent directement le " -"chargeur." - -#: library/ctypes.rst:1303 -#, fuzzy -msgid "" -"The :mod:`!ctypes.util` module provides a function which can help to " -"determine the library to load." -msgstr "" -"Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " -"bibliothèque charger." - -#: library/ctypes.rst:1311 -msgid "" -"Try to find a library and return a pathname. *name* is the library name " -"without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). " -"If no library can be found, returns ``None``." -msgstr "" -"Tente de trouver une bibliothèque et en renvoie le chemin. *name* est le nom " -"de la bibliothèque sans préfixe — comme *lib* — ni suffixe — comme ``.so``, " -"``.dylib`` ou un numéro de version (c.-à-d. la même forme que l'option POSIX " -"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " -"trouver de bibliothèque, elle renvoie ``None``." - -#: library/ctypes.rst:1987 -msgid "The exact functionality is system dependent." -msgstr "Le mode opératoire exact dépend du système." - -#: library/ctypes.rst:1318 -#, fuzzy -msgid "" -"On Linux, :func:`~ctypes.util.find_library` tries to run external programs " -"(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library " -"file. It returns the filename of the library file." -msgstr "" -"Sous Linux, :func:`find_library` essaye de lancer des programmes externes " -"(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " -"bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." - -#: library/ctypes.rst:1322 -msgid "" -"On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " -"when searching for libraries, if a library cannot be found by any other " -"means." -msgstr "" -"Sous Linux, si les autres moyens échouent, la fonction utilise la variable " -"d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." - -#: library/ctypes.rst:1326 -msgid "Here are some examples::" -msgstr "Voici quelques exemples ::" - -#: library/ctypes.rst:1337 -#, fuzzy -msgid "" -"On macOS and Android, :func:`~ctypes.util.find_library` uses the system's " -"standard naming schemes and paths to locate the library, and returns a full " -"pathname if successful::" -msgstr "" -"Sous macOS, :func:`find_library` regarde dans des chemins et conventions de " -"chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " -"complet si elle la trouve ::" - -#: library/ctypes.rst:1352 -#, fuzzy -msgid "" -"On Windows, :func:`~ctypes.util.find_library` searches along the system " -"search path, and returns the full pathname, but since there is no predefined " -"naming scheme a call like ``find_library(\"c\")`` will fail and return " -"``None``." -msgstr "" -"Sous Windows, :func:`find_library` examine le chemin de recherche du système " -"et renvoie le chemin complet de la bibliothèque, mais comme il n'existe pas " -"de convention de nommage, des appels comme ``find_library(\"c\")`` échouent " -"et renvoient ``None``." - -#: library/ctypes.rst:1356 -#, fuzzy -msgid "" -"If wrapping a shared library with :mod:`ctypes`, it *may* be better to " -"determine the shared library name at development time, and hardcode that " -"into the wrapper module instead of using :func:`~ctypes.util.find_library` " -"to locate the library at runtime." -msgstr "" -"Si vous encapsulez une bibliothèque partagée avec :mod:`ctypes`, il est " -"*probablement* plus judicieux de déterminer le chemin de cette bibliothèque " -"lors du développement et de l'écrire en dur dans le module d'encapsulation, " -"plutôt que d'utiliser :func:`find_library` pour la trouver lors de " -"l'exécution." - -#: library/ctypes.rst:1364 +#: library/ctypes.rst:1463 msgid "Loading shared libraries" msgstr "Chargement des bibliothèques partagées" -#: library/ctypes.rst:1366 +#: library/ctypes.rst:1465 +#, fuzzy msgid "" "There are several ways to load shared libraries into the Python process. " -"One way is to instantiate one of the following classes:" +"One way is to instantiate :py:class:`CDLL` or one of its subclasses:" msgstr "" "Il y a plusieurs moyens de charger une bibliothèque partagée dans un " "processus Python. L'un d'entre eux consiste à instancier une des classes " "suivantes :" -#: library/ctypes.rst:1372 +#: library/ctypes.rst:1471 #, fuzzy -msgid "" -"Instances of this class represent loaded shared libraries. Functions in " -"these libraries use the standard C calling convention, and are assumed to " -"return :c:expr:`int`." -msgstr "" -"Une instance de cette classe représente une bibliothèque partagée déjà " -"chargée. Les fonctions de cette bibliothèque utilisent la convention d'appel " -"C standard et doivent renvoyer un :c:type:`int`." +msgid "Represents a loaded shared library." +msgstr "Recherche de bibliothèques partagées" -#: library/ctypes.rst:1376 +#: library/ctypes.rst:1473 msgid "" -"On Windows creating a :class:`CDLL` instance may fail even if the DLL name " -"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" -"`OSError` error is raised with the message *\"[WinError 126] The specified " -"module could not be found\".* This error message does not contain the name " -"of the missing DLL because the Windows API does not return this information " -"making this error hard to diagnose. To resolve this error and determine " -"which DLL is not found, you need to find the list of dependent DLLs and " -"determine which one is not found using Windows debugging and tracing tools." -msgstr "" -"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " -"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " -"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " -"126] The specified module could not be found\".* Ce message d'erreur ne " -"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " -"cette information. Cela rend l'erreur délicate à analyser ; pour la " -"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " -"qui manque en utilisant des outils de débogage et de traçage Windows." - -#: library/ctypes.rst:1411 library/ctypes.rst:1439 -msgid "The *name* parameter can now be a :term:`path-like object`." +"Functions in this library use the standard C calling convention, and are " +"assumed to return :c:expr:`int`. The Python :term:`global interpreter lock` " +"is released before calling any function exported by these libraries, and " +"reacquired afterwards. For different function behavior, use a " +"subclass: :py:class:`~ctypes.OleDLL`, :py:class:`~ctypes.WinDLL`, " +"or :py:class:`~ctypes.PyDLL`." msgstr "" -#: library/ctypes.rst:1392 +#: library/ctypes.rst:1480 msgid "" -"`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." +"If you have an existing :py:attr:`handle ` to an " +"already loaded shared library, it can be passed as the *handle* argument to " +"wrap the opened library in a new :py:class:`!CDLL` object. In this case, " +"*name* is only used to set the :py:attr:`~ctypes.CDLL._name` attribute, but " +"it may be adjusted and/or validated." msgstr "" -"`DUMPBIN `_ — un " -"utilitaire Microsoft pour lister les dépendances d'une DLL." -#: library/ctypes.rst:1398 +#: library/ctypes.rst:1486 msgid "" -"Windows only: Instances of this class represent loaded shared libraries, " -"functions in these libraries use the ``stdcall`` calling convention, and are " -"assumed to return the windows specific :class:`HRESULT` code. :class:" -"`HRESULT` values contain information specifying whether the function call " -"failed or succeeded, together with additional error code. If the return " -"value signals a failure, an :class:`OSError` is automatically raised." +"If *handle* is ``None``, the underlying platform's :manpage:`dlopen(3)` or " +"`LoadLibraryExW`_ function is used to load the library into the process, and " +"to get a handle to it." msgstr "" -"En Windows seulement : une instance de cette classe représente une " -"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " -"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :" -"class:`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` " -"contiennent des informations précisant si l'appel de la fonction a échoué ou " -"s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " -"retour signale un échec, une :class:`OSError` est levée automatiquement." -#: library/ctypes.rst:1405 -#, fuzzy +#: library/ctypes.rst:1490 msgid "" -":exc:`WindowsError` used to be raised, which is now an alias of :exc:" -"`OSError`." +"*name* is the pathname of the shared library to open. If *name* does not " +"contain a path separator, the library is found in a platform-specific way." msgstr "" -"En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " -"maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:1416 -#, fuzzy +#: library/ctypes.rst:1494 msgid "" -"Windows only: Instances of this class represent loaded shared libraries, " -"functions in these libraries use the ``stdcall`` calling convention, and are " -"assumed to return :c:expr:`int` by default." +"On Windows, the ``.DLL`` suffix may be missing. (For details, see " +"`LoadLibraryExW`_ documentation.) Other platform-specific prefixes and " +"suffixes (for example, ``lib``, ``.so``, ``.dylib``, or version numbers) " +"must be present in *name*; they are not added automatically. " +"See :ref:`ctypes-finding-shared-libraries` for more information." msgstr "" -"En Windows seulement : une instance de cette classe représente une " -"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " -"utilisent la convention d'appel *stdcall* et doivent renvoyer par défaut un :" -"c:type:`int`." -#: library/ctypes.rst:1424 +#: library/ctypes.rst:1501 msgid "" -"The Python :term:`global interpreter lock` is released before calling any " -"function exported by these libraries, and reacquired afterwards." +"On non-Windows systems, *name* can be ``None``. In this case, :c:func:`!" +"dlopen` is called with ``NULL``, which opens the main program as a " +"\"library\". (Some systems do the same is *name* is empty; ``None``/``NULL`` " +"is more portable.)" msgstr "" -"Le :term:`verrou global de l'interpréteur ` Python " -"est relâché avant chaque appel d'une fonction exposée par ces bibliothèques " -"et ré-activé après." -#: library/ctypes.rst:1430 -msgid "" -"Instances of this class behave like :class:`CDLL` instances, except that the " -"Python GIL is *not* released during the function call, and after the " -"function execution the Python error flag is checked. If the error flag is " -"set, a Python exception is raised." +#: library/ctypes.rst:1507 +msgid "CPython implementation detail" msgstr "" -"Cette classe est identique à :class:`CDLL`, à ceci près que le GIL n'est " -"*pas* relâché pendant l'appel de la fonction, et, qu'au terme de l'appel, le " -"drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " -"Python est levée." -#: library/ctypes.rst:1435 -msgid "Thus, this is only useful to call Python C api functions directly." +#: library/ctypes.rst:1509 +msgid "" +"Since CPython is linked to ``libc``, a ``None`` *name* is often used to " +"access the C standard library::" msgstr "" -"Donc, cette classe ne sert qu'à appeler les fonctions de l'API C de Python." -#: library/ctypes.rst:1441 -#, fuzzy +#: library/ctypes.rst:1518 msgid "" -"All these classes can be instantiated by calling them with at least one " -"argument, the pathname of the shared library. If you have an existing " -"handle to an already loaded shared library, it can be passed as the " -"``handle`` named parameter, otherwise the underlying platform's :c:func:`!" -"dlopen` or :c:func:`!LoadLibrary` function is used to load the library into " -"the process, and to get a handle to it." +"To access the Python C API, prefer :py:data:`ctypes.pythonapi` which works " +"across platforms." msgstr "" -"Toutes ces classes peuvent être instanciées en les appelant avec le chemin " -"de la bibliothèque partagée comme unique argument. Il est aussi possible de " -"passer un lien vers une bibliothèque déjà chargée en utilisant le paramètre " -"``handle``. Sinon, les fonctions ``dlopen`` ou ``LoadLibrary`` de la plate-" -"forme sous-jacente permettent de charger la bibliothèque dans le processus, " -"et d'en obtenir un lien." -#: library/ctypes.rst:1448 +#: library/ctypes.rst:1521 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -1907,12 +2082,12 @@ msgstr "" "manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " "est toujours ajouté. Ceci n'est pas configurable." -#: library/ctypes.rst:1453 +#: library/ctypes.rst:1526 #, fuzzy msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " -"allows accessing the system :data:`errno` error number in a safe way. :mod:" -"`ctypes` maintains a thread-local copy of the system's :data:`errno` " +"allows accessing the system :data:`errno` error number in a safe way. :mod:`!" +"ctypes` maintains a thread-local copy of the system's :data:`errno` " "variable; if you call foreign functions created with ``use_errno=True`` then " "the :data:`errno` value before the function call is swapped with the ctypes " "private copy, the same happens immediately after the function call." @@ -1925,7 +2100,7 @@ msgstr "" "la fonction est échangée avec la copie privée de *ctypes*. La même chose se " "produit juste après l'appel de la fonction." -#: library/ctypes.rst:1460 +#: library/ctypes.rst:1533 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " @@ -1935,27 +2110,28 @@ msgstr "" "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " "la copie privée et renvoie l'ancienne valeur." -#: library/ctypes.rst:1464 +#: library/ctypes.rst:1537 #, fuzzy msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " -"for the Windows error code which is managed by the :func:`GetLastError` and :" -"func:`!SetLastError` Windows API functions; :func:`ctypes.get_last_error` " -"and :func:`ctypes.set_last_error` are used to request and change the ctypes " -"private copy of the windows error code." +"for the Windows error code which is managed by the :func:`GetLastError` " +"and :func:`!SetLastError` Windows API " +"functions; :func:`ctypes.get_last_error` and :func:`ctypes.set_last_error` " +"are used to request and change the ctypes private copy of the windows error " +"code." msgstr "" "Définir le paramètre *use_last_error* à vrai active le même mécanisme pour " -"le code d'erreur de Windows qui est géré par les fonctions :func:" -"`GetLastError` et :func:`SetLastError` de l'API Windows ; :func:`ctypes." -"get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " -"modifier la copie privée *ctypes* de ce code d'erreur." +"le code d'erreur de Windows qui est géré par les " +"fonctions :func:`GetLastError` et :func:`SetLastError` de l'API " +"Windows ; :func:`ctypes.get_last_error` et :func:`ctypes.set_last_error` " +"servent à obtenir et modifier la copie privée *ctypes* de ce code d'erreur." -#: library/ctypes.rst:1470 +#: library/ctypes.rst:1543 #, fuzzy msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " -"Win32 API ``LoadLibraryEx`` flags parameter. When omitted, the default is to " +"Win32 API `LoadLibraryExW`_ flags parameter. When omitted, the default is to " "use the flags that result in the most secure DLL load, which avoids issues " "such as DLL hijacking. Passing the full path to the DLL is the safest way to " "ensure the correct library and dependencies are loaded." @@ -1968,42 +2144,53 @@ msgstr "" "le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " "bonne bibliothèque et les bonnes dépendances sont chargées." -#: library/ctypes.rst:1477 -msgid "Added *winmode* parameter." -msgstr "Ajout du paramètre *winmode*." - -#: library/ctypes.rst:1484 +#: library/ctypes.rst:1550 msgid "" -"Flag to use as *mode* parameter. On platforms where this flag is not " -"available, it is defined as the integer zero." +"On Windows creating a :class:`CDLL` instance may fail even if the DLL name " +"exists. When a dependent DLL of the loaded DLL is not found, " +"a :exc:`OSError` error is raised with the message *\"[WinError 126] The " +"specified module could not be found\".* This error message does not contain " +"the name of the missing DLL because the Windows API does not return this " +"information making this error hard to diagnose. To resolve this error and " +"determine which DLL is not found, you need to find the list of dependent " +"DLLs and determine which one is not found using Windows debugging and " +"tracing tools." msgstr "" -"Valeur possible pour le paramètre *mode*. Vaut zéro sur les plates-formes où " -"ce drapeau n'est pas disponible." +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " +"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " +"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " +"126] The specified module could not be found\".* Ce message d'erreur ne " +"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " +"cette information. Cela rend l'erreur délicate à analyser ; pour la " +"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " +"qui manque en utilisant des outils de débogage et de traçage Windows." -#: library/ctypes.rst:1491 +#: library/ctypes.rst:1562 +#, fuzzy msgid "" -"Flag to use as *mode* parameter. On platforms where this is not available, " -"it is the same as *RTLD_GLOBAL*." +"`Microsoft DUMPBIN tool `_ -- A tool to find DLL " +"dependents." msgstr "" -"Valeur possible pour le paramètre *mode*. Vaut *RTLD_GLOBAL* sur les plates-" -"formes où ce drapeau n'est pas disponible." +"`DUMPBIN `_ — un " +"utilitaire Microsoft pour lister les dépendances d'une DLL." -#: library/ctypes.rst:1498 -msgid "" -"The default mode which is used to load shared libraries. On OSX 10.3, this " -"is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." +#: library/ctypes.rst:1565 +msgid "Added *winmode* parameter." +msgstr "Ajout du paramètre *winmode*." + +#: library/ctypes.rst:1570 +msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -"Mode de chargement par défaut des bibliothèques partagées. Vaut " -"*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " -"d'exploitation." -#: library/ctypes.rst:1501 +#: library/ctypes.rst:1572 +#, fuzzy msgid "" -"Instances of these classes have no public methods. Functions exported by " -"the shared library can be accessed as attributes or by index. Please note " -"that accessing the function through an attribute caches the result and " -"therefore accessing it repeatedly returns the same object each time. On the " -"other hand, accessing it through an index returns a new object each time::" +"Instances of this class have no public methods. Functions exported by the " +"shared library can be accessed as attributes or by index. Please note that " +"accessing the function through an attribute caches the result and therefore " +"accessing it repeatedly returns the same object each time. On the other " +"hand, accessing it through an index returns a new object each time::" msgstr "" "Les instances de ces classes n'ont pas de méthodes publiques ; on accède aux " "fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez " @@ -2011,23 +2198,115 @@ msgstr "" "accès consécutifs renvoient à chaque fois le même objet. Accéder à une " "fonction par indice renvoie cependant chaque fois un nouvel objet ::" -#: library/ctypes.rst:1514 +#: library/ctypes.rst:1585 +#, fuzzy msgid "" -"The following public attributes are available, their name starts with an " +"The following public attributes are available. Their name starts with an " "underscore to not clash with exported function names:" msgstr "" "Les attributs publics suivants sont disponibles, leur nom commence par un " "tiret bas pour éviter les conflits avec les noms des fonctions exportées :" -#: library/ctypes.rst:1520 +#: library/ctypes.rst:1590 msgid "The system handle used to access the library." msgstr "Le lien système d'accès à la bibliothèque." -#: library/ctypes.rst:1525 +#: library/ctypes.rst:1594 msgid "The name of the library passed in the constructor." msgstr "Nom de la bibliothèque donné au constructeur." -#: library/ctypes.rst:1527 +#: library/ctypes.rst:1617 library/ctypes.rst:1626 +msgid "See :py:class:`~ctypes.CDLL`, the superclass, for common information." +msgstr "" + +#: library/ctypes.rst:1602 +#, fuzzy +msgid "" +"Functions in this library use the ``stdcall`` calling convention, and are " +"assumed to return the windows specific :class:`HRESULT` " +"code. :class:`HRESULT` values contain information specifying whether the " +"function call failed or succeeded, together with additional error code. If " +"the return value signals a failure, an :class:`OSError` is automatically " +"raised." +msgstr "" +"En Windows seulement : une instance de cette classe représente une " +"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " +"utilisent la convention d'appel *stdcall*, et doivent renvoyer un " +"code :class:`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` " +"contiennent des informations précisant si l'appel de la fonction a échoué ou " +"s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " +"retour signale un échec, une :class:`OSError` est levée automatiquement." + +#: library/ctypes.rst:1622 library/ctypes.rst:1692 library/ctypes.rst:1987 +#: library/ctypes.rst:2191 library/ctypes.rst:2272 library/ctypes.rst:2295 +#: library/ctypes.rst:2319 library/ctypes.rst:2413 library/ctypes.rst:3268 +msgid "Availability" +msgstr "Disponibilité" + +#: library/ctypes.rst:1610 +#, fuzzy +msgid "" +":exc:`WindowsError` used to be raised, which is now an alias " +"of :exc:`OSError`." +msgstr "" +"En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " +"maintenant un alias de :exc:`OSError`." + +#: library/ctypes.rst:1619 +#, fuzzy +msgid "" +"Functions in these libraries use the ``stdcall`` calling convention, and are " +"assumed to return :c:expr:`int` by default." +msgstr "" +"En Windows seulement : une instance de cette classe représente une " +"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " +"utilisent la convention d'appel *stdcall* et doivent renvoyer par défaut " +"un :c:type:`int`." + +#: library/ctypes.rst:1628 +#, fuzzy +msgid "" +"When functions in this library are called, the Python GIL is *not* released " +"during the function call, and after the function execution the Python error " +"flag is checked. If the error flag is set, a Python exception is raised." +msgstr "" +"Cette classe est identique à :class:`CDLL`, à ceci près que le GIL n'est " +"*pas* relâché pendant l'appel de la fonction, et, qu'au terme de l'appel, le " +"drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " +"Python est levée." + +#: library/ctypes.rst:1633 +#, fuzzy +msgid "Thus, this is only useful to call Python C API functions directly." +msgstr "" +"Donc, cette classe ne sert qu'à appeler les fonctions de l'API C de Python." + +#: library/ctypes.rst:1638 +msgid "" +"Flag to use as *mode* parameter. On platforms where this flag is not " +"available, it is defined as the integer zero." +msgstr "" +"Valeur possible pour le paramètre *mode*. Vaut zéro sur les plates-formes où " +"ce drapeau n'est pas disponible." + +#: library/ctypes.rst:1644 +msgid "" +"Flag to use as *mode* parameter. On platforms where this is not available, " +"it is the same as *RTLD_GLOBAL*." +msgstr "" +"Valeur possible pour le paramètre *mode*. Vaut *RTLD_GLOBAL* sur les plates-" +"formes où ce drapeau n'est pas disponible." + +#: library/ctypes.rst:1650 +msgid "" +"The default mode which is used to load shared libraries. On OSX 10.3, this " +"is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." +msgstr "" +"Mode de chargement par défaut des bibliothèques partagées. Vaut " +"*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " +"d'exploitation." + +#: library/ctypes.rst:1654 #, fuzzy msgid "" "Shared libraries can also be loaded by using one of the prefabricated " @@ -2036,19 +2315,19 @@ msgid "" "library as attribute of the loader instance." msgstr "" "Il est possible de charger une bibliothèque partagée soit en utilisant une " -"instance de la classe :class:`LibraryLoader`, soit en appelant la méthode :" -"meth:`LoadLibrary`, soit en récupérant la bibliothèque comme attribut de " -"l'instance du chargeur." +"instance de la classe :class:`LibraryLoader`, soit en appelant la " +"méthode :meth:`LoadLibrary`, soit en récupérant la bibliothèque comme " +"attribut de l'instance du chargeur." -#: library/ctypes.rst:1535 +#: library/ctypes.rst:1661 msgid "" -"Class which loads shared libraries. *dlltype* should be one of the :class:" -"`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." +"Class which loads shared libraries. *dlltype* should be one of " +"the :class:`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -"Classe pour charger une bibliothèque partagée. *dlltype* doit être de type :" -"class:`CDLL`, :class:`PyDLL`, :class:`WinDLL` ou :class:`OleDLL`." +"Classe pour charger une bibliothèque partagée. *dlltype* doit être de " +"type :class:`CDLL`, :class:`PyDLL`, :class:`WinDLL` ou :class:`OleDLL`." -#: library/ctypes.rst:1538 +#: library/ctypes.rst:1664 #, fuzzy msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " @@ -2061,7 +2340,7 @@ msgstr "" "en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " "fois." -#: library/ctypes.rst:1544 +#: library/ctypes.rst:1670 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." @@ -2069,39 +2348,35 @@ msgstr "" "Charge une bibliothèque partagée dans le processus et la renvoie. Cette " "méthode renvoie toujours une nouvelle instance de la bibliothèque." -#: library/ctypes.rst:1548 +#: library/ctypes.rst:1674 msgid "These prefabricated library loaders are available:" msgstr "Plusieurs chargeurs sont fournis :" -#: library/ctypes.rst:1553 +#: library/ctypes.rst:1678 msgid "Creates :class:`CDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1559 -msgid "Windows only: Creates :class:`WinDLL` instances." -msgstr "Pour créer des instances de :class:`WinDLL` (uniquement en Windows)." +#: library/ctypes.rst:1683 +#, fuzzy +msgid "Creates :class:`WinDLL` instances." +msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1565 -msgid "Windows only: Creates :class:`OleDLL` instances." -msgstr "Pour créer des instances de :class:`OleDLL` (uniquement en Windows)." +#: library/ctypes.rst:1690 +#, fuzzy +msgid "Creates :class:`OleDLL` instances." +msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1571 +#: library/ctypes.rst:1697 msgid "Creates :class:`PyDLL` instances." msgstr "Pour créer des instances de :class:`PyDLL`." -#: library/ctypes.rst:1574 -msgid "" -"For accessing the C Python api directly, a ready-to-use Python shared " -"library object is available:" -msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" - -#: library/ctypes.rst:1580 +#: library/ctypes.rst:1702 #, fuzzy msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " -"attributes. Note that all these functions are assumed to return C :c:expr:" -"`int`, which is of course not always the truth, so you have to assign the " -"correct :attr:`!restype` attribute to use these functions." +"attributes. Note that all these functions are assumed to return " +"C :c:expr:`int`, which is of course not always the truth, so you have to " +"assign the correct :attr:`!restype` attribute to use these functions." msgstr "" "Une instance de :class:`PyDLL` dont les attributs sont les fonctions " "exportées par l'API C Python. Toutes ces fonctions sont supposées renvoyer " @@ -2109,27 +2384,27 @@ msgstr "" "donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " "utiliser." -#: library/ctypes.rst:1587 +#: library/ctypes.rst:1709 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"``name``, le nom de la bibliothèque (une chaîne de caractères), lève " +"un :ref:`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1593 +#: library/ctypes.rst:1715 msgid "" -"Accessing a function on a loaded library raises an auditing event ``ctypes." -"dlsym`` with arguments ``library`` (the library object) and ``name`` (the " -"symbol's name as a string or integer)." +"Accessing a function on a loaded library raises an auditing event " +"``ctypes.dlsym`` with arguments ``library`` (the library object) and " +"``name`` (the symbol's name as a string or integer)." msgstr "" -"Accéder à une fonction d'une bibliothèque lève un évènement d'audit ``ctypes." -"dlsym`` avec ``library`` (l'objet bibliothèque) et ``name`` (le nom du " -"symbole — une chaîne de caractères ou un entier) comme arguments." +"Accéder à une fonction d'une bibliothèque lève un évènement d'audit " +"``ctypes.dlsym`` avec ``library`` (l'objet bibliothèque) et ``name`` (le nom " +"du symbole — une chaîne de caractères ou un entier) comme arguments." -#: library/ctypes.rst:1599 +#: library/ctypes.rst:1721 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " @@ -2139,18 +2414,187 @@ msgstr "" "à une fonction lève l'évènement d'audit ``ctypes.dlsym/handle`` avec " "``handle`` (le lien vers la bibliothèque) et ``name`` comme arguments." -#: library/ctypes.rst:1606 -msgid "Foreign functions" -msgstr "Fonctions externes" +#: library/ctypes.rst:1729 +msgid "Finding shared libraries" +msgstr "Recherche de bibliothèques partagées" -#: library/ctypes.rst:1608 -#, fuzzy +#: library/ctypes.rst:1731 msgid "" -"As explained in the previous section, foreign functions can be accessed as " -"attributes of loaded shared libraries. The function objects created in this " -"way by default accept any number of arguments, accept any ctypes data " -"instances as arguments, and return the default result type specified by the " -"library loader." +"When programming in a compiled language, shared libraries are accessed when " +"compiling/linking a program, and when the program is run. The programmer " +"specifies a short name; the C compiler, linker, and runtime dynamic library " +"loader then interact in system-specific ways to find the filename of the " +"library to load." +msgstr "" + +#: library/ctypes.rst:1737 +msgid "" +"While the mapping from short names to filenames is not consistently exposed " +"by platforms, the :mod:`!ctypes.util` module provides a function, :func:`!" +"find_library`, that attempts to match it. However, as backwards " +"compatibility concerns make it difficult to adjust its behavior for new " +"platforms and configurations, the function is :term:`soft deprecated`." +msgstr "" + +#: library/ctypes.rst:1744 +#, fuzzy +msgid "" +"If wrapping a shared library with :mod:`!ctypes`, consider determining the " +"shared library name at development time, and hardcoding it into the wrapper " +"module instead of using :func:`!find_library` to locate the library at " +"runtime. Also consider adding a configuration option or environment variable " +"to let users select a library to use, and then perhaps use :func:`!" +"find_library` as a default or fallback." +msgstr "" +"Si vous encapsulez une bibliothèque partagée avec :mod:`ctypes`, il est " +"*probablement* plus judicieux de déterminer le chemin de cette bibliothèque " +"lors du développement et de l'écrire en dur dans le module d'encapsulation, " +"plutôt que d'utiliser :func:`find_library` pour la trouver lors de " +"l'exécution." + +#: library/ctypes.rst:1755 +msgid "Try to find a library and return a pathname." +msgstr "" + +#: library/ctypes.rst:1757 +#, fuzzy +msgid "" +"*name* is the \"short\" library name without any prefix like ``lib``, suffix " +"like ``.so``, ``.dylib`` or version number. (This is the form used for the " +"posix linker option :option:`!-l`.) The result is in a format suitable for " +"passing to :py:class:`~ctypes.CDLL`." +msgstr "" +"Tente de trouver une bibliothèque et en renvoie le chemin. *name* est le nom " +"de la bibliothèque sans préfixe — comme *lib* — ni suffixe — comme ``.so``, " +"``.dylib`` ou un numéro de version (c.-à-d. la même forme que l'option POSIX " +"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " +"trouver de bibliothèque, elle renvoie ``None``." + +#: library/ctypes.rst:1762 +msgid "If no library can be found, return ``None``." +msgstr "" + +#: library/ctypes.rst:1764 +msgid "" +"The exact functionality is system dependent, and is *not guaranteed* to " +"match the behavior of the compiler, linker, and loader used for (or by) " +"Python. It is recommended to only use this function as a default or fallback," +msgstr "" + +#: library/ctypes.rst:1771 +msgid "" +"This function is kept for use in cases where it works, but not expected to " +"be updated for additional platforms and configurations." +msgstr "" + +#: library/ctypes.rst:1774 +#, fuzzy +msgid "" +"On Linux, :func:`!find_library` tries to run external programs (``/sbin/" +"ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. If " +"the output of these programs does not correspond to the dynamic linker used " +"by Python, the result of this function may be misleading." +msgstr "" +"Sous Linux, :func:`find_library` essaye de lancer des programmes externes " +"(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " +"bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." + +#: library/ctypes.rst:1780 +msgid "" +"On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " +"when searching for libraries, if a library cannot be found by any other " +"means." +msgstr "" +"Sous Linux, si les autres moyens échouent, la fonction utilise la variable " +"d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." + +#: library/ctypes.rst:1784 +msgid "Here are some examples::" +msgstr "Voici quelques exemples ::" + +#: library/ctypes.rst:1795 +#, fuzzy +msgid "" +"On macOS and Android, :func:`!find_library` uses the system's standard " +"naming schemes and paths to locate the library, and returns a full pathname " +"if successful::" +msgstr "" +"Sous macOS, :func:`find_library` regarde dans des chemins et conventions de " +"chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " +"complet si elle la trouve ::" + +#: library/ctypes.rst:1810 +#, fuzzy +msgid "" +"On Windows, :func:`!find_library` searches along the system search path, and " +"returns the full pathname, but since there is no predefined naming scheme a " +"call like ``find_library(\"c\")`` will fail and return ``None``." +msgstr "" +"Sous Windows, :func:`find_library` examine le chemin de recherche du système " +"et renvoie le chemin complet de la bibliothèque, mais comme il n'existe pas " +"de convention de nommage, des appels comme ``find_library(\"c\")`` échouent " +"et renvoient ``None``." + +#: library/ctypes.rst:1817 +msgid "" +"Returns the filename of the VC runtime library used by Python, and by the " +"extension modules." +msgstr "" + +#: library/ctypes.rst:1820 +msgid "" +"If the name of the library cannot be determined, ``None`` is returned. " +"Notably, this will happen for recent versions of the VC runtime library, " +"which are not directly loadable." +msgstr "" + +#: library/ctypes.rst:1824 +msgid "" +"If you need to free memory, for example, allocated by an extension module " +"with a call to the ``free(void *)``, it is important that you use the " +"function in the same library that allocated the memory." +msgstr "" + +#: library/ctypes.rst:1834 +#, fuzzy +msgid "Listing loaded shared libraries" +msgstr "Recherche de bibliothèques partagées" + +#: library/ctypes.rst:1836 +msgid "" +"When writing code that relies on code loaded from shared libraries, it can " +"be useful to know which shared libraries have already been loaded into the " +"current process." +msgstr "" + +#: library/ctypes.rst:1840 +msgid "" +"The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` " +"function, which calls the different APIs provided by the various platforms " +"to help determine which shared libraries have already been loaded into the " +"current process." +msgstr "" + +#: library/ctypes.rst:1844 +msgid "" +"The exact output of this function will be system dependent. On most " +"platforms, the first entry of this list represents the current process " +"itself, which may be an empty string. For example, on glibc-based Linux, the " +"return may look like::" +msgstr "" + +#: library/ctypes.rst:1856 +msgid "Foreign functions" +msgstr "Fonctions externes" + +#: library/ctypes.rst:1858 +#, fuzzy +msgid "" +"As explained in the previous section, foreign functions can be accessed as " +"attributes of loaded shared libraries. The function objects created in this " +"way by default accept any number of arguments, accept any ctypes data " +"instances as arguments, and return the default result type specified by the " +"library loader." msgstr "" "Comme expliqué dans la section précédente, on peut accéder aux fonctions " "externes au travers des attributs des bibliothèques partagées. Un objet " @@ -2159,17 +2603,17 @@ msgstr "" "renvoie le type par défaut du chargeur de la bibliothèque. Ce sont des " "instances de la classe privée :" -#: library/ctypes.rst:1613 +#: library/ctypes.rst:1863 msgid "" "They are instances of a private local class :class:`!_FuncPtr` (not exposed " "in :mod:`!ctypes`) which inherits from the private :class:`_CFuncPtr` class:" msgstr "" -#: library/ctypes.rst:1627 +#: library/ctypes.rst:1877 msgid "Base class for C callable foreign functions." msgstr "Classe de base pour les fonctions externes C." -#: library/ctypes.rst:1629 +#: library/ctypes.rst:1879 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." @@ -2177,7 +2621,7 @@ msgstr "" "Une instance de fonction externe est également un type de donnée compatible " "avec le C ; elle représente un pointeur vers une fonction." -#: library/ctypes.rst:1632 +#: library/ctypes.rst:1882 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." @@ -2185,7 +2629,7 @@ msgstr "" "Son comportement peut-être personnalisé en réaffectant les attributs " "spécifiques de l'objet représentant la fonction externe." -#: library/ctypes.rst:1637 +#: library/ctypes.rst:1887 #, fuzzy msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " @@ -2195,7 +2639,7 @@ msgstr "" "*ctypes*. Dans le cas où la fonction ne renvoie rien (:c:type:`void`), " "utilisez ``None``." -#: library/ctypes.rst:1640 +#: library/ctypes.rst:1890 #, fuzzy msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " @@ -2214,7 +2658,7 @@ msgstr "" "affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " "l'attribut :attr:`errcheck`." -#: library/ctypes.rst:1649 +#: library/ctypes.rst:1899 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2228,25 +2672,25 @@ msgstr "" "la taille du *n*-uplet mais les fonctions qui utilisent la convention " "d'appel C acceptent aussi des arguments additionnels non-définis." -#: library/ctypes.rst:1655 +#: library/ctypes.rst:1905 #, fuzzy msgid "" -"When a foreign function is called, each actual argument is passed to the :" -"meth:`~_CData.from_param` class method of the items in the :attr:`argtypes` " -"tuple, this method allows adapting the actual argument to an object that the " -"foreign function accepts. For example, a :class:`c_char_p` item in the :" -"attr:`argtypes` tuple will convert a string passed as argument into a bytes " -"object using ctypes conversion rules." +"When a foreign function is called, each actual argument is passed to " +"the :meth:`~_CData.from_param` class method of the items in " +"the :attr:`argtypes` tuple, this method allows adapting the actual argument " +"to an object that the foreign function accepts. For example, " +"a :class:`c_char_p` item in the :attr:`argtypes` tuple will convert a string " +"passed as argument into a bytes object using ctypes conversion rules." msgstr "" "À l'appel d'une fonction externe, chaque argument est passé à la méthode de " -"classe :meth:`from_param` de l'élément correspondant dans le *n*-uplet des :" -"attr:`argtypes`. Cette méthode convertit l'argument initial en un objet que " -"la fonction externe peut comprendre. Par exemple, un :class:`c_char_p` dans " -"le *n*-uplet des :attr:`argtypes` va transformer la chaîne de caractères " -"passée en argument en un objet chaîne d'octets selon les règles de " -"conversion *ctypes*." +"classe :meth:`from_param` de l'élément correspondant dans le *n*-uplet " +"des :attr:`argtypes`. Cette méthode convertit l'argument initial en un objet " +"que la fonction externe peut comprendre. Par exemple, un :class:`c_char_p` " +"dans le *n*-uplet des :attr:`argtypes` va transformer la chaîne de " +"caractères passée en argument en un objet chaîne d'octets selon les règles " +"de conversion *ctypes*." -#: library/ctypes.rst:1662 +#: library/ctypes.rst:1912 #, fuzzy msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " @@ -2261,7 +2705,7 @@ msgstr "" "de créer des adaptateurs qui convertissent des objets arbitraires en des " "paramètres de fonction." -#: library/ctypes.rst:1669 +#: library/ctypes.rst:1919 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" @@ -2269,7 +2713,7 @@ msgstr "" "Définit une fonction Python ou tout autre appelable qui sera appelé avec " "trois arguments ou plus :" -#: library/ctypes.rst:1676 +#: library/ctypes.rst:1926 #, fuzzy msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" @@ -2278,7 +2722,7 @@ msgstr "" "*result* est la valeur de retour de la fonction externe, comme défini par " "l'attribut :attr:`restype`." -#: library/ctypes.rst:1679 +#: library/ctypes.rst:1929 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." @@ -2288,7 +2732,7 @@ msgstr "" "plusieurs fonctions ou de faire des actions supplémentaires après leur " "exécution." -#: library/ctypes.rst:1683 +#: library/ctypes.rst:1933 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." @@ -2297,7 +2741,7 @@ msgstr "" "la fonction, ceci permet de spécialiser le comportement des arguments " "utilisés." -#: library/ctypes.rst:1687 +#: library/ctypes.rst:1937 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " @@ -2307,22 +2751,14 @@ msgstr "" "fonction externe, mais il peut aussi vérifier la valeur du résultat et lever " "une exception si l'appel a échoué." -#: library/ctypes.rst:1694 -msgid "" -"This exception is raised when a foreign function call cannot convert one of " -"the passed arguments." -msgstr "" -"Exception levée quand un appel à la fonction externe ne peut pas convertir " -"un des arguments qu'elle a reçus." - -#: library/ctypes.rst:1700 +#: library/ctypes.rst:1944 #, fuzzy msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " -"a suitable Python exception. Further, an auditing event ``ctypes." -"set_exception`` with argument ``code`` will be raised, allowing an audit " -"hook to replace the exception with its own." +"a suitable Python exception. Further, an auditing event " +"``ctypes.set_exception`` with argument ``code`` will be raised, allowing an " +"audit hook to replace the exception with its own." msgstr "" "En Windows, quand un appel à une fonction externe lève une exception système " "(par exemple, une erreur de segmentation), celle-ci est interceptée pour " @@ -2331,21 +2767,22 @@ msgstr "" "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." -#: library/ctypes.rst:1708 +#: library/ctypes.rst:1952 +#, fuzzy msgid "" -"Some ways to invoke foreign function calls may raise an auditing event " -"``ctypes.call_function`` with arguments ``function pointer`` and " -"``arguments``." +"Some ways to invoke foreign function calls as well as some of the functions " +"in this module may raise an auditing event ``ctypes.call_function`` with " +"arguments ``function pointer`` and ``arguments``." msgstr "" "Certaines manières d'appeler des fonction externes peuvent lever des " "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1714 +#: library/ctypes.rst:1959 msgid "Function prototypes" msgstr "Prototypes de fonction" -#: library/ctypes.rst:1716 +#: library/ctypes.rst:1961 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2365,13 +2802,14 @@ msgstr "" "``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" "functions`." -#: library/ctypes.rst:1727 +#: library/ctypes.rst:1972 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " -"*use_errno* is set to true, the ctypes private copy of the system :data:" -"`errno` variable is exchanged with the real :data:`errno` value before and " -"after the call; *use_last_error* does the same for the Windows error code." +"*use_errno* is set to true, the ctypes private copy of the " +"system :data:`errno` variable is exchanged with the real :data:`errno` value " +"before and after the call; *use_last_error* does the same for the Windows " +"error code." msgstr "" "Renvoie un prototype de fonction qui crée des fonctions qui suivent la " "convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " @@ -2379,12 +2817,12 @@ msgstr "" "système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " "avant et après l'appel ; *use_last_error* a le même effet sous Windows." -#: library/ctypes.rst:1737 +#: library/ctypes.rst:1982 #, fuzzy msgid "" -"Windows only: The returned function prototype creates functions that use the " -"``stdcall`` calling convention. The function will release the GIL during " -"the call. *use_errno* and *use_last_error* have the same meaning as above." +"The returned function prototype creates functions that use the ``stdcall`` " +"calling convention. The function will release the GIL during the call. " +"*use_errno* and *use_last_error* have the same meaning as above." msgstr "" "En Windows seulement : renvoie un prototype de fonction qui crée des " "fonctions qui suivent la convention d'appel standard ``stdcall``, sauf sous " @@ -2392,7 +2830,7 @@ msgstr "" "fonctions libèreront le GIL lors de leur exécution. *use_errno* et " "*use_last_error* ont la même signification que ci-dessus." -#: library/ctypes.rst:1745 +#: library/ctypes.rst:1992 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." @@ -2401,7 +2839,7 @@ msgstr "" "convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " "leur exécution." -#: library/ctypes.rst:1748 +#: library/ctypes.rst:1995 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " @@ -2410,20 +2848,20 @@ msgstr "" "Il y a plusieurs façons d'instancier les prototypes de fonction créés par " "ces fabriques, selon le type et le nombre de paramètres de l'appel :" -#: library/ctypes.rst:1755 +#: library/ctypes.rst:2002 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" "Renvoie une fonction externe sur l'adresse donnée sous la forme d'un entier." -#: library/ctypes.rst:1762 +#: library/ctypes.rst:2009 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" "Crée une fonction appelable depuis du code C (une fonction de rappel) d'un " "appelable Python donné en paramètre." -#: library/ctypes.rst:1769 +#: library/ctypes.rst:2016 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " @@ -2436,7 +2874,7 @@ msgstr "" "indice (dans la table des symboles) à passer comme un entier. Le second " "élément est l'instance de la bibliothèque partagée." -#: library/ctypes.rst:1779 +#: library/ctypes.rst:2026 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " @@ -2449,7 +2887,14 @@ msgstr "" "l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " "étendue." -#: library/ctypes.rst:1784 +#: library/ctypes.rst:2031 +msgid "" +"If *iid* is not specified, an :exc:`OSError` is raised if the COM method " +"call fails. If *iid* is specified, a :exc:`~ctypes.COMError` is raised " +"instead." +msgstr "" + +#: library/ctypes.rst:2035 #, fuzzy msgid "" "COM methods use a special calling convention: They require a pointer to the " @@ -2460,7 +2905,7 @@ msgstr "" "de passer un pointeur vers l'interface COM en premier argument, en sus des " "arguments passés dans le *n*-uplet :attr:`argtypes`." -#: library/ctypes.rst:1788 +#: library/ctypes.rst:2042 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." @@ -2469,14 +2914,14 @@ msgstr "" "avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" "dessus." -#: library/ctypes.rst:1791 +#: library/ctypes.rst:2045 #, fuzzy msgid "" -"*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." -"argtypes`." +"*paramflags* must be a tuple of the same length " +"as :attr:`~_CFuncPtr.argtypes`." msgstr "*paramflags* est un *n*-uplet de la même taille que :attr:`argtypes`." -#: library/ctypes.rst:1793 +#: library/ctypes.rst:2047 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." @@ -2485,7 +2930,7 @@ msgstr "" "le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux " "ou trois éléments." -#: library/ctypes.rst:1796 +#: library/ctypes.rst:2050 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" @@ -2493,31 +2938,31 @@ msgstr "" "Le premier élément est un entier qui contient une combinaison de drapeaux " "qui précisent le sens des paramètres (entrée ou sortie) :" -#: library/ctypes.rst:1799 +#: library/ctypes.rst:2053 msgid "1" msgstr "1" -#: library/ctypes.rst:1800 +#: library/ctypes.rst:2054 msgid "Specifies an input parameter to the function." msgstr "Paramètre d'entrée." -#: library/ctypes.rst:1802 +#: library/ctypes.rst:2056 msgid "2" msgstr "2" -#: library/ctypes.rst:1803 +#: library/ctypes.rst:2057 msgid "Output parameter. The foreign function fills in a value." msgstr "Paramètre de sortie. La fonction externe va modifier cette valeur." -#: library/ctypes.rst:1805 +#: library/ctypes.rst:2059 msgid "4" msgstr "4" -#: library/ctypes.rst:1806 +#: library/ctypes.rst:2060 msgid "Input parameter which defaults to the integer zero." msgstr "Paramètre d'entrée, valant 0 par défaut." -#: library/ctypes.rst:1808 +#: library/ctypes.rst:2062 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." @@ -2526,12 +2971,12 @@ msgstr "" "nom du paramètre. Si cet élément est donné, la fonction externe pourra être " "appelée avec des paramètres nommés." -#: library/ctypes.rst:1811 +#: library/ctypes.rst:2065 msgid "The optional third item is the default value for this parameter." msgstr "" "Le troisième élément (optionnel) est la valeur par défaut du paramètre." -#: library/ctypes.rst:1814 +#: library/ctypes.rst:2068 #, fuzzy msgid "" "The following example demonstrates how to wrap the Windows ``MessageBoxW`` " @@ -2543,17 +2988,18 @@ msgstr "" "et des arguments nommés. Sa déclaration C dans le fichier d'en-tête des " "fenêtres est ::" -#: library/ctypes.rst:1848 -msgid "Here is the wrapping with :mod:`ctypes`::" +#: library/ctypes.rst:2102 +#, fuzzy +msgid "Here is the wrapping with :mod:`!ctypes`::" msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" -#: library/ctypes.rst:1833 +#: library/ctypes.rst:2087 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" "La fonction ``MessageBox`` peut désormais être appelée des manières " "suivantes ::" -#: library/ctypes.rst:1839 +#: library/ctypes.rst:2093 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2564,7 +3010,7 @@ msgstr "" "``GetWindowRect`` donne les dimensions d'une fenêtre en les copiant dans une " "structure ``RECT`` que l'appelant doit fournir. Sa déclaration en C est ::" -#: library/ctypes.rst:1857 +#: library/ctypes.rst:2111 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2577,7 +3023,7 @@ msgstr "" "fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " "appelée." -#: library/ctypes.rst:1862 +#: library/ctypes.rst:2116 #, fuzzy msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " @@ -2586,20 +3032,22 @@ msgid "" "failure, so this function could do the error checking, and raises an " "exception when the api call failed::" msgstr "" -"Il est possible de combiner des paramètres en sortie avec le protocole :attr:" -"`errcheck` pour post-traiter les sorties et faire de la vérification " -"d'erreur. La fonction de l'API win32 ``GetWindowRect`` renvoie un ``BOOL`` " -"pour indiquer le succès ou l'échec de l'exécution, donc cette fonction peut " -"vérifier le résultat et lever une exception quand l'appel à l'API a échoué ::" +"Il est possible de combiner des paramètres en sortie avec le " +"protocole :attr:`errcheck` pour post-traiter les sorties et faire de la " +"vérification d'erreur. La fonction de l'API win32 ``GetWindowRect`` renvoie " +"un ``BOOL`` pour indiquer le succès ou l'échec de l'exécution, donc cette " +"fonction peut vérifier le résultat et lever une exception quand l'appel à " +"l'API a échoué ::" -#: library/ctypes.rst:1875 +#: library/ctypes.rst:2129 #, fuzzy msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " -"receives unchanged, :mod:`ctypes` continues the normal processing it does on " -"the output parameters. If you want to return a tuple of window coordinates " -"instead of a ``RECT`` instance, you can retrieve the fields in the function " -"and return them instead, the normal processing will no longer take place::" +"receives unchanged, :mod:`!ctypes` continues the normal processing it does " +"on the output parameters. If you want to return a tuple of window " +"coordinates instead of a ``RECT`` instance, you can retrieve the fields in " +"the function and return them instead, the normal processing will no longer " +"take place::" msgstr "" "Si la fonction :attr:`errcheck` renvoie le *n*-uplet passé en paramètre sans " "rien y changer, :mod:`ctypes` continue l'exécution habituelle des paramètres " @@ -2608,46 +3056,66 @@ msgstr "" "correspondants et les renvoyer en retour. Dans ce cas, l'exécution " "habituelle n'a plus lieu ::" -#: library/ctypes.rst:1894 +#: library/ctypes.rst:2148 msgid "Utility functions" msgstr "Fonctions utilitaires" -#: library/ctypes.rst:1898 +#: library/ctypes.rst:2152 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: library/ctypes.rst:1901 +#: library/ctypes.rst:2155 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:1906 +#: library/ctypes.rst:2160 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: library/ctypes.rst:1912 +#: library/ctypes.rst:2166 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: library/ctypes.rst:1916 +#: library/ctypes.rst:2170 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:1920 +#: library/ctypes.rst:2174 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: library/ctypes.rst:1926 +#: library/ctypes.rst:2180 +msgid "" +"Copies a COM pointer from *src* to *dst* and returns the Windows " +"specific :c:type:`!HRESULT` value." +msgstr "" + +#: library/ctypes.rst:2183 +msgid "" +"If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " +"reference count." +msgstr "" + +#: library/ctypes.rst:2186 +msgid "" +"In contrast, the reference count of *dst* will not be decremented before " +"assigning the new value. Unless *dst* is ``NULL``, the caller is responsible " +"for decrementing the reference count by calling its ``Release`` method when " +"necessary." +msgstr "" + +#: library/ctypes.rst:2198 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -2655,168 +3123,179 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:1934 +#: library/ctypes.rst:2207 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: library/ctypes.rst:1937 +#: library/ctypes.rst:2210 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a bytes object which will be used to initialize the array items." +"If *size* is given (and not ``None``), it must be an :class:`int`. It " +"specifies the size of the returned array." msgstr "" -#: library/ctypes.rst:1940 +#: library/ctypes.rst:2213 msgid "" -"If a bytes object is specified as first argument, the buffer is made one " -"item larger than its length so that the last element in the array is a NUL " -"termination character. An integer can be passed as second argument which " -"allows specifying the size of the array if the length of the bytes should " -"not be used." +"If the *init* argument is given, it must be :class:`bytes`. It is used to " +"initialize the array items. Bytes not initialized this way are set to zero " +"(NUL)." msgstr "" -#: library/ctypes.rst:1945 +#: library/ctypes.rst:2217 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " -"with arguments ``init``, ``size``." +"If *size* is not given (or if it is ``None``), the buffer is made one " +"element larger than *init*, effectively adding a NUL terminator." msgstr "" -#: library/ctypes.rst:1950 +#: library/ctypes.rst:2220 msgid "" -"This function creates a mutable unicode character buffer. The returned " -"object is a ctypes array of :class:`c_wchar`." +"If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: library/ctypes.rst:1953 +#: library/ctypes.rst:2224 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a string which will be used to initialize the array items." +"If *size* is equal to ``len(init)``, a NUL terminator is not added. Do not " +"treat such a buffer as a C string." msgstr "" -#: library/ctypes.rst:1956 +#: library/ctypes.rst:2227 +msgid "For example::" +msgstr "Par exemple ::" + +#: library/ctypes.rst:2242 msgid "" -"If a string is specified as first argument, the buffer is made one item " -"larger than the length of the string so that the last element in the array " -"is a NUL termination character. An integer can be passed as second argument " -"which allows specifying the size of the array if the length of the string " -"should not be used." +"Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " +"with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1962 +#: library/ctypes.rst:2248 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " -"with arguments ``init``, ``size``." +"This function creates a mutable unicode character buffer. The returned " +"object is a ctypes array of :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:1967 +#: library/ctypes.rst:2251 msgid "" -"Windows only: This function is a hook which allows implementing in-process " -"COM servers with ctypes. It is called from the DllCanUnloadNow function " -"that the _ctypes extension dll exports." +"The function takes the same arguments as :func:`~create_string_buffer` " +"except *init* must be a string and *size* counts :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:1974 +#: library/ctypes.rst:2254 msgid "" -"Windows only: This function is a hook which allows implementing in-process " -"COM servers with ctypes. It is called from the DllGetClassObject function " -"that the ``_ctypes`` extension dll exports." +"Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " +"with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1982 +#: library/ctypes.rst:2259 msgid "" -"Try to find a library and return a pathname. *name* is the library name " -"without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). " -"If no library can be found, returns ``None``." +"This function is a hook which allows implementing in-process COM servers " +"with ctypes. It is called from the DllCanUnloadNow function that the " +"_ctypes extension dll exports." msgstr "" -#: library/ctypes.rst:1993 +#: library/ctypes.rst:2268 msgid "" -"Windows only: return the filename of the VC runtime library used by Python, " -"and by the extension modules. If the name of the library cannot be " -"determined, ``None`` is returned." +"This function is a hook which allows implementing in-process COM servers " +"with ctypes. It is called from the DllGetClassObject function that the " +"``_ctypes`` extension dll exports." msgstr "" -#: library/ctypes.rst:1997 +#: library/ctypes.rst:2278 msgid "" -"If you need to free memory, for example, allocated by an extension module " -"with a call to the ``free(void *)``, it is important that you use the " -"function in the same library that allocated the memory." +"Try to provide a list of paths of the shared libraries loaded into the " +"current process. These paths are not normalized or processed in any way. " +"The function can raise :exc:`OSError` if the underlying platform APIs fail. " +"The exact functionality is system dependent." +msgstr "" + +#: library/ctypes.rst:2283 +msgid "" +"On most platforms, the first element of the list represents the current " +"executable file. It may be an empty string." msgstr "" -#: library/ctypes.rst:2004 +#: library/ctypes.rst:2291 msgid "" -"Windows only: Returns a textual description of the error code *code*. If no " -"error code is specified, the last error code is used by calling the Windows " -"api function GetLastError." +"Returns a textual description of the error code *code*. If no error code is " +"specified, the last error code is used by calling the Windows API " +"function :func:`GetLastError`." msgstr "" -#: library/ctypes.rst:2011 +#: library/ctypes.rst:2300 msgid "" -"Windows only: Returns the last error code set by Windows in the calling " -"thread. This function calls the Windows ``GetLastError()`` function " -"directly, it does not return the ctypes-private copy of the error code." +"Returns the last error code set by Windows in the calling thread. This " +"function calls the Windows ``GetLastError()`` function directly, it does not " +"return the ctypes-private copy of the error code." msgstr "" -#: library/ctypes.rst:2017 +#: library/ctypes.rst:2309 msgid "" -"Returns the current value of the ctypes-private copy of the system :data:" -"`errno` variable in the calling thread." +"Returns the current value of the ctypes-private copy of the " +"system :data:`errno` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2020 +#: library/ctypes.rst:2312 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2024 +#: library/ctypes.rst:2316 msgid "" -"Windows only: returns the current value of the ctypes-private copy of the " -"system :data:`!LastError` variable in the calling thread." +"Returns the current value of the ctypes-private copy of the system :data:`!" +"LastError` variable in the calling thread." msgstr "" -#: library/ctypes.rst:2027 +#: library/ctypes.rst:2321 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:2031 +#: library/ctypes.rst:2326 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: library/ctypes.rst:2038 +#: library/ctypes.rst:2333 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: library/ctypes.rst:2045 +#: library/ctypes.rst:2340 +msgid "" +"Create or return a ctypes pointer type. Pointer types are cached and reused " +"internally, so calling this function repeatedly is cheap. *type* must be a " +"ctypes type." +msgstr "" + +#: library/ctypes.rst:2346 msgid "" -"Create and return a new ctypes pointer type. Pointer types are cached and " -"reused internally, so calling this function repeatedly is cheap. *type* must " -"be a ctypes type." +"The resulting pointer type is cached in the ``__pointer_type__`` attribute " +"of *type*. It is possible to set this attribute before the first call to " +"``POINTER`` in order to set a custom pointer type. However, doing this is " +"discouraged: manually creating a suitable pointer type is difficult without " +"relying on implementation details that may change in future Python versions." msgstr "" -#: library/ctypes.rst:2052 +#: library/ctypes.rst:2357 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: library/ctypes.rst:2055 +#: library/ctypes.rst:2360 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: library/ctypes.rst:2061 +#: library/ctypes.rst:2366 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -2824,63 +3303,62 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2069 +#: library/ctypes.rst:2374 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: library/ctypes.rst:2072 +#: library/ctypes.rst:2377 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2077 +#: library/ctypes.rst:2382 msgid "" -"Windows only: set the current value of the ctypes-private copy of the " -"system :data:`!LastError` variable in the calling thread to *value* and " -"return the previous value." +"Sets the current value of the ctypes-private copy of the system :data:`!" +"LastError` variable in the calling thread to *value* and return the previous " +"value." msgstr "" -#: library/ctypes.rst:2081 +#: library/ctypes.rst:2388 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2086 +#: library/ctypes.rst:2393 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: library/ctypes.rst:2092 +#: library/ctypes.rst:2399 msgid "" "Return the byte string at *void \\*ptr*. If *size* is specified, it is used " "as size, otherwise the string is assumed to be zero-terminated." msgstr "" -#: library/ctypes.rst:2096 +#: library/ctypes.rst:2403 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"``name``, le nom de la bibliothèque (une chaîne de caractères), lève " +"un :ref:`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:2101 +#: library/ctypes.rst:2408 msgid "" -"Windows only: this function is probably the worst-named thing in ctypes. It " -"creates an instance of :exc:`OSError`. If *code* is not specified, " -"``GetLastError`` is called to determine the error code. If *descr* is not " -"specified, :func:`FormatError` is called to get a textual description of the " -"error." +"Creates an instance of :exc:`OSError`. If *code* is not " +"specified, :func:`GetLastError` is called to determine the error code. If " +"*descr* is not specified, :func:`FormatError` is called to get a textual " +"description of the error." msgstr "" -#: library/ctypes.rst:2107 +#: library/ctypes.rst:2415 #, fuzzy msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " @@ -2889,59 +3367,92 @@ msgstr "" "En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " "maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:2114 +#: library/ctypes.rst:2422 msgid "" "Return the wide-character string at *void \\*ptr*. If *size* is specified, " "it is used as the number of characters of the string, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: library/ctypes.rst:2119 +#: library/ctypes.rst:2427 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"``name``, le nom de la bibliothèque (une chaîne de caractères), lève " +"un :ref:`évènement d'audit ` ``ctypes.dlopen``." + +#: library/ctypes.rst:2432 +msgid "" +"Return a :class:`memoryview` object of length *size* that references memory " +"starting at *void \\*ptr*." +msgstr "" + +#: library/ctypes.rst:2435 +msgid "" +"If *readonly* is true, the returned :class:`!memoryview` object can not be " +"used to modify the underlying memory. (Changes made by other means will " +"still be reflected in the returned object.)" +msgstr "" + +#: library/ctypes.rst:2440 +msgid "" +"This function is similar to :func:`string_at` with the key difference of not " +"making a copy of the specified memory. It is a semantically equivalent (but " +"more efficient) alternative to ``memoryview((c_byte * " +"size).from_address(ptr))``. (While :meth:`~_CData.from_address` only takes " +"integers, *ptr* can also be given as a :class:`ctypes.POINTER` or " +"a :func:`~ctypes.byref` object.)" +msgstr "" + +#: library/ctypes.rst:2447 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " +"arguments ``address``, ``size``, ``readonly``." +msgstr "" +"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " +"``name``, le nom de la bibliothèque (une chaîne de caractères), lève " +"un :ref:`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:2125 +#: library/ctypes.rst:2455 msgid "Data types" msgstr "Types de données" -#: library/ctypes.rst:2130 +#: library/ctypes.rst:2460 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " -"hold C compatible data; the address of the memory block is returned by the :" -"func:`addressof` helper function. Another instance variable is exposed as :" -"attr:`_objects`; this contains other Python objects that need to be kept " +"hold C compatible data; the address of the memory block is returned by " +"the :func:`addressof` helper function. Another instance variable is exposed " +"as :attr:`_objects`; this contains other Python objects that need to be kept " "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2137 +#: library/ctypes.rst:2467 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: library/ctypes.rst:2142 +#: library/ctypes.rst:2472 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " "The optional *offset* parameter specifies an offset into the source buffer " -"in bytes; the default is zero. If the source buffer is not large enough a :" -"exc:`ValueError` is raised." +"in bytes; the default is zero. If the source buffer is not large enough " +"a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2158 +#: library/ctypes.rst:2488 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2152 +#: library/ctypes.rst:2482 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2949,19 +3460,20 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2162 +#: library/ctypes.rst:2492 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: library/ctypes.rst:2167 +#: library/ctypes.rst:2497 msgid "" -"This method, and others that indirectly call this method, raises an :ref:" -"`auditing event ` ``ctypes.cdata`` with argument ``address``." +"This method, and others that indirectly call this method, raises " +"an :ref:`auditing event ` ``ctypes.cdata`` with argument " +"``address``." msgstr "" -#: library/ctypes.rst:2173 +#: library/ctypes.rst:2503 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -2969,39 +3481,50 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2178 +#: library/ctypes.rst:2508 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: library/ctypes.rst:2184 +#: library/ctypes.rst:2514 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: library/ctypes.rst:2188 +#: library/ctypes.rst:2518 +msgid "Common class variables of ctypes data types:" +msgstr "" + +#: library/ctypes.rst:2522 +msgid "" +"The pointer type that was created by calling :func:`POINTER` for " +"corresponding ctypes data type. If a pointer type was not yet created, the " +"attribute is missing." +msgstr "" + +#: library/ctypes.rst:2528 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2192 +#: library/ctypes.rst:2532 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " -"instead they share part of the memory block of a base object. The :attr:" -"`_b_base_` read-only member is the root ctypes object that owns the memory " -"block." +"instead they share part of the memory block of a base object. " +"The :attr:`_b_base_` read-only member is the root ctypes object that owns " +"the memory block." msgstr "" -#: library/ctypes.rst:2199 +#: library/ctypes.rst:2539 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: library/ctypes.rst:2204 +#: library/ctypes.rst:2544 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -3009,20 +3532,20 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2217 +#: library/ctypes.rst:2557 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " -"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :" -"class:`_CData`, so it inherits their methods and attributes. ctypes data " +"fundamental ctypes data types. :class:`_SimpleCData` is a subclass " +"of :class:`_CData`, so it inherits their methods and attributes. ctypes data " "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2223 +#: library/ctypes.rst:2563 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2227 +#: library/ctypes.rst:2567 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -3030,15 +3553,44 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2232 +#: library/ctypes.rst:2572 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " -"new object is returned each time. :mod:`ctypes` does *not* implement " +"new object is returned each time. :mod:`!ctypes` does *not* implement " "original object return, always a new object is constructed. The same is " "true for all other ctypes object instances." msgstr "" -#: library/ctypes.rst:2238 +#: library/ctypes.rst:2577 +msgid "Each subclass has a class attribute:" +msgstr "" + +#: library/ctypes.rst:2581 +msgid "" +"Class attribute that contains an internal type code, as a single-character " +"string. See :ref:`ctypes-fundamental-data-types` for a summary." +msgstr "" + +#: library/ctypes.rst:2585 +msgid "" +"Types marked \\* in the summary may be (or always are) aliases of a " +"different :class:`_SimpleCData` subclass, and will not necessarily use the " +"listed type code. For example, if the " +"platform's :c:expr:`long`, :c:expr:`long long` and :c:expr:`time_t` C types " +"are the same, then :class:`c_long`, :class:`c_longlong` " +"and :class:`c_time_t` all refer to a single class, :class:`c_long`, " +"whose :attr:`_type_` code is ``'l'``. The ``'L'`` code will be unused." +msgstr "" + +#: library/ctypes.rst:2596 +msgid "" +"The :mod:`array` and :ref:`struct ` modules, as well as " +"third-party modules like `numpy `__, use similar -- but " +"slightly different -- type codes." +msgstr "" + +#: library/ctypes.rst:2601 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -3048,7 +3600,7 @@ msgid "" "instance." msgstr "" -#: library/ctypes.rst:2246 +#: library/ctypes.rst:2609 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`!restype` is a subclass of :class:`c_void_p`, you " @@ -3056,25 +3608,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2251 +#: library/ctypes.rst:2614 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2255 +#: library/ctypes.rst:2618 msgid "" "Represents the C :c:expr:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: library/ctypes.rst:2262 +#: library/ctypes.rst:2625 msgid "" "Represents the C :c:expr:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2269 +#: library/ctypes.rst:2632 msgid "" "Represents the C :c:expr:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -3082,310 +3634,453 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: library/ctypes.rst:2277 +#: library/ctypes.rst:2640 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2283 +#: library/ctypes.rst:2646 msgid "" "Represents the C :c:expr:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: library/ctypes.rst:2289 +#: library/ctypes.rst:2652 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2295 +#: library/ctypes.rst:2658 +msgid "" +"Represents the C :c:expr:`double complex` datatype, if available. The " +"constructor accepts an optional :class:`complex` initializer." +msgstr "" + +#: library/ctypes.rst:2666 +msgid "" +"Represents the C :c:expr:`float complex` datatype, if available. The " +"constructor accepts an optional :class:`complex` initializer." +msgstr "" + +#: library/ctypes.rst:2674 +msgid "" +"Represents the C :c:expr:`long double complex` datatype, if available. The " +"constructor accepts an optional :class:`complex` initializer." +msgstr "" + +#: library/ctypes.rst:2682 msgid "" "Represents the C :c:expr:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2302 +#: library/ctypes.rst:2689 msgid "" -"Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for :" -"class:`c_byte`." +"Represents the C 8-bit :c:expr:`signed int` datatype. It is an alias " +"for :class:`c_byte`." msgstr "" -#: library/ctypes.rst:2308 +#: library/ctypes.rst:2695 msgid "" "Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: library/ctypes.rst:2314 +#: library/ctypes.rst:2701 msgid "" "Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: library/ctypes.rst:2320 +#: library/ctypes.rst:2707 msgid "" "Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: library/ctypes.rst:2326 +#: library/ctypes.rst:2713 msgid "" "Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2332 +#: library/ctypes.rst:2719 msgid "" "Represents the C :c:expr:`signed long long` datatype. The constructor " -"accepts an optional integer initializer; no overflow checking is done." +"accepts an optional integer initializer; no overflow checking is done. On " +"platforms where ``sizeof(long long) == sizeof(long)`` it is an alias " +"to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2338 +#: library/ctypes.rst:2727 msgid "" "Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2344 -msgid "Represents the C :c:type:`size_t` datatype." +#: library/ctypes.rst:2733 +msgid "" +"Represents the C :c:type:`size_t` datatype. Usually an alias for another " +"unsigned integer type." msgstr "" -#: library/ctypes.rst:2349 -msgid "Represents the C :c:type:`ssize_t` datatype." +#: library/ctypes.rst:2739 +msgid "" +"Represents the :c:type:`Py_ssize_t` datatype. This is a signed version " +"of :c:type:`size_t`; that is, the POSIX :c:type:`ssize_t` type. Usually an " +"alias for another integer type." msgstr "" -#: library/ctypes.rst:2356 -msgid "Represents the C :c:type:`time_t` datatype." +#: library/ctypes.rst:2749 +msgid "" +"Represents the C :c:type:`time_t` datatype. Usually an alias for another " +"integer type." msgstr "" -#: library/ctypes.rst:2363 +#: library/ctypes.rst:2757 msgid "" "Represents the C :c:expr:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: library/ctypes.rst:2370 +#: library/ctypes.rst:2764 msgid "" "Represents the C :c:expr:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: library/ctypes.rst:2377 +#: library/ctypes.rst:2771 msgid "" -"Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias " +"Represents the C 8-bit :c:expr:`unsigned int` datatype. It is an alias " "for :class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2383 +#: library/ctypes.rst:2777 msgid "" "Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: library/ctypes.rst:2389 +#: library/ctypes.rst:2783 msgid "" "Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: library/ctypes.rst:2395 +#: library/ctypes.rst:2789 msgid "" "Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: library/ctypes.rst:2401 +#: library/ctypes.rst:2795 msgid "" "Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2407 +#: library/ctypes.rst:2801 msgid "" "Represents the C :c:expr:`unsigned long long` datatype. The constructor " -"accepts an optional integer initializer; no overflow checking is done." +"accepts an optional integer initializer; no overflow checking is done. On " +"platforms where ``sizeof(long long) == sizeof(long)`` it is an alias " +"to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2413 +#: library/ctypes.rst:2809 msgid "" "Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2419 +#: library/ctypes.rst:2815 msgid "" "Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: library/ctypes.rst:2425 +#: library/ctypes.rst:2821 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2432 +#: library/ctypes.rst:2828 msgid "" "Represents the C :c:expr:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: library/ctypes.rst:2439 +#: library/ctypes.rst:2835 msgid "" "Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: library/ctypes.rst:2446 +#: library/ctypes.rst:2842 msgid "" -"Windows only: Represents a :c:type:`!HRESULT` value, which contains success " -"or error information for a function or method call." +"Represents a :c:type:`!HRESULT` value, which contains success or error " +"information for a function or method call." msgstr "" -#: library/ctypes.rst:2452 +#: library/ctypes.rst:2850 msgid "" "Represents the C :c:expr:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: library/ctypes.rst:2455 +#: library/ctypes.rst:2853 +msgid ":class:`!py_object` is now a :term:`generic type`." +msgstr "" + +#: library/ctypes.rst:2858 msgid "" "The :mod:`!ctypes.wintypes` module provides quite some other Windows " -"specific data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:" -"type:`!DWORD`. Some useful structures like :c:type:`!MSG` or :c:type:`!RECT` " -"are also defined." +"specific data types, for example :c:type:`!HWND`, :c:type:`!" +"WPARAM`, :c:type:`!VARIANT_BOOL` or :c:type:`!DWORD`. Some useful structures " +"like :c:type:`!MSG` or :c:type:`!RECT` are also defined." msgstr "" -#: library/ctypes.rst:2463 +#: library/ctypes.rst:2867 msgid "Structured data types" msgstr "Types de données dérivés de Structure" -#: library/ctypes.rst:2468 +#: library/ctypes.rst:2872 msgid "Abstract base class for unions in native byte order." msgstr "" -#: library/ctypes.rst:2473 +#: library/ctypes.rst:2874 +msgid "" +"Unions share common attributes and behavior with structures; " +"see :class:`Structure` documentation for details." +msgstr "" + +#: library/ctypes.rst:2879 #, fuzzy msgid "Abstract base class for unions in *big endian* byte order." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2479 +#: library/ctypes.rst:2885 #, fuzzy msgid "Abstract base class for unions in *little endian* byte order." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2485 +#: library/ctypes.rst:2891 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2490 +#: library/ctypes.rst:2896 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2492 +#: library/ctypes.rst:2898 msgid "" "Structures and unions with non-native byte order cannot contain pointer type " "fields, or any other data types containing pointer type fields." msgstr "" -#: library/ctypes.rst:2498 +#: library/ctypes.rst:2904 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2500 +#: library/ctypes.rst:2906 msgid "" "Concrete structure and union types must be created by subclassing one of " -"these types, and at least define a :attr:`_fields_` class variable. :mod:" -"`ctypes` will create :term:`descriptor`\\s which allow reading and writing " +"these types, and at least define a :attr:`_fields_` class variable. :mod:`!" +"ctypes` will create :term:`descriptor`\\s which allow reading and writing " "the fields by direct attribute accesses. These are the" msgstr "" -#: library/ctypes.rst:2508 +#: library/ctypes.rst:2914 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: library/ctypes.rst:2512 +#: library/ctypes.rst:2918 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: library/ctypes.rst:2516 +#: library/ctypes.rst:2922 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: library/ctypes.rst:2519 +#: library/ctypes.rst:2925 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: library/ctypes.rst:2529 +#: library/ctypes.rst:2935 +msgid "" +"The :attr:`!_fields_` class variable can only be set once. Later assignments " +"will raise an :exc:`AttributeError`." +msgstr "" + +#: library/ctypes.rst:2938 msgid "" -"The :attr:`_fields_` class variable must, however, be defined before the " -"type is first used (an instance is created, :func:`sizeof` is called on it, " -"and so on). Later assignments to the :attr:`_fields_` class variable will " -"raise an AttributeError." +"Additionally, the :attr:`!_fields_` class variable must be defined before " +"the structure or union type is first used: an instance or subclass is " +"created, :func:`sizeof` is called on it, and so on. Later assignments " +"to :attr:`!_fields_` will raise an :exc:`AttributeError`. If :attr:`!" +"_fields_` has not been set before such use, the structure or union will have " +"no own fields, as if :attr:`!_fields_` was empty." msgstr "" -#: library/ctypes.rst:2534 +#: library/ctypes.rst:2946 msgid "" -"It is possible to define sub-subclasses of structure types, they inherit the " -"fields of the base class plus the :attr:`_fields_` defined in the sub-" -"subclass, if any." +"Sub-subclasses of structure types inherit the fields of the base class plus " +"the :attr:`_fields_` defined in the sub-subclass, if any." msgstr "" -#: library/ctypes.rst:2541 +#: library/ctypes.rst:2952 msgid "" "An optional small integer that allows overriding the alignment of structure " -"fields in the instance. :attr:`_pack_` must already be defined when :attr:" -"`_fields_` is assigned, otherwise it will have no effect. Setting this " -"attribute to 0 is the same as not setting it at all." +"fields in the instance." msgstr "" -#: library/ctypes.rst:2549 +#: library/ctypes.rst:2955 msgid "" -"An optional small integer that allows overriding the alignment of the " -"structure when being packed or unpacked to/from memory. Setting this " -"attribute to 0 is the same as not setting it at all." +"This is only implemented for the MSVC-compatible memory layout " +"(see :attr:`_layout_`)." msgstr "" -#: library/ctypes.rst:2557 +#: library/ctypes.rst:2958 msgid "" -"An optional sequence that lists the names of unnamed (anonymous) fields. :" -"attr:`_anonymous_` must be already defined when :attr:`_fields_` is " +"Setting :attr:`!_pack_` to 0 is the same as not setting it at all. " +"Otherwise, the value must be a positive power of two. The effect is " +"equivalent to ``#pragma pack(N)`` in C, except :mod:`!ctypes` may allow " +"larger *n* than what the compiler accepts." +msgstr "" + +#: library/ctypes.rst:2963 +msgid "" +":attr:`!_pack_` must already be defined when :attr:`_fields_` is assigned, " +"otherwise it will have no effect." +msgstr "" + +#: library/ctypes.rst:2968 +msgid "" +"For historical reasons, if :attr:`!_pack_` is non-zero, the MSVC-compatible " +"layout will be used by default. On non-Windows platforms, this default is " +"deprecated and is slated to become an error in Python 3.19. If it is " +"intended, set :attr:`~Structure._layout_` to ``'ms'`` explicitly." +msgstr "" + +#: library/ctypes.rst:2977 +msgid "" +"An optional small integer that allows increasing the alignment of the " +"structure when being packed or unpacked to/from memory." +msgstr "" + +#: library/ctypes.rst:2980 +msgid "" +"The value must not be negative. The effect is equivalent to " +"``__attribute__((aligned(N)))`` on GCC or ``#pragma align(N)`` on MSVC, " +"except :mod:`!ctypes` may allow values that the compiler would reject." +msgstr "" + +#: library/ctypes.rst:2985 +msgid "" +":attr:`!_align_` can only *increase* a structure's alignment requirements. " +"Setting it to 0 or 1 has no effect." +msgstr "" + +#: library/ctypes.rst:2988 +msgid "" +"Using values that are not powers of two is discouraged and may lead to " +"surprising behavior." +msgstr "" + +#: library/ctypes.rst:2991 +msgid "" +":attr:`!_align_` must already be defined when :attr:`_fields_` is assigned, " +"otherwise it will have no effect." +msgstr "" + +#: library/ctypes.rst:2998 +msgid "" +"An optional string naming the struct/union layout. It can currently be set " +"to:" +msgstr "" + +#: library/ctypes.rst:3001 +msgid "" +"``\"ms\"``: the layout used by the Microsoft compiler (MSVC). On GCC and " +"Clang, this layout can be selected with ``__attribute__((ms_struct))``." +msgstr "" + +#: library/ctypes.rst:3004 +msgid "" +"``\"gcc-sysv\"``: the layout used by GCC with the System V or “SysV-like” " +"data model, as used on Linux and macOS. With this " +"layout, :attr:`~Structure._pack_` must be unset or zero." +msgstr "" + +#: library/ctypes.rst:3008 +msgid "" +"If not set explicitly, ``ctypes`` will use a default that matches the " +"platform conventions. This default may change in future Python releases (for " +"example, when a new platform gains official support, or when a difference " +"between similar platforms is found). Currently the default will be:" +msgstr "" + +#: library/ctypes.rst:3014 +msgid "On Windows: ``\"ms\"``" +msgstr "" + +#: library/ctypes.rst:3015 +msgid "" +"When :attr:`~Structure._pack_` is specified: ``\"ms\"``. (This is " +"deprecated; see :attr:`~Structure._pack_` documentation.)" +msgstr "" + +#: library/ctypes.rst:3017 +msgid "Otherwise: ``\"gcc-sysv\"``" +msgstr "" + +#: library/ctypes.rst:3019 +msgid "" +":attr:`!_layout_` must already be defined when :attr:`~Structure._fields_` " +"is assigned, otherwise it will have no effect." +msgstr "" + +#: library/ctypes.rst:3026 +msgid "" +"An optional sequence that lists the names of unnamed (anonymous) " +"fields. :attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2561 +#: library/ctypes.rst:3030 msgid "" -"The fields listed in this variable must be structure or union type fields. :" -"mod:`ctypes` will create descriptors in the structure type that allows " -"accessing the nested fields directly, without the need to create the " +"The fields listed in this variable must be structure or union type " +"fields. :mod:`!ctypes` will create descriptors in the structure type that " +"allows accessing the nested fields directly, without the need to create the " "structure or union field." msgstr "" -#: library/ctypes.rst:2566 +#: library/ctypes.rst:3035 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2579 +#: library/ctypes.rst:3048 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3395,15 +4090,15 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2591 +#: library/ctypes.rst:3060 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " -"fields of the base class. If the subclass definition has a separate :attr:" -"`_fields_` variable, the fields specified in this are appended to the fields " -"of the base class." +"fields of the base class. If the subclass definition has a " +"separate :attr:`_fields_` variable, the fields specified in this are " +"appended to the fields of the base class." msgstr "" -#: library/ctypes.rst:2596 +#: library/ctypes.rst:3065 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3413,82 +4108,352 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2607 +#: library/ctypes.rst:3075 +msgid "" +"Descriptor for fields of a :class:`Structure` and :class:`Union`. For " +"example::" +msgstr "" + +#: library/ctypes.rst:3098 +msgid "All attributes are read-only." +msgstr "" + +#: library/ctypes.rst:3100 +msgid "" +":class:`!CField` objects are created via :attr:`~Structure._fields_`; do not " +"instantiate the class directly." +msgstr "" + +#: library/ctypes.rst:3105 +msgid "" +"Previously, descriptors only had ``offset`` and ``size`` attributes and a " +"readable string representation; the :class:`!CField` class was not available " +"directly." +msgstr "" + +#: library/ctypes.rst:3111 +msgid "Name of the field, as a string." +msgstr "" + +#: library/ctypes.rst:3115 +msgid "Type of the field, as a :ref:`ctypes class `." +msgstr "" + +#: library/ctypes.rst:3120 +msgid "Offset of the field, in bytes." +msgstr "" + +#: library/ctypes.rst:3122 +msgid "" +"For bitfields, this is the offset of the underlying byte-aligned *storage " +"unit*; see :attr:`~CField.bit_offset`." +msgstr "" + +#: library/ctypes.rst:3127 +msgid "Size of the field, in bytes." +msgstr "" + +#: library/ctypes.rst:3129 +msgid "" +"For bitfields, this is the size of the underlying *storage unit*. Typically, " +"it has the same size as the bitfield's type." +msgstr "" + +#: library/ctypes.rst:3134 +msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." +msgstr "" + +#: library/ctypes.rst:3136 +msgid "" +"For bitfields, this contains a backwards-compatible bit-packed value that " +"combines :attr:`~CField.bit_size` and :attr:`~CField.bit_offset`. Prefer " +"using the explicit attributes instead." +msgstr "" + +#: library/ctypes.rst:3143 +msgid "True if this is a bitfield." +msgstr "" + +#: library/ctypes.rst:3148 +msgid "" +"The location of a bitfield within its *storage unit*, that is, " +"within :attr:`~CField.byte_size` bytes of memory starting " +"at :attr:`~CField.byte_offset`." +msgstr "" + +#: library/ctypes.rst:3152 +msgid "" +"To get the field's value, read the storage unit as an integer, :ref:`shift " +"left ` by :attr:`!bit_offset` and take the :attr:`!bit_size` least " +"significant bits." +msgstr "" + +#: library/ctypes.rst:3156 +msgid "" +"For non-bitfields, :attr:`!bit_offset` is zero and :attr:`!bit_size` is " +"equal to ``byte_size * 8``." +msgstr "" + +#: library/ctypes.rst:3161 +msgid "" +"True if this field is anonymous, that is, it contains nested sub-fields that " +"should be merged into a containing structure or union." +msgstr "" + +#: library/ctypes.rst:3168 msgid "Arrays and pointers" msgstr "Tableaux et pointeurs" -#: library/ctypes.rst:2611 +#: library/ctypes.rst:3172 msgid "Abstract base class for arrays." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2613 +#: library/ctypes.rst:3174 msgid "" -"The recommended way to create concrete array types is by multiplying any :" -"mod:`ctypes` data type with a non-negative integer. Alternatively, you can " -"subclass this type and define :attr:`_length_` and :attr:`_type_` class " -"variables. Array elements can be read and written using standard subscript " -"and slice accesses; for slice reads, the resulting object is *not* itself " -"an :class:`Array`." +"The recommended way to create concrete array types is by multiplying " +"any :mod:`!ctypes` data type with a non-negative integer. Alternatively, " +"you can subclass this type and define :attr:`_length_` and :attr:`_type_` " +"class variables. Array elements can be read and written using standard " +"subscript and slice accesses; for slice reads, the resulting object is *not* " +"itself an :class:`Array`." +msgstr "" + +#: library/ctypes.rst:3181 +msgid "Arrays are :ref:`generic ` over the type of their elements." msgstr "" -#: library/ctypes.rst:2623 +#: library/ctypes.rst:3186 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" -"range subscripts result in an :exc:`IndexError`. Will be returned by :func:" -"`len`." +"range subscripts result in an :exc:`IndexError`. Will be returned " +"by :func:`len`." msgstr "" -#: library/ctypes.rst:2630 +#: library/ctypes.rst:3193 msgid "Specifies the type of each element in the array." msgstr "Spécifie le type de chaque élément de l'*array*." -#: library/ctypes.rst:2633 +#: library/ctypes.rst:3196 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:2638 +#: library/ctypes.rst:3201 msgid "" -"Create an array. Equivalent to ``type * length``, where *type* is a :mod:" -"`ctypes` data type and *length* an integer." +"Create an array. Equivalent to ``type * length``, where *type* is a :mod:`!" +"ctypes` data type and *length* an integer." msgstr "" -#: library/ctypes.rst:2642 -msgid "" -"This function is :term:`soft deprecated` in favor of multiplication. There " -"are no plans to remove it." +#: library/ctypes.rst:3205 +msgid "In favor of multiplication." msgstr "" -#: library/ctypes.rst:2648 +#: library/ctypes.rst:3211 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:2650 +#: library/ctypes.rst:3213 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: library/ctypes.rst:2654 +#: library/ctypes.rst:3217 msgid "" "If a pointer points to an array, its elements can be read and written using " -"standard subscript and slice accesses. Pointer objects have no size, so :" -"func:`len` will raise :exc:`TypeError`. Negative subscripts will read from " -"the memory *before* the pointer (as in C), and out-of-range subscripts will " -"probably crash with an access violation (if you're lucky)." +"standard subscript and slice accesses. Pointer objects have no size, " +"so :func:`len` will raise :exc:`TypeError`. Negative subscripts will read " +"from the memory *before* the pointer (as in C), and out-of-range subscripts " +"will probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:2664 +#: library/ctypes.rst:3227 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:2668 +#: library/ctypes.rst:3231 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" +#: library/ctypes.rst:3238 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/ctypes.rst:3242 +msgid "" +"This exception is raised when a foreign function call cannot convert one of " +"the passed arguments." +msgstr "" +"Exception levée quand un appel à la fonction externe ne peut pas convertir " +"un des arguments qu'elle a reçus." + +#: library/ctypes.rst:3248 +#, fuzzy +msgid "This exception is raised when a COM method call failed." +msgstr "" +"Exception levée quand un appel à la fonction externe ne peut pas convertir " +"un des arguments qu'elle a reçus." + +#: library/ctypes.rst:3252 +msgid "The integer value representing the error code." +msgstr "" + +#: library/ctypes.rst:3256 +msgid "The error message." +msgstr "" + +#: library/ctypes.rst:3260 +msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." +msgstr "" + +#: library/ctypes.rst:3262 +msgid "" +"*descr* is the textual description. *source* is the language-dependent " +"``ProgID`` for the class or application that raised the error. *helpfile* " +"is the path of the help file. *helpcontext* is the help context " +"identifier. *progid* is the ``ProgID`` of the interface that defined the " +"error." +msgstr "" + +#~ msgid "" +#~ "Note: The code samples in this tutorial use :mod:`doctest` to make sure " +#~ "that they actually work. Since some code samples behave differently " +#~ "under Linux, Windows, or macOS, they contain doctest directives in " +#~ "comments." +#~ msgstr "" +#~ "Remarque : les exemples de code de ce didacticiel " +#~ "utilisent :mod:`doctest` pour s'assurer de leur propre bon " +#~ "fonctionnement. Vu que certains de ces exemples ont un comportement " +#~ "différent en Linux, Windows ou macOS, ils contiennent des directives " +#~ "*doctest* dans les commentaires." + +#~ msgid "bool (1)" +#~ msgstr "*bool* (1)" + +#~ msgid "int" +#~ msgstr "*int*" + +#, fuzzy +#~ msgid ":c:expr:`__int64` or :c:expr:`long long`" +#~ msgstr ":c:type:`__int64` ou :c:type:`long long`" + +#, fuzzy +#~ msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" +#~ msgstr ":c:type:`unsigned __int64` ou :c:type:`unsigned long long`" + +#, fuzzy +#~ msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" +#~ msgstr ":c:type:`ssize_t` ou :c:type:`Py_ssize_t`" + +#~ msgid "float" +#~ msgstr "*float*" + +#~ msgid "The constructor accepts any object with a truth value." +#~ msgstr "" +#~ "Le constructeur accepte n'importe quel objet convertible en booléen." + +#~ msgid "" +#~ "When programming in a compiled language, shared libraries are accessed " +#~ "when compiling/linking a program, and when the program is run." +#~ msgstr "" +#~ "Les langages compilés ont besoin d'accéder aux bibliothèques partagées au " +#~ "moment de la compilation, de l'édition de liens et pendant l'exécution du " +#~ "programme." + +#, fuzzy +#~ msgid "" +#~ "The purpose of the :func:`~ctypes.util.find_library` function is to " +#~ "locate a library in a way similar to what the compiler or runtime loader " +#~ "does (on platforms with several versions of a shared library the most " +#~ "recent should be loaded), while the ctypes library loaders act like when " +#~ "a program is run, and call the runtime loader directly." +#~ msgstr "" +#~ "Le but de la fonction :func:`find_library` est de trouver une " +#~ "bibliothèque de la même façon que le ferait le compilateur ou le chargeur " +#~ "(sur les plates-formes avec plusieurs versions de la même bibliothèque, " +#~ "la plus récente est chargée), alors que les chargeurs de bibliothèques de " +#~ "*ctypes* se comportent de la même façon qu'un programme qui s'exécute, et " +#~ "appellent directement le chargeur." + +#, fuzzy +#~ msgid "" +#~ "The :mod:`!ctypes.util` module provides a function which can help to " +#~ "determine the library to load." +#~ msgstr "" +#~ "Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " +#~ "bibliothèque charger." + +#~ msgid "The exact functionality is system dependent." +#~ msgstr "Le mode opératoire exact dépend du système." + +#, fuzzy +#~ msgid "" +#~ "Instances of this class represent loaded shared libraries. Functions in " +#~ "these libraries use the standard C calling convention, and are assumed to " +#~ "return :c:expr:`int`." +#~ msgstr "" +#~ "Une instance de cette classe représente une bibliothèque partagée déjà " +#~ "chargée. Les fonctions de cette bibliothèque utilisent la convention " +#~ "d'appel C standard et doivent renvoyer un :c:type:`int`." + +#~ msgid "" +#~ "The Python :term:`global interpreter lock` is released before calling any " +#~ "function exported by these libraries, and reacquired afterwards." +#~ msgstr "" +#~ "Le :term:`verrou global de l'interpréteur ` " +#~ "Python est relâché avant chaque appel d'une fonction exposée par ces " +#~ "bibliothèques et ré-activé après." + +#, fuzzy +#~ msgid "" +#~ "All these classes can be instantiated by calling them with at least one " +#~ "argument, the pathname of the shared library. If you have an existing " +#~ "handle to an already loaded shared library, it can be passed as the " +#~ "``handle`` named parameter, otherwise the underlying platform's :c:func:`!" +#~ "dlopen` or :c:func:`!LoadLibrary` function is used to load the library " +#~ "into the process, and to get a handle to it." +#~ msgstr "" +#~ "Toutes ces classes peuvent être instanciées en les appelant avec le " +#~ "chemin de la bibliothèque partagée comme unique argument. Il est aussi " +#~ "possible de passer un lien vers une bibliothèque déjà chargée en " +#~ "utilisant le paramètre ``handle``. Sinon, les fonctions ``dlopen`` ou " +#~ "``LoadLibrary`` de la plate-forme sous-jacente permettent de charger la " +#~ "bibliothèque dans le processus, et d'en obtenir un lien." + +#~ msgid "" +#~ "For accessing the C Python api directly, a ready-to-use Python shared " +#~ "library object is available:" +#~ msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" + +#, fuzzy +#~ msgid "" +#~ "By default, Structure and Union fields are aligned in the same way the C " +#~ "compiler does it. It is possible to override this behavior by specifying " +#~ "a :attr:`~Structure._pack_` class attribute in the subclass definition. " +#~ "This must be set to a positive integer and specifies the maximum " +#~ "alignment for the fields. This is what ``#pragma pack(n)`` also does in " +#~ "MSVC. It is also possible to set a minimum alignment for how the subclass " +#~ "itself is packed in the same way ``#pragma align(n)`` works in MSVC. This " +#~ "can be achieved by specifying a ::attr:`~Structure._align_` class " +#~ "attribute in the subclass definition." +#~ msgstr "" +#~ "Par défaut les champs d'une *Structure* ou d'une *Union* sont alignés de " +#~ "la même manière que le ferait un compilateur C. Ce comportement peut être " +#~ "redéfini en définissant l'attribut :attr:`_pack_` dans la définition de " +#~ "la sous-classe. Ce champ doit être un entier positif et vaut l'alignement " +#~ "maximal des champs. C'est ce que fait ``#pragma pack(n)`` pour MSVC." + +#~ msgid "Windows only: Creates :class:`WinDLL` instances." +#~ msgstr "" +#~ "Pour créer des instances de :class:`WinDLL` (uniquement en Windows)." + +#~ msgid "Windows only: Creates :class:`OleDLL` instances." +#~ msgstr "" +#~ "Pour créer des instances de :class:`OleDLL` (uniquement en Windows)." + #~ msgid "" #~ "If the interpreter would have been started with :option:`-O`, the sample " #~ "would have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would " @@ -3513,8 +4478,8 @@ msgstr "" #~ "arguments ``handle``, ``name``." #~ msgstr "" #~ "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -#~ "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :" -#~ "ref:`évènement d'audit ` ``ctypes.dlopen``." +#~ "``name``, le nom de la bibliothèque (une chaîne de caractères), lève " +#~ "un :ref:`évènement d'audit ` ``ctypes.dlopen``." #, fuzzy #~ msgid "" diff --git a/library/curses.ascii.po b/library/curses.ascii.po index 9e02aa483..78d62ac5f 100644 --- a/library/curses.ascii.po +++ b/library/curses.ascii.po @@ -5,308 +5,360 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-24 08:25+0200\n" +"Last-Translator: Julien Palard \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.6\n" #: library/curses.ascii.rst:2 msgid ":mod:`!curses.ascii` --- Utilities for ASCII characters" -msgstr "" +msgstr ":mod:`!curses.ascii` — Utilitaires pour les caractères ASCII" -#: library/curses.ascii.rst:10 +#: library/curses.ascii.rst:7 msgid "**Source code:** :source:`Lib/curses/ascii.py`" -msgstr "" +msgstr "**Code source :** :source:`Lib/curses/ascii.py`" -#: library/curses.ascii.rst:14 +#: library/curses.ascii.rst:11 +#, fuzzy msgid "" -"The :mod:`curses.ascii` module supplies name constants for ASCII characters " +"The :mod:`!curses.ascii` module supplies name constants for ASCII characters " "and functions to test membership in various ASCII character classes. The " "constants supplied are names for control characters as follows:" msgstr "" +"Le module :mod:`curses.ascii` fournit des constantes de nom pour les " +"caractères ASCII et des fonctions permettant de tester l'appartenance à " +"différentes classes de caractères ASCII. Les constantes fournies sont des " +"noms pour les caractères de contrôle comme suit :" -#: library/curses.ascii.rst:19 +#: library/curses.ascii.rst:16 msgid "Name" msgstr "Nom" -#: library/curses.ascii.rst:19 +#: library/curses.ascii.rst:16 msgid "Meaning" msgstr "Signification" -#: library/curses.ascii.rst:23 +#: library/curses.ascii.rst:20 msgid "Start of heading, console interrupt" -msgstr "" +msgstr "Début d'en-tête, interruption de console" -#: library/curses.ascii.rst:25 +#: library/curses.ascii.rst:22 msgid "Start of text" -msgstr "" +msgstr "Début du texte" -#: library/curses.ascii.rst:27 +#: library/curses.ascii.rst:24 msgid "End of text" -msgstr "" +msgstr "Fin du texte" -#: library/curses.ascii.rst:29 +#: library/curses.ascii.rst:26 msgid "End of transmission" -msgstr "" +msgstr "Fin de transmission" -#: library/curses.ascii.rst:31 +#: library/curses.ascii.rst:28 msgid "Enquiry, goes with :const:`ACK` flow control" -msgstr "" +msgstr "Enquête, va avec le contrôle de flux :const:`ACK`" -#: library/curses.ascii.rst:33 -#, fuzzy +#: library/curses.ascii.rst:30 msgid "Acknowledgement" -msgstr "Remerciements" +msgstr "Accusé de réception" -#: library/curses.ascii.rst:35 +#: library/curses.ascii.rst:32 msgid "Bell" -msgstr "" +msgstr "Caractère d'appel" -#: library/curses.ascii.rst:37 +#: library/curses.ascii.rst:34 msgid "Backspace" -msgstr "" +msgstr "Retour arrière" -#: library/curses.ascii.rst:39 +#: library/curses.ascii.rst:36 msgid "Tab" -msgstr "" +msgstr "Tabulation" -#: library/curses.ascii.rst:41 +#: library/curses.ascii.rst:38 msgid "Alias for :const:`TAB`: \"Horizontal tab\"" -msgstr "" +msgstr "Alias pour :const:`TAB`: « Tabulation horizontale »" -#: library/curses.ascii.rst:43 +#: library/curses.ascii.rst:40 msgid "Line feed" -msgstr "" +msgstr "Saut de ligne" -#: library/curses.ascii.rst:45 +#: library/curses.ascii.rst:42 msgid "Alias for :const:`LF`: \"New line\"" -msgstr "" +msgstr "Alias pour :const:`LF`: « Nouvelle ligne »" -#: library/curses.ascii.rst:47 +#: library/curses.ascii.rst:44 msgid "Vertical tab" -msgstr "" +msgstr "Tabulation verticale" -#: library/curses.ascii.rst:49 +#: library/curses.ascii.rst:46 msgid "Form feed" -msgstr "" +msgstr "Saut de page" -#: library/curses.ascii.rst:51 +#: library/curses.ascii.rst:48 msgid "Carriage return" msgstr "Retour chariot" -#: library/curses.ascii.rst:53 +#: library/curses.ascii.rst:50 msgid "Shift-out, begin alternate character set" -msgstr "" +msgstr "Bascule vers l’ensemble de caractères alternatif" -#: library/curses.ascii.rst:55 +#: library/curses.ascii.rst:52 msgid "Shift-in, resume default character set" -msgstr "" +msgstr "Reprise de l'ensemble de caractères par défaut" -#: library/curses.ascii.rst:57 +#: library/curses.ascii.rst:54 msgid "Data-link escape" -msgstr "" +msgstr "Échappement de liaison de données" -#: library/curses.ascii.rst:59 +#: library/curses.ascii.rst:56 msgid "XON, for flow control" -msgstr "" +msgstr "XON, pour le contrôle de flux" -#: library/curses.ascii.rst:61 +#: library/curses.ascii.rst:58 msgid "Device control 2, block-mode flow control" -msgstr "" +msgstr "Contrôle de périphérique 2, contrôle de flux en mode bloc" -#: library/curses.ascii.rst:63 +#: library/curses.ascii.rst:60 msgid "XOFF, for flow control" -msgstr "" +msgstr "XOFF, pour le contrôle de flux" -#: library/curses.ascii.rst:65 +#: library/curses.ascii.rst:62 msgid "Device control 4" -msgstr "" +msgstr "Contrôle de périphérique 4" -#: library/curses.ascii.rst:67 +#: library/curses.ascii.rst:64 msgid "Negative acknowledgement" -msgstr "" +msgstr "Accusé de réception négatif" -#: library/curses.ascii.rst:69 +#: library/curses.ascii.rst:66 msgid "Synchronous idle" -msgstr "" +msgstr "Inactif synchrone" -#: library/curses.ascii.rst:71 +#: library/curses.ascii.rst:68 msgid "End transmission block" -msgstr "" +msgstr "Fin du bloc de transmission" -#: library/curses.ascii.rst:73 +#: library/curses.ascii.rst:70 msgid "Cancel" -msgstr "" +msgstr "Annuler" -#: library/curses.ascii.rst:75 +#: library/curses.ascii.rst:72 msgid "End of medium" -msgstr "" +msgstr "Fin du médium" -#: library/curses.ascii.rst:77 +#: library/curses.ascii.rst:74 msgid "Substitute" -msgstr "" +msgstr "Substitut" -#: library/curses.ascii.rst:79 +#: library/curses.ascii.rst:76 msgid "Escape" -msgstr "" +msgstr "Échappement" -#: library/curses.ascii.rst:81 +#: library/curses.ascii.rst:78 msgid "File separator" msgstr "Séparateur de fichiers" -#: library/curses.ascii.rst:83 +#: library/curses.ascii.rst:80 msgid "Group separator" msgstr "Séparateur de groupe" -#: library/curses.ascii.rst:85 +#: library/curses.ascii.rst:82 msgid "Record separator, block-mode terminator" -msgstr "" +msgstr "Séparateur d'enregistrement, terminateur en mode bloc" -#: library/curses.ascii.rst:87 +#: library/curses.ascii.rst:84 msgid "Unit separator" -msgstr "" +msgstr "Séparateur d'unités" -#: library/curses.ascii.rst:89 +#: library/curses.ascii.rst:86 msgid "Space" -msgstr "" +msgstr "Espace" -#: library/curses.ascii.rst:91 +#: library/curses.ascii.rst:88 msgid "Delete" -msgstr "" +msgstr "Caractère d'effacement" -#: library/curses.ascii.rst:94 +#: library/curses.ascii.rst:91 msgid "" "Note that many of these have little practical significance in modern usage. " "The mnemonics derive from teleprinter conventions that predate digital " "computers." msgstr "" +"Notez que beaucoup d'entre elles ont peu de signification pratique dans " +"l'utilisation moderne. Les mnémoniques proviennent de conventions de " +"téléscripteur qui préexistent aux ordinateurs numériques." -#: library/curses.ascii.rst:97 +#: library/curses.ascii.rst:94 msgid "" "The module supplies the following functions, patterned on those in the " "standard C library:" msgstr "" +"Le module fournit les fonctions suivantes, basées sur celles de la " +"bibliothèque C standard :" -#: library/curses.ascii.rst:103 +#: library/curses.ascii.rst:100 msgid "" "Checks for an ASCII alphanumeric character; it is equivalent to ``isalpha(c) " "or isdigit(c)``." msgstr "" +"Vérifie si un caractère ASCII est alphanumérique ; il est équivalent à " +"``isalpha(c) or isdigit(c)``." -#: library/curses.ascii.rst:109 +#: library/curses.ascii.rst:106 msgid "" "Checks for an ASCII alphabetic character; it is equivalent to ``isupper(c) " "or islower(c)``." msgstr "" +"Vérifie si un caractère ASCII est alphanumérique ; il est équivalent à " +"``isupper(c) or islower(c)``." -#: library/curses.ascii.rst:115 +#: library/curses.ascii.rst:112 msgid "Checks for a character value that fits in the 7-bit ASCII set." msgstr "" +"Vérifie si une valeur de caractère appartient à l'ensemble ASCII 7 bits." -#: library/curses.ascii.rst:120 +#: library/curses.ascii.rst:117 msgid "Checks for an ASCII whitespace character; space or horizontal tab." msgstr "" +"Vérifie si un caractère ASCII est caractère d'espacement, spécifiquement : " +"espace ou tabulation horizontale." -#: library/curses.ascii.rst:125 +#: library/curses.ascii.rst:122 msgid "" "Checks for an ASCII control character (in the range 0x00 to 0x1f or 0x7f)." msgstr "" +"Vérifie si un caractère ASCII est un caractère de contrôle (dans la plage de " +"0x00 à 0x1f ou 0x7f)." -#: library/curses.ascii.rst:130 +#: library/curses.ascii.rst:127 msgid "" "Checks for an ASCII decimal digit, ``'0'`` through ``'9'``. This is " "equivalent to ``c in string.digits``." msgstr "" +"Vérifie si un caractère ASCII est un chiffre décimal, de ``'0'`` à ``'9'``. " +"C'est équivalent à ``c in string.digits``." -#: library/curses.ascii.rst:136 +#: library/curses.ascii.rst:133 msgid "Checks for ASCII any printable character except space." msgstr "" +"Vérifie si un caractère ASCII est n'importe quel caractère imprimable à " +"l'exception de l'espace." -#: library/curses.ascii.rst:141 +#: library/curses.ascii.rst:138 msgid "Checks for an ASCII lower-case character." -msgstr "" +msgstr "Vérifie si un caractère ASCII est une lettre minuscule." -#: library/curses.ascii.rst:146 +#: library/curses.ascii.rst:143 msgid "Checks for any ASCII printable character including space." msgstr "" +"Vérifie si un caractère ASCII est n'importe quel caractère imprimable, y " +"compris l'espace." -#: library/curses.ascii.rst:151 +#: library/curses.ascii.rst:148 msgid "" "Checks for any printable ASCII character which is not a space or an " "alphanumeric character." msgstr "" +"Vérifie si un caractère ASCII imprimable n'est ni une espace ni un caractère " +"alphanumérique." -#: library/curses.ascii.rst:157 +#: library/curses.ascii.rst:154 msgid "" "Checks for ASCII white-space characters; space, line feed, carriage return, " "form feed, horizontal tab, vertical tab." msgstr "" +"Vérifie si un caractère ASCII est un caractère d'espacement, " +"spécifiquement : espace, saut de ligne, retour chariot, saut de page, " +"tabulation horizontale, ou tabulation verticale." -#: library/curses.ascii.rst:163 +#: library/curses.ascii.rst:160 msgid "Checks for an ASCII uppercase letter." -msgstr "" +msgstr "Vérifie si un caractère ASCII est une lettre majuscule." -#: library/curses.ascii.rst:168 +#: library/curses.ascii.rst:165 msgid "" -"Checks for an ASCII hexadecimal digit. This is equivalent to ``c in string." -"hexdigits``." +"Checks for an ASCII hexadecimal digit. This is equivalent to ``c in " +"string.hexdigits``." msgstr "" +"Vérifie si un caractère ASCII est un chiffre hexadécimal. C'est équivalent à " +"``c in string.hexdigits``." -#: library/curses.ascii.rst:174 +#: library/curses.ascii.rst:171 msgid "Checks for an ASCII control character (ordinal values 0 to 31)." msgstr "" +"Vérifie si un caractère ASCII est un caractère de contrôle (valeurs " +"ordinales de 0 à 31)." -#: library/curses.ascii.rst:179 +#: library/curses.ascii.rst:176 msgid "Checks for a non-ASCII character (ordinal values 0x80 and above)." msgstr "" +"Vérifie si un caractère n'est pas ASCII (valeurs ordinales de 0x80 et plus)." -#: library/curses.ascii.rst:181 +#: library/curses.ascii.rst:178 msgid "" "These functions accept either integers or single-character strings; when the " -"argument is a string, it is first converted using the built-in function :" -"func:`ord`." +"argument is a string, it is first converted using the built-in " +"function :func:`ord`." msgstr "" +"Ces fonctions acceptent soit des entiers soit des chaînes de caractères d'un " +"seul caractère ; lorsque l'argument est une chaîne, il est d'abord converti " +"en utilisant la fonction intégrée :func:`ord`." -#: library/curses.ascii.rst:184 +#: library/curses.ascii.rst:181 msgid "" "Note that all these functions check ordinal bit values derived from the " "character of the string you pass in; they do not actually know anything " "about the host machine's character encoding." msgstr "" +"Notez que toutes ces fonctions vérifient les valeurs de bits ordinales " +"dérivées du caractère de la chaîne que vous fournissez ; elles ne " +"connaissent rien de l'encodage de caractères de la machine hôte." -#: library/curses.ascii.rst:188 +#: library/curses.ascii.rst:185 msgid "" "The following two functions take either a single-character string or integer " "byte value; they return a value of the same type." msgstr "" +"Les deux fonctions suivantes acceptent soit une chaîne de caractères d'un " +"seul caractère soit une valeur d'octet sous forme d'entier ; elles renvoient " +"une valeur du même type." -#: library/curses.ascii.rst:194 +#: library/curses.ascii.rst:191 msgid "Return the ASCII value corresponding to the low 7 bits of *c*." msgstr "" +"Renvoie la valeur ASCII correspondant aux 7 bits les moins significatifs de " +"*c*." -#: library/curses.ascii.rst:199 +#: library/curses.ascii.rst:196 msgid "" "Return the control character corresponding to the given character (the " "character bit value is bitwise-anded with 0x1f)." msgstr "" +"Renvoie le caractère de contrôle correspondant au caractère donné (une " +"opération ET bit-à-bit avec 0x1F est appliqué à la valeur du caractère)." -#: library/curses.ascii.rst:205 +#: library/curses.ascii.rst:202 msgid "" "Return the 8-bit character corresponding to the given ASCII character (the " "character bit value is bitwise-ored with 0x80)." msgstr "" +"Renvoie le caractère de contrôle correspondant au caractère donné (une " +"opération OU bit-à-bit avec 0x80 est appliqué à la valeur du caractère)." -#: library/curses.ascii.rst:208 +#: library/curses.ascii.rst:205 msgid "" "The following function takes either a single-character string or integer " "value; it returns a string." msgstr "" +"La fonction suivante accepte soit une chaîne de caractères d'un seul " +"caractère soit une valeur entière ; elle renvoie une chaîne de caractères." -#: library/curses.ascii.rst:218 +#: library/curses.ascii.rst:215 msgid "" "Return a string representation of the ASCII character *c*. If *c* is " "printable, this string is the character itself. If the character is a " @@ -316,13 +368,24 @@ msgid "" "(0x80) set, the meta bit is stripped, the preceding rules applied, and " "``'!'`` prepended to the result." msgstr "" +"Renvoie une représentation du caractère ASCII *c* sous forme d’une chaîne. " +"Si *c* est imprimable, cette chaîne est le caractère lui-même. Si le " +"caractère est un caractère de contrôle (0x00 – 0x1f), la chaîne se compose " +"d'un accent circonflexe (``'^'``) suivi de la lettre majuscule " +"correspondante. Si le caractère est un caractère de suppression ASCII " +"(0x7f), la chaîne est ``'^?'``. Si le bit *meta* du caractère est défini " +"(0x80), le bit *meta* est supprimé, les règles précédentes appliquées, et " +"``'!'`` est ajouté au début du résultat." -#: library/curses.ascii.rst:228 +#: library/curses.ascii.rst:225 msgid "" "A 33-element string array that contains the ASCII mnemonics for the thirty-" "two ASCII control characters from 0 (NUL) to 0x1f (US), in order, plus the " "mnemonic ``SP`` for the space character." msgstr "" +"Tableau de chaînes de 33 éléments qui contient les mnémoniques ASCII pour " +"les trente-deux caractères de contrôle ASCII de 0 (NUL) à 0x1f (US), dans " +"l'ordre, ainsi que le mnémonique ``SP`` pour le caractère d'espace." #~ msgid "^ (caret)" #~ msgstr "^ (caret)" diff --git a/library/curses.panel.po b/library/curses.panel.po index 81d2cf8f3..daf4c4f86 100644 --- a/library/curses.panel.po +++ b/library/curses.panel.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,26 +18,26 @@ msgstr "" msgid ":mod:`!curses.panel` --- A panel stack extension for curses" msgstr "" -#: library/curses.panel.rst:11 +#: library/curses.panel.rst:9 msgid "" "Panels are windows with the added feature of depth, so they can be stacked " "on top of each other, and only the visible portions of each window will be " "displayed. Panels can be added, moved up or down in the stack, and removed." msgstr "" -#: library/curses.panel.rst:19 +#: library/curses.panel.rst:17 msgid "Functions" msgstr "Fonctions" -#: library/curses.panel.rst:21 -msgid "The module :mod:`curses.panel` defines the following functions:" +#: library/curses.panel.rst:19 +msgid "The module :mod:`!curses.panel` defines the following functions:" msgstr "" -#: library/curses.panel.rst:26 +#: library/curses.panel.rst:24 msgid "Returns the bottom panel in the panel stack." msgstr "" -#: library/curses.panel.rst:31 +#: library/curses.panel.rst:29 msgid "" "Returns a panel object, associating it with the given window *win*. Be aware " "that you need to keep the returned panel object referenced explicitly. If " @@ -45,21 +45,21 @@ msgid "" "stack." msgstr "" -#: library/curses.panel.rst:38 +#: library/curses.panel.rst:36 msgid "Returns the top panel in the panel stack." msgstr "" -#: library/curses.panel.rst:43 +#: library/curses.panel.rst:41 msgid "" "Updates the virtual screen after changes in the panel stack. This does not " "call :func:`curses.doupdate`, so you'll have to do this yourself." msgstr "" -#: library/curses.panel.rst:50 +#: library/curses.panel.rst:48 msgid "Panel Objects" msgstr "" -#: library/curses.panel.rst:52 +#: library/curses.panel.rst:50 msgid "" "Panel objects, as returned by :func:`new_panel` above, are windows with a " "stacking order. There's always a window associated with a panel which " @@ -67,60 +67,60 @@ msgid "" "window's depth in the panel stack." msgstr "" -#: library/curses.panel.rst:57 +#: library/curses.panel.rst:55 msgid "Panel objects have the following methods:" msgstr "" -#: library/curses.panel.rst:62 +#: library/curses.panel.rst:60 msgid "Returns the panel above the current panel." msgstr "" -#: library/curses.panel.rst:67 +#: library/curses.panel.rst:65 msgid "Returns the panel below the current panel." msgstr "" -#: library/curses.panel.rst:72 +#: library/curses.panel.rst:70 msgid "Push the panel to the bottom of the stack." msgstr "" -#: library/curses.panel.rst:77 +#: library/curses.panel.rst:75 msgid "" "Returns ``True`` if the panel is hidden (not visible), ``False`` otherwise." msgstr "" -#: library/curses.panel.rst:82 +#: library/curses.panel.rst:80 msgid "" "Hide the panel. This does not delete the object, it just makes the window on " "screen invisible." msgstr "" -#: library/curses.panel.rst:88 +#: library/curses.panel.rst:86 msgid "Move the panel to the screen coordinates ``(y, x)``." msgstr "" -#: library/curses.panel.rst:93 +#: library/curses.panel.rst:91 msgid "Change the window associated with the panel to the window *win*." msgstr "" -#: library/curses.panel.rst:98 +#: library/curses.panel.rst:96 msgid "" "Set the panel's user pointer to *obj*. This is used to associate an " "arbitrary piece of data with the panel, and can be any Python object." msgstr "" -#: library/curses.panel.rst:104 +#: library/curses.panel.rst:102 msgid "Display the panel (which might have been hidden)." msgstr "" -#: library/curses.panel.rst:109 +#: library/curses.panel.rst:107 msgid "Push panel to the top of the stack." msgstr "" -#: library/curses.panel.rst:114 +#: library/curses.panel.rst:112 msgid "" "Returns the user pointer for the panel. This might be any Python object." msgstr "" -#: library/curses.panel.rst:119 +#: library/curses.panel.rst:117 msgid "Returns the window object associated with the panel." msgstr "" diff --git a/library/curses.po b/library/curses.po index d63afbfaf..f2fee6ec1 100644 --- a/library/curses.po +++ b/library/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-07-04 11:32+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -19,17 +19,17 @@ msgstr "" msgid ":mod:`!curses` --- Terminal handling for character-cell displays" msgstr "" -#: library/curses.rst:12 +#: library/curses.rst:8 msgid "**Source code:** :source:`Lib/curses`" msgstr "" -#: library/curses.rst:16 +#: library/curses.rst:12 msgid "" -"The :mod:`curses` module provides an interface to the curses library, the de-" -"facto standard for portable advanced terminal handling." +"The :mod:`!curses` module provides an interface to the curses library, the " +"de-facto standard for portable advanced terminal handling." msgstr "" -#: library/curses.rst:19 +#: library/curses.rst:15 msgid "" "While curses is most widely used in the Unix environment, versions are " "available for Windows, DOS, and possibly other systems as well. This " @@ -39,7 +39,7 @@ msgstr "" #: includes/wasm-mobile-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-mobile-notavail.rst:5 msgid "" @@ -47,6 +47,14 @@ msgid "" "availability>` or :ref:`WebAssembly platforms `." msgstr "" +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + #: library/curses.rst:28 msgid "" "Whenever the documentation mentions a *character* it can be specified as an " @@ -102,7 +110,7 @@ msgid "Functions" msgstr "Fonctions" #: library/curses.rst:55 -msgid "The module :mod:`curses` defines the following exception:" +msgid "The module :mod:`!curses` defines the following exception:" msgstr "" #: library/curses.rst:60 @@ -117,28 +125,46 @@ msgid "" msgstr "" #: library/curses.rst:68 -msgid "The module :mod:`curses` defines the following functions:" +msgid "The module :mod:`!curses` defines the following functions:" msgstr "" #: library/curses.rst:73 msgid "" +"Allow use of default values for colors on terminals supporting this feature. " +"Use this to support transparency in your application." +msgstr "" + +#: library/curses.rst:76 +msgid "" +"Assign terminal default foreground/background colors to color number ``-1``. " +"So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red on " +"default background and ``init_pair(x, -1, COLOR_BLUE)`` will initialize pair " +"*x* as default foreground on blue." +msgstr "" + +#: library/curses.rst:81 +msgid "Change the definition of the color-pair ``0`` to ``(fg, bg)``." +msgstr "" + +#: library/curses.rst:88 +msgid "" "Return the output speed of the terminal in bits per second. On software " "terminal emulators it will have a fixed high value. Included for historical " "reasons; in former times, it was used to write output loops for time delays " "and occasionally to change interfaces depending on the line speed." msgstr "" -#: library/curses.rst:81 +#: library/curses.rst:96 msgid "Emit a short attention sound." msgstr "" -#: library/curses.rst:86 +#: library/curses.rst:101 msgid "" "Return ``True`` or ``False``, depending on whether the programmer can change " "the colors displayed by the terminal." msgstr "" -#: library/curses.rst:92 +#: library/curses.rst:107 msgid "" "Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " "tty line buffering is turned off and characters are available to be read one " @@ -148,7 +174,7 @@ msgid "" "terminal in cbreak mode." msgstr "" -#: library/curses.rst:101 +#: library/curses.rst:116 msgid "" "Return the intensity of the red, green, and blue (RGB) components in the " "color *color_number*, which must be between ``0`` and ``COLORS - 1``. " @@ -157,16 +183,16 @@ msgid "" "component)." msgstr "" -#: library/curses.rst:109 +#: library/curses.rst:124 msgid "" "Return the attribute value for displaying text in the specified color pair. " "Only the first 256 color pairs are supported. This attribute value can be " -"combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:" -"`!A_\\*` attributes. :func:`pair_number` is the counterpart to this " -"function." +"combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the " +"other :const:`!A_\\*` attributes. :func:`pair_number` is the counterpart to " +"this function." msgstr "" -#: library/curses.rst:118 +#: library/curses.rst:133 msgid "" "Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " "for invisible, normal, or very visible. If the terminal supports the " @@ -175,27 +201,27 @@ msgid "" "and the \"very visible\" mode is a block cursor." msgstr "" -#: library/curses.rst:127 +#: library/curses.rst:142 msgid "" "Save the current terminal mode as the \"program\" mode, the mode when the " "running program is using curses. (Its counterpart is the \"shell\" mode, " -"for when the program is not in curses.) Subsequent calls to :func:" -"`reset_prog_mode` will restore this mode." +"for when the program is not in curses.) Subsequent calls " +"to :func:`reset_prog_mode` will restore this mode." msgstr "" -#: library/curses.rst:135 +#: library/curses.rst:150 msgid "" "Save the current terminal mode as the \"shell\" mode, the mode when the " "running program is not using curses. (Its counterpart is the \"program\" " -"mode, when the program is using curses capabilities.) Subsequent calls to :" -"func:`reset_shell_mode` will restore this mode." +"mode, when the program is using curses capabilities.) Subsequent calls " +"to :func:`reset_shell_mode` will restore this mode." msgstr "" -#: library/curses.rst:143 +#: library/curses.rst:158 msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: library/curses.rst:148 +#: library/curses.rst:163 msgid "" "Update the physical screen. The curses library keeps two data structures, " "one representing the current physical screen contents and a virtual screen " @@ -203,35 +229,35 @@ msgid "" "the physical screen to match the virtual screen." msgstr "" -#: library/curses.rst:153 +#: library/curses.rst:168 msgid "" "The virtual screen may be updated by a :meth:`~window.noutrefresh` call " "after write operations such as :meth:`~window.addstr` have been performed on " "a window. The normal :meth:`~window.refresh` call is simply :meth:`!" "noutrefresh` followed by :func:`!doupdate`; if you have to update multiple " "windows, you can speed performance and perhaps reduce screen flicker by " -"issuing :meth:`!noutrefresh` calls on all windows, followed by a single :" -"func:`!doupdate`." +"issuing :meth:`!noutrefresh` calls on all windows, followed by a " +"single :func:`!doupdate`." msgstr "" -#: library/curses.rst:163 +#: library/curses.rst:178 msgid "" "Enter echo mode. In echo mode, each character input is echoed to the screen " "as it is entered." msgstr "" -#: library/curses.rst:169 +#: library/curses.rst:184 msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: library/curses.rst:174 +#: library/curses.rst:189 msgid "" "Return the user's current erase character as a one-byte bytes object. Under " "Unix operating systems this is a property of the controlling tty of the " "curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:181 +#: library/curses.rst:196 msgid "" "The :func:`.filter` routine, if used, must be called before :func:`initscr` " "is called. The effect is that, during those calls, :envvar:`LINES` is set " @@ -242,20 +268,20 @@ msgid "" "time line editing without touching the rest of the screen." msgstr "" -#: library/curses.rst:191 +#: library/curses.rst:206 msgid "" "Flash the screen. That is, change it to reverse-video and then change it " "back in a short interval. Some people prefer such as 'visible bell' to the " "audible attention signal produced by :func:`beep`." msgstr "" -#: library/curses.rst:198 +#: library/curses.rst:213 msgid "" "Flush all input buffers. This throws away any typeahead that has been " "typed by the user and has not yet been processed by the program." msgstr "" -#: library/curses.rst:204 +#: library/curses.rst:219 msgid "" "After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " "event, this method should be called to retrieve the queued mouse event, " @@ -264,57 +290,55 @@ msgid "" "coordinates. (*z* is currently unused.) *bstate* is an integer value whose " "bits will be set to indicate the type of event, and will be the bitwise OR " "of one or more of the following constants, where *n* is the button number " -"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" -"`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" -"`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" -"const:`BUTTON_ALT`." +"from 1 to " +"5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :const:`BUTTON_ALT`." msgstr "" -#: library/curses.rst:1776 +#: library/curses.rst:1798 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." msgstr "" -#: library/curses.rst:222 +#: library/curses.rst:237 msgid "" "Return the current coordinates of the virtual screen cursor as a tuple ``(y, " "x)``. If :meth:`leaveok ` is currently ``True``, then " "return ``(-1, -1)``." msgstr "" -#: library/curses.rst:228 +#: library/curses.rst:243 msgid "" -"Read window related data stored in the file by an earlier :func:`window." -"putwin` call. The routine then creates and initializes a new window using " -"that data, returning the new window object." +"Read window related data stored in the file by an " +"earlier :func:`window.putwin` call. The routine then creates and initializes " +"a new window using that data, returning the new window object." msgstr "" -#: library/curses.rst:235 +#: library/curses.rst:250 msgid "" "Return ``True`` if the terminal can display colors; otherwise, return " "``False``." msgstr "" -#: library/curses.rst:239 +#: library/curses.rst:254 msgid "" "Return ``True`` if the module supports extended colors; otherwise, return " "``False``. Extended color support allows more than 256 color pairs for " "terminals that support more than 16 colors (e.g. xterm-256color)." msgstr "" -#: library/curses.rst:243 +#: library/curses.rst:258 msgid "Extended color support requires ncurses version 6.1 or later." msgstr "" -#: library/curses.rst:249 +#: library/curses.rst:264 msgid "" "Return ``True`` if the terminal has insert- and delete-character " "capabilities. This function is included for historical reasons only, as all " "modern software terminal emulators have such capabilities." msgstr "" -#: library/curses.rst:256 +#: library/curses.rst:271 msgid "" "Return ``True`` if the terminal has insert- and delete-line capabilities, or " "can simulate them using scrolling regions. This function is included for " @@ -322,13 +346,13 @@ msgid "" "capabilities." msgstr "" -#: library/curses.rst:264 +#: library/curses.rst:279 msgid "" "Take a key value *ch*, and return ``True`` if the current terminal type " "recognizes a key with that value." msgstr "" -#: library/curses.rst:270 +#: library/curses.rst:285 msgid "" "Used for half-delay mode, which is similar to cbreak mode in that characters " "typed by the user are immediately available to the program. However, after " @@ -337,7 +361,7 @@ msgid "" "``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: library/curses.rst:279 +#: library/curses.rst:294 msgid "" "Change the definition of a color, taking the number of the color to be " "changed followed by three RGB values (for the amounts of red, green, and " @@ -349,44 +373,45 @@ msgid "" "``True``." msgstr "" -#: library/curses.rst:290 +#: library/curses.rst:305 msgid "" "Change the definition of a color-pair. It takes three arguments: the number " "of the color-pair to be changed, the foreground color number, and the " "background color number. The value of *pair_number* must be between ``1`` " -"and ``COLOR_PAIRS - 1`` (the ``0`` color pair is wired to white on black and " -"cannot be changed). The value of *fg* and *bg* arguments must be between " -"``0`` and ``COLORS - 1``, or, after calling :func:`use_default_colors`, " +"and ``COLOR_PAIRS - 1`` (the ``0`` color pair can only be changed " +"by :func:`use_default_colors` and :func:`assume_default_colors`). The value " +"of *fg* and *bg* arguments must be between ``0`` and ``COLORS - 1``, or, " +"after calling :func:`!use_default_colors` or :func:`!assume_default_colors`, " "``-1``. If the color-pair was previously initialized, the screen is " "refreshed and all occurrences of that color-pair are changed to the new " "definition." msgstr "" -#: library/curses.rst:303 +#: library/curses.rst:320 msgid "" "Initialize the library. Return a :ref:`window ` " "object which represents the whole screen." msgstr "" -#: library/curses.rst:308 +#: library/curses.rst:325 msgid "" "If there is an error opening the terminal, the underlying curses library may " "cause the interpreter to exit." msgstr "" -#: library/curses.rst:314 +#: library/curses.rst:331 msgid "" "Return ``True`` if :func:`resize_term` would modify the window structure, " "``False`` otherwise." msgstr "" -#: library/curses.rst:320 +#: library/curses.rst:337 msgid "" "Return ``True`` if :func:`endwin` has been called (that is, the curses " "library has been deinitialized)." msgstr "" -#: library/curses.rst:326 +#: library/curses.rst:343 msgid "" "Return the name of the key numbered *k* as a bytes object. The name of a " "key generating printable ASCII character is the key's character. The name " @@ -397,27 +422,27 @@ msgid "" "character." msgstr "" -#: library/curses.rst:336 +#: library/curses.rst:353 msgid "" "Return the user's current line kill character as a one-byte bytes object. " "Under Unix operating systems this is a property of the controlling tty of " "the curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:343 +#: library/curses.rst:360 msgid "" "Return a bytes object containing the terminfo long name field describing the " "current terminal. The maximum length of a verbose description is 128 " "characters. It is defined only after the call to :func:`initscr`." msgstr "" -#: library/curses.rst:350 +#: library/curses.rst:367 msgid "" "If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " "``False``, allow only 7-bit chars." msgstr "" -#: library/curses.rst:356 +#: library/curses.rst:373 msgid "" "Set the maximum time in milliseconds that can elapse between press and " "release events in order for them to be recognized as a click, and return the " @@ -425,7 +450,7 @@ msgid "" "fifth of a second." msgstr "" -#: library/curses.rst:363 +#: library/curses.rst:380 msgid "" "Set the mouse events to be reported, and return a tuple ``(availmask, " "oldmask)``. *availmask* indicates which of the specified mouse events can " @@ -434,61 +459,61 @@ msgid "" "never called, no mouse events are ever reported." msgstr "" -#: library/curses.rst:372 +#: library/curses.rst:389 msgid "Sleep for *ms* milliseconds." msgstr "" -#: library/curses.rst:377 +#: library/curses.rst:394 msgid "" "Create and return a pointer to a new pad data structure with the given " "number of lines and columns. Return a pad as a window object." msgstr "" -#: library/curses.rst:380 +#: library/curses.rst:397 msgid "" "A pad is like a window, except that it is not restricted by the screen size, " "and is not necessarily associated with a particular part of the screen. " "Pads can be used when a large window is needed, and only a part of the " "window will be on the screen at one time. Automatic refreshes of pads (such " -"as from scrolling or echoing of input) do not occur. The :meth:`~window." -"refresh` and :meth:`~window.noutrefresh` methods of a pad require 6 " -"arguments to specify the part of the pad to be displayed and the location on " -"the screen to be used for the display. The arguments are *pminrow*, " -"*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " -"refer to the upper left corner of the pad region to be displayed and the *s* " -"arguments define a clipping box on the screen within which the pad region is " -"to be displayed." +"as from scrolling or echoing of input) do not occur. " +"The :meth:`~window.refresh` and :meth:`~window.noutrefresh` methods of a pad " +"require 6 arguments to specify the part of the pad to be displayed and the " +"location on the screen to be used for the display. The arguments are " +"*pminrow*, *pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* " +"arguments refer to the upper left corner of the pad region to be displayed " +"and the *s* arguments define a clipping box on the screen within which the " +"pad region is to be displayed." msgstr "" -#: library/curses.rst:396 +#: library/curses.rst:413 msgid "" "Return a new :ref:`window `, whose left-upper corner " "is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." msgstr "" -#: library/curses.rst:399 +#: library/curses.rst:416 msgid "" "By default, the window will extend from the specified position to the lower " "right corner of the screen." msgstr "" -#: library/curses.rst:405 +#: library/curses.rst:422 msgid "" "Enter newline mode. This mode translates the return key into newline on " "input, and translates newline into return and line-feed on output. Newline " "mode is initially on." msgstr "" -#: library/curses.rst:412 +#: library/curses.rst:429 msgid "" "Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:417 +#: library/curses.rst:434 msgid "Leave echo mode. Echoing of input characters is turned off." msgstr "" -#: library/curses.rst:422 +#: library/curses.rst:439 msgid "" "Leave newline mode. Disable translation of return into newline on input, " "and disable low-level translation of newline into newline/return on output " @@ -498,7 +523,7 @@ msgid "" "also, it will be able to detect the return key on input." msgstr "" -#: library/curses.rst:432 +#: library/curses.rst:449 msgid "" "When the :func:`!noqiflush` routine is used, normal flush of input and " "output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " @@ -507,63 +532,63 @@ msgid "" "occurred, after the handler exits." msgstr "" -#: library/curses.rst:440 +#: library/curses.rst:457 msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:445 +#: library/curses.rst:462 msgid "" "Return a tuple ``(fg, bg)`` containing the colors for the requested color " "pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " "1``." msgstr "" -#: library/curses.rst:451 +#: library/curses.rst:468 msgid "" -"Return the number of the color-pair set by the attribute value *attr*. :func:" -"`color_pair` is the counterpart to this function." +"Return the number of the color-pair set by the attribute value " +"*attr*. :func:`color_pair` is the counterpart to this function." msgstr "" -#: library/curses.rst:457 +#: library/curses.rst:474 msgid "" "Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " -"terminfo capability for the current terminal. Note that the output of :func:" -"`putp` always goes to standard output." +"terminfo capability for the current terminal. Note that the output " +"of :func:`putp` always goes to standard output." msgstr "" -#: library/curses.rst:464 +#: library/curses.rst:481 msgid "" "If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " "If *flag* is ``True``, or no argument is provided, the queues will be " "flushed when these control characters are read." msgstr "" -#: library/curses.rst:471 +#: library/curses.rst:488 msgid "" "Enter raw mode. In raw mode, normal line buffering and processing of " "interrupt, quit, suspend, and flow control keys are turned off; characters " "are presented to curses input functions one by one." msgstr "" -#: library/curses.rst:478 +#: library/curses.rst:495 msgid "" -"Restore the terminal to \"program\" mode, as previously saved by :func:" -"`def_prog_mode`." +"Restore the terminal to \"program\" mode, as previously saved " +"by :func:`def_prog_mode`." msgstr "" -#: library/curses.rst:484 +#: library/curses.rst:501 msgid "" -"Restore the terminal to \"shell\" mode, as previously saved by :func:" -"`def_shell_mode`." +"Restore the terminal to \"shell\" mode, as previously saved " +"by :func:`def_shell_mode`." msgstr "" -#: library/curses.rst:490 +#: library/curses.rst:507 msgid "" -"Restore the state of the terminal modes to what it was at the last call to :" -"func:`savetty`." +"Restore the state of the terminal modes to what it was at the last call " +"to :func:`savetty`." msgstr "" -#: library/curses.rst:496 +#: library/curses.rst:513 msgid "" "Backend function used by :func:`resizeterm`, performing most of the work; " "when resizing the windows, :func:`resize_term` blank-fills the areas that " @@ -573,47 +598,47 @@ msgid "" "to resize these without additional interaction with the application." msgstr "" -#: library/curses.rst:506 +#: library/curses.rst:523 msgid "" "Resize the standard and current windows to the specified dimensions, and " "adjusts other bookkeeping data used by the curses library that record the " "window dimensions (in particular the SIGWINCH handler)." msgstr "" -#: library/curses.rst:513 +#: library/curses.rst:530 msgid "" -"Save the current state of the terminal modes in a buffer, usable by :func:" -"`resetty`." +"Save the current state of the terminal modes in a buffer, usable " +"by :func:`resetty`." msgstr "" -#: library/curses.rst:518 +#: library/curses.rst:535 msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: library/curses.rst:524 +#: library/curses.rst:541 msgid "" "Sets the number of milliseconds to wait after reading an escape character, " "to distinguish between an individual escape character entered on the " "keyboard from escape sequences sent by cursor and function keys." msgstr "" -#: library/curses.rst:532 +#: library/curses.rst:549 msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: library/curses.rst:538 +#: library/curses.rst:555 msgid "" "Sets the number of columns used by the curses library when converting a tab " "character to spaces as it adds the tab to a window." msgstr "" -#: library/curses.rst:545 +#: library/curses.rst:562 msgid "" "Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " "then :meth:`leaveok ` is set ``True``." msgstr "" -#: library/curses.rst:551 +#: library/curses.rst:568 msgid "" "Initialize the terminal. *term* is a string giving the terminal name, or " "``None``; if omitted or ``None``, the value of the :envvar:`TERM` " @@ -622,37 +647,37 @@ msgid "" "descriptor for ``sys.stdout`` will be used." msgstr "" -#: library/curses.rst:560 +#: library/curses.rst:577 msgid "" "Must be called if the programmer wants to use colors, and before any other " "color manipulation routine is called. It is good practice to call this " "routine right after :func:`initscr`." msgstr "" -#: library/curses.rst:564 +#: library/curses.rst:581 msgid "" ":func:`start_color` initializes eight basic colors (black, red, green, " -"yellow, blue, magenta, cyan, and white), and two global variables in the :" -"mod:`curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, containing " -"the maximum number of colors and color-pairs the terminal can support. It " -"also restores the colors on the terminal to the values they had when the " -"terminal was just turned on." +"yellow, blue, magenta, cyan, and white), and two global variables in " +"the :mod:`!curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, " +"containing the maximum number of colors and color-pairs the terminal can " +"support. It also restores the colors on the terminal to the values they had " +"when the terminal was just turned on." msgstr "" -#: library/curses.rst:573 +#: library/curses.rst:590 msgid "" "Return a logical OR of all video attributes supported by the terminal. This " "information is useful when a curses program needs complete control over the " "appearance of the screen." msgstr "" -#: library/curses.rst:580 +#: library/curses.rst:597 msgid "" "Return the value of the environment variable :envvar:`TERM`, as a bytes " "object, truncated to 14 characters." msgstr "" -#: library/curses.rst:586 +#: library/curses.rst:603 msgid "" "Return the value of the Boolean capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-1`` if " @@ -660,7 +685,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:594 +#: library/curses.rst:611 msgid "" "Return the value of the numeric capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-2`` if " @@ -668,7 +693,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:602 +#: library/curses.rst:619 msgid "" "Return the value of the string capability corresponding to the terminfo " "capability name *capname* as a bytes object. Return ``None`` if *capname* " @@ -676,7 +701,7 @@ msgid "" "terminal description." msgstr "" -#: library/curses.rst:610 +#: library/curses.rst:627 msgid "" "Instantiate the bytes object *str* with the supplied parameters, where *str* " "should be a parameterized string obtained from the terminfo database. E.g. " @@ -684,13 +709,13 @@ msgid "" "exact result depending on terminal type." msgstr "" -#: library/curses.rst:618 +#: library/curses.rst:635 msgid "" "Specify that the file descriptor *fd* be used for typeahead checking. If " "*fd* is ``-1``, then no typeahead checking is done." msgstr "" -#: library/curses.rst:621 +#: library/curses.rst:638 msgid "" "The curses library does \"line-breakout optimization\" by looking for " "typeahead periodically while updating the screen. If input is found, and it " @@ -700,7 +725,7 @@ msgid "" "typeahead checking." msgstr "" -#: library/curses.rst:630 +#: library/curses.rst:647 msgid "" "Return a bytes object which is a printable representation of the character " "*ch*. Control characters are represented as a caret followed by the " @@ -708,35 +733,35 @@ msgid "" "are." msgstr "" -#: library/curses.rst:637 +#: library/curses.rst:654 msgid "Push *ch* so the next :meth:`~window.getch` will return it." msgstr "" -#: library/curses.rst:641 +#: library/curses.rst:658 msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: library/curses.rst:646 +#: library/curses.rst:663 msgid "" "Update the :const:`LINES` and :const:`COLS` module variables. Useful for " "detecting manual screen resize." msgstr "" -#: library/curses.rst:654 +#: library/curses.rst:671 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: library/curses.rst:658 +#: library/curses.rst:675 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: library/curses.rst:665 +#: library/curses.rst:682 msgid "" "Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " "state data with it." msgstr "" -#: library/curses.rst:671 +#: library/curses.rst:688 msgid "" "If used, this function should be called before :func:`initscr` or newterm " "are called. When *flag* is ``False``, the values of lines and columns " @@ -746,16 +771,11 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: library/curses.rst:681 -msgid "" -"Allow use of default values for colors on terminals supporting this feature. " -"Use this to support transparency in your application. The default color is " -"assigned to the color number ``-1``. After calling this function, " -"``init_pair(x, curses.COLOR_RED, -1)`` initializes, for instance, color pair " -"*x* to a red foreground color on the default background." +#: library/curses.rst:698 +msgid "Equivalent to ``assume_default_colors(-1, -1)``." msgstr "" -#: library/curses.rst:690 +#: library/curses.rst:703 msgid "" "Initialize curses and call another callable object, *func*, which should be " "the rest of your curses-using application. If the application raises an " @@ -769,50 +789,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: library/curses.rst:704 +#: library/curses.rst:717 msgid "Window Objects" msgstr "" -#: library/curses.rst:706 +#: library/curses.rst:721 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: library/curses.rst:713 +#: library/curses.rst:728 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: library/curses.rst:719 +#: library/curses.rst:734 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: library/curses.rst:727 +#: library/curses.rst:742 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: library/curses.rst:735 +#: library/curses.rst:750 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: library/curses.rst:740 +#: library/curses.rst:755 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: library/curses.rst:744 +#: library/curses.rst:759 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -822,44 +842,44 @@ msgid "" "line." msgstr "" -#: library/curses.rst:754 +#: library/curses.rst:769 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:760 +#: library/curses.rst:775 msgid "" -"Add attribute *attr* from the \"background\" set applied to all writes to " -"the current window." +"Add attribute *attr* to the \"background\" set applied to all writes to the " +"current window." msgstr "" -#: library/curses.rst:766 +#: library/curses.rst:781 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: library/curses.rst:772 +#: library/curses.rst:787 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: library/curses.rst:776 +#: library/curses.rst:791 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: library/curses.rst:779 +#: library/curses.rst:794 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: library/curses.rst:785 +#: library/curses.rst:800 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -870,128 +890,128 @@ msgid "" "delete line/character operations." msgstr "" -#: library/curses.rst:795 +#: library/curses.rst:810 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: library/curses.rst:801 +#: library/curses.rst:816 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: library/curses.rst:806 +#: library/curses.rst:821 msgid "Parameter" msgstr "Paramètre" -#: library/curses.rst:806 +#: library/curses.rst:821 msgid "Description" msgstr "Description" -#: library/curses.rst:806 +#: library/curses.rst:821 msgid "Default value" msgstr "Valeur par défaut" -#: library/curses.rst:808 +#: library/curses.rst:823 msgid "*ls*" msgstr "*ls*" -#: library/curses.rst:808 +#: library/curses.rst:823 msgid "Left side" msgstr "" -#: library/curses.rst:810 +#: library/curses.rst:825 msgid ":const:`ACS_VLINE`" msgstr ":const:`ACS_VLINE`" -#: library/curses.rst:810 +#: library/curses.rst:825 msgid "*rs*" msgstr "*rs*" -#: library/curses.rst:810 +#: library/curses.rst:825 msgid "Right side" msgstr "" -#: library/curses.rst:812 +#: library/curses.rst:827 msgid "*ts*" msgstr "*ts*" -#: library/curses.rst:812 +#: library/curses.rst:827 msgid "Top" msgstr "" -#: library/curses.rst:814 +#: library/curses.rst:829 msgid ":const:`ACS_HLINE`" msgstr ":const:`ACS_HLINE`" -#: library/curses.rst:814 +#: library/curses.rst:829 msgid "*bs*" msgstr "*bs*" -#: library/curses.rst:814 +#: library/curses.rst:829 msgid "Bottom" msgstr "" -#: library/curses.rst:816 +#: library/curses.rst:831 msgid "*tl*" msgstr "*tl*" -#: library/curses.rst:816 +#: library/curses.rst:831 msgid "Upper-left corner" msgstr "" -#: library/curses.rst:816 +#: library/curses.rst:831 msgid ":const:`ACS_ULCORNER`" msgstr ":const:`ACS_ULCORNER`" -#: library/curses.rst:818 +#: library/curses.rst:833 msgid "*tr*" msgstr "" -#: library/curses.rst:818 +#: library/curses.rst:833 msgid "Upper-right corner" msgstr "" -#: library/curses.rst:818 +#: library/curses.rst:833 msgid ":const:`ACS_URCORNER`" msgstr ":const:`ACS_URCORNER`" -#: library/curses.rst:820 +#: library/curses.rst:835 msgid "*bl*" msgstr "" -#: library/curses.rst:820 +#: library/curses.rst:835 msgid "Bottom-left corner" msgstr "" -#: library/curses.rst:820 +#: library/curses.rst:835 msgid ":const:`ACS_LLCORNER`" msgstr ":const:`ACS_LLCORNER`" -#: library/curses.rst:822 +#: library/curses.rst:837 msgid "*br*" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:837 msgid "Bottom-right corner" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:837 msgid ":const:`ACS_LRCORNER`" msgstr ":const:`ACS_LRCORNER`" -#: library/curses.rst:828 +#: library/curses.rst:843 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: library/curses.rst:837 +#: library/curses.rst:852 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -1001,45 +1021,45 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: library/curses.rst:847 +#: library/curses.rst:862 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: library/curses.rst:853 +#: library/curses.rst:868 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: library/curses.rst:859 +#: library/curses.rst:874 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: library/curses.rst:865 +#: library/curses.rst:880 msgid "Erase from cursor to the end of the line." msgstr "" -#: library/curses.rst:870 +#: library/curses.rst:885 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: library/curses.rst:876 +#: library/curses.rst:891 msgid "Delete any character at ``(y, x)``." msgstr "" -#: library/curses.rst:881 +#: library/curses.rst:896 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: library/curses.rst:887 +#: library/curses.rst:902 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1047,13 +1067,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: library/curses.rst:895 +#: library/curses.rst:910 msgid "" -"Add character *ch* with attribute *attr*, and immediately call :meth:" -"`refresh` on the window." +"Add character *ch* with attribute *attr*, and immediately " +"call :meth:`refresh` on the window." msgstr "" -#: library/curses.rst:901 +#: library/curses.rst:916 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1061,11 +1081,11 @@ msgid "" "location of a mouse event." msgstr "" -#: library/curses.rst:906 +#: library/curses.rst:921 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: library/curses.rst:912 +#: library/curses.rst:927 msgid "" "Encoding used to encode method arguments (Unicode strings and characters). " "The encoding attribute is inherited from the parent window when a subwindow " @@ -1073,19 +1093,19 @@ msgid "" "locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: library/curses.rst:922 +#: library/curses.rst:937 msgid "Clear the window." msgstr "" -#: library/curses.rst:927 +#: library/curses.rst:942 msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." msgstr "" -#: library/curses.rst:932 +#: library/curses.rst:947 msgid "Return the given window's current background character/attribute pair." msgstr "" -#: library/curses.rst:937 +#: library/curses.rst:952 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " @@ -1093,14 +1113,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: library/curses.rst:945 +#: library/curses.rst:960 msgid "" "Get a wide character. Return a character for most keys, or an integer for " "function keys, keypad keys, and other special keys. In no-delay mode, raise " "an exception if there is no input." msgstr "" -#: library/curses.rst:954 +#: library/curses.rst:969 msgid "" "Get a character, returning a string instead of an integer, as :meth:`getch` " "does. Function keys, keypad keys and other special keys return a multibyte " @@ -1108,35 +1128,40 @@ msgid "" "there is no input." msgstr "" -#: library/curses.rst:962 +#: library/curses.rst:977 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: library/curses.rst:967 +#: library/curses.rst:982 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: library/curses.rst:977 +#: library/curses.rst:992 msgid "" -"Read a bytes object from the user, with primitive line editing capacity." +"Read a bytes object from the user, with primitive line editing capacity. The " +"maximum value for *n* is 2047." msgstr "" -#: library/curses.rst:982 +#: library/curses.rst:1090 +msgid "The maximum value for *n* was increased from 1023 to 2047." +msgstr "" + +#: library/curses.rst:1001 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: library/curses.rst:989 +#: library/curses.rst:1008 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch*." msgstr "" -#: library/curses.rst:995 +#: library/curses.rst:1014 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1144,13 +1169,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: library/curses.rst:1003 +#: library/curses.rst:1022 msgid "" -"If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " +"If *flag* is ``True``, :mod:`!curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: library/curses.rst:1009 +#: library/curses.rst:1028 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1158,19 +1183,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: library/curses.rst:1017 +#: library/curses.rst:1036 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper, and upper bits are the attributes." msgstr "" -#: library/curses.rst:1024 +#: library/curses.rst:1043 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " "from position *x* right by one character." msgstr "" -#: library/curses.rst:1030 +#: library/curses.rst:1049 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1179,13 +1204,13 @@ msgid "" "remains the same." msgstr "" -#: library/curses.rst:1039 +#: library/curses.rst:1058 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: library/curses.rst:1046 +#: library/curses.rst:1065 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1195,7 +1220,7 @@ msgid "" "if specified)." msgstr "" -#: library/curses.rst:1056 +#: library/curses.rst:1075 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1204,84 +1229,85 @@ msgid "" "specified)." msgstr "" -#: library/curses.rst:1065 +#: library/curses.rst:1084 msgid "" "Return a bytes object of characters, extracted from the window starting at " "the current cursor position, or at *y*, *x* if specified. Attributes are " "stripped from the characters. If *n* is specified, :meth:`instr` returns a " -"string at most *n* characters long (exclusive of the trailing NUL)." +"string at most *n* characters long (exclusive of the trailing NUL). The " +"maximum value for *n* is 2047." msgstr "" -#: library/curses.rst:1073 +#: library/curses.rst:1096 msgid "" -"Return ``True`` if the specified line was modified since the last call to :" -"meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " +"Return ``True`` if the specified line was modified since the last call " +"to :meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: library/curses.rst:1080 +#: library/curses.rst:1103 msgid "" -"Return ``True`` if the specified window was modified since the last call to :" -"meth:`refresh`; otherwise return ``False``." +"Return ``True`` if the specified window was modified since the last call " +"to :meth:`refresh`; otherwise return ``False``." msgstr "" -#: library/curses.rst:1086 +#: library/curses.rst:1109 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " -"function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " -"escape sequences will be left as is in the input stream." +"function keys) will be interpreted by :mod:`!curses`. If *flag* is " +"``False``, escape sequences will be left as is in the input stream." msgstr "" -#: library/curses.rst:1093 +#: library/curses.rst:1116 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible. " "If possible the cursor will be made invisible." msgstr "" -#: library/curses.rst:1097 +#: library/curses.rst:1120 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: library/curses.rst:1102 +#: library/curses.rst:1125 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1107 +#: library/curses.rst:1130 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: library/curses.rst:1114 +#: library/curses.rst:1137 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1119 +#: library/curses.rst:1142 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: library/curses.rst:1124 +#: library/curses.rst:1147 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: library/curses.rst:1126 +#: library/curses.rst:1149 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: library/curses.rst:1132 +#: library/curses.rst:1155 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: library/curses.rst:1139 +#: library/curses.rst:1162 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1289,15 +1315,15 @@ msgid "" "contents of *destwin*." msgstr "" -#: library/curses.rst:1144 +#: library/curses.rst:1167 msgid "" -"To get fine-grained control over the copied region, the second form of :meth:" -"`overlay` can be used. *sminrow* and *smincol* are the upper-left " +"To get fine-grained control over the copied region, the second form " +"of :meth:`overlay` can be used. *sminrow* and *smincol* are the upper-left " "coordinates of the source window, and the other variables mark a rectangle " "in the destination window." msgstr "" -#: library/curses.rst:1152 +#: library/curses.rst:1175 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1305,39 +1331,39 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: library/curses.rst:1157 +#: library/curses.rst:1180 msgid "" -"To get fine-grained control over the copied region, the second form of :meth:" -"`overwrite` can be used. *sminrow* and *smincol* are the upper-left " +"To get fine-grained control over the copied region, the second form " +"of :meth:`overwrite` can be used. *sminrow* and *smincol* are the upper-left " "coordinates of the source window, the other variables mark a rectangle in " "the destination window." msgstr "" -#: library/curses.rst:1165 +#: library/curses.rst:1188 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: library/curses.rst:1171 +#: library/curses.rst:1194 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: library/curses.rst:1177 +#: library/curses.rst:1200 msgid "" -"Touch the entire window, causing it to be completely redrawn on the next :" -"meth:`refresh` call." +"Touch the entire window, causing it to be completely redrawn on the " +"next :meth:`refresh` call." msgstr "" -#: library/curses.rst:1183 +#: library/curses.rst:1206 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: library/curses.rst:1186 +#: library/curses.rst:1209 msgid "" "The 6 optional arguments can only be specified when the window is a pad " "created with :func:`newpad`. The additional parameters are needed to " @@ -1352,7 +1378,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: library/curses.rst:1200 +#: library/curses.rst:1223 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1360,11 +1386,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: library/curses.rst:1208 +#: library/curses.rst:1231 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: library/curses.rst:1213 +#: library/curses.rst:1236 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1374,64 +1400,64 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: library/curses.rst:1223 +#: library/curses.rst:1246 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: library/curses.rst:1229 +#: library/curses.rst:1252 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: library/curses.rst:1235 +#: library/curses.rst:1258 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: library/curses.rst:1248 +#: library/curses.rst:1271 msgid "" "Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " "and whose width/height is *ncols*/*nlines*." msgstr "" -#: library/curses.rst:1251 +#: library/curses.rst:1274 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: library/curses.rst:1257 +#: library/curses.rst:1280 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: library/curses.rst:1264 +#: library/curses.rst:1287 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: library/curses.rst:1270 +#: library/curses.rst:1293 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: library/curses.rst:1276 +#: library/curses.rst:1299 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " "If *delay* is zero, then non-blocking read is used, and :meth:`getch` will " -"return ``-1`` if no input is waiting. If *delay* is positive, then :meth:" -"`getch` will block for *delay* milliseconds, and return ``-1`` if there is " -"still no input at the end of that time." +"return ``-1`` if no input is waiting. If *delay* is positive, " +"then :meth:`getch` will block for *delay* milliseconds, and return ``-1`` if " +"there is still no input at the end of that time." msgstr "" -#: library/curses.rst:1286 +#: library/curses.rst:1309 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1439,49 +1465,49 @@ msgid "" "``=False``)." msgstr "" -#: library/curses.rst:1293 +#: library/curses.rst:1316 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: library/curses.rst:1299 +#: library/curses.rst:1322 msgid "" -"Mark all lines in the window as unchanged since the last call to :meth:" -"`refresh`." +"Mark all lines in the window as unchanged since the last call " +"to :meth:`refresh`." msgstr "" -#: library/curses.rst:1306 +#: library/curses.rst:1329 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: library/curses.rst:1311 +#: library/curses.rst:1334 msgid "Constants" msgstr "Constantes" -#: library/curses.rst:1313 -msgid "The :mod:`curses` module defines the following data members:" +#: library/curses.rst:1336 +msgid "The :mod:`!curses` module defines the following data members:" msgstr "" -#: library/curses.rst:1318 +#: library/curses.rst:1341 msgid "" -"Some curses routines that return an integer, such as :meth:`~window." -"getch`, return :const:`ERR` upon failure." +"Some curses routines that return an integer, such " +"as :meth:`~window.getch`, return :const:`ERR` upon failure." msgstr "" -#: library/curses.rst:1324 +#: library/curses.rst:1347 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: library/curses.rst:1331 +#: library/curses.rst:1353 msgid "A bytes object representing the current version of the module." msgstr "" -#: library/curses.rst:1336 +#: library/curses.rst:1358 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1489,603 +1515,604 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: library/curses.rst:1341 +#: library/curses.rst:1363 msgid "Availability: if the ncurses library is used." msgstr "" -#: library/curses.rst:1347 +#: library/curses.rst:1369 msgid "" "The maximum number of colors the terminal can support. It is defined only " "after the call to :func:`start_color`." msgstr "" -#: library/curses.rst:1352 +#: library/curses.rst:1374 msgid "" "The maximum number of color pairs the terminal can support. It is defined " "only after the call to :func:`start_color`." msgstr "" -#: library/curses.rst:1357 +#: library/curses.rst:1379 msgid "" "The width of the screen, i.e., the number of columns. It is defined only " -"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" -"func:`resizeterm` and :func:`resize_term`." +"after the call to :func:`initscr`. Updated " +"by :func:`update_lines_cols`, :func:`resizeterm` and :func:`resize_term`." msgstr "" -#: library/curses.rst:1364 +#: library/curses.rst:1386 msgid "" "The height of the screen, i.e., the number of lines. It is defined only " -"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" -"func:`resizeterm` and :func:`resize_term`." +"after the call to :func:`initscr`. Updated " +"by :func:`update_lines_cols`, :func:`resizeterm` and :func:`resize_term`." msgstr "" -#: library/curses.rst:1370 +#: library/curses.rst:1392 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: library/curses.rst:1374 +#: library/curses.rst:1396 msgid "Attribute" msgstr "Attribut" -#: library/curses.rst:1419 library/curses.rst:1757 +#: library/curses.rst:1441 library/curses.rst:1779 msgid "Meaning" msgstr "Signification" -#: library/curses.rst:1376 +#: library/curses.rst:1398 msgid "Alternate character set mode" msgstr "" -#: library/curses.rst:1378 +#: library/curses.rst:1400 msgid "Blink mode" msgstr "" -#: library/curses.rst:1380 +#: library/curses.rst:1402 msgid "Bold mode" msgstr "" -#: library/curses.rst:1382 +#: library/curses.rst:1404 msgid "Dim mode" msgstr "" -#: library/curses.rst:1384 +#: library/curses.rst:1406 msgid "Invisible or blank mode" msgstr "" -#: library/curses.rst:1386 +#: library/curses.rst:1408 msgid "Italic mode" msgstr "" -#: library/curses.rst:1388 +#: library/curses.rst:1410 msgid "Normal attribute" msgstr "Attribut normal" -#: library/curses.rst:1390 +#: library/curses.rst:1412 msgid "Protected mode" msgstr "" -#: library/curses.rst:1392 +#: library/curses.rst:1414 msgid "Reverse background and foreground colors" msgstr "" -#: library/curses.rst:1395 +#: library/curses.rst:1417 msgid "Standout mode" msgstr "" -#: library/curses.rst:1397 +#: library/curses.rst:1419 msgid "Underline mode" msgstr "" -#: library/curses.rst:1399 +#: library/curses.rst:1421 msgid "Horizontal highlight" msgstr "" -#: library/curses.rst:1401 +#: library/curses.rst:1423 msgid "Left highlight" msgstr "" -#: library/curses.rst:1403 +#: library/curses.rst:1425 msgid "Low highlight" msgstr "" -#: library/curses.rst:1405 +#: library/curses.rst:1427 msgid "Right highlight" msgstr "" -#: library/curses.rst:1407 +#: library/curses.rst:1429 msgid "Top highlight" msgstr "" -#: library/curses.rst:1409 +#: library/curses.rst:1431 msgid "Vertical highlight" msgstr "" -#: library/curses.rst:1412 +#: library/curses.rst:1434 msgid "``A_ITALIC`` was added." msgstr "" -#: library/curses.rst:1415 +#: library/curses.rst:1437 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: library/curses.rst:1419 +#: library/curses.rst:1441 msgid "Bit-mask" msgstr "" -#: library/curses.rst:1421 +#: library/curses.rst:1443 msgid "Bit-mask to extract attributes" msgstr "" -#: library/curses.rst:1424 +#: library/curses.rst:1446 msgid "Bit-mask to extract a character" msgstr "" -#: library/curses.rst:1427 +#: library/curses.rst:1449 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: library/curses.rst:1431 +#: library/curses.rst:1453 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: library/curses.rst:1437 +#: library/curses.rst:1459 msgid "Key constant" msgstr "" -#: library/curses.rst:1437 +#: library/curses.rst:1459 msgid "Key" msgstr "Clé" -#: library/curses.rst:1439 +#: library/curses.rst:1461 msgid "Minimum key value" msgstr "" -#: library/curses.rst:1441 +#: library/curses.rst:1463 msgid "Break key (unreliable)" msgstr "" -#: library/curses.rst:1443 +#: library/curses.rst:1465 msgid "Down-arrow" msgstr "" -#: library/curses.rst:1445 +#: library/curses.rst:1467 msgid "Up-arrow" msgstr "" -#: library/curses.rst:1447 +#: library/curses.rst:1469 msgid "Left-arrow" msgstr "" -#: library/curses.rst:1449 +#: library/curses.rst:1471 msgid "Right-arrow" msgstr "" -#: library/curses.rst:1451 +#: library/curses.rst:1473 msgid "Home key (upward+left arrow)" msgstr "" -#: library/curses.rst:1453 +#: library/curses.rst:1475 msgid "Backspace (unreliable)" msgstr "" -#: library/curses.rst:1455 +#: library/curses.rst:1477 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: library/curses.rst:1458 +#: library/curses.rst:1480 msgid "Value of function key *n*" msgstr "" -#: library/curses.rst:1460 +#: library/curses.rst:1482 msgid "Delete line" msgstr "" -#: library/curses.rst:1462 +#: library/curses.rst:1484 msgid "Insert line" msgstr "" -#: library/curses.rst:1464 +#: library/curses.rst:1486 msgid "Delete character" msgstr "" -#: library/curses.rst:1466 +#: library/curses.rst:1488 msgid "Insert char or enter insert mode" msgstr "" -#: library/curses.rst:1468 +#: library/curses.rst:1490 msgid "Exit insert char mode" msgstr "" -#: library/curses.rst:1470 +#: library/curses.rst:1492 msgid "Clear screen" msgstr "" -#: library/curses.rst:1472 +#: library/curses.rst:1494 msgid "Clear to end of screen" msgstr "" -#: library/curses.rst:1474 +#: library/curses.rst:1496 msgid "Clear to end of line" msgstr "" -#: library/curses.rst:1476 +#: library/curses.rst:1498 msgid "Scroll 1 line forward" msgstr "" -#: library/curses.rst:1478 +#: library/curses.rst:1500 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: library/curses.rst:1480 +#: library/curses.rst:1502 msgid "Next page" msgstr "" -#: library/curses.rst:1482 +#: library/curses.rst:1504 msgid "Previous page" msgstr "" -#: library/curses.rst:1484 +#: library/curses.rst:1506 msgid "Set tab" msgstr "" -#: library/curses.rst:1486 +#: library/curses.rst:1508 msgid "Clear tab" msgstr "" -#: library/curses.rst:1488 +#: library/curses.rst:1510 msgid "Clear all tabs" msgstr "" -#: library/curses.rst:1490 +#: library/curses.rst:1512 msgid "Enter or send (unreliable)" msgstr "" -#: library/curses.rst:1492 +#: library/curses.rst:1514 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: library/curses.rst:1494 +#: library/curses.rst:1516 msgid "Reset or hard reset (unreliable)" msgstr "" -#: library/curses.rst:1496 +#: library/curses.rst:1518 msgid "Print" msgstr "" -#: library/curses.rst:1498 +#: library/curses.rst:1520 msgid "Home down or bottom (lower left)" msgstr "" -#: library/curses.rst:1500 +#: library/curses.rst:1522 msgid "Upper left of keypad" msgstr "" -#: library/curses.rst:1502 +#: library/curses.rst:1524 msgid "Upper right of keypad" msgstr "" -#: library/curses.rst:1504 +#: library/curses.rst:1526 msgid "Center of keypad" msgstr "" -#: library/curses.rst:1506 +#: library/curses.rst:1528 msgid "Lower left of keypad" msgstr "" -#: library/curses.rst:1508 +#: library/curses.rst:1530 msgid "Lower right of keypad" msgstr "" -#: library/curses.rst:1510 +#: library/curses.rst:1532 msgid "Back tab" msgstr "" -#: library/curses.rst:1512 +#: library/curses.rst:1534 msgid "Beg (beginning)" msgstr "" -#: library/curses.rst:1514 +#: library/curses.rst:1536 msgid "Cancel" msgstr "" -#: library/curses.rst:1516 +#: library/curses.rst:1538 msgid "Close" msgstr "*Close*" -#: library/curses.rst:1518 +#: library/curses.rst:1540 msgid "Cmd (command)" msgstr "" -#: library/curses.rst:1520 +#: library/curses.rst:1542 msgid "Copy" msgstr "*Copy*" -#: library/curses.rst:1522 +#: library/curses.rst:1544 msgid "Create" msgstr "" -#: library/curses.rst:1524 +#: library/curses.rst:1546 msgid "End" msgstr "" -#: library/curses.rst:1526 +#: library/curses.rst:1548 msgid "Exit" msgstr "*Exit*" -#: library/curses.rst:1528 +#: library/curses.rst:1550 msgid "Find" msgstr "" -#: library/curses.rst:1530 +#: library/curses.rst:1552 msgid "Help" msgstr "" -#: library/curses.rst:1532 +#: library/curses.rst:1554 msgid "Mark" msgstr "" -#: library/curses.rst:1534 +#: library/curses.rst:1556 msgid "Message" msgstr "" -#: library/curses.rst:1536 +#: library/curses.rst:1558 msgid "Move" msgstr "" -#: library/curses.rst:1538 +#: library/curses.rst:1560 msgid "Next" msgstr "" -#: library/curses.rst:1540 +#: library/curses.rst:1562 msgid "Open" msgstr "" -#: library/curses.rst:1542 +#: library/curses.rst:1564 msgid "Options" msgstr "Options" -#: library/curses.rst:1544 +#: library/curses.rst:1566 msgid "Prev (previous)" msgstr "" -#: library/curses.rst:1546 +#: library/curses.rst:1568 msgid "Redo" msgstr "*Redo*" -#: library/curses.rst:1548 +#: library/curses.rst:1570 msgid "Ref (reference)" msgstr "" -#: library/curses.rst:1550 +#: library/curses.rst:1572 msgid "Refresh" msgstr "" -#: library/curses.rst:1552 +#: library/curses.rst:1574 msgid "Replace" msgstr "" -#: library/curses.rst:1554 +#: library/curses.rst:1576 msgid "Restart" msgstr "" -#: library/curses.rst:1556 +#: library/curses.rst:1578 msgid "Resume" msgstr "" -#: library/curses.rst:1558 +#: library/curses.rst:1580 msgid "Save" msgstr "*Save*" -#: library/curses.rst:1560 +#: library/curses.rst:1582 msgid "Shifted Beg (beginning)" msgstr "" -#: library/curses.rst:1562 +#: library/curses.rst:1584 msgid "Shifted Cancel" msgstr "" -#: library/curses.rst:1564 +#: library/curses.rst:1586 msgid "Shifted Command" msgstr "" -#: library/curses.rst:1566 +#: library/curses.rst:1588 msgid "Shifted Copy" msgstr "" -#: library/curses.rst:1568 +#: library/curses.rst:1590 msgid "Shifted Create" msgstr "" -#: library/curses.rst:1570 +#: library/curses.rst:1592 msgid "Shifted Delete char" msgstr "" -#: library/curses.rst:1572 +#: library/curses.rst:1594 msgid "Shifted Delete line" msgstr "" -#: library/curses.rst:1574 +#: library/curses.rst:1596 msgid "Select" msgstr "" -#: library/curses.rst:1576 +#: library/curses.rst:1598 msgid "Shifted End" msgstr "" -#: library/curses.rst:1578 +#: library/curses.rst:1600 msgid "Shifted Clear line" msgstr "" -#: library/curses.rst:1580 +#: library/curses.rst:1602 msgid "Shifted Exit" msgstr "" -#: library/curses.rst:1582 +#: library/curses.rst:1604 msgid "Shifted Find" msgstr "" -#: library/curses.rst:1584 +#: library/curses.rst:1606 msgid "Shifted Help" msgstr "" -#: library/curses.rst:1586 +#: library/curses.rst:1608 msgid "Shifted Home" msgstr "" -#: library/curses.rst:1588 +#: library/curses.rst:1610 msgid "Shifted Input" msgstr "" -#: library/curses.rst:1590 +#: library/curses.rst:1612 msgid "Shifted Left arrow" msgstr "" -#: library/curses.rst:1592 +#: library/curses.rst:1614 msgid "Shifted Message" msgstr "" -#: library/curses.rst:1594 +#: library/curses.rst:1616 msgid "Shifted Move" msgstr "" -#: library/curses.rst:1596 +#: library/curses.rst:1618 msgid "Shifted Next" msgstr "" -#: library/curses.rst:1598 +#: library/curses.rst:1620 msgid "Shifted Options" msgstr "" -#: library/curses.rst:1600 +#: library/curses.rst:1622 msgid "Shifted Prev" msgstr "" -#: library/curses.rst:1602 +#: library/curses.rst:1624 msgid "Shifted Print" msgstr "" -#: library/curses.rst:1604 +#: library/curses.rst:1626 msgid "Shifted Redo" msgstr "" -#: library/curses.rst:1606 +#: library/curses.rst:1628 msgid "Shifted Replace" msgstr "" -#: library/curses.rst:1608 +#: library/curses.rst:1630 msgid "Shifted Right arrow" msgstr "" -#: library/curses.rst:1610 +#: library/curses.rst:1632 msgid "Shifted Resume" msgstr "" -#: library/curses.rst:1612 +#: library/curses.rst:1634 msgid "Shifted Save" msgstr "" -#: library/curses.rst:1614 +#: library/curses.rst:1636 msgid "Shifted Suspend" msgstr "" -#: library/curses.rst:1616 +#: library/curses.rst:1638 msgid "Shifted Undo" msgstr "" -#: library/curses.rst:1618 +#: library/curses.rst:1640 msgid "Suspend" msgstr "" -#: library/curses.rst:1620 +#: library/curses.rst:1642 msgid "Undo" msgstr "*Undo*" -#: library/curses.rst:1622 +#: library/curses.rst:1644 msgid "Mouse event has occurred" msgstr "" -#: library/curses.rst:1624 +#: library/curses.rst:1646 msgid "Terminal resize event" msgstr "" -#: library/curses.rst:1626 +#: library/curses.rst:1648 msgid "Maximum key value" msgstr "" -#: library/curses.rst:1629 +#: library/curses.rst:1651 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " -"are normally at least four function keys (:const:`KEY_F1 `, :const:" -"`KEY_F2 `, :const:`KEY_F3 `, :const:`KEY_F4 `) " -"available, and the arrow keys mapped to :const:`KEY_UP`, :const:`KEY_DOWN`, :" -"const:`KEY_LEFT` and :const:`KEY_RIGHT` in the obvious way. If your machine " -"has a PC keyboard, it is safe to expect arrow keys and twelve function keys " -"(older PC keyboards may have only ten function keys); also, the following " -"keypad mappings are standard:" +"are normally at least four function keys (:const:`KEY_F1 " +"`, :const:`KEY_F2 `, :const:`KEY_F3 " +"`, :const:`KEY_F4 `) available, and the arrow keys mapped " +"to :const:`KEY_UP`, :const:`KEY_DOWN`, :const:`KEY_LEFT` " +"and :const:`KEY_RIGHT` in the obvious way. If your machine has a PC " +"keyboard, it is safe to expect arrow keys and twelve function keys (older PC " +"keyboards may have only ten function keys); also, the following keypad " +"mappings are standard:" msgstr "" -#: library/curses.rst:1638 +#: library/curses.rst:1660 msgid "Keycap" msgstr "" -#: library/curses.rst:1783 library/curses.rst:1907 +#: library/curses.rst:1805 library/curses.rst:1926 msgid "Constant" msgstr "Constante" -#: library/curses.rst:1640 +#: library/curses.rst:1662 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: library/curses.rst:1640 +#: library/curses.rst:1662 msgid "KEY_IC" msgstr "" -#: library/curses.rst:1642 +#: library/curses.rst:1664 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: library/curses.rst:1642 +#: library/curses.rst:1664 msgid "KEY_DC" msgstr "" -#: library/curses.rst:1644 +#: library/curses.rst:1666 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: library/curses.rst:1644 +#: library/curses.rst:1666 msgid "KEY_HOME" msgstr "KEY_HOME" -#: library/curses.rst:1646 +#: library/curses.rst:1668 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: library/curses.rst:1646 +#: library/curses.rst:1668 msgid "KEY_END" msgstr "KEY_END" -#: library/curses.rst:1648 +#: library/curses.rst:1670 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: library/curses.rst:1648 +#: library/curses.rst:1670 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: library/curses.rst:1650 +#: library/curses.rst:1672 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: library/curses.rst:1650 +#: library/curses.rst:1672 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: library/curses.rst:1655 +#: library/curses.rst:1677 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2093,270 +2120,270 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: library/curses.rst:1662 +#: library/curses.rst:1684 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: library/curses.rst:1665 +#: library/curses.rst:1687 msgid "ACS code" msgstr "" -#: library/curses.rst:1667 +#: library/curses.rst:1689 msgid "alternate name for upper right corner" msgstr "" -#: library/curses.rst:1669 +#: library/curses.rst:1691 msgid "solid square block" msgstr "" -#: library/curses.rst:1671 +#: library/curses.rst:1693 msgid "board of squares" msgstr "" -#: library/curses.rst:1673 +#: library/curses.rst:1695 msgid "alternate name for horizontal line" msgstr "" -#: library/curses.rst:1675 +#: library/curses.rst:1697 msgid "alternate name for upper left corner" msgstr "" -#: library/curses.rst:1677 +#: library/curses.rst:1699 msgid "alternate name for top tee" msgstr "" -#: library/curses.rst:1679 +#: library/curses.rst:1701 msgid "bottom tee" msgstr "" -#: library/curses.rst:1681 +#: library/curses.rst:1703 msgid "bullet" msgstr "" -#: library/curses.rst:1683 +#: library/curses.rst:1705 msgid "checker board (stipple)" msgstr "" -#: library/curses.rst:1685 +#: library/curses.rst:1707 msgid "arrow pointing down" msgstr "" -#: library/curses.rst:1687 +#: library/curses.rst:1709 msgid "degree symbol" msgstr "" -#: library/curses.rst:1689 +#: library/curses.rst:1711 msgid "diamond" msgstr "" -#: library/curses.rst:1691 +#: library/curses.rst:1713 msgid "greater-than-or-equal-to" msgstr "" -#: library/curses.rst:1693 +#: library/curses.rst:1715 msgid "horizontal line" msgstr "" -#: library/curses.rst:1695 +#: library/curses.rst:1717 msgid "lantern symbol" msgstr "" -#: library/curses.rst:1697 +#: library/curses.rst:1719 msgid "left arrow" msgstr "" -#: library/curses.rst:1699 +#: library/curses.rst:1721 msgid "less-than-or-equal-to" msgstr "" -#: library/curses.rst:1701 +#: library/curses.rst:1723 msgid "lower left-hand corner" msgstr "" -#: library/curses.rst:1703 +#: library/curses.rst:1725 msgid "lower right-hand corner" msgstr "" -#: library/curses.rst:1705 +#: library/curses.rst:1727 msgid "left tee" msgstr "" -#: library/curses.rst:1707 +#: library/curses.rst:1729 msgid "not-equal sign" msgstr "" -#: library/curses.rst:1709 +#: library/curses.rst:1731 msgid "letter pi" msgstr "" -#: library/curses.rst:1711 +#: library/curses.rst:1733 msgid "plus-or-minus sign" msgstr "" -#: library/curses.rst:1713 +#: library/curses.rst:1735 msgid "big plus sign" msgstr "" -#: library/curses.rst:1715 +#: library/curses.rst:1737 msgid "right arrow" msgstr "" -#: library/curses.rst:1717 +#: library/curses.rst:1739 msgid "right tee" msgstr "" -#: library/curses.rst:1719 +#: library/curses.rst:1741 msgid "scan line 1" msgstr "" -#: library/curses.rst:1721 +#: library/curses.rst:1743 msgid "scan line 3" msgstr "" -#: library/curses.rst:1723 +#: library/curses.rst:1745 msgid "scan line 7" msgstr "" -#: library/curses.rst:1725 +#: library/curses.rst:1747 msgid "scan line 9" msgstr "" -#: library/curses.rst:1727 +#: library/curses.rst:1749 msgid "alternate name for lower right corner" msgstr "" -#: library/curses.rst:1729 +#: library/curses.rst:1751 msgid "alternate name for vertical line" msgstr "" -#: library/curses.rst:1731 +#: library/curses.rst:1753 msgid "alternate name for right tee" msgstr "" -#: library/curses.rst:1733 +#: library/curses.rst:1755 msgid "alternate name for lower left corner" msgstr "" -#: library/curses.rst:1735 +#: library/curses.rst:1757 msgid "alternate name for bottom tee" msgstr "" -#: library/curses.rst:1737 +#: library/curses.rst:1759 msgid "alternate name for left tee" msgstr "" -#: library/curses.rst:1739 +#: library/curses.rst:1761 msgid "alternate name for crossover or big plus" msgstr "" -#: library/curses.rst:1741 +#: library/curses.rst:1763 msgid "pound sterling" msgstr "" -#: library/curses.rst:1743 +#: library/curses.rst:1765 msgid "top tee" msgstr "" -#: library/curses.rst:1745 +#: library/curses.rst:1767 msgid "up arrow" msgstr "" -#: library/curses.rst:1747 +#: library/curses.rst:1769 msgid "upper left corner" msgstr "" -#: library/curses.rst:1749 +#: library/curses.rst:1771 msgid "upper right corner" msgstr "" -#: library/curses.rst:1751 +#: library/curses.rst:1773 msgid "vertical line" msgstr "" -#: library/curses.rst:1754 +#: library/curses.rst:1776 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: library/curses.rst:1757 +#: library/curses.rst:1779 msgid "Mouse button constant" msgstr "" -#: library/curses.rst:1759 +#: library/curses.rst:1781 msgid "Mouse button *n* pressed" msgstr "" -#: library/curses.rst:1761 +#: library/curses.rst:1783 msgid "Mouse button *n* released" msgstr "" -#: library/curses.rst:1763 +#: library/curses.rst:1785 msgid "Mouse button *n* clicked" msgstr "" -#: library/curses.rst:1765 +#: library/curses.rst:1787 msgid "Mouse button *n* double clicked" msgstr "" -#: library/curses.rst:1767 +#: library/curses.rst:1789 msgid "Mouse button *n* triple clicked" msgstr "" -#: library/curses.rst:1769 +#: library/curses.rst:1791 msgid "Shift was down during button state change" msgstr "" -#: library/curses.rst:1773 +#: library/curses.rst:1795 msgid "Control was down during button state change" msgstr "" -#: library/curses.rst:1780 +#: library/curses.rst:1802 msgid "The following table lists the predefined colors:" msgstr "" -#: library/curses.rst:1783 +#: library/curses.rst:1805 msgid "Color" msgstr "" -#: library/curses.rst:1785 +#: library/curses.rst:1807 msgid "Black" msgstr "" -#: library/curses.rst:1787 +#: library/curses.rst:1809 msgid "Blue" msgstr "" -#: library/curses.rst:1789 +#: library/curses.rst:1811 msgid "Cyan (light greenish blue)" msgstr "" -#: library/curses.rst:1791 +#: library/curses.rst:1813 msgid "Green" msgstr "" -#: library/curses.rst:1793 +#: library/curses.rst:1815 msgid "Magenta (purplish red)" msgstr "" -#: library/curses.rst:1795 +#: library/curses.rst:1817 msgid "Red" msgstr "" -#: library/curses.rst:1797 +#: library/curses.rst:1819 msgid "White" msgstr "" -#: library/curses.rst:1799 +#: library/curses.rst:1821 msgid "Yellow" msgstr "" -#: library/curses.rst:1804 -msgid ":mod:`curses.textpad` --- Text input widget for curses programs" +#: library/curses.rst:1826 +msgid ":mod:`!curses.textpad` --- Text input widget for curses programs" msgstr "" -#: library/curses.rst:1812 +#: library/curses.rst:1831 msgid "" -"The :mod:`curses.textpad` module provides a :class:`Textbox` class that " +"The :mod:`!curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " "keybindings resembling those of Emacs (thus, also of Netscape Navigator, " "BBedit 6.x, FrameMaker, and many other programs). The module also provides " @@ -2364,11 +2391,11 @@ msgid "" "purposes." msgstr "" -#: library/curses.rst:1818 -msgid "The module :mod:`curses.textpad` defines the following function:" +#: library/curses.rst:1837 +msgid "The module :mod:`!curses.textpad` defines the following function:" msgstr "" -#: library/curses.rst:1823 +#: library/curses.rst:1842 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2380,206 +2407,206 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: library/curses.rst:1836 +#: library/curses.rst:1855 msgid "Textbox objects" msgstr "" -#: library/curses.rst:1838 +#: library/curses.rst:1857 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: library/curses.rst:1843 +#: library/curses.rst:1862 msgid "" -"Return a textbox widget object. The *win* argument should be a curses :ref:" -"`window ` object in which the textbox is to be " -"contained. The edit cursor of the textbox is initially located at the upper " -"left hand corner of the containing window, with coordinates ``(0, 0)``. The " -"instance's :attr:`stripspaces` flag is initially on." +"Return a textbox widget object. The *win* argument should be a " +"curses :ref:`window ` object in which the textbox is " +"to be contained. The edit cursor of the textbox is initially located at the " +"upper left hand corner of the containing window, with coordinates ``(0, " +"0)``. The instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: library/curses.rst:1849 +#: library/curses.rst:1868 #, fuzzy msgid ":class:`Textbox` objects have the following methods:" msgstr "" "Les objets de la classe :class:`TestLoader` ont les attributs suivants :" -#: library/curses.rst:1854 +#: library/curses.rst:1873 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " "*validator* is supplied, it must be a function. It will be called for each " "keystroke entered with the keystroke as a parameter; command dispatch is " "done on the result. This method returns the window contents as a string; " -"whether blanks in the window are included is affected by the :attr:" -"`stripspaces` attribute." +"whether blanks in the window are included is affected by " +"the :attr:`stripspaces` attribute." msgstr "" -#: library/curses.rst:1865 +#: library/curses.rst:1884 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: library/curses.rst:1907 +#: library/curses.rst:1926 msgid "Keystroke" msgstr "" -#: library/curses.rst:1869 +#: library/curses.rst:1888 msgid "Action" msgstr "Action" -#: library/curses.rst:1871 +#: library/curses.rst:1890 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: library/curses.rst:1871 +#: library/curses.rst:1890 msgid "Go to left edge of window." msgstr "" -#: library/curses.rst:1909 +#: library/curses.rst:1928 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: library/curses.rst:1873 +#: library/curses.rst:1892 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: library/curses.rst:1876 +#: library/curses.rst:1895 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: library/curses.rst:1876 +#: library/curses.rst:1895 msgid "Delete character under cursor." msgstr "" -#: library/curses.rst:1878 +#: library/curses.rst:1897 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: library/curses.rst:1878 +#: library/curses.rst:1897 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: library/curses.rst:1911 +#: library/curses.rst:1930 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: library/curses.rst:1881 +#: library/curses.rst:1900 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: library/curses.rst:1884 +#: library/curses.rst:1903 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: library/curses.rst:1884 +#: library/curses.rst:1903 msgid "Terminate, returning the window contents." msgstr "" -#: library/curses.rst:1886 +#: library/curses.rst:1905 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: library/curses.rst:1886 +#: library/curses.rst:1905 msgid "Delete character backward." msgstr "" -#: library/curses.rst:1888 +#: library/curses.rst:1907 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: library/curses.rst:1888 +#: library/curses.rst:1907 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: library/curses.rst:1891 +#: library/curses.rst:1910 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: library/curses.rst:1891 +#: library/curses.rst:1910 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: library/curses.rst:1894 +#: library/curses.rst:1913 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: library/curses.rst:1894 +#: library/curses.rst:1913 msgid "Refresh screen." msgstr "" -#: library/curses.rst:1915 +#: library/curses.rst:1934 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: library/curses.rst:1896 +#: library/curses.rst:1915 msgid "Cursor down; move down one line." msgstr "" -#: library/curses.rst:1898 +#: library/curses.rst:1917 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: library/curses.rst:1898 +#: library/curses.rst:1917 msgid "Insert a blank line at cursor location." msgstr "" -#: library/curses.rst:1913 +#: library/curses.rst:1932 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: library/curses.rst:1900 +#: library/curses.rst:1919 msgid "Cursor up; move up one line." msgstr "" -#: library/curses.rst:1903 +#: library/curses.rst:1922 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: library/curses.rst:1909 +#: library/curses.rst:1928 #, fuzzy msgid ":const:`~curses.KEY_LEFT`" msgstr ":const:`KEY_LEFT`" -#: library/curses.rst:1911 +#: library/curses.rst:1930 #, fuzzy msgid ":const:`~curses.KEY_RIGHT`" msgstr ":const:`KEY_RIGHT`" -#: library/curses.rst:1913 +#: library/curses.rst:1932 #, fuzzy msgid ":const:`~curses.KEY_UP`" msgstr ":const:`KEY_UP`" -#: library/curses.rst:1915 +#: library/curses.rst:1934 #, fuzzy msgid ":const:`~curses.KEY_DOWN`" msgstr ":const:`KEY_DOWN`" -#: library/curses.rst:1917 +#: library/curses.rst:1936 #, fuzzy msgid ":const:`~curses.KEY_BACKSPACE`" msgstr ":const:`KEY_BACKSPACE`" -#: library/curses.rst:1917 +#: library/curses.rst:1936 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: library/curses.rst:1920 +#: library/curses.rst:1939 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: library/curses.rst:1926 +#: library/curses.rst:1945 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: library/curses.rst:1932 +#: library/curses.rst:1951 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/dataclasses.po b/library/dataclasses.po index 6f2cb8db0..eaf381289 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-03-20 09:44+0100\n" "Last-Translator: David GIRAUD \n" "Language-Team: FRENCH \n" @@ -16,43 +16,41 @@ msgstr "" "X-Generator: Poedit 3.2.1\n" #: library/dataclasses.rst:2 -#, fuzzy msgid ":mod:`!dataclasses` --- Data Classes" -msgstr ":mod:`dataclasses` — Classes de données" +msgstr ":mod:`!dataclasses` — Classes de données" -#: library/dataclasses.rst:10 +#: library/dataclasses.rst:7 msgid "**Source code:** :source:`Lib/dataclasses.py`" msgstr "**Code source :** :source:`Lib/dataclasses.py`" -#: library/dataclasses.rst:14 -#, fuzzy +#: library/dataclasses.rst:11 msgid "" "This module provides a decorator and functions for automatically adding " -"generated :term:`special methods ` such as :meth:`~object." -"__init__` and :meth:`~object.__repr__` to user-defined classes. It was " -"originally described in :pep:`557`." +"generated :term:`special methods ` such " +"as :meth:`~object.__init__` and :meth:`~object.__repr__` to user-defined " +"classes. It was originally described in :pep:`557`." msgstr "" "Ce module fournit un décorateur et des fonctions pour générer " -"automatiquement les :term:`méthodes spéciales ` comme :meth:" -"`__init__` et :meth:`__repr__` dans les *Classes de Données* définies par " -"l’utilisateur. Ces classes ont été décrites dans la :pep:`557`." +"automatiquement les :term:`méthodes spéciales ` " +"comme :meth:`~object.__init__` et :meth:`~object.__repr__` dans les classes " +"définies par l’utilisateur. Ce mécanisme a été décrit dans la :pep:`557`." -#: library/dataclasses.rst:19 +#: library/dataclasses.rst:16 msgid "" -"The member variables to use in these generated methods are defined using :" -"pep:`526` type annotations. For example, this code::" +"The member variables to use in these generated methods are defined " +"using :pep:`526` type annotations. For example, this code::" msgstr "" "Les variables membres à utiliser dans ces méthodes générées sont définies en " "utilisant les annotations de type :pep:`526`. Par exemple ::" -#: library/dataclasses.rst:34 +#: library/dataclasses.rst:31 #, fuzzy msgid "will add, among other things, a :meth:`!__init__` that looks like::" msgstr "" -"ce code ajoute à la classe, entre autres choses, une méthode :meth:" -"`__init__` qui ressemble à ::" +"ce code ajoute à la classe, entre autres choses, une " +"méthode :meth:`__init__` qui ressemble à ::" -#: library/dataclasses.rst:41 +#: library/dataclasses.rst:38 #, fuzzy msgid "" "Note that this method is automatically added to the class: it is not " @@ -61,21 +59,22 @@ msgstr "" "Il est important de noter que cette méthode est ajoutée automatiquement dans " "la classe. Elle n’est jamais écrite dans la définition de ``InventoryItem``." -#: library/dataclasses.rst:47 +#: library/dataclasses.rst:44 msgid "Module contents" msgstr "Classe de données" -#: library/dataclasses.rst:51 +#: library/dataclasses.rst:48 #, fuzzy msgid "" -"This function is a :term:`decorator` that is used to add generated :term:" -"`special methods ` to classes, as described below." +"This function is a :term:`decorator` that is used to add " +"generated :term:`special methods ` to classes, as described " +"below." msgstr "" "Cette fonction est un :term:`décorateur ` qui ajoute aux classes " "des :term:`méthodes spéciales ` générées automatiquement. " "Voici une description plus détaillée." -#: library/dataclasses.rst:54 +#: library/dataclasses.rst:51 #, fuzzy msgid "" "The ``@dataclass`` decorator examines the class to find ``field``\\s. A " @@ -84,12 +83,12 @@ msgid "" "``@dataclass`` examines the type specified in the variable annotation." msgstr "" "Le décorateur :func:`dataclass` examine la classe pour trouver des champs. " -"Un champ est défini comme une variable de classe qui possède une :term:" -"`annotation de type `. À deux exceptions près décrites " -"plus bas, :func:`dataclass` ne prend pas en considération le type donné dans " -"l'annotation." +"Un champ est défini comme une variable de classe qui possède " +"une :term:`annotation de type `. À deux exceptions " +"près décrites plus bas, :func:`dataclass` ne prend pas en considération le " +"type donné dans l'annotation." -#: library/dataclasses.rst:60 +#: library/dataclasses.rst:57 msgid "" "The order of the fields in all of the generated methods is the order in " "which they appear in the class definition." @@ -97,7 +96,7 @@ msgstr "" "L’ordre des paramètres des méthodes générées est celui d’apparition des " "champs dans la définition de la classe." -#: library/dataclasses.rst:63 +#: library/dataclasses.rst:60 #, fuzzy msgid "" "The ``@dataclass`` decorator will add various \"dunder\" methods to the " @@ -111,7 +110,7 @@ msgstr "" "la classe, le comportement dépend des paramètres. Le décorateur renvoie la " "classe sur laquelle il est appelé ; aucune nouvelle classe n'est créée." -#: library/dataclasses.rst:69 +#: library/dataclasses.rst:66 #, fuzzy msgid "" "If ``@dataclass`` is used just as a simple decorator with no parameters, it " @@ -123,12 +122,12 @@ msgstr "" "sa signature). Ainsi, les trois usages suivants de :func:`dataclass` sont " "équivalents ::" -#: library/dataclasses.rst:87 +#: library/dataclasses.rst:84 #, fuzzy msgid "The parameters to ``@dataclass`` are:" msgstr "Les paramètres de :func:`dataclass` sont les suivants :" -#: library/dataclasses.rst:89 +#: library/dataclasses.rst:86 #, fuzzy msgid "" "*init*: If true (the default), a :meth:`~object.__init__` method will be " @@ -136,7 +135,7 @@ msgid "" msgstr "" "*init* : si vrai (par défaut), une méthode :meth:`__init__` est générée." -#: library/dataclasses.rst:92 +#: library/dataclasses.rst:89 #, fuzzy msgid "" "If the class already defines :meth:`!__init__`, this parameter is ignored." @@ -144,7 +143,7 @@ msgstr "" "Si la classe définit déjà une méthode :meth:`__init__`, ce paramètre est " "ignoré." -#: library/dataclasses.rst:95 +#: library/dataclasses.rst:92 #, fuzzy msgid "" "*repr*: If true (the default), a :meth:`~object.__repr__` method will be " @@ -161,7 +160,7 @@ msgstr "" "sont ignorés. Par exemple : ``InventoryItem(name='widget', unit_price=3.0, " "quantity_on_hand=10)``." -#: library/dataclasses.rst:102 +#: library/dataclasses.rst:99 #, fuzzy msgid "" "If the class already defines :meth:`!__repr__`, this parameter is ignored." @@ -169,7 +168,7 @@ msgstr "" "Si la classe définit déjà une méthode :meth:`__repr__`, ce paramètre est " "ignoré." -#: library/dataclasses.rst:105 +#: library/dataclasses.rst:102 #, fuzzy msgid "" "*eq*: If true (the default), an :meth:`~object.__eq__` method will be " @@ -182,7 +181,7 @@ msgstr "" "des *n*-uplet de leurs champs, pris dans l’ordre. Les deux instances dans la " "comparaison doivent être de même type." -#: library/dataclasses.rst:110 +#: library/dataclasses.rst:107 #, fuzzy msgid "" "If the class already defines :meth:`!__eq__`, this parameter is ignored." @@ -190,37 +189,42 @@ msgstr "" "Si la classe définit déjà une méthode :meth:`__eq__`, ce paramètre est " "ignoré." -#: library/dataclasses.rst:113 +#: library/dataclasses.rst:110 #, fuzzy msgid "" -"*order*: If true (the default is ``False``), :meth:`~object.__lt__`, :meth:" -"`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` methods " -"will be generated. These compare the class as if it were a tuple of its " -"fields, in order. Both instances in the comparison must be of the identical " -"type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised." +"*order*: If true (the default is " +"``False``), :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, " +"and :meth:`~object.__ge__` methods will be generated. These compare the " +"class as if it were a tuple of its fields, in order. Both instances in the " +"comparison must be of the identical type. If *order* is true and *eq* is " +"false, a :exc:`ValueError` is raised." msgstr "" -"*order* : si vrai (``False`` par défaut), les méthodes :meth:`__lt__`, :meth:" -"`__le__`, :meth:`__gt__`, et :meth:`__ge__` sont générées. Elles permettent " -"de comparer les instances de la classe en les considérant comme des *n*-" -"uplets, dans l’ordre de définition des champs. Toutes les instances dans la " -"comparaison doivent être de même type. Si ``order`` est vrai mais que " -"``eq`` est faux, une :exc:`ValueError` est levée." +"*order* : si vrai (``False`` par défaut), les " +"méthodes :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, et :meth:`__ge__` " +"sont générées. Elles permettent de comparer les instances de la classe en " +"les considérant comme des *n*-uplets, dans l’ordre de définition des " +"champs. Toutes les instances dans la comparaison doivent être de même " +"type. Si ``order`` est vrai mais que ``eq`` est faux, une :exc:`ValueError` " +"est levée." -#: library/dataclasses.rst:120 +#: library/dataclasses.rst:117 #, fuzzy msgid "" -"If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:" -"`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised." +"If the class already defines any of :meth:`!__lt__`, :meth:`!" +"__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is " +"raised." msgstr "" -"Si la classe définit déjà l’une des méthodes :meth:`__lt__`, :meth:" -"`__le__`, :meth:`__gt__`, ou :meth:`__ge__`, alors une :exc:`TypeError` est " -"levée." +"Si la classe définit déjà l’une des " +"méthodes :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, ou :meth:`__ge__`, " +"alors une :exc:`TypeError` est levée." -#: library/dataclasses.rst:124 +#: library/dataclasses.rst:121 #, fuzzy msgid "" -"*unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method " -"is generated according to how *eq* and *frozen* are set." +"*unsafe_hash*: If true, force ``dataclasses`` to create " +"a :meth:`~object.__hash__` method, even though it may not be safe to do so. " +"Otherwise, generate a :meth:`~object.__hash__` method according to how *eq* " +"and *frozen* are set. The default value is ``False``." msgstr "" "*unsafe_hash* : si ``False`` (par défaut), une méthode :meth:`__hash__` est " "générée et son comportement dépend des valeurs de *eq* et *frozen*." @@ -246,18 +250,18 @@ msgstr "" #: library/dataclasses.rst:134 #, fuzzy msgid "" -"By default, ``@dataclass`` will not implicitly add a :meth:`~object." -"__hash__` method unless it is safe to do so. Neither will it add or change " -"an existing explicitly defined :meth:`!__hash__` method. Setting the class " -"attribute ``__hash__ = None`` has a specific meaning to Python, as described " -"in the :meth:`!__hash__` documentation." +"By default, ``@dataclass`` will not implicitly add " +"a :meth:`~object.__hash__` method unless it is safe to do so. Neither will " +"it add or change an existing explicitly defined :meth:`!__hash__` method. " +"Setting the class attribute ``__hash__ = None`` has a specific meaning to " +"Python, as described in the :meth:`!__hash__` documentation." msgstr "" -"Par défaut, :func:`dataclass` n’ajoute pas de méthode implicite :meth:" -"`__hash__`, sauf s’il n’existe aucun risque sous-jacent. Il n’ajoute ou ne " -"modifie pas non plus la méthode :meth:`__hash__` si elle a été définie " -"explicitement. Définir l’attribut de classe ``__hash__ = None`` a une " -"signification particulière, comme précisé dans la documentation de :meth:" -"`__hash__`." +"Par défaut, :func:`dataclass` n’ajoute pas de méthode " +"implicite :meth:`__hash__`, sauf s’il n’existe aucun risque sous-jacent. Il " +"n’ajoute ou ne modifie pas non plus la méthode :meth:`__hash__` si elle a " +"été définie explicitement. Définir l’attribut de classe ``__hash__ = None`` " +"a une signification particulière, comme précisé dans la documentation " +"de :meth:`__hash__`." #: library/dataclasses.rst:140 #, fuzzy @@ -270,37 +274,37 @@ msgid "" "and should be considered carefully." msgstr "" "Si :meth:`__hash__` n’est pas défini explicitement, ou s’il a pour valeur " -"``None``, alors :func:`dataclass` *peut* ajouter une méthode :meth:" -"`__hash__` implicite. Bien que ce ne soit pas recommandé, vous pouvez " -"forcer :func:`dataclass` à créer une méthode :meth:`__hash__` en utilisant " -"``unsafe_hash=True``. Cela pourrait être nécessaire si votre classe est " -"logiquement immuable mais qu’une mutation est tout de même possible. Il " -"s'agit là d'un cas particulier qui doit être considéré avec la plus grande " -"prudence." +"``None``, alors :func:`dataclass` *peut* ajouter une " +"méthode :meth:`__hash__` implicite. Bien que ce ne soit pas recommandé, vous " +"pouvez forcer :func:`dataclass` à créer une méthode :meth:`__hash__` en " +"utilisant ``unsafe_hash=True``. Cela pourrait être nécessaire si votre " +"classe est logiquement immuable mais qu’une mutation est tout de même " +"possible. Il s'agit là d'un cas particulier qui doit être considéré avec la " +"plus grande prudence." #: library/dataclasses.rst:147 #, fuzzy msgid "" "Here are the rules governing implicit creation of a :meth:`!__hash__` " "method. Note that you cannot both have an explicit :meth:`!__hash__` method " -"in your dataclass and set ``unsafe_hash=True``; this will result in a :exc:" -"`TypeError`." +"in your dataclass and set ``unsafe_hash=True``; this will result in " +"a :exc:`TypeError`." msgstr "" -"Voici les règles autour de la création implicite de la méthode :meth:" -"`__hash__`. Il faut noter que vous ne pouvez pas avoir à la fois une " -"méthode :meth:`__hash__` explicite dans votre classe de données et définir " -"``unsafe_hash=True`` ; cela lèvera une :exc:`TypeError`." +"Voici les règles autour de la création implicite de la " +"méthode :meth:`__hash__`. Il faut noter que vous ne pouvez pas avoir à la " +"fois une méthode :meth:`__hash__` explicite dans votre classe de données et " +"définir ``unsafe_hash=True`` ; cela lèvera une :exc:`TypeError`." #: library/dataclasses.rst:152 #, fuzzy msgid "" "If *eq* and *frozen* are both true, by default ``@dataclass`` will generate " -"a :meth:`!__hash__` method for you. If *eq* is true and *frozen* is false, :" -"meth:`!__hash__` will be set to ``None``, marking it unhashable (which it " -"is, since it is mutable). If *eq* is false, :meth:`!__hash__` will be left " -"untouched meaning the :meth:`!__hash__` method of the superclass will be " -"used (if the superclass is :class:`object`, this means it will fall back to " -"id-based hashing)." +"a :meth:`!__hash__` method for you. If *eq* is true and *frozen* is " +"false, :meth:`!__hash__` will be set to ``None``, marking it unhashable " +"(which it is, since it is mutable). If *eq* is false, :meth:`!__hash__` " +"will be left untouched meaning the :meth:`!__hash__` method of the " +"superclass will be used (if the superclass is :class:`object`, this means it " +"will fall back to id-based hashing)." msgstr "" "Si *eq* et *frozen* sont tous deux vrais, :func:`dataclass` génère par " "défaut une méthode :meth:`__hash__` pour vous. Si *eq* est vrai mais que " @@ -315,9 +319,8 @@ msgstr "" #, fuzzy msgid "" "*frozen*: If true (the default is ``False``), assigning to fields will " -"generate an exception. This emulates read-only frozen instances. If :meth:" -"`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the " -"class, then :exc:`TypeError` is raised. See the discussion below." +"generate an exception. This emulates read-only frozen instances. See " +"the :ref:`discussion ` below." msgstr "" "*frozen* : si vrai (faux par défaut), assigner une valeur à un champ lève " "une exception. Cela simule le comportement des instances figées en lecture " @@ -325,14 +328,25 @@ msgstr "" "sur la classe, alors une :exc:`TypeError` est levée. Voir la discussion ci-" "dessous." -#: library/dataclasses.rst:165 +#: library/dataclasses.rst:164 #, fuzzy msgid "" -"*match_args*: If true (the default is ``True``), the :attr:`~object." -"__match_args__` tuple will be created from the list of parameters to the " -"generated :meth:`~object.__init__` method (even if :meth:`!__init__` is not " -"generated, see above). If false, or if :attr:`!__match_args__` is already " -"defined in the class, then :attr:`!__match_args__` will not be generated." +"If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in " +"the class and *frozen* is true, then :exc:`TypeError` is raised." +msgstr "" +"Sous-classe de :exc:`AttributeError`, levée lorsqu'une " +"méthode :meth:`__setattr__` ou :meth:`__delattr__` définie implicitement est " +"appelée dans une classe de données définie avec ``frozen=True``." + +#: library/dataclasses.rst:167 +#, fuzzy +msgid "" +"*match_args*: If true (the default is ``True``), " +"the :attr:`~object.__match_args__` tuple will be created from the list of " +"non keyword-only parameters to the generated :meth:`~object.__init__` method " +"(even if :meth:`!__init__` is not generated, see above). If false, or " +"if :attr:`!__match_args__` is already defined in the class, then :attr:`!" +"__match_args__` will not be generated." msgstr "" "*match_args* : si vrai (``True`` est la valeur par défaut), le *n*-uplet " "``__match_args__`` est créé automatiquement depuis la liste des paramètres " @@ -340,48 +354,43 @@ msgstr "" "générée, voir ci-dessus). Si faux ou si ``__match_args__`` est déjà défini " "dans la classe alors ``__match_args__`` n'est pas créé." -#: library/dataclasses.rst:174 +#: library/dataclasses.rst:176 #, fuzzy msgid "" "*kw_only*: If true (the default value is ``False``), then all fields will be " "marked as keyword-only. If a field is marked as keyword-only, then the only " "effect is that the :meth:`~object.__init__` parameter generated from a " "keyword-only field must be specified with a keyword when :meth:`!__init__` " -"is called. There is no effect on any other aspect of dataclasses. See the :" -"term:`parameter` glossary entry for details. Also see the :const:`KW_ONLY` " -"section." +"is called. See the :term:`parameter` glossary entry for details. Also see " +"the :const:`KW_ONLY` section." msgstr "" "*kw_only* : si vrai (``False`` est la valeur par défaut) alors tous les " "champs sont marqués comme exclusivement nommés. Si un champ est marqué comme " -"exclusivement nommé, le seul impact est que le champ de la méthode :meth:" -"`__init__` générée devra être explicitement nommé lors de l'appel de la " -"méthode :meth:`__init__`. Il n'y a aucun autre effet dans les autres aspects " -"des classes de données. Voir l'entrée :term:`paramètre ` du " -"glossaire pour plus d'informations. Voir également la section :const:" -"`KW_ONLY`." +"exclusivement nommé, le seul impact est que le champ de la " +"méthode :meth:`__init__` générée devra être explicitement nommé lors de " +"l'appel de la méthode :meth:`__init__`. Il n'y a aucun autre effet dans les " +"autres aspects des classes de données. Voir l'entrée :term:`paramètre " +"` du glossaire pour plus d'informations. Voir également la " +"section :const:`KW_ONLY`." -#: library/dataclasses.rst:185 +#: library/dataclasses.rst:184 +msgid "Keyword-only fields are not included in :attr:`!__match_args__`." +msgstr "" + +#: library/dataclasses.rst:188 #, fuzzy msgid "" "*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " "attribute will be generated and new class will be returned instead of the " -"original one. If :attr:`!__slots__` is already defined in the class, then :" -"exc:`TypeError` is raised." +"original one. If :attr:`!__slots__` is already defined in the class, " +"then :exc:`TypeError` is raised." msgstr "" -"*slot* : si vrai (``False`` est la valeur par défaut), l'attribut :attr:" -"`__slots__` est généré et une nouvelle classe est renvoyée à la place de " -"celle d'origine. Si :attr:`__slots__` est déjà défini dans la classe alors " -"une :exc:`TypeError` est levée." +"*slot* : si vrai (``False`` est la valeur par défaut), " +"l'attribut :attr:`__slots__` est généré et une nouvelle classe est renvoyée " +"à la place de celle d'origine. Si :attr:`__slots__` est déjà défini dans la " +"classe alors une :exc:`TypeError` est levée." -#: library/dataclasses.rst:191 -msgid "" -"Calling no-arg :func:`super` in dataclasses using ``slots=True`` will result " -"in the following exception being raised: ``TypeError: super(type, obj): obj " -"must be an instance or subtype of type``. The two-arg :func:`super` is a " -"valid workaround. See :gh:`90562` for full details." -msgstr "" - -#: library/dataclasses.rst:198 +#: library/dataclasses.rst:194 msgid "" "Passing parameters to a base class :meth:`~object.__init_subclass__` when " "using ``slots=True`` will result in a :exc:`TypeError`. Either use " @@ -389,15 +398,15 @@ msgid "" "workaround. See :gh:`91126` for full details." msgstr "" -#: library/dataclasses.rst:206 +#: library/dataclasses.rst:202 #, fuzzy msgid "" "If a field name is already included in the :attr:`!__slots__` of a base " "class, it will not be included in the generated :attr:`!__slots__` to " "prevent :ref:`overriding them `. Therefore, do not " -"use :attr:`!__slots__` to retrieve the field names of a dataclass. Use :func:" -"`fields` instead. To be able to determine inherited slots, base class :attr:" -"`!__slots__` may be any iterable, but *not* an iterator." +"use :attr:`!__slots__` to retrieve the field names of a dataclass. " +"Use :func:`fields` instead. To be able to determine inherited slots, base " +"class :attr:`!__slots__` may be any iterable, but *not* an iterator." msgstr "" "Si un nom de champ est déjà inclus dans le ``__slots__`` d'une classe mère, " "il n'est pas inclus dans les ``__slots__`` générés pour éviter de :ref:`les " @@ -407,7 +416,7 @@ msgstr "" "hérités, ``__slots__`` de la classe mère peut être n'importe quel itérable, " "mais *pas* un itérateur." -#: library/dataclasses.rst:216 +#: library/dataclasses.rst:212 #, fuzzy msgid "" "*weakref_slot*: If true (the default is ``False``), add a slot named " @@ -420,7 +429,7 @@ msgstr "" "pouvoir référencer faiblement une instance. C'est une erreur de spécifier " "``weakref_slot=True`` sans spécifier également ``slots=True``." -#: library/dataclasses.rst:224 +#: library/dataclasses.rst:220 msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" @@ -428,7 +437,7 @@ msgstr "" "Les champs peuvent éventuellement préciser une valeur par défaut, en " "utilisant la syntaxe Python normale ::" -#: library/dataclasses.rst:232 +#: library/dataclasses.rst:228 #, fuzzy msgid "" "In this example, both :attr:`!a` and :attr:`!b` will be included in the " @@ -437,7 +446,7 @@ msgstr "" "Dans cet exemple, ``a`` et ``b`` sont tous deux inclus dans la signature de " "la méthode générée :meth:`__init__`, qui est définie comme suit ::" -#: library/dataclasses.rst:237 +#: library/dataclasses.rst:233 msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " "field with a default value. This is true whether this occurs in a single " @@ -447,7 +456,7 @@ msgstr "" "après un champ avec une valeur par défaut. C’est le cas que ce soit dans " "une seule classe ou si c’est le résultat d’un héritage de classes." -#: library/dataclasses.rst:243 +#: library/dataclasses.rst:239 #, fuzzy msgid "" "For common and simple use cases, no other functionality is required. There " @@ -459,10 +468,11 @@ msgstr "" "Dans les cas les plus simples et courants, ce qui a été décrit jusqu'ici " "suffit. Cependant, les classes de données possèdent des fonctionnalités " "supplémentaires fondées sur des métadonnées propres à chaque champ. Pour " -"remplir ces métadonnées, il suffit de mettre un appel à la fonction :func:" -"`field` à la place de la valeur par défaut, comme dans cet exemple ::" +"remplir ces métadonnées, il suffit de mettre un appel à la " +"fonction :func:`field` à la place de la valeur par défaut, comme dans cet " +"exemple ::" -#: library/dataclasses.rst:256 +#: library/dataclasses.rst:252 msgid "" "As shown above, the :const:`MISSING` value is a sentinel object used to " "detect if some parameters are provided by the user. This sentinel is used " @@ -472,16 +482,16 @@ msgstr "" "Comme le montre la signature, la constante :const:`MISSING` est une valeur " "sentinelle pour déterminer si des paramètres ont été fournis par " "l'utilisateur. ``None`` ne conviendrait pas puisque c'est une valeur avec un " -"sens qui peut être différent pour certains paramètres. La sentinelle :const:" -"`MISSING` est interne au module et ne doit pas être utilisée dans vos " -"programmes." +"sens qui peut être différent pour certains paramètres. La " +"sentinelle :const:`MISSING` est interne au module et ne doit pas être " +"utilisée dans vos programmes." -#: library/dataclasses.rst:261 +#: library/dataclasses.rst:257 #, fuzzy msgid "The parameters to :func:`!field` are:" msgstr "Les paramètres de :func:`field` sont :" -#: library/dataclasses.rst:263 +#: library/dataclasses.rst:259 #, fuzzy msgid "" "*default*: If provided, this will be the default value for this field. This " @@ -492,7 +502,7 @@ msgstr "" "L'appel à :meth:`field` est mis à la place normale de la valeur par défaut, " "d'où la nécessité de ce paramètre." -#: library/dataclasses.rst:267 +#: library/dataclasses.rst:263 #, fuzzy msgid "" "*default_factory*: If provided, it must be a zero-argument callable that " @@ -507,7 +517,7 @@ msgstr "" "les valeurs par défaut sont mutables. Une erreur se produit si *default* et " "*default_factory* sont donnés tous les deux." -#: library/dataclasses.rst:273 +#: library/dataclasses.rst:269 #, fuzzy msgid "" "*init*: If true (the default), this field is included as a parameter to the " @@ -516,7 +526,7 @@ msgstr "" "*init* : si vrai (par défaut), la méthode :meth:`__init__` générée possède " "un paramètre correspondant à ce champ." -#: library/dataclasses.rst:276 +#: library/dataclasses.rst:272 #, fuzzy msgid "" "*repr*: If true (the default), this field is included in the string returned " @@ -525,14 +535,16 @@ msgstr "" "*repr* : si vrai (par défaut), le champ est inclus dans les chaînes " "construites par la méthode :meth:`__repr__` générée." -#: library/dataclasses.rst:279 +#: library/dataclasses.rst:275 #, fuzzy msgid "" "*hash*: This can be a bool or ``None``. If true, this field is included in " -"the generated :meth:`~object.__hash__` method. If ``None`` (the default), " -"use the value of *compare*: this would normally be the expected behavior. A " -"field should be considered in the hash if it's used for comparisons. " -"Setting this value to anything other than ``None`` is discouraged." +"the generated :meth:`~object.__hash__` method. If false, this field is " +"excluded from the generated :meth:`~object.__hash__`. If ``None`` (the " +"default), use the value of *compare*: this would normally be the expected " +"behavior, since a field should be included in the hash if it's used for " +"comparisons. Setting this value to anything other than ``None`` is " +"discouraged." msgstr "" "*hash* : ce paramètre est un booléen ou ``None``. La valeur ``False`` force " "la prise en compte du champ dans la méthode :meth:`__hash__` générée, alors " @@ -541,7 +553,7 @@ msgstr "" "hachage les champs employés pour les comparaisons. Il est déconseillé de " "mettre ce paramètre à autre chose que ``None``." -#: library/dataclasses.rst:286 +#: library/dataclasses.rst:283 msgid "" "One possible reason to set ``hash=False`` but ``compare=True`` would be if a " "field is expensive to compute a hash value for, that field is needed for " @@ -556,18 +568,18 @@ msgstr "" "moment, on peut alors se passer du champ dans le hachage tout en le faisant " "participer aux comparaisons." -#: library/dataclasses.rst:292 +#: library/dataclasses.rst:289 #, fuzzy msgid "" "*compare*: If true (the default), this field is included in the generated " -"equality and comparison methods (:meth:`~object.__eq__`, :meth:`~object." -"__gt__`, et al.)." +"equality and comparison methods " +"(:meth:`~object.__eq__`, :meth:`~object.__gt__`, et al.)." msgstr "" "*compare* : si vrai (par défaut), le champ est considéré dans les " -"comparaisons d'égalité et d'inégalité dans les méthodes générées :meth:" -"`__eq__`, :meth:`__gt__`, etc." +"comparaisons d'égalité et d'inégalité dans les méthodes " +"générées :meth:`__eq__`, :meth:`__gt__`, etc." -#: library/dataclasses.rst:296 +#: library/dataclasses.rst:293 #, fuzzy msgid "" "*metadata*: This can be a mapping or ``None``. ``None`` is treated as an " @@ -582,36 +594,44 @@ msgstr "" "tableau associatif devient accessible sur l'objet :class:`Field`, sous la " "forme d'un :func:`~types.MappingProxyType` afin qu'il soit en lecture seule." -#: library/dataclasses.rst:304 +#: library/dataclasses.rst:301 #, fuzzy msgid "" "*kw_only*: If true, this field will be marked as keyword-only. This is used " "when the generated :meth:`~object.__init__` method's parameters are computed." msgstr "" "``kw_only`` : s'il est vrai, ce champ est marqué comme exclusivement nommé. " -"Cela est utilisé lors du traitement des paramètres de la méthode :meth:" -"`__init__` générée." +"Cela est utilisé lors du traitement des paramètres de la " +"méthode :meth:`__init__` générée." + +#: library/dataclasses.rst:305 +msgid "Keyword-only fields are also not included in :attr:`!__match_args__`." +msgstr "" + +#: library/dataclasses.rst:309 +msgid "*doc*: optional docstring for this field." +msgstr "" -#: library/dataclasses.rst:310 +#: library/dataclasses.rst:313 #, fuzzy msgid "" "If the default value of a field is specified by a call to :func:`!field`, " "then the class attribute for this field will be replaced by the specified " "*default* value. If *default* is not provided, then the class attribute " -"will be deleted. The intent is that after the :func:`@dataclass " -"` decorator runs, the class attributes will all contain the " -"default values for the fields, just as if the default value itself were " -"specified. For example, after::" +"will be deleted. The intent is that after the :deco:`dataclass` decorator " +"runs, the class attributes will all contain the default values for the " +"fields, just as if the default value itself were specified. For example, " +"after::" msgstr "" "Si la valeur par défaut d'un champ est donnée dans un appel à :func:`field` " "(et pas directement), l'attribut correspondant de la classe est remplacé par " "cette valeur. Si le paramètre *default* n'est pas passé, l'attribut est " -"simplement supprimé. De cette manière, après le passage du décorateur :func:" -"`dataclass`, les attributs de la classe contiennent les valeurs par défaut " -"des champs exactement comme si elles avaient été définies directement. Par " -"exemple ::" +"simplement supprimé. De cette manière, après le passage du " +"décorateur :func:`dataclass`, les attributs de la classe contiennent les " +"valeurs par défaut des champs exactement comme si elles avaient été définies " +"directement. Par exemple ::" -#: library/dataclasses.rst:326 +#: library/dataclasses.rst:329 #, fuzzy msgid "" "The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" @@ -622,7 +642,13 @@ msgstr "" "l'attribut ``C.t`` vaut ``20``, alors que les attributs ``C.x`` et ``C.y`` " "n'existent pas." -#: library/dataclasses.rst:332 +#: library/dataclasses.rst:333 +msgid "" +"If *metadata* is ``None``, use an empty :class:`frozendict`, instead of " +"a :func:`~types.MappingProxyType` of an empty :class:`dict`." +msgstr "" + +#: library/dataclasses.rst:339 #, fuzzy msgid "" ":class:`!Field` objects describe each defined field. These objects are " @@ -636,28 +662,29 @@ msgstr "" "instancier un objet :class:`Field` eux-mêmes. Les attributs documentés sont " "les suivants :" -#: library/dataclasses.rst:337 +#: library/dataclasses.rst:344 #, fuzzy msgid ":attr:`!name`: The name of the field." msgstr "*name* : le nom du champ ;" -#: library/dataclasses.rst:338 +#: library/dataclasses.rst:345 #, fuzzy msgid ":attr:`!type`: The type of the field." msgstr "*type* : le type associé au champ par l'annotation ;" -#: library/dataclasses.rst:339 +#: library/dataclasses.rst:346 #, fuzzy msgid "" -":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!repr`, :" -"attr:`!hash`, :attr:`!compare`, :attr:`!metadata`, and :attr:`!kw_only` have " -"the identical meaning and values as they do in the :func:`field` function." +":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!" +"repr`, :attr:`!hash`, :attr:`!compare`, :attr:`!metadata`, and :attr:`!" +"kw_only` have the identical meaning and values as they do in " +"the :func:`field` function." msgstr "" "``default``, ``default_factory``, ``init``, ``repr``, ``hash``, ``compare``, " -"``metadata`` et ``kw_only`` qui correspondent aux paramètres de :func:" -"`field` et en prennent les valeurs." +"``metadata`` et ``kw_only`` qui correspondent aux paramètres " +"de :func:`field` et en prennent les valeurs." -#: library/dataclasses.rst:343 +#: library/dataclasses.rst:350 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." @@ -665,7 +692,16 @@ msgstr "" "D'autres attributs peuvent exister, mais ils sont privés et ne sont pas " "censés être inspectés. Le code ne doit jamais reposer sur eux." -#: library/dataclasses.rst:348 +#: library/dataclasses.rst:355 +msgid "" +"``InitVar[T]`` type annotations describe variables that are :ref:`init-only " +"`. Fields annotated with :class:`!InitVar` " +"are considered pseudo-fields, and thus are neither returned by " +"the :func:`fields` function nor used in any way except adding them as " +"parameters to :meth:`~object.__init__` and an optional :meth:`__post_init__`." +msgstr "" + +#: library/dataclasses.rst:364 msgid "" "Returns a tuple of :class:`Field` objects that define the fields for this " "dataclass. Accepts either a dataclass, or an instance of a dataclass. " @@ -678,34 +714,34 @@ msgstr "" "telle classe ; si ce n'est pas le cas, une exception :exc:`TypeError` est " "levée." -#: library/dataclasses.rst:355 +#: library/dataclasses.rst:371 #, fuzzy msgid "" "Converts the dataclass *obj* to a dict (by using the factory function " "*dict_factory*). Each dataclass is converted to a dict of its fields, as " -"``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " -"into. Other objects are copied with :func:`copy.deepcopy`." +"``name: value`` pairs. dataclasses, dicts, frozendicts, lists, and tuples " +"are recursed into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" "Convertit la classe de données ``obj`` en un dictionnaire (en utilisant la " "fonction ``dict_factory``). Les clés et valeurs proviennent directement des " "champs. Les dictionnaires, listes, *n*-uplets et instances de classes de " -"données sont parcourus récursivement. Les autres objets sont copiés avec :" -"func:`copy.deepcopy`." +"données sont parcourus récursivement. Les autres objets sont copiés " +"avec :func:`copy.deepcopy`." -#: library/dataclasses.rst:361 +#: library/dataclasses.rst:377 #, fuzzy msgid "Example of using :func:`!asdict` on nested dataclasses::" msgstr "" "Exemple d'utilisation de :func:`asdict` sur des classes de données " "imbriquées ::" -#: library/dataclasses.rst:398 +#: library/dataclasses.rst:414 msgid "To create a shallow copy, the following workaround may be used::" msgstr "" "Pour créer une copie superficielle, la solution de contournement suivante " "peut être utilisée ::" -#: library/dataclasses.rst:382 +#: library/dataclasses.rst:398 #, fuzzy msgid "" ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." @@ -713,13 +749,13 @@ msgstr "" ":func:`asdict` lève :exc:`TypeError` si ``obj`` n'est pas une instance d'une " "classe de données." -#: library/dataclasses.rst:387 +#: library/dataclasses.rst:403 #, fuzzy msgid "" "Converts the dataclass *obj* to a tuple (by using the factory function " "*tuple_factory*). Each dataclass is converted to a tuple of its field " -"values. dataclasses, dicts, lists, and tuples are recursed into. Other " -"objects are copied with :func:`copy.deepcopy`." +"values. dataclasses, dicts, frozendicts, lists, and tuples are recursed " +"into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" "Convertit l'instance d'une classe de données ``obj`` en un *n*-uplet (en " "utilisant la fonction ``tuple_factory``). Chaque classe de données est " @@ -727,11 +763,11 @@ msgstr "" "récursivement sur les dictionnaires, listes et *n*-uplets. Les autres objets " "sont copiés avec :func:`copy.deepcopy`." -#: library/dataclasses.rst:393 +#: library/dataclasses.rst:409 msgid "Continuing from the previous example::" msgstr "Pour continuer l'exemple précédent ::" -#: library/dataclasses.rst:402 +#: library/dataclasses.rst:418 #, fuzzy msgid "" ":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " @@ -740,7 +776,7 @@ msgstr "" ":func:`astuple` lève :exc:`TypeError` si ``obj`` n'est pas une instance " "d'une classe de données." -#: library/dataclasses.rst:407 +#: library/dataclasses.rst:423 #, fuzzy msgid "" "Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " @@ -749,8 +785,8 @@ msgid "" "``name``, ``(name, type)``, or ``(name, type, Field)``. If just ``name`` is " "supplied, :data:`typing.Any` is used for ``type``. The values of *init*, " "*repr*, *eq*, *order*, *unsafe_hash*, *frozen*, *match_args*, *kw_only*, " -"*slots*, and *weakref_slot* have the same meaning as they do in :func:" -"`@dataclass `." +"*slots*, and *weakref_slot* have the same meaning as they do " +"in :deco:`dataclass`." msgstr "" "Crée une nouvelle classe de données avec le nom ``cls_name``. Les champs " "proviennent de ``fields``. Les classes mères sont lues dans ``bases``. " @@ -762,43 +798,55 @@ msgstr "" "``match_args``, ``kw_only``, ``slots`` et ``weakref_slot`` ont la même " "signification que dans :func:`dataclass`." -#: library/dataclasses.rst:417 +#: library/dataclasses.rst:433 msgid "" "If *module* is defined, the :attr:`!__module__` attribute of the dataclass " "is set to that value. By default, it is set to the module name of the caller." msgstr "" -#: library/dataclasses.rst:421 +#: library/dataclasses.rst:437 +msgid "" +"The *decorator* parameter is a callable that will be used to create the " +"dataclass. It should take the class object as a first argument and the same " +"keyword arguments as :deco:`dataclass`. By default, the :deco:`dataclass` " +"function is used." +msgstr "" + +#: library/dataclasses.rst:442 #, fuzzy msgid "" "This function is not strictly required, because any Python mechanism for " -"creating a new class with :attr:`!__annotations__` can then apply the :func:" -"`@dataclass ` function to convert that class to a dataclass. " -"This function is provided as a convenience. For example::" +"creating a new class with :attr:`~object.__annotations__` can then apply " +"the :deco:`dataclass` function to convert that class to a dataclass. This " +"function is provided as a convenience. For example::" msgstr "" "Cette fonction est pratique mais pas absolument nécessaire, puisqu'il suffit " "de créer par un moyen quelconque une classe avec l'attribut " "``__annotation__`` et de lui appliquer la fonction :func:`dataclass`, qui la " "convertit en une classe de données. Par exemple, ceci ::" -#: library/dataclasses.rst:433 +#: library/dataclasses.rst:454 msgid "Is equivalent to::" msgstr "est équivalent à ::" -#: library/dataclasses.rst:446 +#: library/dataclasses.rst:465 +msgid "Added the *decorator* parameter." +msgstr "" + +#: library/dataclasses.rst:470 #, fuzzy msgid "" "Creates a new object of the same type as *obj*, replacing fields with values " "from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If " -"keys in *changes* are not field names of the given dataclass, raises :exc:" -"`TypeError`." +"keys in *changes* are not field names of the given dataclass, " +"raises :exc:`TypeError`." msgstr "" "Crée un nouvel objet du même type que ``obj`` en affectant aux champs les " "valeurs données par ``changes``. Si ``obj`` n'est pas une classe de " "données, :exc:`TypeError` est levée. Si une clé dans ``changes`` ne " "correspond à aucun champ de l'instance, :exc:`TypeError` est levée." -#: library/dataclasses.rst:451 +#: library/dataclasses.rst:475 #, fuzzy msgid "" "The newly returned object is created by calling the :meth:`~object.__init__` " @@ -809,7 +857,7 @@ msgstr "" "classe de données, ce qui garantit que :meth:`__post_init__` est appelée (si " "elle existe)." -#: library/dataclasses.rst:455 +#: library/dataclasses.rst:479 #, fuzzy msgid "" "Init-only variables without default values, if any exist, must be specified " @@ -817,19 +865,19 @@ msgid "" "__init__` and :meth:`__post_init__`." msgstr "" "Si un champ d'initialisation (voir plus bas) n'a pas de valeur par défaut, " -"il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé à :" -"meth:`__init__` et :meth:`__post_init__`." +"il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé " +"à :meth:`__init__` et :meth:`__post_init__`." -#: library/dataclasses.rst:459 +#: library/dataclasses.rst:483 #, fuzzy msgid "" "It is an error for *changes* to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" -"Si une clé de *changes* correspond à un champ défini avec ``init=False``, :" -"exc:`ValueError` est levée." +"Si une clé de *changes* correspond à un champ défini avec " +"``init=False``, :exc:`ValueError` est levée." -#: library/dataclasses.rst:463 +#: library/dataclasses.rst:487 #, fuzzy msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:`!" @@ -840,30 +888,31 @@ msgid "" "perhaps a custom :func:`!replace` (or similarly named) method which handles " "instance copying." msgstr "" -"Prenez garde aux champs définis avec ``init=False`` dans un appel à :func:" -"`replace`. Ils ne sont pas copiés automatiquement de l'instance source. " -"C'est le rôle de :meth:`__post_init__` de les initialiser — ou pas. Les " -"champs avec ``init=False`` doivent rarement être utilisés et seulement à bon " -"escient. Si vous en avez, il peut être sage de traiter la copie des " +"Prenez garde aux champs définis avec ``init=False`` dans un appel " +"à :func:`replace`. Ils ne sont pas copiés automatiquement de l'instance " +"source. C'est le rôle de :meth:`__post_init__` de les initialiser — ou pas. " +"Les champs avec ``init=False`` doivent rarement être utilisés et seulement à " +"bon escient. Si vous en avez, il peut être sage de traiter la copie des " "instances par des constructeurs de classe alternatifs, ou bien une méthode " "personnalisée ``replace()`` (ou un nom similaire)." -#: library/dataclasses.rst:472 +#: library/dataclasses.rst:496 msgid "" -"Dataclass instances are also supported by generic function :func:`copy." -"replace`." +"Dataclass instances are also supported by generic " +"function :func:`copy.replace`." msgstr "" -#: library/dataclasses.rst:476 +#: library/dataclasses.rst:500 #, fuzzy msgid "" "Return ``True`` if its parameter is a dataclass (including subclasses of a " -"dataclass) or an instance of one, otherwise return ``False``." +"dataclass, but not including :ref:`generic aliases `) or " +"an instance of one, otherwise return ``False``." msgstr "" "Renvoie ``True`` si l'argument est soit une classe de données, soit une " "instance d'une telle classe. Sinon, renvoie ``False``." -#: library/dataclasses.rst:479 +#: library/dataclasses.rst:504 msgid "" "If you need to know if a class is an instance of a dataclass (and not a " "dataclass itself), then add a further check for ``not isinstance(obj, " @@ -873,40 +922,40 @@ msgstr "" "non pas lui-même une classe de données, ajoutez le test ``not " "isinstance(obj, type)`` ::" -#: library/dataclasses.rst:488 +#: library/dataclasses.rst:513 msgid "A sentinel value signifying a missing default or default_factory." msgstr "" "Une valeur sentinelle pour dénoter l'absence de *default* ou " "*default_factory*." -#: library/dataclasses.rst:492 +#: library/dataclasses.rst:517 #, fuzzy msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " "with the type of :const:`!KW_ONLY` are marked as keyword-only fields. Note " "that a pseudo-field of type :const:`!KW_ONLY` is otherwise completely " "ignored. This includes the name of such a field. By convention, a name of " -"``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :" -"meth:`~object.__init__` parameters that must be specified as keywords when " -"the class is instantiated." +"``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields " +"signify :meth:`~object.__init__` parameters that must be specified as " +"keywords when the class is instantiated." msgstr "" "Une valeur sentinelle utilisée en tant qu'annotation de type. Chaque " -"attribut situé après un pseudo-champ ayant pour type la constante :const:" -"`KW_ONLY` est marqué comme champ exclusivement nommé. Notez que le pseudo-" -"champ ayant pour type la constante :const:`KW_ONLY` est par ailleurs " -"complètement ignoré. Par convention le nom ``_`` est utilisé pour " +"attribut situé après un pseudo-champ ayant pour type la " +"constante :const:`KW_ONLY` est marqué comme champ exclusivement nommé. Notez " +"que le pseudo-champ ayant pour type la constante :const:`KW_ONLY` est par " +"ailleurs complètement ignoré. Par convention le nom ``_`` est utilisé pour " "l'attribut :const:`KW_ONLY`. Les paramètres de la méthode :meth:`__init__` " "exclusivement nommés doivent être spécifiés par leur nom lors de " "l'instanciation de la classe." -#: library/dataclasses.rst:501 +#: library/dataclasses.rst:526 msgid "" "In this example, the fields ``y`` and ``z`` will be marked as keyword-only " "fields::" msgstr "" "Dans cet exemple ``y`` et ``z`` sont marqués comme exclusivement nommés ::" -#: library/dataclasses.rst:512 +#: library/dataclasses.rst:537 #, fuzzy msgid "" "In a single dataclass, it is an error to specify more than one field whose " @@ -915,30 +964,30 @@ msgstr "" "Une erreur est levée s'il y a plus d'un champ de type :const:`KW_ONLY` dans " "une unique classe de données." -#: library/dataclasses.rst:519 +#: library/dataclasses.rst:544 #, fuzzy msgid "" -"Raised when an implicitly defined :meth:`~object.__setattr__` or :meth:" -"`~object.__delattr__` is called on a dataclass which was defined with " -"``frozen=True``. It is a subclass of :exc:`AttributeError`." +"Raised when an implicitly defined :meth:`~object.__setattr__` " +"or :meth:`~object.__delattr__` is called on a dataclass which was defined " +"with ``frozen=True``. It is a subclass of :exc:`AttributeError`." msgstr "" -"Sous-classe de :exc:`AttributeError`, levée lorsqu'une méthode :meth:" -"`__setattr__` ou :meth:`__delattr__` définie implicitement est appelée dans " -"une classe de données définie avec ``frozen=True``." +"Sous-classe de :exc:`AttributeError`, levée lorsqu'une " +"méthode :meth:`__setattr__` ou :meth:`__delattr__` définie implicitement est " +"appelée dans une classe de données définie avec ``frozen=True``." -#: library/dataclasses.rst:526 +#: library/dataclasses.rst:551 msgid "Post-init processing" msgstr "Post-initialisation" -#: library/dataclasses.rst:530 +#: library/dataclasses.rst:555 #, fuzzy msgid "" -"When defined on the class, it will be called by the generated :meth:`~object." -"__init__`, normally as :meth:`!self.__post_init__`. However, if any " -"``InitVar`` fields are defined, they will also be passed to :meth:`!" -"__post_init__` in the order they were defined in the class. If no :meth:`!" -"__init__` method is generated, then :meth:`!__post_init__` will not " -"automatically be called." +"When defined on the class, it will be called by the " +"generated :meth:`~object.__init__`, normally as :meth:`!self.__post_init__`. " +"However, if any ``InitVar`` fields are defined, they will also be passed " +"to :meth:`!__post_init__` in the order they were defined in the class. If " +"no :meth:`!__init__` method is generated, then :meth:`!__post_init__` will " +"not automatically be called." msgstr "" "Après avoir initialisé l'objet, la méthode :meth:`__init__` générée appelle " "la méthode :meth:`__post_init__`, si elle est définie. :meth:`__post_init__` " @@ -948,7 +997,7 @@ msgstr "" "qu'elles ont été fournies à :meth:`__init__`. Si la classe est créée avec " "``init=False``, :meth:`__post_init__` n'est jamais appelée automatiquement." -#: library/dataclasses.rst:537 +#: library/dataclasses.rst:562 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" @@ -956,20 +1005,20 @@ msgstr "" "Cette méthode permet, entre autres, d'initialiser des champs qui dépendent " "d'autres champs. Par exemple ::" -#: library/dataclasses.rst:549 +#: library/dataclasses.rst:574 #, fuzzy msgid "" -"The :meth:`~object.__init__` method generated by :func:`@dataclass " -"` does not call base class :meth:`!__init__` methods. If the base " -"class has an :meth:`!__init__` method that has to be called, it is common to " -"call this method in a :meth:`__post_init__` method::" +"The :meth:`~object.__init__` method generated by :deco:`dataclass` does not " +"call base class :meth:`!__init__` methods. If the base class has an :meth:`!" +"__init__` method that has to be called, it is common to call this method in " +"a :meth:`__post_init__` method::" msgstr "" "Les méthodes :meth:`__init__` des classes mères ne sont pas appelées " -"automatiquement par la méthode :meth:`__init__` que génère :func:" -"`dataclass`. S'il faut appeler ces méthodes :meth:`__init__`, il est courant " -"de le faire dans :meth:`__post_init__` ::" +"automatiquement par la méthode :meth:`__init__` que " +"génère :func:`dataclass`. S'il faut appeler ces méthodes :meth:`__init__`, " +"il est courant de le faire dans :meth:`__post_init__` ::" -#: library/dataclasses.rst:566 +#: library/dataclasses.rst:591 #, fuzzy msgid "" "Note, however, that in general the dataclass-generated :meth:`!__init__` " @@ -981,11 +1030,11 @@ msgstr "" "classe de données, car la classe fille initialise elle-même les champs " "apportés par toute classe mère qui est aussi une classe de données." -#: library/dataclasses.rst:570 +#: library/dataclasses.rst:595 #, fuzzy msgid "" -"See the section below on init-only variables for ways to pass parameters to :" -"meth:`!__post_init__`. Also see the warning about how :func:`replace` " +"See the section below on init-only variables for ways to pass parameters " +"to :meth:`!__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" "Voir la section plus bas à propos des variables d'initialisation pour les " @@ -993,20 +1042,20 @@ msgstr "" "l'avertissement sur le traitement par :func:`replace` des champs définis " "avec ``init=False``." -#: library/dataclasses.rst:577 +#: library/dataclasses.rst:602 msgid "Class variables" msgstr "Variables de classe" -#: library/dataclasses.rst:579 +#: library/dataclasses.rst:604 #, fuzzy msgid "" -"One of the few places where :func:`@dataclass ` actually inspects " -"the type of a field is to determine if a field is a class variable as " -"defined in :pep:`526`. It does this by checking if the type of the field " +"One of the few places where :deco:`dataclass` actually inspects the type of " +"a field is to determine if a field is a class variable as defined " +"in :pep:`526`. It does this by checking if the type of the field " "is :data:`typing.ClassVar`. If a field is a ``ClassVar``, it is excluded " "from consideration as a field and is ignored by the dataclass mechanisms. " -"Such ``ClassVar`` pseudo-fields are not returned by the module-level :func:" -"`fields` function." +"Such ``ClassVar`` pseudo-fields are not returned by the module-" +"level :func:`fields` function." msgstr "" "Voici le premier des deux cas où le type fourni dans l'annotation d'un champ " "est pris en compte par :func:`dataclass` au moment de l'exécution. Si ce " @@ -1015,18 +1064,18 @@ msgstr "" "complètement ignorés du point de vue des classes de données. Ils " "n'apparaissent pas dans le résultat de :func:`fields`." -#: library/dataclasses.rst:590 +#: library/dataclasses.rst:615 msgid "Init-only variables" msgstr "Variables d'initialisation" -#: library/dataclasses.rst:592 +#: library/dataclasses.rst:617 #, fuzzy msgid "" -"Another place where :func:`@dataclass ` inspects a type " -"annotation is to determine if a field is an init-only variable. It does " -"this by seeing if the type of a field is of type ``dataclasses.InitVar``. " -"If a field is an ``InitVar``, it is considered a pseudo-field called an init-" -"only field. As it is not a true field, it is not returned by the module-" +"Another place where :deco:`dataclass` inspects a type annotation is to " +"determine if a field is an init-only variable. It does this by seeing if " +"the type of a field is of type :class:`InitVar`. If a field is " +"an :class:`InitVar`, it is considered a pseudo-field called an init-only " +"field. As it is not a true field, it is not returned by the module-" "level :func:`fields` function. Init-only fields are added as parameters to " "the generated :meth:`~object.__init__` method, and are passed to the " "optional :meth:`__post_init__` method. They are not otherwise used by " @@ -1040,7 +1089,7 @@ msgstr "" "Leurs valeurs sont passées à :meth:`__post_init__`, si cette méthode existe. " "C'est la seule manière dont elles sont utilisées." -#: library/dataclasses.rst:602 +#: library/dataclasses.rst:627 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" @@ -1048,7 +1097,7 @@ msgstr "" "On peut par exemple imaginer un champ initialisé à partir d'une base de " "données s'il n'a pas reçu de valeur explicite ::" -#: library/dataclasses.rst:617 +#: library/dataclasses.rst:642 #, fuzzy msgid "" "In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" @@ -1057,18 +1106,19 @@ msgstr "" "Ici, :func:`fields` renvoie des objets :class:`Field` correspondant à ``i`` " "et à ``j``, mais pas à ``database``." -#: library/dataclasses.rst:623 +#: library/dataclasses.rst:648 msgid "Frozen instances" msgstr "Instances figées" -#: library/dataclasses.rst:625 +#: library/dataclasses.rst:650 #, fuzzy msgid "" "It is not possible to create truly immutable Python objects. However, by " -"passing ``frozen=True`` to the :func:`@dataclass ` decorator you " -"can emulate immutability. In that case, dataclasses will add :meth:`~object." -"__setattr__` and :meth:`~object.__delattr__` methods to the class. These " -"methods will raise a :exc:`FrozenInstanceError` when invoked." +"passing ``frozen=True`` to the :deco:`dataclass` decorator you can emulate " +"immutability. In that case, dataclasses will " +"add :meth:`~object.__setattr__` and :meth:`~object.__delattr__` methods to " +"the class. These methods will raise a :exc:`FrozenInstanceError` when " +"invoked." msgstr "" "Bien qu'il ne soit pas possible de créer des objets Python strictement " "immuables, on peut rendre les instances d'une classe de données quasi " @@ -1076,43 +1126,43 @@ msgstr "" "lui fait générer des méthodes :meth:`__setattr__` et :meth:`__delattr__`. " "Celles-ci lèvent systématiquement l'exception :exc:`FrozenInstanceError`." -#: library/dataclasses.rst:631 +#: library/dataclasses.rst:656 #, fuzzy msgid "" -"There is a tiny performance penalty when using ``frozen=True``: :meth:" -"`~object.__init__` cannot use simple assignment to initialize fields, and " -"must use :meth:`!object.__setattr__`." +"There is a tiny performance penalty when using " +"``frozen=True``: :meth:`~object.__init__` cannot use simple assignment to " +"initialize fields, and must use :meth:`!object.__setattr__`." msgstr "" -"Les performances sont légèrement moins bonnes avec ``frozen=True`` car :meth:" -"`__init__` doit passer par :meth:`object.__setattr__` au lieu de simples " -"affectations pour initialiser les champs." +"Les performances sont légèrement moins bonnes avec ``frozen=True`` " +"car :meth:`__init__` doit passer par :meth:`object.__setattr__` au lieu de " +"simples affectations pour initialiser les champs." -#: library/dataclasses.rst:640 +#: library/dataclasses.rst:665 msgid "Inheritance" msgstr "Héritage" -#: library/dataclasses.rst:642 +#: library/dataclasses.rst:667 #, fuzzy msgid "" -"When the dataclass is being created by the :func:`@dataclass ` " -"decorator, it looks through all of the class's base classes in reverse MRO " -"(that is, starting at :class:`object`) and, for each dataclass that it " -"finds, adds the fields from that base class to an ordered mapping of fields. " -"After all of the base class fields are added, it adds its own fields to the " -"ordered mapping. All of the generated methods will use this combined, " -"calculated ordered mapping of fields. Because the fields are in insertion " -"order, derived classes override base classes. An example::" +"When the dataclass is being created by the :deco:`dataclass` decorator, it " +"looks through all of the class's base classes in reverse MRO (that is, " +"starting at :class:`object`) and, for each dataclass that it finds, adds the " +"fields from that base class to an ordered mapping of fields. After all of " +"the base class fields are added, it adds its own fields to the ordered " +"mapping. All of the generated methods will use this combined, calculated " +"ordered mapping of fields. Because the fields are in insertion order, " +"derived classes override base classes. An example::" msgstr "" -"Au moment de la création d'une classe de données, le décorateur :meth:" -"`dataclass` parcourt toutes les classes mères dans l'ordre inverse de " -"résolution des méthodes (donc en commençant par :class:`object`). À chaque " -"fois qu'une classe de données est rencontrée, ses champs sont insérés dans " -"un tableau associatif ordonné. Pour finir, les champs de la classe elle-même " -"sont rajoutés. Toutes les méthodes générées utilisent en interne ce même " -"tableau associatif. Puisqu'il est ordonné, les champs des classes filles " -"écrasent ceux des classes mères. Voici un exemple ::" +"Au moment de la création d'une classe de données, le " +"décorateur :meth:`dataclass` parcourt toutes les classes mères dans l'ordre " +"inverse de résolution des méthodes (donc en commençant par :class:`object`). " +"À chaque fois qu'une classe de données est rencontrée, ses champs sont " +"insérés dans un tableau associatif ordonné. Pour finir, les champs de la " +"classe elle-même sont rajoutés. Toutes les méthodes générées utilisent en " +"interne ce même tableau associatif. Puisqu'il est ordonné, les champs des " +"classes filles écrasent ceux des classes mères. Voici un exemple ::" -#: library/dataclasses.rst:662 +#: library/dataclasses.rst:687 #, fuzzy msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " @@ -1122,20 +1172,20 @@ msgstr "" "La liste finale des champs contient, dans l'ordre, ``x``, ``y``, ``z``. Le " "type de ``x`` est ``int``, comme déclaré dans ``C``." -#: library/dataclasses.rst:665 +#: library/dataclasses.rst:690 #, fuzzy msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "La méthode :meth:`__init__` générée pour ``C`` ressemble à ::" -#: library/dataclasses.rst:670 +#: library/dataclasses.rst:695 #, fuzzy msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr "" "Réarrangement des paramètres exclusivement nommés dans :meth:`__init__`" -#: library/dataclasses.rst:672 +#: library/dataclasses.rst:697 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1149,7 +1199,7 @@ msgstr "" "les paramètres exclusivement nommés sont implémentés en Python : ils sont " "après les paramètres non exclusivement nommés." -#: library/dataclasses.rst:678 +#: library/dataclasses.rst:703 #, fuzzy msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " @@ -1160,12 +1210,12 @@ msgstr "" "exclusivement nommés alors que ``Base.x`` et ``D.z`` sont des champs " "normaux ::" -#: library/dataclasses.rst:693 +#: library/dataclasses.rst:718 #, fuzzy msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "La méthode :meth:`__init__` générée pour ``D`` ressemble à ::" -#: library/dataclasses.rst:697 +#: library/dataclasses.rst:722 msgid "" "Note that the parameters have been re-ordered from how they appear in the " "list of fields: parameters derived from regular fields are followed by " @@ -1175,7 +1225,7 @@ msgstr "" "la liste des champs : les paramètres provenant des attributs normaux sont " "suivis par les paramètres qui proviennent des attributs exclusivement nommés." -#: library/dataclasses.rst:701 +#: library/dataclasses.rst:726 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" @@ -1184,11 +1234,11 @@ msgstr "" "L'ordre relatif des paramètres exclusivement nommés est conservé par le " "réarrangement des paramètres d'\\ :meth:`__init__`." -#: library/dataclasses.rst:706 +#: library/dataclasses.rst:731 msgid "Default factory functions" msgstr "Fabriques de valeurs par défaut" -#: library/dataclasses.rst:708 +#: library/dataclasses.rst:733 #, fuzzy msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " @@ -1199,7 +1249,7 @@ msgstr "" "qui est appelée sans argument pour fournir des valeurs par défaut. Par " "exemple, voici comment donner la valeur par défaut d'une liste vide ::" -#: library/dataclasses.rst:714 +#: library/dataclasses.rst:739 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " @@ -1213,11 +1263,11 @@ msgstr "" "chaque nouvelle instance, puisque c'est le seul moyen d'obtenir une valeur à " "laquelle initialiser le champ." -#: library/dataclasses.rst:721 +#: library/dataclasses.rst:746 msgid "Mutable default values" msgstr "Valeurs par défaut mutables" -#: library/dataclasses.rst:723 +#: library/dataclasses.rst:748 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" @@ -1225,7 +1275,7 @@ msgstr "" "En Python, les valeurs par défaut des attributs sont stockées dans des " "attributs de la classe. Observez cet exemple, sans classe de données ::" -#: library/dataclasses.rst:738 +#: library/dataclasses.rst:763 #, fuzzy msgid "" "Note that the two instances of class :class:`!C` share the same class " @@ -1234,25 +1284,25 @@ msgstr "" "Comme attendu, les deux instances de ``C`` partagent le même objet pour " "l'attribut ``x``." -#: library/dataclasses.rst:741 +#: library/dataclasses.rst:766 msgid "Using dataclasses, *if* this code was valid::" msgstr "Avec les classes de données, si ce code était valide ::" -#: library/dataclasses.rst:749 +#: library/dataclasses.rst:774 msgid "it would generate code similar to::" msgstr "il générerait un code équivalent à ::" -#: library/dataclasses.rst:760 +#: library/dataclasses.rst:785 #, fuzzy msgid "" "This has the same issue as the original example using class :class:`!C`. " -"That is, two instances of class :class:`!D` that do not specify a value for :" -"attr:`!x` when creating a class instance will share the same copy of :attr:`!" -"x`. Because dataclasses just use normal Python class creation they also " -"share this behavior. There is no general way for Data Classes to detect " -"this condition. Instead, the :func:`@dataclass ` decorator will " -"raise a :exc:`ValueError` if it detects an unhashable default parameter. " -"The assumption is that if a value is unhashable, it is mutable. This is a " +"That is, two instances of class :class:`!D` that do not specify a value " +"for :attr:`!x` when creating a class instance will share the same copy " +"of :attr:`!x`. Because dataclasses just use normal Python class creation " +"they also share this behavior. There is no general way for Data Classes to " +"detect this condition. Instead, the :deco:`dataclass` decorator will raise " +"a :exc:`ValueError` if it detects an unhashable default parameter. The " +"assumption is that if a value is unhashable, it is mutable. This is a " "partial solution, but it does protect against many common errors." msgstr "" "On se retrouve avec le même problème qu'au premier exemple avec la classe " @@ -1266,7 +1316,7 @@ msgstr "" "hachée, elle est modifiable. Cette solution n'est pas parfaite, mais permet " "d'éviter la majorité des erreurs." -#: library/dataclasses.rst:771 +#: library/dataclasses.rst:796 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" @@ -1275,53 +1325,54 @@ msgstr "" "objet pour chaque instance, utilisez une fonction de fabrique ::" # suit un ':' -#: library/dataclasses.rst:780 +#: library/dataclasses.rst:805 #, fuzzy msgid "" -"Instead of looking for and disallowing objects of type :class:`list`, :class:" -"`dict`, or :class:`set`, unhashable objects are now not allowed as default " -"values. Unhashability is used to approximate mutability." +"Instead of looking for and disallowing objects of " +"type :class:`list`, :class:`dict`, or :class:`set`, unhashable objects are " +"now not allowed as default values. Unhashability is used to approximate " +"mutability." msgstr "" "au lieu de rechercher et d'interdire les objets de type ``list``, ``dict`` " "ou ``set``, les objets non hachables ne sont plus autorisés comme valeurs " "par défaut. Le caractère non-hachable est utilisé pour approximer la " "muabilité." -#: library/dataclasses.rst:787 +#: library/dataclasses.rst:812 msgid "Descriptor-typed fields" msgstr "" -#: library/dataclasses.rst:789 +#: library/dataclasses.rst:814 msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " "default value have the following special behaviors:" msgstr "" -#: library/dataclasses.rst:792 +#: library/dataclasses.rst:817 msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " "method is passed to the descriptor's :meth:`~object.__set__` method rather " "than overwriting the descriptor object." msgstr "" -#: library/dataclasses.rst:796 +#: library/dataclasses.rst:821 msgid "" -"Similarly, when getting or setting the field, the descriptor's :meth:" -"`~object.__get__` or :meth:`!__set__` method is called rather than returning " -"or overwriting the descriptor object." +"Similarly, when getting or setting the field, the " +"descriptor's :meth:`~object.__get__` or :meth:`!__set__` method is called " +"rather than returning or overwriting the descriptor object." msgstr "" -#: library/dataclasses.rst:800 +#: library/dataclasses.rst:825 msgid "" -"To determine whether a field contains a default value, :func:`@dataclass " -"` will call the descriptor's :meth:`!__get__` method using its " -"class access form: ``descriptor.__get__(obj=None, type=cls)``. If the " -"descriptor returns a value in this case, it will be used as the field's " -"default. On the other hand, if the descriptor raises :exc:`AttributeError` " -"in this situation, no default value will be provided for the field." +"To determine whether a field contains a default value, :deco:`dataclass` " +"will call the descriptor's :meth:`!__get__` method using its class access " +"form: ``descriptor.__get__(obj=None, type=cls)``. If the descriptor returns " +"a value in this case, it will be used as the field's default. On the other " +"hand, if the descriptor raises :exc:`AttributeError` in this situation, no " +"default value will be provided for the field." msgstr "" -#: library/dataclasses.rst:835 +#: library/dataclasses.rst:860 msgid "" "Note that if a field is annotated with a descriptor type, but is not " "assigned a descriptor object as its default value, the field will act like a " diff --git a/library/datatypes.po b/library/datatypes.po index 74af1e191..8df18bd9f 100644 --- a/library/datatypes.po +++ b/library/datatypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2019-11-17 23:05+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -31,15 +31,17 @@ msgstr "" #: library/datatypes.rst:11 msgid "" -"Python also provides some built-in data types, in particular, :class:" -"`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and :class:" -"`tuple`. The :class:`str` class is used to hold Unicode strings, and the :" -"class:`bytes` and :class:`bytearray` classes are used to hold binary data." +"Python also provides some built-in data types, in " +"particular, :class:`dict`, :class:`list`, :class:`set` " +"and :class:`frozenset`, and :class:`tuple`. The :class:`str` class is used " +"to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` " +"classes are used to hold binary data." msgstr "" -"Python fournit aussi quelques types natifs, typiquement :class:`dict`, :" -"class:`list`, :class:`set`, :class:`frozenset`, et :class:`tuple`. La " -"classe :class:`str` est utilisée pour stocker des chaînes Unicode, et les " -"classes :class:`bytes` et :class:`bytearray` des données binaires." +"Python fournit aussi quelques types natifs, " +"typiquement :class:`dict`, :class:`list`, :class:`set`, :class:`frozenset`, " +"et :class:`tuple`. La classe :class:`str` est utilisée pour stocker des " +"chaînes Unicode, et les classes :class:`bytes` et :class:`bytearray` des " +"données binaires." #: library/datatypes.rst:17 msgid "The following modules are documented in this chapter:" diff --git a/library/datetime.po b/library/datetime.po index ce2178dec..f6d7ca1b8 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-10-03 21:51+0200\n" "Last-Translator: Loc Cosnier \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!datetime` --- Basic date and time types" msgstr ":mod:`!datetime` — Types de base pour la date et l'heure" -#: library/datetime.rst:11 +#: library/datetime.rst:7 msgid "**Source code:** :source:`Lib/datetime.py`" msgstr "**Code source :** :source:`Lib/datetime.py`" -#: library/datetime.rst:17 +#: library/datetime.rst:11 msgid "" "The :mod:`!datetime` module supplies classes for manipulating dates and " "times." @@ -32,7 +32,7 @@ msgstr "" "Le module :mod:`!datetime` fournit des classes permettant de manipuler les " "dates et les heures." -#: library/datetime.rst:19 +#: library/datetime.rst:13 msgid "" "While date and time arithmetic is supported, the focus of the implementation " "is on efficient attribute extraction for output formatting and manipulation." @@ -42,63 +42,65 @@ msgstr "" "l'extraction des attributs en vue de leur manipulation et formatage pour " "l'affichage." -#: library/datetime.rst:24 +#: library/datetime.rst:18 msgid "Skip to :ref:`the format codes `." msgstr "" -#: library/datetime.rst:28 +#: library/datetime.rst:22 msgid "Module :mod:`calendar`" msgstr "Module :mod:`calendar`" -#: library/datetime.rst:29 +#: library/datetime.rst:23 msgid "General calendar related functions." msgstr "Fonctions génériques associées au calendrier." -#: library/datetime.rst:31 +#: library/datetime.rst:25 msgid "Module :mod:`time`" msgstr "Module :mod:`time`" -#: library/datetime.rst:32 +#: library/datetime.rst:26 msgid "Time access and conversions." msgstr "Accès aux données d'horaires et aux conversions associées." -#: library/datetime.rst:34 +#: library/datetime.rst:28 msgid "Module :mod:`zoneinfo`" msgstr "Module :mod:`zoneinfo`" -#: library/datetime.rst:35 +#: library/datetime.rst:29 msgid "Concrete time zones representing the IANA time zone database." msgstr "Fuseaux horaires concrets représentant la base de données IANA." -#: library/datetime.rst:37 +#: library/datetime.rst:31 msgid "Package `dateutil `_" msgstr "Paquet `dateutil `_" -#: library/datetime.rst:38 +#: library/datetime.rst:32 msgid "Third-party library with expanded time zone and parsing support." msgstr "" "Bibliothèque tierce avec prise en charge complète du fuseau horaire et de " "l'analyse de dates sous forme textuelle." -#: library/datetime.rst:40 +#: library/datetime.rst:34 msgid "Package :pypi:`DateType`" msgstr "" -#: library/datetime.rst:41 +#: library/datetime.rst:35 +#, fuzzy msgid "" -"Third-party library that introduces distinct static types to e.g. allow :" -"term:`static type checkers ` to differentiate between " -"naive and aware datetimes." +"Third-party library that introduces distinct static types to for example, " +"allow :term:`static type checkers ` to differentiate " +"between naive and aware datetimes." msgstr "" "Bibliothèque tierce qui introduit des types statiques distincts pour, par " "ex. permettre aux :term:`vérificateurs statiques de typage ` de faire la différence entre les dates et horaires naïfs et avisés." -#: library/datetime.rst:48 -msgid "Aware and Naive Objects" +#: library/datetime.rst:43 +#, fuzzy +msgid "Aware and naive objects" msgstr "Objets avisés et naïfs" -#: library/datetime.rst:50 +#: library/datetime.rst:45 msgid "" "Date and time objects may be categorized as \"aware\" or \"naive\" depending " "on whether or not they include time zone information." @@ -107,7 +109,7 @@ msgstr "" "« naïfs » selon qu'ils contiennent ou non des informations sur le fuseau " "horaire." -#: library/datetime.rst:53 +#: library/datetime.rst:48 msgid "" "With sufficient knowledge of applicable algorithmic and political time " "adjustments, such as time zone and daylight saving time information, an " @@ -121,7 +123,7 @@ msgstr "" "par rapport à d'autres objets avisés. Un objet avisé est utilisé pour " "représenter un instant précis qui n'est pas ouvert à l'interprétation [#]_." -#: library/datetime.rst:59 +#: library/datetime.rst:54 msgid "" "A **naive** object does not contain enough information to unambiguously " "locate itself relative to other date/time objects. Whether a naive object " @@ -139,23 +141,25 @@ msgstr "" "le programme. Les objets naïfs sont simples à comprendre et il est aisé de " "travailler avec, au prix de négliger certains aspects de la réalité." -#: library/datetime.rst:66 +#: library/datetime.rst:61 +#, fuzzy msgid "" -"For applications requiring aware objects, :class:`.datetime` and :class:`." -"time` objects have an optional time zone information attribute, :attr:`!" -"tzinfo`, that can be set to an instance of a subclass of the abstract :class:" -"`tzinfo` class. These :class:`tzinfo` objects capture information about the " -"offset from UTC time, the time zone name, and whether daylight saving time " -"is in effect." +"For applications requiring aware objects, :class:`.datetime` " +"and :class:`.time` objects have an optional time zone information " +"attribute, :attr:`!tzinfo`, that can be set to an instance of a subclass of " +"the abstract :class:`!tzinfo` class. These :class:`tzinfo` objects capture " +"information about the offset from UTC time, the time zone name, and whether " +"daylight saving time is in effect." msgstr "" -"Pour les applications nécessitant des objets avisés, les objets :class:`." -"datetime` et :class:`.time` ont un attribut facultatif renseignant le fuseau " -"horaire, :attr:`!tzinfo`, qui peut être une instance d'une sous-classe de la " -"classe abstraite :class:`tzinfo`. Ces objets :class:`tzinfo` regroupent des " -"informations sur le décalage par rapport à l'heure UTC, le nom du fuseau " -"horaire, et si l'heure d'été est en vigueur." +"Pour les applications nécessitant des objets avisés, les " +"objets :class:`.datetime` et :class:`.time` ont un attribut facultatif " +"renseignant le fuseau horaire, :attr:`!tzinfo`, qui peut être une instance " +"d'une sous-classe de la classe abstraite :class:`tzinfo`. Ces " +"objets :class:`tzinfo` regroupent des informations sur le décalage par " +"rapport à l'heure UTC, le nom du fuseau horaire, et si l'heure d'été est en " +"vigueur." -#: library/datetime.rst:72 +#: library/datetime.rst:67 msgid "" "Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " "supplied by the :mod:`!datetime` module. The :class:`!timezone` class can " @@ -165,131 +169,142 @@ msgid "" "across the world are more political than rational, change frequently, and " "there is no standard suitable for every application aside from UTC." msgstr "" -"Notez qu'une seule classe concrète :class:`tzinfo`, la classe :class:" -"`timezone`, est proposée par le module :mod:`!datetime`. La classe :class:`!" -"timezone` peut représenter des fuseaux horaires simples avec un décalage " -"fixe par rapport à UTC, comme UTC lui-même ou les fuseaux EST et EDT " -"d'Amérique du Nord. Gérer des fuseaux horaires d'un niveau de détails plus " -"avancé est à la charge de l'application. Les règles d'ajustement du temps à " -"travers le monde sont plus politiques que rationnelles, changent " +"Notez qu'une seule classe concrète :class:`tzinfo`, la " +"classe :class:`timezone`, est proposée par le module :mod:`!datetime`. La " +"classe :class:`!timezone` peut représenter des fuseaux horaires simples avec " +"un décalage fixe par rapport à UTC, comme UTC lui-même ou les fuseaux EST et " +"EDT d'Amérique du Nord. Gérer des fuseaux horaires d'un niveau de détails " +"plus avancé est à la charge de l'application. Les règles d'ajustement du " +"temps à travers le monde sont plus politiques que rationnelles, changent " "fréquemment, et il n'y a pas de standard qui vaille pour toute application, " "en dehors d'UTC." -#: library/datetime.rst:81 +#: library/datetime.rst:77 msgid "Constants" msgstr "Constantes" -#: library/datetime.rst:83 +#: library/datetime.rst:79 msgid "The :mod:`!datetime` module exports the following constants:" msgstr "Le module :mod:`!datetime` exporte les constantes suivantes :" -#: library/datetime.rst:87 +#: library/datetime.rst:83 msgid "" "The smallest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MINYEAR` is 1." msgstr "" -"Le numéro d'année le plus petit autorisé dans un objet :class:`date` ou :" -"class:`.datetime`. :const:`MINYEAR` vaut 1." +"Le numéro d'année le plus petit autorisé dans un objet :class:`date` " +"ou :class:`.datetime`. :const:`MINYEAR` vaut 1." -#: library/datetime.rst:93 +#: library/datetime.rst:89 msgid "" "The largest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MAXYEAR` is 9999." msgstr "" -"Le numéro d'année le plus grand autorisé dans un objet :class:`date` ou :" -"class:`.datetime`. :const:`MAXYEAR` vaut 9999." +"Le numéro d'année le plus grand autorisé dans un objet :class:`date` " +"ou :class:`.datetime`. :const:`MAXYEAR` vaut 9999." -#: library/datetime.rst:98 +#: library/datetime.rst:95 msgid "Alias for the UTC time zone singleton :attr:`datetime.timezone.utc`." msgstr "" "Alias du singleton de fuseau horaire UTC :attr:`datetime.timezone.utc`." -#: library/datetime.rst:103 -msgid "Available Types" +#: library/datetime.rst:101 +#, fuzzy +msgid "Available types" msgstr "Types disponibles" -#: library/datetime.rst:108 +#: library/datetime.rst:106 msgid "" "An idealized naive date, assuming the current Gregorian calendar always was, " -"and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and :" -"attr:`day`." +"and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, " +"and :attr:`day`." msgstr "" "Une date naïve idéalisée, en supposant que le calendrier Grégorien actuel a " -"toujours existé et qu'il existera toujours. Attributs : :attr:`year`, :attr:" -"`month` et :attr:`day`." +"toujours existé et qu'il existera toujours. " +"Attributs : :attr:`year`, :attr:`month` et :attr:`day`." -#: library/datetime.rst:116 +#: library/datetime.rst:114 msgid "" "An idealized time, independent of any particular day, assuming that every " "day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " -"seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" -"attr:`microsecond`, and :attr:`.tzinfo`." +"seconds\" here.) " +"Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, " +"and :attr:`.tzinfo`." msgstr "" "Un temps idéalisé, indépendant d'une date particulière, en supposant qu'une " "journée est composée d'exactement 24\\*60\\*60 secondes (il n'y a pas ici de " -"notion de « seconde intercalaire »). Attributs : :attr:`hour`, :attr:" -"`minute`, :attr:`second`, :attr:`microsecond` et :attr:`tzinfo`." +"notion de « seconde intercalaire »). " +"Attributs : :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond` " +"et :attr:`tzinfo`." -#: library/datetime.rst:125 +#: library/datetime.rst:123 msgid "" -"A combination of a date and a time. Attributes: :attr:`year`, :attr:" -"`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" -"`microsecond`, and :attr:`.tzinfo`." +"A combination of a date and a time. " +"Attributes: :attr:`year`, :attr:`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, " +"and :attr:`.tzinfo`." msgstr "" -"Une combinaison d'une date et d'une heure. Attributs : :attr:`year`, :attr:" -"`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" -"`microsecond`, et :attr:`tzinfo`." +"Une combinaison d'une date et d'une heure. " +"Attributs : :attr:`year`, :attr:`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, " +"et :attr:`tzinfo`." -#: library/datetime.rst:133 +#: library/datetime.rst:131 msgid "" -"A duration expressing the difference between two :class:`.datetime` or :" -"class:`date` instances to microsecond resolution." +"A duration expressing the difference between two :class:`.datetime` " +"or :class:`date` instances to microsecond resolution." msgstr "" -"Une durée qui exprime la différence entre deux instances de :class:`." -"datetime` ou :class:`date` en microsecondes." +"Une durée qui exprime la différence entre deux instances " +"de :class:`.datetime` ou :class:`date` en microsecondes." -#: library/datetime.rst:140 +#: library/datetime.rst:138 msgid "" "An abstract base class for time zone information objects. These are used by " "the :class:`.datetime` and :class:`.time` classes to provide a customizable " "notion of time adjustment (for example, to account for time zone and/or " "daylight saving time)." msgstr "" -"Une classe mère abstraite pour les objets portants des informations sur les " +"Une classe abstraite pour les objets portants des informations sur les " "fuseaux horaires. Ceux-ci sont utilisés par les classes :class:`.datetime` " "et :class:`.time` pour donner une notion personnalisable d'ajustement " "d'horaire (par exemple la prise en compte d'un fuseau horaire et/ou de " "l'heure d'été)." -#: library/datetime.rst:148 +#: library/datetime.rst:147 msgid "" "A class that implements the :class:`tzinfo` abstract base class as a fixed " "offset from the UTC." msgstr "" -"Une classe qui implémente la classe mère abstraite :class:`tzinfo` en tant " +"Une classe qui implémente la classe abstraite :class:`tzinfo` en tant " "que décalage fixe par rapport au temps UTC." -#: library/datetime.rst:171 +#: library/datetime.rst:170 msgid "Objects of these types are immutable." msgstr "Les objets issus de ces types sont immuables." #: library/datetime.rst:155 -msgid "Subclass relationships::" +#, fuzzy +msgid "Subclass relationships:" msgstr "Relations entre les sous-classes ::" -#: library/datetime.rst:166 -msgid "Common Properties" +#: library/datetime.rst:157 +msgid "" +"timedelta, tzinfo, time, and date inherit from object; timezone inherits\n" +"from tzinfo; and datetime inherits from date." +msgstr "" + +#: library/datetime.rst:165 +#, fuzzy +msgid "Common properties" msgstr "Propriétés communes" -#: library/datetime.rst:168 +#: library/datetime.rst:167 msgid "" "The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " "types share these common features:" msgstr "" -"Les types :class:`date`, :class:`.datetime`, :class:`.time`, et :class:" -"`timezone` partagent les caractéristiques suivantes :" +"Les types :class:`date`, :class:`.datetime`, :class:`.time`, " +"et :class:`timezone` partagent les caractéristiques suivantes :" -#: library/datetime.rst:172 +#: library/datetime.rst:171 msgid "" "Objects of these types are :term:`hashable`, meaning that they can be used " "as dictionary keys." @@ -297,16 +312,17 @@ msgstr "" "Les objets de ces types sont :term:`hachable`, ce qui signifie qu'ils " "peuvent être utilisés comme clés de dictionnaire." -#: library/datetime.rst:174 +#: library/datetime.rst:173 msgid "" "Objects of these types support efficient pickling via the :mod:`pickle` " "module." msgstr "" -"Les objets de ces types peuvent être sérialisés efficacement par le module :" -"mod:`pickle`." +"Les objets de ces types peuvent être sérialisés efficacement par le " +"module :mod:`pickle`." #: library/datetime.rst:177 -msgid "Determining if an Object is Aware or Naive" +#, fuzzy +msgid "Determining if an object is aware or naive" msgstr "Catégorisation d'un objet en « avisé » ou « naïf »" #: library/datetime.rst:179 @@ -362,14 +378,15 @@ msgid "" "The distinction between aware and naive doesn't apply to :class:`timedelta` " "objects." msgstr "" -"La distinction entre avisé et naïf ne s'applique pas aux objets de type :" -"class:`timedelta`." +"La distinction entre avisé et naïf ne s'applique pas aux objets de " +"type :class:`timedelta`." -#: library/datetime.rst:203 -msgid ":class:`timedelta` Objects" +#: library/datetime.rst:204 +#, fuzzy +msgid ":class:`!timedelta` objects" msgstr "Objets :class:`timedelta`" -#: library/datetime.rst:205 +#: library/datetime.rst:206 msgid "" "A :class:`timedelta` object represents a duration, the difference between " "two :class:`.datetime` or :class:`date` instances." @@ -377,7 +394,7 @@ msgstr "" "Un objet :class:`timedelta` représente une durée, c'est-à-dire la différence " "entre deux instances de :class:`.datetime` ou :class:`date`." -#: library/datetime.rst:210 +#: library/datetime.rst:211 msgid "" "All arguments are optional and default to 0. Arguments may be integers or " "floats, and may be positive or negative." @@ -386,7 +403,7 @@ msgstr "" "arguments peuvent être des entiers ou des flottants et ils peuvent être " "positifs ou négatifs." -#: library/datetime.rst:213 +#: library/datetime.rst:214 msgid "" "Only *days*, *seconds* and *microseconds* are stored internally. Arguments " "are converted to those units:" @@ -394,23 +411,23 @@ msgstr "" "Seuls les *jours*, les *secondes* et les *microsecondes* sont stockés en " "interne. Les arguments sont convertis dans ces unités :" -#: library/datetime.rst:216 +#: library/datetime.rst:217 msgid "A millisecond is converted to 1000 microseconds." msgstr "Une milliseconde est convertie en 1000 microsecondes." -#: library/datetime.rst:217 +#: library/datetime.rst:218 msgid "A minute is converted to 60 seconds." msgstr "Une minute est convertie en 60 secondes." -#: library/datetime.rst:218 +#: library/datetime.rst:219 msgid "An hour is converted to 3600 seconds." msgstr "Une heure est convertie en 3600 secondes." -#: library/datetime.rst:219 +#: library/datetime.rst:220 msgid "A week is converted to 7 days." msgstr "Une semaine est convertie en 7 jours." -#: library/datetime.rst:221 +#: library/datetime.rst:222 msgid "" "and days, seconds and microseconds are then normalized so that the " "representation is unique, with" @@ -418,19 +435,19 @@ msgstr "" "et ensuite les jours, secondes et microsecondes sont normalisés pour que la " "représentation soit unique avec" -#: library/datetime.rst:224 +#: library/datetime.rst:225 msgid "``0 <= microseconds < 1000000``" msgstr "``0 <= microseconds < 1000000``" -#: library/datetime.rst:225 +#: library/datetime.rst:226 msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)" msgstr "``0 <= secondes < 3600*24`` (le nombre de secondes dans une journée)" -#: library/datetime.rst:226 +#: library/datetime.rst:227 msgid "``-999999999 <= days <= 999999999``" msgstr "``-999999999 <= days <= 999999999``" -#: library/datetime.rst:228 +#: library/datetime.rst:229 msgid "" "The following example illustrates how any arguments besides *days*, " "*seconds* and *microseconds* are \"merged\" and normalized into those three " @@ -440,7 +457,15 @@ msgstr "" "*seconds* et *microseconds* sont « fusionnés » et normalisés dans ces trois " "attributs résultants ::" -#: library/datetime.rst:246 +#: library/datetime.rst:248 +msgid "" +"``import datetime as dt`` instead of ``import datetime`` or ``from datetime " +"import datetime`` to avoid confusion between the module and the class. See " +"`How I Import Python’s datetime Module `__." +msgstr "" + +#: library/datetime.rst:253 msgid "" "If any argument is a float and there are fractional microseconds, the " "fractional microseconds left over from all arguments are combined and their " @@ -455,15 +480,15 @@ msgstr "" "flottant, les processus de conversion et de normalisation seront exacts (pas " "d'informations perdues)." -#: library/datetime.rst:253 +#: library/datetime.rst:260 msgid "" -"If the normalized value of days lies outside the indicated range, :exc:" -"`OverflowError` is raised." +"If the normalized value of days lies outside the indicated " +"range, :exc:`OverflowError` is raised." msgstr "" -"Si la valeur normalisée des jours déborde de l'intervalle indiqué, une :exc:" -"`OverflowError` est levée." +"Si la valeur normalisée des jours déborde de l'intervalle indiqué, " +"une :exc:`OverflowError` est levée." -#: library/datetime.rst:256 +#: library/datetime.rst:263 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" @@ -471,15 +496,24 @@ msgstr "" "Notez que la normalisation de valeurs négatives peut être surprenante au " "premier abord. Par exemple ::" -#: library/datetime.rst:566 library/datetime.rst:1764 library/datetime.rst:2369 +#: library/datetime.rst:271 +#, fuzzy +msgid "" +"Since the string representation of :class:`!timedelta` objects can be " +"confusing, use the following recipe to produce a more readable format:" +msgstr "" +"Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " +"construit avec des valeurs d'attributs canoniques." + +#: library/datetime.rst:628 library/datetime.rst:1850 library/datetime.rst:2486 msgid "Class attributes:" msgstr "Attributs de la classe :" -#: library/datetime.rst:269 +#: library/datetime.rst:292 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "L'objet :class:`timedelta` le plus négatif, ``timedelta(-999999999)``." -#: library/datetime.rst:274 +#: library/datetime.rst:297 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." @@ -487,7 +521,7 @@ msgstr "" "L'objet :class:`timedelta` le plus positif, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." -#: library/datetime.rst:280 +#: library/datetime.rst:303 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." @@ -495,56 +529,56 @@ msgstr "" "La plus petite différence entre des objets :class:`timedelta` non égaux, " "``timedelta(microseconds=1)``." -#: library/datetime.rst:283 +#: library/datetime.rst:307 msgid "" "Note that, because of normalization, ``timedelta.max`` is greater than ``-" -"timedelta.min``. ``-timedelta.max`` is not representable as a :class:" -"`timedelta` object." +"timedelta.min``. ``-timedelta.max`` is not representable as " +"a :class:`timedelta` object." msgstr "" "Il est à noter, du fait de la normalisation, que ``timedelta.max`` est plus " "grand que ``-timedelta.min``. ``-timedelta.max`` n'est pas représentable " "sous la forme d'un objet :class:`timedelta`." -#: library/datetime.rst:584 library/datetime.rst:1784 +#: library/datetime.rst:646 library/datetime.rst:1870 msgid "Instance attributes (read-only):" msgstr "Attributs de l'instance (en lecture seule) :" -#: library/datetime.rst:291 +#: library/datetime.rst:315 msgid "Between -999,999,999 and 999,999,999 inclusive." msgstr "Entre -999999999 et 999999999 inclus" -#: library/datetime.rst:296 +#: library/datetime.rst:320 msgid "Between 0 and 86,399 inclusive." msgstr "Entre 0 et 86399 inclus." -#: library/datetime.rst:300 +#: library/datetime.rst:324 msgid "" "It is a somewhat common bug for code to unintentionally use this attribute " "when it is actually intended to get a :meth:`~timedelta.total_seconds` value " "instead:" msgstr "" -#: library/datetime.rst:315 +#: library/datetime.rst:340 msgid "Between 0 and 999,999 inclusive." msgstr "Entre 0 et 999999 inclus." -#: library/datetime.rst:601 library/datetime.rst:1199 +#: library/datetime.rst:663 library/datetime.rst:1275 msgid "Supported operations:" msgstr "Opérations gérées :" -#: library/datetime.rst:604 library/datetime.rst:1202 +#: library/datetime.rst:666 library/datetime.rst:1278 msgid "Operation" msgstr "Opération" -#: library/datetime.rst:604 library/datetime.rst:1202 +#: library/datetime.rst:666 library/datetime.rst:1278 msgid "Result" msgstr "Résultat" -#: library/datetime.rst:325 +#: library/datetime.rst:348 msgid "``t1 = t2 + t3``" msgstr "``t1 = t2 + t3``" -#: library/datetime.rst:325 +#: library/datetime.rst:348 msgid "" "Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` " "are true. (1)" @@ -552,11 +586,11 @@ msgstr "" "Somme de ``t2`` et ``t3``. Ensuite ``t1 - t2 == t3`` et ``t1 - t3 == t2`` " "sont des expressions vraies. (1)" -#: library/datetime.rst:329 +#: library/datetime.rst:352 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" -#: library/datetime.rst:329 +#: library/datetime.rst:352 msgid "" "Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == " "t1 + t3`` are true. (1)(6)" @@ -564,11 +598,11 @@ msgstr "" "Différence entre ``t2`` et ``t3``. Ensuite ``t1 == t2 - t3`` et ``t2 == t1 + " "t3`` sont des expressions vraies. (1)(6)" -#: library/datetime.rst:333 +#: library/datetime.rst:356 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i or t1 = i * t2``" -#: library/datetime.rst:333 +#: library/datetime.rst:356 msgid "" "Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " "provided ``i != 0``." @@ -576,15 +610,15 @@ msgstr "" "Delta multiplié par un entier. Ensuite ``t1 // i == t2`` est vrai, en " "admettant que ``i != 0``." -#: library/datetime.rst:337 +#: library/datetime.rst:360 msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)" msgstr "De manière générale, ``t1 * i == t1 * (i-1) + t1`` est vrai. (1)" -#: library/datetime.rst:340 +#: library/datetime.rst:363 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f or t1 = f * t2``" -#: library/datetime.rst:340 +#: library/datetime.rst:363 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." @@ -593,23 +627,23 @@ msgstr "" "proche de ``timedelta.resolution`` en utilisant la règle de l'arrondi au " "pair le plus proche." -#: library/datetime.rst:344 +#: library/datetime.rst:367 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" -#: library/datetime.rst:344 +#: library/datetime.rst:367 msgid "" -"Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :" -"class:`float` object." +"Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns " +"a :class:`float` object." msgstr "" "Division (3) de la durée totale ``t2`` par l'unité d'intervalle ``t3``. " "Renvoie un objet :class:`float`." -#: library/datetime.rst:348 +#: library/datetime.rst:371 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f or t1 = t2 / i``" -#: library/datetime.rst:348 +#: library/datetime.rst:371 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." @@ -618,11 +652,11 @@ msgstr "" "multiple le plus proche de ``timedelta.resolution`` en utilisant la règle de " "l'arrondi au pair le plus proche." -#: library/datetime.rst:352 +#: library/datetime.rst:375 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" -#: library/datetime.rst:352 +#: library/datetime.rst:375 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" @@ -630,19 +664,19 @@ msgstr "" "Le quotient est calculé et le reste (s'il y en a un) est ignoré. Dans le " "second cas, un entier est renvoyé. (3)" -#: library/datetime.rst:356 +#: library/datetime.rst:379 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" -#: library/datetime.rst:356 +#: library/datetime.rst:379 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "Le reste est calculé comme un objet de type :class:`timedelta`. (3)" -#: library/datetime.rst:359 +#: library/datetime.rst:382 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" -#: library/datetime.rst:359 +#: library/datetime.rst:382 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. ``q`` is an integer and ``r`` is a :class:`timedelta` object." @@ -650,19 +684,19 @@ msgstr "" "Calcule le quotient et le reste : ``q = t1 // t2`` (3) et ``r = t1 % t2``. " "``q`` est un entier et ``r`` est un objet :class:`timedelta`." -#: library/datetime.rst:364 +#: library/datetime.rst:387 msgid "``+t1``" msgstr "``+t1``" -#: library/datetime.rst:364 +#: library/datetime.rst:387 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "Renvoie un objet :class:`timedelta` avec la même valeur. (2)" -#: library/datetime.rst:367 +#: library/datetime.rst:390 msgid "``-t1``" msgstr "``-t1``" -#: library/datetime.rst:367 +#: library/datetime.rst:390 msgid "" "Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to " "``t1 * -1``. (1)(4)" @@ -670,11 +704,11 @@ msgstr "" "Équivalent à ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, et à " "``t1 * -1``. (1)(4)" -#: library/datetime.rst:371 +#: library/datetime.rst:394 msgid "``abs(t)``" msgstr "``abs(t)``" -#: library/datetime.rst:371 +#: library/datetime.rst:394 msgid "" "Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " "0``. (2)" @@ -682,11 +716,11 @@ msgstr "" "Équivalent à ``+t`` quand ``t.days >= 0``, et à ``-t`` quand ``t.days < 0``. " "(2)" -#: library/datetime.rst:374 +#: library/datetime.rst:397 msgid "``str(t)``" msgstr "``str(t)``" -#: library/datetime.rst:374 +#: library/datetime.rst:397 msgid "" "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " "negative for negative ``t``. (5)" @@ -694,11 +728,11 @@ msgstr "" "Renvoie une chaîne de la forme ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, où D est " "négatif pour ``t`` négatif. (5)" -#: library/datetime.rst:378 +#: library/datetime.rst:401 msgid "``repr(t)``" msgstr "``repr(t)``" -#: library/datetime.rst:378 +#: library/datetime.rst:401 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." @@ -706,28 +740,28 @@ msgstr "" "Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " "construit avec des valeurs d'attributs canoniques." -#: library/datetime.rst:623 library/datetime.rst:2600 +#: library/datetime.rst:685 library/datetime.rst:2796 msgid "Notes:" msgstr "Notes :" -#: library/datetime.rst:387 +#: library/datetime.rst:409 msgid "This is exact but may overflow." msgstr "Ceci est exact, mais peut provoquer un débordement." -#: library/datetime.rst:390 +#: library/datetime.rst:412 msgid "This is exact and cannot overflow." msgstr "Ceci est exact, et ne peut pas provoquer un débordement." -#: library/datetime.rst:393 +#: library/datetime.rst:415 msgid "Division by zero raises :exc:`ZeroDivisionError`." msgstr "Une division par zéro lève une :exc:`ZeroDivisionError`." -#: library/datetime.rst:396 +#: library/datetime.rst:418 msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object." msgstr "" "``-timedelta.max`` n'est pas représentable avec un objet :class:`timedelta`." -#: library/datetime.rst:399 +#: library/datetime.rst:421 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " @@ -737,7 +771,7 @@ msgstr "" "similairement à leur représentation interne. Cela amène à des résultats " "inhabituels pour des *timedeltas* négatifs. Par exemple ::" -#: library/datetime.rst:409 +#: library/datetime.rst:431 msgid "" "The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" "t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " @@ -747,36 +781,37 @@ msgstr "" "sauf si ``t3`` vaut ``timedelta.max`` ; dans ce cas, la première expression " "produit une valeur alors que la seconde produit un débordement." -#: library/datetime.rst:413 +#: library/datetime.rst:435 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " -"support certain additions and subtractions with :class:`date` and :class:`." -"datetime` objects (see below)." +"support certain additions and subtractions with :class:`date` " +"and :class:`.datetime` objects (see below)." msgstr "" "En plus des opérations listées ci-dessus, les objets :class:`timedelta` " -"implémentent certaines additions et soustractions avec des objets :class:" -"`date` et :class:`datetime` (voir ci-dessous)." +"implémentent certaines additions et soustractions avec des " +"objets :class:`date` et :class:`datetime` (voir ci-dessous)." -#: library/datetime.rst:417 +#: library/datetime.rst:439 +#, fuzzy msgid "" -"Floor division and true division of a :class:`timedelta` object by another :" -"class:`timedelta` object are now supported, as are remainder operations and " -"the :func:`divmod` function. True division and multiplication of a :class:" -"`timedelta` object by a :class:`float` object are now supported." +"Floor division and true division of a :class:`timedelta` object by " +"another :class:`!timedelta` object are now supported, as are remainder " +"operations and the :func:`divmod` function. True division and multiplication " +"of a :class:`!timedelta` object by a :class:`float` object are now supported." msgstr "" "La division entière et la vraie division d'un objet :class:`timedelta` par " "un autre :class:`timedelta` sont maintenant gérées, comme le sont les " "opérations de reste euclidien et la fonction :func:`divmod`. La vraie " -"division et la multiplication d'un objet :class:`timedelta` par un :class:" -"`float` sont maintenant implémentées." +"division et la multiplication d'un objet :class:`timedelta` par " +"un :class:`float` sont maintenant implémentées." -#: library/datetime.rst:423 +#: library/datetime.rst:445 msgid ":class:`timedelta` objects support equality and order comparisons." msgstr "" "Les objets :class:`timedelta` supportent les comparaisons d'égalité et " "d'ordre." -#: library/datetime.rst:425 +#: library/datetime.rst:447 msgid "" "In Boolean contexts, a :class:`timedelta` object is considered to be true if " "and only if it isn't equal to ``timedelta(0)``." @@ -784,22 +819,23 @@ msgstr "" "Dans les contextes booléens, un objet :class:`timedelta` est considéré comme " "vrai si et seulement s'il n'est pas égal à ``timedelta(0)``." -#: library/datetime.rst:665 library/datetime.rst:1891 +#: library/datetime.rst:727 library/datetime.rst:1995 msgid "Instance methods:" msgstr "Méthodes de l'instance :" -#: library/datetime.rst:432 +#: library/datetime.rst:454 +#, fuzzy msgid "" "Return the total number of seconds contained in the duration. Equivalent to " "``td / timedelta(seconds=1)``. For interval units other than seconds, use " -"the division form directly (e.g. ``td / timedelta(microseconds=1)``)." +"the division form directly (for example, ``td / timedelta(microseconds=1)``)." msgstr "" "Renvoie le nombre total de secondes contenues dans la durée. Équivalent à " "``td / timedelta(seconds=1)``. Pour un intervalle dont l'unité n'est pas la " "seconde, utilisez directement la division (par exemple, ``td / " "timedelta(microseconds=1)``)." -#: library/datetime.rst:436 +#: library/datetime.rst:458 msgid "" "Note that for very large time intervals (greater than 270 years on most " "platforms) this method will lose microsecond accuracy." @@ -808,23 +844,25 @@ msgstr "" "sur la plupart des plateformes), cette méthode perdra la précision des " "microsecondes." -#: library/datetime.rst:442 -msgid "Examples of usage: :class:`timedelta`" +#: library/datetime.rst:465 +#, fuzzy +msgid "Examples of usage: :class:`!timedelta`" msgstr "Exemples d'utilisation de la classe :class:`timedelta` :" -#: library/datetime.rst:444 +#: library/datetime.rst:467 msgid "An additional example of normalization::" msgstr "Un exemple supplémentaire de normalisation ::" -#: library/datetime.rst:456 +#: library/datetime.rst:479 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "Exemples d'arithmétique avec la classe :class:`timedelta` ::" -#: library/datetime.rst:475 -msgid ":class:`date` Objects" +#: library/datetime.rst:499 +#, fuzzy +msgid ":class:`!date` objects" msgstr "Objets :class:`date`" -#: library/datetime.rst:477 +#: library/datetime.rst:501 msgid "" "A :class:`date` object represents a date (year, month and day) in an " "idealized calendar, the current Gregorian calendar indefinitely extended in " @@ -834,7 +872,7 @@ msgstr "" "calendrier idéal, le calendrier grégorien actuel étant indéfiniment étendu " "dans les deux sens." -#: library/datetime.rst:481 +#: library/datetime.rst:505 msgid "" "January 1 of year 1 is called day number 1, January 2 of year 1 is called " "day number 2, and so on. [#]_" @@ -842,7 +880,7 @@ msgstr "" "Le 1 :sup:`er` janvier de l'année 1 est appelé jour numéro 1, le 2 janvier " "de l'année 1 est appelé jour numéro 2, et ainsi de suite. [#]_" -#: library/datetime.rst:486 +#: library/datetime.rst:510 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" @@ -850,53 +888,54 @@ msgstr "" "Tous les arguments sont requis. Les arguments peuvent être des entiers, dans " "les intervalles suivants :" -#: library/datetime.rst:489 +#: library/datetime.rst:513 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "``MINYEAR <= year <= MAXYEAR``" -#: library/datetime.rst:490 +#: library/datetime.rst:514 msgid "``1 <= month <= 12``" msgstr "``1 <= month <= 12``" -#: library/datetime.rst:491 +#: library/datetime.rst:515 msgid "``1 <= day <= number of days in the given month and year``" msgstr "``1 <= day <= nombre de jours dans le mois et l'année donnés``" -#: library/datetime.rst:883 +#: library/datetime.rst:948 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" "Si un argument est donné en dehors de ces intervalles, une :exc:`ValueError` " "est levée." -#: library/datetime.rst:888 +#: library/datetime.rst:954 msgid "Other constructors, all class methods:" msgstr "Autres constructeurs, méthodes de classe :" -#: library/datetime.rst:500 +#: library/datetime.rst:524 msgid "Return the current local date." msgstr "Renvoie la date locale courante." -#: library/datetime.rst:502 +#: library/datetime.rst:526 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "Cela est équivalent à ``date.fromtimestamp(time.time())``." -#: library/datetime.rst:506 +#: library/datetime.rst:531 +#, fuzzy msgid "" -"Return the local date corresponding to the POSIX timestamp, such as is " +"Return the local date corresponding to the POSIX *timestamp*, such as is " "returned by :func:`time.time`." msgstr "" "Renvoie la date locale correspondant à l'horodatage POSIX, telle que " "renvoyée par :func:`time.time`." -#: library/datetime.rst:509 +#: library/datetime.rst:534 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " -"values supported by the platform C :c:func:`localtime` function, and :exc:" -"`OSError` on :c:func:`localtime` failure. It's common for this to be " -"restricted to years from 1970 through 2038. Note that on non-POSIX systems " -"that include leap seconds in their notion of a timestamp, leap seconds are " -"ignored by :meth:`fromtimestamp`." +"values supported by the platform C :c:func:`localtime` function, " +"and :exc:`OSError` on :c:func:`localtime` failure. It's common for this to " +"be restricted to years from 1970 through 2038. Note that on non-POSIX " +"systems that include leap seconds in their notion of a timestamp, leap " +"seconds are ignored by :meth:`fromtimestamp`." msgstr "" "Elle peut lever une :exc:`OverflowError`, si l'horodatage est en dehors des " "bornes gérées par la fonction C :c:func:`localtime` de la plateforme, et une " @@ -905,36 +944,41 @@ msgstr "" "systèmes non *POSIX* qui incluent les secondes intercalaires dans leur " "notion d'horodatage, ces secondes sont ignorées par :meth:`fromtimestamp`." -#: library/datetime.rst:516 +#: library/datetime.rst:541 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " -"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" -"`localtime` failure." +"function. Raise :exc:`OSError` instead of :exc:`ValueError` " +"on :c:func:`localtime` failure." msgstr "" "Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " "l'horodatage (*timestamp* en anglais) est en dehors des bornes gérées par la " "fonction C :c:func:`localtime` de la plateforme. Lève une :exc:`OSError` " "plutôt qu'une :exc:`ValueError` en cas d'échec de :c:func:`localtime`." -#: library/datetime.rst:525 +#: library/datetime.rst:1042 library/datetime.rst:1082 +msgid "Accepts any real number as *timestamp*, not only integer or float." +msgstr "" + +#: library/datetime.rst:553 +#, fuzzy msgid "" -"Return the date corresponding to the proleptic Gregorian ordinal, where " +"Return the date corresponding to the proleptic Gregorian *ordinal*, where " "January 1 of year 1 has ordinal 1." msgstr "" "Renvoie la date correspondant à l'ordinal grégorien proleptique, où le 1er " "janvier de l'an 1 a l'ordinal 1." -#: library/datetime.rst:528 +#: library/datetime.rst:556 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date ``d``, ``date.fromordinal(d.toordinal()) == d``." msgstr "" -":exc:`ValueError` est levée à moins que ``1 <= ordinal <= date.max." -"toordinal()``. Pour toute date ``d``, ``date.fromordinal(d.toordinal()) == " -"d``." +":exc:`ValueError` est levée à moins que ``1 <= ordinal <= " +"date.max.toordinal()``. Pour toute date ``d``, " +"``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:535 +#: library/datetime.rst:563 msgid "" "Return a :class:`date` corresponding to a *date_string* given in any valid " "ISO 8601 format, with the following exceptions:" @@ -942,53 +986,86 @@ msgstr "" "Renvoie une :class:`date` correspondant à *date_string* dans un format ISO " "8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1048 +#: library/datetime.rst:1123 msgid "" "Reduced precision dates are not currently supported (``YYYY-MM``, ``YYYY``)." msgstr "" "Les dates à précision réduite ne sont actuellement pas gérées (``YYYY-MM``, " "``YYYY``)." -#: library/datetime.rst:1050 +#: library/datetime.rst:1125 msgid "" "Extended date representations are not currently supported (``±YYYYYY-MM-" "DD``)." msgstr "" -#: library/datetime.rst:1052 +#: library/datetime.rst:1127 #, fuzzy msgid "Ordinal dates are not currently supported (``YYYY-OOO``)." msgstr "Les dates ordinales ne sont actuellement pas gérées." -#: library/datetime.rst:1054 library/datetime.rst:1520 +#: library/datetime.rst:1129 library/datetime.rst:1604 msgid "Examples::" msgstr "Exemples ::" -#: library/datetime.rst:555 +#: library/datetime.rst:583 msgid "Previously, this method only supported the format ``YYYY-MM-DD``." msgstr "" "Auparavant, cette méthode prenait en charge seulement le format ``YYYY-MM-" "DD``." -#: library/datetime.rst:560 +#: library/datetime.rst:589 +#, fuzzy msgid "" "Return a :class:`date` corresponding to the ISO calendar date specified by " -"year, week and day. This is the inverse of the function :meth:`date." -"isocalendar`." +"*year*, *week* and *day*. This is the inverse of the " +"function :meth:`date.isocalendar`." msgstr "" "Renvoie une :class:`date` correspondant à la date du calendrier ISO définie " -"par l'année, la semaine et le jour. C'est la réciproque de la fonction :meth:" -"`date.isocalendar`." +"par l'année, la semaine et le jour. C'est la réciproque de la " +"fonction :meth:`date.isocalendar`." + +#: library/datetime.rst:597 +#, fuzzy +msgid "" +"Return a :class:`.date` corresponding to *date_string*, parsed according to " +"*format*. This is equivalent to::" +msgstr "" +"Renvoie une classe :class:`.datetime` correspondant à *date_string*, " +"analysée selon *format*." + +#: library/datetime.rst:602 +#, fuzzy +msgid "" +":exc:`ValueError` is raised if the date_string and format can't be parsed " +"by :func:`time.strptime` or if it returns a value which isn't a time tuple. " +"See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`." +msgstr "" +"Une :exc:`ValueError` est levée si *date_string* et *format* ne peuvent être " +"analysés par :func:`time.strptime` ou si elle renvoie une valeur qui n'est " +"pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`datetime.fromisoformat`." + +#: library/datetime.rst:1184 +msgid "" +"If *format* specifies a day of month (``%d``) without a " +"year, :exc:`ValueError` is raised. This is to avoid a quadrennial leap year " +"bug in code seeking to parse only a month and day as the default year used " +"in absence of one in the format is not a leap year. The workaround is to " +"always include a year in your *format*. If parsing *date_string* values " +"that do not have a year, explicitly add a year that is a leap year before " +"parsing:" +msgstr "" -#: library/datetime.rst:570 +#: library/datetime.rst:632 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "La plus vieille date représentable, ``date(MINYEAR, 1, 1)``." -#: library/datetime.rst:575 +#: library/datetime.rst:637 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "La dernière date représentable, ``date(MAXYEAR, 12, 31)``." -#: library/datetime.rst:580 +#: library/datetime.rst:642 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." @@ -996,90 +1073,90 @@ msgstr "" "La plus petite différence possible entre deux objets dates non-égaux, " "``timedelta(days=1)``." -#: library/datetime.rst:1150 +#: library/datetime.rst:1225 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "Entre :const:`MINYEAR` et :const:`MAXYEAR` inclus." -#: library/datetime.rst:1155 +#: library/datetime.rst:1230 msgid "Between 1 and 12 inclusive." msgstr "Entre 1 et 12 inclus." -#: library/datetime.rst:1160 +#: library/datetime.rst:1235 msgid "Between 1 and the number of days in the given month of the given year." msgstr "Entre 1 et le nombre de jours du mois donné de l'année donnée." -#: library/datetime.rst:606 +#: library/datetime.rst:668 msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" -#: library/datetime.rst:606 +#: library/datetime.rst:668 #, fuzzy msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)" msgstr "" "``date2`` est décalée de ``timedelta.days`` jours par rapport à ``date1``. " "(1)" -#: library/datetime.rst:609 +#: library/datetime.rst:671 msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" -#: library/datetime.rst:609 +#: library/datetime.rst:671 #, fuzzy msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)" msgstr "Calcule ``date2`` de façon à avoir ``date2 + timedelta == date1``. (2)" -#: library/datetime.rst:612 +#: library/datetime.rst:674 msgid "``timedelta = date1 - date2``" msgstr "``timedelta = date1 - date2``" -#: library/datetime.rst:1208 +#: library/datetime.rst:1284 msgid "\\(3)" msgstr "\\(3)" -#: library/datetime.rst:0 +#: library/datetime.rst:676 #, fuzzy msgid "``date1 == date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:0 +#: library/datetime.rst:677 #, fuzzy msgid "``date1 != date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:1210 +#: library/datetime.rst:1286 msgid "Equality comparison. (4)" msgstr "" -#: library/datetime.rst:0 +#: library/datetime.rst:679 msgid "``date1 < date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:0 +#: library/datetime.rst:680 #, fuzzy msgid "``date1 > date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:0 +#: library/datetime.rst:681 #, fuzzy msgid "``date1 <= date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:0 +#: library/datetime.rst:682 #, fuzzy msgid "``date1 >= date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:1213 +#: library/datetime.rst:1289 msgid "Order comparison. (5)" msgstr "" -#: library/datetime.rst:626 +#: library/datetime.rst:688 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " -"``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:" -"`OverflowError` is raised if ``date2.year`` would be smaller than :const:" -"`MINYEAR` or larger than :const:`MAXYEAR`." +"``timedelta.seconds`` and ``timedelta.microseconds`` are " +"ignored. :exc:`OverflowError` is raised if ``date2.year`` would be smaller " +"than :const:`MINYEAR` or larger than :const:`MAXYEAR`." msgstr "" "``date2`` est déplacée en avant dans le temps si ``timedelta.days > 0``, ou " "en arrière si ``timedelta.days < 0``. Après quoi ``date2 - date1 == " @@ -1087,33 +1164,33 @@ msgstr "" "ignorés. Une :exc:`OverflowError` est levée si ``date2.year`` devait être " "inférieure à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`." -#: library/datetime.rst:633 +#: library/datetime.rst:695 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés." -#: library/datetime.rst:636 +#: library/datetime.rst:698 #, fuzzy msgid "" -"This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." -"microseconds`` are 0, and ``date2 + timedelta == date1`` after." +"This is exact, and cannot overflow. ``timedelta.seconds`` and " +"``timedelta.microseconds`` are 0, and ``date2 + timedelta == date1`` after." msgstr "" -"Cela est exact, et ne peut pas provoquer de débordement. ``timedelta." -"seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 + timedelta " -"== date1`` après cela." +"Cela est exact, et ne peut pas provoquer de débordement. " +"``timedelta.seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 " +"+ timedelta == date1`` après cela." -#: library/datetime.rst:640 +#: library/datetime.rst:702 #, fuzzy msgid ":class:`date` objects are equal if they represent the same date." msgstr "Renvoie un objet :class:`date` avec les mêmes année, mois et jour." -#: library/datetime.rst:642 +#: library/datetime.rst:704 msgid "" ":class:`!date` objects that are not also :class:`.datetime` instances are " "never equal to :class:`!datetime` objects, even if they represent the same " "date." msgstr "" -#: library/datetime.rst:647 +#: library/datetime.rst:709 #, fuzzy msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " @@ -1123,108 +1200,108 @@ msgstr "" "``date1`` est considérée comme inférieure à ``date2`` quand ``date1`` " "précède ``date2`` dans le temps. (4)" -#: library/datetime.rst:651 +#: library/datetime.rst:713 #, fuzzy msgid "" -"Order comparison between a :class:`!date` object that is not also a :class:`." -"datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`." +"Order comparison between a :class:`date` object that is not also " +"a :class:`.datetime` instance and a :class:`!datetime` object " +"raises :exc:`TypeError`." msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas d'exception :exc:`TypeError`." -#: library/datetime.rst:1281 +#: library/datetime.rst:1357 msgid "" -"Comparison between :class:`.datetime` object and an instance of the :class:" -"`date` subclass that is not a :class:`!datetime` subclass no longer converts " -"the latter to :class:`!date`, ignoring the time part and the time zone. The " -"default behavior can be changed by overriding the special comparison methods " -"in subclasses." +"Comparison between :class:`.datetime` object and an instance of " +"the :class:`date` subclass that is not a :class:`!datetime` subclass no " +"longer converts the latter to :class:`!date`, ignoring the time part and the " +"time zone. The default behavior can be changed by overriding the special " +"comparison methods in subclasses." msgstr "" -#: library/datetime.rst:663 +#: library/datetime.rst:725 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" "Dans des contextes booléens, tous les objets :class:`date` sont considérés " "comme vrai." -#: library/datetime.rst:669 +#: library/datetime.rst:731 +#, fuzzy msgid "" -"Return a date with the same value, except for those parameters given new " -"values by whichever keyword arguments are specified." -msgstr "" -"Renvoie une date avec la même valeur, à l'exception des paramètres nommés " -"pour lesquels une nouvelle valeur est donnée en argument." +"Return a new :class:`date` object with the same values, but with specified " +"parameters updated." +msgstr "Renvoie un objet :class:`date` avec les mêmes année, mois et jour." -#: library/datetime.rst:1937 +#: library/datetime.rst:2041 msgid "Example::" msgstr "Exemple ::" -#: library/datetime.rst:679 +#: library/datetime.rst:741 msgid "" -":class:`date` objects are also supported by generic function :func:`copy." -"replace`." +"The generic function :func:`copy.replace` also supports :class:`date` " +"objects." msgstr "" -#: library/datetime.rst:1405 +#: library/datetime.rst:1482 msgid "" -"Return a :class:`time.struct_time` such as returned by :func:`time." -"localtime`." +"Return a :class:`time.struct_time` such as returned " +"by :func:`time.localtime`." msgstr "" -"Renvoie une :class:`time.struct_time` telle que renvoyée par :func:`time." -"localtime`." +"Renvoie une :class:`time.struct_time` telle que renvoyée " +"par :func:`time.localtime`." -#: library/datetime.rst:687 +#: library/datetime.rst:749 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "" "Les heures, minutes et secondes sont égales à 0 et le drapeau DST vaut -1." -#: library/datetime.rst:1407 +#: library/datetime.rst:1484 msgid "``d.timetuple()`` is equivalent to::" msgstr "``d.timetuple()`` est équivalent à ::" -#: library/datetime.rst:693 +#: library/datetime.rst:755 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with 1 for January 1st." msgstr "" "où ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le " -"numéro du jour dans l'année courante commençant par ``1`` pour le 1\\ :sup:" -"`er` janvier." +"numéro du jour dans l'année courante commençant par ``1`` pour le " +"1\\ :sup:`er` janvier." -#: library/datetime.rst:699 +#: library/datetime.rst:761 #, fuzzy msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " -"1 has ordinal 1. For any :class:`date` object ``d``, ``date.fromordinal(d." -"toordinal()) == d``." +"1 has ordinal 1. For any :class:`date` object ``d``, " +"``date.fromordinal(d.toordinal()) == d``." msgstr "" "Renvoie l'ordinal grégorien proleptique de la date, où le 1er janvier de " -"l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, ``date." -"fromordinal(d.toordinal()) == d``." +"l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, " +"``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:706 +#: library/datetime.rst:768 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " -"For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" -"meth:`isoweekday`." +"For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See " +"also :meth:`isoweekday`." msgstr "" "Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 0 et " "dimanche vaut 6. Par exemple, ``date(2002, 12, 4).weekday() == 2``, un " "mercredi. Voir aussi :meth:`isoweekday`." -#: library/datetime.rst:713 +#: library/datetime.rst:775 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " -"For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" -"meth:`weekday`, :meth:`isocalendar`." +"For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See " +"also :meth:`weekday`, :meth:`isocalendar`." msgstr "" "Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 1 et " "dimanche vaut 7. Par exemple, ``date(2002, 12, 4).isoweekday() == 3``, un " "mercredi. Voir aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:720 +#: library/datetime.rst:782 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." @@ -1232,14 +1309,14 @@ msgstr "" "Renvoie un objet :term:`named tuple` avec trois composants : ``year``, " "``week`` et ``weekday``." -#: library/datetime.rst:723 +#: library/datetime.rst:785 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" "Le calendrier ISO est une variante largement utilisée du calendrier " "grégorien. [#]_" -#: library/datetime.rst:725 +#: library/datetime.rst:787 msgid "" "The ISO year consists of 52 or 53 full weeks, and where a week starts on a " "Monday and ends on a Sunday. The first week of an ISO year is the first " @@ -1253,7 +1330,7 @@ msgstr "" "un jeudi. Elle est appelée la semaine numéro 1, et l'année ISO de ce jeudi " "est la même que son année Grégorienne." -#: library/datetime.rst:730 +#: library/datetime.rst:792 msgid "" "For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " "begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" @@ -1262,51 +1339,52 @@ msgstr "" "l'année ISO 2004 débute le lundi 29 décembre 2003 et se termine le dimanche " "4 janvier 2004 ::" -#: library/datetime.rst:739 +#: library/datetime.rst:801 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "Le résultat a changé d'un *n*-uplet à un :term:`named tuple`." -#: library/datetime.rst:744 +#: library/datetime.rst:807 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" "Renvoie une chaîne représentant la date au format ISO 8601, ``YYYY-MM-DD`` ::" -#: library/datetime.rst:752 +#: library/datetime.rst:816 #, fuzzy msgid "For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "Pour une date *d*, ``str(d)`` est équivalent à ``d.isoformat()``." -#: library/datetime.rst:757 +#: library/datetime.rst:821 msgid "Return a string representing the date::" msgstr "Renvoie une chaîne représentant la date ::" -#: library/datetime.rst:1591 +#: library/datetime.rst:1675 msgid "``d.ctime()`` is equivalent to::" msgstr "``d.ctime()`` est équivalent à ::" -#: library/datetime.rst:767 +#: library/datetime.rst:831 msgid "" -"on platforms where the native C :c:func:`ctime` function (which :func:`time." -"ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " -"the C standard." +"on platforms where the native C :c:func:`ctime` function " +"(which :func:`time.ctime` invokes, but which :meth:`date.ctime` does not " +"invoke) conforms to the C standard." msgstr "" -"sur les plateformes où la fonction C native :c:func:`ctime` (que :func:`time." -"ctime` invoque, mais pas :meth:`date.ctime`) est conforme au standard C." +"sur les plateformes où la fonction C native :c:func:`ctime` " +"(que :func:`time.ctime` invoque, mais pas :meth:`date.ctime`) est conforme " +"au standard C." -#: library/datetime.rst:774 +#: library/datetime.rst:838 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " -"values. See also :ref:`strftime-strptime-behavior` and :meth:`date." -"isoformat`." +"values. See also :ref:`strftime-strptime-behavior` " +"and :meth:`date.isoformat`." msgstr "" "Renvoie une chaîne représentant la date, contrôlée par une chaîne de " "formatage explicite. Les codes de formatage se référant aux heures, minutes " -"ou secondes auront pour valeur 0. Voir :ref:`strftime-strptime-behavior` et :" -"meth:`date.isoformat`." +"ou secondes auront pour valeur 0. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`date.isoformat`." -#: library/datetime.rst:781 +#: library/datetime.rst:845 msgid "" "Same as :meth:`.date.strftime`. This makes it possible to specify a format " "string for a :class:`.date` object in :ref:`formatted string literals ` et à l'utilisation de :meth:`str.format`. Voir :ref:" -"`strftime-strptime-behavior` et :meth:`date.isoformat`." +"littérale ` et à l'utilisation de :meth:`str.format`. " +"Voir :ref:`strftime-strptime-behavior` et :meth:`date.isoformat`." -#: library/datetime.rst:787 -msgid "Examples of Usage: :class:`date`" +#: library/datetime.rst:852 +#, fuzzy +msgid "Examples of usage: :class:`!date`" msgstr "Exemple d'utilisation de la classe :class:`date` :" -#: library/datetime.rst:789 +#: library/datetime.rst:854 msgid "Example of counting days to an event::" msgstr "Exemple de décompte des jours avant un évènement ::" -#: library/datetime.rst:808 +#: library/datetime.rst:873 msgid "More examples of working with :class:`date`:" msgstr "Plus d'exemples avec la classe :class:`date` :" -#: library/datetime.rst:857 -msgid ":class:`.datetime` Objects" +#: library/datetime.rst:922 +#, fuzzy +msgid ":class:`!datetime` objects" msgstr "Objets :class:`.datetime`" -#: library/datetime.rst:859 +#: library/datetime.rst:924 msgid "" "A :class:`.datetime` object is a single object containing all the " "information from a :class:`date` object and a :class:`.time` object." @@ -1342,11 +1422,12 @@ msgstr "" "Un objet :class:`.datetime` est un seul et même objet contenant toute " "l'information d'un objet :class:`date` et d'un objet :class:`time`." -#: library/datetime.rst:862 +#: library/datetime.rst:927 +#, fuzzy msgid "" "Like a :class:`date` object, :class:`.datetime` assumes the current " "Gregorian calendar extended in both directions; like a :class:`.time` " -"object, :class:`.datetime` assumes there are exactly 3600\\*24 seconds in " +"object, :class:`!datetime` assumes there are exactly 3600\\*24 seconds in " "every day." msgstr "" "Comme un objet :class:`date`, un objet :class:`.datetime` utilise le " @@ -1354,11 +1435,11 @@ msgstr "" "objet :class:`.time`, un objet :class:`.datetime` suppose qu'il y a " "exactement 3600\\*24 secondes chaque jour." -#: library/datetime.rst:866 +#: library/datetime.rst:931 msgid "Constructor:" msgstr "Constructeur :" -#: library/datetime.rst:870 +#: library/datetime.rst:935 msgid "" "The *year*, *month* and *day* arguments are required. *tzinfo* may be " "``None``, or an instance of a :class:`tzinfo` subclass. The remaining " @@ -1368,57 +1449,57 @@ msgstr "" "``None`` ou une instance d'une sous-classe de :class:`tzinfo`. Les arguments " "restant doivent être des nombres, dans les intervalles suivants :" -#: library/datetime.rst:874 +#: library/datetime.rst:939 msgid "``MINYEAR <= year <= MAXYEAR``," msgstr "``MINYEAR <= year <= MAXYEAR``," -#: library/datetime.rst:875 +#: library/datetime.rst:940 msgid "``1 <= month <= 12``," msgstr "``1 <= month <= 12``," -#: library/datetime.rst:876 +#: library/datetime.rst:941 msgid "``1 <= day <= number of days in the given month and year``," msgstr "``1 <= day <= nombre de jours dans le mois donné de l'année donnée``," -#: library/datetime.rst:1755 +#: library/datetime.rst:1840 msgid "``0 <= hour < 24``," msgstr "``0 <= hour < 24``," -#: library/datetime.rst:1756 +#: library/datetime.rst:1841 msgid "``0 <= minute < 60``," msgstr "``0 <= minute < 60``," -#: library/datetime.rst:1757 +#: library/datetime.rst:1842 msgid "``0 <= second < 60``," msgstr "``0 <= second < 60``," -#: library/datetime.rst:1758 +#: library/datetime.rst:1843 msgid "``0 <= microsecond < 1000000``," msgstr "``0 <= microsecond < 1000000``," -#: library/datetime.rst:1759 +#: library/datetime.rst:1844 msgid "``fold in [0, 1]``." msgstr "``fold in [0, 1]``." -#: library/datetime.rst:1326 library/datetime.rst:1904 +#: library/datetime.rst:1403 library/datetime.rst:2008 #, fuzzy msgid "Added the *fold* parameter." msgstr "Ajout de l'argument ``fold``." -#: library/datetime.rst:892 +#: library/datetime.rst:958 #, fuzzy msgid "Return the current local date and time, with :attr:`.tzinfo` ``None``." msgstr "Renvoie la date locale actuelle, avec :attr:`.tzinfo` ``None``." -#: library/datetime.rst:894 +#: library/datetime.rst:960 msgid "Equivalent to::" msgstr "Équivalent à ::" -#: library/datetime.rst:898 +#: library/datetime.rst:964 msgid "See also :meth:`now`, :meth:`fromtimestamp`." msgstr "Voir aussi :meth:`now`, :meth:`fromtimestamp`." -#: library/datetime.rst:900 +#: library/datetime.rst:966 msgid "" "This method is functionally equivalent to :meth:`now`, but without a ``tz`` " "parameter." @@ -1426,16 +1507,17 @@ msgstr "" "Cette méthode est fonctionnellement équivalente à :meth:`now`, mais sans le " "paramètre ``tz``." -#: library/datetime.rst:905 +#: library/datetime.rst:972 msgid "Return the current local date and time." msgstr "Renvoie la date et l'heure locale actuelle." -#: library/datetime.rst:907 +#: library/datetime.rst:974 msgid "" -"If optional argument *tz* is ``None`` or not specified, this is like :meth:" -"`today`, but, if possible, supplies more precision than can be gotten from " -"going through a :func:`time.time` timestamp (for example, this may be " -"possible on platforms supplying the C :c:func:`gettimeofday` function)." +"If optional argument *tz* is ``None`` or not specified, this is " +"like :meth:`today`, but, if possible, supplies more precision than can be " +"gotten from going through a :func:`time.time` timestamp (for example, this " +"may be possible on platforms supplying the C :c:func:`gettimeofday` " +"function)." msgstr "" "Si l'argument optionnel *tz* est ``None`` ou n'est pas spécifié, la méthode " "est similaire à :meth:`today`, mais, si possible, apporte plus de précisions " @@ -1443,31 +1525,31 @@ msgstr "" "exemple, cela peut être possible sur des plateformes fournissant la fonction " "C :c:func:`gettimeofday`)." -#: library/datetime.rst:913 +#: library/datetime.rst:980 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the current date and time are converted to *tz*’s time zone." msgstr "" -"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-classe :" -"class:`tzinfo`, et la date et l'heure courantes sont converties vers le " -"fuseau horaire *tz*." +"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-" +"classe :class:`tzinfo`, et la date et l'heure courantes sont converties vers " +"le fuseau horaire *tz*." -#: library/datetime.rst:916 +#: library/datetime.rst:983 msgid "This function is preferred over :meth:`today` and :meth:`utcnow`." msgstr "Cette fonction est préférée à :meth:`today` et :meth:`utcnow`." -#: library/datetime.rst:920 +#: library/datetime.rst:987 msgid "" "Subsequent calls to :meth:`!datetime.now` may return the same instant " "depending on the precision of the underlying clock." msgstr "" -#: library/datetime.rst:925 +#: library/datetime.rst:993 msgid "Return the current UTC date and time, with :attr:`.tzinfo` ``None``." msgstr "" "Renvoie la date et l'heure UTC actuelle, avec :attr:`.tzinfo` ``None``." -#: library/datetime.rst:927 +#: library/datetime.rst:995 msgid "" "This is like :meth:`now`, but returns the current UTC date and time, as a " "naive :class:`.datetime` object. An aware current UTC datetime can be " @@ -1478,7 +1560,7 @@ msgstr "" "courant avisé peut être obtenu en appelant ``datetime.now(timezone.utc)``. " "Voir aussi :meth:`now`." -#: library/datetime.rst:933 +#: library/datetime.rst:1001 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -1491,11 +1573,11 @@ msgstr "" "moyen recommandé pour créer un objet représentant l'heure actuelle en UTC " "est d'appeler ``datetime.now(timezone.utc)``." -#: library/datetime.rst:940 -msgid "Use :meth:`datetime.now` with :attr:`UTC` instead." +#: library/datetime.rst:1008 +msgid "Use :meth:`datetime.now` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:945 +#: library/datetime.rst:1013 msgid "" "Return the local date and time corresponding to the POSIX timestamp, such as " "is returned by :func:`time.time`. If optional argument *tz* is ``None`` or " @@ -1505,61 +1587,61 @@ msgstr "" "Renvoie la date et l'heure locales correspondant à l'horodatage (*timestamp* " "en anglais) *POSIX*, comme renvoyé par :func:`time.time`. Si l'argument " "optionnel *tz* est ``None`` ou n'est pas spécifié, l'horodatage est converti " -"vers la date et l'heure locales de la plateforme, et l'objet :class:`." -"datetime` renvoyé est naïf." +"vers la date et l'heure locales de la plateforme, et " +"l'objet :class:`.datetime` renvoyé est naïf." -#: library/datetime.rst:950 +#: library/datetime.rst:1018 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the timestamp is converted to *tz*’s time zone." msgstr "" -"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-classe :" -"class:`tzinfo`, et l'horodatage (*timestamp* en anglais) est converti vers " -"le fuseau horaire *tz*." +"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-" +"classe :class:`tzinfo`, et l'horodatage (*timestamp* en anglais) est " +"converti vers le fuseau horaire *tz*." -#: library/datetime.rst:953 +#: library/datetime.rst:1021 msgid "" ":meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " -"or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :" -"c:func:`gmtime` failure. It's common for this to be restricted to years in " -"1970 through 2038. Note that on non-POSIX systems that include leap seconds " -"in their notion of a timestamp, leap seconds are ignored by :meth:" -"`fromtimestamp`, and then it's possible to have two timestamps differing by " -"a second that yield identical :class:`.datetime` objects. This method is " -"preferred over :meth:`utcfromtimestamp`." +"or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` " +"or :c:func:`gmtime` failure. It's common for this to be restricted to years " +"in 1970 through 2038. Note that on non-POSIX systems that include leap " +"seconds in their notion of a timestamp, leap seconds are ignored " +"by :meth:`fromtimestamp`, and then it's possible to have two timestamps " +"differing by a second that yield identical :class:`.datetime` objects. This " +"method is preferred over :meth:`utcfromtimestamp`." msgstr "" ":meth:`fromtimestamp` peut lever une :exc:`OverflowError`, si l'horodatage " -"est en dehors de l'intervalle de valeurs gérées par les fonctions C :c:func:" -"`localtime` ou :c:func:`gmtime` de la plateforme, et une :exc:`OSError` en " -"cas d'échec de :c:func:`localtime` ou :c:func:`gmtime`. Il est courant " -"d'être restreint aux années de 1970 à 2038. Notez que sur les systèmes non " -"*POSIX* qui incluent les secondes intercalaires dans leur notion " -"d'horodatage, les secondes intercalaires sont ignorées par :meth:" -"`fromtimestamp`, et il est alors possible d'avoir deux horodatages différant " -"d'une seconde produisant un objet :class:`.datetime` identique. Cette " -"méthode est préférée à :meth:`utcfromtimestamp`." - -#: library/datetime.rst:964 +"est en dehors de l'intervalle de valeurs gérées par les fonctions " +"C :c:func:`localtime` ou :c:func:`gmtime` de la plateforme, et " +"une :exc:`OSError` en cas d'échec de :c:func:`localtime` " +"ou :c:func:`gmtime`. Il est courant d'être restreint aux années de 1970 à " +"2038. Notez que sur les systèmes non *POSIX* qui incluent les secondes " +"intercalaires dans leur notion d'horodatage, les secondes intercalaires sont " +"ignorées par :meth:`fromtimestamp`, et il est alors possible d'avoir deux " +"horodatages différant d'une seconde produisant un objet :class:`.datetime` " +"identique. Cette méthode est préférée à :meth:`utcfromtimestamp`." + +#: library/datetime.rst:1032 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " -"or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:" -"`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." +"or :c:func:`gmtime` functions. Raise :exc:`OSError` instead " +"of :exc:`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." msgstr "" "Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " "l'horodatage est en dehors de l'intervalle de valeurs gérées par les " "fonctions C :c:func:`localtime` ou :c:func:`gmtime` de la plateforme. Lève " -"une :exc:`OSError` plutôt qu'une :exc:`ValueError` en cas d'échec de :c:func:" -"`localtime` ou :c:func:`gmtime`." +"une :exc:`OSError` plutôt qu'une :exc:`ValueError` en cas d'échec " +"de :c:func:`localtime` ou :c:func:`gmtime`." -#: library/datetime.rst:971 +#: library/datetime.rst:1039 msgid ":meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1." msgstr "" -":meth:`fromtimestamp` peut renvoyer des instances avec l'attribut :attr:`." -"fold` à 1." +":meth:`fromtimestamp` peut renvoyer des instances avec " +"l'attribut :attr:`.fold` à 1." -#: library/datetime.rst:976 +#: library/datetime.rst:1048 msgid "" "Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " "with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" @@ -1567,25 +1649,25 @@ msgstr "" "Renvoie la classe UTC :class:`.datetime` correspondant à l'horodatage POSIX, " "avec :attr:`.tzinfo` ``None`` (l'objet résultant est naïf)." -#: library/datetime.rst:979 +#: library/datetime.rst:1051 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " -"values supported by the platform C :c:func:`gmtime` function, and :exc:" -"`OSError` on :c:func:`gmtime` failure. It's common for this to be restricted " -"to years in 1970 through 2038." +"values supported by the platform C :c:func:`gmtime` function, " +"and :exc:`OSError` on :c:func:`gmtime` failure. It's common for this to be " +"restricted to years in 1970 through 2038." msgstr "" "Cela peut lever une :exc:`OverflowError`, si l'horodatage est en dehors de " "l'intervalle de valeurs gérées par la fonction C :c:func:`gmtime` de la " "plateforme, et une :exc:`OSError` en cas d'échec de :c:func:`gmtime`. Il est " "courant d'être restreint aux années de 1970 à 2038." -#: library/datetime.rst:984 +#: library/datetime.rst:1056 msgid "To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::" msgstr "" -"Pour obtenir un objet :class:`.datetime` avisé, appelez :meth:" -"`fromtimestamp` ::" +"Pour obtenir un objet :class:`.datetime` avisé, " +"appelez :meth:`fromtimestamp` ::" -#: library/datetime.rst:988 +#: library/datetime.rst:1060 msgid "" "On the POSIX compliant platforms, it is equivalent to the following " "expression::" @@ -1593,15 +1675,15 @@ msgstr "" "Sur les plateformes respectant *POSIX*, cela est équivalent à l'expression " "suivante ::" -#: library/datetime.rst:993 +#: library/datetime.rst:1065 msgid "" -"except the latter formula always supports the full years range: between :" -"const:`MINYEAR` and :const:`MAXYEAR` inclusive." +"except the latter formula always supports the full years range: " +"between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "" -"excepté que la dernière formule gère l'intervalle complet des années entre :" -"const:`MINYEAR` et :const:`MAXYEAR` incluses." +"excepté que la dernière formule gère l'intervalle complet des années " +"entre :const:`MINYEAR` et :const:`MAXYEAR` incluses." -#: library/datetime.rst:998 +#: library/datetime.rst:1070 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -1615,23 +1697,23 @@ msgstr "" "moyen recommandé pour créer un objet représentant un horodatage spécifique " "en UTC est d'appeler ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``." -#: library/datetime.rst:1004 +#: library/datetime.rst:1076 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`gmtime` " -"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" -"`gmtime` failure." +"function. Raise :exc:`OSError` instead of :exc:`ValueError` " +"on :c:func:`gmtime` failure." msgstr "" "Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " "l'horodatage est en dehors de l'intervalle de valeurs gérées par la fonction " -"C :c:func:`gmtime` de la plateforme. Lève une :exc:`OSError` plutôt qu'une :" -"exc:`ValueError` en cas d'échec de :c:func:`gmtime`." +"C :c:func:`gmtime` de la plateforme. Lève une :exc:`OSError` plutôt " +"qu'une :exc:`ValueError` en cas d'échec de :c:func:`gmtime`." -#: library/datetime.rst:1012 -msgid "Use :meth:`datetime.fromtimestamp` with :attr:`UTC` instead." +#: library/datetime.rst:1087 +msgid "Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead." msgstr "" -#: library/datetime.rst:1017 +#: library/datetime.rst:1092 msgid "" "Return the :class:`.datetime` corresponding to the proleptic Gregorian " "ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is " @@ -1640,12 +1722,12 @@ msgid "" "is ``None``." msgstr "" "Renvoie le :class:`.datetime` correspondant à l'ordinal du calendrier " -"grégorien proleptique, où le 1er janvier de l'an 1 a l'ordinal 1. Une :exc:" -"`ValueError` est levée à moins que ``1 <= ordinal <= datetime.max." -"toordinal()``. Les heures, minutes, secondes et microsecondes du résultat " -"valent toutes 0, et :attr:`.tzinfo` est ``None``." +"grégorien proleptique, où le 1er janvier de l'an 1 a l'ordinal 1. " +"Une :exc:`ValueError` est levée à moins que ``1 <= ordinal <= " +"datetime.max.toordinal()``. Les heures, minutes, secondes et microsecondes " +"du résultat valent toutes 0, et :attr:`.tzinfo` est ``None``." -#: library/datetime.rst:1025 +#: library/datetime.rst:1100 #, fuzzy msgid "" "Return a new :class:`.datetime` object whose date components are equal to " @@ -1653,8 +1735,8 @@ msgid "" "given :class:`.time` object's. If the *tzinfo* argument is provided, its " "value is used to set the :attr:`.tzinfo` attribute of the result, otherwise " "the :attr:`~.time.tzinfo` attribute of the *time* argument is used. If the " -"*date* argument is a :class:`.datetime` object, its time components and :" -"attr:`.tzinfo` attributes are ignored." +"*date* argument is a :class:`!datetime` object, its time components " +"and :attr:`.tzinfo` attributes are ignored." msgstr "" "Renvoie un nouvel objet :class:`.datetime` dont les composants de date sont " "égaux à ceux de l'objet :class:`date` donné, et dont les composants de temps " @@ -1663,21 +1745,21 @@ msgstr "" "du résultat, autrement l'attribut :attr:`~.time.tzinfo` de l'argument *time* " "est utilisé." -#: library/datetime.rst:1033 +#: library/datetime.rst:1108 #, fuzzy msgid "" -"For any :class:`.datetime` object ``d``, ``d == datetime.combine(d.date(), d." -"time(), d.tzinfo)``." +"For any :class:`.datetime` object ``d``, ``d == datetime.combine(d.date(), " +"d.time(), d.tzinfo)``." msgstr "" -"Pour tout objet :class:`.datetime` *d*`, ``d == datetime.combine(d.date(), d." -"time(), d.tzinfo)``. Si *date* est un objet :class:`.datetime`, ses " +"Pour tout objet :class:`.datetime` *d*`, ``d == datetime.combine(d.date(), " +"d.time(), d.tzinfo)``. Si *date* est un objet :class:`.datetime`, ses " "composants de temps et attributs :attr:`.tzinfo` sont ignorés." -#: library/datetime.rst:1036 +#: library/datetime.rst:1111 msgid "Added the *tzinfo* argument." msgstr "Ajout de l'argument *tzinfo*." -#: library/datetime.rst:1042 +#: library/datetime.rst:1117 msgid "" "Return a :class:`.datetime` corresponding to a *date_string* in any valid " "ISO 8601 format, with the following exceptions:" @@ -1685,43 +1767,44 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string* dans un " "format ISO 8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1855 +#: library/datetime.rst:1942 msgid "Time zone offsets may have fractional seconds." msgstr "" "Les décalages de fuseaux horaires peuvent comporter des fractions de " "secondes." -#: library/datetime.rst:1046 +#: library/datetime.rst:1121 msgid "The ``T`` separator may be replaced by any single unicode character." msgstr "" "Le séparateur ``T`` peut être remplacé par n'importe quel caractère Unicode." -#: library/datetime.rst:1860 +#: library/datetime.rst:1947 msgid "Fractional hours and minutes are not supported." msgstr "Les fractions d'heures et de minutes ne sont pas gérées." -#: library/datetime.rst:1078 +#: library/datetime.rst:1153 #, fuzzy msgid "" -"Previously, this method only supported formats that could be emitted by :" -"meth:`date.isoformat` or :meth:`datetime.isoformat`." +"Previously, this method only supported formats that could be emitted " +"by :meth:`date.isoformat` or :meth:`datetime.isoformat`." msgstr "" -"Auparavant, cette méthode prenait en charge seulement les formats émis par :" -"meth:`date.isoformat()` et :meth:`datetime.isoformat()`." +"Auparavant, cette méthode prenait en charge seulement les formats émis " +"par :meth:`date.isoformat()` et :meth:`datetime.isoformat()`." -#: library/datetime.rst:1085 +#: library/datetime.rst:1160 +#, fuzzy msgid "" "Return a :class:`.datetime` corresponding to the ISO calendar date specified " -"by year, week and day. The non-date components of the datetime are populated " -"with their normal default values. This is the inverse of the function :meth:" -"`datetime.isocalendar`." +"by *year*, *week* and *day*. The non-date components of the datetime are " +"populated with their normal default values. This is the inverse of the " +"function :meth:`datetime.isocalendar`." msgstr "" "Renvoie une classe :class:`.datetime` correspondant à la date du calendrier " "ISO spécifiée par année, semaine et jour. Les composantes ne relevant pas de " "la date de *datetime* sont renseignées avec leurs valeurs par défaut " "normales. C'est la réciproque de la fonction :meth:`datetime.isocalendar`." -#: library/datetime.rst:1094 +#: library/datetime.rst:1170 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." @@ -1729,7 +1812,7 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:1097 +#: library/datetime.rst:1173 #, fuzzy msgid "" "If *format* does not contain microseconds or time zone information, this is " @@ -1738,30 +1821,19 @@ msgstr "" "Si *format* ne contient pas de microsecondes ou d'informations sur le fuseau " "horaire, cela équivaut à ::" -#: library/datetime.rst:1101 +#: library/datetime.rst:1177 msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " "by :func:`time.strptime` or if it returns a value which isn't a time tuple. " -"See also :ref:`strftime-strptime-behavior` and :meth:`datetime." -"fromisoformat`." +"See also :ref:`strftime-strptime-behavior` " +"and :meth:`datetime.fromisoformat`." msgstr "" "Une :exc:`ValueError` est levée si *date_string* et *format* ne peuvent être " "analysés par :func:`time.strptime` ou si elle renvoie une valeur qui n'est " -"pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` et :meth:" -"`datetime.fromisoformat`." - -#: library/datetime.rst:1108 -msgid "" -"If *format* specifies a day of month without a year a :exc:" -"`DeprecationWarning` is now emitted. This is to avoid a quadrennial leap " -"year bug in code seeking to parse only a month and day as the default year " -"used in absence of one in the format is not a leap year. Such *format* " -"values may raise an error as of Python 3.15. The workaround is to always " -"include a year in your *format*. If parsing *date_string* values that do " -"not have a year, explicitly add a year that is a leap year before parsing:" -msgstr "" +"pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`datetime.fromisoformat`." -#: library/datetime.rst:1130 +#: library/datetime.rst:1205 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." @@ -1769,7 +1841,7 @@ msgstr "" "Le plus ancien :class:`.datetime` représentable, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." -#: library/datetime.rst:1136 +#: library/datetime.rst:1211 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." @@ -1777,7 +1849,7 @@ msgstr "" "Le dernier :class:`.datetime` représentable, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." -#: library/datetime.rst:1142 +#: library/datetime.rst:1217 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." @@ -1785,27 +1857,27 @@ msgstr "" "La plus petite différence possible entre deux objets :class:`.datetime` non-" "égaux, ``timedelta(microseconds=1)``." -#: library/datetime.rst:1788 +#: library/datetime.rst:1874 msgid "In ``range(24)``." msgstr "Dans ``range(24)``." -#: library/datetime.rst:1175 library/datetime.rst:1798 +#: library/datetime.rst:1250 library/datetime.rst:1884 msgid "In ``range(60)``." msgstr "Dans ``range(60)``." -#: library/datetime.rst:1803 +#: library/datetime.rst:1889 msgid "In ``range(1000000)``." msgstr "Dans ``range(1000000)``." -#: library/datetime.rst:1185 +#: library/datetime.rst:1260 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." msgstr "" -"L'objet passé en tant que paramètre *tzinfo* du constructeur de la classe :" -"class:`.datetime` ou ``None`` si aucun n'a été donné." +"L'objet passé en tant que paramètre *tzinfo* du constructeur de la " +"classe :class:`.datetime` ou ``None`` si aucun n'a été donné." -#: library/datetime.rst:1814 +#: library/datetime.rst:1900 #, fuzzy msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " @@ -1821,77 +1893,77 @@ msgstr "" "décrémenté pour des raisons politiques.) La valeur 0 (1) représente le plus " "ancien (récent) des deux moments représentés par la même heure." -#: library/datetime.rst:1204 +#: library/datetime.rst:1280 msgid "``datetime2 = datetime1 + timedelta``" msgstr "``datetime2 = datetime1 + timedelta``" -#: library/datetime.rst:2427 library/datetime.rst:2444 -#: library/datetime.rst:2509 library/datetime.rst:2518 +#: library/datetime.rst:2544 library/datetime.rst:2554 +#: library/datetime.rst:2564 library/datetime.rst:2668 msgid "\\(1)" msgstr "\\(1)" -#: library/datetime.rst:1206 +#: library/datetime.rst:1282 msgid "``datetime2 = datetime1 - timedelta``" msgstr "``datetime2 = datetime1 - timedelta``" -#: library/datetime.rst:2460 +#: library/datetime.rst:2674 msgid "\\(2)" msgstr "\\(2)" -#: library/datetime.rst:1208 +#: library/datetime.rst:1284 msgid "``timedelta = datetime1 - datetime2``" msgstr "``timedelta = datetime1 - datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1286 #, fuzzy msgid "``datetime1 == datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1287 #, fuzzy msgid "``datetime1 != datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1289 msgid "``datetime1 < datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1290 #, fuzzy msgid "``datetime1 > datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1291 #, fuzzy msgid "``datetime1 <= datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:0 +#: library/datetime.rst:1292 #, fuzzy msgid "``datetime1 >= datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:1220 +#: library/datetime.rst:1296 #, fuzzy msgid "" "``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " -"moving forward in time if ``timedelta.days > 0``, or backward if ``timedelta." -"days < 0``. The result has the same :attr:`~.datetime.tzinfo` attribute as " -"the input datetime, and ``datetime2 - datetime1 == timedelta`` after. :exc:" -"`OverflowError` is raised if ``datetime2.year`` would be smaller than :const:" -"`MINYEAR` or larger than :const:`MAXYEAR`. Note that no time zone " -"adjustments are done even if the input is an aware object." +"moving forward in time if ``timedelta.days > 0``, or backward if " +"``timedelta.days < 0``. The result has the same :attr:`~.datetime.tzinfo` " +"attribute as the input datetime, and ``datetime2 - datetime1 == timedelta`` " +"after. :exc:`OverflowError` is raised if ``datetime2.year`` would be smaller " +"than :const:`MINYEAR` or larger than :const:`MAXYEAR`. Note that no time " +"zone adjustments are done even if the input is an aware object." msgstr "" "*datetime2* est décalé d'une durée *timedelta* par rapport à *datetime1*, en " -"avant dans le temps si ``timedelta.days > 0``, ou en arrière si ``timedelta." -"days < 0``. Le résultat a le même attribut :attr:`~.datetime.tzinfo` que le " -"*datetime* d'entrée, et *datetime2 - datetime1 == timedelta* après " -"l'opération. Une :exc:`OverflowError` est levée si *datetime2.year* devait " -"être inférieure à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`. Notez " -"qu'aucun ajustement de fuseau horaire n'est réalisé même si l'entrée est " -"avisée." - -#: library/datetime.rst:1229 +"avant dans le temps si ``timedelta.days > 0``, ou en arrière si " +"``timedelta.days < 0``. Le résultat a le même " +"attribut :attr:`~.datetime.tzinfo` que le *datetime* d'entrée, et *datetime2 " +"- datetime1 == timedelta* après l'opération. Une :exc:`OverflowError` est " +"levée si *datetime2.year* devait être inférieure à :const:`MINYEAR` ou " +"supérieure à :const:`MAXYEAR`. Notez qu'aucun ajustement de fuseau horaire " +"n'est réalisé même si l'entrée est avisée." + +#: library/datetime.rst:1305 #, fuzzy msgid "" "Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " @@ -1904,9 +1976,10 @@ msgstr "" "que le *datetime* d'entrée, et aucun ajustement de fuseau horaire n'est " "réalisé même si l'entrée est avisée." -#: library/datetime.rst:1234 +#: library/datetime.rst:1310 +#, fuzzy msgid "" -"Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " +"Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined " "only if both operands are naive, or if both are aware. If one is aware and " "the other is naive, :exc:`TypeError` is raised." msgstr "" @@ -1915,28 +1988,29 @@ msgstr "" "avisés. Si l'un est avisé et que l'autre est naïf, une :exc:`TypeError` est " "levée." -#: library/datetime.rst:1238 +#: library/datetime.rst:1314 #, fuzzy msgid "" -"If both are naive, or both are aware and have the same :attr:`~.datetime." -"tzinfo` attribute, the :attr:`~.datetime.tzinfo` attributes are ignored, and " -"the result is a :class:`timedelta` object ``t`` such that ``datetime2 + t == " -"datetime1``. No time zone adjustments are done in this case." +"If both are naive, or both are aware and have the " +"same :attr:`~.datetime.tzinfo` attribute, the :attr:`~.datetime.tzinfo` " +"attributes are ignored, and the result is a :class:`timedelta` object ``t`` " +"such that ``datetime2 + t == datetime1``. No time zone adjustments are done " +"in this case." msgstr "" -"Si les deux sont naïfs, ou que les deux sont avisés et ont le même attribut :" -"attr:`~.datetime.tzinfo`, les attributs :attr:`~.datetime.tzinfo` sont " -"ignorés, et le résultat est un objet :class:`timedelta` *t* tel que " +"Si les deux sont naïfs, ou que les deux sont avisés et ont le même " +"attribut :attr:`~.datetime.tzinfo`, les attributs :attr:`~.datetime.tzinfo` " +"sont ignorés, et le résultat est un objet :class:`timedelta` *t* tel que " "``datetime2 + t == datetime1``. Aucun ajustement de fuseau horaire n'a lieu " "dans ce cas." -#: library/datetime.rst:1243 +#: library/datetime.rst:1319 #, fuzzy msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " "``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC " -"datetimes. The result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b." -"replace(tzinfo=None) - b.utcoffset())`` except that the implementation never " -"overflows." +"datetimes. The result is ``(a.replace(tzinfo=None) - a.utcoffset()) - " +"(b.replace(tzinfo=None) - b.utcoffset())`` except that the implementation " +"never overflows." msgstr "" "Si les deux sont avisés mais ont des attributs :attr:`~.datetime.tzinfo` " "différents, ``a-b`` agit comme si *a* et *b* étaient premièrement convertis " @@ -1944,20 +2018,20 @@ msgstr "" "a.utcoffset()) - (b.replace(tzinfo=None) - b.utcoffset())`` à l'exception " "que l'implémentation ne produit jamais de débordement." -#: library/datetime.rst:1249 +#: library/datetime.rst:1325 msgid "" ":class:`.datetime` objects are equal if they represent the same date and " "time, taking into account the time zone." msgstr "" -#: library/datetime.rst:1252 +#: library/datetime.rst:1328 #, fuzzy -msgid "Naive and aware :class:`!datetime` objects are never equal." +msgid "Naive and aware :class:`.datetime` objects are never equal." msgstr "" -"Pour obtenir un objet :class:`.datetime` avisé, appelez :meth:" -"`fromtimestamp` ::" +"Pour obtenir un objet :class:`.datetime` avisé, " +"appelez :meth:`fromtimestamp` ::" -#: library/datetime.rst:1254 +#: library/datetime.rst:1330 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " @@ -1965,17 +2039,18 @@ msgid "" "the base datetimes are compared. If both comparands are aware and have " "different :attr:`~.datetime.tzinfo` attributes, the comparison acts as " "comparands were first converted to UTC datetimes except that the " -"implementation never overflows. :class:`!datetime` instances in a repeated " +"implementation never overflows. :class:`.datetime` instances in a repeated " "interval are never equal to :class:`!datetime` instances in other time zone." msgstr "" -"Si les deux opérandes sont avisés, et ont le même attribut :attr:`~.datetime." -"tzinfo`, l'attribut commun :attr:`~.datetime.tzinfo` est ignoré et les " -"*datetimes* de base sont comparés. Si les deux opérandes sont avisés et ont " -"des attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " +"Si les deux opérandes sont avisés, et ont le même " +"attribut :attr:`~.datetime.tzinfo`, l'attribut " +"commun :attr:`~.datetime.tzinfo` est ignoré et les *datetimes* de base sont " +"comparés. Si les deux opérandes sont avisés et ont des " +"attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1264 +#: library/datetime.rst:1340 #, fuzzy msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " @@ -1984,16 +2059,16 @@ msgstr "" "*datetime1* est considéré inférieur à *datetime2* quand il le précède dans " "le temps." -#: library/datetime.rst:1267 +#: library/datetime.rst:1343 #, fuzzy msgid "" -"Order comparison between naive and aware :class:`.datetime` objects raises :" -"exc:`TypeError`." +"Order comparison between naive and aware :class:`.datetime` objects " +"raises :exc:`TypeError`." msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas d'exception :exc:`TypeError`." -#: library/datetime.rst:1270 +#: library/datetime.rst:1346 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " @@ -2003,14 +2078,15 @@ msgid "" "comparands were first converted to UTC datetimes except that the " "implementation never overflows." msgstr "" -"Si les deux opérandes sont avisés, et ont le même attribut :attr:`~.datetime." -"tzinfo`, l'attribut commun :attr:`~.datetime.tzinfo` est ignoré et les " -"*datetimes* de base sont comparés. Si les deux opérandes sont avisés et ont " -"des attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " +"Si les deux opérandes sont avisés, et ont le même " +"attribut :attr:`~.datetime.tzinfo`, l'attribut " +"commun :attr:`~.datetime.tzinfo` est ignoré et les *datetimes* de base sont " +"comparés. Si les deux opérandes sont avisés et ont des " +"attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1277 +#: library/datetime.rst:1353 msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " "don't raise :exc:`TypeError`." @@ -2018,11 +2094,11 @@ msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas d'exception :exc:`TypeError`." -#: library/datetime.rst:1293 +#: library/datetime.rst:1370 msgid "Return :class:`date` object with same year, month and day." msgstr "Renvoie un objet :class:`date` avec les mêmes année, mois et jour." -#: library/datetime.rst:1298 +#: library/datetime.rst:1375 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond and " "fold. :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`." @@ -2031,38 +2107,39 @@ msgstr "" "microsecondes et *fold*. :attr:`.tzinfo` est ``None``. Voir aussi la " "méthode :meth:`timetz`." -#: library/datetime.rst:1310 +#: library/datetime.rst:1387 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "La valeur *fold* est copiée vers l'objet :class:`.time` renvoyé." -#: library/datetime.rst:1307 +#: library/datetime.rst:1384 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " "fold, and tzinfo attributes. See also method :meth:`time`." msgstr "" "Renvoie un objet :class:`.time` avec les mêmes attributs heure, minute, " -"seconde, microseconde, *fold* et *tzinfo*. Voir aussi la méthode :meth:" -"`time`." +"seconde, microseconde, *fold* et *tzinfo*. Voir aussi la " +"méthode :meth:`time`." -#: library/datetime.rst:1318 +#: library/datetime.rst:1395 +#, fuzzy msgid "" -"Return a datetime with the same attributes, except for those attributes " -"given new values by whichever keyword arguments are specified. Note that " -"``tzinfo=None`` can be specified to create a naive datetime from an aware " -"datetime with no conversion of date and time data." +"Return a new :class:`datetime` object with the same attributes, but with " +"specified parameters updated. Note that ``tzinfo=None`` can be specified to " +"create a naive datetime from an aware datetime with no conversion of date " +"and time data." msgstr "" "Renvoie un *datetime* avec les mêmes attributs, exceptés ceux dont de " "nouvelles valeurs sont données par les arguments nommés correspondant. " "Notez que ``tzinfo=None`` peut être spécifié pour créer un *datetime* naïf " "depuis un *datetime* avisé sans conversion de la date ou de l'heure." -#: library/datetime.rst:1323 +#: library/datetime.rst:1400 msgid "" -":class:`.datetime` objects are also supported by generic function :func:" -"`copy.replace`." +":class:`.datetime` objects are also supported by generic " +"function :func:`copy.replace`." msgstr "" -#: library/datetime.rst:1332 +#: library/datetime.rst:1409 msgid "" "Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " "adjusting the date and time data so the result is the same UTC time as " @@ -2072,19 +2149,19 @@ msgstr "" "valant *tz*, ajustant la date et l'heure pour que le résultat soit le même " "temps UTC que *self*, mais dans le temps local au fuseau *tz*." -#: library/datetime.rst:1336 +#: library/datetime.rst:1413 #, fuzzy msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " "its :meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If " "*self* is naive, it is presumed to represent time in the system time zone." msgstr "" -"S'il est fourni, *tz* doit être une instance d'une sous-classe de :class:" -"`tzinfo`, et ses méthodes :meth:`utcoffset` et :meth:`dst` ne doivent pas " -"renvoyer ``None``. Si *self* est naïf, Python considère que le temps est " -"exprimé dans le fuseau horaire du système." +"S'il est fourni, *tz* doit être une instance d'une sous-classe " +"de :class:`tzinfo`, et ses méthodes :meth:`utcoffset` et :meth:`dst` ne " +"doivent pas renvoyer ``None``. Si *self* est naïf, Python considère que le " +"temps est exprimé dans le fuseau horaire du système." -#: library/datetime.rst:1340 +#: library/datetime.rst:1417 #, fuzzy msgid "" "If called without arguments (or with ``tz=None``) the system local time zone " @@ -2094,10 +2171,11 @@ msgid "" msgstr "" "Si appelé sans arguments (ou si ``tz=None``) le fuseau horaire local du " "système est utilisé comme fuseau horaire cible. L'attribut ``.tzinfo`` de " -"l'instance *datetime* convertie aura pour valeur une instance de :class:" -"`timezone` avec le nom de fuseau et le décalage obtenus depuis l'OS." +"l'instance *datetime* convertie aura pour valeur une instance " +"de :class:`timezone` avec le nom de fuseau et le décalage obtenus depuis " +"l'OS." -#: library/datetime.rst:1345 +#: library/datetime.rst:1422 #, fuzzy msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " @@ -2112,37 +2190,37 @@ msgstr "" "après ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` aura les " "mêmes données de date et d'heure que ``dt - dt.utcoffset()``." -#: library/datetime.rst:1351 +#: library/datetime.rst:1428 #, fuzzy msgid "" "If you merely want to attach a :class:`timezone` object *tz* to a datetime " -"*dt* without adjustment of date and time data, use ``dt." -"replace(tzinfo=tz)``. If you merely want to remove the :class:`!timezone` " -"object from an aware datetime *dt* without conversion of date and time data, " -"use ``dt.replace(tzinfo=None)``." +"*dt* without adjustment of date and time data, use " +"``dt.replace(tzinfo=tz)``. If you merely want to remove the :class:`!" +"timezone` object from an aware datetime *dt* without conversion of date and " +"time data, use ``dt.replace(tzinfo=None)``." msgstr "" "Si vous voulez seulement associer un fuseau horaire *tz* à un *datetime* " -"*dt* sans ajustement des données de date et d'heure, utilisez ``dt." -"replace(tzinfo=tz)``. Si vous voulez seulement supprimer le fuseau horaire " -"d'un *datetime* *dt* avisé sans conversion des données de date et d'heure, " -"utilisez ``dt.replace(tzinfo=None)``." +"*dt* sans ajustement des données de date et d'heure, utilisez " +"``dt.replace(tzinfo=tz)``. Si vous voulez seulement supprimer le fuseau " +"horaire d'un *datetime* *dt* avisé sans conversion des données de date et " +"d'heure, utilisez ``dt.replace(tzinfo=None)``." -#: library/datetime.rst:1356 +#: library/datetime.rst:1433 msgid "" -"Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" -"class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " -"Ignoring error cases, :meth:`astimezone` acts like::" +"Note that the default :meth:`tzinfo.fromutc` method can be overridden in " +"a :class:`tzinfo` subclass to affect the result returned " +"by :meth:`astimezone`. Ignoring error cases, :meth:`astimezone` acts like::" msgstr "" "Notez que la méthode par défaut :meth:`tzinfo.fromutc` peut être redéfinie " -"dans une sous-classe :class:`tzinfo` pour affecter le résultat renvoyé par :" -"meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " +"dans une sous-classe :class:`tzinfo` pour affecter le résultat renvoyé " +"par :meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " "comporte comme ::" -#: library/datetime.rst:1368 +#: library/datetime.rst:1445 msgid "*tz* now can be omitted." msgstr "*tz* peut maintenant être omis." -#: library/datetime.rst:1371 +#: library/datetime.rst:1448 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." @@ -2150,102 +2228,104 @@ msgstr "" "La méthode :meth:`astimezone` peut maintenant être appelée sur des instances " "naïves qui sont supposées représenter un temps local au système." -#: library/datetime.rst:1378 +#: library/datetime.rst:1455 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"utcoffset(self)``, and raises an exception if the latter doesn't return " -"``None`` or a :class:`timedelta` object with magnitude less than one day." +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.utcoffset(self)``, and raises an exception if the latter " +"doesn't return ``None`` or a :class:`timedelta` object with magnitude less " +"than one day." msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.utcoffset(self)``, et lève une exception si l'expression précédente " -"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " -"inférieure à un jour." +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.utcoffset(self)``, et lève une exception si l'expression " +"précédente ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une " +"magnitude inférieure à un jour." -#: library/datetime.rst:1977 library/datetime.rst:2329 -#: library/datetime.rst:2653 +#: library/datetime.rst:2081 library/datetime.rst:2443 +#: library/datetime.rst:2852 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "Le décalage UTC peut aussi être autre chose qu'un ensemble de minutes." -#: library/datetime.rst:1388 +#: library/datetime.rst:1465 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"dst(self)``, and raises an exception if the latter doesn't return ``None`` " -"or a :class:`timedelta` object with magnitude less than one day." +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.dst(self)``, and raises an exception if the latter doesn't " +"return ``None`` or a :class:`timedelta` object with magnitude less than one " +"day." msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.dst(self)``, et lève une exception si l'expression précédente ne " -"renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.dst(self)``, et lève une exception si l'expression précédente " +"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1987 library/datetime.rst:2138 +#: library/datetime.rst:2091 library/datetime.rst:2248 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "Le décalage DST n'est pas restreint à des minutes entières." -#: library/datetime.rst:1398 +#: library/datetime.rst:1475 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"tzname(self)``, raises an exception if the latter doesn't return ``None`` or " -"a string object," +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.tzname(self)``, raises an exception if the latter doesn't " +"return ``None`` or a string object," msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.tzname(self)``, lève une exception si l'expression précédente ne " -"renvoie pas ``None`` ou une chaîne de caractères," +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.tzname(self)``, lève une exception si l'expression précédente " +"ne renvoie pas ``None`` ou une chaîne de caractères," -#: library/datetime.rst:1413 +#: library/datetime.rst:1490 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " -"day number within the current year starting with 1 for January 1st. The :" -"attr:`~time.struct_time.tm_isdst` flag of the result is set according to " -"the :meth:`dst` method: :attr:`.tzinfo` is ``None`` or :meth:`dst` returns " -"``None``, :attr:`!tm_isdst` is set to ``-1``; else if :meth:`dst` returns a " -"non-zero value, :attr:`!tm_isdst` is set to 1; else :attr:`!tm_isdst` is set " -"to 0." +"day number within the current year starting with 1 for January 1st. " +"The :attr:`~time.struct_time.tm_isdst` flag of the result is set according " +"to the :meth:`dst` method: :attr:`.tzinfo` is ``None`` or :meth:`dst` " +"returns ``None``, :attr:`!tm_isdst` is set to ``-1``; else if :meth:`dst` " +"returns a non-zero value, :attr:`!tm_isdst` is set to 1; else :attr:`!" +"tm_isdst` is set to 0." msgstr "" "où ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le " -"numéro de jour dans l'année courante commençant avec ``1`` pour le 1\\ :sup:" -"`er` janvier. L'option :attr:`tm_isdist` du résultat est attribuée selon la " -"méthode :meth:`dst` : si :attr:`.tzinfo` est ``None`` ou :meth:`dst` " -"renvoie ``None``, :attr:`tm_isdst` est mise à ``-1`` ; sinon, si :meth:`dst` " -"renvoie une valeur non nulle, :attr:`tm_isdst` est mise à ``1`` ; sinon :" -"attr:`tm_isdst` est mise à ``0``." - -#: library/datetime.rst:1424 +"numéro de jour dans l'année courante commençant avec ``1`` pour le " +"1\\ :sup:`er` janvier. L'option :attr:`tm_isdist` du résultat est attribuée " +"selon la méthode :meth:`dst` : si :attr:`.tzinfo` est ``None`` " +"ou :meth:`dst` renvoie ``None``, :attr:`tm_isdst` est mise à ``-1`` ; " +"sinon, si :meth:`dst` renvoie une valeur non nulle, :attr:`tm_isdst` est " +"mise à ``1`` ; sinon :attr:`tm_isdst` est mise à ``0``." + +#: library/datetime.rst:1501 #, fuzzy msgid "" -"If :class:`.datetime` instance ``d`` is naive, this is the same as ``d." -"timetuple()`` except that :attr:`~.time.struct_time.tm_isdst` is forced to 0 " -"regardless of what ``d.dst()`` returns. DST is never in effect for a UTC " -"time." +"If :class:`.datetime` instance ``d`` is naive, this is the same as " +"``d.timetuple()`` except that :attr:`~.time.struct_time.tm_isdst` is forced " +"to 0 regardless of what ``d.dst()`` returns. DST is never in effect for a " +"UTC time." msgstr "" -"Si l'instance de :class:`.datetime` *d* est naïve, cela est équivalent à ``d." -"timetuple()``, excepté que :attr:`tm_isdst` est forcé à 0 sans tenir compte " -"de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective pour un " -"temps UTC." +"Si l'instance de :class:`.datetime` *d* est naïve, cela est équivalent à " +"``d.timetuple()``, excepté que :attr:`tm_isdst` est forcé à 0 sans tenir " +"compte de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective " +"pour un temps UTC." -#: library/datetime.rst:1428 +#: library/datetime.rst:1505 #, fuzzy msgid "" -"If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting ``d." -"utcoffset()``, and a :class:`time.struct_time` for the normalized time is " -"returned. :attr:`!tm_isdst` is forced to 0. Note that an :exc:" -"`OverflowError` may be raised if ``d.year`` was ``MINYEAR`` or ``MAXYEAR`` " -"and UTC adjustment spills over a year boundary." +"If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting " +"``d.utcoffset()``, and a :class:`time.struct_time` for the normalized time " +"is returned. :attr:`!tm_isdst` is forced to 0. Note that " +"an :exc:`OverflowError` may be raised if ``d.year`` was ``MINYEAR`` or " +"``MAXYEAR`` and UTC adjustment spills over a year boundary." msgstr "" -"Si *d* est avisé, il est normalisé vers un temps UTC, en lui soustrayant ``d." -"utcoffset()``, et un :class:`time.struct_time` est renvoyé pour le temps " -"normalisé. :attr:`tm_isdst` est forcé à 0. Notez qu'une :exc:" -"`OverflowError` peut être levée si *d.year* vaut ``MINYEAR`` ou ``MAXYEAR`` " -"et que l'ajustement UTC fait déborder la limite de l'année." +"Si *d* est avisé, il est normalisé vers un temps UTC, en lui soustrayant " +"``d.utcoffset()``, et un :class:`time.struct_time` est renvoyé pour le temps " +"normalisé. :attr:`tm_isdst` est forcé à 0. Notez " +"qu'une :exc:`OverflowError` peut être levée si *d.year* vaut ``MINYEAR`` ou " +"``MAXYEAR`` et que l'ajustement UTC fait déborder la limite de l'année." -#: library/datetime.rst:1437 +#: library/datetime.rst:1514 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " "UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading " -"results. If you have a naive ``datetime`` representing UTC, use ``datetime." -"replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :" -"meth:`.datetime.timetuple`." +"results. If you have a naive ``datetime`` representing UTC, use " +"``datetime.replace(tzinfo=timezone.utc)`` to make it aware, at which point " +"you can use :meth:`.datetime.timetuple`." msgstr "" "Comme les objets ``datetime`` naïfs sont traités par de nombreuses méthodes " "``datetime`` comme des heures locales, il est préférable d'utiliser les " @@ -2255,33 +2335,32 @@ msgstr "" "UTC, utilisez ``datetime.replace(tzinfo=timezone.utc)`` pour la rendre " "avisée, puis vous pouvez utiliser :meth:`.datetime.timetuple`." -#: library/datetime.rst:1446 +#: library/datetime.rst:1524 msgid "" -"Return the proleptic Gregorian ordinal of the date. The same as ``self." -"date().toordinal()``." +"Return the proleptic Gregorian ordinal of the date. The same as " +"``self.date().toordinal()``." msgstr "" "Renvoie l'ordinal du calendrier grégorien proleptique de cette date. " "Identique à ``self.date().toordinal()``." -#: library/datetime.rst:1451 +#: library/datetime.rst:1530 msgid "" "Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " -"return value is a :class:`float` similar to that returned by :func:`time." -"time`." +"return value is a :class:`float` similar to that returned " +"by :func:`time.time`." msgstr "" "Renvoie l'horodatage *POSIX* correspondant à l'instance :class:`.datetime`. " -"La valeur renvoyée est un :class:`float` similaire à ceux renvoyés par :func:" -"`time.time`." +"La valeur renvoyée est un :class:`float` similaire à ceux renvoyés " +"par :func:`time.time`." -#: library/datetime.rst:1455 +#: library/datetime.rst:1534 #, fuzzy msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " -"this method relies on the platform C :c:func:`mktime` function to perform " -"the conversion. Since :class:`.datetime` supports wider range of values " -"than :c:func:`mktime` on many platforms, this method may raise :exc:" -"`OverflowError` or :exc:`OSError` for times far in the past or far in the " -"future." +"this method relies on platform C functions to perform the conversion. " +"Since :class:`!datetime` supports a wider range of values than the platform " +"C functions on many platforms, this method may raise :exc:`OverflowError` " +"or :exc:`OSError` for times far in the past or far in the future." msgstr "" "Les instances naïves de :class:`.datetime` sont supposées représenter un " "temps local et cette méthode se base sur la fonction C :c:func:`mktime` de " @@ -2290,28 +2369,20 @@ msgstr "" "plateformes, cette méthode peut lever une :exc:`OverflowError` pour les " "temps trop éloignés dans le passé ou le futur." -#: library/datetime.rst:1462 +#: library/datetime.rst:1541 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" "Pour les instances :class:`.datetime` avisées, la valeur renvoyée est " "calculée comme suit ::" -#: library/datetime.rst:1469 -msgid "" -"The :meth:`timestamp` method uses the :attr:`.fold` attribute to " -"disambiguate the times during a repeated interval." -msgstr "" -"La méthode :meth:`timestamp` utilise l'attribut :attr:`.fold` pour " -"désambiguïser le temps dans un intervalle répété." - -#: library/datetime.rst:1475 +#: library/datetime.rst:1548 #, fuzzy msgid "" -"There is no method to obtain the POSIX timestamp directly from a naive :" -"class:`.datetime` instance representing UTC time. If your application uses " -"this convention and your system time zone is not set to UTC, you can obtain " -"the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" +"There is no method to obtain the POSIX timestamp directly from a " +"naive :class:`.datetime` instance representing UTC time. If your application " +"uses this convention and your system time zone is not set to UTC, you can " +"obtain the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" msgstr "" "Il n'y a pas de méthode pour obtenir l'horodatage (*timestamp* en anglais) " "*POSIX* directement depuis une instance :class:`.datetime` naïve " @@ -2319,30 +2390,44 @@ msgstr "" "que le fuseau horaire de votre système n'est pas réglé sur UTC, vous pouvez " "obtenir l'horodatage *POSIX* en fournissant ``tzinfo=timezone.utc`` ::" -#: library/datetime.rst:1483 +#: library/datetime.rst:1556 msgid "or by calculating the timestamp directly::" msgstr "ou en calculant l'horodatage (*timestamp* en anglais) directement ::" -#: library/datetime.rst:1489 +#: library/datetime.rst:1562 +msgid "" +"The :meth:`timestamp` method uses the :attr:`.fold` attribute to " +"disambiguate the times during a repeated interval." +msgstr "" +"La méthode :meth:`timestamp` utilise l'attribut :attr:`.fold` pour " +"désambiguïser le temps dans un intervalle répété." + +#: library/datetime.rst:1566 +msgid "" +"This method no longer relies on the platform C :c:func:`mktime` function to " +"perform conversions." +msgstr "" + +#: library/datetime.rst:1573 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "The same as ``self.date().weekday()``. See also :meth:`isoweekday`." msgstr "" "Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 0 et " -"dimanche vaut 6. Identique à ``self.date().weekday()``. Voir aussi :meth:" -"`isoweekday`." +"dimanche vaut 6. Identique à ``self.date().weekday()``. Voir " +"aussi :meth:`isoweekday`." -#: library/datetime.rst:1495 +#: library/datetime.rst:1579 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " -"The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" -"`isocalendar`." +"The same as ``self.date().isoweekday()``. See " +"also :meth:`weekday`, :meth:`isocalendar`." msgstr "" "Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 1 et " -"dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir aussi :meth:" -"`weekday`, :meth:`isocalendar`." +"dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir " +"aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:1502 +#: library/datetime.rst:1586 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." @@ -2350,20 +2435,20 @@ msgstr "" "Renvoie un :term:`n-uplet nommé` de 3 éléments : ``year``, " "``week`` et ``weekday``. Identique à ``self.date().isocalendar()``." -#: library/datetime.rst:1508 +#: library/datetime.rst:1592 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" "Renvoie une chaîne représentant la date et l'heure au format ISO 8601 :" -#: library/datetime.rst:1510 +#: library/datetime.rst:1594 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``YYYY-MM-DDTHH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1511 +#: library/datetime.rst:1595 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``YYYY-MM-DDTHH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1513 +#: library/datetime.rst:1597 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" @@ -2371,7 +2456,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, une chaîne est ajoutée, " "donnant le décalage UTC :" -#: library/datetime.rst:1516 +#: library/datetime.rst:1600 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" @@ -2379,13 +2464,13 @@ msgstr "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " "ne vaut pas 0" -#: library/datetime.rst:1518 +#: library/datetime.rst:1602 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1528 +#: library/datetime.rst:1612 msgid "" "The optional argument *sep* (default ``'T'``) is a one-character separator, " "placed between the date and time portions of the result. For example::" @@ -2394,7 +2479,7 @@ msgstr "" "caractère, placé entre les portions du résultat correspondant à la date et à " "l'heure. Par exemple ::" -#: library/datetime.rst:1917 +#: library/datetime.rst:2021 msgid "" "The optional argument *timespec* specifies the number of additional " "components of the time to include (the default is ``'auto'``). It can be one " @@ -2404,7 +2489,7 @@ msgstr "" "additionnels de temps à inclure (par défaut ``'auto'``). Il peut valoir " "l'une des valeurs suivantes :" -#: library/datetime.rst:1921 +#: library/datetime.rst:2025 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." @@ -2412,17 +2497,17 @@ msgstr "" "``'auto'`` : Identique à ``'seconds'`` si :attr:`microsecond` vaut 0, à " "``'microseconds'`` sinon." -#: library/datetime.rst:1923 +#: library/datetime.rst:2027 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "``'hours'`` : Inclut :attr:`hour` au format à deux chiffres ``HH``." -#: library/datetime.rst:1924 +#: library/datetime.rst:2028 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" "``'minutes'`` : Inclut :attr:`hour` et :attr:`minute` au format ``HH:MM``." -#: library/datetime.rst:1925 +#: library/datetime.rst:2029 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." @@ -2430,7 +2515,7 @@ msgstr "" "``'seconds'`` : Inclut :attr:`hour`, :attr:`minute` et :attr:`second` au " "format ``HH:MM:SS``." -#: library/datetime.rst:1927 +#: library/datetime.rst:2031 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." @@ -2438,39 +2523,39 @@ msgstr "" "``'milliseconds'`` : Inclut le temps complet, mais tronque la partie " "fractionnaire des millisecondes, au format ``HH:MM:SS.sss``." -#: library/datetime.rst:1929 +#: library/datetime.rst:2033 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" "``'microseconds'`` : Inclut le temps complet, au format ``HH:MM:SS.ffffff``." -#: library/datetime.rst:1933 +#: library/datetime.rst:2037 msgid "Excluded time components are truncated, not rounded." msgstr "Les composants de temps exclus sont tronqués et non arrondis." -#: library/datetime.rst:1560 +#: library/datetime.rst:1644 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr "" "Une :exc:`ValueError` est levée en cas d'argument *timespec* invalide ::" -#: library/datetime.rst:1948 +#: library/datetime.rst:2052 #, fuzzy msgid "Added the *timespec* parameter." msgstr "Ajout de l'argument *timespec*." -#: library/datetime.rst:1576 +#: library/datetime.rst:1660 #, fuzzy msgid "" -"For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to ``d." -"isoformat(' ')``." +"For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to " +"``d.isoformat(' ')``." msgstr "" -"Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à ``d." -"isoformat(' ')``." +"Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à " +"``d.isoformat(' ')``." -#: library/datetime.rst:1582 +#: library/datetime.rst:1666 msgid "Return a string representing the date and time::" msgstr "Renvoie une chaîne représentant la date et l'heure ::" -#: library/datetime.rst:1588 +#: library/datetime.rst:1672 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." @@ -2478,47 +2563,49 @@ msgstr "" "La chaîne de caractères en sortie n'inclura *pas* d'informations sur le " "fuseau horaire, que l'entrée soit avisée ou naïve." -#: library/datetime.rst:1595 +#: library/datetime.rst:1679 msgid "" -"on platforms where the native C :c:func:`ctime` function (which :func:`time." -"ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " -"to the C standard." +"on platforms where the native C :c:func:`ctime` function " +"(which :func:`time.ctime` invokes, but which :meth:`datetime.ctime` does not " +"invoke) conforms to the C standard." msgstr "" -"sur les plateformes où la fonction C native :c:func:`ctime` (que :func:`time." -"ctime` invoque, mais pas :meth:`datetime.ctime`) est conforme au standard C." +"sur les plateformes où la fonction C native :c:func:`ctime` " +"(que :func:`time.ctime` invoque, mais pas :meth:`datetime.ctime`) est " +"conforme au standard C." -#: library/datetime.rst:1602 +#: library/datetime.rst:1686 msgid "" "Return a string representing the date and time, controlled by an explicit " -"format string. See also :ref:`strftime-strptime-behavior` and :meth:" -"`datetime.isoformat`." +"format string. See also :ref:`strftime-strptime-behavior` " +"and :meth:`datetime.isoformat`." msgstr "" "Renvoie une chaîne représentant la date et l'heure, contrôlée par une chaîne " -"de format explicite. Voir :ref:`strftime-strptime-behavior` et :meth:" -"`datetime.isoformat`." +"de format explicite. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`datetime.isoformat`." -#: library/datetime.rst:1609 +#: library/datetime.rst:1693 msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " "format string for a :class:`.datetime` object in :ref:`formatted string " -"literals ` and when using :meth:`str.format`. See also :ref:" -"`strftime-strptime-behavior` and :meth:`datetime.isoformat`." +"literals ` and when using :meth:`str.format`. See " +"also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`." msgstr "" "Identique à :meth:`.datetime.strftime`. Cela permet de spécifier une chaîne " "de format pour un objet :class:`.datetime` dans une :ref:`chaîne de " -"formatage littérale ` et en utilisant :meth:`str.format`. Voir :" -"ref:`strftime-strptime-behavior` et :meth:`datetime.isoformat`." +"formatage littérale ` et en utilisant :meth:`str.format`. " +"Voir :ref:`strftime-strptime-behavior` et :meth:`datetime.isoformat`." -#: library/datetime.rst:1616 -msgid "Examples of Usage: :class:`.datetime`" +#: library/datetime.rst:1700 +#, fuzzy +msgid "Examples of usage: :class:`!datetime`" msgstr "Exemple d'utilisation de la classe :class:`.datetime` :" -#: library/datetime.rst:1618 +#: library/datetime.rst:1702 #, fuzzy msgid "Examples of working with :class:`.datetime` objects:" msgstr "Exemples d'utilisation de l'objet :class:`.time` ::" -#: library/datetime.rst:1671 +#: library/datetime.rst:1755 msgid "" "The example below defines a :class:`tzinfo` subclass capturing time zone " "information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " @@ -2528,35 +2615,36 @@ msgstr "" "des informations sur les fuseaux horaires pour Kaboul, en Afghanistan, qui a " "utilisé +4 UTC jusqu'en 1945, puis +4:30 UTC par la suite ::" -#: library/datetime.rst:1718 +#: library/datetime.rst:1802 msgid "Usage of ``KabulTz`` from above::" msgstr "Utilisation de ``KabulTz`` cité plus haut ::" -#: library/datetime.rst:1744 -msgid ":class:`.time` Objects" +#: library/datetime.rst:1829 +#, fuzzy +msgid ":class:`!time` objects" msgstr "Objets :class:`.time`" -#: library/datetime.rst:1746 +#: library/datetime.rst:1831 #, fuzzy msgid "" "A :class:`.time` object represents a (local) time of day, independent of any " "particular day, and subject to adjustment via a :class:`tzinfo` object." msgstr "" "Un objet :class:`time` représente une heure (locale) du jour, indépendante " -"de tout jour particulier, et sujette à des ajustements par un objet :class:" -"`tzinfo`." +"de tout jour particulier, et sujette à des ajustements par un " +"objet :class:`tzinfo`." -#: library/datetime.rst:1751 +#: library/datetime.rst:1836 msgid "" -"All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" -"class:`tzinfo` subclass. The remaining arguments must be integers in the " +"All arguments are optional. *tzinfo* may be ``None``, or an instance of " +"a :class:`tzinfo` subclass. The remaining arguments must be integers in the " "following ranges:" msgstr "" "Tous les arguments sont optionnels. *tzinfo* peut être ``None`` ou une " "instance d'une sous-classe :class:`tzinfo`. Les autres arguments doivent " "être des nombres entiers, dans les intervalles suivants :" -#: library/datetime.rst:1761 +#: library/datetime.rst:1846 #, fuzzy msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " @@ -2566,28 +2654,28 @@ msgstr "" "levée. Ils valent tous ``0`` par défaut, à l'exception de *tzinfo* qui " "vaut :const:`None`." -#: library/datetime.rst:1769 +#: library/datetime.rst:1855 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "" "Le plus petit objet :class:`.time` représentable, ``time(0, 0, 0, 0)``." -#: library/datetime.rst:1774 +#: library/datetime.rst:1860 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "" "Le plus grand objet :class:`.time` représentable, ``time(23, 59, 59, " "999999)``." -#: library/datetime.rst:1779 +#: library/datetime.rst:1865 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " -"``timedelta(microseconds=1)``, although note that arithmetic on :class:`." -"time` objects is not supported." +"``timedelta(microseconds=1)``, although note that arithmetic " +"on :class:`.time` objects is not supported." msgstr "" "La plus petite différence possible entre deux objets :class:`.time` non-" -"égaux, ``timedelta(microseconds=1)``, notez cependant que les objets :class:" -"`.time` n'implémentent pas d'opérations arithmétiques." +"égaux, ``timedelta(microseconds=1)``, notez cependant que les " +"objets :class:`.time` n'implémentent pas d'opérations arithmétiques." -#: library/datetime.rst:1808 +#: library/datetime.rst:1894 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." @@ -2595,19 +2683,19 @@ msgstr "" "L'objet passé comme argument *tzinfo* au constructeur de :class:`.time`, ou " "``None`` si aucune valeur n'a été passée." -#: library/datetime.rst:1822 +#: library/datetime.rst:1909 msgid "" ":class:`.time` objects support equality and order comparisons, where ``a`` " "is considered less than ``b`` when ``a`` precedes ``b`` in time." msgstr "" -#: library/datetime.rst:1825 +#: library/datetime.rst:1912 msgid "" "Naive and aware :class:`!time` objects are never equal. Order comparison " "between naive and aware :class:`!time` objects raises :exc:`TypeError`." msgstr "" -#: library/datetime.rst:1829 +#: library/datetime.rst:1916 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~.time.tzinfo` " @@ -2616,14 +2704,15 @@ msgid "" "different :attr:`!tzinfo` attributes, the comparands are first adjusted by " "subtracting their UTC offsets (obtained from ``self.utcoffset()``)." msgstr "" -"Si les deux opérandes sont avisés, et ont le même attribut :attr:`~.datetime." -"tzinfo`, l'attribut commun :attr:`~.datetime.tzinfo` est ignoré et les " -"*datetimes* de base sont comparés. Si les deux opérandes sont avisés et ont " -"des attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " +"Si les deux opérandes sont avisés, et ont le même " +"attribut :attr:`~.datetime.tzinfo`, l'attribut " +"commun :attr:`~.datetime.tzinfo` est ignoré et les *datetimes* de base sont " +"comparés. Si les deux opérandes sont avisés et ont des " +"attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1835 +#: library/datetime.rst:1922 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`.time` instances don't " @@ -2632,30 +2721,32 @@ msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas d'exception :exc:`TypeError`." -#: library/datetime.rst:1839 +#: library/datetime.rst:1926 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" "Dans un contexte booléen, un objet :class:`.time` est toujours considéré " "comme vrai." -#: library/datetime.rst:1841 +#: library/datetime.rst:1928 +#, fuzzy msgid "" "Before Python 3.5, a :class:`.time` object was considered to be false if it " "represented midnight in UTC. This behavior was considered obscure and error-" -"prone and has been removed in Python 3.5. See :issue:`13936` for full " -"details." +"prone and has been removed in Python 3.5. See :issue:`13936` for more " +"information." msgstr "" "Avant Python 3.5, un objet :class:`.time` était considéré comme faux s'il " "représentait minuit en UTC. Ce comportement était considéré comme obscur et " "propice aux erreurs, il a été supprimé en Python 3.5. Voir :issue:`13936` " "pour les détails complets." -#: library/datetime.rst:1848 -msgid "Other constructor:" +#: library/datetime.rst:1935 +#, fuzzy +msgid "Other constructors:" msgstr "Autre constructeur :" -#: library/datetime.rst:1852 +#: library/datetime.rst:1939 msgid "" "Return a :class:`.time` corresponding to a *time_string* in any valid ISO " "8601 format, with the following exceptions:" @@ -2663,7 +2754,7 @@ msgstr "" "Renvoie une :class:`.time` correspondant à *time_string* dans un format ISO " "8601 valide, avec les exceptions suivantes :" -#: library/datetime.rst:1856 +#: library/datetime.rst:1943 msgid "" "The leading ``T``, normally required in cases where there may be ambiguity " "between a date and a time, is not required." @@ -2671,7 +2762,7 @@ msgstr "" "Le ``T`` initial, normalement requis dans les cas où il peut y avoir une " "ambiguïté entre une date et une heure, n'est pas nécessaire." -#: library/datetime.rst:1858 +#: library/datetime.rst:1945 msgid "" "Fractional seconds may have any number of digits (anything beyond 6 will be " "truncated)." @@ -2679,26 +2770,58 @@ msgstr "" "Les fractions de secondes peuvent avoir un nombre quelconque de décimales " "(tout ce qui dépasse 6 décimales sera tronqué)." -#: library/datetime.rst:1862 +#: library/datetime.rst:1949 #, fuzzy msgid "Examples:" msgstr "Exemples ::" -#: library/datetime.rst:1886 +#: library/datetime.rst:1973 +#, fuzzy +msgid "" +"Previously, this method only supported formats that could be emitted " +"by :meth:`time.isoformat`." +msgstr "" +"Auparavant, cette méthode ne prenait en charge que les formats émis " +"par :meth:`time.isoformat()`." + +#: library/datetime.rst:1980 +#, fuzzy +msgid "" +"Return a :class:`.time` corresponding to *date_string*, parsed according to " +"*format*." +msgstr "" +"Renvoie une classe :class:`.datetime` correspondant à *date_string*, " +"analysée selon *format*." + +#: library/datetime.rst:1983 +#, fuzzy +msgid "" +"If *format* does not contain microseconds or timezone information, this is " +"equivalent to::" +msgstr "" +"Si *format* ne contient pas de microsecondes ou d'informations sur le fuseau " +"horaire, cela équivaut à ::" + +#: library/datetime.rst:1987 #, fuzzy msgid "" -"Previously, this method only supported formats that could be emitted by :" -"meth:`time.isoformat`." +":exc:`ValueError` is raised if the *date_string* and *format* cannot be " +"parsed by :func:`time.strptime` or if it returns a value which is not a time " +"tuple. See also :ref:`strftime-strptime-behavior` " +"and :meth:`time.fromisoformat`." msgstr "" -"Auparavant, cette méthode ne prenait en charge que les formats émis par :" -"meth:`time.isoformat()`." +"Une :exc:`ValueError` est levée si *date_string* et *format* ne peuvent être " +"analysés par :func:`time.strptime` ou si elle renvoie une valeur qui n'est " +"pas un *n*-uplet de temps. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`datetime.fromisoformat`." -#: library/datetime.rst:1896 +#: library/datetime.rst:2000 +#, fuzzy msgid "" -"Return a :class:`.time` with the same value, except for those attributes " -"given new values by whichever keyword arguments are specified. Note that " -"``tzinfo=None`` can be specified to create a naive :class:`.time` from an " -"aware :class:`.time`, without conversion of the time data." +"Return a new :class:`.time` with the same values, but with specified " +"parameters updated. Note that ``tzinfo=None`` can be specified to create a " +"naive :class:`!time` from an aware :class:`!time`, without conversion of the " +"time data." msgstr "" "Renvoie un objet :class:`.time` avec la même valeur, à l'exception des " "attributs dont les nouvelles valeurs sont spécifiées par les arguments " @@ -2706,25 +2829,25 @@ msgstr "" "instance :class:`.time` naïve à partir d'une instance :class:`.time` avisée, " "sans conversion des données de temps." -#: library/datetime.rst:1901 +#: library/datetime.rst:2005 msgid "" -":class:`.time` objects are also supported by generic function :func:`copy." -"replace`." +":class:`.time` objects are also supported by generic " +"function :func:`copy.replace`." msgstr "" -#: library/datetime.rst:1910 +#: library/datetime.rst:2014 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "Renvoie une chaîne représentant la date au format ISO 8601 :" -#: library/datetime.rst:1912 +#: library/datetime.rst:2016 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``HH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1913 +#: library/datetime.rst:2017 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``HH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1914 +#: library/datetime.rst:2018 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" @@ -2732,35 +2855,35 @@ msgstr "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` ne renvoie pas " "``None``" -#: library/datetime.rst:1915 +#: library/datetime.rst:2019 msgid "" -"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" -"`utcoffset` does not return ``None``" +"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 " +"and :meth:`utcoffset` does not return ``None``" msgstr "" -"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 et :meth:" -"`utcoffset` ne renvoie pas ``None``" +"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 " +"et :meth:`utcoffset` ne renvoie pas ``None``" -#: library/datetime.rst:1935 +#: library/datetime.rst:2039 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr "" "Une :exc:`ValueError` sera levée en cas d'argument *timespec* invalide." -#: library/datetime.rst:1954 +#: library/datetime.rst:2058 #, fuzzy msgid "For a time ``t``, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "Pour un temps *t*, ``str(t)`` est équivalent à ``t.isoformat()``." -#: library/datetime.rst:1959 +#: library/datetime.rst:2063 msgid "" "Return a string representing the time, controlled by an explicit format " -"string. See also :ref:`strftime-strptime-behavior` and :meth:`time." -"isoformat`." +"string. See also :ref:`strftime-strptime-behavior` " +"and :meth:`time.isoformat`." msgstr "" "Renvoie une chaîne représentant l'heure, contrôlée par une chaîne de " -"formatage explicite. Voir :ref:`strftime-strptime-behavior` et :meth:`time." -"isoformat`." +"formatage explicite. Voir :ref:`strftime-strptime-behavior` " +"et :meth:`time.isoformat`." -#: library/datetime.rst:1965 +#: library/datetime.rst:2069 msgid "" "Same as :meth:`.time.strftime`. This makes it possible to specify a format " "string for a :class:`.time` object in :ref:`formatted string literals ` et à l'utilisation de :meth:`str.format`. Voir :ref:" -"`strftime-strptime-behavior` et :meth:`time.isoformat`." +"littérale ` et à l'utilisation de :meth:`str.format`. " +"Voir :ref:`strftime-strptime-behavior` et :meth:`time.isoformat`." -#: library/datetime.rst:1973 +#: library/datetime.rst:2077 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"utcoffset(None)``, and raises an exception if the latter doesn't return " -"``None`` or a :class:`timedelta` object with magnitude less than one day." +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.utcoffset(None)``, and raises an exception if the latter " +"doesn't return ``None`` or a :class:`timedelta` object with magnitude less " +"than one day." msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.utcoffset(None)``, et lève une exception si l'expression précédente " -"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " -"inférieure à un jour." +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.utcoffset(None)``, et lève une exception si l'expression " +"précédente ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une " +"magnitude inférieure à un jour." -#: library/datetime.rst:1983 +#: library/datetime.rst:2087 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"dst(None)``, and raises an exception if the latter doesn't return ``None``, " -"or a :class:`timedelta` object with magnitude less than one day." +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't " +"return ``None``, or a :class:`timedelta` object with magnitude less than one " +"day." msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.dst(None)``, et lève une exception si l'expression précédente ne " -"renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.dst(None)``, et lève une exception si l'expression précédente " +"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1992 +#: library/datetime.rst:2097 msgid "" -"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." -"tzname(None)``, or raises an exception if the latter doesn't return ``None`` " -"or a string object." +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns " +"``self.tzinfo.tzname(None)``, or raises an exception if the latter doesn't " +"return ``None`` or a string object." msgstr "" -"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." -"tzinfo.tzname(None)``, et lève une exception si l'expression précédente ne " -"renvoie pas ``None`` ou une chaîne de caractères." +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie " +"``self.tzinfo.tzname(None)``, et lève une exception si l'expression " +"précédente ne renvoie pas ``None`` ou une chaîne de caractères." -#: library/datetime.rst:1997 -msgid "Examples of Usage: :class:`.time`" +#: library/datetime.rst:2103 +#, fuzzy +msgid "Examples of usage: :class:`!time`" msgstr "Exemples d'utilisation de :class:`.time`" -#: library/datetime.rst:1999 +#: library/datetime.rst:2105 msgid "Examples of working with a :class:`.time` object::" msgstr "Exemples d'utilisation de l'objet :class:`.time` ::" -#: library/datetime.rst:2030 -msgid ":class:`tzinfo` Objects" +#: library/datetime.rst:2136 +#, fuzzy +msgid ":class:`!tzinfo` objects" msgstr "Objets :class:`tzinfo`" -#: library/datetime.rst:2034 +#: library/datetime.rst:2140 +#, fuzzy msgid "" -"This is an abstract base class, meaning that this class should not be " -"instantiated directly. Define a subclass of :class:`tzinfo` to capture " +"This is an :term:`abstract base class`, meaning that this class should not " +"be instantiated directly. Define a subclass of :class:`tzinfo` to capture " "information about a particular time zone." msgstr "" -"Il s'agit d'une classe mère abstraite, ce qui signifie que cette classe ne " -"doit pas être instanciée directement. Définissez une sous-classe de :class:" -"`tzinfo` pour capturer des informations sur un fuseau horaire particulier." +"Il s'agit d'une classe abstraite, ce qui signifie que cette classe ne " +"doit pas être instanciée directement. Définissez une sous-classe " +"de :class:`tzinfo` pour capturer des informations sur un fuseau horaire " +"particulier." -#: library/datetime.rst:2038 +#: library/datetime.rst:2144 +#, fuzzy msgid "" "An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " "constructors for :class:`.datetime` and :class:`.time` objects. The latter " -"objects view their attributes as being in local time, and the :class:" -"`tzinfo` object supports methods revealing offset of local time from UTC, " -"the name of the time zone, and DST offset, all relative to a date or time " -"object passed to them." +"objects view their attributes as being in local time, and the :class:`!" +"tzinfo` object supports methods revealing offset of local time from UTC, the " +"name of the time zone, and DST offset, all relative to a date or time object " +"passed to them." msgstr "" "Une instance (d'une sous-classe concrète) de :class:`tzinfo` peut être " "passée aux constructeurs des objets :class:`.datetime` et :class:`.time`. " @@ -2842,29 +2972,29 @@ msgstr "" "temps local par rapport à UTC, le nom du fuseau horaire, le décalage d'heure " "d'été, tous relatifs à un objet de date ou d'heure qui leur est passé." -#: library/datetime.rst:2044 +#: library/datetime.rst:2150 #, fuzzy msgid "" "You need to derive a concrete subclass, and (at least) supply " -"implementations of the standard :class:`tzinfo` methods needed by the :class:" -"`.datetime` methods you use. The :mod:`!datetime` module provides :class:" -"`timezone`, a simple concrete subclass of :class:`tzinfo` which can " -"represent time zones with fixed offset from UTC such as UTC itself or North " -"American EST and EDT." +"implementations of the standard :class:`tzinfo` methods needed by " +"the :class:`.datetime` methods you use. The :mod:`!datetime` module " +"provides :class:`timezone`, a simple concrete subclass of :class:`!tzinfo` " +"which can represent time zones with fixed offset from UTC such as UTC itself " +"or North American EST and EDT." msgstr "" "Vous devez en dériver une sous-classe concrète et (au minimum) fournir des " "implémentations aux méthodes standard :class:`tzinfo` requises par les " "méthodes de :class:`.datetime` que vous utilisez. Le module :mod:`datetime` " -"fournit une simple sous-classe concrète de :class:`tzinfo`, :class:" -"`timezone`, qui peut représenter des fuseaux horaires avec des décalages " -"fixes par rapport à UTC, tels qu'UTC lui-même ou les fuseaux nord-américains " -"EST et EDT." +"fournit une simple sous-classe concrète " +"de :class:`tzinfo`, :class:`timezone`, qui peut représenter des fuseaux " +"horaires avec des décalages fixes par rapport à UTC, tels qu'UTC lui-même ou " +"les fuseaux nord-américains EST et EDT." -#: library/datetime.rst:2051 +#: library/datetime.rst:2157 #, fuzzy msgid "" -"Special requirement for pickling: A :class:`tzinfo` subclass must have an :" -"meth:`~object.__init__` method that can be called with no arguments, " +"Special requirement for pickling: A :class:`tzinfo` subclass must have " +"an :meth:`~object.__init__` method that can be called with no arguments, " "otherwise it can be pickled but possibly not unpickled again. This is a " "technical requirement that may be relaxed in the future." msgstr "" @@ -2874,19 +3004,19 @@ msgstr "" "désérialisé. C'est un prérequis technique qui pourrait être assoupli dans " "le futur." -#: library/datetime.rst:2057 +#: library/datetime.rst:2163 #, fuzzy msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " -"methods. Exactly which methods are needed depends on the uses made of aware :" -"mod:`!datetime` objects. If in doubt, simply implement all of them." +"methods. Exactly which methods are needed depends on the uses made of " +"aware :mod:`!datetime` objects. If in doubt, simply implement all of them." msgstr "" "Une sous-classe concrète de :class:`tzinfo` peut devoir implémenter les " "méthodes suivantes. Les méthodes réellement nécessaires dépendent de " "l'utilisation qui est faite des objets :mod:`datetime` avisés. Dans le " "doute, implémentez-les toutes." -#: library/datetime.rst:2064 +#: library/datetime.rst:2170 msgid "" "Return offset of local time from UTC, as a :class:`timedelta` object that is " "positive east of UTC. If local time is west of UTC, this should be negative." @@ -2895,15 +3025,16 @@ msgstr "" "objet :class:`timedelta` qui est positif à l'est de UTC. Si l'heure locale " "est à l'ouest de UTC, il doit être négatif." -#: library/datetime.rst:2067 +#: library/datetime.rst:2173 msgid "" -"This represents the *total* offset from UTC; for example, if a :class:" -"`tzinfo` object represents both time zone and DST adjustments, :meth:" -"`utcoffset` should return their sum. If the UTC offset isn't known, return " -"``None``. Else the value returned must be a :class:`timedelta` object " -"strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)`` (the " -"magnitude of the offset must be less than one day). Most implementations of :" -"meth:`utcoffset` will probably look like one of these two::" +"This represents the *total* offset from UTC; for example, if " +"a :class:`tzinfo` object represents both time zone and DST " +"adjustments, :meth:`utcoffset` should return their sum. If the UTC offset " +"isn't known, return ``None``. Else the value returned must be " +"a :class:`timedelta` object strictly between ``-timedelta(hours=24)`` and " +"``timedelta(hours=24)`` (the magnitude of the offset must be less than one " +"day). Most implementations of :meth:`utcoffset` will probably look like one " +"of these two::" msgstr "" "Cela représente le décalage *total* par rapport à UTC ; par exemple, si un " "objet :class:`tzinfo` représente à la fois un fuseau horaire et son " @@ -2911,10 +3042,10 @@ msgstr "" "Si le décalage UTC n'est pas connu, elle renvoie ``None``. Sinon, la valeur " "renvoyée doit être un objet :class:`timedelta` compris strictement entre ``-" "timedelta(hours=24)`` et ``timedelta(hours=24)`` (l'amplitude du décalage " -"doit être inférieure à un jour). La plupart des implémentations de :meth:" -"`utcoffset` ressembleront probablement à l'une des deux suivantes ::" +"doit être inférieure à un jour). La plupart des implémentations " +"de :meth:`utcoffset` ressembleront probablement à l'une des deux suivantes ::" -#: library/datetime.rst:2078 +#: library/datetime.rst:2184 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." @@ -2922,48 +3053,49 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, :meth:`dst` ne doit pas non " "plus renvoyer ``None``." -#: library/datetime.rst:2081 +#: library/datetime.rst:2187 msgid "" -"The default implementation of :meth:`utcoffset` raises :exc:" -"`NotImplementedError`." +"The default implementation of :meth:`utcoffset` " +"raises :exc:`NotImplementedError`." msgstr "" -"L'implémentation par défaut de :meth:`utcoffset` lève une :exc:" -"`NotImplementedError`." +"L'implémentation par défaut de :meth:`utcoffset` lève " +"une :exc:`NotImplementedError`." -#: library/datetime.rst:2090 +#: library/datetime.rst:2196 msgid "" "Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " "object or ``None`` if DST information isn't known." msgstr "" -"Renvoie le réglage de l'heure d'été (DST), sous la forme d'un objet :class:" -"`timedelta` ou ``None`` si l'information DST n'est pas connue." +"Renvoie le réglage de l'heure d'été (DST), sous la forme d'un " +"objet :class:`timedelta` ou ``None`` si l'information DST n'est pas connue." -#: library/datetime.rst:2094 +#: library/datetime.rst:2200 #, fuzzy msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " "the offset as a :class:`timedelta` object (see :meth:`utcoffset` for " "details). Note that DST offset, if applicable, has already been added to the " -"UTC offset returned by :meth:`utcoffset`, so there's no need to consult :" -"meth:`dst` unless you're interested in obtaining DST info separately. For " -"example, :meth:`datetime.timetuple` calls its :attr:`~.datetime.tzinfo` " -"attribute's :meth:`dst` method to determine how the :attr:`~time.struct_time." -"tm_isdst` flag should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` " -"to account for DST changes when crossing time zones." +"UTC offset returned by :meth:`utcoffset`, so there's no need to " +"consult :meth:`dst` unless you're interested in obtaining DST info " +"separately. For example, :meth:`datetime.timetuple` calls " +"its :attr:`~.datetime.tzinfo` attribute's :meth:`dst` method to determine " +"how the :attr:`~time.struct_time.tm_isdst` flag should be set, " +"and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for DST changes when " +"crossing time zones." msgstr "" "Renvoie ``timedelta(0)`` si l'heure d'été n'est pas effective. Si elle est " "effective, renvoie un décalage sous forme d'un objet :class:`timedelta` " "(voir :meth:`utcoffset` pour les détails). Notez que ce décalage, si " -"applicable, est déjà compris dans le décalage UTC renvoyé par :meth:" -"`utcoffset`, il n'est donc pas nécessaire de faire appel à :meth:`dst` à " -"moins que vous ne souhaitiez obtenir les informations séparément. Par " -"exemple, :meth:`datetime.timetuple` appelle la méthode :meth:`dst` de son " -"attribut :attr:`~.datetime.tzinfo` pour déterminer si l'option :attr:" -"`tm_isdst` doit être activée, et :meth:`tzinfo.fromutc` fait appel à :meth:" -"`dst` pour tenir compte des heures d'été quand elle traverse des fuseaux " -"horaires." +"applicable, est déjà compris dans le décalage UTC renvoyé " +"par :meth:`utcoffset`, il n'est donc pas nécessaire de faire appel " +"à :meth:`dst` à moins que vous ne souhaitiez obtenir les informations " +"séparément. Par exemple, :meth:`datetime.timetuple` appelle la " +"méthode :meth:`dst` de son attribut :attr:`~.datetime.tzinfo` pour " +"déterminer si l'option :attr:`tm_isdst` doit être activée, " +"et :meth:`tzinfo.fromutc` fait appel à :meth:`dst` pour tenir compte des " +"heures d'été quand elle traverse des fuseaux horaires." -#: library/datetime.rst:2104 +#: library/datetime.rst:2210 msgid "" "An instance *tz* of a :class:`tzinfo` subclass that models both standard and " "daylight times must be consistent in this sense:" @@ -2971,22 +3103,22 @@ msgstr "" "Une instance *tz* d'une sous-classe :class:`tzinfo` convenant à la fois pour " "une heure standard et une heure d'été doit être cohérente :" -#: library/datetime.rst:2107 +#: library/datetime.rst:2213 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" -#: library/datetime.rst:2109 +#: library/datetime.rst:2215 #, fuzzy msgid "" -"must return the same result for every :class:`.datetime` *dt* with ``dt." -"tzinfo == tz``. For sane :class:`tzinfo` subclasses, this expression yields " -"the time zone's \"standard offset\", which should not depend on the date or " -"the time, but only on geographic location. The implementation of :meth:" -"`datetime.astimezone` relies on this, but cannot detect violations; it's the " -"programmer's responsibility to ensure it. If a :class:`tzinfo` subclass " -"cannot guarantee this, it may be able to override the default implementation " -"of :meth:`tzinfo.fromutc` to work correctly with :meth:`~.datetime." -"astimezone` regardless." +"must return the same result for every :class:`.datetime` *dt* with " +"``dt.tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression " +"yields the time zone's \"standard offset\", which should not depend on the " +"date or the time, but only on geographic location. The implementation " +"of :meth:`datetime.astimezone` relies on this, but cannot detect violations; " +"it's the programmer's responsibility to ensure it. If a :class:`!tzinfo` " +"subclass cannot guarantee this, it may be able to override the default " +"implementation of :meth:`tzinfo.fromutc` to work correctly " +"with :meth:`~.datetime.astimezone` regardless." msgstr "" "doit renvoyer le même résultat pour tout objet :class:`.datetime` *dt* avec " "``dt.tzinfo == tz`` Pour les sous-classes saines de :class:`tzinfo`, cette " @@ -2994,12 +3126,12 @@ msgstr "" "pas dépendre de la date ou de l'heure, mais seulement de la position " "géographique. L'implémentation de :meth:`datetime.astimezone` se base là-" "dessus, mais ne peut pas détecter les violations ; il est de la " -"responsabilité du programmeur de l'assurer. Si une sous-classe :class:" -"`tzinfo` ne le garantit pas, il doit être possible de redéfinir " -"l'implémentation par défaut de :meth:`tzinfo.fromutc` pour tout de même " -"fonctionner correctement avec :meth:`astimezone`." +"responsabilité du programmeur de l'assurer. Si une sous-" +"classe :class:`tzinfo` ne le garantit pas, il doit être possible de " +"redéfinir l'implémentation par défaut de :meth:`tzinfo.fromutc` pour tout de " +"même fonctionner correctement avec :meth:`astimezone`." -#: library/datetime.rst:2118 +#: library/datetime.rst:2224 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" @@ -3007,18 +3139,18 @@ msgstr "" "La plupart des implémentations de :meth:`dst` ressembleront probablement à " "l'une des deux suivantes ::" -#: library/datetime.rst:2124 +#: library/datetime.rst:2232 msgid "or::" msgstr "ou ::" -#: library/datetime.rst:2136 +#: library/datetime.rst:2246 msgid "" "The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." msgstr "" -"L'implémentation par défaut de :meth:`dst` lève une :exc:" -"`NotImplementedError`." +"L'implémentation par défaut de :meth:`dst` lève " +"une :exc:`NotImplementedError`." -#: library/datetime.rst:2144 +#: library/datetime.rst:2254 #, fuzzy msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " @@ -3027,47 +3159,48 @@ msgid "" "particular. For example, ``\"GMT\"``, ``\"UTC\"``, ``\"-500\"``, " "``\"-5:00\"``, ``\"EDT\"``, ``\"US/Eastern\"``, ``\"America/New York\"`` are " "all valid replies. Return ``None`` if a string name isn't known. Note that " -"this is a method rather than a fixed string primarily because some :class:" -"`tzinfo` subclasses will wish to return different names depending on the " -"specific value of *dt* passed, especially if the :class:`tzinfo` class is " -"accounting for daylight time." +"this is a method rather than a fixed string primarily because " +"some :class:`tzinfo` subclasses will wish to return different names " +"depending on the specific value of *dt* passed, especially if the :class:`!" +"tzinfo` class is accounting for daylight time." msgstr "" "Renvoie le nom du fuseau horaire correspondant à l'objet :class:`.datetime` " -"*dt*, sous forme d'une chaîne. Rien n'est défini sur les noms par le module :" -"mod:`datetime`, et il n'est pas nécessaire que ces noms signifient quelque " -"chose en particulier. Par exemple, « *GMT* », « *UTC* », « *-500* », " -"« *-5:00* », « *EDT* », « *US/Eastern* » et « *America/New York* » sont " -"toutes des valeurs de retour valides. Renvoie ``None`` si un nom est " -"inconnu. Notez qu'il s'agit d'une méthode et non d'une chaîne fixée en " -"amont, parce que les sous-classes de :class:`tzinfo` peuvent souhaiter " +"*dt*, sous forme d'une chaîne. Rien n'est défini sur les noms par le " +"module :mod:`datetime`, et il n'est pas nécessaire que ces noms signifient " +"quelque chose en particulier. Par exemple, « *GMT* », « *UTC* », " +"« *-500* », « *-5:00* », « *EDT* », « *US/Eastern* » et « *America/New " +"York* » sont toutes des valeurs de retour valides. Renvoie ``None`` si un " +"nom est inconnu. Notez qu'il s'agit d'une méthode et non d'une chaîne fixée " +"en amont, parce que les sous-classes de :class:`tzinfo` peuvent souhaiter " "renvoyer des noms différents en fonction de valeurs de *dt* spécifiques, en " "particulier si la classe :class:`tzinfo` tient compte de l'heure d'été." -#: library/datetime.rst:2154 +#: library/datetime.rst:2264 msgid "" -"The default implementation of :meth:`tzname` raises :exc:" -"`NotImplementedError`." +"The default implementation of :meth:`tzname` " +"raises :exc:`NotImplementedError`." msgstr "" -"L'implémentation par défaut de :meth:`tzname` lève une :exc:" -"`NotImplementedError`." +"L'implémentation par défaut de :meth:`tzname` lève " +"une :exc:`NotImplementedError`." -#: library/datetime.rst:2157 +#: library/datetime.rst:2267 +#, fuzzy msgid "" "These methods are called by a :class:`.datetime` or :class:`.time` object, " -"in response to their methods of the same names. A :class:`.datetime` object " -"passes itself as the argument, and a :class:`.time` object passes ``None`` " +"in response to their methods of the same names. A :class:`!datetime` object " +"passes itself as the argument, and a :class:`!time` object passes ``None`` " "as the argument. A :class:`tzinfo` subclass's methods should therefore be " -"prepared to accept a *dt* argument of ``None``, or of class :class:`." +"prepared to accept a *dt* argument of ``None``, or of class :class:`!" "datetime`." msgstr "" -"Ces méthodes sont appelées par les objets :class:`.datetime` et :class:`." -"time`, en réponse à leurs méthodes de mêmes noms. Un objet :class:`." -"datetime` se passe lui-même en tant qu'argument, et un objet :class:`.time` " -"passe ``None``. Les méthodes des sous-classes :class:`tzinfo` doivent alors " -"être prêtes à recevoir un argument ``None`` pour *dt*, ou une instance de :" -"class:`.datetime`." +"Ces méthodes sont appelées par les objets :class:`.datetime` " +"et :class:`.time`, en réponse à leurs méthodes de mêmes noms. Un " +"objet :class:`.datetime` se passe lui-même en tant qu'argument, et un " +"objet :class:`.time` passe ``None``. Les méthodes des sous-" +"classes :class:`tzinfo` doivent alors être prêtes à recevoir un argument " +"``None`` pour *dt*, ou une instance de :class:`.datetime`." -#: library/datetime.rst:2163 +#: library/datetime.rst:2273 msgid "" "When ``None`` is passed, it's up to the class designer to decide the best " "response. For example, returning ``None`` is appropriate if the class wishes " @@ -3082,25 +3215,25 @@ msgstr "" "``utcoffset(None)`` de renvoyer le décalage UTC standard, comme il n'existe " "aucune autre convention pour obtenir ce décalage." -#: library/datetime.rst:2169 +#: library/datetime.rst:2279 #, fuzzy msgid "" -"When a :class:`.datetime` object is passed in response to a :class:`." -"datetime` method, ``dt.tzinfo`` is the same object as *self*. :class:" -"`tzinfo` methods can rely on this, unless user code calls :class:`tzinfo` " -"methods directly. The intent is that the :class:`tzinfo` methods interpret " -"*dt* as being in local time, and not need worry about objects in other time " -"zones." +"When a :class:`.datetime` object is passed in response to a :class:`!" +"datetime` method, ``dt.tzinfo`` is the same object as " +"*self*. :class:`tzinfo` methods can rely on this, unless user code " +"calls :class:`!tzinfo` methods directly. The intent is that the :class:`!" +"tzinfo` methods interpret *dt* as being in local time, and not need worry " +"about objects in other time zones." msgstr "" -"Quand un objet :class:`.datetime` est passé en réponse à une méthode de :" -"class:`.datetime`, ``dt.tzinfo`` est le même objet que *self*. Les méthodes " -"de :class:`tzinfo` peuvent se baser là-dessus, à moins que le code " +"Quand un objet :class:`.datetime` est passé en réponse à une méthode " +"de :class:`.datetime`, ``dt.tzinfo`` est le même objet que *self*. Les " +"méthodes de :class:`tzinfo` peuvent se baser là-dessus, à moins que le code " "utilisateur appelle directement des méthodes de :class:`tzinfo`. L'intention " "est que les méthodes de :class:`tzinfo` interprètent *dt* comme étant le " "temps local, et n'aient pas à se soucier des objets dans d'autres fuseaux " "horaires." -#: library/datetime.rst:2175 +#: library/datetime.rst:2285 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" @@ -3108,41 +3241,41 @@ msgstr "" "Il y a une dernière méthode de :class:`tzinfo` que les sous-classes peuvent " "vouloir redéfinir :" -#: library/datetime.rst:2180 +#: library/datetime.rst:2290 #, fuzzy msgid "" "This is called from the default :meth:`datetime.astimezone` implementation. " "When called from that, ``dt.tzinfo`` is *self*, and *dt*'s date and time " -"data are to be viewed as expressing a UTC time. The purpose of :meth:" -"`fromutc` is to adjust the date and time data, returning an equivalent " -"datetime in *self*'s local time." -msgstr "" -"Elle est appelée par l'implémentation par défaut de :class:`datetime." -"astimezone()`. Lors d'un appel depuis cette méthode, ``dt.tzinfo`` vaut " -"*self* et les données de date et d'heure de *dt* sont vues comme exprimant " -"un horodatage UTC. Le rôle de :meth:`fromutc` est d'ajuster les données de " -"date et d'heure, renvoyant un objet *datetime* équivalent à *self*, dans le " -"temps local." - -#: library/datetime.rst:2186 -#, fuzzy -msgid "" -"Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" -"`fromutc` implementation without problems. It's strong enough to handle " -"fixed-offset time zones, and time zones accounting for both standard and " -"daylight time, and the latter even if the DST transition times differ in " -"different years. An example of a time zone the default :meth:`fromutc` " -"implementation may not handle correctly in all cases is one where the " -"standard offset (from UTC) depends on the specific date and time passed, " -"which can happen for political reasons. The default implementations of :meth:" -"`~.datetime.astimezone` and :meth:`fromutc` may not produce the result you " -"want if the result is one of the hours straddling the moment the standard " -"offset changes." +"data are to be viewed as expressing a UTC time. The purpose " +"of :meth:`fromutc` is to adjust the date and time data, returning an " +"equivalent datetime in *self*'s local time." msgstr "" -"La plupart des sous-classes :class:`tzinfo` doivent être en mesure d'hériter " -"sans problème de l'implémentation par défaut de :meth:`fromutc`. Elle est " -"suffisamment robuste pour gérer les fuseaux horaires à décalage fixe, et les " -"fuseaux représentant à la fois des heures standards et d'été, et ce même si " +"Elle est appelée par l'implémentation par défaut " +"de :class:`datetime.astimezone()`. Lors d'un appel depuis cette méthode, " +"``dt.tzinfo`` vaut *self* et les données de date et d'heure de *dt* sont " +"vues comme exprimant un horodatage UTC. Le rôle de :meth:`fromutc` est " +"d'ajuster les données de date et d'heure, renvoyant un objet *datetime* " +"équivalent à *self*, dans le temps local." + +#: library/datetime.rst:2296 +#, fuzzy +msgid "" +"Most :class:`tzinfo` subclasses should be able to inherit the " +"default :meth:`fromutc` implementation without problems. It's strong enough " +"to handle fixed-offset time zones, and time zones accounting for both " +"standard and daylight time, and the latter even if the DST transition times " +"differ in different years. An example of a time zone the " +"default :meth:`fromutc` implementation may not handle correctly in all cases " +"is one where the standard offset (from UTC) depends on the specific date and " +"time passed, which can happen for political reasons. The default " +"implementations of :meth:`~.datetime.astimezone` and :meth:`fromutc` may not " +"produce the result you want if the result is one of the hours straddling the " +"moment the standard offset changes." +msgstr "" +"La plupart des sous-classes :class:`tzinfo` doivent être en mesure d'hériter " +"sans problème de l'implémentation par défaut de :meth:`fromutc`. Elle est " +"suffisamment robuste pour gérer les fuseaux horaires à décalage fixe, et les " +"fuseaux représentant à la fois des heures standards et d'été, et ce même si " "le décalage de l'heure d'été est différent suivant les années. Un exemple de " "fuseau horaire qui ne serait pas géré correctement dans tous les cas par " "l'implémentation par défaut de :meth:`fromutc` en est un où le décalage " @@ -3152,29 +3285,29 @@ msgstr "" "ne pas produire les résultats attendus si le résultat est l'une des heures " "affectées par le changement d'heure." -#: library/datetime.rst:2197 +#: library/datetime.rst:2307 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" msgstr "" -"En omettant le code des cas d'erreurs, l'implémentation par défaut de :meth:" -"`fromutc` se comporte comme suit ::" +"En omettant le code des cas d'erreurs, l'implémentation par défaut " +"de :meth:`fromutc` se comporte comme suit ::" -#: library/datetime.rst:2215 +#: library/datetime.rst:2327 msgid "" -"In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." -"py>` file there are some examples of :class:`tzinfo` classes:" +"In the following :download:`tzinfo_examples.py <../includes/" +"tzinfo_examples.py>` file there are some examples of :class:`tzinfo` classes:" msgstr "" -"Dans le fichier :download:`tzinfo_examples.py <../includes/tzinfo_examples." -"py>` il y a des exemples de :class:`tzinfo` classes :" +"Dans le fichier :download:`tzinfo_examples.py <../includes/" +"tzinfo_examples.py>` il y a des exemples de :class:`tzinfo` classes :" -#: library/datetime.rst:2221 +#: library/datetime.rst:2333 msgid "" -"Note that there are unavoidable subtleties twice per year in a :class:" -"`tzinfo` subclass accounting for both standard and daylight time, at the DST " -"transition points. For concreteness, consider US Eastern (UTC -0500), where " -"EDT begins the minute after 1:59 (EST) on the second Sunday in March, and " -"ends the minute after 1:59 (EDT) on the first Sunday in November::" +"Note that there are unavoidable subtleties twice per year in " +"a :class:`tzinfo` subclass accounting for both standard and daylight time, " +"at the DST transition points. For concreteness, consider US Eastern (UTC " +"-0500), where EDT begins the minute after 1:59 (EST) on the second Sunday in " +"March, and ends the minute after 1:59 (EDT) on the first Sunday in November::" msgstr "" "Notez que, deux fois par an, on rencontre des subtilités inévitables dans " "les sous-classes de :class:`tzinfo` représentant à la fois des heures " @@ -3183,7 +3316,7 @@ msgstr "" "la minute qui suit 1:59 (EST) le second dimanche de mars, et se termine à la " "minute qui suit 1:59 (EDT) le premier dimanche de novembre ::" -#: library/datetime.rst:2235 +#: library/datetime.rst:2347 msgid "" "When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " "to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, " @@ -3197,7 +3330,7 @@ msgstr "" "pour le jour où débute l'heure d'été. Par exemple, lors du changement " "d'heure du printemps 2016, nous obtenons ::" -#: library/datetime.rst:2254 +#: library/datetime.rst:2366 #, fuzzy msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " @@ -3215,18 +3348,18 @@ msgstr "" "Quand l'heure d'été se termine (la ligne « *end* »), il y a potentiellement " "un problème pire que cela : il y a une heure qui ne peut pas être exprimée " "sans ambiguïté en temps local : la dernière heure de l'heure d'été. Dans " -"l'est des États-Unis, l'heure d'été se termine sur les heures de la forme 5:" -"MM UTC. L'horloge locale passe de 1:59 (heure d'été) à 1:00 (heure d'hiver) " -"à nouveau. Les heures locales de la forme 1:MM sont ambiguës. :meth:" -"`astimezone` imite le comportement des horloges locales en associant deux " -"heures UTC adjacentes à la même heure locale. Dans notre exemple, les " -"horodatages UTC de la forme 5:MM et 6:MM sont tous deux associés à 1:MM " -"quand ils sont convertis vers ce fuseau, mais les horodatages les plus " -"anciens ont l'attribut :attr:`~datetime.fold` à 0 et les plus récents l'ont " -"à 1. Par exemple, lors du changement d'heure de l'automne 2016, nous " -"obtenons ::" - -#: library/datetime.rst:2276 +"l'est des États-Unis, l'heure d'été se termine sur les heures de la forme " +"5:MM UTC. L'horloge locale passe de 1:59 (heure d'été) à 1:00 (heure " +"d'hiver) à nouveau. Les heures locales de la forme 1:MM sont " +"ambiguës. :meth:`astimezone` imite le comportement des horloges locales en " +"associant deux heures UTC adjacentes à la même heure locale. Dans notre " +"exemple, les horodatages UTC de la forme 5:MM et 6:MM sont tous deux " +"associés à 1:MM quand ils sont convertis vers ce fuseau, mais les " +"horodatages les plus anciens ont l'attribut :attr:`~datetime.fold` à 0 et " +"les plus récents l'ont à 1. Par exemple, lors du changement d'heure de " +"l'automne 2016, nous obtenons ::" + +#: library/datetime.rst:2390 #, fuzzy msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " @@ -3236,15 +3369,15 @@ msgstr "" "valeur de leur attribut :attr:`~datetime.fold` sont considérées égales dans " "les comparaisons." -#: library/datetime.rst:2279 +#: library/datetime.rst:2393 #, fuzzy msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " -"the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :" -"class:`tzinfo` subclasses; there are no ambiguities when using :class:" -"`timezone`, or any other fixed-offset :class:`tzinfo` subclass (such as a " -"class representing only EST (fixed offset -5 hours), or only EDT (fixed " -"offset -4 hours))." +"the value of the :attr:`~.datetime.fold` attribute or avoid using " +"hybrid :class:`tzinfo` subclasses; there are no ambiguities when " +"using :class:`timezone`, or any other fixed-offset :class:`!tzinfo` subclass " +"(such as a class representing only EST (fixed offset -5 hours), or only EDT " +"(fixed offset -4 hours))." msgstr "" "Les applications qui ne peuvent pas gérer ces ambiguïtés doivent vérifier " "explicitement la valeur de l'attribut :attr:`~datetime.fold` ou éviter " @@ -3254,11 +3387,11 @@ msgstr "" "représentant uniquement le fuseau EST (de décalage fixe *-5h*) ou uniquement " "EDT (*-4h*))." -#: library/datetime.rst:2287 +#: library/datetime.rst:2401 msgid ":mod:`zoneinfo`" msgstr ":mod:`zoneinfo`" -#: library/datetime.rst:2288 +#: library/datetime.rst:2402 #, fuzzy msgid "" "The :mod:`!datetime` module has a basic :class:`timezone` class (for " @@ -3269,7 +3402,7 @@ msgstr "" "pour gérer des décalages fixes par rapport à UTC et :attr:`timezone.utc` " "comme instance du fuseau horaire UTC." -#: library/datetime.rst:2292 +#: library/datetime.rst:2406 #, fuzzy msgid "" "``zoneinfo`` brings the *IANA time zone database* (also known as the Olson " @@ -3278,14 +3411,14 @@ msgstr "" "``zoneinfo`` apporte à Python la *base de données de fuseaux horaires IANA* " "(aussi appelée base de données Olson), et son utilisation est recommandée." -#: library/datetime.rst:2295 +#: library/datetime.rst:2409 #, fuzzy msgid "`IANA time zone database `_" msgstr "" "`Base de données des fuseaux horaires de l'IANA `_" -#: library/datetime.rst:2296 +#: library/datetime.rst:2410 msgid "" "The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " "and data that represent the history of local time for many representative " @@ -3300,11 +3433,12 @@ msgstr "" "politiques sur les bornes du fuseau, les décalages UTC, et les règles de " "passage à l'heure d'été." -#: library/datetime.rst:2306 -msgid ":class:`timezone` Objects" +#: library/datetime.rst:2420 +#, fuzzy +msgid ":class:`!timezone` objects" msgstr "Objets :class:`timezone`" -#: library/datetime.rst:2308 +#: library/datetime.rst:2422 #, fuzzy msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " @@ -3314,7 +3448,7 @@ msgstr "" "chaque instance représente un fuseau horaire défini par un décalage fixe par " "rapport à UTC." -#: library/datetime.rst:2312 +#: library/datetime.rst:2426 #, fuzzy msgid "" "Objects of this class cannot be used to represent time zone information in " @@ -3326,7 +3460,7 @@ msgstr "" "décalages sont utilisés au cours de l'année ni où le déroulement du temps " "civil a fait l'objet d'ajustements." -#: library/datetime.rst:2319 +#: library/datetime.rst:2433 msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " "representing the difference between the local time and UTC. It must be " @@ -3338,16 +3472,16 @@ msgstr "" "strictement compris entre ``-timedelta(hours=24)`` et " "``timedelta(hours=24)``, autrement une :exc:`ValueError` est levée." -#: library/datetime.rst:2324 +#: library/datetime.rst:2438 msgid "" "The *name* argument is optional. If specified it must be a string that will " "be used as the value returned by the :meth:`datetime.tzname` method." msgstr "" "L'argument *name* est optionnel. S'il est spécifié, il doit être une chaîne " -"qui sera utilisée comme valeur de retour de la méthode :meth:`datetime." -"tzname`." +"qui sera utilisée comme valeur de retour de la " +"méthode :meth:`datetime.tzname`." -#: library/datetime.rst:2346 +#: library/datetime.rst:2461 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." @@ -3355,15 +3489,16 @@ msgstr "" "Renvoie la valeur fixe spécifiée lorsque l'instance :class:`timezone` est " "construite." -#: library/datetime.rst:2338 +#: library/datetime.rst:2452 msgid "" "The *dt* argument is ignored. The return value is a :class:`timedelta` " "instance equal to the difference between the local time and UTC." msgstr "" -"L'argument *dt* est ignoré. La valeur de retour est une instance :class:" -"`timedelta` égale à la différence entre le temps local et UTC." +"L'argument *dt* est ignoré. La valeur de retour est une " +"instance :class:`timedelta` égale à la différence entre le temps local et " +"UTC." -#: library/datetime.rst:2349 +#: library/datetime.rst:2464 msgid "" "If *name* is not provided in the constructor, the name returned by " "``tzname(dt)`` is generated from the value of the ``offset`` as follows. If " @@ -3378,7 +3513,7 @@ msgstr "" "et HH et MM sont respectivement les représentations à deux chiffres de " "``offset.hours`` et ``offset.minutes``." -#: library/datetime.rst:2355 +#: library/datetime.rst:2470 msgid "" "Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " "``'UTC+00:00'``." @@ -3386,29 +3521,29 @@ msgstr "" "Le nom généré à partir de ``offset=timedelta(0)`` est maintenant ``'UTC'`` " "plutôt que ``'UTC+00:00'``." -#: library/datetime.rst:2362 +#: library/datetime.rst:2477 msgid "Always returns ``None``." msgstr "Renvoie toujours ``None``." -#: library/datetime.rst:2366 +#: library/datetime.rst:2482 msgid "" -"Return ``dt + offset``. The *dt* argument must be an aware :class:`." -"datetime` instance, with ``tzinfo`` set to ``self``." +"Return ``dt + offset``. The *dt* argument must be an " +"aware :class:`.datetime` instance, with ``tzinfo`` set to ``self``." msgstr "" -"Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée de :" -"class:`.datetime`, avec ``tzinfo`` valant ``self``." +"Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée " +"de :class:`.datetime`, avec ``tzinfo`` valant ``self``." -#: library/datetime.rst:2373 +#: library/datetime.rst:2490 #, fuzzy msgid "The UTC time zone, ``timezone(timedelta(0))``." msgstr "Le fuseau horaire UTC, ``timezone(timedelta(0))``." -#: library/datetime.rst:2382 +#: library/datetime.rst:2499 #, fuzzy -msgid ":meth:`~.datetime.strftime` and :meth:`~.datetime.strptime` Behavior" +msgid ":meth:`!strftime` and :meth:`!strptime` behavior" msgstr "Comportement de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2384 +#: library/datetime.rst:2501 msgid "" ":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " "``strftime(format)`` method, to create a string representing the time under " @@ -3419,91 +3554,79 @@ msgstr "" "temps sous forme d'une chaîne, contrôlée par une chaîne de formatage " "explicite." -#: library/datetime.rst:2388 +#: library/datetime.rst:2505 +#, fuzzy msgid "" -"Conversely, the :meth:`datetime.strptime` class method creates a :class:`." -"datetime` object from a string representing a date and time and a " -"corresponding format string." +"Conversely, the :meth:`date.strptime`, :meth:`datetime.strptime` " +"and :meth:`time.strptime` class methods create an object from a string " +"representing the time and a corresponding format string." msgstr "" -"Inversement, la méthode de classe :meth:`datetime.strptime` crée un objet :" -"class:`.datetime` à partir d'une chaîne représentant une date et une heure, " -"et une chaîne de format correspondante." +"Inversement, la méthode de classe :meth:`datetime.strptime` crée un " +"objet :class:`.datetime` à partir d'une chaîne représentant une date et une " +"heure, et une chaîne de format correspondante." -#: library/datetime.rst:2392 +#: library/datetime.rst:2509 #, fuzzy msgid "" -"The table below provides a high-level comparison of :meth:`~.datetime." -"strftime` versus :meth:`~.datetime.strptime`:" +"The table below provides a high-level comparison " +"of :meth:`~.datetime.strftime` versus :meth:`~.datetime.strptime`:" msgstr "" -"Le tableau ci-dessous fournit une comparaison de haut niveau entre :meth:" -"`strftime` et :meth:`strptime` :" +"Le tableau ci-dessous fournit une comparaison de haut niveau " +"entre :meth:`strftime` et :meth:`strptime` :" -#: library/datetime.rst:2396 +#: library/datetime.rst:2513 msgid "``strftime``" msgstr "``strftime``" -#: library/datetime.rst:2396 +#: library/datetime.rst:2513 msgid "``strptime``" msgstr "``strptime``" -#: library/datetime.rst:2398 +#: library/datetime.rst:2515 msgid "Usage" msgstr "Utilisation" -#: library/datetime.rst:2398 +#: library/datetime.rst:2515 msgid "Convert object to a string according to a given format" msgstr "Convertit un objet en une chaîne selon un format donné" -#: library/datetime.rst:2398 -msgid "" -"Parse a string into a :class:`.datetime` object given a corresponding format" +#: library/datetime.rst:2515 +#, fuzzy +msgid "Parse a string into an object given a corresponding format" msgstr "" "Analyse une chaîne dans un objet :class:`.datetime` en fonction du format de " "correspondance donné" -#: library/datetime.rst:2400 +#: library/datetime.rst:2517 msgid "Type of method" msgstr "Type de méthode" -#: library/datetime.rst:2400 +#: library/datetime.rst:2517 msgid "Instance method" msgstr "Méthode d'instance" -#: library/datetime.rst:2400 +#: library/datetime.rst:2517 msgid "Class method" msgstr "Méthode de classe" -#: library/datetime.rst:2402 -msgid "Method of" -msgstr "Méthode de" - -#: library/datetime.rst:2402 -msgid ":class:`date`; :class:`.datetime`; :class:`.time`" -msgstr ":class:`date` ; :class:`.datetime` ; :class:`.time`" - -#: library/datetime.rst:2402 -msgid ":class:`.datetime`" -msgstr ":class:`.datetime`" - -#: library/datetime.rst:2404 +#: library/datetime.rst:2519 msgid "Signature" msgstr "Signature" -#: library/datetime.rst:2404 +#: library/datetime.rst:2519 msgid "``strftime(format)``" msgstr "``strftime(format)``" -#: library/datetime.rst:2404 +#: library/datetime.rst:2519 msgid "``strptime(date_string, format)``" msgstr "``strptime(date_string, format)``" -#: library/datetime.rst:2411 +#: library/datetime.rst:2526 #, fuzzy -msgid "" -":meth:`~.datetime.strftime` and :meth:`~.datetime.strptime` Format Codes" +msgid ":meth:`!strftime` and :meth:`!strptime` format codes" msgstr "Codes de formatage de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2413 +#: library/datetime.rst:2528 msgid "" "These methods accept format codes that can be used to parse and format " "dates::" @@ -3511,290 +3634,423 @@ msgstr "" "Ces méthodes acceptent des codes de formatage qui peuvent être utilisés pour " "analyser et formater les dates ::" -#: library/datetime.rst:2421 +#: library/datetime.rst:2537 +#, fuzzy msgid "" -"The following is a list of all the format codes that the 1989 C standard " -"requires, and these work on all platforms with a standard C implementation." +"The following is a list of all the format codes that the 2011 C standard " +"requires, and these work on all supported platforms." msgstr "" "Voici la liste de tous les codes de formatage requis par le C standard 1989, " "et ils fonctionnent sur toutes les plateformes possédant une implémentation " "de C standard." -#: library/datetime.rst:2528 +#: library/datetime.rst:2696 msgid "Directive" msgstr "Directive" -#: library/datetime.rst:2528 +#: library/datetime.rst:2696 msgid "Meaning" msgstr "Signification" -#: library/datetime.rst:2528 +#: library/datetime.rst:2696 msgid "Example" msgstr "Exemple" -#: library/datetime.rst:2528 +#: library/datetime.rst:2696 msgid "Notes" msgstr "Notes" -#: library/datetime.rst:2427 +#: library/datetime.rst:2544 msgid "``%a``" msgstr "``%a``" -#: library/datetime.rst:2427 +#: library/datetime.rst:2544 msgid "Weekday as locale's abbreviated name." msgstr "Jour de la semaine abrégé dans la langue locale." -#: library/datetime.rst:0 +#: library/datetime.rst:2544 msgid "Sun, Mon, ..., Sat (en_US);" msgstr "Sun, Mon, ..., Sat (en_US);" -#: library/datetime.rst:0 +#: library/datetime.rst:2546 msgid "So, Mo, ..., Sa (de_DE)" msgstr "Lu, Ma, ..., Di (*fr_FR*)" -#: library/datetime.rst:2432 +#: library/datetime.rst:2549 msgid "``%A``" msgstr "``%A``" -#: library/datetime.rst:2432 +#: library/datetime.rst:2549 msgid "Weekday as locale's full name." msgstr "Jour de la semaine complet dans la langue locale." -#: library/datetime.rst:0 +#: library/datetime.rst:2549 msgid "Sunday, Monday, ..., Saturday (en_US);" msgstr "*Sunday*, *Monday*, ..., *Saturday* (*en_US*);" -#: library/datetime.rst:0 +#: library/datetime.rst:2551 msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "Lundi, Mardi, ..., Dimanche (*fr_FR*)" -#: library/datetime.rst:2437 -msgid "``%w``" -msgstr "``%w``" - -#: library/datetime.rst:2437 -msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." -msgstr "" -"Jour de la semaine en chiffre, avec 0 pour le dimanche et 6 pour le samedi." - -#: library/datetime.rst:2437 -msgid "0, 1, ..., 6" -msgstr "0, 1, ..., 6" - -#: library/datetime.rst:2441 -msgid "``%d``" -msgstr "``%d``" - -#: library/datetime.rst:2441 -msgid "Day of the month as a zero-padded decimal number." -msgstr "Jour du mois sur deux chiffres." - -#: library/datetime.rst:2441 -msgid "01, 02, ..., 31" -msgstr "01, 02, ..., 31" - -#: library/datetime.rst:2454 library/datetime.rst:2463 -#: library/datetime.rst:2472 library/datetime.rst:2490 -msgid "\\(9)" -msgstr "\\(9)" - -#: library/datetime.rst:2444 +#: library/datetime.rst:2554 msgid "``%b``" msgstr "``%b``" -#: library/datetime.rst:2444 +#: library/datetime.rst:2554 msgid "Month as locale's abbreviated name." msgstr "Nom du mois abrégé dans la langue locale." -#: library/datetime.rst:0 +#: library/datetime.rst:2554 msgid "Jan, Feb, ..., Dec (en_US);" msgstr "Jan, Feb, ..., Dec (*en_US*);" -#: library/datetime.rst:0 +#: library/datetime.rst:2556 msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "janv., févr., ..., déc. (*fr_FR*)" -#: library/datetime.rst:2449 +#: library/datetime.rst:2559 msgid "``%B``" msgstr "``%B``" -#: library/datetime.rst:2449 +#: library/datetime.rst:2559 msgid "Month as locale's full name." msgstr "Nom complet du mois dans la langue locale." -#: library/datetime.rst:0 +#: library/datetime.rst:2559 msgid "January, February, ..., December (en_US);" msgstr "*January*, *February*, ..., *December* (*en_US*);" -#: library/datetime.rst:0 +#: library/datetime.rst:2561 msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "janvier, février, ..., décembre (*fr_FR*)" -#: library/datetime.rst:2454 -msgid "``%m``" -msgstr "``%m``" +#: library/datetime.rst:2564 +msgid "``%c``" +msgstr "``%c``" -#: library/datetime.rst:2454 -msgid "Month as a zero-padded decimal number." -msgstr "Numéro du mois sur deux chiffres." +#: library/datetime.rst:2564 +msgid "Locale's appropriate date and time representation." +msgstr "Représentation locale de la date et de l'heure." -#: library/datetime.rst:2466 -msgid "01, 02, ..., 12" -msgstr "01, 02, ..., 12" +#: library/datetime.rst:2564 +msgid "Tue Aug 16 21:30:00 1988 (en_US);" +msgstr "Tue Aug 16 21:30:00 1988 (*en_US*);" -#: library/datetime.rst:2457 -msgid "``%y``" -msgstr "``%y``" +#: library/datetime.rst:2566 +msgid "Di 16 Aug 21:30:00 1988 (de_DE)" +msgstr "mar. 16 août 1988 21:30:00 (*fr_FR*)" -#: library/datetime.rst:2457 -msgid "Year without century as a zero-padded decimal number." +#: library/datetime.rst:2569 +msgid "``%C``" +msgstr "" + +#: library/datetime.rst:2569 +#, fuzzy +msgid "" +"The year divided by 100 and truncated to an integer as a zero-padded decimal " +"number." msgstr "Année sur deux chiffres (sans le siècle)." -#: library/datetime.rst:2457 +#: library/datetime.rst:2569 +#, fuzzy +msgid "01, 02, ..., 99" +msgstr "01, 02, ..., 31" + +#: library/datetime.rst:2585 library/datetime.rst:2595 +msgid "\\(0)" +msgstr "" + +#: library/datetime.rst:2573 +msgid "``%d``" +msgstr "``%d``" + +#: library/datetime.rst:2573 +msgid "Day of the month as a zero-padded decimal number." +msgstr "Jour du mois sur deux chiffres." + +#: library/datetime.rst:2573 +msgid "01, 02, ..., 31" +msgstr "01, 02, ..., 31" + +#: library/datetime.rst:2573 +#, fuzzy +msgid "\\(9), \\(10)" +msgstr "\\(4), \\(9)" + +#: library/datetime.rst:2576 +msgid "``%D``" +msgstr "" + +#: library/datetime.rst:2576 +#, fuzzy +msgid "Equivalent to ``%m/%d/%y``." +msgstr "Équivalent à ::" + +#: library/datetime.rst:2576 +msgid "11/28/25" +msgstr "" + +#: library/datetime.rst:2597 library/datetime.rst:2603 +#: library/datetime.rst:2609 library/datetime.rst:2671 +msgid "\\(9)" +msgstr "\\(9)" + +#: library/datetime.rst:2579 +msgid "``%e``" +msgstr "" + +#: library/datetime.rst:2579 +#, fuzzy +msgid "The day of the month as a space-padded decimal number." +msgstr "Jour du mois sur deux chiffres." + +#: library/datetime.rst:2579 +#, fuzzy +msgid "␣1, ␣2, ..., 31" +msgstr "01, 02, ..., 31" + +#: library/datetime.rst:2579 +msgid "\\(10)" +msgstr "" + +#: library/datetime.rst:2582 +msgid "``%F``" +msgstr "" + +#: library/datetime.rst:2582 +msgid "Equivalent to ``%Y-%m-%d``, the ISO 8601 format." +msgstr "" + +#: library/datetime.rst:2582 +msgid "2025-10-11, 1001-12-30" +msgstr "" + +#: library/datetime.rst:2585 +msgid "``%g``" +msgstr "" + +#: library/datetime.rst:2585 +#, fuzzy +msgid "" +"Last 2 digits of ISO 8601 year representing the year that contains the " +"greater part of the ISO week (``%V``)." +msgstr "" +"Année complète ISO 8601 représentant l'année contenant la plus grande partie " +"de la semaine ISO (``%V``)." + +#: library/datetime.rst:2671 msgid "00, 01, ..., 99" msgstr "00, 01, ..., 99" -#: library/datetime.rst:2460 -msgid "``%Y``" -msgstr "``%Y``" +#: library/datetime.rst:2590 +msgid "``%G``" +msgstr "``%G``" -#: library/datetime.rst:2460 -msgid "Year with century as a decimal number." -msgstr "Année complète sur quatre chiffres." +#: library/datetime.rst:2590 +msgid "" +"ISO 8601 year with century representing the year that contains the greater " +"part of the ISO week (``%V``)." +msgstr "" +"Année complète ISO 8601 représentant l'année contenant la plus grande partie " +"de la semaine ISO (``%V``)." -#: library/datetime.rst:2530 +#: library/datetime.rst:2674 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" -#: library/datetime.rst:2463 +#: library/datetime.rst:2590 +msgid "\\(8)" +msgstr "\\(8)" + +#: library/datetime.rst:2595 +msgid "``%h``" +msgstr "" + +#: library/datetime.rst:2595 +#, fuzzy +msgid "Equivalent to ``%b``." +msgstr "Équivalent à ::" + +#: library/datetime.rst:2595 +#, fuzzy +msgid "See ``%b``." +msgstr "``%b``" + +#: library/datetime.rst:2597 msgid "``%H``" msgstr "``%H``" -#: library/datetime.rst:2463 +#: library/datetime.rst:2597 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres de 00 à 23." -#: library/datetime.rst:2463 +#: library/datetime.rst:2597 msgid "00, 01, ..., 23" msgstr "00, 01, ..., 23" -#: library/datetime.rst:2466 +#: library/datetime.rst:2600 msgid "``%I``" msgstr "``%I``" -#: library/datetime.rst:2466 +#: library/datetime.rst:2600 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres pour les horloges 12h (01 à 12)." -#: library/datetime.rst:2469 +#: library/datetime.rst:2606 +msgid "01, 02, ..., 12" +msgstr "01, 02, ..., 12" + +#: library/datetime.rst:2603 +msgid "``%j``" +msgstr "``%j``" + +#: library/datetime.rst:2603 +msgid "Day of the year as a zero-padded decimal number." +msgstr "Numéro du jour dans l'année sur trois chiffres." + +#: library/datetime.rst:2603 +msgid "001, 002, ..., 366" +msgstr "001, 002, ..., 366" + +#: library/datetime.rst:2606 +msgid "``%m``" +msgstr "``%m``" + +#: library/datetime.rst:2606 +msgid "Month as a zero-padded decimal number." +msgstr "Numéro du mois sur deux chiffres." + +#: library/datetime.rst:2609 +msgid "``%M``" +msgstr "``%M``" + +#: library/datetime.rst:2609 +msgid "Minute as a zero-padded decimal number." +msgstr "Minutes sur deux chiffres." + +#: library/datetime.rst:2625 +msgid "00, 01, ..., 59" +msgstr "00, 01, ..., 59" + +#: library/datetime.rst:2612 +msgid "``%n``" +msgstr "" + +#: library/datetime.rst:2612 +msgid "" +"The newline character (``'\\n'``). For :meth:`!strptime`, zero or more " +"whitespace." +msgstr "" + +#: library/datetime.rst:2612 +msgid "``\\n``" +msgstr "" + +#: library/datetime.rst:2617 msgid "``%p``" msgstr "``%p``" -#: library/datetime.rst:2469 +#: library/datetime.rst:2617 msgid "Locale's equivalent of either AM or PM." msgstr "Équivalent local à AM/PM." -#: library/datetime.rst:0 +#: library/datetime.rst:2617 msgid "AM, PM (en_US);" msgstr "AM, PM (en_US);" -#: library/datetime.rst:0 +#: library/datetime.rst:2618 msgid "am, pm (de_DE)" msgstr "am, pm (de_DE)" -#: library/datetime.rst:2469 +#: library/datetime.rst:2617 msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" -#: library/datetime.rst:2472 -msgid "``%M``" -msgstr "``%M``" +#: library/datetime.rst:2620 +msgid "``%r``" +msgstr "" -#: library/datetime.rst:2472 -msgid "Minute as a zero-padded decimal number." -msgstr "Minutes sur deux chiffres." +#: library/datetime.rst:2620 +msgid "Locale's 12-hour clock time." +msgstr "" -#: library/datetime.rst:2475 -msgid "00, 01, ..., 59" -msgstr "00, 01, ..., 59" +#: library/datetime.rst:2620 +msgid "12:00:00 AM" +msgstr "" + +#: library/datetime.rst:2620 +#, fuzzy +msgid "\\(1), \\(0)" +msgstr "\\(1), \\(3)" + +#: library/datetime.rst:2623 +msgid "``%R``" +msgstr "" + +#: library/datetime.rst:2623 +#, fuzzy +msgid "Equivalent to ``%H:%M``." +msgstr "Équivalent à ::" -#: library/datetime.rst:2475 +#: library/datetime.rst:2623 +msgid "10:01" +msgstr "" + +#: library/datetime.rst:2625 msgid "``%S``" msgstr "``%S``" -#: library/datetime.rst:2475 +#: library/datetime.rst:2625 msgid "Second as a zero-padded decimal number." msgstr "Secondes sur deux chiffres." -#: library/datetime.rst:2475 +#: library/datetime.rst:2625 msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" -#: library/datetime.rst:2478 -msgid "``%f``" -msgstr "``%f``" - -#: library/datetime.rst:2478 -msgid "Microsecond as a decimal number, zero-padded to 6 digits." -msgstr "Microsecondes sur 6 chiffres." - -#: library/datetime.rst:2478 -msgid "000000, 000001, ..., 999999" -msgstr "000000, 000001, ..., 999999" - -#: library/datetime.rst:2478 -msgid "\\(5)" -msgstr "\\(5)" - -#: library/datetime.rst:2641 -msgid "``%z``" -msgstr "``%z``" +#: library/datetime.rst:2628 +msgid "``%t``" +msgstr "" -#: library/datetime.rst:2482 +#: library/datetime.rst:2628 msgid "" -"UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " -"naive)." +"The tab character (``'\\t'``). For :meth:`!strptime`, zero or more " +"whitespace." msgstr "" -"Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " -"l'instance est naïve)." - -#: library/datetime.rst:2482 -msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" -msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" -#: library/datetime.rst:2487 library/datetime.rst:2544 -msgid "\\(6)" -msgstr "\\(6)" +#: library/datetime.rst:2628 +msgid "``\\t``" +msgstr "" -#: library/datetime.rst:2667 -msgid "``%Z``" -msgstr "``%Z``" +#: library/datetime.rst:2632 +msgid "``%T``" +msgstr "" -#: library/datetime.rst:2487 -msgid "Time zone name (empty string if the object is naive)." -msgstr "Nom du fuseau horaire (chaîne vide si l'instance est naïve)." +#: library/datetime.rst:2632 +msgid "ISO 8601 time format, equivalent to ``%H:%M:%S``." +msgstr "" -#: library/datetime.rst:2487 -msgid "(empty), UTC, GMT" -msgstr "(vide), UTC, GMT" +#: library/datetime.rst:2632 +msgid "10:01:59" +msgstr "" -#: library/datetime.rst:2490 -msgid "``%j``" -msgstr "``%j``" +#: library/datetime.rst:2635 +msgid "``%u``" +msgstr "``%u``" -#: library/datetime.rst:2490 -msgid "Day of the year as a zero-padded decimal number." -msgstr "Numéro du jour dans l'année sur trois chiffres." +#: library/datetime.rst:2635 +msgid "ISO 8601 weekday as a decimal number where 1 is Monday." +msgstr "Jour de la semaine ISO 8601 où 1 correspond au lundi." -#: library/datetime.rst:2490 -msgid "001, 002, ..., 366" -msgstr "001, 002, ..., 366" +#: library/datetime.rst:2635 +msgid "1, 2, ..., 7" +msgstr "1, 2, ..., 7" -#: library/datetime.rst:2493 +#: library/datetime.rst:2638 msgid "``%U``" msgstr "``%U``" -#: library/datetime.rst:2493 +#: library/datetime.rst:2638 msgid "" "Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " @@ -3804,19 +4060,52 @@ msgstr "" "premier jour de la semaine). Tous les jours de l'année précédent le premier " "dimanche sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2501 +#: library/datetime.rst:2656 msgid "00, 01, ..., 53" msgstr "00, 01, ..., 53" -#: library/datetime.rst:2501 +#: library/datetime.rst:2656 msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" -#: library/datetime.rst:2501 +#: library/datetime.rst:2646 +msgid "``%V``" +msgstr "``%V``" + +#: library/datetime.rst:2646 +msgid "" +"ISO 8601 week as a decimal number with Monday as the first day of the week. " +"Week 01 is the week containing Jan 4." +msgstr "" +"Numéro de la semaine ISO 8601, avec lundi étant le premier jour de la " +"semaine. La semaine 01 est la semaine contenant le 4 janvier." + +#: library/datetime.rst:2646 +msgid "01, 02, ..., 53" +msgstr "01, 02, ..., 53" + +#: library/datetime.rst:2646 +msgid "\\(8), \\(9)" +msgstr "\\(8), \\(9)" + +#: library/datetime.rst:2652 +msgid "``%w``" +msgstr "``%w``" + +#: library/datetime.rst:2652 +msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." +msgstr "" +"Jour de la semaine en chiffre, avec 0 pour le dimanche et 6 pour le samedi." + +#: library/datetime.rst:2652 +msgid "0, 1, ..., 6" +msgstr "0, 1, ..., 6" + +#: library/datetime.rst:2656 msgid "``%W``" msgstr "``%W``" -#: library/datetime.rst:2501 +#: library/datetime.rst:2656 msgid "" "Week number of the year (Monday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Monday are " @@ -3826,132 +4115,147 @@ msgstr "" "premier jour de la semaine). Tous les jours de l'année précédent le premier " "lundi sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2509 -msgid "``%c``" -msgstr "``%c``" - -#: library/datetime.rst:2509 -msgid "Locale's appropriate date and time representation." -msgstr "Représentation locale de la date et de l'heure." - -#: library/datetime.rst:0 -msgid "Tue Aug 16 21:30:00 1988 (en_US);" -msgstr "Tue Aug 16 21:30:00 1988 (*en_US*);" - -#: library/datetime.rst:0 -msgid "Di 16 Aug 21:30:00 1988 (de_DE)" -msgstr "mar. 16 août 1988 21:30:00 (*fr_FR*)" - -#: library/datetime.rst:2514 +#: library/datetime.rst:2664 msgid "``%x``" msgstr "``%x``" -#: library/datetime.rst:2514 +#: library/datetime.rst:2664 msgid "Locale's appropriate date representation." msgstr "Représentation locale de la date." -#: library/datetime.rst:0 +#: library/datetime.rst:2664 msgid "08/16/88 (None);" msgstr "08/16/88 (None);" -#: library/datetime.rst:0 +#: library/datetime.rst:2665 msgid "08/16/1988 (en_US);" msgstr "08/16/1988 (*en_US*);" -#: library/datetime.rst:0 +#: library/datetime.rst:2666 msgid "16.08.1988 (de_DE)" msgstr "16/08/1988 (*fr_FR*)" -#: library/datetime.rst:2518 +#: library/datetime.rst:2668 msgid "``%X``" msgstr "``%X``" -#: library/datetime.rst:2518 +#: library/datetime.rst:2668 msgid "Locale's appropriate time representation." msgstr "Représentation locale de l'heure." -#: library/datetime.rst:0 +#: library/datetime.rst:2668 msgid "21:30:00 (en_US);" msgstr "21:30:00 (*en_US*) ;" -#: library/datetime.rst:0 +#: library/datetime.rst:2669 msgid "21:30:00 (de_DE)" msgstr "21:30:00 (*fr_FR*)" -#: library/datetime.rst:2521 +#: library/datetime.rst:2671 +msgid "``%y``" +msgstr "``%y``" + +#: library/datetime.rst:2671 +msgid "Year without century as a zero-padded decimal number." +msgstr "Année sur deux chiffres (sans le siècle)." + +#: library/datetime.rst:2674 +msgid "``%Y``" +msgstr "``%Y``" + +#: library/datetime.rst:2674 +msgid "Year with century as a decimal number." +msgstr "Année complète sur quatre chiffres." + +#: library/datetime.rst:2840 +msgid "``%z``" +msgstr "``%z``" + +#: library/datetime.rst:2677 +msgid "" +"UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " +"naive)." +msgstr "" +"Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " +"l'instance est naïve)." + +#: library/datetime.rst:2677 +msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" +msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" + +#: library/datetime.rst:2682 library/datetime.rst:2702 +msgid "\\(6)" +msgstr "\\(6)" + +#: library/datetime.rst:2872 +msgid "``%Z``" +msgstr "``%Z``" + +#: library/datetime.rst:2682 +msgid "Time zone name (empty string if the object is naive)." +msgstr "Nom du fuseau horaire (chaîne vide si l'instance est naïve)." + +#: library/datetime.rst:2682 +msgid "(empty), UTC, GMT" +msgstr "(vide), UTC, GMT" + +#: library/datetime.rst:2685 msgid "``%%``" msgstr "``%%``" -#: library/datetime.rst:2521 +#: library/datetime.rst:2685 msgid "A literal ``'%'`` character." msgstr "Un caractère ``'%'`` littéral." -#: library/datetime.rst:2521 +#: library/datetime.rst:2685 msgid "%" msgstr "%" -#: library/datetime.rst:2524 +#: library/datetime.rst:2688 +#, fuzzy msgid "" -"Several additional directives not required by the C89 standard are included " -"for convenience. These parameters all correspond to ISO 8601 date values." +"The ISO 8601 year and ISO 8601 week directives are not interchangeable with " +"the year and week number directives above. " +"Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 " +"directives will raise a :exc:`ValueError`." msgstr "" -"Plusieurs directives supplémentaires non requises par la norme C89 sont " -"incluses pour des raisons de commodité. Ces paramètres correspondent tous " -"aux valeurs de date de la norme ISO 8601." - -#: library/datetime.rst:2530 -msgid "``%G``" -msgstr "``%G``" +"Elles peuvent ne pas être disponibles sur toutes les plateformes quand elles " +"sont utilisées avec la méthode :meth:`strftime`. Les directives ISO 8601 " +"d'année et de semaine ne sont pas interchangeables avec les directives " +"d'année et de semaine précédentes. Appeler :meth:`strptime` avec des " +"directives ISO 8601 incomplètes ou ambiguës lèvera une :exc:`ValueError`." -#: library/datetime.rst:2530 +#: library/datetime.rst:2692 +#, fuzzy msgid "" -"ISO 8601 year with century representing the year that contains the greater " -"part of the ISO week (``%V``)." +"Several additional directives not required by the C11 standard are included " +"for convenience." msgstr "" -"Année complète ISO 8601 représentant l'année contenant la plus grande partie " -"de la semaine ISO (``%V``)." - -#: library/datetime.rst:2530 -msgid "\\(8)" -msgstr "\\(8)" - -#: library/datetime.rst:2535 -msgid "``%u``" -msgstr "``%u``" - -#: library/datetime.rst:2535 -msgid "ISO 8601 weekday as a decimal number where 1 is Monday." -msgstr "Jour de la semaine ISO 8601 où 1 correspond au lundi." - -#: library/datetime.rst:2535 -msgid "1, 2, ..., 7" -msgstr "1, 2, ..., 7" +"Plusieurs directives supplémentaires non requises par la norme C89 sont " +"incluses pour des raisons de commodité. Ces paramètres correspondent tous " +"aux valeurs de date de la norme ISO 8601." -#: library/datetime.rst:2538 -msgid "``%V``" -msgstr "``%V``" +#: library/datetime.rst:2698 +msgid "``%f``" +msgstr "``%f``" -#: library/datetime.rst:2538 -msgid "" -"ISO 8601 week as a decimal number with Monday as the first day of the week. " -"Week 01 is the week containing Jan 4." -msgstr "" -"Numéro de la semaine ISO 8601, avec lundi étant le premier jour de la " -"semaine. La semaine 01 est la semaine contenant le 4 janvier." +#: library/datetime.rst:2698 +msgid "Microsecond as a decimal number, zero-padded to 6 digits." +msgstr "Microsecondes sur 6 chiffres." -#: library/datetime.rst:2538 -msgid "01, 02, ..., 53" -msgstr "01, 02, ..., 53" +#: library/datetime.rst:2698 +msgid "000000, 000001, ..., 999999" +msgstr "000000, 000001, ..., 999999" -#: library/datetime.rst:2538 -msgid "\\(8), \\(9)" -msgstr "\\(8), \\(9)" +#: library/datetime.rst:2698 +msgid "\\(5)" +msgstr "\\(5)" -#: library/datetime.rst:2663 +#: library/datetime.rst:2862 msgid "``%:z``" msgstr "" -#: library/datetime.rst:2544 +#: library/datetime.rst:2702 #, fuzzy msgid "" "UTC offset in the form ``±HH:MM[:SS[.ffffff]]`` (empty string if the object " @@ -3960,27 +4264,12 @@ msgstr "" "Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " "l'instance est naïve)." -#: library/datetime.rst:2544 +#: library/datetime.rst:2702 #, fuzzy msgid "(empty), +00:00, -04:00, +10:30, +06:34:15, -03:07:12.345216" msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" -#: library/datetime.rst:2550 -#, fuzzy -msgid "" -"These may not be available on all platforms when used with the :meth:`~." -"datetime.strftime` method. The ISO 8601 year and ISO 8601 week directives " -"are not interchangeable with the year and week number directives above. " -"Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 " -"directives will raise a :exc:`ValueError`." -msgstr "" -"Elles peuvent ne pas être disponibles sur toutes les plateformes quand elles " -"sont utilisées avec la méthode :meth:`strftime`. Les directives ISO 8601 " -"d'année et de semaine ne sont pas interchangeables avec les directives " -"d'année et de semaine précédentes. Appeler :meth:`strptime` avec des " -"directives ISO 8601 incomplètes ou ambiguës lèvera une :exc:`ValueError`." - -#: library/datetime.rst:2555 +#: library/datetime.rst:2708 #, fuzzy msgid "" "The full set of format codes supported varies across platforms, because " @@ -3998,46 +4287,69 @@ msgstr "" "des différences entre les plateformes dans la gestion de format non pris en " "charge." -#: library/datetime.rst:2561 +#: library/datetime.rst:2714 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``, ``%u`` et ``%V`` ont été ajoutés." -#: library/datetime.rst:2564 -msgid "``%:z`` was added." +#: library/datetime.rst:2717 +msgid "``%:z`` was added for :meth:`~.datetime.strftime`." +msgstr "" + +#: library/datetime.rst:2720 +msgid "" +"``%D``, ``%F``, ``%n``, ``%t``, and ``%:z`` were added " +"for :meth:`~.datetime.strptime`." msgstr "" -#: library/datetime.rst:2568 -msgid "Technical Detail" +#: library/datetime.rst:2726 +#, fuzzy +msgid "Technical detail" msgstr "Détail technique" -#: library/datetime.rst:2570 +#: library/datetime.rst:2728 #, fuzzy msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " -"``time.strftime(fmt, d.timetuple())`` although not all objects support a :" -"meth:`~date.timetuple` method." +"``time.strftime(fmt, d.timetuple())`` although not all objects support " +"a :meth:`~date.timetuple` method." msgstr "" -"Grossièrement, ``d.strftime(fmt)`` se comporte comme la fonction ``time." -"strftime(fmt, d.timetuple())`` du module :mod:`time`, bien que tous les " -"objets ne comportent pas de méthode :meth:`timetuple`." +"Grossièrement, ``d.strftime(fmt)`` se comporte comme la fonction " +"``time.strftime(fmt, d.timetuple())`` du module :mod:`time`, bien que tous " +"les objets ne comportent pas de méthode :meth:`timetuple`." -#: library/datetime.rst:2574 +#: library/datetime.rst:2732 #, fuzzy msgid "" -"For the :meth:`.datetime.strptime` class method, the default value is " -"``1900-01-01T00:00:00.000``: any components not specified in the format " -"string will be pulled from the default value. [#]_" +"For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods, " +"the default value is ``1900-01-01T00:00:00.000``: any components not " +"specified in the format string will be pulled from the default value." msgstr "" "Pour la méthode :meth:`datetime.strptime`, la valeur par défaut est " "``1900-01-01T00:00:00.000`` : tous les composants non spécifiés dans la " "chaîne de formatage seront retirés de la valeur par défaut. [#]_" -#: library/datetime.rst:2578 +#: library/datetime.rst:2737 +msgid "" +"Format strings without separators can be ambiguous for parsing. For example, " +"with ``%Y%m%d``, the string ``2026111`` may be parsed either as " +"``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is " +"parsed as intended." +msgstr "" + +#: library/datetime.rst:2743 +msgid "" +"When used to parse partial dates lacking a year, :meth:`.datetime.strptime` " +"and :meth:`.date.strptime` will raise when encountering February 29 because " +"the default year of 1900 is *not* a leap year. Always add a default leap " +"year to partial date strings before parsing." +msgstr "" + +#: library/datetime.rst:2774 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "" "L'utilisation de ``datetime.strptime(date_string, format)`` équivaut à ::" -#: library/datetime.rst:2582 +#: library/datetime.rst:2778 #, fuzzy msgid "" "except when the format includes sub-second components or time zone offset " @@ -4048,7 +4360,7 @@ msgstr "" "informations de décalage de fuseau horaire, qui sont prises en charge dans " "``datetime.strptime`` mais pas par ``time.strptime``." -#: library/datetime.rst:2586 +#: library/datetime.rst:2782 #, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " @@ -4060,7 +4372,7 @@ msgstr "" "ne possèdent pas de telles valeurs. S'ils sont tout de même utilisés, " "``1900`` est utilisé pour l'année, et ``1`` pour le mois et le jour." -#: library/datetime.rst:2590 +#: library/datetime.rst:2786 #, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " @@ -4072,13 +4384,13 @@ msgstr "" "les objets :class:`date` ne possèdent pas de telles valeurs. S'ils sont tout " "de même utilisés, la valeur ``0`` est utilisée." -#: library/datetime.rst:2594 +#: library/datetime.rst:2790 msgid "" "For the same reason, handling of format strings containing Unicode code " "points that can't be represented in the charset of the current locale is " "also platform-dependent. On some platforms such code points are preserved " -"intact in the output, while on others ``strftime`` may raise :exc:" -"`UnicodeError` or return an empty string instead." +"intact in the output, while on others ``strftime`` may " +"raise :exc:`UnicodeError` or return an empty string instead." msgstr "" "Pour la même raison, la gestion des chaînes contenant des caractères (ou " "points) Unicode qui ne peuvent pas être représentés dans la *locale* " @@ -4087,7 +4399,12 @@ msgstr "" "plateformes ``strftime`` lève une :exc:`UnicodeError` ou renvoie une chaîne " "vide." -#: library/datetime.rst:2603 +#: library/datetime.rst:2799 +msgid "" +"This format code is currently unsupported by :meth:`~.datetime.strptime`." +msgstr "" + +#: library/datetime.rst:2802 msgid "" "Because the format depends on the current locale, care should be taken when " "making assumptions about the output value. Field orderings will vary (for " @@ -4099,7 +4416,7 @@ msgstr "" "exemple, « mois/jour/année » au lieu de « année/mois/jour »), et le résultat " "peut contenir des caractères non-ASCII." -#: library/datetime.rst:2609 +#: library/datetime.rst:2808 #, fuzzy msgid "" "The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] " @@ -4109,7 +4426,7 @@ msgstr "" "[1, 9999], mais toutes les années < 1000 doivent être représentées sur " "quatre chiffres." -#: library/datetime.rst:2612 +#: library/datetime.rst:2811 #, fuzzy msgid "" "In previous versions, :meth:`~.datetime.strftime` method was restricted to " @@ -4118,7 +4435,7 @@ msgstr "" "Dans les versions précédentes, la méthode :meth:`strftime` était limitée aux " "années >= 1900." -#: library/datetime.rst:2616 +#: library/datetime.rst:2815 #, fuzzy msgid "" "In version 3.2, :meth:`~.datetime.strftime` method was restricted to years " @@ -4126,7 +4443,7 @@ msgid "" msgstr "" "En version 3.2, la méthode :meth:`strftime` était limitée aux années >= 1000." -#: library/datetime.rst:2621 +#: library/datetime.rst:2820 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive " @@ -4137,7 +4454,7 @@ msgstr "" "n'affecte l'heure extraite que si la directive ``%I`` est utilisée pour " "analyser l'heure." -#: library/datetime.rst:2625 +#: library/datetime.rst:2824 #, fuzzy msgid "" "Unlike the :mod:`time` module, the :mod:`!datetime` module does not support " @@ -4146,7 +4463,7 @@ msgstr "" "À l'inverse du module :mod:`time`, le module :mod:`datetime` ne gère pas les " "secondes intercalaires." -#: library/datetime.rst:2629 +#: library/datetime.rst:2828 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive " @@ -4160,7 +4477,7 @@ msgstr "" "du standard C (mais implémentée séparément dans les objets *datetime*, la " "rendant ainsi toujours disponible)." -#: library/datetime.rst:2636 +#: library/datetime.rst:2835 #, fuzzy msgid "" "For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced " @@ -4169,11 +4486,11 @@ msgstr "" "Pour les objets naïfs, les codes de formatage ``%z`` et ``%Z`` sont " "remplacés par des chaînes vides." -#: library/datetime.rst:2639 +#: library/datetime.rst:2838 msgid "For an aware object:" msgstr "Pour un objet avisé :" -#: library/datetime.rst:2642 +#: library/datetime.rst:2841 #, fuzzy msgid "" ":meth:`~.datetime.utcoffset` is transformed into a string of the form " @@ -4183,9 +4500,9 @@ msgid "" "seconds and ``ffffff`` is a 6-digit string giving the number of UTC offset " "microseconds. The ``ffffff`` part is omitted when the offset is a whole " "number of seconds and both the ``ffffff`` and the ``SS`` part is omitted " -"when the offset is a whole number of minutes. For example, if :meth:`~." -"datetime.utcoffset` returns ``timedelta(hours=-3, minutes=-30)``, ``%z`` is " -"replaced with the string ``'-0330'``." +"when the offset is a whole number of minutes. For example, " +"if :meth:`~.datetime.utcoffset` returns ``timedelta(hours=-3, " +"minutes=-30)``, ``%z`` is replaced with the string ``'-0330'``." msgstr "" "Le résultat de :meth:`utcoffset` est transformé en une chaîne sous la forme " "``±HHMM[SS[.ffffff]]``, où ``HH`` est une chaîne de deux chiffres donnant le " @@ -4199,51 +4516,64 @@ msgstr "" "``timedelta(hours=-3, minutes=-30)``, ``%z`` est remplacé par la chaîne " "``'-0330'``." -#: library/datetime.rst:2656 +#: library/datetime.rst:2855 #, fuzzy msgid "" "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " "method, the UTC offsets can have a colon as a separator between hours, " -"minutes and seconds. For example, ``'+01:00:00'`` will be parsed as an " -"offset of one hour. In addition, providing ``'Z'`` is identical to " -"``'+00:00'``." +"minutes and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` " +"will be parsed as an offset of one hour. In addition, providing ``'Z'`` is " +"identical to ``'+00:00'``." msgstr "" "Quand la directive ``%z`` est soumise à la méthode :meth:`strptime`, le " "décalage UTC peut avoir une colonne comme séparateur entre les heures, " "minutes et secondes. Par exemple, ``'+01:00:00'``, est analysé comme un " "décalage d'une heure. Par ailleurs, ``'Z'`` est identique à ``'+00:00'``." -#: library/datetime.rst:2664 +#: library/datetime.rst:2863 msgid "" -"Behaves exactly as ``%z``, but has a colon separator added between hours, " -"minutes and seconds." +"When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, " +"except that a colon separator is added between hours, minutes and seconds." msgstr "" -#: library/datetime.rst:2668 +#: library/datetime.rst:2866 +#, fuzzy +msgid "" +"When used with :meth:`~.datetime.strptime`, the UTC offset is *required* to " +"have a colon as a separator between hours, minutes and seconds. For example, " +"``'+01:00:00'`` (but *not* ``'+010000'``) will be parsed as an offset of one " +"hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." +msgstr "" +"Quand la directive ``%z`` est soumise à la méthode :meth:`strptime`, le " +"décalage UTC peut avoir une colonne comme séparateur entre les heures, " +"minutes et secondes. Par exemple, ``'+01:00:00'``, est analysé comme un " +"décalage d'une heure. Par ailleurs, ``'Z'`` est identique à ``'+00:00'``." + +#: library/datetime.rst:2873 #, fuzzy msgid "" -"In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string if :" -"meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced by " -"the returned value, which must be a string." +"In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string " +"if :meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced " +"by the returned value, which must be a string." msgstr "" "Si :meth:`tzname` renvoie ``None``, ``%Z`` est remplacé par une chaîne vide " "dans :meth:`strftime`. Autrement ``%Z`` est remplacé par la valeur renvoyée, " "qui doit être une chaîne." -#: library/datetime.rst:2672 +#: library/datetime.rst:2877 #, fuzzy msgid ":meth:`~.datetime.strptime` only accepts certain values for ``%Z``:" msgstr ":meth:`strptime` accepte seulement certaines valeurs pour ``%Z`` :" -#: library/datetime.rst:2674 +#: library/datetime.rst:2879 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "toute valeur dans ``time.tzname`` pour votre machine locale" -#: library/datetime.rst:2675 +#: library/datetime.rst:2880 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "les valeurs ``UTC`` et ``GMT`` codés en dur" -#: library/datetime.rst:2677 +#: library/datetime.rst:2882 msgid "" "So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " "values, but probably not ``EST``. It will raise ``ValueError`` for invalid " @@ -4253,7 +4583,7 @@ msgstr "" "``UTC`` et ``GMT``, mais probablement pas ``EST``. Les valeurs invalides " "lèvent ``ValueError``." -#: library/datetime.rst:2681 +#: library/datetime.rst:2886 #, fuzzy msgid "" "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " @@ -4264,7 +4594,7 @@ msgstr "" "objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " "résultat aura pour valeur une instance de :class:`timezone`." -#: library/datetime.rst:2687 +#: library/datetime.rst:2892 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are " @@ -4275,20 +4605,20 @@ msgstr "" "et ``%W`` ne sont utilisées dans les calculs que si le jour de la semaine et " "l'année calendaire (``%Y``) sont spécifiés." -#: library/datetime.rst:2692 +#: library/datetime.rst:2897 #, fuzzy msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " -"day of the week and the ISO year (``%G``) are specified in a :meth:`~." -"datetime.strptime` format string. Also note that ``%G`` and ``%Y`` are not " -"interchangeable." +"day of the week and the ISO year (``%G``) are specified in " +"a :meth:`~.datetime.strptime` format string. Also note that ``%G`` and " +"``%Y`` are not interchangeable." msgstr "" "De façon similaire à ``%U`` et ``%W``, ``%v`` n'est utilisé dans les calculs " "que lorsque le jour de la semaine et l'année ISO (``%G``) sont spécifiés " "dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et " "``%Y`` ne sont pas interchangeables." -#: library/datetime.rst:2698 +#: library/datetime.rst:2903 #, fuzzy msgid "" "When used with the :meth:`~.datetime.strptime` method, the leading zero is " @@ -4301,32 +4631,35 @@ msgstr "" "``%M``, ``%S``, ``%j``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert " "un zéro en entête." -#: library/datetime.rst:2703 +#: library/datetime.rst:2908 msgid "" "When parsing a month and day using :meth:`~.datetime.strptime`, always " "include a year in the format. If the value you need to parse lacks a year, " "append an explicit dummy leap year. Otherwise your code will raise an " "exception when it encounters leap day because the default year used by the " -"parser is not a leap year. Users run into this bug every four years..." +"parser (1900) is not a leap year. Users run into that bug every leap year." +msgstr "" + +#: library/datetime.rst:2920 +msgid "Using ``%d`` without a year now raises :exc:`ValueError`." msgstr "" -#: library/datetime.rst:2715 +#: library/datetime.rst:2923 msgid "" -":meth:`~.datetime.strptime` calls using a format string containing a day of " -"month without a year now emit a :exc:`DeprecationWarning`. In 3.15 or later " -"we may change this into an error or change the default year to a leap year. " -"See :gh:`70647`." +":meth:`~.datetime.strptime` calls using a format string containing ``%e`` " +"without a year now emit a :exc:`DeprecationWarning`." msgstr "" -#: library/datetime.rst:2722 +#: library/datetime.rst:2928 msgid "Footnotes" msgstr "Notes" -#: library/datetime.rst:2723 -msgid "If, that is, we ignore the effects of Relativity" +#: library/datetime.rst:2929 +#, fuzzy +msgid "If, that is, we ignore the effects of relativity." msgstr "Si on ignore les effets de la Relativité" -#: library/datetime.rst:2725 +#: library/datetime.rst:2931 msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " "Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " @@ -4339,7 +4672,7 @@ msgstr "" "base de tous les calculs. Référez-vous au livre pour les algorithmes de " "conversion entre calendriers grégorien proleptique et les autres systèmes." -#: library/datetime.rst:2731 +#: library/datetime.rst:2937 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ pour une bonne explication." -#: library/datetime.rst:2735 #, fuzzy -msgid "" -"Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since 1900 is not " -"a leap year." -msgstr "" -"Passer ``datetime.strptime(‘Feb 29’, ‘%b %d’)`` ne marchera pas car ``1900`` " -"n’est pas une année bissextile." +#~ msgid "" +#~ "Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since 1900 is " +#~ "not a leap year." +#~ msgstr "" +#~ "Passer ``datetime.strptime(‘Feb 29’, ‘%b %d’)`` ne marchera pas car " +#~ "``1900`` n’est pas une année bissextile." + +#~ msgid "" +#~ "Return a date with the same value, except for those parameters given new " +#~ "values by whichever keyword arguments are specified." +#~ msgstr "" +#~ "Renvoie une date avec la même valeur, à l'exception des paramètres nommés " +#~ "pour lesquels une nouvelle valeur est donnée en argument." + +#~ msgid "Method of" +#~ msgstr "Méthode de" + +#~ msgid ":class:`date`; :class:`.datetime`; :class:`.time`" +#~ msgstr ":class:`date` ; :class:`.datetime` ; :class:`.time`" + +#~ msgid ":class:`.datetime`" +#~ msgstr ":class:`.datetime`" #, fuzzy #~ msgid "datetime.fromtimestamp(time.time())" @@ -4395,9 +4743,9 @@ msgstr "" #~ "quel que soit le type de l'objet comparé ::" #~ msgid "" -#~ "For all other comparisons (such as ``<`` and ``>``), when a :class:" -#~ "`timedelta` object is compared to an object of a different type, :exc:" -#~ "`TypeError` is raised::" +#~ "For all other comparisons (such as ``<`` and ``>``), when " +#~ "a :class:`timedelta` object is compared to an object of a different " +#~ "type, :exc:`TypeError` is raised::" #~ msgstr "" #~ "Pour toutes les autres comparaisons (telles que ``<`` et ``>``), " #~ "lorsqu'un objet :class:`timedelta` est comparé à un objet d'un type " @@ -4418,19 +4766,19 @@ msgstr "" #~ "attribute. This hook gives other kinds of date objects a chance at " #~ "implementing mixed-type comparison. If not, when a :class:`date` object " #~ "is compared to an object of a different type, :exc:`TypeError` is raised " -#~ "unless the comparison is ``==`` or ``!=``. The latter cases return :const:" -#~ "`False` or :const:`True`, respectively." +#~ "unless the comparison is ``==`` or ``!=``. The latter cases " +#~ "return :const:`False` or :const:`True`, respectively." #~ msgstr "" -#~ "En d'autres termes, ``date1 < date2`` si et seulement si ``date1." -#~ "toordinal() < date2.toordinal()``. La comparaison de dates lève une :exc:" -#~ "`TypeError` si l'autre opérande n'est pas un objet :class:`date`. " -#~ "Cependant, ``NotImplemented`` est renvoyé à la place si l'autre opérande " -#~ "a un attribut :meth:`timetuple`. Cela permet à d'autres types d'objets " -#~ "dates d'avoir une chance d'implémenter une comparaison entre types " -#~ "différents. Sinon, quand un objet :class:`date` est comparé à un objet " -#~ "d'un type différent, une :exc:`TypeError` est levée à moins que la " -#~ "comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " -#~ "respectivement :const:`False` et :const:`True`." +#~ "En d'autres termes, ``date1 < date2`` si et seulement si " +#~ "``date1.toordinal() < date2.toordinal()``. La comparaison de dates lève " +#~ "une :exc:`TypeError` si l'autre opérande n'est pas un " +#~ "objet :class:`date`. Cependant, ``NotImplemented`` est renvoyé à la place " +#~ "si l'autre opérande a un attribut :meth:`timetuple`. Cela permet à " +#~ "d'autres types d'objets dates d'avoir une chance d'implémenter une " +#~ "comparaison entre types différents. Sinon, quand un objet :class:`date` " +#~ "est comparé à un objet d'un type différent, une :exc:`TypeError` est " +#~ "levée à moins que la comparaison soit ``==`` ou ``!=``. Ces derniers cas " +#~ "renvoient respectivement :const:`False` et :const:`True`." #~ msgid "Compares :class:`.datetime` to :class:`.datetime`. (4)" #~ msgstr "Compare :class:`.datetime` à :class:`.datetime`. (4)" @@ -4447,15 +4795,15 @@ msgstr "" #~ msgid "" #~ "In order to stop comparison from falling back to the default scheme of " -#~ "comparing object addresses, datetime comparison normally raises :exc:" -#~ "`TypeError` if the other comparand isn't also a :class:`.datetime` " -#~ "object. However, ``NotImplemented`` is returned instead if the other " -#~ "comparand has a :meth:`timetuple` attribute. This hook gives other kinds " -#~ "of date objects a chance at implementing mixed-type comparison. If not, " -#~ "when a :class:`.datetime` object is compared to an object of a different " -#~ "type, :exc:`TypeError` is raised unless the comparison is ``==`` or ``!" -#~ "=``. The latter cases return :const:`False` or :const:`True`, " -#~ "respectively." +#~ "comparing object addresses, datetime comparison normally " +#~ "raises :exc:`TypeError` if the other comparand isn't also " +#~ "a :class:`.datetime` object. However, ``NotImplemented`` is returned " +#~ "instead if the other comparand has a :meth:`timetuple` attribute. This " +#~ "hook gives other kinds of date objects a chance at implementing mixed-" +#~ "type comparison. If not, when a :class:`.datetime` object is compared to " +#~ "an object of a different type, :exc:`TypeError` is raised unless the " +#~ "comparison is ``==`` or ``!=``. The latter cases return :const:`False` " +#~ "or :const:`True`, respectively." #~ msgstr "" #~ "Afin d'empêcher la comparaison de retomber sur le schéma par défaut de " #~ "comparaison des adresses des objets, la comparaison *datetime* lève " @@ -4472,11 +4820,12 @@ msgstr "" #~ msgstr "Exemples d'utilisation des objets :class:`~datetime.datetime` :" #~ msgid "" -#~ ":class:`.time` objects support comparison of :class:`.time` to :class:`." -#~ "time`, where *a* is considered less than *b* when *a* precedes *b* in " -#~ "time. If one comparand is naive and the other is aware, :exc:`TypeError` " -#~ "is raised if an order comparison is attempted. For equality comparisons, " -#~ "naive instances are never equal to aware instances." +#~ ":class:`.time` objects support comparison of :class:`.time` " +#~ "to :class:`.time`, where *a* is considered less than *b* when *a* " +#~ "precedes *b* in time. If one comparand is naive and the other is " +#~ "aware, :exc:`TypeError` is raised if an order comparison is attempted. " +#~ "For equality comparisons, naive instances are never equal to aware " +#~ "instances." #~ msgstr "" #~ "Les objets :class:`.time` gèrent la comparaison d'un :class:`.time` avec " #~ "un autre :class:`.time`, où *a* est considéré inférieur à *b* s'il le " @@ -4488,25 +4837,27 @@ msgstr "" #~ msgid "" #~ "If both comparands are aware, and have the same :attr:`~time.tzinfo` " #~ "attribute, the common :attr:`~time.tzinfo` attribute is ignored and the " -#~ "base times are compared. If both comparands are aware and have different :" -#~ "attr:`~time.tzinfo` attributes, the comparands are first adjusted by " -#~ "subtracting their UTC offsets (obtained from ``self.utcoffset()``). In " -#~ "order to stop mixed-type comparisons from falling back to the default " -#~ "comparison by object address, when a :class:`.time` object is compared to " -#~ "an object of a different type, :exc:`TypeError` is raised unless the " -#~ "comparison is ``==`` or ``!=``. The latter cases return :const:`False` " -#~ "or :const:`True`, respectively." +#~ "base times are compared. If both comparands are aware and have " +#~ "different :attr:`~time.tzinfo` attributes, the comparands are first " +#~ "adjusted by subtracting their UTC offsets (obtained from " +#~ "``self.utcoffset()``). In order to stop mixed-type comparisons from " +#~ "falling back to the default comparison by object address, when " +#~ "a :class:`.time` object is compared to an object of a different " +#~ "type, :exc:`TypeError` is raised unless the comparison is ``==`` or ``!" +#~ "=``. The latter cases return :const:`False` or :const:`True`, " +#~ "respectively." #~ msgstr "" -#~ "Si les deux opérandes sont avisés, et ont le même attribut :attr:`~time." -#~ "tzinfo`, l'attribut commun :attr:`~time.tzinfo` est ignoré et les temps " -#~ "de base sont comparés. Si les deux opérandes sont avisés et ont des " -#~ "attributs :attr:`~time.tzinfo` différents, ils sont d'abord ajustés en " -#~ "leur soustrayant leurs décalages UTC (obtenus à l'aide de ``self." -#~ "utcoffset()``). Afin d'empêcher les comparaisons de types mixtes de " -#~ "retomber sur la comparaison par défaut par l'adresse de l'objet, quand un " -#~ "objet :class:`.time` est comparé à un objet de type différent, une :exc:" -#~ "`TypeError` est levée à moins que la comparaison soit ``==`` ou ``!=``. " -#~ "Ces derniers cas renvoient respectivement :const:`False` et :const:`True`." +#~ "Si les deux opérandes sont avisés, et ont le même " +#~ "attribut :attr:`~time.tzinfo`, l'attribut commun :attr:`~time.tzinfo` est " +#~ "ignoré et les temps de base sont comparés. Si les deux opérandes sont " +#~ "avisés et ont des attributs :attr:`~time.tzinfo` différents, ils sont " +#~ "d'abord ajustés en leur soustrayant leurs décalages UTC (obtenus à l'aide " +#~ "de ``self.utcoffset()``). Afin d'empêcher les comparaisons de types " +#~ "mixtes de retomber sur la comparaison par défaut par l'adresse de " +#~ "l'objet, quand un objet :class:`.time` est comparé à un objet de type " +#~ "différent, une :exc:`TypeError` est levée à moins que la comparaison soit " +#~ "``==`` ou ``!=``. Ces derniers cas renvoient " +#~ "respectivement :const:`False` et :const:`True`." #~ msgid "" #~ "Equality comparisons between aware and naive :class:`~datetime.time` " @@ -4537,8 +4888,8 @@ msgstr "" #~ "caractères ISO 8601 - il est uniquement destiné à l'opération réciproque " #~ "de :meth:`datetime.isoformat`. Un analyseur ISO 8601 plus complet, " #~ "``dateutil.parser.isoparse`` est disponible dans le paquet tiers " -#~ "`dateutil `__." +#~ "`dateutil `__." #, fuzzy #~ msgid "" diff --git a/library/dbm.po b/library/dbm.po index a39b04b74..1f72c00b4 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -24,7 +24,7 @@ msgid "**Source code:** :source:`Lib/dbm/__init__.py`" msgstr "**Source code:** :source:`Lib/html/__init__.py`" #: library/dbm.rst:11 -msgid ":mod:`dbm` is a generic interface to variants of the DBM database:" +msgid ":mod:`!dbm` is a generic interface to variants of the DBM database:" msgstr "" #: library/dbm.rst:13 @@ -42,49 +42,57 @@ msgstr "" #: library/dbm.rst:17 msgid "" "If none of these modules are installed, the slow-but-simple implementation " -"in module :mod:`dbm.dumb` will be used. There is a `third party interface " +"in module :mod:`dbm.dumb` will be used. There is a `third party interface " "`_ to the Oracle Berkeley DB." msgstr "" -#: library/dbm.rst:24 +#: library/dbm.rst:23 +msgid "" +"None of the underlying modules will automatically shrink the disk space used " +"by the database file. However, :mod:`dbm.sqlite3`, :mod:`dbm.gnu` " +"and :mod:`dbm.dumb` provide a :meth:`!reorganize` method that can be used " +"for this purpose." +msgstr "" + +#: library/dbm.rst:30 msgid "" "A tuple containing the exceptions that can be raised by each of the " "supported modules, with a unique exception also named :exc:`dbm.error` as " "the first item --- the latter is used when :exc:`dbm.error` is raised." msgstr "" -#: library/dbm.rst:31 +#: library/dbm.rst:37 msgid "" "This function attempts to guess which of the several simple database modules " -"available --- :mod:`dbm.sqlite3`, :mod:`dbm.gnu`, :mod:`dbm.ndbm`, or :mod:" -"`dbm.dumb` --- should be used to open a given file." +"available --- :mod:`dbm.sqlite3`, :mod:`dbm.gnu`, :mod:`dbm.ndbm`, " +"or :mod:`dbm.dumb` --- should be used to open a given file." msgstr "" -#: library/dbm.rst:35 +#: library/dbm.rst:41 #, fuzzy msgid "Return one of the following values:" msgstr "Le module définit :" -#: library/dbm.rst:37 +#: library/dbm.rst:43 msgid "" "``None`` if the file can't be opened because it's unreadable or doesn't exist" msgstr "" -#: library/dbm.rst:38 +#: library/dbm.rst:44 msgid "the empty string (``''``) if the file's format can't be guessed" msgstr "" -#: library/dbm.rst:39 +#: library/dbm.rst:45 msgid "" "a string containing the required module name, such as ``'dbm.ndbm'`` or " "``'dbm.gnu'``" msgstr "" -#: library/dbm.rst:250 library/dbm.rst:448 +#: library/dbm.rst:288 library/dbm.rst:499 msgid "*filename* accepts a :term:`path-like object`." msgstr "" -#: library/dbm.rst:65 +#: library/dbm.rst:71 msgid "Open a database and return the corresponding database object." msgstr "" @@ -92,133 +100,139 @@ msgstr "" msgid "Parameters" msgstr "Paramètres" -#: library/dbm.rst:67 +#: library/dbm.rst:73 msgid "" -"The database file to open. If the database file already exists, the :func:" -"`whichdb` function is used to determine its type and the appropriate module " -"is used; if it does not exist, the first submodule listed above that can be " -"imported is used." +"The database file to open. If the database file already exists, " +"the :func:`whichdb` function is used to determine its type and the " +"appropriate module is used; if it does not exist, the first submodule listed " +"above that can be imported is used." msgstr "" -#: library/dbm.rst:222 +#: library/dbm.rst:260 msgid "The database file to open." msgstr "" -#: library/dbm.rst:70 +#: library/dbm.rst:76 msgid "" "If the database file already exists, the :func:`whichdb` function is used to " "determine its type and the appropriate module is used; if it does not exist, " "the first submodule listed above that can be imported is used." msgstr "" -#: library/dbm.rst:178 library/dbm.rst:353 +#: library/dbm.rst:187 library/dbm.rst:397 msgid "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:180 library/dbm.rst:354 +#: library/dbm.rst:189 library/dbm.rst:398 msgid "``'r'`` (default): |flag_r|" msgstr "" -#: library/dbm.rst:181 library/dbm.rst:355 library/dbm.rst:429 +#: library/dbm.rst:190 library/dbm.rst:399 library/dbm.rst:475 msgid "``'w'``: |flag_w|" msgstr "" -#: library/dbm.rst:182 library/dbm.rst:356 +#: library/dbm.rst:191 library/dbm.rst:400 msgid "``'c'``: |flag_c|" msgstr "" -#: library/dbm.rst:183 library/dbm.rst:357 library/dbm.rst:431 +#: library/dbm.rst:192 library/dbm.rst:401 library/dbm.rst:477 msgid "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:244 library/dbm.rst:433 +#: library/dbm.rst:282 library/dbm.rst:479 msgid "|mode_param_doc|" msgstr "" -#: library/dbm.rst:84 +#: library/dbm.rst:90 msgid "*file* accepts a :term:`path-like object`." msgstr "" -#: library/dbm.rst:87 +#: library/dbm.rst:93 msgid "" -"The object returned by :func:`~dbm.open` supports the same basic " -"functionality as a :class:`dict`; keys and their corresponding values can be " -"stored, retrieved, and deleted, and the :keyword:`in` operator and the :meth:" -"`!keys` method are available, as well as :meth:`!get` and :meth:`!" -"setdefault` methods." +"The object returned by :func:`~dbm.open` supports the basic functionality of " +"mutable :term:`mappings `; keys and their corresponding values can " +"be stored, retrieved, and deleted, and iteration, the :keyword:`in` operator " +"and methods :meth:`!keys`, :meth:`!get`, :meth:`!setdefault` and :meth:`!" +"clear` are available. The :meth:`!keys` method returns a list instead of a " +"view object. The :meth:`!setdefault` method requires two arguments." msgstr "" -#: library/dbm.rst:92 +#: library/dbm.rst:101 msgid "" "Key and values are always stored as :class:`bytes`. This means that when " "strings are used they are implicitly converted to the default encoding " "before being stored." msgstr "" -#: library/dbm.rst:96 +#: library/dbm.rst:105 msgid "" "These objects also support being used in a :keyword:`with` statement, which " "will automatically close them when done." msgstr "" -#: library/dbm.rst:99 +#: library/dbm.rst:108 msgid "" -":meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:" -"`dbm` backends." +":meth:`!get` and :meth:`!setdefault` methods are now available for " +"all :mod:`!dbm` backends." msgstr "" -#: library/dbm.rst:103 +#: library/dbm.rst:112 msgid "" "Added native support for the context management protocol to the objects " "returned by :func:`~dbm.open`." msgstr "" -#: library/dbm.rst:107 +#: library/dbm.rst:116 msgid "" "Deleting a key from a read-only database raises a database module specific " "exception instead of :exc:`KeyError`." msgstr "" -#: library/dbm.rst:111 +#: library/dbm.rst:120 +msgid ":meth:`!clear` methods are now available for all :mod:`!dbm` backends." +msgstr "" + +#: library/dbm.rst:124 msgid "" "The following example records some hostnames and a corresponding title, and " "then prints out the contents of the database::" msgstr "" -#: library/dbm.rst:141 +#: library/dbm.rst:154 msgid "Module :mod:`shelve`" msgstr "Module :mod:`shelve`" -#: library/dbm.rst:142 +#: library/dbm.rst:155 msgid "Persistence module which stores non-string data." msgstr "" -#: library/dbm.rst:145 +#: library/dbm.rst:158 msgid "The individual submodules are described in the following sections." msgstr "" -#: library/dbm.rst:148 -msgid ":mod:`dbm.sqlite3` --- SQLite backend for dbm" +#: library/dbm.rst:161 +msgid ":mod:`!dbm.sqlite3` --- SQLite backend for dbm" msgstr "" -#: library/dbm.rst:156 +#: library/dbm.rst:168 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/sqlite3.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:160 +#: library/dbm.rst:172 msgid "" "This module uses the standard library :mod:`sqlite3` module to provide an " -"SQLite backend for the :mod:`dbm` module. The files created by :mod:`dbm." -"sqlite3` can thus be opened by :mod:`sqlite3`, or any other SQLite browser, " -"including the SQLite CLI." +"SQLite backend for the :mod:`!dbm` module. The files created by :mod:`!" +"dbm.sqlite3` can thus be opened by :mod:`sqlite3`, or any other SQLite " +"browser, including the SQLite CLI." msgstr "" -#: includes/wasm-mobile-notavail.rst:3 includes/wasm-notavail.rst:3 +#: library/dbm.rst:375 includes/wasm-mobile-notavail.rst:3 +#: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -226,42 +240,70 @@ msgid "" "availability` for more information." msgstr "" -#: library/dbm.rst:169 -msgid "" -"Open an SQLite database. The returned object behaves like a :term:`mapping`, " -"implements a :meth:`!close` method, and supports a \"closing\" context " -"manager via the :keyword:`with` keyword." +#: library/dbm.rst:181 +msgid "Open an SQLite database." msgstr "" -#: library/dbm.rst:174 +#: library/dbm.rst:183 msgid "The path to the database to be opened." msgstr "" -#: library/dbm.rst:185 +#: library/dbm.rst:194 msgid "" "The Unix file access mode of the file (default: octal ``0o666``), used only " "when the database has to be created." msgstr "" -#: library/dbm.rst:191 -msgid ":mod:`dbm.gnu` --- GNU database manager" +#: library/dbm.rst:198 +msgid "" +"The returned database object behaves similar to a mutable :term:`mapping`, " +"but the :meth:`!keys` method returns a list, and the :meth:`!setdefault` " +"method requires two arguments. It also supports a \"closing\" context " +"manager via the :keyword:`with` keyword." +msgstr "" + +#: library/dbm.rst:304 library/dbm.rst:507 +msgid "The following methods are also provided:" +msgstr "" + +#: library/dbm.rst:207 +msgid "Close the SQLite database." +msgstr "" + +#: library/dbm.rst:211 +msgid "" +"If you have carried out a lot of deletions and would like to shrink the " +"space used on disk, this method will reorganize the database; otherwise, " +"deleted file space will be kept and reused as new (key, value) pairs are " +"added." +msgstr "" + +#: library/dbm.rst:216 +msgid "" +"While reorganizing, as much as two times the size of the original database " +"is required in free disk space. However, be aware that this factor changes " +"for each :mod:`!dbm` submodule." +msgstr "" + +#: library/dbm.rst:223 +msgid ":mod:`!dbm.gnu` --- GNU database manager" msgstr "" -#: library/dbm.rst:197 +#: library/dbm.rst:228 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/gnu.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:201 +#: library/dbm.rst:232 msgid "" -"The :mod:`dbm.gnu` module provides an interface to the :abbr:`GDBM (GNU " +"The :mod:`!dbm.gnu` module provides an interface to the :abbr:`GDBM (GNU " "dbm)` library, similar to the :mod:`dbm.ndbm` module, but with additional " "functionality like crash tolerance." msgstr "" -#: library/dbm.rst:321 +#: library/dbm.rst:238 msgid "" -"The file formats created by :mod:`dbm.gnu` and :mod:`dbm.ndbm` are " +"The file formats created by :mod:`!dbm.gnu` and :mod:`dbm.ndbm` are " "incompatible and can not be used interchangeably." msgstr "" @@ -271,18 +313,24 @@ msgid "" "availability>` or :ref:`WebAssembly platforms `." msgstr "" -#: library/dbm.rst:214 +#: library/dbm.rst:247 msgid "" -"Raised on :mod:`dbm.gnu`-specific errors, such as I/O errors. :exc:" -"`KeyError` is raised for general mapping errors like specifying an incorrect " -"key." +"Raised on :mod:`!dbm.gnu`-specific errors, such as I/O " +"errors. :exc:`KeyError` is raised for general mapping errors like specifying " +"an incorrect key." msgstr "" -#: library/dbm.rst:220 +#: library/dbm.rst:253 +msgid "" +"A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` " +"supports." +msgstr "" + +#: library/dbm.rst:258 msgid "Open a GDBM database and return a :class:`!gdbm` object." msgstr "" -#: library/dbm.rst:226 +#: library/dbm.rst:264 msgid "" "* ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * " "``'n'``: |flag_n| The following additional characters may be appended to " @@ -294,29 +342,29 @@ msgid "" "flag characters." msgstr "" -#: library/dbm.rst:232 +#: library/dbm.rst:270 msgid "" "The following additional characters may be appended to control how the " "database is opened:" msgstr "" -#: library/dbm.rst:235 +#: library/dbm.rst:273 msgid "" "``'f'``: Open the database in fast mode. Writes to the database will not be " "synchronized." msgstr "" -#: library/dbm.rst:237 +#: library/dbm.rst:275 msgid "" "``'s'``: Synchronized mode. Changes to the database will be written " "immediately to the file." msgstr "" -#: library/dbm.rst:239 +#: library/dbm.rst:277 msgid "``'u'``: Do not lock database." msgstr "" -#: library/dbm.rst:241 +#: library/dbm.rst:279 msgid "" "Not all flags are valid for all versions of GDBM. See the :data:`open_flags` " "member for a list of supported flag characters." @@ -326,24 +374,32 @@ msgstr "" msgid "Raises" msgstr "" -#: library/dbm.rst:247 +#: library/dbm.rst:285 msgid "If an invalid *flag* argument is passed." msgstr "" -#: library/dbm.rst:255 +#: library/dbm.rst:291 msgid "" -"A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` " -"supports." +":class:`!gdbm` objects behave similar to mutable :term:`mappings `, " +"but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, " +"and :meth:`!update` are not supported, the :meth:`!keys` method returns a " +"list, and the :meth:`!setdefault` method requires two arguments. It also " +"supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:257 -msgid "" -":class:`!gdbm` objects behave similar to :term:`mappings `, but :" -"meth:`!items` and :meth:`!values` methods are not supported. The following " -"methods are also provided:" +#: library/dbm.rst:416 +msgid "Added the :meth:`!get` and :meth:`!setdefault` methods." +msgstr "" + +#: library/dbm.rst:419 +msgid "Added the :meth:`!clear` method." +msgstr "" + +#: library/dbm.rst:308 +msgid "Close the GDBM database." msgstr "" -#: library/dbm.rst:263 +#: library/dbm.rst:312 msgid "" "It's possible to loop over every key in the database using this method and " "the :meth:`nextkey` method. The traversal is ordered by GDBM's internal " @@ -351,53 +407,58 @@ msgid "" "starting key." msgstr "" -#: library/dbm.rst:270 +#: library/dbm.rst:319 msgid "" "Returns the key that follows *key* in the traversal. The following code " "prints every key in the database ``db``, without having to create a list in " "memory that contains them all::" msgstr "" -#: library/dbm.rst:281 +#: library/dbm.rst:330 msgid "" "If you have carried out a lot of deletions and would like to shrink the " -"space used by the GDBM file, this routine will reorganize the database. :" -"class:`!gdbm` objects will not shorten the length of a database file except " -"by using this reorganization; otherwise, deleted file space will be kept and " -"reused as new (key, value) pairs are added." +"space used by the GDBM file, this routine will reorganize the " +"database. :class:`!gdbm` objects will not shorten the length of a database " +"file except by using this reorganization; otherwise, deleted file space will " +"be kept and reused as new (key, value) pairs are added." msgstr "" -#: library/dbm.rst:289 +#: library/dbm.rst:337 msgid "" -"When the database has been opened in fast mode, this method forces any " -"unwritten data to be written to the disk." -msgstr "" - -#: library/dbm.rst:294 -msgid "Close the GDBM database." +"While reorganizing, as much as one time the size of the original database is " +"required in free disk space. However, be aware that this factor changes for " +"each :mod:`!dbm` submodule." msgstr "" -#: library/dbm.rst:298 -msgid "Remove all items from the GDBM database." +#: library/dbm.rst:342 +msgid "" +"When the database has been opened in fast mode, this method forces any " +"unwritten data to be written to the disk." msgstr "" -#: library/dbm.rst:304 -msgid ":mod:`dbm.ndbm` --- New Database Manager" +#: library/dbm.rst:347 +msgid ":mod:`!dbm.ndbm` --- New Database Manager" msgstr "" -#: library/dbm.rst:310 +#: library/dbm.rst:352 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:314 +#: library/dbm.rst:356 msgid "" -"The :mod:`dbm.ndbm` module provides an interface to the :abbr:`NDBM (New " +"The :mod:`!dbm.ndbm` module provides an interface to the :abbr:`NDBM (New " "Database Manager)` library. This module can be used with the \"classic\" " "NDBM interface or the :abbr:`GDBM (GNU dbm)` compatibility interface." msgstr "" -#: library/dbm.rst:326 +#: library/dbm.rst:363 +msgid "" +"The file formats created by :mod:`dbm.gnu` and :mod:`!dbm.ndbm` are " +"incompatible and can not be used interchangeably." +msgstr "" + +#: library/dbm.rst:368 msgid "" "The NDBM library shipped as part of macOS has an undocumented limitation on " "the size of values, which can result in corrupted database files when " @@ -405,125 +466,124 @@ msgid "" "result in a hard crash (segmentation fault)." msgstr "" -#: library/dbm.rst:335 +#: library/dbm.rst:379 msgid "" -"Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. :exc:" -"`KeyError` is raised for general mapping errors like specifying an incorrect " -"key." +"Raised on :mod:`!dbm.ndbm`-specific errors, such as I/O " +"errors. :exc:`KeyError` is raised for general mapping errors like specifying " +"an incorrect key." msgstr "" -#: library/dbm.rst:341 +#: library/dbm.rst:385 msgid "Name of the NDBM implementation library used." msgstr "" -#: library/dbm.rst:346 +#: library/dbm.rst:390 msgid "Open an NDBM database and return an :class:`!ndbm` object." msgstr "" -#: library/dbm.rst:348 +#: library/dbm.rst:392 msgid "" "The basename of the database file (without the :file:`.dir` or :file:`.pag` " "extensions)." msgstr "" -#: library/dbm.rst:362 -msgid "" -":class:`!ndbm` objects behave similar to :term:`mappings `, but :" -"meth:`!items` and :meth:`!values` methods are not supported. The following " -"methods are also provided:" +#: library/dbm.rst:406 +msgid "Accepts :term:`path-like object` for filename." msgstr "" -#: library/dbm.rst:366 -msgid "Accepts :term:`path-like object` for filename." +#: library/dbm.rst:409 +msgid "" +":class:`!ndbm` objects behave similar to mutable :term:`mappings `, " +"but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, " +"and :meth:`!update` are not supported, the :meth:`!keys` method returns a " +"list, and the :meth:`!setdefault` method requires two arguments. It also " +"supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:371 -msgid "Close the NDBM database." +#: library/dbm.rst:422 +msgid "The following method is also provided:" msgstr "" -#: library/dbm.rst:375 -msgid "Remove all items from the NDBM database." +#: library/dbm.rst:426 +msgid "Close the NDBM database." msgstr "" -#: library/dbm.rst:381 -msgid ":mod:`dbm.dumb` --- Portable DBM implementation" +#: library/dbm.rst:430 +msgid ":mod:`!dbm.dumb` --- Portable DBM implementation" msgstr "" -#: library/dbm.rst:386 +#: library/dbm.rst:435 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/dumb.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:392 +#: library/dbm.rst:441 msgid "" -"The :mod:`dbm.dumb` module is intended as a last resort fallback for the :" -"mod:`dbm` module when a more robust module is not available. The :mod:`dbm." -"dumb` module is not written for speed and is not nearly as heavily used as " -"the other database modules." +"The :mod:`!dbm.dumb` module is intended as a last resort fallback for " +"the :mod:`!dbm` module when a more robust module is not available. " +"The :mod:`!dbm.dumb` module is not written for speed and is not nearly as " +"heavily used as the other database modules." msgstr "" -#: library/dbm.rst:399 +#: library/dbm.rst:448 msgid "" -"The :mod:`dbm.dumb` module provides a persistent :class:`dict`-like " -"interface which is written entirely in Python. Unlike other :mod:`dbm` " +"The :mod:`!dbm.dumb` module provides a persistent :class:`dict`-like " +"interface which is written entirely in Python. Unlike other :mod:`!dbm` " "backends, such as :mod:`dbm.gnu`, no external library is required." msgstr "" -#: library/dbm.rst:404 +#: library/dbm.rst:453 #, fuzzy msgid "The :mod:`!dbm.dumb` module defines the following:" msgstr "Le module définit :" -#: library/dbm.rst:408 +#: library/dbm.rst:457 msgid "" -"Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. :exc:" -"`KeyError` is raised for general mapping errors like specifying an incorrect " -"key." +"Raised on :mod:`!dbm.dumb`-specific errors, such as I/O " +"errors. :exc:`KeyError` is raised for general mapping errors like " +"specifying an incorrect key." msgstr "" -#: library/dbm.rst:414 -msgid "" -"Open a :mod:`!dbm.dumb` database. The returned database object behaves " -"similar to a :term:`mapping`, in addition to providing :meth:`~dumbdbm.sync` " -"and :meth:`~dumbdbm.close` methods." +#: library/dbm.rst:463 +msgid "Open a :mod:`!dbm.dumb` database." msgstr "" -#: library/dbm.rst:419 +#: library/dbm.rst:465 msgid "" "The basename of the database file (without extensions). A new database " -"creates the following files: - :file:`{filename}.dat` - :file:`{filename}." -"dir`" +"creates the following files: - :file:`{filename}.dat` " +"- :file:`{filename}.dir`" msgstr "" -#: library/dbm.rst:420 +#: library/dbm.rst:466 msgid "" "The basename of the database file (without extensions). A new database " "creates the following files:" msgstr "" -#: library/dbm.rst:423 +#: library/dbm.rst:469 msgid ":file:`{filename}.dat`" msgstr "" -#: library/dbm.rst:424 +#: library/dbm.rst:470 msgid ":file:`{filename}.dir`" msgstr "" -#: library/dbm.rst:427 +#: library/dbm.rst:473 msgid "" "* ``'r'``: |flag_r| * ``'w'``: |flag_w| * ``'c'`` (default): |flag_c| * " "``'n'``: |flag_n|" msgstr "" -#: library/dbm.rst:428 +#: library/dbm.rst:474 msgid "``'r'``: |flag_r|" msgstr "" -#: library/dbm.rst:430 +#: library/dbm.rst:476 msgid "``'c'`` (default): |flag_c|" msgstr "" -#: library/dbm.rst:437 +#: library/dbm.rst:483 #, fuzzy msgid "" "It is possible to crash the Python interpreter when loading a database with " @@ -534,31 +594,53 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " "la limitation de la profondeur de la pile d'appels." -#: library/dbm.rst:441 +#: library/dbm.rst:488 +msgid "" +":mod:`!dbm.dumb` does not support concurrent read/write access. (Multiple " +"simultaneous read accesses are safe.) When a program has the database open " +"for writing, no other program should have it open for reading or writing." +msgstr "" + +#: library/dbm.rst:492 msgid "" ":func:`~dbm.dumb.open` always creates a new database when *flag* is ``'n'``." msgstr "" -#: library/dbm.rst:444 +#: library/dbm.rst:495 msgid "" "A database opened read-only if *flag* is ``'r'``. A database is not created " "if it does not exist if *flag* is ``'r'`` or ``'w'``." msgstr "" -#: library/dbm.rst:451 +#: library/dbm.rst:502 msgid "" -"In addition to the methods provided by the :class:`collections.abc." -"MutableMapping` class, the following methods are provided:" +"The returned database object behaves similar to a mutable :term:`mapping`, " +"but the :meth:`!keys` and :meth:`!items` methods return lists, and " +"the :meth:`!setdefault` method requires two arguments. It also supports a " +"\"closing\" context manager via the :keyword:`with` keyword." msgstr "" -#: library/dbm.rst:457 +#: library/dbm.rst:511 +msgid "Close the database." +msgstr "" + +#: library/dbm.rst:515 msgid "" -"Synchronize the on-disk directory and data files. This method is called by " -"the :meth:`Shelve.sync` method." +"If you have carried out a lot of deletions and would like to shrink the " +"space used on disk, this method will reorganize the database; otherwise, " +"deleted file space will not be reused." msgstr "" -#: library/dbm.rst:462 -msgid "Close the database." +#: library/dbm.rst:520 +msgid "" +"While reorganizing, no additional free disk space is required. However, be " +"aware that this factor changes for each :mod:`!dbm` submodule." +msgstr "" + +#: library/dbm.rst:527 +msgid "" +"Synchronize the on-disk directory and data files. This method is called by " +"the :meth:`shelve.Shelf.sync` method." msgstr "" #~ msgid "Value" diff --git a/library/debug.po b/library/debug.po index fdfd80d7b..db7238b14 100644 --- a/library/debug.po +++ b/library/debug.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-10-31 11:32+0100\n" "Last-Translator: Cléo Buck \n" "Language-Team: FRENCH \n" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 2.0.6\n" #: library/debug.rst:3 -msgid "Debugging and Profiling" +#, fuzzy +msgid "Debugging and profiling" msgstr "Débogueur et instrumentation" #: library/debug.rst:5 diff --git a/library/decimal.po b/library/decimal.po index 01d411e5d..f3555e352 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-05-20 20:21+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,28 +20,29 @@ msgstr "" msgid ":mod:`!decimal` --- Decimal fixed-point and floating-point arithmetic" msgstr ":mod:`decimal` — Arithmétique décimale en virgule fixe et flottante" -#: library/decimal.rst:15 +#: library/decimal.rst:7 msgid "**Source code:** :source:`Lib/decimal.py`" msgstr "**Code source :** :source:`Lib/decimal.py`" -#: library/decimal.rst:33 +#: library/decimal.rst:25 #, fuzzy msgid "" -"The :mod:`decimal` module provides support for fast correctly rounded " -"decimal floating-point arithmetic. It offers several advantages over the :" -"class:`float` datatype:" +"The :mod:`!decimal` module provides support for fast correctly rounded " +"decimal floating-point arithmetic. It offers several advantages over " +"the :class:`float` datatype:" msgstr "" "Le module :mod:`decimal` fournit une arithmétique en virgule flottante " "rapide et produisant des arrondis mathématiquement corrects. Il possède " "plusieurs avantages par rapport au type :class:`float` :" -#: library/decimal.rst:37 +#: library/decimal.rst:29 +#, fuzzy msgid "" -"Decimal \"is based on a floating-point model which was designed with people " -"in mind, and necessarily has a paramount guiding principle -- computers must " -"provide an arithmetic that works in the same way as the arithmetic that " -"people learn at school.\" -- excerpt from the decimal arithmetic " -"specification." +"Decimal \"is based on a `floating-point model `__ which was designed with people in mind, " +"and necessarily has a paramount guiding principle -- computers must provide " +"an arithmetic that works in the same way as the arithmetic that people learn " +"at school.\" -- excerpt from the decimal arithmetic specification." msgstr "" "Le module ``decimal`` « est basé sur un modèle en virgule flottante conçu " "pour les humains, qui suit ce principe directeur : l'ordinateur doit fournir " @@ -49,7 +50,7 @@ msgstr "" "apprend à l'école » – extrait (traduit) de la spécification de " "l'arithmétique décimale." -#: library/decimal.rst:42 +#: library/decimal.rst:36 msgid "" "Decimal numbers can be represented exactly. In contrast, numbers like " "``1.1`` and ``2.2`` do not have exact representations in binary floating " @@ -62,7 +63,7 @@ msgstr "" "s'attend typiquement pas à obtenir ``3.3000000000000003`` lorsqu'il saisit " "``1.1 + 2.2``, ce qui se passe en arithmétique binaire à virgule flottante." -#: library/decimal.rst:47 +#: library/decimal.rst:41 msgid "" "The exactness carries over into arithmetic. In decimal floating point, " "``0.1 + 0.1 + 0.1 - 0.3`` is exactly equal to zero. In binary floating " @@ -79,7 +80,7 @@ msgstr "" "s'accumuler. Pour ces raisons ``decimal`` est le module utilisé pour des " "applications comptables ayant des contraintes strictes de fiabilité." -#: library/decimal.rst:54 +#: library/decimal.rst:48 msgid "" "The decimal module incorporates a notion of significant places so that " "``1.30 + 1.20`` is ``2.50``. The trailing zero is kept to indicate " @@ -96,7 +97,7 @@ msgstr "" "facteurs. Par exemple, ``1.3 * 1.2`` donne ``1.56`` tandis que ``1.30 * " "1.20`` donne ``1.5600``." -#: library/decimal.rst:61 +#: library/decimal.rst:55 msgid "" "Unlike hardware based binary floating point, the decimal module has a user " "alterable precision (defaulting to 28 places) which can be as large as " @@ -107,7 +108,7 @@ msgstr "" "chiffres significatifs) qui peut être aussi élevée que nécessaire pour un " "problème donné :" -#: library/decimal.rst:73 +#: library/decimal.rst:67 msgid "" "Both binary and decimal floating point are implemented in terms of published " "standards. While the built-in float type exposes only a modest portion of " @@ -124,7 +125,7 @@ msgstr "" "possibilité de forcer une arithmétique exacte en utilisant des exceptions " "pour bloquer toute opération inexacte." -#: library/decimal.rst:80 +#: library/decimal.rst:74 msgid "" "The decimal module was designed to support \"without prejudice, both exact " "unrounded decimal arithmetic (sometimes called fixed-point arithmetic) and " @@ -136,7 +137,7 @@ msgstr "" "fixe) et à la fois une arithmétique en virgule flottante » (extrait traduit " "de la spécification de l'arithmétique décimale)." -#: library/decimal.rst:85 +#: library/decimal.rst:79 msgid "" "The module design is centered around three concepts: the decimal number, " "the context for arithmetic, and signals." @@ -144,7 +145,7 @@ msgstr "" "Le module est conçu autour de trois concepts : le nombre décimal, le " "contexte arithmétique et les signaux." -#: library/decimal.rst:88 +#: library/decimal.rst:82 msgid "" "A decimal number is immutable. It has a sign, coefficient digits, and an " "exponent. To preserve significance, the coefficient digits do not truncate " @@ -158,42 +159,40 @@ msgstr "" "spéciales telles que ``Infinity``, ``-Infinity`` et ``NaN``. Le standard " "fait également la différence entre ``-0`` et ``+0``." -#: library/decimal.rst:94 +#: library/decimal.rst:88 msgid "" "The context for arithmetic is an environment specifying precision, rounding " "rules, limits on exponents, flags indicating the results of operations, and " "trap enablers which determine whether signals are treated as exceptions. " -"Rounding options include :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :const:" -"`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :const:" -"`ROUND_HALF_UP`, :const:`ROUND_UP`, and :const:`ROUND_05UP`." +"Rounding options " +"include :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :const:`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :const:`ROUND_HALF_UP`, :const:`ROUND_UP`, " +"and :const:`ROUND_05UP`." msgstr "" "Le contexte de l'arithmétique est un environnement qui permet de configurer " "une précision, une règle pour l'arrondi, des limites sur l'exposant, des " "options indiquant le résultat des opérations et si les signaux (remontés " "lors d'opérations illégales) sont traités comme des exceptions Python. Les " -"options d'arrondi incluent :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :" -"const:`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :" -"const:`ROUND_HALF_UP`, :const:`ROUND_UP` et :const:`ROUND_05UP`." +"options d'arrondi " +"incluent :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :const:`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :const:`ROUND_HALF_UP`, :const:`ROUND_UP` " +"et :const:`ROUND_05UP`." -#: library/decimal.rst:101 +#: library/decimal.rst:95 msgid "" "Signals are groups of exceptional conditions arising during the course of " "computation. Depending on the needs of the application, signals may be " "ignored, considered as informational, or treated as exceptions. The signals " -"in the decimal module are: :const:`Clamped`, :const:`InvalidOperation`, :" -"const:`DivisionByZero`, :const:`Inexact`, :const:`Rounded`, :const:" -"`Subnormal`, :const:`Overflow`, :const:`Underflow` and :const:" -"`FloatOperation`." +"in the decimal module " +"are: :const:`Clamped`, :const:`InvalidOperation`, :const:`DivisionByZero`, :const:`Inexact`, :const:`Rounded`, :const:`Subnormal`, :const:`Overflow`, :const:`Underflow` " +"and :const:`FloatOperation`." msgstr "" "Les signaux sont des groupes de conditions exceptionnelles qui surviennent " "durant le calcul. Selon les besoins de l'application, les signaux peuvent " "être ignorés, considérés comme de l'information, ou bien traités comme des " -"exceptions. Les signaux dans le module ``decimal`` sont : :const:`Clamped`, :" -"const:`InvalidOperation`, :const:`DivisionByZero`, :const:`Inexact`, :const:" -"`Rounded`, :const:`Subnormal`, :const:`Overflow`, :const:`Underflow` et :" -"const:`FloatOperation`." +"exceptions. Les signaux dans le module ``decimal`` " +"sont : :const:`Clamped`, :const:`InvalidOperation`, :const:`DivisionByZero`, :const:`Inexact`, :const:`Rounded`, :const:`Subnormal`, :const:`Overflow`, :const:`Underflow` " +"et :const:`FloatOperation`." -#: library/decimal.rst:108 +#: library/decimal.rst:102 msgid "" "For each signal there is a flag and a trap enabler. When a signal is " "encountered, its flag is set to one, then, if the trap enabler is set to " @@ -207,7 +206,7 @@ msgstr "" "persistante, l'utilisateur doit donc remettre les drapeaux à zéro avant de " "commencer un calcul qu'il souhaite surveiller." -#: library/decimal.rst:116 +#: library/decimal.rst:110 msgid "" "IBM's General Decimal Arithmetic Specification, `The General Decimal " "Arithmetic Specification `_." @@ -216,21 +215,22 @@ msgstr "" "Arithmetic Specification `_ " "(article en anglais)." -#: library/decimal.rst:125 -msgid "Quick-start Tutorial" +#: library/decimal.rst:119 +#, fuzzy +msgid "Quick-start tutorial" msgstr "Introduction pratique" -#: library/decimal.rst:127 +#: library/decimal.rst:121 msgid "" "The usual start to using decimals is importing the module, viewing the " "current context with :func:`getcontext` and, if necessary, setting new " "values for precision, rounding, or enabled traps::" msgstr "" -"Commençons par importer le module, regarder le contexte actuel avec :func:" -"`getcontext` et, si nécessaire, configurer la précision, l'arrondi et la " -"gestion des signaux ::" +"Commençons par importer le module, regarder le contexte actuel " +"avec :func:`getcontext` et, si nécessaire, configurer la précision, " +"l'arrondi et la gestion des signaux ::" -#: library/decimal.rst:139 +#: library/decimal.rst:133 msgid "" "Decimal instances can be constructed from integers, strings, floats, or " "tuples. Construction from an integer or a float performs an exact conversion " @@ -245,7 +245,7 @@ msgstr "" "telles que ``NaN`` qui signifie en anglais « *Not a number* », en français " "« pas un nombre », des ``Infinity`` positifs ou négatifs et ``-0`` ::" -#: library/decimal.rst:163 +#: library/decimal.rst:157 msgid "" "If the :exc:`FloatOperation` signal is trapped, accidental mixing of " "decimals and floats in constructors or ordering comparisons raises an " @@ -255,7 +255,7 @@ msgstr "" "accidentel d'objets ``Decimal`` et de ``float`` dans les constructeurs ou " "des opérations de comparaison lève une exception ::" -#: library/decimal.rst:182 +#: library/decimal.rst:176 msgid "" "The significance of a new Decimal is determined solely by the number of " "digits input. Context precision and rounding only come into play during " @@ -265,7 +265,7 @@ msgstr "" "déterminé entièrement par le nombre de chiffres saisis. La précision et les " "règles d'arrondis n'interviennent que lors d'opérations arithmétiques." -#: library/decimal.rst:199 +#: library/decimal.rst:193 msgid "" "If the internal limits of the C version are exceeded, constructing a decimal " "raises :class:`InvalidOperation`::" @@ -273,7 +273,7 @@ msgstr "" "Si les limites internes de la version en C sont dépassées, la construction " "d'un objet décimal lève l'exception :class:`InvalidOperation` ::" -#: library/decimal.rst:209 +#: library/decimal.rst:203 #, fuzzy msgid "" "Decimals interact well with much of the rest of Python. Here is a small " @@ -282,13 +282,20 @@ msgstr "" "Les objets ``Decimal`` interagissent très bien avec le reste de Python. " "Voici quelques exemples d'opérations avec des décimaux :" -#: library/decimal.rst:241 +#: library/decimal.rst:235 +msgid "" +"Decimals can be formatted (with :func:`format` built-in or :ref:`f-strings`) " +"in fixed-point or scientific notation, using the same formatting syntax " +"(see :ref:`formatspec`) as builtin :class:`float` type:" +msgstr "" + +#: library/decimal.rst:255 msgid "And some mathematical functions are also available to Decimal:" msgstr "" "Et certaines fonctions mathématiques sont également disponibles sur des " "instances de ``Decimal`` :" -#: library/decimal.rst:253 +#: library/decimal.rst:267 msgid "" "The :meth:`~Decimal.quantize` method rounds a number to a fixed exponent. " "This method is useful for monetary applications that often round results to " @@ -299,7 +306,7 @@ msgstr "" "arrondissent souvent un résultat à un nombre déterminé de chiffres après la " "virgule :" -#: library/decimal.rst:262 +#: library/decimal.rst:276 msgid "" "As shown above, the :func:`getcontext` function accesses the current context " "and allows the settings to be changed. This approach meets the needs of " @@ -309,29 +316,31 @@ msgstr "" "actuel et permet de modifier les paramètres. Cette approche répond aux " "besoins de la plupart des applications." -#: library/decimal.rst:266 +#: library/decimal.rst:280 +#, fuzzy msgid "" "For more advanced work, it may be useful to create alternate contexts using " -"the Context() constructor. To make an alternate active, use the :func:" -"`setcontext` function." +"the :meth:`Context` constructor. To make an alternate active, use " +"the :func:`setcontext` function." msgstr "" "Pour un travail plus avancé, il peut être utile de créer des contextes " "alternatifs en utilisant le constructeur de ``Context``. Pour activer cet " "objet ``Context``, utilisez la fonction :func:`setcontext`." -#: library/decimal.rst:270 +#: library/decimal.rst:284 +#, fuzzy msgid "" -"In accordance with the standard, the :mod:`decimal` module provides two " -"ready to use standard contexts, :const:`BasicContext` and :const:" -"`ExtendedContext`. The former is especially useful for debugging because " -"many of the traps are enabled:" +"In accordance with the standard, the :mod:`!decimal` module provides two " +"ready to use standard contexts, :const:`BasicContext` " +"and :const:`ExtendedContext`. The former is especially useful for debugging " +"because many of the traps are enabled:" msgstr "" "En accord avec le standard, le module :mod:`decimal` fournit des objets " "*Context* standards, :const:`BasicContext` et :const:`ExtendedContext`. Le " "premier est particulièrement utile pour le débogage car beaucoup des signaux " "ont leur déroutement activé :" -#: library/decimal.rst:299 +#: library/decimal.rst:313 msgid "" "Contexts also have signal flags for monitoring exceptional conditions " "encountered during computations. The flags remain set until explicitly " @@ -341,10 +350,10 @@ msgstr "" "Les objets ``Context`` ont aussi des options pour détecter des opérations " "illégales lors des calculs. Ces options restent activées jusqu'à ce qu'elles " "soit remises à zéro de manière explicite. Il convient donc de remettre à " -"zéro ces options avant chaque inspection de chaque calcul, avec la méthode :" -"meth:`~Context.clear_flags`. ::" +"zéro ces options avant chaque inspection de chaque calcul, avec la " +"méthode :meth:`~Context.clear_flags`. ::" -#: library/decimal.rst:312 +#: library/decimal.rst:326 msgid "" "The *flags* entry shows that the rational approximation to pi was rounded " "(digits beyond the context precision were thrown away) and that the result " @@ -355,7 +364,7 @@ msgstr "" "*Context* ont été tronqués) et que le résultat est différent (certains des " "chiffres tronqués étaient différents de zéro)." -#: library/decimal.rst:316 +#: library/decimal.rst:330 msgid "" "Individual traps are set using the dictionary in the :attr:`~Context.traps` " "attribute of a context:" @@ -363,7 +372,7 @@ msgstr "" "L'activation du déroutement se fait en utilisant un dictionnaire dans " "l'attribut :attr:`~Context.traps` du contexte :" -#: library/decimal.rst:331 +#: library/decimal.rst:345 msgid "" "Most programs adjust the current context only once, at the beginning of the " "program. And, in many applications, data is converted to :class:`Decimal` " @@ -378,41 +387,44 @@ msgstr "" "manipule les données de la même manière qu'avec d'autres types numériques " "Python." -#: library/decimal.rst:343 +#: library/decimal.rst:357 msgid "Decimal objects" msgstr "Les objets *Decimal*" -#: library/decimal.rst:348 +#: library/decimal.rst:362 msgid "Construct a new :class:`Decimal` object based from *value*." msgstr "Construit un nouvel objet :class:`Decimal` à partir de *value*." -#: library/decimal.rst:350 +#: library/decimal.rst:364 msgid "" -"*value* can be an integer, string, tuple, :class:`float`, or another :class:" -"`Decimal` object. If no *value* is given, returns ``Decimal('0')``. If " -"*value* is a string, it should conform to the decimal numeric string syntax " -"after leading and trailing whitespace characters, as well as underscores " -"throughout, are removed::" +"*value* can be an integer, string, tuple, :class:`float`, or " +"another :class:`Decimal` object. If no *value* is given, returns " +"``Decimal('0')``. If *value* is a string, it should conform to the decimal " +"numeric string syntax after leading and trailing whitespace characters, as " +"well as underscores throughout, are removed::" msgstr "" -"*value* peut être un entier, une chaîne de caractères, un *n*-uplet, un :" -"class:`float` ou une autre instance de :class:`Decimal`. Si *value* n'est " -"pas fourni, le constructeur renvoie ``Decimal('0')``. Si *value* est une " -"chaîne de caractères, elle doit correspondre à la syntaxe décimale en dehors " -"des espaces de début et de fin, ou des tirets bas, qui sont enlevés ::" +"*value* peut être un entier, une chaîne de caractères, un *n*-uplet, " +"un :class:`float` ou une autre instance de :class:`Decimal`. Si *value* " +"n'est pas fourni, le constructeur renvoie ``Decimal('0')``. Si *value* est " +"une chaîne de caractères, elle doit correspondre à la syntaxe décimale en " +"dehors des espaces de début et de fin, ou des tirets bas, qui sont enlevés ::" -#: library/decimal.rst:366 +#: library/decimal.rst:380 +#, fuzzy msgid "" "Other Unicode decimal digits are also permitted where ``digit`` appears " "above. These include decimal digits from various other alphabets (for " "example, Arabic-Indic and Devanāgarī digits) along with the fullwidth digits " -"``'\\uff10'`` through ``'\\uff19'``." +"``'\\uff10'`` through ``'\\uff19'``. Case is not significant, so, for " +"example, ``inf``, ``Inf``, ``INFINITY``, and ``iNfINity`` are all acceptable " +"spellings for positive infinity." msgstr "" "Les chiffres codés en Unicode sont aussi autorisés, dans les emplacements " "``digit`` ci-dessus. Cela inclut des chiffres décimaux venant d'autres " "alphabets (par exemple les chiffres indo-arabes ou Devanagari) ainsi que les " "chiffres de pleine largeur ``'\\uff10'`` jusqu'à ``'\\uff19'``." -#: library/decimal.rst:371 +#: library/decimal.rst:387 msgid "" "If *value* is a :class:`tuple`, it should have three components, a sign " "(``0`` for positive or ``1`` for negative), a :class:`tuple` of digits, and " @@ -424,7 +436,7 @@ msgstr "" "` de chiffres et un entier représentant l'exposant. Par exemple, " "``Decimal((0, (1, 4, 1, 4), -3))`` construit l'objet ``Decimal('1.414')``." -#: library/decimal.rst:376 +#: library/decimal.rst:392 #, fuzzy msgid "" "If *value* is a :class:`float`, the binary floating-point value is " @@ -439,7 +451,7 @@ msgstr "" "``Decimal(float('1.1'))`` devient " "``Decimal('1.100000000000000088817841970012523233890533447265625')``." -#: library/decimal.rst:382 +#: library/decimal.rst:398 msgid "" "The *context* precision does not affect how many digits are stored. That is " "determined exclusively by the number of digits in *value*. For example, " @@ -451,7 +463,7 @@ msgstr "" "dans *value*. Par exemple, ``Decimal('3.00000')`` enregistre les 5 zéros " "même si la précision du contexte est de 3." -#: library/decimal.rst:387 +#: library/decimal.rst:403 msgid "" "The purpose of the *context* argument is determining what to do if *value* " "is a malformed string. If the context traps :const:`InvalidOperation`, an " @@ -463,12 +475,12 @@ msgstr "" "est activé pour :const:`InvalidOperation`, une exception est levée, sinon le " "constructeur renvoie un objet ``Decimal`` de valeur ``NaN``." -#: library/decimal.rst:392 +#: library/decimal.rst:408 msgid "Once constructed, :class:`Decimal` objects are immutable." msgstr "Une fois construit, un objet :class:`Decimal` est immuable." # suit un : -#: library/decimal.rst:394 +#: library/decimal.rst:410 msgid "" "The argument to the constructor is now permitted to be a :class:`float` " "instance." @@ -476,7 +488,7 @@ msgstr "" "l'argument du constructeur peut désormais être un objet :class:`float`." # suit un : -#: library/decimal.rst:398 +#: library/decimal.rst:414 msgid "" ":class:`float` arguments raise an exception if the :exc:`FloatOperation` " "trap is set. By default the trap is off." @@ -485,7 +497,7 @@ msgstr "" "pour :exc:`FloatOperation`. Par défaut le déroutement n'est pas activé." # suit un : -#: library/decimal.rst:402 +#: library/decimal.rst:418 msgid "" "Underscores are allowed for grouping, as with integral and floating-point " "literals in code." @@ -493,15 +505,15 @@ msgstr "" "les tirets bas sont autorisés pour regrouper, tout comme pour l'arithmétique " "en virgule fixe et flottante." -#: library/decimal.rst:406 +#: library/decimal.rst:422 #, fuzzy msgid "" "Decimal floating-point objects share many properties with the other built-in " "numeric types such as :class:`float` and :class:`int`. All of the usual " "math operations and special methods apply. Likewise, decimal objects can be " "copied, pickled, printed, used as dictionary keys, used as set elements, " -"compared, sorted, and coerced to another type (such as :class:`float` or :" -"class:`int`)." +"compared, sorted, and coerced to another type (such as :class:`float` " +"or :class:`int`)." msgstr "" "Les objets ``Decimal`` partagent beaucoup de propriétés avec les autres " "types numériques natifs tels que :class:`float` et :class:`int`. Toutes les " @@ -511,7 +523,7 @@ msgstr "" "comparés, classés et convertis vers un autre type (tel que :class:`float` " "ou :class:`int`)." -#: library/decimal.rst:413 +#: library/decimal.rst:429 msgid "" "There are some small differences between arithmetic on Decimal objects and " "arithmetic on integers and floats. When the remainder operator ``%`` is " @@ -523,7 +535,7 @@ msgstr "" "l'opérateur modulo ``%`` est appliqué sur des objets décimaux, le signe du " "résultat est le signe du *dividende* plutôt que le signe du diviseur ::" -#: library/decimal.rst:423 +#: library/decimal.rst:439 msgid "" "The integer division operator ``//`` behaves analogously, returning the " "integer part of the true quotient (truncating towards zero) rather than its " @@ -533,7 +545,7 @@ msgstr "" "renvoyant la partie entière du quotient plutôt que son arrondi, de manière à " "préserver l'identité d'Euclide ``x == (x // y) * y + x % y`` ::" -#: library/decimal.rst:432 +#: library/decimal.rst:448 msgid "" "The ``%`` and ``//`` operators implement the ``remainder`` and ``divide-" "integer`` operations (respectively) as described in the specification." @@ -541,26 +553,27 @@ msgstr "" "Les opérateurs ``//`` et ``%`` implémentent la division entière et le reste " "(ou modulo), respectivement, tels que décrits dans la spécification." -#: library/decimal.rst:436 +#: library/decimal.rst:452 msgid "" -"Decimal objects cannot generally be combined with floats or instances of :" -"class:`fractions.Fraction` in arithmetic operations: an attempt to add a :" -"class:`Decimal` to a :class:`float`, for example, will raise a :exc:" -"`TypeError`. However, it is possible to use Python's comparison operators " -"to compare a :class:`Decimal` instance ``x`` with another number ``y``. " -"This avoids confusing results when doing equality comparisons between " -"numbers of different types." +"Decimal objects cannot generally be combined with floats or instances " +"of :class:`fractions.Fraction` in arithmetic operations: an attempt to add " +"a :class:`Decimal` to a :class:`float`, for example, will raise " +"a :exc:`TypeError`. However, it is possible to use Python's comparison " +"operators to compare a :class:`Decimal` instance ``x`` with another number " +"``y``. This avoids confusing results when doing equality comparisons " +"between numbers of different types." msgstr "" "Les objets ``Decimal`` ne peuvent généralement pas être combinés avec des " "``float`` ou des objets :class:`fractions.Fraction` lors d'opérations " -"arithmétiques : toute addition entre un :class:`Decimal` et un :class:" -"`float`, par exemple, lève une exception :exc:`TypeError`. Cependant, il est " -"possible d'utiliser les opérateurs de comparaison entre instances de :class:" -"`Decimal` et les autres types numériques. Cela évite d'avoir des résultats " -"absurdes lors des tests d'égalité entre différents types." +"arithmétiques : toute addition entre un :class:`Decimal` et " +"un :class:`float`, par exemple, lève une exception :exc:`TypeError`. " +"Cependant, il est possible d'utiliser les opérateurs de comparaison entre " +"instances de :class:`Decimal` et les autres types numériques. Cela évite " +"d'avoir des résultats absurdes lors des tests d'égalité entre différents " +"types." # suit un : -#: library/decimal.rst:444 +#: library/decimal.rst:460 msgid "" "Mixed-type comparisons between :class:`Decimal` instances and other numeric " "types are now fully supported." @@ -568,7 +581,7 @@ msgstr "" "les comparaisons inter-types entre :class:`Decimal` et les autres types " "numériques sont désormais intégralement gérées." -#: library/decimal.rst:448 +#: library/decimal.rst:464 #, fuzzy msgid "" "In addition to the standard numeric properties, decimal floating-point " @@ -577,7 +590,7 @@ msgstr "" "En plus des propriétés numériques standard, les objets décimaux à virgule " "flottante ont également un certain nombre de méthodes spécialisées :" -#: library/decimal.rst:454 +#: library/decimal.rst:470 msgid "" "Return the adjusted exponent after shifting out the coefficient's rightmost " "digits until only the lead digit remains: ``Decimal('321e+5').adjusted()`` " @@ -589,17 +602,17 @@ msgstr "" "``Decimal('321e+5').adjusted()`` renvoie sept. Utilisée pour déterminer la " "position du chiffre le plus significatif par rapport à la virgule." -#: library/decimal.rst:461 +#: library/decimal.rst:477 msgid "" -"Return a pair ``(n, d)`` of integers that represent the given :class:" -"`Decimal` instance as a fraction, in lowest terms and with a positive " -"denominator::" +"Return a pair ``(n, d)`` of integers that represent the " +"given :class:`Decimal` instance as a fraction, in lowest terms and with a " +"positive denominator::" msgstr "" -"Renvoie un couple d'entiers ``(n, d)`` qui représentent l'instance :class:" -"`Decimal` donnée sous la forme d'une fraction, avec les termes les plus " -"petits possibles et avec un dénominateur positif ::" +"Renvoie un couple d'entiers ``(n, d)`` qui représentent " +"l'instance :class:`Decimal` donnée sous la forme d'une fraction, avec les " +"termes les plus petits possibles et avec un dénominateur positif ::" -#: library/decimal.rst:468 +#: library/decimal.rst:484 msgid "" "The conversion is exact. Raise OverflowError on infinities and ValueError " "on NaNs." @@ -607,7 +620,7 @@ msgstr "" "La conversion est exacte. Lève une ``OverflowError`` sur l'infini et " "``ValueError`` sur les *Nan*." -#: library/decimal.rst:475 +#: library/decimal.rst:491 msgid "" "Return a :term:`named tuple` representation of the number: " "``DecimalTuple(sign, digits, exponent)``." @@ -615,7 +628,7 @@ msgstr "" "Renvoie une représentation sous la forme d'un :term:`n-uplet nommé ` du nombre ``DecimalTuple(sign, digits, exposant)``." -#: library/decimal.rst:481 +#: library/decimal.rst:497 msgid "" "Return the canonical encoding of the argument. Currently, the encoding of " "a :class:`Decimal` instance is always canonical, so this operation returns " @@ -625,7 +638,7 @@ msgstr "" "instance :class:`Decimal` est toujours canonique, donc cette opération " "renvoie son argument inchangé." -#: library/decimal.rst:487 +#: library/decimal.rst:503 msgid "" "Compare the values of two Decimal instances. :meth:`compare` returns a " "Decimal instance, and if either operand is a NaN then the result is a NaN::" @@ -634,7 +647,7 @@ msgstr "" "instance *Decimal* et, si l'un des opérandes est un *NaN*, alors le résultat " "est un *NaN* ::" -#: library/decimal.rst:498 +#: library/decimal.rst:514 msgid "" "This operation is identical to the :meth:`compare` method, except that all " "NaNs signal. That is, if neither operand is a signaling NaN then any quiet " @@ -645,7 +658,7 @@ msgstr "" "n'est un *NaN* de signalisation, alors tout opérande *NaN* silencieux est " "traité comme s'il s'agissait d'un *NaN* de signalisation." -#: library/decimal.rst:504 +#: library/decimal.rst:520 msgid "" "Compare two operands using their abstract representation rather than their " "numerical value. Similar to the :meth:`compare` method, but the result " @@ -659,7 +672,7 @@ msgstr "" "instances de :class:`Decimal` avec la même valeur numérique mais des " "représentations différentes se comparent de manière inégale dans cet ordre :" -#: library/decimal.rst:513 +#: library/decimal.rst:529 msgid "" "Quiet and signaling NaNs are also included in the total ordering. The " "result of this function is ``Decimal('0')`` if both operands have the same " @@ -675,7 +688,7 @@ msgstr "" "est supérieur au deuxième opérande. Voir les spécifications pour les détails " "de l'ordre total." -#: library/decimal.rst:531 library/decimal.rst:846 +#: library/decimal.rst:547 library/decimal.rst:879 msgid "" "This operation is unaffected by context and is quiet: no flags are changed " "and no rounding is performed. As an exception, the C version may raise " @@ -686,19 +699,19 @@ msgstr "" "Exceptionnellement, la version C peut lever une *InvalidOperation* si le " "deuxième opérande ne peut pas être converti exactement." -#: library/decimal.rst:526 +#: library/decimal.rst:542 msgid "" "Compare two operands using their abstract representation rather than their " "value as in :meth:`compare_total`, but ignoring the sign of each operand. " -"``x.compare_total_mag(y)`` is equivalent to ``x.copy_abs().compare_total(y." -"copy_abs())``." +"``x.compare_total_mag(y)`` is equivalent to " +"``x.copy_abs().compare_total(y.copy_abs())``." msgstr "" "Compare deux opérandes en utilisant leur représentation abstraite plutôt que " "leur valeur comme dans :meth:`compare_total`, mais en ignorant le signe de " -"chaque opérande. ``x.compare_total_mag(y)`` est équivalent à ``x.copy_abs()." -"compare_total(y.copy_abs())``." +"chaque opérande. ``x.compare_total_mag(y)`` est équivalent à " +"``x.copy_abs().compare_total(y.copy_abs())``." -#: library/decimal.rst:537 +#: library/decimal.rst:553 msgid "" "Just returns self, this method is only to comply with the Decimal " "Specification." @@ -706,7 +719,7 @@ msgstr "" "Ne fait que renvoyer self ; cette méthode existe uniquement pour se " "conformer à la spécification." -#: library/decimal.rst:542 +#: library/decimal.rst:558 msgid "" "Return the absolute value of the argument. This operation is unaffected by " "the context and is quiet: no flags are changed and no rounding is performed." @@ -715,7 +728,7 @@ msgstr "" "contexte et est silencieuse : aucun drapeau n'est modifié et aucun arrondi " "n'est effectué." -#: library/decimal.rst:548 +#: library/decimal.rst:564 msgid "" "Return the negation of the argument. This operation is unaffected by the " "context and is quiet: no flags are changed and no rounding is performed." @@ -724,7 +737,7 @@ msgstr "" "et est silencieuse : aucun drapeau n'est modifié et aucun arrondi n'est " "effectué." -#: library/decimal.rst:553 +#: library/decimal.rst:569 msgid "" "Return a copy of the first operand with the sign set to be the same as the " "sign of the second operand. For example:" @@ -732,25 +745,25 @@ msgstr "" "Renvoie une copie du premier opérande mais avec le même signe que celui du " "deuxième opérande. Par exemple :" -#: library/decimal.rst:565 +#: library/decimal.rst:581 msgid "" "Return the value of the (natural) exponential function ``e**x`` at the given " "number. The result is correctly rounded using the :const:`ROUND_HALF_EVEN` " "rounding mode." msgstr "" "Renvoie la valeur ``e**x`` (fonction exponentielle) du nombre donné. Le " -"résultat est correctement arrondi en utilisant le mode d'arrondi :const:" -"`ROUND_HALF_EVEN`." +"résultat est correctement arrondi en utilisant le mode " +"d'arrondi :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:576 +#: library/decimal.rst:592 msgid "" -"Alternative constructor that only accepts instances of :class:`float` or :" -"class:`int`." +"Alternative constructor that only accepts instances of :class:`float` " +"or :class:`int`." msgstr "" "Constructeur alternatif qui n'accepte que les instances de :class:`float` " "ou :class:`int`." -#: library/decimal.rst:579 +#: library/decimal.rst:595 msgid "" "Note ``Decimal.from_float(0.1)`` is not the same as ``Decimal('0.1')``. " "Since 0.1 is not exactly representable in binary floating point, the value " @@ -766,7 +779,7 @@ msgstr "" "``0.1000000000000000055511151231257827021181583404541015625``." # suit un : -#: library/decimal.rst:585 +#: library/decimal.rst:601 msgid "" "From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed " "directly from a :class:`float`." @@ -774,7 +787,17 @@ msgstr "" "depuis Python 3.2, une instance :class:`Decimal` peut également être " "construite directement à partir d'un :class:`float`." -#: library/decimal.rst:603 +#: library/decimal.rst:619 +#, fuzzy +msgid "" +"Alternative constructor that only accepts instances " +"of :class:`float`, :class:`int` or :class:`Decimal`, but not strings or " +"tuples." +msgstr "" +"Constructeur alternatif qui n'accepte que les instances de :class:`float` " +"ou :class:`int`." + +#: library/decimal.rst:636 msgid "" "Fused multiply-add. Return self*other+third with no rounding of the " "intermediate product self*other." @@ -782,17 +805,17 @@ msgstr "" "Multiplier-ajouter fusionné. Renvoie ``self*other+third`` sans arrondir le " "produit intermédiaire ``self*other``." -#: library/decimal.rst:611 +#: library/decimal.rst:644 msgid "" "Return :const:`True` if the argument is canonical and :const:`False` " "otherwise. Currently, a :class:`Decimal` instance is always canonical, so " "this operation always returns :const:`True`." msgstr "" -"Renvoie :const:`True` si l'argument est sous forme canonique et :const:" -"`False` sinon. Actuellement, une instance :class:`Decimal` est toujours " -"canonique, donc cette opération renvoie toujours :const:`True`." +"Renvoie :const:`True` si l'argument est sous forme canonique " +"et :const:`False` sinon. Actuellement, une instance :class:`Decimal` est " +"toujours canonique, donc cette opération renvoie toujours :const:`True`." -#: library/decimal.rst:617 +#: library/decimal.rst:650 msgid "" "Return :const:`True` if the argument is a finite number, and :const:`False` " "if the argument is an infinity or a NaN." @@ -800,32 +823,32 @@ msgstr "" "Renvoie :const:`True` si l'argument est un nombre fini et :const:`False` si " "l'argument est un infini ou un *NaN*." -#: library/decimal.rst:622 +#: library/decimal.rst:655 msgid "" "Return :const:`True` if the argument is either positive or negative infinity " "and :const:`False` otherwise." msgstr "" -"Renvoie :const:`True` si l'argument est un infini positif ou négatif, :const:" -"`False` sinon." +"Renvoie :const:`True` si l'argument est un infini positif ou " +"négatif, :const:`False` sinon." -#: library/decimal.rst:627 +#: library/decimal.rst:660 msgid "" -"Return :const:`True` if the argument is a (quiet or signaling) NaN and :" -"const:`False` otherwise." +"Return :const:`True` if the argument is a (quiet or signaling) NaN " +"and :const:`False` otherwise." msgstr "" "Renvoie :const:`True` si l'argument est un *NaN* (signalétique ou " "silencieux), :const:`False` sinon." -#: library/decimal.rst:632 +#: library/decimal.rst:665 msgid "" -"Return :const:`True` if the argument is a *normal* finite number. Return :" -"const:`False` if the argument is zero, subnormal, infinite or a NaN." +"Return :const:`True` if the argument is a *normal* finite number. " +"Return :const:`False` if the argument is zero, subnormal, infinite or a NaN." msgstr "" -"Renvoie :const:`True` si l'argument est un nombre fini *normal*. Renvoie :" -"const:`False` si l'argument est zéro, infini, résultat d'un dépassement par " -"valeur inférieure ou un *NaN*." +"Renvoie :const:`True` si l'argument est un nombre fini *normal*. " +"Renvoie :const:`False` si l'argument est zéro, infini, résultat d'un " +"dépassement par valeur inférieure ou un *NaN*." -#: library/decimal.rst:637 +#: library/decimal.rst:670 msgid "" "Return :const:`True` if the argument is a quiet NaN, and :const:`False` " "otherwise." @@ -833,7 +856,7 @@ msgstr "" "Renvoie :const:`True` si l'argument est un *NaN* silencieux, :const:`False` " "sinon." -#: library/decimal.rst:642 +#: library/decimal.rst:675 msgid "" "Return :const:`True` if the argument has a negative sign and :const:`False` " "otherwise. Note that zeros and NaNs can both carry signs." @@ -841,15 +864,15 @@ msgstr "" "Renvoie :const:`True` si l'argument est négatif, :const:`False` sinon. " "Remarquez que les zéros et les *NaN* peuvent être signés." -#: library/decimal.rst:647 +#: library/decimal.rst:680 msgid "" "Return :const:`True` if the argument is a signaling NaN and :const:`False` " "otherwise." msgstr "" -"Renvoie :const:`True` si l'argument est un *NaN* signalétique, :const:" -"`False` sinon." +"Renvoie :const:`True` si l'argument est un *NaN* " +"signalétique, :const:`False` sinon." -#: library/decimal.rst:652 +#: library/decimal.rst:685 msgid "" "Return :const:`True` if the argument is subnormal, and :const:`False` " "otherwise." @@ -857,15 +880,15 @@ msgstr "" "Renvoie :const:`True` si l'argument est le résultat d'un dépassement par " "valeur inférieure, :const:`False` sinon." -#: library/decimal.rst:657 +#: library/decimal.rst:690 msgid "" -"Return :const:`True` if the argument is a (positive or negative) zero and :" -"const:`False` otherwise." +"Return :const:`True` if the argument is a (positive or negative) zero " +"and :const:`False` otherwise." msgstr "" -"Renvoie :const:`True` si l'argument est un zéro (positif ou négatif), :const:" -"`False` sinon." +"Renvoie :const:`True` si l'argument est un zéro (positif ou " +"négatif), :const:`False` sinon." -#: library/decimal.rst:662 +#: library/decimal.rst:695 msgid "" "Return the natural (base e) logarithm of the operand. The result is " "correctly rounded using the :const:`ROUND_HALF_EVEN` rounding mode." @@ -873,7 +896,7 @@ msgstr "" "Renvoie le logarithme naturel (base e) de l'opérande. Le résultat est " "arrondi avec le mode :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:667 +#: library/decimal.rst:700 msgid "" "Return the base ten logarithm of the operand. The result is correctly " "rounded using the :const:`ROUND_HALF_EVEN` rounding mode." @@ -881,10 +904,10 @@ msgstr "" "Renvoie le logarithme en base 10 de l'opérande. Le résultat est arrondi avec " "le mode :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:672 +#: library/decimal.rst:705 msgid "" -"For a nonzero number, return the adjusted exponent of its operand as a :" -"class:`Decimal` instance. If the operand is a zero then ``Decimal('-" +"For a nonzero number, return the adjusted exponent of its operand as " +"a :class:`Decimal` instance. If the operand is a zero then ``Decimal('-" "Infinity')`` is returned and the :const:`DivisionByZero` flag is raised. If " "the operand is an infinity then ``Decimal('Infinity')`` is returned." msgstr "" @@ -893,7 +916,7 @@ msgstr "" "Infinity')`` est renvoyé et le drapeau :const:`DivisionByZero` est levé. Si " "l'opérande est un infini alors ``Decimal('Infinity')`` est renvoyé." -#: library/decimal.rst:680 +#: library/decimal.rst:713 msgid "" ":meth:`logical_and` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " @@ -903,7 +926,7 @@ msgstr "" "logiques* (voir :ref:`logical_operands_label`). Le résultat est le *ET* des " "chiffres des deux opérandes." -#: library/decimal.rst:686 +#: library/decimal.rst:719 msgid "" ":meth:`logical_invert` is a logical operation. The result is the digit-wise " "inversion of the operand." @@ -911,7 +934,7 @@ msgstr "" ":meth:`logical_invert` est une opération logique. Le résultat est " "l'inversion de chacun des chiffres de l'opérande." -#: library/decimal.rst:691 +#: library/decimal.rst:724 msgid "" ":meth:`logical_or` is a logical operation which takes two *logical operands* " "(see :ref:`logical_operands_label`). The result is the digit-wise ``or`` of " @@ -921,7 +944,7 @@ msgstr "" "logiques* (voir :ref:`logical_operands_label`). Le résultat est le *OU* des " "chiffres des deux opérandes." -#: library/decimal.rst:697 +#: library/decimal.rst:730 msgid "" ":meth:`logical_xor` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " @@ -931,7 +954,7 @@ msgstr "" "logiques* (voir :ref:`logical_operands_label`). Le résultat est le *OU " "EXCLUSIF* des chiffres des deux opérandes." -#: library/decimal.rst:703 +#: library/decimal.rst:736 msgid "" "Like ``max(self, other)`` except that the context rounding rule is applied " "before returning and that ``NaN`` values are either signaled or ignored " @@ -941,7 +964,7 @@ msgstr "" "appliquée avant le retour et que les valeurs ``NaN`` sont signalées ou " "ignorées (selon le contexte et si elles sont signalétiques ou silencieuses)." -#: library/decimal.rst:710 +#: library/decimal.rst:743 msgid "" "Similar to the :meth:`.max` method, but the comparison is done using the " "absolute values of the operands." @@ -949,7 +972,7 @@ msgstr "" "Semblable à la méthode :meth:`.max`, mais la comparaison est effectuée en " "utilisant les valeurs absolues des opérandes." -#: library/decimal.rst:715 +#: library/decimal.rst:748 msgid "" "Like ``min(self, other)`` except that the context rounding rule is applied " "before returning and that ``NaN`` values are either signaled or ignored " @@ -959,7 +982,7 @@ msgstr "" "appliquée avant le retour et que les valeurs ``NaN`` sont signalées ou " "ignorées (selon le contexte et si elles sont signalétiques ou silencieuses)." -#: library/decimal.rst:722 +#: library/decimal.rst:755 msgid "" "Similar to the :meth:`.min` method, but the comparison is done using the " "absolute values of the operands." @@ -967,7 +990,7 @@ msgstr "" "Semblable à la méthode :meth:`.min`, mais la comparaison est effectuée en " "utilisant les valeurs absolues des opérandes." -#: library/decimal.rst:727 +#: library/decimal.rst:760 msgid "" "Return the largest number representable in the given context (or in the " "current thread's context if no context is given) that is smaller than the " @@ -977,7 +1000,7 @@ msgstr "" "le contexte du fil d'exécution actuel si aucun contexte n'est donné) qui est " "plus petit que l'opérande donné." -#: library/decimal.rst:733 +#: library/decimal.rst:766 msgid "" "Return the smallest number representable in the given context (or in the " "current thread's context if no context is given) that is larger than the " @@ -987,7 +1010,7 @@ msgstr "" "le contexte du fil d'exécution actuel si aucun contexte n'est donné) qui est " "supérieur à l'opérande donné." -#: library/decimal.rst:739 +#: library/decimal.rst:772 msgid "" "If the two operands are unequal, return the number closest to the first " "operand in the direction of the second operand. If both operands are " @@ -999,7 +1022,7 @@ msgstr "" "opérandes sont numériquement égaux, renvoie une copie du premier opérande " "avec le signe défini comme étant le même que le signe du second opérande." -#: library/decimal.rst:746 +#: library/decimal.rst:779 msgid "" "Used for producing canonical values of an equivalence class within either " "the current context or the specified context." @@ -1007,7 +1030,7 @@ msgstr "" "Utilisé pour produire des valeurs canoniques d'une classe d'équivalence dans " "le contexte actuel ou dans le contexte spécifié." -#: library/decimal.rst:749 +#: library/decimal.rst:782 msgid "" "This has the same semantics as the unary plus operation, except that if the " "final result is finite it is reduced to its simplest form, with all trailing " @@ -1023,7 +1046,7 @@ msgstr "" "divisée par dix et l'exposant est incrémenté de 1. Sinon (la mantisse est " "nulle), l'exposant est mis à 0. Dans tous les cas, le signe est inchangé." -#: library/decimal.rst:756 +#: library/decimal.rst:789 msgid "" "For example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both " "normalize to the equivalent value ``Decimal('32.1')``." @@ -1031,13 +1054,13 @@ msgstr "" "Par exemple, ``Decimal('32.100')`` et ``Decimal('0.321000e+2')`` se " "normalisent tous deux à la valeur équivalente ``Decimal('32.1')``." -#: library/decimal.rst:759 +#: library/decimal.rst:792 msgid "Note that rounding is applied *before* reducing to simplest form." msgstr "" "Notez que l'arrondi est appliqué *avant* la réduction à la forme la plus " "simple." -#: library/decimal.rst:761 +#: library/decimal.rst:794 msgid "" "In the latest versions of the specification, this operation is also known as " "``reduce``." @@ -1045,7 +1068,7 @@ msgstr "" "Dans les dernières versions de la spécification, cette opération est " "également connue sous le nom de ``reduce``." -#: library/decimal.rst:766 +#: library/decimal.rst:799 msgid "" "Return a string describing the *class* of the operand. The returned value " "is one of the following ten strings." @@ -1054,19 +1077,19 @@ msgstr "" "est l'une des dix chaînes suivantes." # Élément d'une liste, d'où le ; final -#: library/decimal.rst:769 +#: library/decimal.rst:802 msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." msgstr "``\"-Infinity\"``, indiquant que l'opérande est l'infini négatif ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:770 +#: library/decimal.rst:803 msgid "" "``\"-Normal\"``, indicating that the operand is a negative normal number." msgstr "" "``\"-Normal\"``, indiquant que l'opérande est un nombre négatif normal ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:771 +#: library/decimal.rst:804 msgid "" "``\"-Subnormal\"``, indicating that the operand is negative and subnormal." msgstr "" @@ -1074,48 +1097,48 @@ msgstr "" "résultat d'un dépassement par valeur inférieure ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:772 +#: library/decimal.rst:805 msgid "``\"-Zero\"``, indicating that the operand is a negative zero." msgstr "``\"-Zero\"``, indiquant que l'opérande est un zéro négatif ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:773 +#: library/decimal.rst:806 msgid "``\"+Zero\"``, indicating that the operand is a positive zero." msgstr "``\"+Zero\"``, indiquant que l'opérande est un zéro positif ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:774 +#: library/decimal.rst:807 msgid "" "``\"+Subnormal\"``, indicating that the operand is positive and subnormal." msgstr "" "``\"+Subnormal\"``, indiquant que l'opérande est positif et qu'il est le " "résultat un dépassement par valeur inférieure ;" -#: library/decimal.rst:775 +#: library/decimal.rst:808 msgid "" "``\"+Normal\"``, indicating that the operand is a positive normal number." msgstr "" "``\"+Normal\"``, indiquant que l'opérande est un nombre positif normal ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:776 +#: library/decimal.rst:809 msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." msgstr "``\"+Infinity\"``, indiquant que l'opérande est l'infini positif ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:777 +#: library/decimal.rst:810 msgid "``\"NaN\"``, indicating that the operand is a quiet NaN (Not a Number)." msgstr "" "``\"NaN\"``, indiquant que l'opérande est un *NaN* (*Not a Number*, pas un " "nombre) silencieux ;" -#: library/decimal.rst:778 +#: library/decimal.rst:811 msgid "``\"sNaN\"``, indicating that the operand is a signaling NaN." msgstr "" "``\"sNaN\"``, indiquant que l'opérande est un *NaN* (*Not a Number*, pas un " "nombre) signalétique." -#: library/decimal.rst:782 +#: library/decimal.rst:815 msgid "" "Return a value equal to the first operand after rounding and having the " "exponent of the second operand." @@ -1123,7 +1146,7 @@ msgstr "" "Renvoie une valeur égale au premier opérande après arrondi et ayant " "l'exposant du second opérande." -#: library/decimal.rst:788 +#: library/decimal.rst:821 msgid "" "Unlike other operations, if the length of the coefficient after the quantize " "operation would be greater than precision, then an :const:`InvalidOperation` " @@ -1131,12 +1154,12 @@ msgid "" "quantized exponent is always equal to that of the right-hand operand." msgstr "" "Contrairement aux autres opérations, si la longueur du coefficient après " -"l'opération de quantification est supérieure à la précision, alors une :" -"const:`InvalidOperation` est signalée. Ceci garantit que, sauf condition " -"d'erreur, l'exposant quantifié est toujours égal à celui de l'opérande de " -"droite." +"l'opération de quantification est supérieure à la précision, alors " +"une :const:`InvalidOperation` est signalée. Ceci garantit que, sauf " +"condition d'erreur, l'exposant quantifié est toujours égal à celui de " +"l'opérande de droite." -#: library/decimal.rst:794 +#: library/decimal.rst:827 msgid "" "Also unlike other operations, quantize never signals Underflow, even if the " "result is subnormal and inexact." @@ -1145,7 +1168,7 @@ msgstr "" "dépassement par valeur inférieure, même si le résultat est inférieur à la " "valeur minimale représentable et inexact." -#: library/decimal.rst:797 +#: library/decimal.rst:830 msgid "" "If the exponent of the second operand is larger than that of the first then " "rounding may be necessary. In this case, the rounding mode is determined by " @@ -1159,24 +1182,24 @@ msgstr "" "donné ; si aucun argument n'est donné, le mode d'arrondi du contexte du fil " "d'exécution courant est utilisé." -#: library/decimal.rst:803 +#: library/decimal.rst:836 msgid "" -"An error is returned whenever the resulting exponent is greater than :attr:" -"`~Context.Emax` or less than :meth:`~Context.Etiny`." +"An error is returned whenever the resulting exponent is greater " +"than :attr:`~Context.Emax` or less than :meth:`~Context.Etiny`." msgstr "" "Une erreur est renvoyée chaque fois que l'exposant résultant est supérieur " "à :attr:`~Context.Emax` ou inférieur à :meth:`~Context.Etiny`." -#: library/decimal.rst:808 +#: library/decimal.rst:841 msgid "" "Return ``Decimal(10)``, the radix (base) in which the :class:`Decimal` class " "does all its arithmetic. Included for compatibility with the specification." msgstr "" -"Renvoie ``Decimal(10)``, la base (base) dans laquelle la classe :class:" -"`Decimal` fait toute son arithmétique. Inclus pour la compatibilité avec la " -"spécification." +"Renvoie ``Decimal(10)``, la base (base) dans laquelle la " +"classe :class:`Decimal` fait toute son arithmétique. Inclus pour la " +"compatibilité avec la spécification." -#: library/decimal.rst:814 +#: library/decimal.rst:847 msgid "" "Return the remainder from dividing *self* by *other*. This differs from " "``self % other`` in that the sign of the remainder is chosen so as to " @@ -1191,11 +1214,11 @@ msgstr "" "exacte de ``self / other`` et, si deux entiers sont également proches, alors " "l'entier pair est choisi." -#: library/decimal.rst:821 +#: library/decimal.rst:854 msgid "If the result is zero then its sign will be the sign of *self*." msgstr "Si le résultat est zéro, alors son signe est le signe de *self*." -#: library/decimal.rst:832 +#: library/decimal.rst:865 msgid "" "Return the result of rotating the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -1215,14 +1238,14 @@ msgstr "" "est complété à gauche avec des zéros à la précision de la longueur si " "nécessaire. Le signe et l'exposant du premier opérande sont inchangés." -#: library/decimal.rst:843 +#: library/decimal.rst:876 msgid "" "Test whether self and other have the same exponent or whether both are " "``NaN``." msgstr "" "Teste si *self* et *other* ont le même exposant ou si les deux sont ``NaN``." -#: library/decimal.rst:852 +#: library/decimal.rst:885 msgid "" "Return the first operand with exponent adjusted by the second. Equivalently, " "return the first operand multiplied by ``10**other``. The second operand " @@ -1232,7 +1255,7 @@ msgstr "" "équivalente, renvoie le premier opérande multiplié par ``10**other``. Le " "deuxième opérande doit être entier." -#: library/decimal.rst:858 +#: library/decimal.rst:891 msgid "" "Return the result of shifting the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -1251,18 +1274,18 @@ msgstr "" "décalage sont des zéros. Le signe et l'exposant du premier opérande sont " "inchangés." -#: library/decimal.rst:868 +#: library/decimal.rst:901 msgid "Return the square root of the argument to full precision." msgstr "Renvoie la racine carrée de l'argument avec une précision maximale." -#: library/decimal.rst:1510 +#: library/decimal.rst:1563 msgid "" "Convert to a string, using engineering notation if an exponent is needed." msgstr "" "Convertir en chaîne, en utilisant la notation ingénieur si un exposant est " "nécessaire." -#: library/decimal.rst:1512 +#: library/decimal.rst:1565 msgid "" "Engineering notation has an exponent which is a multiple of 3. This can " "leave up to 3 digits to the left of the decimal place and may require the " @@ -1272,13 +1295,13 @@ msgstr "" "peut laisser jusqu'à 3 chiffres à gauche de la décimale et peut nécessiter " "l'ajout d'un ou de deux zéros à la fin." -#: library/decimal.rst:879 +#: library/decimal.rst:912 msgid "" "For example, this converts ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``." msgstr "" "Par exemple, ``Decimal('123E+1')`` est converti en ``Decimal('1.23E+3')``." -#: library/decimal.rst:883 +#: library/decimal.rst:916 msgid "" "Identical to the :meth:`to_integral_value` method. The ``to_integral`` name " "has been kept for compatibility with older versions." @@ -1286,96 +1309,98 @@ msgstr "" "Identique à la méthode :meth:`to_integral_value`. Le nom ``to_integral`` a " "été conservé pour la compatibilité avec les anciennes versions." -#: library/decimal.rst:888 +#: library/decimal.rst:921 msgid "" "Round to the nearest integer, signaling :const:`Inexact` or :const:`Rounded` " "as appropriate if rounding occurs. The rounding mode is determined by the " "``rounding`` parameter if given, else by the given ``context``. If neither " "parameter is given then the rounding mode of the current context is used." msgstr "" -"Arrondit à l'entier le plus proche, en signalant :const:`Inexact` ou :const:" -"`Rounded` selon le cas si l'arrondi se produit. Le mode d'arrondi est " -"déterminé par le paramètre ``rounding`` s'il est donné, sinon par le " +"Arrondit à l'entier le plus proche, en signalant :const:`Inexact` " +"ou :const:`Rounded` selon le cas si l'arrondi se produit. Le mode d'arrondi " +"est déterminé par le paramètre ``rounding`` s'il est donné, sinon par le " "``context`` donné. Si aucun paramètre n'est donné, le mode d'arrondi du " "contexte courant est utilisé." -#: library/decimal.rst:896 +#: library/decimal.rst:929 msgid "" -"Round to the nearest integer without signaling :const:`Inexact` or :const:" -"`Rounded`. If given, applies *rounding*; otherwise, uses the rounding " -"method in either the supplied *context* or the current context." +"Round to the nearest integer without signaling :const:`Inexact` " +"or :const:`Rounded`. If given, applies *rounding*; otherwise, uses the " +"rounding method in either the supplied *context* or the current context." msgstr "" -"Arrondit à l'entier le plus proche sans signaler :const:`Inexact` ou :const:" -"`Rounded`. Si donné, applique *rounding* ; sinon, utilise la méthode " -"d'arrondi dans le *context* fourni ou dans le contexte actuel." +"Arrondit à l'entier le plus proche sans signaler :const:`Inexact` " +"ou :const:`Rounded`. Si donné, applique *rounding* ; sinon, utilise la " +"méthode d'arrondi dans le *context* fourni ou dans le contexte actuel." -#: library/decimal.rst:900 +#: library/decimal.rst:933 msgid "Decimal numbers can be rounded using the :func:`.round` function:" msgstr "" -#: library/decimal.rst:905 +#: library/decimal.rst:938 msgid "" "If *ndigits* is not given or ``None``, returns the nearest :class:`int` to " -"*number*, rounding ties to even, and ignoring the rounding mode of the :" -"class:`Decimal` context. Raises :exc:`OverflowError` if *number* is an " +"*number*, rounding ties to even, and ignoring the rounding mode of " +"the :class:`Decimal` context. Raises :exc:`OverflowError` if *number* is an " "infinity or :exc:`ValueError` if it is a (quiet or signaling) NaN." msgstr "" -#: library/decimal.rst:911 +#: library/decimal.rst:944 msgid "" "If *ndigits* is an :class:`int`, the context's rounding mode is respected " "and a :class:`Decimal` representing *number* rounded to the nearest multiple " "of ``Decimal('1E-ndigits')`` is returned; in this case, ``round(number, " "ndigits)`` is equivalent to ``self.quantize(Decimal('1E-ndigits'))``. " -"Returns ``Decimal('NaN')`` if *number* is a quiet NaN. Raises :class:" -"`InvalidOperation` if *number* is an infinity, a signaling NaN, or if the " -"length of the coefficient after the quantize operation would be greater than " -"the current context's precision. In other words, for the non-corner cases:" +"Returns ``Decimal('NaN')`` if *number* is a quiet NaN. " +"Raises :class:`InvalidOperation` if *number* is an infinity, a signaling " +"NaN, or if the length of the coefficient after the quantize operation would " +"be greater than the current context's precision. In other words, for the " +"non-corner cases:" msgstr "" -#: library/decimal.rst:921 +#: library/decimal.rst:954 msgid "" "if *ndigits* is positive, return *number* rounded to *ndigits* decimal " "places;" msgstr "" -#: library/decimal.rst:923 +#: library/decimal.rst:956 msgid "if *ndigits* is zero, return *number* rounded to the nearest integer;" msgstr "" -#: library/decimal.rst:924 +#: library/decimal.rst:957 msgid "" "if *ndigits* is negative, return *number* rounded to the nearest multiple of " "``10**abs(ndigits)``." msgstr "" -#: library/decimal.rst:927 +#: library/decimal.rst:960 msgid "For example::" msgstr "Par exemple ::" -#: library/decimal.rst:946 +#: library/decimal.rst:979 msgid "Logical operands" msgstr "Opérandes logiques" -#: library/decimal.rst:948 +#: library/decimal.rst:981 msgid "" -"The :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :meth:" -"`~Decimal.logical_or`, and :meth:`~Decimal.logical_xor` methods expect their " -"arguments to be *logical operands*. A *logical operand* is a :class:" -"`Decimal` instance whose exponent and sign are both zero, and whose digits " -"are all either ``0`` or ``1``." +"The :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :meth:`~Decimal.logical_or`, " +"and :meth:`~Decimal.logical_xor` methods expect their arguments to be " +"*logical operands*. A *logical operand* is a :class:`Decimal` instance " +"whose exponent and sign are both zero, and whose digits are all either ``0`` " +"or ``1``." msgstr "" -"Les méthodes :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :" -"meth:`~Decimal.logical_or` et :meth:`~Decimal.logical_xor` s'attendent à ce " -"que leurs arguments soient des *opérandes logiques*. Un *opérande logique* " -"est une instance :class:`Decimal` dont l'exposant et le signe sont tous les " -"deux zéro et dont les chiffres sont tous ``0`` ou ``1``." +"Les " +"méthodes :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :meth:`~Decimal.logical_or` " +"et :meth:`~Decimal.logical_xor` s'attendent à ce que leurs arguments soient " +"des *opérandes logiques*. Un *opérande logique* est une " +"instance :class:`Decimal` dont l'exposant et le signe sont tous les deux " +"zéro et dont les chiffres sont tous ``0`` ou ``1``." -#: library/decimal.rst:960 +#: library/decimal.rst:993 msgid "Context objects" msgstr "Objets de contexte" -#: library/decimal.rst:962 +#: library/decimal.rst:995 msgid "" "Contexts are environments for arithmetic operations. They govern precision, " "set rules for rounding, determine which signals are treated as exceptions, " @@ -1385,7 +1410,7 @@ msgstr "" "régissent la précision, établissent des règles d'arrondi, déterminent quels " "signaux sont traités comme des exceptions et limitent la plage des exposants." -#: library/decimal.rst:966 +#: library/decimal.rst:999 msgid "" "Each thread has its own current context which is accessed or changed using " "the :func:`getcontext` and :func:`setcontext` functions:" @@ -1393,23 +1418,23 @@ msgstr "" "Chaque fil d'exécution a son propre contexte actuel qui est accessible ou " "modifié à l'aide des fonctions :func:`getcontext` et :func:`setcontext` :" -#: library/decimal.rst:972 +#: library/decimal.rst:1005 msgid "Return the current context for the active thread." msgstr "Renvoie le contexte actuel du fil d'exécution courant." -#: library/decimal.rst:977 +#: library/decimal.rst:1010 msgid "Set the current context for the active thread to *c*." msgstr "Définit le contexte du fil d'exécution courant à *c*." -#: library/decimal.rst:979 +#: library/decimal.rst:1012 msgid "" "You can also use the :keyword:`with` statement and the :func:`localcontext` " "function to temporarily change the active context." msgstr "" -"Vous pouvez également utiliser l'instruction :keyword:`with` et la fonction :" -"func:`localcontext` pour modifier temporairement le contexte actif." +"Vous pouvez également utiliser l'instruction :keyword:`with` et la " +"fonction :func:`localcontext` pour modifier temporairement le contexte actif." -#: library/decimal.rst:984 +#: library/decimal.rst:1017 msgid "" "Return a context manager that will set the current context for the active " "thread to a copy of *ctx* on entry to the with-statement and restore the " @@ -1424,7 +1449,7 @@ msgstr "" "utilisée. L'argument *kwargs* est utilisé pour définir les attributs du " "nouveau contexte." -#: library/decimal.rst:990 +#: library/decimal.rst:1023 msgid "" "For example, the following code sets the current decimal precision to 42 " "places, performs a calculation, and then automatically restores the previous " @@ -1434,21 +1459,21 @@ msgstr "" "chiffres, effectue un calcul, puis restaure automatiquement le contexte " "précédent ::" -#: library/decimal.rst:1000 +#: library/decimal.rst:1033 msgid "Using keyword arguments, the code would be the following::" msgstr "En utilisant des arguments nommés, le code serait le suivant ::" -#: library/decimal.rst:1008 +#: library/decimal.rst:1041 msgid "" -"Raises :exc:`TypeError` if *kwargs* supplies an attribute that :class:" -"`Context` doesn't support. Raises either :exc:`TypeError` or :exc:" -"`ValueError` if *kwargs* supplies an invalid value for an attribute." +"Raises :exc:`TypeError` if *kwargs* supplies an attribute " +"that :class:`Context` doesn't support. Raises either :exc:`TypeError` " +"or :exc:`ValueError` if *kwargs* supplies an invalid value for an attribute." msgstr "" "Lève :exc:`TypeError` si *kwargs* fournit un attribut que :class:`Context` " "ne prend pas en charge. Lève soit :exc:`TypeError` ou :exc:`ValueError` si " "*kwargs* fournit une valeur invalide pour un attribut." -#: library/decimal.rst:1012 +#: library/decimal.rst:1045 msgid "" ":meth:`localcontext` now supports setting context attributes through the use " "of keyword arguments." @@ -1456,49 +1481,57 @@ msgstr "" ":meth:`localcontext` prend désormais en charge la définition des attributs " "de contexte grâce à l'utilisation d'arguments nommés." -#: library/decimal.rst:1015 +#: library/decimal.rst:1050 +msgid "" +"Return a context object initialized to the proper values for one of the IEEE " +"interchange formats. The argument must be a multiple of 32 and less " +"than :const:`IEEE_CONTEXT_MAX_BITS`." +msgstr "" + +#: library/decimal.rst:1056 msgid "" "New contexts can also be created using the :class:`Context` constructor " "described below. In addition, the module provides three pre-made contexts:" msgstr "" -"De nouveaux contextes peuvent également être créés à l'aide du constructeur :" -"class:`Context` décrit ci-dessous. De plus, le module fournit trois " -"contextes prédéfinis :" +"De nouveaux contextes peuvent également être créés à l'aide du " +"constructeur :class:`Context` décrit ci-dessous. De plus, le module fournit " +"trois contextes prédéfinis :" -#: library/decimal.rst:1021 +#: library/decimal.rst:1062 msgid "" "This is a standard context defined by the General Decimal Arithmetic " -"Specification. Precision is set to nine. Rounding is set to :const:" -"`ROUND_HALF_UP`. All flags are cleared. All traps are enabled (treated as " -"exceptions) except :const:`Inexact`, :const:`Rounded`, and :const:" -"`Subnormal`." +"Specification. Precision is set to nine. Rounding is set " +"to :const:`ROUND_HALF_UP`. All flags are cleared. All traps are enabled " +"(treated as exceptions) except :const:`Inexact`, :const:`Rounded`, " +"and :const:`Subnormal`." msgstr "" "Il s'agit d'un contexte standard défini par la *General Decimal Arithmetic " -"Specification*. La précision est fixée à neuf. L'arrondi est défini sur :" -"const:`ROUND_HALF_UP`. Tous les drapeaux sont effacés. Tous les déroutements " -"sont activés (ils lèvent des exceptions) sauf :const:`Inexact`, :const:" -"`Rounded` et :const:`Subnormal`." +"Specification*. La précision est fixée à neuf. L'arrondi est défini " +"sur :const:`ROUND_HALF_UP`. Tous les drapeaux sont effacés. Tous les " +"déroutements sont activés (ils lèvent des exceptions) " +"sauf :const:`Inexact`, :const:`Rounded` et :const:`Subnormal`." -#: library/decimal.rst:1027 +#: library/decimal.rst:1068 msgid "" "Because many of the traps are enabled, this context is useful for debugging." msgstr "" "Étant donné que de nombreuses options de déroutement sont activées, ce " "contexte est utile pour le débogage." -#: library/decimal.rst:1032 +#: library/decimal.rst:1073 msgid "" "This is a standard context defined by the General Decimal Arithmetic " -"Specification. Precision is set to nine. Rounding is set to :const:" -"`ROUND_HALF_EVEN`. All flags are cleared. No traps are enabled (so that " -"exceptions are not raised during computations)." +"Specification. Precision is set to nine. Rounding is set " +"to :const:`ROUND_HALF_EVEN`. All flags are cleared. No traps are enabled " +"(so that exceptions are not raised during computations)." msgstr "" "Il s'agit d'un contexte standard défini par la *General Decimal Arithmetic " -"Specification*. La précision est fixée à neuf. L'arrondi est défini sur :" -"const:`ROUND_HALF_EVEN`. Toutes les options de déroutement sont désactivées " -"(afin que les exceptions ne soient pas levées pendant les calculs)." +"Specification*. La précision est fixée à neuf. L'arrondi est défini " +"sur :const:`ROUND_HALF_EVEN`. Toutes les options de déroutement sont " +"désactivées (afin que les exceptions ne soient pas levées pendant les " +"calculs)." -#: library/decimal.rst:1037 +#: library/decimal.rst:1078 msgid "" "Because the traps are disabled, this context is useful for applications that " "prefer to have result value of ``NaN`` or ``Infinity`` instead of raising " @@ -1511,7 +1544,7 @@ msgstr "" "de terminer une exécution en présence de conditions qui, autrement, " "arrêteraient le programme." -#: library/decimal.rst:1045 +#: library/decimal.rst:1086 msgid "" "This context is used by the :class:`Context` constructor as a prototype for " "new contexts. Changing a field (such a precision) has the effect of " @@ -1523,7 +1556,7 @@ msgstr "" "pour effet de changer la valeur par défaut pour les nouveaux contextes créés " "par le constructeur :class:`Context`." -#: library/decimal.rst:1049 +#: library/decimal.rst:1090 msgid "" "This context is most useful in multi-threaded environments. Changing one of " "the fields before threads are started has the effect of setting system-wide " @@ -1537,7 +1570,7 @@ msgstr "" "recommandée car cela nécessiterait une synchronisation des fils d'exécution " "pour éviter des conditions de concurrence." -#: library/decimal.rst:1054 +#: library/decimal.rst:1095 msgid "" "In single threaded environments, it is preferable to not use this context at " "all. Instead, simply create contexts explicitly as described below." @@ -1546,18 +1579,19 @@ msgstr "" "pas utiliser ce contexte du tout. Créez plutôt simplement des contextes " "explicitement comme décrit ci-dessous." -#: library/decimal.rst:1057 +#: library/decimal.rst:1098 msgid "" -"The default values are :attr:`Context.prec`\\ =\\ ``28``, :attr:`Context." -"rounding`\\ =\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:" -"`Overflow`, :class:`InvalidOperation`, and :class:`DivisionByZero`." +"The default values are :attr:`Context.prec`\\ =\\ " +"``28``, :attr:`Context.rounding`\\ =\\ :const:`ROUND_HALF_EVEN`, and enabled " +"traps for :class:`Overflow`, :class:`InvalidOperation`, " +"and :class:`DivisionByZero`." msgstr "" -"Les valeurs par défaut sont :attr:`Context.prec`\\ =\\ ``28``, :attr:" -"`Context.rounding`\\ =\\ :const:`ROUND_HALF_EVEN` et les interruptions sont " -"activées pour :class:`Overflow`, :class:`InvalidOperation` et :class:" -"`DivisionByZero`." +"Les valeurs par défaut sont :attr:`Context.prec`\\ =\\ " +"``28``, :attr:`Context.rounding`\\ =\\ :const:`ROUND_HALF_EVEN` et les " +"interruptions sont activées " +"pour :class:`Overflow`, :class:`InvalidOperation` et :class:`DivisionByZero`." -#: library/decimal.rst:1062 +#: library/decimal.rst:1103 msgid "" "In addition to the three supplied contexts, new contexts can be created with " "the :class:`Context` constructor." @@ -1565,70 +1599,74 @@ msgstr "" "En plus des trois contextes fournis, de nouveaux contextes peuvent être " "créés avec le constructeur :class:`Context`." -#: library/decimal.rst:1068 +#: library/decimal.rst:1109 msgid "" "Creates a new context. If a field is not specified or is :const:`None`, the " "default values are copied from the :const:`DefaultContext`. If the *flags* " "field is not specified or is :const:`None`, all flags are cleared." msgstr "" -"Crée un nouveau contexte. Si un champ n'est pas spécifié ou est :const:" -"`None`, les valeurs par défaut sont copiées à partir du :const:" -"`DefaultContext`. Si le champ *flags* n'est pas spécifié ou est :const:" -"`None`, tous les indicateurs sont effacés." +"Crée un nouveau contexte. Si un champ n'est pas spécifié ou " +"est :const:`None`, les valeurs par défaut sont copiées à partir " +"du :const:`DefaultContext`. Si le champ *flags* n'est pas spécifié ou " +"est :const:`None`, tous les indicateurs sont effacés." -#: library/decimal.rst:1072 +#: library/decimal.rst:1115 +#, fuzzy msgid "" -"*prec* is an integer in the range [``1``, :const:`MAX_PREC`] that sets the " -"precision for arithmetic operations in the context." +"An integer in the range [``1``, :const:`MAX_PREC`] that sets the precision " +"for arithmetic operations in the context." msgstr "" "*prec* est un entier compris dans la plage [``1``, :const:`MAX_PREC`] qui " "définit la précision des opérations arithmétiques dans le contexte." -#: library/decimal.rst:1075 -msgid "" -"The *rounding* option is one of the constants listed in the section " -"`Rounding Modes`_." +#: library/decimal.rst:1120 +#, fuzzy +msgid "One of the constants listed in the section `Rounding Modes`_." msgstr "" "L'option *rounding* est l'une des constantes répertoriées dans la section " "`Modes d'arrondi`_." -#: library/decimal.rst:1078 +#: library/decimal.rst:1125 +#, fuzzy msgid "" -"The *traps* and *flags* fields list any signals to be set. Generally, new " -"contexts should only set traps and leave the flags clear." +"Lists of any signals to be set. Generally, new contexts should only set " +"traps and leave the flags clear." msgstr "" "Les champs *traps* et *flags* répertorient tous les signaux à définir. En " "général, les nouveaux contextes ne doivent qu'activer des surveillances et " "laisser les drapeaux baissés." -#: library/decimal.rst:1081 +#: library/decimal.rst:1131 +#, fuzzy msgid "" -"The *Emin* and *Emax* fields are integers specifying the outer limits " -"allowable for exponents. *Emin* must be in the range [:const:`MIN_EMIN`, " -"``0``], *Emax* in the range [``0``, :const:`MAX_EMAX`]." +"Integers specifying the outer limits allowable for exponents. *Emin* must be " +"in the range [:const:`MIN_EMIN`, ``0``], *Emax* in the range " +"[``0``, :const:`MAX_EMAX`]." msgstr "" "Les champs *Emin* et *Emax* sont des entiers spécifiant les valeurs limites " "autorisées pour les exposants. *Emin* doit être dans [:const:`MIN_EMIN`, " "``0``], *Emax* dans la plage [``0``, :const:`MAX_EMAX`]." -#: library/decimal.rst:1085 +#: library/decimal.rst:1137 +#, fuzzy msgid "" -"The *capitals* field is either ``0`` or ``1`` (the default). If set to " -"``1``, exponents are printed with a capital ``E``; otherwise, a lowercase " -"``e`` is used: ``Decimal('6.02e+23')``." +"Either ``0`` or ``1`` (the default). If set to ``1``, exponents are printed " +"with a capital ``E``; otherwise, a lowercase ``e`` is used: " +"``Decimal('6.02e+23')``." msgstr "" "Le champ *capitals* est soit ``0`` soit ``1`` (la valeur par défaut). S'il " "est défini à ``1``, les exposants sont imprimés avec un ``E`` majuscule ; " "sinon, un ``e`` minuscule est utilisé : ``Decimal('6.02e+23')``." -#: library/decimal.rst:1089 +#: library/decimal.rst:1143 +#, fuzzy msgid "" -"The *clamp* field is either ``0`` (the default) or ``1``. If set to ``1``, " -"the exponent ``e`` of a :class:`Decimal` instance representable in this " -"context is strictly limited to the range ``Emin - prec + 1 <= e <= Emax - " -"prec + 1``. If *clamp* is ``0`` then a weaker condition holds: the adjusted " -"exponent of the :class:`Decimal` instance is at most :attr:`~Context.Emax`. " -"When *clamp* is ``1``, a large normal number will, where possible, have its " +"Either ``0`` (the default) or ``1``. If set to ``1``, the exponent ``e`` of " +"a :class:`Decimal` instance representable in this context is strictly " +"limited to the range ``Emin - prec + 1 <= e <= Emax - prec + 1``. If *clamp* " +"is ``0`` then a weaker condition holds: the adjusted exponent of " +"the :class:`Decimal` instance is at most :attr:`~Context.Emax`. When " +"*clamp* is ``1``, a large normal number will, where possible, have its " "exponent reduced and a corresponding number of zeros added to its " "coefficient, in order to fit the exponent constraints; this preserves the " "value of the number but loses information about significant trailing zeros. " @@ -1645,7 +1683,7 @@ msgstr "" "cela préserve la valeur du nombre mais perd des informations sur les zéros " "significatifs. Par exemple ::" -#: library/decimal.rst:1104 +#: library/decimal.rst:1157 msgid "" "A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " "interchange formats specified in IEEE 754." @@ -1653,46 +1691,47 @@ msgstr "" "Une valeur *clamp* de ``1`` permet la compatibilité avec les formats " "d'échange décimaux à largeur fixe spécifiés dans la norme IEEE 754." -#: library/decimal.rst:1107 +#: library/decimal.rst:1160 msgid "" "The :class:`Context` class defines several general purpose methods as well " "as a large number of methods for doing arithmetic directly in a given " "context. In addition, for each of the :class:`Decimal` methods described " -"above (with the exception of the :meth:`~Decimal.adjusted` and :meth:" -"`~Decimal.as_tuple` methods) there is a corresponding :class:`Context` " -"method. For example, for a :class:`Context` instance ``C`` and :class:" -"`Decimal` instance ``x``, ``C.exp(x)`` is equivalent to ``x." -"exp(context=C)``. Each :class:`Context` method accepts a Python integer (an " -"instance of :class:`int`) anywhere that a Decimal instance is accepted." +"above (with the exception of the :meth:`~Decimal.adjusted` " +"and :meth:`~Decimal.as_tuple` methods) there is a " +"corresponding :class:`Context` method. For example, for a :class:`Context` " +"instance ``C`` and :class:`Decimal` instance ``x``, ``C.exp(x)`` is " +"equivalent to ``x.exp(context=C)``. Each :class:`Context` method accepts a " +"Python integer (an instance of :class:`int`) anywhere that a Decimal " +"instance is accepted." msgstr "" "La classe :class:`Context` définit plusieurs méthodes à usage général ainsi " "qu'un grand nombre de méthodes permettant de faire de l'arithmétique " -"directement dans un contexte donné. De plus, pour chacune des méthodes :" -"class:`Decimal` décrites ci-dessus (à l'exception des méthodes :meth:" -"`~Decimal.adjusted` et :meth:`~Decimal.as_tuple`), il existe une méthode :" -"class:`Context` correspondante. Par exemple, pour une instance :class:" -"`Context` ``C`` et une instance :class:`Decimal` ``x``, ``C.exp(x)`` est " -"équivalent à ``x.exp(context=C)``. Chaque méthode :class:`Context` accepte " -"un entier Python (une instance de :class:`int`) partout où une instance " -"Decimal est acceptée." - -#: library/decimal.rst:1120 +"directement dans un contexte donné. De plus, pour chacune des " +"méthodes :class:`Decimal` décrites ci-dessus (à l'exception des " +"méthodes :meth:`~Decimal.adjusted` et :meth:`~Decimal.as_tuple`), il existe " +"une méthode :class:`Context` correspondante. Par exemple, pour une " +"instance :class:`Context` ``C`` et une instance :class:`Decimal` ``x``, " +"``C.exp(x)`` est équivalent à ``x.exp(context=C)``. Chaque " +"méthode :class:`Context` accepte un entier Python (une instance " +"de :class:`int`) partout où une instance Decimal est acceptée." + +#: library/decimal.rst:1173 msgid "Resets all of the flags to ``0``." msgstr "Réinitialise tous les drapeaux à ``0``." -#: library/decimal.rst:1124 +#: library/decimal.rst:1177 msgid "Resets all of the traps to ``0``." msgstr "Réinitialise toutes les surveillances à ``0``." -#: library/decimal.rst:1130 +#: library/decimal.rst:1183 msgid "Return a duplicate of the context." msgstr "Renvoie une copie du contexte." -#: library/decimal.rst:1134 +#: library/decimal.rst:1187 msgid "Return a copy of the Decimal instance num." msgstr "Renvoie une copie de l'instance :class:`!Decimal` *num*." -#: library/decimal.rst:1138 +#: library/decimal.rst:1191 msgid "" "Creates a new Decimal instance from *num* but using *self* as context. " "Unlike the :class:`Decimal` constructor, the context precision, rounding " @@ -1703,7 +1742,7 @@ msgstr "" "précision du contexte, la méthode d'arrondi, les indicateurs et les " "surveillances sont appliqués à la conversion." -#: library/decimal.rst:1142 +#: library/decimal.rst:1195 msgid "" "This is useful because constants are often given to a greater precision than " "is needed by the application. Another benefit is that rounding immediately " @@ -1718,7 +1757,7 @@ msgstr "" "d'entrées non arrondies signifie que l'ajout de zéro à une somme peut " "modifier le résultat :" -#: library/decimal.rst:1156 +#: library/decimal.rst:1209 msgid "" "This method implements the to-number operation of the IBM specification. If " "the argument is a string, no leading or trailing whitespace or underscores " @@ -1728,7 +1767,7 @@ msgstr "" "l’argument est une chaîne, aucun espace ou trait de soulignement de début ou " "de fin n’est autorisé." -#: library/decimal.rst:1162 +#: library/decimal.rst:1215 msgid "" "Creates a new Decimal instance from a float *f* but rounding using *self* as " "the context. Unlike the :meth:`Decimal.from_float` class method, the " @@ -1741,21 +1780,21 @@ msgstr "" "d'arrondi, les indicateurs et les surveillances sont appliqués à la " "conversion." -#: library/decimal.rst:1182 +#: library/decimal.rst:1235 msgid "" "Returns a value equal to ``Emin - prec + 1`` which is the minimum exponent " -"value for subnormal results. When underflow occurs, the exponent is set to :" -"const:`Etiny`." +"value for subnormal results. When underflow occurs, the exponent is set " +"to :const:`Etiny`." msgstr "" "Renvoie une valeur égale à ``Emin - prec + 1`` qui est la valeur minimale de " "l'exposant pour les résultats avec dépassement inférieur. Lorsqu'un " "dépassement inférieur se produit, l'exposant est défini sur :const:`Etiny`." -#: library/decimal.rst:1188 +#: library/decimal.rst:1241 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "Renvoie une valeur égale à ``Emax - prec + 1``." -#: library/decimal.rst:1190 +#: library/decimal.rst:1243 msgid "" "The usual approach to working with decimals is to create :class:`Decimal` " "instances and then apply arithmetic operations which take place within the " @@ -1771,190 +1810,190 @@ msgstr "" "dans un contexte spécifique. Les méthodes sont similaires à celles de la " "classe :class:`Decimal` et ne sont décrites que brièvement ici." -#: library/decimal.rst:1200 +#: library/decimal.rst:1253 msgid "Returns the absolute value of *x*." msgstr "Renvoie la valeur absolue de *x*." -#: library/decimal.rst:1205 +#: library/decimal.rst:1258 msgid "Return the sum of *x* and *y*." msgstr "Renvoie la somme de *x* et *y*." -#: library/decimal.rst:1210 +#: library/decimal.rst:1263 msgid "Returns the same Decimal object *x*." msgstr "Renvoie l'objet Decimal *x* lui-même." -#: library/decimal.rst:1215 +#: library/decimal.rst:1268 msgid "Compares *x* and *y* numerically." msgstr "Compare *x* et *y* numériquement." -#: library/decimal.rst:1220 +#: library/decimal.rst:1273 msgid "Compares the values of the two operands numerically." msgstr "Compare numériquement les valeurs des deux opérandes." -#: library/decimal.rst:1225 +#: library/decimal.rst:1278 msgid "Compares two operands using their abstract representation." msgstr "Compare deux opérandes en utilisant leur représentation abstraite." -#: library/decimal.rst:1230 +#: library/decimal.rst:1283 msgid "" "Compares two operands using their abstract representation, ignoring sign." msgstr "" "Compare deux opérandes en utilisant leur représentation abstraite, en " "ignorant le signe." -#: library/decimal.rst:1235 +#: library/decimal.rst:1288 msgid "Returns a copy of *x* with the sign set to 0." msgstr "Renvoie une copie de *x* avec le signe à 0 (c.-à-d. positif)." -#: library/decimal.rst:1240 +#: library/decimal.rst:1293 msgid "Returns a copy of *x* with the sign inverted." msgstr "Renvoie une copie de *x* mais de signe opposé." -#: library/decimal.rst:1245 +#: library/decimal.rst:1298 msgid "Copies the sign from *y* to *x*." msgstr "Copie le signe de *y* vers *x*." -#: library/decimal.rst:1250 +#: library/decimal.rst:1303 msgid "Return *x* divided by *y*." msgstr "Renvoie *x* divisé par *y*." -#: library/decimal.rst:1255 +#: library/decimal.rst:1308 msgid "Return *x* divided by *y*, truncated to an integer." msgstr "Renvoie *x* divisé par *y*, tronqué comme entier." -#: library/decimal.rst:1260 +#: library/decimal.rst:1313 msgid "Divides two numbers and returns the integer part of the result." msgstr "Renvoie la partie entière de la division entre deux nombres." -#: library/decimal.rst:1265 +#: library/decimal.rst:1318 msgid "Returns ``e ** x``." msgstr "Renvoie ``e ** x``." -#: library/decimal.rst:1270 +#: library/decimal.rst:1323 msgid "Returns *x* multiplied by *y*, plus *z*." msgstr "Renvoie *x* multiplié par *y*, plus *z*." -#: library/decimal.rst:1275 +#: library/decimal.rst:1328 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est canonique ; ``False`` sinon." -#: library/decimal.rst:1280 +#: library/decimal.rst:1333 msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est fini ; ``False`` sinon." -#: library/decimal.rst:1285 +#: library/decimal.rst:1338 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est infini et ``False`` sinon." -#: library/decimal.rst:1290 +#: library/decimal.rst:1343 msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``." msgstr "" "Renvoie ``True`` si *x* est un *NaN* (silencieux ou signalétique), ``False`` " "sinon." -#: library/decimal.rst:1295 +#: library/decimal.rst:1348 msgid "" "Returns ``True`` if *x* is a normal number; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est un nombre normal ; ``False`` sinon." -#: library/decimal.rst:1300 +#: library/decimal.rst:1353 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est un *NaN* silencieux, ``False`` sinon." -#: library/decimal.rst:1305 +#: library/decimal.rst:1358 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est négatif et ``False`` sinon." -#: library/decimal.rst:1310 +#: library/decimal.rst:1363 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est un *NaN* signalétique, ``False`` sinon." -#: library/decimal.rst:1315 +#: library/decimal.rst:1368 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." msgstr "" "Renvoie ``True`` si *x* est est inférieur à la valeur minimale " "représentable ; sinon, renvoie ``False``." -#: library/decimal.rst:1320 +#: library/decimal.rst:1373 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." msgstr "Renvoie ``True`` si *x* est un zéro et ``False`` sinon." -#: library/decimal.rst:1325 +#: library/decimal.rst:1378 msgid "Returns the natural (base e) logarithm of *x*." msgstr "Renvoie le logarithme naturel (en base e) de *x*." -#: library/decimal.rst:1330 +#: library/decimal.rst:1383 msgid "Returns the base 10 logarithm of *x*." msgstr "Renvoie le logarithme en base 10 de *x*." -#: library/decimal.rst:1335 +#: library/decimal.rst:1388 msgid "Returns the exponent of the magnitude of the operand's MSD." msgstr "" "Renvoie l'exposant correspondant du chiffre de poids fort de la mantisse de " "l'opérande." -#: library/decimal.rst:1340 +#: library/decimal.rst:1393 msgid "Applies the logical operation *and* between each operand's digits." msgstr "" "Applique l'opération logique *ET* entre les chiffres de chaque opérande." -#: library/decimal.rst:1345 +#: library/decimal.rst:1398 msgid "Invert all the digits in *x*." msgstr "Inverse tous les chiffres de *x*." -#: library/decimal.rst:1350 +#: library/decimal.rst:1403 msgid "Applies the logical operation *or* between each operand's digits." msgstr "" "Applique l'opération logique *OU* entre les chiffres de chaque opérande." -#: library/decimal.rst:1355 +#: library/decimal.rst:1408 msgid "Applies the logical operation *xor* between each operand's digits." msgstr "" "Applique l'opération logique *OU EXCLUSIF* entre les chiffres de chaque " "opérande." -#: library/decimal.rst:1360 +#: library/decimal.rst:1413 msgid "Compares two values numerically and returns the maximum." msgstr "Renvoie le maximum entre les deux valeurs numériques." -#: library/decimal.rst:1375 +#: library/decimal.rst:1428 msgid "Compares the values numerically with their sign ignored." msgstr "Compare les valeurs numériquement en ignorant leur signe." -#: library/decimal.rst:1370 +#: library/decimal.rst:1423 msgid "Compares two values numerically and returns the minimum." msgstr "Compare numériquement deux valeurs et renvoie le minimum." -#: library/decimal.rst:1380 +#: library/decimal.rst:1433 msgid "Minus corresponds to the unary prefix minus operator in Python." msgstr "Correspond à l’opérateur unaire préfixé « moins » en Python." -#: library/decimal.rst:1385 +#: library/decimal.rst:1438 msgid "Return the product of *x* and *y*." msgstr "Renvoie la multiplication de *x* avec *y*." -#: library/decimal.rst:1390 +#: library/decimal.rst:1443 msgid "Returns the largest representable number smaller than *x*." msgstr "Renvoie le plus grand nombre représentable inférieur à *x*." -#: library/decimal.rst:1395 +#: library/decimal.rst:1448 msgid "Returns the smallest representable number larger than *x*." msgstr "Renvoie le plus petit nombre représentable supérieur à *x*." -#: library/decimal.rst:1400 +#: library/decimal.rst:1453 msgid "Returns the number closest to *x*, in direction towards *y*." msgstr "Renvoie le nombre le plus proche de *x*, en direction de *y*." -#: library/decimal.rst:1405 +#: library/decimal.rst:1458 msgid "Reduces *x* to its simplest form." msgstr "Réduit *x* à sa forme la plus simple." -#: library/decimal.rst:1410 +#: library/decimal.rst:1463 msgid "Returns an indication of the class of *x*." msgstr "Renvoie une indication de la classe de *x*." -#: library/decimal.rst:1415 +#: library/decimal.rst:1468 msgid "" "Plus corresponds to the unary prefix plus operator in Python. This " "operation applies the context precision and rounding, so it is *not* an " @@ -1964,13 +2003,13 @@ msgstr "" "applique la précision du contexte et l'arrondi, ce n'est donc *pas* une " "opération d'identité." -#: library/decimal.rst:1422 +#: library/decimal.rst:1475 msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." msgstr "" "Renvoie ``x`` à la puissance ``y``, réduit modulo ``modulo`` si celui-ci est " "donné." -#: library/decimal.rst:1424 +#: library/decimal.rst:1477 msgid "" "With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " "be integral. The result will be inexact unless ``y`` is integral and the " @@ -1984,7 +2023,7 @@ msgstr "" "chiffres. Le mode d'arrondi du contexte est utilisé. Les résultats sont " "toujours correctement arrondis à la manière de Python." -#: library/decimal.rst:1430 +#: library/decimal.rst:1483 msgid "" "``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " "``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." @@ -1992,17 +2031,17 @@ msgstr "" "``Decimal(0) ** Decimal(0)`` donne ``InvalidOperation`` et, si " "``InvalidOperation`` n'est pas surveillé, cela donne ``Decimal('NaN')``." -#: library/decimal.rst:1433 +#: library/decimal.rst:1486 msgid "" -"The C module computes :meth:`power` in terms of the correctly rounded :meth:" -"`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " -"always correctly rounded\"." +"The C module computes :meth:`power` in terms of the correctly " +"rounded :meth:`exp` and :meth:`ln` functions. The result is well-defined but " +"only \"almost always correctly rounded\"." msgstr "" -"le module C calcule :meth:`power` en termes de fonctions :meth:`exp` et :" -"meth:`ln` correctement arrondies. Le résultat est bien défini mais seulement " -"« presque toujours correctement arrondi »." +"le module C calcule :meth:`power` en termes de fonctions :meth:`exp` " +"et :meth:`ln` correctement arrondies. Le résultat est bien défini mais " +"seulement « presque toujours correctement arrondi »." -#: library/decimal.rst:1438 +#: library/decimal.rst:1491 msgid "" "With three arguments, compute ``(x**y) % modulo``. For the three argument " "form, the following restrictions on the arguments hold:" @@ -2010,27 +2049,27 @@ msgstr "" "Avec trois arguments, calcule ``(x**y) % modulo``. Pour la forme à trois " "arguments, les restrictions suivantes sur les arguments s'appliquent :" -#: library/decimal.rst:1441 +#: library/decimal.rst:1494 msgid "all three arguments must be integral" msgstr "les trois arguments doivent être entiers ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:1442 +#: library/decimal.rst:1495 msgid "``y`` must be nonnegative" msgstr "``y`` ne doit pas être négatif ;" # Élément d'une liste, d'où le ; final -#: library/decimal.rst:1443 +#: library/decimal.rst:1496 msgid "at least one of ``x`` or ``y`` must be nonzero" msgstr "au moins l'un de ``x`` ou ``y`` doit être différent de zéro ;" -#: library/decimal.rst:1444 +#: library/decimal.rst:1497 msgid "``modulo`` must be nonzero and have at most 'precision' digits" msgstr "" "``modulo`` doit être différent de zéro et avoir au plus ``precision`` " "chiffres." -#: library/decimal.rst:1446 +#: library/decimal.rst:1499 msgid "" "The value resulting from ``Context.power(x, y, modulo)`` is equal to the " "value that would be obtained by computing ``(x**y) % modulo`` with unbounded " @@ -2044,19 +2083,19 @@ msgstr "" "zéro, quels que soient les exposants de ``x``, ``y`` et ``modulo``. Le " "résultat est toujours exact." -#: library/decimal.rst:1456 +#: library/decimal.rst:1509 msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." msgstr "Renvoie une valeur égale à *x* (arrondie), ayant l'exposant de *y*." -#: library/decimal.rst:1461 +#: library/decimal.rst:1514 msgid "Just returns 10, as this is Decimal, :)" msgstr "Renvoie 10 car c'est *Decimal*, :)" -#: library/decimal.rst:1466 +#: library/decimal.rst:1519 msgid "Returns the remainder from integer division." msgstr "Renvoie le reste de la division entière." -#: library/decimal.rst:1468 +#: library/decimal.rst:1521 msgid "" "The sign of the result, if non-zero, is the same as that of the original " "dividend." @@ -2064,7 +2103,7 @@ msgstr "" "Le signe du résultat, s'il est différent de zéro, est le même que celui du " "dividende initial." -#: library/decimal.rst:1474 +#: library/decimal.rst:1527 msgid "" "Returns ``x - y * n``, where *n* is the integer nearest the exact value of " "``x / y`` (if the result is 0 then its sign will be the sign of *x*)." @@ -2073,95 +2112,115 @@ msgstr "" "exacte de ``x / y`` (si le résultat est 0 alors son signe est le signe de " "*x*)." -#: library/decimal.rst:1480 +#: library/decimal.rst:1533 msgid "Returns a rotated copy of *x*, *y* times." msgstr "Renvoie une copie pivotée de *x*, *y* fois." -#: library/decimal.rst:1485 +#: library/decimal.rst:1538 msgid "Returns ``True`` if the two operands have the same exponent." msgstr "Renvoie ``True`` si les deux opérandes ont le même exposant." -#: library/decimal.rst:1490 +#: library/decimal.rst:1543 msgid "Returns the first operand after adding the second value its exp." msgstr "" "Renvoie le premier opérande après avoir ajouté la deuxième valeur à son " "*exp*." -#: library/decimal.rst:1495 +#: library/decimal.rst:1548 msgid "Returns a shifted copy of *x*, *y* times." msgstr "Renvoie une copie décalée de *x*, *y* fois." -#: library/decimal.rst:1500 +#: library/decimal.rst:1553 msgid "Square root of a non-negative number to context precision." msgstr "" "Renvoie la racine carrée d'un nombre non négatif avec la précision donnée " "par le contexte." -#: library/decimal.rst:1505 +#: library/decimal.rst:1558 msgid "Return the difference between *x* and *y*." msgstr "Renvoie la différence entre *x* et *y*." -#: library/decimal.rst:1519 +#: library/decimal.rst:1572 msgid "Rounds to an integer." msgstr "Arrondit à un entier." -#: library/decimal.rst:1524 +#: library/decimal.rst:1577 msgid "Converts a number to a string using scientific notation." msgstr "Convertit un nombre en chaîne en utilisant la notation scientifique." -#: library/decimal.rst:1531 +#: library/decimal.rst:1584 msgid "Constants" msgstr "Constantes" -#: library/decimal.rst:1533 +#: library/decimal.rst:1588 +#, fuzzy +msgid "" +"The highest version of the General Decimal Arithmetic Specification that " +"this implementation complies with. See https://speleotrove.com/decimal/" +"decarith.html for the specification." +msgstr "" +"Spécification d'IBM sur l'arithmétique décimale : `The General Decimal " +"Arithmetic Specification `_ " +"(article en anglais)." + +#: library/decimal.rst:1595 +#, fuzzy msgid "" -"The constants in this section are only relevant for the C module. They are " -"also included in the pure Python version for compatibility." +"The following constants are only relevant for the C module. They are also " +"included in the pure Python version for compatibility." msgstr "" "Les constantes de cette section ne sont pertinentes que pour le module C. " "Elles sont aussi incluses pour la compatibilité dans la version en Python " "pur." -#: library/decimal.rst:1537 +#: library/decimal.rst:1599 msgid "32-bit" msgstr "32-bit" -#: library/decimal.rst:1537 +#: library/decimal.rst:1599 msgid "64-bit" msgstr "64-bit" -#: library/decimal.rst:1541 +#: library/decimal.rst:1603 msgid "``425000000``" msgstr "``425000000``" -#: library/decimal.rst:1541 +#: library/decimal.rst:1603 msgid "``999999999999999999``" msgstr "``999999999999999999``" -#: library/decimal.rst:1543 +#: library/decimal.rst:1605 msgid "``-425000000``" msgstr "``-425000000``" -#: library/decimal.rst:1543 +#: library/decimal.rst:1605 msgid "``-999999999999999999``" msgstr "``-999999999999999999``" -#: library/decimal.rst:1545 +#: library/decimal.rst:1607 msgid "``-849999999``" msgstr "``-849999999``" -#: library/decimal.rst:1545 +#: library/decimal.rst:1607 msgid "``-1999999999999999997``" msgstr "``-1999999999999999997``" -#: library/decimal.rst:1551 +#: library/decimal.rst:1609 +msgid "``256``" +msgstr "" + +#: library/decimal.rst:1609 +msgid "``512``" +msgstr "" + +#: library/decimal.rst:1614 msgid "" "The value is ``True``. Deprecated, because Python now always has threads." msgstr "" "La valeur est ``True``. Déprécié, parce que maintenant Python possède " "toujours des fils d'exécution." -#: library/decimal.rst:1557 +#: library/decimal.rst:1620 msgid "" "The default value is ``True``. If Python is :option:`configured using the --" "without-decimal-contextvar option <--without-decimal-contextvar>`, the C " @@ -2170,55 +2229,55 @@ msgid "" "scenarios." msgstr "" -#: library/decimal.rst:1566 +#: library/decimal.rst:1629 msgid "Rounding modes" msgstr "Modes d'arrondi" -#: library/decimal.rst:1570 +#: library/decimal.rst:1633 msgid "Round towards ``Infinity``." msgstr "" -#: library/decimal.rst:1574 +#: library/decimal.rst:1637 msgid "Round towards zero." msgstr "" -#: library/decimal.rst:1578 +#: library/decimal.rst:1641 msgid "Round towards ``-Infinity``." msgstr "" -#: library/decimal.rst:1582 +#: library/decimal.rst:1645 msgid "Round to nearest with ties going towards zero." msgstr "" -#: library/decimal.rst:1586 +#: library/decimal.rst:1649 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: library/decimal.rst:1590 +#: library/decimal.rst:1653 msgid "Round to nearest with ties going away from zero." msgstr "" -#: library/decimal.rst:1594 +#: library/decimal.rst:1657 msgid "Round away from zero." msgstr "" -#: library/decimal.rst:1598 +#: library/decimal.rst:1661 msgid "" "Round away from zero if last digit after rounding towards zero would have " "been 0 or 5; otherwise round towards zero." msgstr "" -#: library/decimal.rst:1605 +#: library/decimal.rst:1668 msgid "Signals" msgstr "Signaux" -#: library/decimal.rst:1607 +#: library/decimal.rst:1670 msgid "" "Signals represent conditions that arise during computation. Each corresponds " "to one context flag and one context trap enabler." msgstr "" -#: library/decimal.rst:1610 +#: library/decimal.rst:1673 msgid "" "The context flag is set whenever the condition is encountered. After the " "computation, flags may be checked for informational purposes (for instance, " @@ -2226,140 +2285,140 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: library/decimal.rst:1615 +#: library/decimal.rst:1678 msgid "" "If the context's trap enabler is set for the signal, then the condition " -"causes a Python exception to be raised. For example, if the :class:" -"`DivisionByZero` trap is set, then a :exc:`DivisionByZero` exception is " -"raised upon encountering the condition." +"causes a Python exception to be raised. For example, if " +"the :class:`DivisionByZero` trap is set, then a :exc:`DivisionByZero` " +"exception is raised upon encountering the condition." msgstr "" -#: library/decimal.rst:1623 +#: library/decimal.rst:1686 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: library/decimal.rst:1625 +#: library/decimal.rst:1688 msgid "" -"Typically, clamping occurs when an exponent falls outside the context's :" -"attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the " -"exponent is reduced to fit by adding zeros to the coefficient." +"Typically, clamping occurs when an exponent falls outside the " +"context's :attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If " +"possible, the exponent is reduced to fit by adding zeros to the coefficient." msgstr "" -#: library/decimal.rst:1632 +#: library/decimal.rst:1695 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: library/decimal.rst:1637 +#: library/decimal.rst:1700 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: library/decimal.rst:1639 +#: library/decimal.rst:1702 msgid "" "Can occur with division, modulo division, or when raising a number to a " "negative power. If this signal is not trapped, returns ``Infinity`` or ``-" "Infinity`` with the sign determined by the inputs to the calculation." msgstr "" -#: library/decimal.rst:1646 +#: library/decimal.rst:1709 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: library/decimal.rst:1648 +#: library/decimal.rst:1711 msgid "" "Signals when non-zero digits were discarded during rounding. The rounded " "result is returned. The signal flag or trap is used to detect when results " "are inexact." msgstr "" -#: library/decimal.rst:1655 +#: library/decimal.rst:1718 msgid "An invalid operation was performed." msgstr "" -#: library/decimal.rst:1657 +#: library/decimal.rst:1720 msgid "" "Indicates that an operation was requested that does not make sense. If not " "trapped, returns ``NaN``. Possible causes include::" msgstr "" -#: library/decimal.rst:1673 +#: library/decimal.rst:1736 msgid "Numerical overflow." msgstr "Débordement numérique." -#: library/decimal.rst:1675 +#: library/decimal.rst:1738 msgid "" "Indicates the exponent is larger than :attr:`Context.Emax` after rounding " "has occurred. If not trapped, the result depends on the rounding mode, " "either pulling inward to the largest representable finite number or rounding " -"outward to ``Infinity``. In either case, :class:`Inexact` and :class:" -"`Rounded` are also signaled." +"outward to ``Infinity``. In either case, :class:`Inexact` " +"and :class:`Rounded` are also signaled." msgstr "" -#: library/decimal.rst:1684 +#: library/decimal.rst:1747 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: library/decimal.rst:1686 +#: library/decimal.rst:1749 msgid "" "Signaled whenever rounding discards digits; even if those digits are zero " "(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result " "unchanged. This signal is used to detect loss of significant digits." msgstr "" -#: library/decimal.rst:1694 +#: library/decimal.rst:1757 msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgstr "" -#: library/decimal.rst:1696 +#: library/decimal.rst:1759 msgid "" "Occurs when an operation result is subnormal (the exponent is too small). If " "not trapped, returns the result unchanged." msgstr "" -#: library/decimal.rst:1702 +#: library/decimal.rst:1765 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: library/decimal.rst:1704 +#: library/decimal.rst:1767 msgid "" -"Occurs when a subnormal result is pushed to zero by rounding. :class:" -"`Inexact` and :class:`Subnormal` are also signaled." +"Occurs when a subnormal result is pushed to zero by " +"rounding. :class:`Inexact` and :class:`Subnormal` are also signaled." msgstr "" -#: library/decimal.rst:1710 +#: library/decimal.rst:1773 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: library/decimal.rst:1712 +#: library/decimal.rst:1775 msgid "" "If the signal is not trapped (default), mixing floats and Decimals is " -"permitted in the :class:`~decimal.Decimal` constructor, :meth:`~decimal." -"Context.create_decimal` and all comparison operators. Both conversion and " -"comparisons are exact. Any occurrence of a mixed operation is silently " -"recorded by setting :exc:`FloatOperation` in the context flags. Explicit " -"conversions with :meth:`~decimal.Decimal.from_float` or :meth:`~decimal." -"Context.create_decimal_from_float` do not set the flag." +"permitted in the :class:`~decimal.Decimal` " +"constructor, :meth:`~decimal.Context.create_decimal` and all comparison " +"operators. Both conversion and comparisons are exact. Any occurrence of a " +"mixed operation is silently recorded by setting :exc:`FloatOperation` in the " +"context flags. Explicit conversions with :meth:`~decimal.Decimal.from_float` " +"or :meth:`~decimal.Context.create_decimal_from_float` do not set the flag." msgstr "" -#: library/decimal.rst:1720 +#: library/decimal.rst:1783 msgid "" "Otherwise (the signal is trapped), only equality comparisons and explicit " -"conversions are silent. All other mixed operations raise :exc:" -"`FloatOperation`." +"conversions are silent. All other mixed operations " +"raise :exc:`FloatOperation`." msgstr "" -#: library/decimal.rst:1724 +#: library/decimal.rst:1787 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: library/decimal.rst:1745 -msgid "Floating-Point Notes" +#: library/decimal.rst:1808 +msgid "Floating-point notes" msgstr "" -#: library/decimal.rst:1749 +#: library/decimal.rst:1812 msgid "Mitigating round-off error with increased precision" msgstr "" -#: library/decimal.rst:1751 +#: library/decimal.rst:1814 msgid "" "The use of decimal floating point eliminates decimal representation error " "(making it possible to represent ``0.1`` exactly); however, some operations " @@ -2367,7 +2426,7 @@ msgid "" "precision." msgstr "" -#: library/decimal.rst:1755 +#: library/decimal.rst:1818 msgid "" "The effects of round-off error can be amplified by the addition or " "subtraction of nearly offsetting quantities resulting in loss of " @@ -2376,24 +2435,24 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: library/decimal.rst:1779 +#: library/decimal.rst:1842 msgid "" -"The :mod:`decimal` module makes it possible to restore the identities by " +"The :mod:`!decimal` module makes it possible to restore the identities by " "expanding the precision sufficiently to avoid loss of significance:" msgstr "" -#: library/decimal.rst:1799 +#: library/decimal.rst:1862 msgid "Special values" msgstr "" -#: library/decimal.rst:1801 +#: library/decimal.rst:1864 msgid "" -"The number system for the :mod:`decimal` module provides special values " +"The number system for the :mod:`!decimal` module provides special values " "including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " "``+0`` and ``-0``." msgstr "" -#: library/decimal.rst:1805 +#: library/decimal.rst:1868 msgid "" "Infinities can be constructed directly with: ``Decimal('Infinity')``. Also, " "they can arise from dividing by zero when the :exc:`DivisionByZero` signal " @@ -2402,49 +2461,49 @@ msgid "" "representable number." msgstr "" -#: library/decimal.rst:1810 +#: library/decimal.rst:1873 msgid "" "The infinities are signed (affine) and can be used in arithmetic operations " "where they get treated as very large, indeterminate numbers. For instance, " "adding a constant to infinity gives another infinite result." msgstr "" -#: library/decimal.rst:1814 +#: library/decimal.rst:1877 msgid "" -"Some operations are indeterminate and return ``NaN``, or if the :exc:" -"`InvalidOperation` signal is trapped, raise an exception. For example, " -"``0/0`` returns ``NaN`` which means \"not a number\". This variety of " -"``NaN`` is quiet and, once created, will flow through other computations " +"Some operations are indeterminate and return ``NaN``, or if " +"the :exc:`InvalidOperation` signal is trapped, raise an exception. For " +"example, ``0/0`` returns ``NaN`` which means \"not a number\". This variety " +"of ``NaN`` is quiet and, once created, will flow through other computations " "always resulting in another ``NaN``. This behavior can be useful for a " "series of computations that occasionally have missing inputs --- it allows " "the calculation to proceed while flagging specific results as invalid." msgstr "" -#: library/decimal.rst:1822 +#: library/decimal.rst:1885 msgid "" "A variant is ``sNaN`` which signals rather than remaining quiet after every " "operation. This is a useful return value when an invalid result needs to " "interrupt a calculation for special handling." msgstr "" -#: library/decimal.rst:1826 +#: library/decimal.rst:1889 msgid "" "The behavior of Python's comparison operators can be a little surprising " "where a ``NaN`` is involved. A test for equality where one of the operands " "is a quiet or signaling ``NaN`` always returns :const:`False` (even when " "doing ``Decimal('NaN')==Decimal('NaN')``), while a test for inequality " "always returns :const:`True`. An attempt to compare two Decimals using any " -"of the ``<``, ``<=``, ``>`` or ``>=`` operators will raise the :exc:" -"`InvalidOperation` signal if either operand is a ``NaN``, and return :const:" -"`False` if this signal is not trapped. Note that the General Decimal " -"Arithmetic specification does not specify the behavior of direct " +"of the ``<``, ``<=``, ``>`` or ``>=`` operators will raise " +"the :exc:`InvalidOperation` signal if either operand is a ``NaN``, and " +"return :const:`False` if this signal is not trapped. Note that the General " +"Decimal Arithmetic specification does not specify the behavior of direct " "comparisons; these rules for comparisons involving a ``NaN`` were taken from " "the IEEE 854 standard (see Table 3 in section 5.7). To ensure strict " -"standards-compliance, use the :meth:`~Decimal.compare` and :meth:`~Decimal." -"compare_signal` methods instead." +"standards-compliance, use the :meth:`~Decimal.compare` " +"and :meth:`~Decimal.compare_signal` methods instead." msgstr "" -#: library/decimal.rst:1839 +#: library/decimal.rst:1902 msgid "" "The signed zeros can result from calculations that underflow. They keep the " "sign that would have resulted if the calculation had been carried out to " @@ -2452,7 +2511,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: library/decimal.rst:1844 +#: library/decimal.rst:1907 msgid "" "In addition to the two signed zeros which are distinct yet equal, there are " "various representations of zero with differing precisions yet equivalent in " @@ -2461,11 +2520,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: library/decimal.rst:1859 +#: library/decimal.rst:1922 msgid "Working with threads" msgstr "" -#: library/decimal.rst:1861 +#: library/decimal.rst:1924 msgid "" "The :func:`getcontext` function accesses a different :class:`Context` object " "for each thread. Having separate thread contexts means that threads may " @@ -2473,80 +2532,94 @@ msgid "" "other threads." msgstr "" -#: library/decimal.rst:1865 +#: library/decimal.rst:1928 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: library/decimal.rst:1868 +#: library/decimal.rst:1931 +msgid "" +"If :func:`setcontext` has not been called before :func:`getcontext`, " +"then :func:`getcontext` will automatically create a new context for use in " +"the current thread. New context objects have default values set from " +"the :data:`decimal.DefaultContext` object." +msgstr "" + +#: library/decimal.rst:1936 msgid "" -"If :func:`setcontext` has not been called before :func:`getcontext`, then :" -"func:`getcontext` will automatically create a new context for use in the " -"current thread." +"The :data:`sys.flags.thread_inherit_context` flag affects the context for " +"new threads. If the flag is false, new threads will start with an empty " +"context. In this case, :func:`getcontext` will create a new context object " +"when called and use the default values from *DefaultContext*. If the flag " +"is true, new threads will start with a copy of context from the caller " +"of :meth:`threading.Thread.start`." msgstr "" -#: library/decimal.rst:1872 +#: library/decimal.rst:1943 msgid "" -"The new context is copied from a prototype context called *DefaultContext*. " "To control the defaults so that each thread will use the same values " "throughout the application, directly modify the *DefaultContext* object. " "This should be done *before* any threads are started so that there won't be " "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: library/decimal.rst:1897 +#: library/decimal.rst:1967 msgid "Recipes" msgstr "Cas pratiques" -#: library/decimal.rst:1899 +#: library/decimal.rst:1969 msgid "" "Here are a few recipes that serve as utility functions and that demonstrate " "ways to work with the :class:`Decimal` class::" msgstr "" -#: library/decimal.rst:2054 +#: library/decimal.rst:2124 msgid "Decimal FAQ" msgstr "FAQ *decimal*" -#: library/decimal.rst:2056 +#: library/decimal.rst:2126 +#, fuzzy msgid "" -"Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " +"Q: It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " "to minimize typing when using the interactive interpreter?" msgstr "" "Q. C'est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un " "moyen de réduire la frappe quand on utilise l'interpréteur interactif ?" -#: library/decimal.rst:2059 -msgid "A. Some users abbreviate the constructor to just a single letter:" +#: library/decimal.rst:2129 +#, fuzzy +msgid "A: Some users abbreviate the constructor to just a single letter:" msgstr "" "R. Certains utilisateurs abrègent le constructeur en une seule lettre :" -#: library/decimal.rst:2065 +#: library/decimal.rst:2135 msgid "" -"Q. In a fixed-point application with two decimal places, some inputs have " +"Q: In a fixed-point application with two decimal places, some inputs have " "many places and need to be rounded. Others are not supposed to have excess " "digits and need to be validated. What methods should be used?" msgstr "" -#: library/decimal.rst:2069 +#: library/decimal.rst:2139 msgid "" -"A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " +"A: The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " "places. If the :const:`Inexact` trap is set, it is also useful for " "validation:" msgstr "" -#: library/decimal.rst:2087 +#: library/decimal.rst:2157 +#, fuzzy msgid "" -"Q. Once I have valid two place inputs, how do I maintain that invariant " +"Q: Once I have valid two place inputs, how do I maintain that invariant " "throughout an application?" msgstr "" "Q. Une fois que mes entrées sont à deux décimales valides, comment maintenir " "cet invariant dans l'application ?" -#: library/decimal.rst:2090 +#: library/decimal.rst:2160 +#, fuzzy msgid "" -"A. Some operations like addition, subtraction, and multiplication by an " +"A: Some operations like addition, subtraction, and multiplication by an " "integer will automatically preserve fixed point. Others operations, like " "division and non-integer multiplication, will change the number of decimal " "places and need to be followed-up with a :meth:`~Decimal.quantize` step:" @@ -2557,36 +2630,36 @@ msgstr "" "entiers, changent le nombre de décimales et doivent être suivies d'une " "étape :meth:`~Decimal.quantize` :" -#: library/decimal.rst:2108 +#: library/decimal.rst:2178 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`~Decimal.quantize` step:" msgstr "" "Lors du développement d'applications en virgule fixe, il est pratique de " -"définir des fonctions pour gérer cette étape de quantification par :meth:" -"`~Decimal.quantize` :" +"définir des fonctions pour gérer cette étape de quantification " +"par :meth:`~Decimal.quantize` :" -#: library/decimal.rst:2122 +#: library/decimal.rst:2192 msgid "" -"Q. There are many ways to express the same value. The numbers ``200``, " +"Q: There are many ways to express the same value. The numbers ``200``, " "``200.000``, ``2E2``, and ``.02E+4`` all have the same value at various " "precisions. Is there a way to transform them to a single recognizable " "canonical value?" msgstr "" -#: library/decimal.rst:2127 +#: library/decimal.rst:2197 msgid "" -"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " +"A: The :meth:`~Decimal.normalize` method maps all equivalent values to a " "single representative:" msgstr "" -#: library/decimal.rst:2134 -msgid "Q. When does rounding occur in a computation?" +#: library/decimal.rst:2204 +msgid "Q: When does rounding occur in a computation?" msgstr "" -#: library/decimal.rst:2136 +#: library/decimal.rst:2206 msgid "" -"A. It occurs *after* the computation. The philosophy of the decimal " +"A: It occurs *after* the computation. The philosophy of the decimal " "specification is that numbers are considered exact and are created " "independent of the current context. They can even have greater precision " "than current context. Computations process with those exact inputs and then " @@ -2594,118 +2667,118 @@ msgid "" "computation::" msgstr "" -#: library/decimal.rst:2154 +#: library/decimal.rst:2224 msgid "" -"Q. Some decimal values always print with exponential notation. Is there a " +"Q: Some decimal values always print with exponential notation. Is there a " "way to get a non-exponential representation?" msgstr "" -#: library/decimal.rst:2157 +#: library/decimal.rst:2227 msgid "" -"A. For some values, exponential notation is the only way to express the " +"A: For some values, exponential notation is the only way to express the " "number of significant places in the coefficient. For example, expressing " "``5.0E+3`` as ``5000`` keeps the value constant but cannot show the " "original's two-place significance." msgstr "" -#: library/decimal.rst:2162 +#: library/decimal.rst:2232 msgid "" "If an application does not care about tracking significance, it is easy to " "remove the exponent and trailing zeroes, losing significance, but keeping " "the value unchanged:" msgstr "" -#: library/decimal.rst:2172 -msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" +#: library/decimal.rst:2242 +msgid "Q: Is there a way to convert a regular float to a :class:`Decimal`?" msgstr "" -#: library/decimal.rst:2174 +#: library/decimal.rst:2244 msgid "" -"A. Yes, any binary floating-point number can be exactly expressed as a " +"A: Yes, any binary floating-point number can be exactly expressed as a " "Decimal though an exact conversion may take more precision than intuition " "would suggest:" msgstr "" -#: library/decimal.rst:2183 +#: library/decimal.rst:2253 msgid "" -"Q. Within a complex calculation, how can I make sure that I haven't gotten a " +"Q: Within a complex calculation, how can I make sure that I haven't gotten a " "spurious result because of insufficient precision or rounding anomalies." msgstr "" -#: library/decimal.rst:2186 +#: library/decimal.rst:2256 msgid "" -"A. The decimal module makes it easy to test results. A best practice is to " +"A: The decimal module makes it easy to test results. A best practice is to " "re-run calculations using greater precision and with various rounding modes. " "Widely differing results indicate insufficient precision, rounding mode " "issues, ill-conditioned inputs, or a numerically unstable algorithm." msgstr "" -#: library/decimal.rst:2191 +#: library/decimal.rst:2261 msgid "" -"Q. I noticed that context precision is applied to the results of operations " +"Q: I noticed that context precision is applied to the results of operations " "but not to the inputs. Is there anything to watch out for when mixing " "values of different precisions?" msgstr "" -#: library/decimal.rst:2195 +#: library/decimal.rst:2265 msgid "" -"A. Yes. The principle is that all values are considered to be exact and so " +"A: Yes. The principle is that all values are considered to be exact and so " "is the arithmetic on those values. Only the results are rounded. The " "advantage for inputs is that \"what you type is what you get\". A " "disadvantage is that the results can look odd if you forget that the inputs " "haven't been rounded:" msgstr "" -#: library/decimal.rst:2208 +#: library/decimal.rst:2278 msgid "" "The solution is either to increase precision or to force rounding of inputs " "using the unary plus operation:" msgstr "" -#: library/decimal.rst:2217 +#: library/decimal.rst:2287 msgid "" -"Alternatively, inputs can be rounded upon creation using the :meth:`Context." -"create_decimal` method:" +"Alternatively, inputs can be rounded upon creation using " +"the :meth:`Context.create_decimal` method:" msgstr "" -#: library/decimal.rst:2223 -msgid "Q. Is the CPython implementation fast for large numbers?" +#: library/decimal.rst:2293 +msgid "Q: Is the CPython implementation fast for large numbers?" msgstr "" -#: library/decimal.rst:2225 +#: library/decimal.rst:2295 msgid "" -"A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " -"the decimal module integrate the high speed `libmpdec `_ library for arbitrary precision " -"correctly rounded decimal floating-point arithmetic [#]_. ``libmpdec`` uses " -"`Karatsuba multiplication `_ library for arbitrary " +"precision correctly rounded decimal floating-point arithmetic [#]_. " +"``libmpdec`` uses `Karatsuba multiplication `_ for medium-sized numbers and the `Number Theoretic " "Transform `_ for very " "large numbers." msgstr "" -#: library/decimal.rst:2235 +#: library/decimal.rst:2305 msgid "" -"The context must be adapted for exact arbitrary precision arithmetic. :attr:" -"`~Context.Emin` and :attr:`~Context.Emax` should always be set to the " -"maximum values, :attr:`~Context.clamp` should always be 0 (the default). " -"Setting :attr:`~Context.prec` requires some care." +"The context must be adapted for exact arbitrary precision " +"arithmetic. :attr:`~Context.Emin` and :attr:`~Context.Emax` should always be " +"set to the maximum values, :attr:`~Context.clamp` should always be 0 (the " +"default). Setting :attr:`~Context.prec` requires some care." msgstr "" -#: library/decimal.rst:2239 +#: library/decimal.rst:2309 msgid "" "The easiest approach for trying out bignum arithmetic is to use the maximum " "value for :attr:`~Context.prec` as well [#]_::" msgstr "" -#: library/decimal.rst:2248 +#: library/decimal.rst:2318 msgid "" -"For inexact results, :attr:`MAX_PREC` is far too large on 64-bit platforms " +"For inexact results, :const:`MAX_PREC` is far too large on 64-bit platforms " "and the available memory will be insufficient::" msgstr "" -#: library/decimal.rst:2256 +#: library/decimal.rst:2326 msgid "" "On systems with overallocation (e.g. Linux), a more sophisticated approach " "is to adjust :attr:`~Context.prec` to the amount of available RAM. Suppose " @@ -2713,14 +2786,14 @@ msgid "" "of 500MB each::" msgstr "" -#: library/decimal.rst:2280 +#: library/decimal.rst:2350 msgid "" "In general (and especially on systems without overallocation), it is " "recommended to estimate even tighter bounds and set the :attr:`Inexact` trap " "if all calculations are expected to be exact." msgstr "" -#: library/decimal.rst:2289 +#: library/decimal.rst:2359 msgid "" "This approach now works for all exact results except for non-integer powers." msgstr "" diff --git a/library/development.po b/library/development.po index c58a492b0..f313988e7 100644 --- a/library/development.po +++ b/library/development.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2018-09-29 15:32+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -30,11 +30,11 @@ msgid "" msgstr "" "Les modules décrits dans ce chapitre vous aident à écrire des logiciels. " "Par exemple, le module :mod:`pydoc` prend un module et génère de la " -"documentation basée sur son contenu. Les modules :mod:`doctest` et :mod:" -"`unittest` contiennent des cades applicatifs pour écrire des tests unitaires " -"qui permettent de valider automatiquement le code en vérifiant que chaque " -"résultat attendu est produit. Le programme :program:`2to3` peut traduire du " -"code Python 2.x en Python 3.x." +"documentation basée sur son contenu. Les modules :mod:`doctest` " +"et :mod:`unittest` contiennent des cades applicatifs pour écrire des tests " +"unitaires qui permettent de valider automatiquement le code en vérifiant que " +"chaque résultat attendu est produit. Le programme :program:`2to3` peut " +"traduire du code Python 2.x en Python 3.x." #: library/development.rst:13 msgid "The list of modules described in this chapter is:" diff --git a/library/devmode.po b/library/devmode.po index d70699eda..b4e0e2fe5 100644 --- a/library/devmode.po +++ b/library/devmode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2020-07-20 15:08+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -85,9 +85,9 @@ msgstr "" #: library/devmode.rst:41 msgid "" -"Use the :option:`-W error <-W>` command line option or set the :envvar:" -"`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as " -"errors." +"Use the :option:`-W error <-W>` command line option or set " +"the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat " +"warnings as errors." msgstr "" #: library/devmode.rst:45 @@ -130,9 +130,8 @@ msgstr "" #: library/devmode.rst:61 msgid "" "Call :func:`faulthandler.enable` at Python startup to install handlers for " -"the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal." -"SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to " -"dump the Python traceback on a crash." +"the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` " +"and :const:`~signal.SIGILL` signals to dump the Python traceback on a crash." msgstr "" #: library/devmode.rst:66 @@ -144,8 +143,9 @@ msgstr "" #: library/devmode.rst:70 msgid "" -"Enable :ref:`asyncio debug mode `. For example, :mod:" -"`asyncio` checks for coroutines that were not awaited and logs them." +"Enable :ref:`asyncio debug mode `. For " +"example, :mod:`asyncio` checks for coroutines that were not awaited and logs " +"them." msgstr "" #: library/devmode.rst:73 @@ -157,8 +157,8 @@ msgstr "" #: library/devmode.rst:76 msgid "" "Check the *encoding* and *errors* arguments for string encoding and decoding " -"operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes." -"decode`." +"operations. Examples: :func:`open`, :meth:`str.encode` " +"and :meth:`bytes.decode`." msgstr "" #: library/devmode.rst:80 @@ -186,17 +186,17 @@ msgid "" "The Python Development Mode does not enable the :mod:`tracemalloc` module by " "default, because the overhead cost (to performance and memory) would be too " "large. Enabling the :mod:`tracemalloc` module provides additional " -"information on the origin of some errors. For example, :exc:" -"`ResourceWarning` logs the traceback where the resource was allocated, and a " -"buffer overflow error logs the traceback where the memory block was " -"allocated." +"information on the origin of some errors. For " +"example, :exc:`ResourceWarning` logs the traceback where the resource was " +"allocated, and a buffer overflow error logs the traceback where the memory " +"block was allocated." msgstr "" #: library/devmode.rst:95 msgid "" "The Python Development Mode does not prevent the :option:`-O` command line " -"option from removing :keyword:`assert` statements nor from setting :const:" -"`__debug__` to ``False``." +"option from removing :keyword:`assert` statements nor from " +"setting :const:`__debug__` to ``False``." msgstr "" #: library/devmode.rst:99 @@ -279,8 +279,8 @@ msgid "" "``os.close(fp.fileno())`` closes the file descriptor. When the file object " "finalizer tries to close the file descriptor again, it fails with the ``Bad " "file descriptor`` error. A file descriptor must be closed only once. In the " -"worst case scenario, closing it twice can lead to a crash (see :issue:" -"`18748` for an example)." +"worst case scenario, closing it twice can lead to a crash " +"(see :issue:`18748` for an example)." msgstr "" #: library/devmode.rst:219 diff --git a/library/dialog.po b/library/dialog.po index a7025fb51..5ccf6d958 100644 --- a/library/dialog.po +++ b/library/dialog.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-08 10:52+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,25 +20,27 @@ msgid "Tkinter Dialogs" msgstr "Boîtes de dialogue *Tkinter*" #: library/dialog.rst:5 -msgid ":mod:`tkinter.simpledialog` --- Standard Tkinter input dialogs" +#, fuzzy +msgid ":mod:`!tkinter.simpledialog` --- Standard Tkinter input dialogs" msgstr "" ":mod:`tkinter.simpledialog` – Boîtes de dialogue de saisie standard de " "*Tkinter*" -#: library/dialog.rst:11 +#: library/dialog.rst:10 msgid "**Source code:** :source:`Lib/tkinter/simpledialog.py`" msgstr "**Code source :** :source:`Lib/tkinter/simpledialog.py`" -#: library/dialog.rst:15 +#: library/dialog.rst:14 +#, fuzzy msgid "" -"The :mod:`tkinter.simpledialog` module contains convenience classes and " +"The :mod:`!tkinter.simpledialog` module contains convenience classes and " "functions for creating simple modal dialogs to get a value from the user." msgstr "" "Le module :mod:`tkinter.simpledialog` contient des classes pratiques et des " "fonctions pour créer des boîtes de dialogue modales simples afin d'obtenir " "une valeur de l'utilisateur." -#: library/dialog.rst:23 +#: library/dialog.rst:22 msgid "" "The above three functions provide dialogs that prompt the user to enter a " "value of the desired type." @@ -46,11 +48,11 @@ msgstr "" "Les trois fonctions ci-dessus fournissent des boîtes de dialogue qui " "invitent l'utilisateur à saisir une valeur du type souhaité." -#: library/dialog.rst:28 +#: library/dialog.rst:27 msgid "The base class for custom dialogs." msgstr "Classe mère pour les boîtes de dialogue personnalisées." -#: library/dialog.rst:32 +#: library/dialog.rst:31 msgid "" "Override to construct the dialog's interface and return the widget that " "should have initial focus." @@ -58,7 +60,7 @@ msgstr "" "À remplacer pour construire l'interface de la boîte de dialogue et renvoyer " "le widget qui doit avoir le focus initial." -#: library/dialog.rst:37 +#: library/dialog.rst:36 msgid "" "Default behaviour adds OK and Cancel buttons. Override for custom button " "layouts." @@ -66,28 +68,30 @@ msgstr "" "Le comportement par défaut ajoute les boutons OK et Annuler. À remplacer " "avoir une disposition de boutons personnalisée." -#: library/dialog.rst:43 -msgid ":mod:`tkinter.filedialog` --- File selection dialogs" +#: library/dialog.rst:42 +#, fuzzy +msgid ":mod:`!tkinter.filedialog` --- File selection dialogs" msgstr "" ":mod:`tkinter.filedialog` – Boîtes de dialogue de sélection de fichiers" -#: library/dialog.rst:49 +#: library/dialog.rst:47 msgid "**Source code:** :source:`Lib/tkinter/filedialog.py`" msgstr "**Code source :** :source:`Lib/tkinter/filedialog.py`" -#: library/dialog.rst:53 +#: library/dialog.rst:51 +#, fuzzy msgid "" -"The :mod:`tkinter.filedialog` module provides classes and factory functions " +"The :mod:`!tkinter.filedialog` module provides classes and factory functions " "for creating file/directory selection windows." msgstr "" "Le module :mod:`tkinter.filedialog` fournit des classes et des fonctions de " "fabrique pour créer des fenêtres de sélection de fichiers ou répertoires." -#: library/dialog.rst:57 +#: library/dialog.rst:55 msgid "Native Load/Save Dialogs" msgstr "Boîtes de dialogue de chargement et sauvegarde natives" -#: library/dialog.rst:59 +#: library/dialog.rst:57 msgid "" "The following classes and functions provide file dialog windows that combine " "a native look-and-feel with configuration options to customize behaviour. " @@ -99,46 +103,46 @@ msgstr "" "configuration pour personnaliser le comportement. Les arguments nommés " "suivants s'appliquent aux classes et fonctions répertoriées ci-dessous :" -#: library/dialog.rst:0 +#: library/dialog.rst:62 msgid "*parent* - the window to place the dialog on top of" msgstr "*parent* – la fenêtre sur laquelle placer la boîte de dialogue" -#: library/dialog.rst:0 +#: library/dialog.rst:64 msgid "*title* - the title of the window" msgstr "*title* – le titre de la fenêtre" -#: library/dialog.rst:0 +#: library/dialog.rst:66 msgid "*initialdir* - the directory that the dialog starts in" msgstr "*initialdir* – le répertoire dans lequel la boîte de dialogue démarre" -#: library/dialog.rst:0 +#: library/dialog.rst:68 msgid "*initialfile* - the file selected upon opening of the dialog" msgstr "" "*initialfile* – le fichier sélectionné à l'ouverture de la boîte de dialogue" -#: library/dialog.rst:0 +#: library/dialog.rst:70 msgid "" "*filetypes* - a sequence of (label, pattern) tuples, '*' wildcard is allowed" msgstr "" "*filetypes* – une séquence de *n*-uplets (étiquette, motif), le caractère " "générique ``'*'`` est autorisé" -#: library/dialog.rst:0 +#: library/dialog.rst:72 msgid "*defaultextension* - default extension to append to file (save dialogs)" msgstr "" "*defaultextension* – extension par défaut à ajouter au fichier (boîtes de " "dialogue de sauvegarde)" -#: library/dialog.rst:0 +#: library/dialog.rst:74 msgid "*multiple* - when true, selection of multiple items is allowed" msgstr "" "*multiple* – lorsque vrai, la sélection de plusieurs éléments est autorisée" -#: library/dialog.rst:79 +#: library/dialog.rst:77 msgid "**Static factory functions**" msgstr "**Fonctions statiques de fabrique**" -#: library/dialog.rst:81 +#: library/dialog.rst:79 msgid "" "The below functions when called create a modal, native look-and-feel dialog, " "wait for the user's selection, then return the selected value(s) or ``None`` " @@ -148,7 +152,7 @@ msgstr "" "dialogue d'apparence modale native, attendent la sélection de l'utilisateur, " "puis renvoient la ou les valeurs sélectionnées ou ``None`` à l'appelant." -#: library/dialog.rst:88 +#: library/dialog.rst:86 msgid "" "The above two functions create an :class:`Open` dialog and return the opened " "file object(s) in read-only mode." @@ -156,7 +160,7 @@ msgstr "" "Les deux fonctions ci-dessus créent une boîte de dialogue :class:`Open` et " "renvoient le(s) objet(s) fichier ouvert(s) en mode lecture seule." -#: library/dialog.rst:93 +#: library/dialog.rst:91 msgid "" "Create a :class:`SaveAs` dialog and return a file object opened in write-" "only mode." @@ -164,7 +168,7 @@ msgstr "" "Crée une boîte de dialogue :class:`SaveAs` et renvoie un objet fichier " "ouvert en mode écriture seule." -#: library/dialog.rst:98 +#: library/dialog.rst:96 msgid "" "The above two functions create an :class:`Open` dialog and return the " "selected filename(s) that correspond to existing file(s)." @@ -173,26 +177,26 @@ msgstr "" "renvoient le(s) nom(s) de fichier sélectionné(s) qui correspondent au(x) " "fichier(s) existant(s)." -#: library/dialog.rst:103 +#: library/dialog.rst:101 msgid "Create a :class:`SaveAs` dialog and return the selected filename." msgstr "" "Crée une boîte de dialogue :class:`SaveAs` et renvoie le nom de fichier " "sélectionné." -#: library/dialog.rst:107 +#: library/dialog.rst:105 msgid "Prompt user to select a directory." msgstr "Demande à l'utilisateur de sélectionner un répertoire." -#: library/dialog.rst:108 +#: library/dialog.rst:106 msgid "Additional keyword option:" msgstr "Option nommée supplémentaire :" -#: library/dialog.rst:109 +#: library/dialog.rst:107 msgid "*mustexist* - determines if selection must be an existing directory." msgstr "" "*mustexist* – détermine si la sélection doit être un répertoire existant." -#: library/dialog.rst:114 +#: library/dialog.rst:112 msgid "" "The above two classes provide native dialog windows for saving and loading " "files." @@ -200,11 +204,11 @@ msgstr "" "Les deux classes ci-dessus fournissent des fenêtres de dialogue natives pour " "enregistrer et charger des fichiers." -#: library/dialog.rst:117 +#: library/dialog.rst:115 msgid "**Convenience classes**" msgstr "**Classes de commodité**" -#: library/dialog.rst:119 +#: library/dialog.rst:117 msgid "" "The below classes are used for creating file/directory windows from scratch. " "These do not emulate the native look-and-feel of the platform." @@ -213,13 +217,13 @@ msgstr "" "et répertoires à partir de zéro. Celles-ci n'imitent pas l'apparence native " "de la plateforme." -#: library/dialog.rst:124 +#: library/dialog.rst:122 msgid "Create a dialog prompting the user to select a directory." msgstr "" "Crée une boîte de dialogue invitant l'utilisateur à sélectionner un " "répertoire." -#: library/dialog.rst:126 +#: library/dialog.rst:124 msgid "" "The *FileDialog* class should be subclassed for custom event handling and " "behaviour." @@ -227,67 +231,67 @@ msgstr "" "la classe *FileDialog* doit être sous-classée pour un comportement et une " "gestion des événements personnalisés." -#: library/dialog.rst:131 +#: library/dialog.rst:129 msgid "Create a basic file selection dialog." msgstr "Crée une boîte de dialogue basique de sélection de fichiers." -#: library/dialog.rst:135 +#: library/dialog.rst:133 msgid "Trigger the termination of the dialog window." msgstr "Déclenche la fermeture de la fenêtre de dialogue." -#: library/dialog.rst:139 +#: library/dialog.rst:137 msgid "Event handler for double-click event on directory." msgstr "" "Gestionnaire d'événements pour l'événement de double-clic sur le répertoire." -#: library/dialog.rst:143 +#: library/dialog.rst:141 msgid "Event handler for click event on directory." msgstr "Gestionnaire d'événements pour l'événement de clic sur le répertoire." -#: library/dialog.rst:147 +#: library/dialog.rst:145 msgid "Event handler for double-click event on file." msgstr "" "Gestionnaire d'événements pour l'événement de double-clic sur le fichier." -#: library/dialog.rst:151 +#: library/dialog.rst:149 msgid "Event handler for single-click event on file." msgstr "" "Gestionnaire d'événements pour un événement en un seul clic sur le fichier." -#: library/dialog.rst:155 +#: library/dialog.rst:153 msgid "Filter the files by directory." msgstr "Filtre les fichiers par répertoire." -#: library/dialog.rst:159 +#: library/dialog.rst:157 msgid "Retrieve the file filter currently in use." msgstr "Récupère le filtre de fichiers actuellement utilisé." -#: library/dialog.rst:163 +#: library/dialog.rst:161 msgid "Retrieve the currently selected item." msgstr "Récupère l'élément actuellement sélectionné." -#: library/dialog.rst:167 +#: library/dialog.rst:165 msgid "Render dialog and start event loop." msgstr "Affiche la boîte de dialogue et lance la boucle d'événements." -#: library/dialog.rst:171 +#: library/dialog.rst:169 msgid "Exit dialog returning current selection." msgstr "Quitte la boîte de dialogue en renvoyant la sélection actuelle." -#: library/dialog.rst:175 +#: library/dialog.rst:173 msgid "Exit dialog returning filename, if any." msgstr "" "Sort de la boîte de dialogue en renvoyant le nom du fichier, le cas échéant." -#: library/dialog.rst:179 +#: library/dialog.rst:177 msgid "Set the file filter." msgstr "Définit le filtre de fichiers." -#: library/dialog.rst:183 +#: library/dialog.rst:181 msgid "Update the current file selection to *file*." msgstr "Met à jour la sélection de fichiers actuelle vers *file*." -#: library/dialog.rst:188 +#: library/dialog.rst:186 msgid "" "A subclass of FileDialog that creates a dialog window for selecting an " "existing file." @@ -295,7 +299,7 @@ msgstr "" "Sous-classe de *FileDialog* qui crée une fenêtre de dialogue pour " "sélectionner un fichier existant." -#: library/dialog.rst:193 +#: library/dialog.rst:191 msgid "" "Test that a file is provided and that the selection indicates an already " "existing file." @@ -303,7 +307,7 @@ msgstr "" "Teste qu'un fichier est fourni et que la sélection indique un fichier déjà " "existant." -#: library/dialog.rst:198 +#: library/dialog.rst:196 msgid "" "A subclass of FileDialog that creates a dialog window for selecting a " "destination file." @@ -311,7 +315,7 @@ msgstr "" "Sous-classe de *FileDialog* qui crée une fenêtre de dialogue pour " "sélectionner un fichier de destination." -#: library/dialog.rst:203 +#: library/dialog.rst:201 msgid "" "Test whether or not the selection points to a valid file that is not a " "directory. Confirmation is required if an already existing file is selected." @@ -320,26 +324,28 @@ msgstr "" "répertoire. Une confirmation est requise si un fichier déjà existant est " "sélectionné." -#: library/dialog.rst:208 -msgid ":mod:`tkinter.commondialog` --- Dialog window templates" +#: library/dialog.rst:206 +#, fuzzy +msgid ":mod:`!tkinter.commondialog` --- Dialog window templates" msgstr ":mod:`tkinter.commondialog` – Modèles de fenêtre de dialogue" -#: library/dialog.rst:214 +#: library/dialog.rst:211 msgid "**Source code:** :source:`Lib/tkinter/commondialog.py`" msgstr "**Code source :** :source:`Lib/tkinter/commondialog.py`" -#: library/dialog.rst:218 +#: library/dialog.rst:215 +#, fuzzy msgid "" -"The :mod:`tkinter.commondialog` module provides the :class:`Dialog` class " +"The :mod:`!tkinter.commondialog` module provides the :class:`Dialog` class " "that is the base class for dialogs defined in other supporting modules." msgstr "" "Le module :mod:`tkinter.commondialog` fournit la classe :class:`Dialog` qui " "est la classe mère pour les dialogues définis dans d'autres modules." -#: library/dialog.rst:225 +#: library/dialog.rst:222 msgid "Render the Dialog window." msgstr "Affiche la fenêtre de dialogue." -#: library/dialog.rst:230 +#: library/dialog.rst:227 msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" msgstr "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" diff --git a/library/difflib.po b/library/difflib.po index 6f6229bd8..00b22eee8 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 12:28+0200\n" "Last-Translator: Loc Cosnier \n" "Language-Team: FRENCH \n" @@ -21,11 +21,11 @@ msgstr "" msgid ":mod:`!difflib` --- Helpers for computing deltas" msgstr ":mod:`difflib` — Utilitaires pour le calcul des deltas" -#: library/difflib.rst:11 +#: library/difflib.rst:7 msgid "**Source code:** :source:`Lib/difflib.py`" msgstr "**Code source:** :source:`Lib/difflib.py`" -#: library/difflib.rst:20 +#: library/difflib.rst:16 #, fuzzy msgid "" "This module provides classes and functions for comparing sequences. It can " @@ -38,10 +38,10 @@ msgstr "" "séquences. Il peut être utilisé, par exemple, pour comparer des fichiers et " "peut produire des informations sur les différences dans divers formats, y " "compris HTML et les différences contextuelles et unifiées. Pour la " -"comparaison de répertoires et de fichiers, voir aussi le module :mod:" -"`filecmp`." +"comparaison de répertoires et de fichiers, voir aussi le " +"module :mod:`filecmp`." -#: library/difflib.rst:29 +#: library/difflib.rst:25 msgid "" "This is a flexible class for comparing pairs of sequences of any type, so " "long as the sequence elements are :term:`hashable`. The basic algorithm " @@ -57,21 +57,21 @@ msgid "" "to people." msgstr "" "C'est une classe flexible permettant de comparer des séquences deux à deux " -"de n'importe quel type, tant que les éléments des séquences sont :term:" -"`hachables `. L'algorithme de base est antérieur, et un peu plus " -"sophistiqué, à un algorithme publié à la fin des années 1980 par Ratcliff et " -"Obershelp sous le nom hyperbolique de *gestalt pattern matching*. L'idée est " -"de trouver la plus longue sous-séquence d'appariement contiguë qui ne " -"contient pas d'éléments « indésirables » ; ces éléments « indésirables » " -"sont ceux qui sont inintéressants dans un certain sens, comme les lignes " -"blanches ou les espaces. (Le traitement des éléments indésirables est une " -"extension de l'algorithme de Ratcliff et Obershelp). La même idée est " -"ensuite appliquée récursivement aux morceaux des séquences à gauche et à " -"droite de la sous-séquence correspondante. Cela ne donne pas des séquences " -"de montage minimales, mais tend à donner des correspondances qui « semblent " -"correctes » pour les gens." - -#: library/difflib.rst:41 +"de n'importe quel type, tant que les éléments des séquences " +"sont :term:`hachables `. L'algorithme de base est antérieur, et un " +"peu plus sophistiqué, à un algorithme publié à la fin des années 1980 par " +"Ratcliff et Obershelp sous le nom hyperbolique de *gestalt pattern " +"matching*. L'idée est de trouver la plus longue sous-séquence d'appariement " +"contiguë qui ne contient pas d'éléments « indésirables » ; ces éléments " +"« indésirables » sont ceux qui sont inintéressants dans un certain sens, " +"comme les lignes blanches ou les espaces. (Le traitement des éléments " +"indésirables est une extension de l'algorithme de Ratcliff et Obershelp). La " +"même idée est ensuite appliquée récursivement aux morceaux des séquences à " +"gauche et à droite de la sous-séquence correspondante. Cela ne donne pas des " +"séquences de montage minimales, mais tend à donner des correspondances qui " +"« semblent correctes » pour les gens." + +#: library/difflib.rst:37 msgid "" "**Timing:** The basic Ratcliff-Obershelp algorithm is cubic time in the " "worst case and quadratic time in the expected case. :class:`SequenceMatcher` " @@ -86,7 +86,7 @@ msgstr "" "nombre d'éléments que les séquences ont en commun ; le temps dans le " "meilleur cas est linéaire." -#: library/difflib.rst:47 +#: library/difflib.rst:43 msgid "" "**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic " "that automatically treats certain sequence items as junk. The heuristic " @@ -105,15 +105,15 @@ msgstr "" "séquence compte au moins 200 éléments, cet élément est marqué comme " "« populaire » et est traité comme indésirable aux fins de la comparaison des " "séquences. Cette heuristique peut être désactivée en réglant l'argument " -"``autojunk`` sur ``False`` lors de la création de la classe :class:" -"`SequenceMatcher`." +"``autojunk`` sur ``False`` lors de la création de la " +"classe :class:`SequenceMatcher`." -#: library/difflib.rst:386 +#: library/difflib.rst:390 #, fuzzy msgid "Added the *autojunk* parameter." msgstr "Le paramètre *autojunk*." -#: library/difflib.rst:61 +#: library/difflib.rst:57 msgid "" "This is a class for comparing sequences of lines of text, and producing " "human-readable differences or deltas. Differ uses :class:`SequenceMatcher` " @@ -126,53 +126,53 @@ msgstr "" "séquences de lignes, et pour comparer des séquences de caractères dans des " "lignes similaires (quasi-correspondantes)." -#: library/difflib.rst:66 +#: library/difflib.rst:62 msgid "Each line of a :class:`Differ` delta begins with a two-letter code:" msgstr "" "Chaque ligne d'un delta :class:`Differ` commence par un code de deux " "lettres :" -#: library/difflib.rst:69 +#: library/difflib.rst:65 msgid "Code" msgstr "Code" -#: library/difflib.rst:496 +#: library/difflib.rst:500 msgid "Meaning" msgstr "Signification" -#: library/difflib.rst:71 +#: library/difflib.rst:67 msgid "``'- '``" msgstr "``'- '``" -#: library/difflib.rst:71 +#: library/difflib.rst:67 msgid "line unique to sequence 1" msgstr "ligne n'appartenant qu'à la séquence 1" -#: library/difflib.rst:73 +#: library/difflib.rst:69 msgid "``'+ '``" msgstr "``'+ '``" -#: library/difflib.rst:73 +#: library/difflib.rst:69 msgid "line unique to sequence 2" msgstr "ligne n'appartenant qu'à la séquence 2" -#: library/difflib.rst:75 +#: library/difflib.rst:71 msgid "``' '``" msgstr "``' '``" -#: library/difflib.rst:75 +#: library/difflib.rst:71 msgid "line common to both sequences" msgstr "ligne commune aux deux séquences" -#: library/difflib.rst:77 +#: library/difflib.rst:73 msgid "``'? '``" msgstr "``'? '``" -#: library/difflib.rst:77 +#: library/difflib.rst:73 msgid "line not present in either input sequence" msgstr "ligne non présente dans l'une ou l'autre des séquences d'entrée" -#: library/difflib.rst:80 +#: library/difflib.rst:76 #, fuzzy msgid "" "Lines beginning with '``?``' attempt to guide the eye to intraline " @@ -185,7 +185,7 @@ msgstr "" "d'entrée. Ces lignes peuvent être déroutantes si les séquences contiennent " "des caractères de tabulation." -#: library/difflib.rst:87 +#: library/difflib.rst:83 msgid "" "This class can be used to create an HTML table (or a complete HTML file " "containing the table) showing a side by side, line by line comparison of " @@ -197,15 +197,15 @@ msgstr "" "ligne par ligne, du texte avec les changements inter-lignes et intralignes. " "Le tableau peut être généré en mode de différence complet ou contextuel." -#: library/difflib.rst:92 +#: library/difflib.rst:88 msgid "The constructor for this class is:" msgstr "Le constructeur pour cette classe est :" -#: library/difflib.rst:97 +#: library/difflib.rst:93 msgid "Initializes instance of :class:`HtmlDiff`." msgstr "Initialise l'instance de :class:`HtmlDiff`." -#: library/difflib.rst:99 +#: library/difflib.rst:95 msgid "" "*tabsize* is an optional keyword argument to specify tab stop spacing and " "defaults to ``8``." @@ -213,7 +213,7 @@ msgstr "" "*tabsize* est argument nommé optionnel pour spécifier l'espacement des " "tabulations et sa valeur par défaut est ``8``." -#: library/difflib.rst:102 +#: library/difflib.rst:98 msgid "" "*wrapcolumn* is an optional keyword to specify column number where lines are " "broken and wrapped, defaults to ``None`` where lines are not wrapped." @@ -222,23 +222,23 @@ msgstr "" "colonne où les lignes sont coupées pour être ré-agencées, la valeur par " "défaut est ``None`` lorsque les lignes ne sont pas ré-agencées." -#: library/difflib.rst:105 +#: library/difflib.rst:101 msgid "" -"*linejunk* and *charjunk* are optional keyword arguments passed into :func:" -"`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML " -"differences). See :func:`ndiff` documentation for argument default values " -"and descriptions." +"*linejunk* and *charjunk* are optional keyword arguments passed " +"into :func:`ndiff` (used by :class:`HtmlDiff` to generate the side by side " +"HTML differences). See :func:`ndiff` documentation for argument default " +"values and descriptions." msgstr "" -"*linejunk* et *charjunk* sont des arguments nommés optionnels passés dans :" -"func:`ndiff` (utilisés par :class:`HtmlDiff` pour générer les différences " -"HTML côte à côte). Voir la documentation de :func:`ndiff` pour les valeurs " -"par défaut des arguments et les descriptions." +"*linejunk* et *charjunk* sont des arguments nommés optionnels passés " +"dans :func:`ndiff` (utilisés par :class:`HtmlDiff` pour générer les " +"différences HTML côte à côte). Voir la documentation de :func:`ndiff` pour " +"les valeurs par défaut des arguments et les descriptions." -#: library/difflib.rst:109 +#: library/difflib.rst:105 msgid "The following methods are public:" msgstr "Les méthodes suivantes sont publiques :" -#: library/difflib.rst:114 +#: library/difflib.rst:110 msgid "" "Compares *fromlines* and *tolines* (lists of strings) and returns a string " "which is a complete HTML file containing a table showing line by line " @@ -249,7 +249,7 @@ msgstr "" "un tableau montrant les différences ligne par ligne avec les changements " "inter-lignes et intralignes mis en évidence." -#: library/difflib.rst:118 +#: library/difflib.rst:114 msgid "" "*fromdesc* and *todesc* are optional keyword arguments to specify from/to " "file column header strings (both default to an empty string)." @@ -258,7 +258,7 @@ msgstr "" "les chaînes d'en-tête des colonnes *from/to* du fichier (les deux sont des " "chaînes vides par défaut)." -#: library/difflib.rst:121 +#: library/difflib.rst:117 msgid "" "*context* and *numlines* are both optional keyword arguments. Set *context* " "to ``True`` when contextual differences are to be shown, else the default is " @@ -282,7 +282,7 @@ msgstr "" "« suivants » placeraient le surlignage de différence suivant en haut du " "navigateur sans aucun contexte introductif)." -#: library/difflib.rst:132 +#: library/difflib.rst:128 msgid "" "*fromdesc* and *todesc* are interpreted as unescaped HTML and should be " "properly escaped while receiving input from untrusted sources." @@ -291,7 +291,7 @@ msgstr "" "être correctement échappés lors de la réception de données provenant de " "sources non fiables." -#: library/difflib.rst:135 +#: library/difflib.rst:131 msgid "" "*charset* keyword-only argument was added. The default charset of HTML " "document changed from ``'ISO-8859-1'`` to ``'utf-8'``." @@ -299,7 +299,7 @@ msgstr "" "l'argument nommé *charset* a été ajouté. Le jeu de caractères par défaut du " "document HTML est passé de ``'ISO-8859-1'`` à ``'utf-8'``." -#: library/difflib.rst:141 +#: library/difflib.rst:137 msgid "" "Compares *fromlines* and *tolines* (lists of strings) and returns a string " "which is a complete HTML table showing line by line differences with inter-" @@ -309,24 +309,24 @@ msgstr "" "qui est un tableau HTML complet montrant les différences ligne par ligne " "avec les changements inter-lignes et intralignes mis en évidence." -#: library/difflib.rst:145 +#: library/difflib.rst:141 msgid "" -"The arguments for this method are the same as those for the :meth:" -"`make_file` method." +"The arguments for this method are the same as those for " +"the :meth:`make_file` method." msgstr "" -"Les arguments pour cette méthode sont les mêmes que ceux de la méthode :meth:" -"`make_file`." +"Les arguments pour cette méthode sont les mêmes que ceux de la " +"méthode :meth:`make_file`." -#: library/difflib.rst:152 +#: library/difflib.rst:148 msgid "" "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " "generating the delta lines) in context diff format." msgstr "" -"Compare *a* et *b* (listes de chaînes de caractères) ; renvoie un delta (un :" -"term:`generateur ` générant les lignes delta) dans un format de " -"différence de contexte." +"Compare *a* et *b* (listes de chaînes de caractères) ; renvoie un delta " +"(un :term:`generateur ` générant les lignes delta) dans un format " +"de différence de contexte." -#: library/difflib.rst:155 +#: library/difflib.rst:151 #, fuzzy msgid "" "Context diffs are a compact way of showing just the lines that have changed " @@ -338,7 +338,7 @@ msgstr "" "sont affichés dans un style avant/après. Le nombre de lignes de contexte " "est défini par *n*, qui est de trois par défaut." -#: library/difflib.rst:159 +#: library/difflib.rst:155 msgid "" "By default, the diff control lines (those with ``***`` or ``---``) are " "created with a trailing newline. This is helpful so that inputs created " @@ -352,7 +352,7 @@ msgstr "" "différences qui peuvent être utilisées avec :func:`io.IOBase.writelines` " "puisque les entrées et les sorties ont des nouvelles lignes de fin." -#: library/difflib.rst:297 +#: library/difflib.rst:293 msgid "" "For inputs that do not have trailing newlines, set the *lineterm* argument " "to ``\"\"`` so that the output will be uniformly newline free." @@ -361,7 +361,7 @@ msgstr "" "*lineterm* à ``\"\"`` afin que la sortie soit uniformément sans retour à la " "ligne." -#: library/difflib.rst:168 +#: library/difflib.rst:164 msgid "" "The context diff format normally has a header for filenames and modification " "times. Any or all of these may be specified using strings for *fromfile*, " @@ -382,7 +382,7 @@ msgstr "" "Voir :ref:`une interface de ligne de commandes pour difflib ` pour un exemple plus détaillé." -#: library/difflib.rst:199 +#: library/difflib.rst:195 msgid "" "Return a list of the best \"good enough\" matches. *word* is a sequence for " "which close matches are desired (typically a string), and *possibilities* is " @@ -390,48 +390,48 @@ msgid "" "strings)." msgstr "" -#: library/difflib.rst:203 +#: library/difflib.rst:199 msgid "" "Optional argument *n* (default ``3``) is the maximum number of close matches " "to return; *n* must be greater than ``0``." msgstr "" -#: library/difflib.rst:206 +#: library/difflib.rst:202 msgid "" "Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. " "Possibilities that don't score at least that similar to *word* are ignored." msgstr "" -#: library/difflib.rst:209 +#: library/difflib.rst:205 msgid "" "The best (no more than *n*) matches among the possibilities are returned in " "a list, sorted by similarity score, most similar first." msgstr "" -#: library/difflib.rst:225 +#: library/difflib.rst:221 msgid "" "Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style " "delta (a :term:`generator` generating the delta lines)." msgstr "" -#: library/difflib.rst:228 +#: library/difflib.rst:224 msgid "" "Optional keyword parameters *linejunk* and *charjunk* are filtering " "functions (or ``None``):" msgstr "" -#: library/difflib.rst:231 +#: library/difflib.rst:227 msgid "" "*linejunk*: A function that accepts a single string argument, and returns " "true if the string is junk, or false if not. The default is ``None``. There " "is also a module-level function :func:`IS_LINE_JUNK`, which filters out " -"lines without visible characters, except for at most one pound character " +"lines without visible characters, except for at most one hash character " "(``'#'``) -- however the underlying :class:`SequenceMatcher` class does a " "dynamic analysis of which lines are so frequent as to constitute noise, and " "this usually works better than using this function." msgstr "" -#: library/difflib.rst:239 +#: library/difflib.rst:235 msgid "" "*charjunk*: A function that accepts a character (a string of length 1), and " "returns if the character is junk, or false if not. The default is module-" @@ -439,28 +439,28 @@ msgid "" "characters (a blank or tab; it's a bad idea to include newline in this!)." msgstr "" -#: library/difflib.rst:260 +#: library/difflib.rst:256 msgid "Return one of the two sequences that generated a delta." msgstr "" -#: library/difflib.rst:262 +#: library/difflib.rst:258 msgid "" "Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, " "extract lines originating from file 1 or 2 (parameter *which*), stripping " "off line prefixes." msgstr "" -#: library/difflib.rst:266 +#: library/difflib.rst:262 msgid "Example:" msgstr "Exemple :" -#: library/difflib.rst:283 +#: library/difflib.rst:279 msgid "" "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " "generating the delta lines) in unified diff format." msgstr "" -#: library/difflib.rst:286 +#: library/difflib.rst:282 msgid "" "Unified diffs are a compact way of showing just the lines that have changed " "plus a few lines of context. The changes are shown in an inline style " @@ -468,7 +468,7 @@ msgid "" "set by *n* which defaults to three." msgstr "" -#: library/difflib.rst:291 +#: library/difflib.rst:287 msgid "" "By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) " "are created with a trailing newline. This is helpful so that inputs created " @@ -477,6 +477,13 @@ msgid "" "trailing newlines." msgstr "" +#: library/difflib.rst:296 +msgid "" +"Set *color* to ``True`` to enable output in color, similar to :program:`git " +"diff --color`. Even if enabled, it can be :ref:`controlled using environment " +"variables `." +msgstr "" + #: library/difflib.rst:300 #, fuzzy msgid "" @@ -493,14 +500,19 @@ msgstr "" "modification sont normalement exprimées dans le format ISO 8601. Si elles ne " "sont pas spécifiées, les chaînes de caractères sont par défaut vierges." -#: library/difflib.rst:324 +#: library/difflib.rst:322 +#, fuzzy +msgid "Added the *color* parameter." +msgstr "Le paramètre *autojunk*." + +#: library/difflib.rst:328 msgid "" "Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence " "of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must " "be a callable, typically either :func:`unified_diff` or :func:`context_diff`." msgstr "" -#: library/difflib.rst:329 +#: library/difflib.rst:333 msgid "" "Allows you to compare data with unknown or inconsistent encoding. All inputs " "except *n* must be bytes objects, not str. Works by losslessly converting " @@ -510,42 +522,41 @@ msgid "" "unknown/inconsistent encodings as *a* and *b*." msgstr "" -#: library/difflib.rst:340 +#: library/difflib.rst:344 msgid "" "Return ``True`` for ignorable lines. The line *line* is ignorable if *line* " "is blank or contains a single ``'#'``, otherwise it is not ignorable. Used " "as a default for parameter *linejunk* in :func:`ndiff` in older versions." msgstr "" -#: library/difflib.rst:347 +#: library/difflib.rst:351 msgid "" "Return ``True`` for ignorable characters. The character *ch* is ignorable " "if *ch* is a space or tab, otherwise it is not ignorable. Used as a default " "for parameter *charjunk* in :func:`ndiff`." msgstr "" -#: library/difflib.rst:354 +#: library/difflib.rst:358 msgid "" -"`Pattern Matching: The Gestalt Approach `_" +"`Pattern Matching: The Gestalt Approach `_" msgstr "" -#: library/difflib.rst:355 +#: library/difflib.rst:359 msgid "" "Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. " -"This was published in `Dr. Dobb's Journal `_ in " -"July, 1988." +"This was published in Dr. Dobb's Journal in July, 1988." msgstr "" -#: library/difflib.rst:362 -msgid "SequenceMatcher Objects" +#: library/difflib.rst:366 +msgid "SequenceMatcher objects" msgstr "" -#: library/difflib.rst:364 +#: library/difflib.rst:368 msgid "The :class:`SequenceMatcher` class has this constructor:" msgstr "" -#: library/difflib.rst:369 +#: library/difflib.rst:373 msgid "" "Optional argument *isjunk* must be ``None`` (the default) or a one-argument " "function that takes a sequence element and returns true if and only if the " @@ -554,48 +565,48 @@ msgid "" "ignored. For example, pass::" msgstr "" -#: library/difflib.rst:377 +#: library/difflib.rst:381 msgid "" "if you're comparing lines as sequences of characters, and don't want to " "synch up on blanks or hard tabs." msgstr "" -#: library/difflib.rst:380 +#: library/difflib.rst:384 msgid "" "The optional arguments *a* and *b* are sequences to be compared; both " -"default to empty strings. The elements of both sequences must be :term:" -"`hashable`." +"default to empty strings. The elements of both sequences must " +"be :term:`hashable`." msgstr "" -#: library/difflib.rst:383 +#: library/difflib.rst:387 msgid "" "The optional argument *autojunk* can be used to disable the automatic junk " "heuristic." msgstr "" -#: library/difflib.rst:389 +#: library/difflib.rst:393 msgid "" "SequenceMatcher objects get three data attributes: *bjunk* is the set of " "elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-" "junk elements considered popular by the heuristic (if it is not disabled); " "*b2j* is a dict mapping the remaining elements of *b* to a list of positions " -"where they occur. All three are reset whenever *b* is reset with :meth:" -"`set_seqs` or :meth:`set_seq2`." +"where they occur. All three are reset whenever *b* is reset " +"with :meth:`set_seqs` or :meth:`set_seq2`." msgstr "" -#: library/difflib.rst:396 +#: library/difflib.rst:400 msgid "The *bjunk* and *bpopular* attributes." msgstr "" -#: library/difflib.rst:399 +#: library/difflib.rst:403 msgid ":class:`SequenceMatcher` objects have the following methods:" msgstr "" -#: library/difflib.rst:403 +#: library/difflib.rst:407 msgid "Set the two sequences to be compared." msgstr "" -#: library/difflib.rst:405 +#: library/difflib.rst:409 msgid "" ":class:`SequenceMatcher` computes and caches detailed information about the " "second sequence, so if you want to compare one sequence against many " @@ -603,23 +614,23 @@ msgid "" "call :meth:`set_seq1` repeatedly, once for each of the other sequences." msgstr "" -#: library/difflib.rst:413 +#: library/difflib.rst:417 msgid "" "Set the first sequence to be compared. The second sequence to be compared " "is not changed." msgstr "" -#: library/difflib.rst:419 +#: library/difflib.rst:423 msgid "" "Set the second sequence to be compared. The first sequence to be compared " "is not changed." msgstr "" -#: library/difflib.rst:425 +#: library/difflib.rst:429 msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``." msgstr "" -#: library/difflib.rst:427 +#: library/difflib.rst:431 msgid "" "If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns " "``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo " @@ -631,7 +642,7 @@ msgid "" "that starts earliest in *b*." msgstr "" -#: library/difflib.rst:440 +#: library/difflib.rst:444 msgid "" "If *isjunk* was provided, first the longest matching block is determined as " "above, but with the additional restriction that no junk element appears in " @@ -640,7 +651,7 @@ msgid "" "junk except as identical junk happens to be adjacent to an interesting match." msgstr "" -#: library/difflib.rst:447 +#: library/difflib.rst:451 msgid "" "Here's the same example as before, but considering blanks to be junk. That " "prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the " @@ -648,26 +659,26 @@ msgid "" "matches the leftmost ``'abcd'`` in the second sequence:" msgstr "" -#: library/difflib.rst:456 +#: library/difflib.rst:460 msgid "If no blocks match, this returns ``(alo, blo, 0)``." msgstr "" -#: library/difflib.rst:458 +#: library/difflib.rst:462 msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``." msgstr "" -#: library/difflib.rst:460 +#: library/difflib.rst:464 msgid "Added default arguments." msgstr "" -#: library/difflib.rst:466 +#: library/difflib.rst:470 msgid "" "Return list of triples describing non-overlapping matching subsequences. " -"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" -"j+n]``. The triples are monotonically increasing in *i* and *j*." +"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == " +"b[j:j+n]``. The triples are monotonically increasing in *i* and *j*." msgstr "" -#: library/difflib.rst:471 +#: library/difflib.rst:475 msgid "" "The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It " "is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` " @@ -676,7 +687,7 @@ msgid "" "triples always describe non-adjacent equal blocks." msgstr "" -#: library/difflib.rst:488 +#: library/difflib.rst:492 msgid "" "Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is " "of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == " @@ -684,162 +695,164 @@ msgid "" "tuple, and, likewise, *j1* equal to the previous *j2*." msgstr "" -#: library/difflib.rst:493 +#: library/difflib.rst:497 msgid "The *tag* values are strings, with these meanings:" msgstr "" -#: library/difflib.rst:496 +#: library/difflib.rst:500 msgid "Value" msgstr "Valeur" -#: library/difflib.rst:498 +#: library/difflib.rst:502 msgid "``'replace'``" msgstr "``'replace'``" -#: library/difflib.rst:498 +#: library/difflib.rst:502 msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``." msgstr "" -#: library/difflib.rst:501 +#: library/difflib.rst:505 msgid "``'delete'``" msgstr "``'delete'``" -#: library/difflib.rst:501 +#: library/difflib.rst:505 msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case." msgstr "" -#: library/difflib.rst:504 +#: library/difflib.rst:508 msgid "``'insert'``" msgstr "``'insert'``" -#: library/difflib.rst:504 +#: library/difflib.rst:508 msgid "" "``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in " "this case." msgstr "" -#: library/difflib.rst:508 +#: library/difflib.rst:512 msgid "``'equal'``" msgstr "``'equal'``" -#: library/difflib.rst:508 +#: library/difflib.rst:512 msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)." msgstr "" -#: library/difflib.rst:512 +#: library/difflib.rst:516 msgid "For example::" msgstr "Par exemple ::" -#: library/difflib.rst:529 +#: library/difflib.rst:533 msgid "Return a :term:`generator` of groups with up to *n* lines of context." msgstr "" -#: library/difflib.rst:531 +#: library/difflib.rst:535 msgid "" "Starting with the groups returned by :meth:`get_opcodes`, this method splits " "out smaller change clusters and eliminates intervening ranges which have no " "changes." msgstr "" -#: library/difflib.rst:535 +#: library/difflib.rst:539 msgid "The groups are returned in the same format as :meth:`get_opcodes`." msgstr "" -#: library/difflib.rst:540 +#: library/difflib.rst:544 msgid "" "Return a measure of the sequences' similarity as a float in the range [0, 1]." msgstr "" -#: library/difflib.rst:543 +#: library/difflib.rst:547 msgid "" "Where T is the total number of elements in both sequences, and M is the " "number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the " "sequences are identical, and ``0.0`` if they have nothing in common." msgstr "" -#: library/difflib.rst:547 +#: library/difflib.rst:551 msgid "" -"This is expensive to compute if :meth:`get_matching_blocks` or :meth:" -"`get_opcodes` hasn't already been called, in which case you may want to try :" -"meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound." +"This is expensive to compute if :meth:`get_matching_blocks` " +"or :meth:`get_opcodes` hasn't already been called, in which case you may " +"want to try :meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an " +"upper bound." msgstr "" -#: library/difflib.rst:554 +#: library/difflib.rst:558 msgid "" "Caution: The result of a :meth:`ratio` call may depend on the order of the " "arguments. For instance::" msgstr "" -#: library/difflib.rst:565 +#: library/difflib.rst:569 msgid "Return an upper bound on :meth:`ratio` relatively quickly." msgstr "" -#: library/difflib.rst:570 +#: library/difflib.rst:574 msgid "Return an upper bound on :meth:`ratio` very quickly." msgstr "" -#: library/difflib.rst:573 +#: library/difflib.rst:577 msgid "" "The three methods that return the ratio of matching to total characters can " -"give different results due to differing levels of approximation, although :" -"meth:`~SequenceMatcher.quick_ratio` and :meth:`~SequenceMatcher." -"real_quick_ratio` are always at least as large as :meth:`~SequenceMatcher." -"ratio`:" +"give different results due to differing levels of approximation, " +"although :meth:`~SequenceMatcher.quick_ratio` " +"and :meth:`~SequenceMatcher.real_quick_ratio` are always at least as large " +"as :meth:`~SequenceMatcher.ratio`:" msgstr "" -#: library/difflib.rst:590 -msgid "SequenceMatcher Examples" +#: library/difflib.rst:594 +msgid "SequenceMatcher examples" msgstr "" -#: library/difflib.rst:592 +#: library/difflib.rst:596 msgid "This example compares two strings, considering blanks to be \"junk\":" msgstr "" -#: library/difflib.rst:598 +#: library/difflib.rst:602 msgid "" ":meth:`~SequenceMatcher.ratio` returns a float in [0, 1], measuring the " -"similarity of the sequences. As a rule of thumb, a :meth:`~SequenceMatcher." -"ratio` value over 0.6 means the sequences are close matches:" +"similarity of the sequences. As a rule of thumb, " +"a :meth:`~SequenceMatcher.ratio` value over 0.6 means the sequences are " +"close matches:" msgstr "" -#: library/difflib.rst:605 +#: library/difflib.rst:609 msgid "" -"If you're only interested in where the sequences match, :meth:" -"`~SequenceMatcher.get_matching_blocks` is handy:" +"If you're only interested in where the sequences " +"match, :meth:`~SequenceMatcher.get_matching_blocks` is handy:" msgstr "" -#: library/difflib.rst:614 +#: library/difflib.rst:618 msgid "" -"Note that the last tuple returned by :meth:`~SequenceMatcher." -"get_matching_blocks` is always a dummy, ``(len(a), len(b), 0)``, and this is " -"the only case in which the last tuple element (number of elements matched) " -"is ``0``." +"Note that the last tuple returned " +"by :meth:`~SequenceMatcher.get_matching_blocks` is always a dummy, " +"``(len(a), len(b), 0)``, and this is the only case in which the last tuple " +"element (number of elements matched) is ``0``." msgstr "" -#: library/difflib.rst:618 +#: library/difflib.rst:622 msgid "" -"If you want to know how to change the first sequence into the second, use :" -"meth:`~SequenceMatcher.get_opcodes`:" +"If you want to know how to change the first sequence into the second, " +"use :meth:`~SequenceMatcher.get_opcodes`:" msgstr "" -#: library/difflib.rst:629 +#: library/difflib.rst:633 msgid "" "The :func:`get_close_matches` function in this module which shows how simple " "code building on :class:`SequenceMatcher` can be used to do useful work." msgstr "" -#: library/difflib.rst:633 +#: library/difflib.rst:637 msgid "" "`Simple version control recipe `_ for a small application built with :class:" -"`SequenceMatcher`." +"simple-version-control/>`_ for a small application built " +"with :class:`SequenceMatcher`." msgstr "" -#: library/difflib.rst:641 -msgid "Differ Objects" +#: library/difflib.rst:645 +msgid "Differ objects" msgstr "" -#: library/difflib.rst:643 +#: library/difflib.rst:647 msgid "" "Note that :class:`Differ`\\ -generated deltas make no claim to be " "**minimal** diffs. To the contrary, minimal diffs are often counter-" @@ -849,31 +862,31 @@ msgid "" "longer diff." msgstr "" -#: library/difflib.rst:649 +#: library/difflib.rst:653 msgid "The :class:`Differ` class has this constructor:" msgstr "" -#: library/difflib.rst:655 +#: library/difflib.rst:659 msgid "" "Optional keyword parameters *linejunk* and *charjunk* are for filter " "functions (or ``None``):" msgstr "" -#: library/difflib.rst:658 +#: library/difflib.rst:662 msgid "" "*linejunk*: A function that accepts a single string argument, and returns " "true if the string is junk. The default is ``None``, meaning that no line " "is considered junk." msgstr "" -#: library/difflib.rst:662 +#: library/difflib.rst:666 msgid "" "*charjunk*: A function that accepts a single character argument (a string of " "length 1), and returns true if the character is junk. The default is " "``None``, meaning that no character is considered junk." msgstr "" -#: library/difflib.rst:666 +#: library/difflib.rst:670 msgid "" "These junk-filtering functions speed up matching to find differences and do " "not cause any differing lines or characters to be ignored. Read the " @@ -881,30 +894,31 @@ msgid "" "*isjunk* parameter for an explanation." msgstr "" -#: library/difflib.rst:672 +#: library/difflib.rst:676 msgid "" ":class:`Differ` objects are used (deltas generated) via a single method:" msgstr "" -#: library/difflib.rst:677 +#: library/difflib.rst:681 msgid "" "Compare two sequences of lines, and generate the delta (a sequence of lines)." msgstr "" -#: library/difflib.rst:679 +#: library/difflib.rst:683 msgid "" "Each sequence must contain individual single-line strings ending with " -"newlines. Such sequences can be obtained from the :meth:`~io.IOBase." -"readlines` method of file-like objects. The delta generated also consists " -"of newline-terminated strings, ready to be printed as-is via the :meth:`~io." -"IOBase.writelines` method of a file-like object." +"newlines. Such sequences can be obtained from " +"the :meth:`~io.IOBase.readlines` method of file-like objects. The delta " +"generated also consists of newline-terminated strings, ready to be printed " +"as-is via the :meth:`~io.IOBase.writelines` method of a file-like object." msgstr "" -#: library/difflib.rst:690 -msgid "Differ Example" -msgstr "" +#: library/difflib.rst:694 +#, fuzzy +msgid "Differ example" +msgstr "Par exemple ::" -#: library/difflib.rst:692 +#: library/difflib.rst:696 msgid "" "This example compares two texts. First we set up the texts, sequences of " "individual single-line strings ending with newlines (such sequences can also " @@ -912,44 +926,44 @@ msgid "" "objects):" msgstr "" -#: library/difflib.rst:711 +#: library/difflib.rst:715 msgid "Next we instantiate a Differ object:" msgstr "" -#: library/difflib.rst:715 +#: library/difflib.rst:719 msgid "" "Note that when instantiating a :class:`Differ` object we may pass functions " "to filter out line and character \"junk.\" See the :meth:`Differ` " "constructor for details." msgstr "" -#: library/difflib.rst:719 +#: library/difflib.rst:723 msgid "Finally, we compare the two:" msgstr "" -#: library/difflib.rst:723 +#: library/difflib.rst:727 msgid "``result`` is a list of strings, so let's pretty-print it:" msgstr "" -#: library/difflib.rst:738 +#: library/difflib.rst:742 msgid "As a single multi-line string it looks like this:" msgstr "" -#: library/difflib.rst:757 +#: library/difflib.rst:761 msgid "A command-line interface to difflib" msgstr "" -#: library/difflib.rst:759 +#: library/difflib.rst:763 msgid "" "This example shows how to use difflib to create a ``diff``-like utility." msgstr "" -#: library/difflib.rst:764 +#: library/difflib.rst:768 #, fuzzy msgid "ndiff example" msgstr "Par exemple ::" -#: library/difflib.rst:766 +#: library/difflib.rst:770 msgid "This example shows how to use :func:`difflib.ndiff`." msgstr "" diff --git a/library/dis.po b/library/dis.po index 021953170..3c933d008 100644 --- a/library/dis.po +++ b/library/dis.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-07-18 21:03+0200\n" "Last-Translator: Aya Keddam \n" "Language-Team: FRENCH \n" @@ -25,8 +25,9 @@ msgid "**Source code:** :source:`Lib/dis.py`" msgstr "**Code source :** :source:`Lib/dis.py`" #: library/dis.rst:17 +#, fuzzy msgid "" -"The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by " +"The :mod:`!dis` module supports the analysis of CPython :term:`bytecode` by " "disassembling it. The CPython bytecode which this module takes as an input " "is defined in the file :file:`Include/opcode.h` and used by the compiler and " "the interpreter." @@ -67,8 +68,8 @@ msgstr "" msgid "" "Some instructions are accompanied by one or more inline cache entries, which " "take the form of :opcode:`CACHE` instructions. These instructions are hidden " -"by default, but can be shown by passing ``show_caches=True`` to any :mod:" -"`dis` utility. Furthermore, the interpreter now adapts the bytecode to " +"by default, but can be shown by passing ``show_caches=True`` to any :mod:`!" +"dis` utility. Furthermore, the interpreter now adapts the bytecode to " "specialize it for different runtime conditions. The adaptive bytecode can be " "shown by passing ``adaptive=True``." msgstr "" @@ -76,8 +77,8 @@ msgstr "" #: library/dis.rst:45 msgid "" "The argument of a jump is the offset of the target instruction relative to " -"the instruction that appears immediately after the jump instruction's :" -"opcode:`CACHE` entries." +"the instruction that appears immediately after the jump " +"instruction's :opcode:`CACHE` entries." msgstr "" #: library/dis.rst:50 @@ -95,70 +96,90 @@ msgid "" msgstr "" #: library/dis.rst:59 +msgid "" +"The :option:`-P ` command-line option and the " +"``show_positions`` argument were added." +msgstr "" + +#: library/dis.rst:63 +msgid "The :option:`-S ` command-line option is added." +msgstr "" + +#: library/dis.rst:65 #, fuzzy msgid "Example: Given the function :func:`!myfunc`::" msgstr "Exemple : Etant donné la fonction :func:`myfunc` ::" -#: library/dis.rst:64 +#: library/dis.rst:70 #, fuzzy msgid "" "the following command can be used to display the disassembly of :func:`!" "myfunc`:" msgstr "" -"la commande suivante peut-être utilisé pour afficher le désassemblage de :" -"func:`myfunc` :" +"la commande suivante peut-être utilisé pour afficher le désassemblage " +"de :func:`myfunc` :" -#: library/dis.rst:77 +#: library/dis.rst:83 msgid "(The \"2\" is a line number)." msgstr "(Le \"2\" est un numéro de ligne)." -#: library/dis.rst:82 +#: library/dis.rst:88 msgid "Command-line interface" msgstr "" -#: library/dis.rst:84 -msgid "The :mod:`dis` module can be invoked as a script from the command line:" +#: library/dis.rst:90 +msgid "" +"The :mod:`!dis` module can be invoked as a script from the command line:" msgstr "" -#: library/dis.rst:90 +#: library/dis.rst:96 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/dis.rst:96 +#: library/dis.rst:102 msgid "Display usage and exit." msgstr "" -#: library/dis.rst:100 +#: library/dis.rst:106 msgid "Show inline caches." msgstr "" -#: library/dis.rst:104 +#: library/dis.rst:112 #, fuzzy msgid "Show offsets of instructions." msgstr "l'adresse de l'instruction," -#: library/dis.rst:106 +#: library/dis.rst:118 +#, fuzzy +msgid "Show positions of instructions in the source code." +msgstr "l'adresse de l'instruction," + +#: library/dis.rst:124 +msgid "Show specialized bytecode." +msgstr "" + +#: library/dis.rst:128 msgid "" "If :file:`infile` is specified, its disassembled code will be written to " "stdout. Otherwise, disassembly is performed on compiled source code received " "from stdin." msgstr "" -#: library/dis.rst:110 +#: library/dis.rst:132 msgid "Bytecode analysis" msgstr "Analyse du code intermédiaire" -#: library/dis.rst:114 +#: library/dis.rst:136 msgid "" -"The bytecode analysis API allows pieces of Python code to be wrapped in a :" -"class:`Bytecode` object that provides easy access to details of the compiled " -"code." +"The bytecode analysis API allows pieces of Python code to be wrapped in " +"a :class:`Bytecode` object that provides easy access to details of the " +"compiled code." msgstr "" "L'analyse de l'*API* code intermédiaire permet de rassembler des blocs de " "code en Python dans une classe :class:`Bytecode`, qui permet un accès facile " "aux détails du code compilé." -#: library/dis.rst:121 +#: library/dis.rst:144 msgid "" "Analyse the bytecode corresponding to a function, generator, asynchronous " "generator, coroutine, method, string of source code, or a code object (as " @@ -166,10 +187,10 @@ msgid "" msgstr "" "Analyse le code intermédiaire correspondant à une fonction, un générateur, " "un générateur asynchrone, une coroutine, une méthode, une chaîne de " -"caractères du code source, ou bien une classe (comme retourne la fonction :" -"func:`compile`)." +"caractères du code source, ou bien une classe (comme retourne la " +"fonction :func:`compile`)." -#: library/dis.rst:125 +#: library/dis.rst:148 msgid "" "This is a convenience wrapper around many of the functions listed below, " "most notably :func:`get_instructions`, as iterating over a :class:`Bytecode` " @@ -180,7 +201,7 @@ msgstr "" "instance de la classe :class:`Bytecode` rend les opérations du code " "intermédiaire des instances de :class:`Instruction`." -#: library/dis.rst:326 +#: library/dis.rst:373 msgid "" "If *first_line* is not ``None``, it indicates the line number that should be " "reported for the first source line in the disassembled code. Otherwise, the " @@ -192,7 +213,7 @@ msgstr "" "Autrement, les informations sur la ligne source sont prises directement à " "partir de la classe du code désassemblé." -#: library/dis.rst:134 +#: library/dis.rst:157 msgid "" "If *current_offset* is not ``None``, it refers to an instruction offset in " "the disassembled code. Setting this means :meth:`.dis` will display a " @@ -203,25 +224,31 @@ msgstr "" "dire que :meth:`.dis` va générer un marqueur de \" l'instruction en cours\" " "contre le code d'opération donné." -#: library/dis.rst:138 +#: library/dis.rst:161 msgid "" "If *show_caches* is ``True``, :meth:`.dis` will display inline cache entries " "used by the interpreter to specialize the bytecode." msgstr "" -#: library/dis.rst:141 +#: library/dis.rst:164 msgid "" "If *adaptive* is ``True``, :meth:`.dis` will display specialized bytecode " "that may be different from the original bytecode." msgstr "" -#: library/dis.rst:144 +#: library/dis.rst:167 msgid "" "If *show_offsets* is ``True``, :meth:`.dis` will include instruction offsets " "in the output." msgstr "" -#: library/dis.rst:149 +#: library/dis.rst:170 +msgid "" +"If *show_positions* is ``True``, :meth:`.dis` will include instruction " +"source code positions in the output." +msgstr "" + +#: library/dis.rst:175 msgid "" "Construct a :class:`Bytecode` instance from the given traceback, setting " "*current_offset* to the instruction responsible for the exception." @@ -229,24 +256,24 @@ msgstr "" "Construisez une instance :class:`Bytecode` à partir de la trace d'appel, en " "mettant *current_offet* à l'instruction responsable de l'exception." -#: library/dis.rst:154 +#: library/dis.rst:180 msgid "The compiled code object." msgstr "Le code compilé objet." -#: library/dis.rst:158 +#: library/dis.rst:184 msgid "The first source line of the code object (if available)" msgstr "La première ligne source du code objet (si disponible)" -#: library/dis.rst:162 +#: library/dis.rst:188 msgid "" -"Return a formatted view of the bytecode operations (the same as printed by :" -"func:`dis.dis`, but returned as a multi-line string)." +"Return a formatted view of the bytecode operations (the same as printed " +"by :func:`dis.dis`, but returned as a multi-line string)." msgstr "" "Retourne une vue formatée des opérations du code intermédiaire (la même que " "celle envoyée par :func:`dis.dis`, mais comme une chaîne de caractères de " "plusieurs lignes )." -#: library/dis.rst:167 +#: library/dis.rst:193 msgid "" "Return a formatted multi-line string with detailed information about the " "code object, like :func:`code_info`." @@ -254,28 +281,39 @@ msgstr "" "Retourne une chaîne de caractères de plusieurs lignes formatée avec des " "informations détaillées sur l'objet code comme :func:`code_info`." -#: library/dis.rst:210 library/dis.rst:262 +#: library/dis.rst:242 library/dis.rst:295 msgid "This can now handle coroutine and asynchronous generator objects." msgstr "" "Cette version supporte la coroutine et les objets générateurs asynchrones." -#: library/dis.rst:265 library/dis.rst:312 library/dis.rst:335 +#: library/dis.rst:298 library/dis.rst:356 library/dis.rst:382 #, fuzzy msgid "Added the *show_caches* and *adaptive* parameters." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:176 +#: library/dis.rst:202 +#, fuzzy +msgid "Added the *show_offsets* parameter" +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:304 library/dis.rst:362 +#, fuzzy +msgid "Added the *show_positions* parameter." +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:208 #, fuzzy msgid "Example:" msgstr "Exemple :" -#: library/dis.rst:192 +#: library/dis.rst:224 msgid "Analysis functions" msgstr "Analyse de fonctions" -#: library/dis.rst:194 +#: library/dis.rst:226 +#, fuzzy msgid "" -"The :mod:`dis` module also defines the following analysis functions that " +"The :mod:`!dis` module also defines the following analysis functions that " "convert the input directly to the desired output. They can be useful if only " "a single operation is being performed, so the intermediate analysis object " "isn't useful:" @@ -285,7 +323,7 @@ msgstr "" "peuvent être utiles si il n'y a qu'une seule opération à effectuer, la " "représentation intermédiaire objet n'étant donc pas utile dans ce cas :" -#: library/dis.rst:200 +#: library/dis.rst:232 msgid "" "Return a formatted multi-line string with detailed code object information " "for the supplied function, generator, asynchronous generator, coroutine, " @@ -296,7 +334,7 @@ msgstr "" "générateurs asynchrone, coroutine, la méthode, la chaine de caractères du " "code source ou objet." -#: library/dis.rst:204 +#: library/dis.rst:236 msgid "" "Note that the exact contents of code info strings are highly implementation " "dependent and they may change arbitrarily across Python VMs or Python " @@ -307,7 +345,7 @@ msgstr "" "peuvent changer arbitrairement sous machines virtuelles Python ou les " "versions de Python." -#: library/dis.rst:216 +#: library/dis.rst:248 msgid "" "Print detailed code object information for the supplied function, method, " "source code string or code object to *file* (or ``sys.stdout`` if *file* is " @@ -317,7 +355,7 @@ msgstr "" "méthode, la chaîne de caractère du code source ou du code objet à *file* (ou " "bien ``sys.stdout`` si *file* n'est pas spécifié)." -#: library/dis.rst:220 +#: library/dis.rst:252 msgid "" "This is a convenient shorthand for ``print(code_info(x), file=file)``, " "intended for interactive exploration at the interpreter prompt." @@ -326,11 +364,11 @@ msgstr "" "principalement fait pour l'exploration interactive sur l'invite de " "l'interpréteur." -#: library/dis.rst:256 library/dis.rst:309 +#: library/dis.rst:289 library/dis.rst:353 msgid "Added *file* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:231 +#: library/dis.rst:264 #, fuzzy msgid "" "Disassemble the *x* object. *x* can denote either a module, a class, a " @@ -357,11 +395,11 @@ msgstr "" "internes récursivement (le code en compréhension, les expressions des " "générateurs et les fonctions imbriquées, et le code utilisé pour la " "construction des classes internes). Les chaînes de caractères sont d'abord " -"compilées pour coder des objets avec les fonctions intégrées de :func:" -"`compile` avant qu'elles ne soient désassemblées. Si aucun objet n'est " -"fourni, cette fonction désassemble les dernières traces d'appel." +"compilées pour coder des objets avec les fonctions intégrées " +"de :func:`compile` avant qu'elles ne soient désassemblées. Si aucun objet " +"n'est fourni, cette fonction désassemble les dernières traces d'appel." -#: library/dis.rst:276 library/dis.rst:306 +#: library/dis.rst:314 library/dis.rst:350 msgid "" "The disassembly is written as text to the supplied *file* argument if " "provided and to ``sys.stdout`` otherwise." @@ -369,7 +407,7 @@ msgstr "" "Le désassemblage est envoyé sous forme de texte à l'argument du fichier " "*file* si il est fourni, et à ``sys.stdout`` sinon." -#: library/dis.rst:247 +#: library/dis.rst:280 msgid "" "The maximal depth of recursion is limited by *depth* unless it is ``None``. " "``depth=0`` means no recursion." @@ -377,25 +415,30 @@ msgstr "" "La profondeur maximale de récursion est limitée par *depth* sauf si elle " "correspond à ``None``. ``depth=0`` indique qu'il n'y a pas de récursion." -#: library/dis.rst:250 +#: library/dis.rst:283 msgid "" "If *show_caches* is ``True``, this function will display inline cache " "entries used by the interpreter to specialize the bytecode." msgstr "" -#: library/dis.rst:253 +#: library/dis.rst:286 msgid "" "If *adaptive* is ``True``, this function will display specialized bytecode " "that may be different from the original bytecode." msgstr "" -#: library/dis.rst:259 +#: library/dis.rst:292 msgid "Implemented recursive disassembling and added *depth* parameter." msgstr "" "Le désassemblage récursif a été implémenté, et le paramètre *depth* a été " "ajouté." -#: library/dis.rst:272 +#: library/dis.rst:323 library/dis.rst:359 +#, fuzzy +msgid "Added the *show_offsets* parameter." +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:310 msgid "" "Disassemble the top-of-stack function of a traceback, using the last " "traceback if none was passed. The instruction causing the exception is " @@ -405,12 +448,7 @@ msgstr "" "la dernière trace d'appels si rien n'a été envoyé. L'instruction à l'origine " "de l'exception est indiquée." -#: library/dis.rst:315 -#, fuzzy -msgid "Added the *show_offsets* parameter." -msgstr "Ajout du paramètre *file*." - -#: library/dis.rst:292 +#: library/dis.rst:334 msgid "" "Disassemble a code object, indicating the last instruction if *lasti* was " "provided. The output is divided in the following columns:" @@ -418,35 +456,38 @@ msgstr "" "Désassemble un code objet, en indiquant la dernière instruction si *lasti* " "est fournie. La sortie est répartie sur les colonnes suivantes :" -#: library/dis.rst:295 -msgid "the line number, for the first instruction of each line" -msgstr "le numéro de ligne, pour la première instruction de chaque ligne" +#: library/dis.rst:337 +msgid "" +"the source code location of the instruction. Complete location information " +"is shown if *show_positions* is true. Otherwise (the default) only the line " +"number is displayed." +msgstr "" -#: library/dis.rst:296 +#: library/dis.rst:340 msgid "the current instruction, indicated as ``-->``," msgstr "l'instruction en cours, indiquée par ``-->``," -#: library/dis.rst:297 +#: library/dis.rst:341 msgid "a labelled instruction, indicated with ``>>``," msgstr "une instruction libellée, indiquée par ``> >``," -#: library/dis.rst:298 +#: library/dis.rst:342 msgid "the address of the instruction," msgstr "l'adresse de l'instruction," -#: library/dis.rst:299 +#: library/dis.rst:343 msgid "the operation code name," msgstr "le nom de le code d'opération," -#: library/dis.rst:300 +#: library/dis.rst:344 msgid "operation parameters, and" msgstr "paramètres de l'opération, et" -#: library/dis.rst:301 +#: library/dis.rst:345 msgid "interpretation of the parameters in parentheses." msgstr "interprétation des paramètres entre parenthèses." -#: library/dis.rst:303 +#: library/dis.rst:347 msgid "" "The parameter interpretation recognizes local and global variable names, " "constant values, branch targets, and compare operators." @@ -455,7 +496,7 @@ msgstr "" "globales, des valeurs constantes, des branchements cibles, et des opérateurs " "de comparaison." -#: library/dis.rst:320 +#: library/dis.rst:367 msgid "" "Return an iterator over the instructions in the supplied function, method, " "source code string or code object." @@ -463,7 +504,7 @@ msgstr "" "Retourne un itérateur sur les instructions dans la fonction fournie, la " "méthode, les chaînes de caractères du code source ou objet." -#: library/dis.rst:323 +#: library/dis.rst:370 msgid "" "The iterator generates a series of :class:`Instruction` named tuples giving " "the details of each operation in the supplied code." @@ -471,11 +512,11 @@ msgstr "" "Cet itérateur génère une série de *n*-uplets de :class:`Instruction` qui " "donnent les détails de chacune des opérations dans le code fourni." -#: library/dis.rst:331 +#: library/dis.rst:378 msgid "The *adaptive* parameter works as it does in :func:`dis`." msgstr "" -#: library/dis.rst:338 +#: library/dis.rst:385 msgid "" "The *show_caches* parameter is deprecated and has no effect. The iterator " "generates the :class:`Instruction` instances with the *cache_info* field " @@ -483,43 +524,43 @@ msgid "" "generates separate items for the cache entries." msgstr "" -#: library/dis.rst:346 +#: library/dis.rst:393 msgid "" -"This generator function uses the :meth:`~codeobject.co_lines` method of the :" -"ref:`code object ` *code* to find the offsets which are starts " -"of lines in the source code. They are generated as ``(offset, lineno)`` " -"pairs." +"This generator function uses the :meth:`~codeobject.co_lines` method of " +"the :ref:`code object ` *code* to find the offsets which are " +"starts of lines in the source code. They are generated as ``(offset, " +"lineno)`` pairs." msgstr "" -#: library/dis.rst:351 +#: library/dis.rst:398 msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "" "Les numéros de lignes peuvent être décroissants. Avant, ils étaient toujours " "croissants." -#: library/dis.rst:354 +#: library/dis.rst:401 msgid "" -"The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :" -"attr:`~codeobject.co_firstlineno` and :attr:`~codeobject.co_lnotab` " +"The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of " +"the :attr:`~codeobject.co_firstlineno` and :attr:`!codeobject.co_lnotab` " "attributes of the :ref:`code object `." msgstr "" -#: library/dis.rst:359 +#: library/dis.rst:406 msgid "" "Line numbers can be ``None`` for bytecode that does not map to source lines." msgstr "" -#: library/dis.rst:365 +#: library/dis.rst:412 msgid "" "Detect all offsets in the raw compiled bytecode string *code* which are jump " "targets, and return a list of these offsets." msgstr "" -#: library/dis.rst:371 +#: library/dis.rst:418 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: library/dis.rst:373 +#: library/dis.rst:420 msgid "" "If the code has a jump target and *jump* is ``True``, :func:`~stack_effect` " "will return the stack effect of jumping. If *jump* is ``False``, it will " @@ -527,12 +568,12 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: library/dis.rst:380 +#: library/dis.rst:427 #, fuzzy msgid "Added *jump* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:383 +#: library/dis.rst:430 msgid "" "If ``oparg`` is omitted (or ``None``), the stack effect is now returned for " "``oparg=0``. Previously this was an error for opcodes that use their arg. It " @@ -540,178 +581,197 @@ msgid "" "does not use it; the ``oparg`` in this case is ignored." msgstr "" -#: library/dis.rst:393 +#: library/dis.rst:440 msgid "Python Bytecode Instructions" msgstr "Les instructions du code intermédiaire en Python" -#: library/dis.rst:395 +#: library/dis.rst:442 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" msgstr "" "La fonction :func:`get_instructions` et la méthode :class:`Bytecode` fournit " -"des détails sur le code intermédiaire des instructions comme :class:" -"`Instruction` instances :" +"des détails sur le code intermédiaire des instructions " +"comme :class:`Instruction` instances :" -#: library/dis.rst:400 +#: library/dis.rst:447 msgid "Details for a bytecode operation" msgstr "Détails sur le code intermédiaire de l'opération" -#: library/dis.rst:404 +#: library/dis.rst:451 msgid "" "numeric code for operation, corresponding to the opcode values listed below " "and the bytecode values in the :ref:`opcode_collections`." msgstr "" "code numérique pour l'opération, correspondant aux valeurs de l'*opcode* ci-" -"dessous et les valeurs du code intermédiaire dans la :ref:" -"`opcode_collections`." +"dessous et les valeurs du code intermédiaire dans " +"la :ref:`opcode_collections`." -#: library/dis.rst:410 +#: library/dis.rst:457 msgid "human readable name for operation" msgstr "nom lisible/compréhensible de l'opération" -#: library/dis.rst:415 +#: library/dis.rst:462 msgid "" "numeric code for the base operation if operation is specialized; otherwise " "equal to :data:`opcode`" msgstr "" -#: library/dis.rst:421 +#: library/dis.rst:468 msgid "" "human readable name for the base operation if operation is specialized; " "otherwise equal to :data:`opname`" msgstr "" -#: library/dis.rst:427 +#: library/dis.rst:474 msgid "numeric argument to operation (if any), otherwise ``None``" msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" -#: library/dis.rst:431 +#: library/dis.rst:478 msgid "alias for :data:`arg`" msgstr "" -#: library/dis.rst:435 +#: library/dis.rst:482 #, fuzzy msgid "resolved arg value (if any), otherwise ``None``" msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" -#: library/dis.rst:440 +#: library/dis.rst:487 msgid "" "human readable description of operation argument (if any), otherwise an " "empty string." msgstr "" -#: library/dis.rst:446 +#: library/dis.rst:493 msgid "start index of operation within bytecode sequence" msgstr "" -#: library/dis.rst:451 +#: library/dis.rst:498 msgid "" "start index of operation within bytecode sequence, including prefixed " "``EXTENDED_ARG`` operations if present; otherwise equal to :data:`offset`" msgstr "" -#: library/dis.rst:457 +#: library/dis.rst:504 msgid "start index of the cache entries following the operation" msgstr "" -#: library/dis.rst:462 +#: library/dis.rst:509 msgid "end index of the cache entries following the operation" msgstr "" -#: library/dis.rst:467 +#: library/dis.rst:514 msgid "``True`` if this opcode starts a source line, otherwise ``False``" msgstr "" -#: library/dis.rst:472 +#: library/dis.rst:519 #, fuzzy msgid "" "source line number associated with this opcode (if any), otherwise ``None``" msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" -#: library/dis.rst:477 +#: library/dis.rst:524 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: library/dis.rst:482 +#: library/dis.rst:529 msgid "" "bytecode index of the jump target if this is a jump operation, otherwise " "``None``" msgstr "" -#: library/dis.rst:488 +#: library/dis.rst:535 msgid "" ":class:`dis.Positions` object holding the start and end locations that are " "covered by this instruction." msgstr "" -#: library/dis.rst:503 +#: library/dis.rst:540 +msgid "" +"Information about the cache entries of this instruction, as triplets of the " +"form ``(name, size, data)``, where the ``name`` and ``size`` describe the " +"cache format and data is the contents of the cache. ``cache_info`` is " +"``None`` if the instruction does not have caches." +msgstr "" + +#: library/dis.rst:550 msgid "Field ``positions`` is added." msgstr "" -#: library/dis.rst:507 +#: library/dis.rst:554 msgid "Changed field ``starts_line``." msgstr "" -#: library/dis.rst:509 +#: library/dis.rst:556 msgid "" "Added fields ``start_offset``, ``cache_offset``, ``end_offset``, " "``baseopname``, ``baseopcode``, ``jump_target``, ``oparg``, ``line_number`` " "and ``cache_info``." msgstr "" -#: library/dis.rst:516 +#: library/dis.rst:563 msgid "" "In case the information is not available, some fields might be ``None``." msgstr "" -#: library/dis.rst:526 +#: library/dis.rst:573 msgid "" "The Python compiler currently generates the following bytecode instructions." msgstr "" -#: library/dis.rst:529 +#: library/dis.rst:576 msgid "**General instructions**" msgstr "" -#: library/dis.rst:531 +#: library/dis.rst:578 msgid "" "In the following, We will refer to the interpreter stack as ``STACK`` and " "describe operations on it as if it was a Python list. The top of the stack " "corresponds to ``STACK[-1]`` in this language." msgstr "" -#: library/dis.rst:537 +#: library/dis.rst:584 msgid "" "Do nothing code. Used as a placeholder by the bytecode optimizer, and to " "generate line tracing events." msgstr "" -#: library/dis.rst:543 +#: library/dis.rst:590 +msgid "" +"Do nothing code. Used by the interpreter to record :monitoring-" +"event:`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT` events " +"for :mod:`sys.monitoring`." +msgstr "" + +#: library/dis.rst:599 +msgid "Removes the iterator from the top of the stack." +msgstr "" + +#: library/dis.rst:606 msgid "Removes the top-of-stack item::" msgstr "" -#: library/dis.rst:550 +#: library/dis.rst:613 msgid "" "Removes the top-of-stack item. Equivalent to ``POP_TOP``. Used to clean up " "at the end of loops, hence the name." msgstr "" -#: library/dis.rst:559 +#: library/dis.rst:622 msgid "Implements ``del STACK[-2]``. Used to clean up when a generator exits." msgstr "" -#: library/dis.rst:567 +#: library/dis.rst:630 msgid "" "Push the i-th item to the top of the stack without removing it from its " "original location::" msgstr "" -#: library/dis.rst:578 +#: library/dis.rst:641 msgid "Swap the top of the stack with the i-th element::" msgstr "" -#: library/dis.rst:587 +#: library/dis.rst:650 msgid "" "Rather than being an actual instruction, this opcode is used to mark extra " "space for the interpreter to cache useful data directly in the bytecode " @@ -719,95 +779,100 @@ msgid "" "viewed with ``show_caches=True``." msgstr "" -#: library/dis.rst:592 +#: library/dis.rst:655 msgid "" "Logically, this space is part of the preceding instruction. Many opcodes " "expect to be followed by an exact number of caches, and will instruct the " "interpreter to skip over them at runtime." msgstr "" -#: library/dis.rst:596 +#: library/dis.rst:659 msgid "" "Populated caches can look like arbitrary instructions, so great care should " "be taken when reading or modifying raw, adaptive bytecode containing " "quickened data." msgstr "" -#: library/dis.rst:603 +#: library/dis.rst:666 msgid "**Unary operations**" msgstr "" -#: library/dis.rst:605 +#: library/dis.rst:668 msgid "" "Unary operations take the top of the stack, apply the operation, and push " "the result back on the stack." msgstr "" -#: library/dis.rst:611 +#: library/dis.rst:674 msgid "Implements ``STACK[-1] = -STACK[-1]``." msgstr "" -#: library/dis.rst:616 +#: library/dis.rst:679 msgid "Implements ``STACK[-1] = not STACK[-1]``." msgstr "" -#: library/dis.rst:1314 library/dis.rst:1330 +#: library/dis.rst:1383 library/dis.rst:1399 msgid "This instruction now requires an exact :class:`bool` operand." msgstr "" -#: library/dis.rst:624 +#: library/dis.rst:687 msgid "Implements ``STACK[-1] = ~STACK[-1]``." msgstr "" -#: library/dis.rst:629 +#: library/dis.rst:692 msgid "Implements ``STACK[-1] = iter(STACK[-1])``." msgstr "" -#: library/dis.rst:634 +#: library/dis.rst:697 msgid "" "If ``STACK[-1]`` is a :term:`generator iterator` or :term:`coroutine` object " "it is left as is. Otherwise, implements ``STACK[-1] = iter(STACK[-1])``." msgstr "" -#: library/dis.rst:642 +#: library/dis.rst:705 msgid "Implements ``STACK[-1] = bool(STACK[-1])``." msgstr "" -#: library/dis.rst:647 +#: library/dis.rst:710 msgid "**Binary and in-place operations**" msgstr "" -#: library/dis.rst:649 +#: library/dis.rst:712 msgid "" "Binary operations remove the top two items from the stack (``STACK[-1]`` and " "``STACK[-2]``). They perform the operation, then put the result back on the " "stack." msgstr "" -#: library/dis.rst:652 +#: library/dis.rst:715 msgid "" "In-place operations are like binary operations, but the operation is done in-" "place when ``STACK[-2]`` supports it, and the resulting ``STACK[-1]`` may be " "(but does not have to be) the original ``STACK[-2]``." msgstr "" -#: library/dis.rst:659 +#: library/dis.rst:722 msgid "" "Implements the binary and in-place operators (depending on the value of " "*op*)::" msgstr "" -#: library/dis.rst:680 library/dis.rst:698 library/dis.rst:798 -#: library/dis.rst:818 library/dis.rst:1053 library/dis.rst:1169 -#: library/dis.rst:1181 +#: library/dis.rst:730 +msgid "" +"With oparg :``NB_SUBSCR``, implements binary subscript (replaces opcode " +"``BINARY_SUBSCR``)" +msgstr "" + +#: library/dis.rst:746 library/dis.rst:766 library/dis.rst:854 +#: library/dis.rst:1070 library/dis.rst:1226 library/dis.rst:1250 msgid "Implements::" msgstr "" -#: library/dis.rst:721 +#: library/dis.rst:777 msgid "**Coroutine opcodes**" msgstr "" -#: library/dis.rst:725 +#: library/dis.rst:781 msgid "" "Implements ``STACK[-1] = get_awaitable(STACK[-1])``, where " "``get_awaitable(o)`` returns ``o`` if ``o`` is a coroutine object or a " @@ -815,39 +880,39 @@ msgid "" "resolves ``o.__await__``." msgstr "" -#: library/dis.rst:730 +#: library/dis.rst:786 msgid "" "If the ``where`` operand is nonzero, it indicates where the instruction " "occurs:" msgstr "" -#: library/dis.rst:733 +#: library/dis.rst:789 msgid "``1``: After a call to ``__aenter__``" msgstr "" -#: library/dis.rst:734 +#: library/dis.rst:790 msgid "``2``: After a call to ``__aexit__``" msgstr "" -#: library/dis.rst:738 +#: library/dis.rst:794 msgid "Previously, this instruction did not have an oparg." msgstr "" -#: library/dis.rst:744 +#: library/dis.rst:800 msgid "Implements ``STACK[-1] = STACK[-1].__aiter__()``." msgstr "" -#: library/dis.rst:747 +#: library/dis.rst:803 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: library/dis.rst:754 +#: library/dis.rst:810 msgid "" "Implement ``STACK.append(get_awaitable(STACK[-1].__anext__()))`` to the " "stack. See ``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -#: library/dis.rst:762 +#: library/dis.rst:818 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " "awaiting a next item. The stack contains the async iterable in ``STACK[-2]`` " @@ -855,84 +920,74 @@ msgid "" "is not :exc:`StopAsyncIteration`, it is re-raised." msgstr "" -#: library/dis.rst:877 library/dis.rst:888 +#: library/dis.rst:916 library/dis.rst:927 msgid "" "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: library/dis.rst:775 -msgid "" -"Handles an exception raised during a :meth:`~generator.throw` or :meth:" -"`~generator.close` call through the current frame. If ``STACK[-1]`` is an " -"instance of :exc:`StopIteration`, pop three values from the stack and push " -"its ``value`` member. Otherwise, re-raise ``STACK[-1]``." -msgstr "" - -#: library/dis.rst:785 +#: library/dis.rst:831 msgid "" -"Resolves ``__aenter__`` and ``__aexit__`` from ``STACK[-1]``. Pushes " -"``__aexit__`` and result of ``__aenter__()`` to the stack::" +"Handles an exception raised during a :meth:`~generator.throw` " +"or :meth:`~generator.close` call through the current frame. If " +"``STACK[-1]`` is an instance of :exc:`StopIteration`, pop three values from " +"the stack and push its ``value`` member. Otherwise, re-raise ``STACK[-1]``." msgstr "" -#: library/dis.rst:794 +#: library/dis.rst:840 msgid "**Miscellaneous opcodes**" msgstr "" -#: library/dis.rst:803 +#: library/dis.rst:849 msgid "Used to implement set comprehensions." msgstr "" -#: library/dis.rst:813 +#: library/dis.rst:859 msgid "Used to implement list comprehensions." msgstr "" -#: library/dis.rst:824 +#: library/dis.rst:870 msgid "Used to implement dict comprehensions." msgstr "" -#: library/dis.rst:827 +#: library/dis.rst:873 msgid "" "Map value is ``STACK[-1]`` and map key is ``STACK[-2]``. Before, those were " "reversed." msgstr "" -#: library/dis.rst:831 +#: library/dis.rst:877 msgid "" -"For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" -"`MAP_ADD` instructions, while the added value or key/value pair is popped " -"off, the container object remains on the stack so that it is available for " -"further iterations of the loop." +"For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` " +"and :opcode:`MAP_ADD` instructions, while the added value or key/value pair " +"is popped off, the container object remains on the stack so that it is " +"available for further iterations of the loop." msgstr "" -#: library/dis.rst:839 +#: library/dis.rst:885 msgid "Returns with ``STACK[-1]`` to the caller of the function." msgstr "" -#: library/dis.rst:844 -msgid "Returns with ``co_consts[consti]`` to the caller of the function." -msgstr "" - -#: library/dis.rst:851 +#: library/dis.rst:890 msgid "Yields ``STACK.pop()`` from a :term:`generator`." msgstr "" -#: library/dis.rst:853 +#: library/dis.rst:892 msgid "oparg set to be the stack depth." msgstr "" -#: library/dis.rst:856 +#: library/dis.rst:895 msgid "" "oparg set to be the exception block depth, for efficient closing of " "generators." msgstr "" -#: library/dis.rst:859 +#: library/dis.rst:898 msgid "" "oparg is ``1`` if this instruction is part of a yield-from or await, and " "``0`` otherwise." msgstr "" -#: library/dis.rst:865 +#: library/dis.rst:904 msgid "" "Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " "set up to an empty ``dict``. This opcode is only emitted if a class or " @@ -940,39 +995,39 @@ msgid "" "statically." msgstr "" -#: library/dis.rst:875 +#: library/dis.rst:914 msgid "" "Pops a value from the stack, which is used to restore the exception state." msgstr "" -#: library/dis.rst:882 +#: library/dis.rst:921 msgid "" "Re-raises the exception currently on top of the stack. If oparg is non-zero, " -"pops an additional value from the stack which is used to set :attr:`~frame." -"f_lasti` of the current frame." +"pops an additional value from the stack which is used to " +"set :attr:`~frame.f_lasti` of the current frame." msgstr "" -#: library/dis.rst:893 +#: library/dis.rst:932 msgid "" "Pops a value from the stack. Pushes the current exception to the top of the " "stack. Pushes the value originally popped back to the stack. Used in " "exception handlers." msgstr "" -#: library/dis.rst:901 +#: library/dis.rst:940 msgid "" "Performs exception matching for ``except``. Tests whether the ``STACK[-2]`` " "is an exception matching ``STACK[-1]``. Pops ``STACK[-1]`` and pushes the " "boolean result of the test." msgstr "" -#: library/dis.rst:909 +#: library/dis.rst:948 msgid "" "Performs exception matching for ``except*``. Applies ``split(STACK[-1])`` on " "the exception group representing ``STACK[-2]``." msgstr "" -#: library/dis.rst:912 +#: library/dis.rst:951 msgid "" "In case of a match, pops two items from the stack and pushes the non-" "matching subgroup (``None`` in case of full match) followed by the matching " @@ -980,7 +1035,7 @@ msgid "" "``None``." msgstr "" -#: library/dis.rst:921 +#: library/dis.rst:960 msgid "" "Calls the function in position 4 on the stack with arguments (type, val, tb) " "representing the exception at the top of the stack. Used to implement the " @@ -988,40 +1043,32 @@ msgid "" "occurred in a :keyword:`with` statement." msgstr "" -#: library/dis.rst:928 +#: library/dis.rst:967 msgid "" "The ``__exit__`` function is in position 4 of the stack rather than 7. " "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: library/dis.rst:935 +#: library/dis.rst:974 msgid "" -"Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " -"statement." +"Pushes a common constant onto the stack. The interpreter contains a " +"hardcoded list of constants supported by this instruction. Used by " +"the :keyword:`assert` statement to load :exc:`AssertionError`." msgstr "" -#: library/dis.rst:943 +#: library/dis.rst:983 msgid "" "Pushes :func:`!builtins.__build_class__` onto the stack. It is later called " "to construct a class." msgstr "" -#: library/dis.rst:949 -msgid "" -"This opcode performs several operations before a with block starts. First, " -"it loads :meth:`~object.__exit__` from the context manager and pushes it " -"onto the stack for later use by :opcode:`WITH_EXCEPT_START`. Then, :meth:" -"`~object.__enter__` is called. Finally, the result of calling the " -"``__enter__()`` method is pushed onto the stack." -msgstr "" - -#: library/dis.rst:960 +#: library/dis.rst:988 msgid "" "Perform ``STACK.append(len(STACK[-1]))``. Used in :keyword:`match` " "statements where comparison with structure of pattern is needed." msgstr "" -#: library/dis.rst:968 +#: library/dis.rst:996 msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Mapping` (or, " "more technically: if it has the :c:macro:`Py_TPFLAGS_MAPPING` flag set in " @@ -1029,7 +1076,7 @@ msgid "" "Otherwise, push ``False``." msgstr "" -#: library/dis.rst:978 +#: library/dis.rst:1006 msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Sequence` and is " "*not* an instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, " @@ -1038,40 +1085,42 @@ msgid "" "Otherwise, push ``False``." msgstr "" -#: library/dis.rst:988 +#: library/dis.rst:1016 msgid "" "``STACK[-1]`` is a tuple of mapping keys, and ``STACK[-2]`` is the match " -"subject. If ``STACK[-2]`` contains all of the keys in ``STACK[-1]``, push a :" -"class:`tuple` containing the corresponding values. Otherwise, push ``None``." +"subject. If ``STACK[-2]`` contains all of the keys in ``STACK[-1]``, push " +"a :class:`tuple` containing the corresponding values. Otherwise, push " +"``None``." msgstr "" -#: library/dis.rst:1665 +#: library/dis.rst:1768 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." msgstr "" -#: library/dis.rst:1001 +#: library/dis.rst:1029 msgid "" "Implements ``name = STACK.pop()``. *namei* is the index of *name* in the " "attribute :attr:`~codeobject.co_names` of the :ref:`code object `. The compiler tries to use :opcode:`STORE_FAST` or :opcode:" -"`STORE_GLOBAL` if possible." +"objects>`. The compiler tries to use :opcode:`STORE_FAST` " +"or :opcode:`STORE_GLOBAL` if possible." msgstr "" -#: library/dis.rst:1008 +#: library/dis.rst:1036 msgid "" -"Implements ``del name``, where *namei* is the index into :attr:`~codeobject." -"co_names` attribute of the :ref:`code object `." +"Implements ``del name``, where *namei* is the index " +"into :attr:`~codeobject.co_names` attribute of the :ref:`code object `." msgstr "" -#: library/dis.rst:1014 +#: library/dis.rst:1042 msgid "" "Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the " "stack right-to-left. Require there to be exactly *count* values.::" msgstr "" -#: library/dis.rst:1023 +#: library/dis.rst:1051 msgid "" "Implements assignment with a starred target: Unpacks an iterable in " "``STACK[-1]`` into individual values, where the total number of values can " @@ -1079,11 +1128,11 @@ msgid "" "will be a list of all leftover items." msgstr "" -#: library/dis.rst:1028 +#: library/dis.rst:1056 msgid "The number of values before and after the list value is limited to 255." msgstr "" -#: library/dis.rst:1030 +#: library/dis.rst:1058 msgid "" "The number of values before the list value is encoded in the argument of the " "opcode. The number of values after the list if any is encoded using an " @@ -1092,50 +1141,55 @@ msgid "" "list value, the high byte of *counts* the number of values after it." msgstr "" -#: library/dis.rst:1036 +#: library/dis.rst:1064 msgid "" "The extracted values are put onto the stack right-to-left, i.e. ``a, *b, c = " "d`` will be stored after execution as ``STACK.extend((a, b, c))``." msgstr "" -#: library/dis.rst:1048 +#: library/dis.rst:1076 msgid "" -"where *namei* is the index of name in :attr:`~codeobject.co_names` of the :" -"ref:`code object `." +"where *namei* is the index of name in :attr:`~codeobject.co_names` of " +"the :ref:`code object `." msgstr "" -#: library/dis.rst:1058 +#: library/dis.rst:1086 msgid "" -"where *namei* is the index of name into :attr:`~codeobject.co_names` of the :" -"ref:`code object `." +"where *namei* is the index of name into :attr:`~codeobject.co_names` of " +"the :ref:`code object `." msgstr "" -#: library/dis.rst:1064 +#: library/dis.rst:1092 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: library/dis.rst:1069 +#: library/dis.rst:1097 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: library/dis.rst:1074 +#: library/dis.rst:1102 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: library/dis.rst:1079 +#: library/dis.rst:1107 +msgid "" +"Pushes the integer ``i`` onto the stack. ``i`` must be in ``range(256)``" +msgstr "" + +#: library/dis.rst:1115 msgid "" "Pushes the value associated with ``co_names[namei]`` onto the stack. The " "name is looked up within the locals, then the globals, then the builtins." msgstr "" -#: library/dis.rst:1085 +#: library/dis.rst:1121 msgid "" "Pushes a reference to the locals dictionary onto the stack. This is used to " -"prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` and :" -"opcode:`LOAD_FROM_DICT_OR_GLOBALS`." +"prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` " +"and :opcode:`LOAD_FROM_DICT_OR_GLOBALS`." msgstr "" -#: library/dis.rst:1094 +#: library/dis.rst:1130 msgid "" "Pops a mapping off the stack and looks up the value for ``co_names[namei]``. " "If the name is not found there, looks it up in the globals and then the " @@ -1144,69 +1198,95 @@ msgid "" "bodies." msgstr "" -#: library/dis.rst:1105 +#: library/dis.rst:1141 +msgid "" +"Constructs a new :class:`~string.templatelib.Template` instance from a tuple " +"of strings and a tuple of interpolations and pushes the resulting object " +"onto the stack::" +msgstr "" + +#: library/dis.rst:1154 +msgid "" +"Constructs a new :class:`~string.templatelib.Interpolation` instance from a " +"value and its source expression and pushes the resulting object onto the " +"stack." +msgstr "" + +#: library/dis.rst:1158 +msgid "" +"If no conversion or format specification is present, ``format`` is set to " +"``2``." +msgstr "" + +#: library/dis.rst:1161 +msgid "" +"If the low bit of ``format`` is set, it indicates that the interpolation " +"contains a format specification." +msgstr "" + +#: library/dis.rst:1164 +msgid "" +"If ``format >> 2`` is non-zero, it indicates that the interpolation contains " +"a conversion. The value of ``format >> 2`` is the conversion type (``0`` for " +"no conversion, ``1`` for ``!s``, ``2`` for ``!r``, and ``3`` for ``!a``)::" +msgstr "" + +#: library/dis.rst:1183 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack::" msgstr "" -#: library/dis.rst:1119 +#: library/dis.rst:1197 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: library/dis.rst:1124 +#: library/dis.rst:1202 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: library/dis.rst:1129 +#: library/dis.rst:1207 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., STACK[-4]: STACK[-3], " "STACK[-2]: STACK[-1]}``." msgstr "" -#: library/dis.rst:1133 +#: library/dis.rst:1211 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: library/dis.rst:1140 -msgid "" -"The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " -"top element on the stack which contains a tuple of keys, then starting from " -"``STACK[-2]``, pops *count* values to form values in the built dictionary." -msgstr "" - -#: library/dis.rst:1149 +#: library/dis.rst:1218 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: library/dis.rst:1162 +#: library/dis.rst:1231 msgid "Used to build lists." msgstr "" -#: library/dis.rst:1174 +#: library/dis.rst:1243 msgid "Used to build sets." msgstr "" -#: library/dis.rst:1186 +#: library/dis.rst:1255 msgid "Used to build dicts." msgstr "" -#: library/dis.rst:1193 +#: library/dis.rst:1262 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: library/dis.rst:1200 +#: library/dis.rst:1269 msgid "" "If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with " "``getattr(STACK[-1], co_names[namei>>1])``." msgstr "" -#: library/dis.rst:1203 +#: library/dis.rst:1272 msgid "" "If the low bit of ``namei`` is set, this will attempt to load a method named " "``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is " @@ -1218,145 +1298,139 @@ msgid "" "pushed." msgstr "" -#: library/dis.rst:1212 +#: library/dis.rst:1281 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to " "the stack before the attribute or unbound method respectively." msgstr "" -#: library/dis.rst:1219 +#: library/dis.rst:1288 msgid "" "This opcode implements :func:`super`, both in its zero-argument and two-" "argument forms (e.g. ``super().method()``, ``super().attr`` and ``super(cls, " "self).method()``, ``super(cls, self).attr``)." msgstr "" -#: library/dis.rst:1223 +#: library/dis.rst:1292 msgid "It pops three values from the stack (from top of stack down):" msgstr "" -#: library/dis.rst:1225 +#: library/dis.rst:1294 msgid "``self``: the first argument to the current method" msgstr "" -#: library/dis.rst:1226 +#: library/dis.rst:1295 msgid "``cls``: the class within which the current method was defined" msgstr "" -#: library/dis.rst:1227 +#: library/dis.rst:1296 msgid "the global ``super``" msgstr "" -#: library/dis.rst:1229 +#: library/dis.rst:1298 msgid "" "With respect to its argument, it works similarly to :opcode:`LOAD_ATTR`, " "except that ``namei`` is shifted left by 2 bits instead of 1." msgstr "" -#: library/dis.rst:1232 +#: library/dis.rst:1301 msgid "" -"The low bit of ``namei`` signals to attempt a method load, as with :opcode:" -"`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " -"it is unset a single value is pushed to the stack." +"The low bit of ``namei`` signals to attempt a method load, as " +"with :opcode:`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded " +"method. When it is unset a single value is pushed to the stack." msgstr "" -#: library/dis.rst:1236 +#: library/dis.rst:1305 msgid "" "The second-low bit of ``namei``, if set, means that this was a two-argument " "call to :func:`super` (unset means zero-argument)." msgstr "" -#: library/dis.rst:1244 +#: library/dis.rst:1313 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname >> 5]``. If the fifth-lowest bit of ``opname`` is set " "(``opname & 16``), the result should be coerced to ``bool``." msgstr "" -#: library/dis.rst:1248 +#: library/dis.rst:1317 msgid "" -"The fifth-lowest bit of the oparg now indicates a forced conversion to :" -"class:`bool`." +"The fifth-lowest bit of the oparg now indicates a forced conversion " +"to :class:`bool`." msgstr "" -#: library/dis.rst:1255 +#: library/dis.rst:1324 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:1262 +#: library/dis.rst:1331 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:1269 +#: library/dis.rst:1338 msgid "" "Imports the module ``co_names[namei]``. ``STACK[-1]`` and ``STACK[-2]`` are " -"popped and provide the *fromlist* and *level* arguments of :func:" -"`__import__`. The module object is pushed onto the stack. The current " -"namespace is not affected: for a proper import statement, a subsequent :" -"opcode:`STORE_FAST` instruction modifies the namespace." +"popped and provide the *fromlist* and *level* arguments " +"of :func:`__import__`. The module object is pushed onto the stack. The " +"current namespace is not affected: for a proper import statement, a " +"subsequent :opcode:`STORE_FAST` instruction modifies the namespace." msgstr "" -#: library/dis.rst:1277 +#: library/dis.rst:1346 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in " "``STACK[-1]``. The resulting object is pushed onto the stack, to be " "subsequently stored by a :opcode:`STORE_FAST` instruction." msgstr "" -#: library/dis.rst:1284 +#: library/dis.rst:1353 msgid "Increments bytecode counter by *delta*." msgstr "" -#: library/dis.rst:1289 +#: library/dis.rst:1358 msgid "Decrements bytecode counter by *delta*. Checks for interrupts." msgstr "" -#: library/dis.rst:1296 +#: library/dis.rst:1365 msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: library/dis.rst:1303 +#: library/dis.rst:1372 msgid "" "If ``STACK[-1]`` is true, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: library/dis.rst:1322 +#: library/dis.rst:1391 msgid "" "The oparg is now a relative delta rather than an absolute target. This " "opcode is a pseudo-instruction, replaced in final bytecode by the directed " "versions (forward/backward)." msgstr "" -#: library/dis.rst:1327 library/dis.rst:1357 +#: library/dis.rst:1396 library/dis.rst:1420 msgid "This is no longer a pseudo-instruction." msgstr "" -#: library/dis.rst:1319 +#: library/dis.rst:1388 msgid "" "If ``STACK[-1]`` is false, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: library/dis.rst:1335 +#: library/dis.rst:1404 msgid "" "If ``STACK[-1]`` is not ``None``, increments the bytecode counter by " "*delta*. ``STACK[-1]`` is popped." msgstr "" -#: library/dis.rst:1352 -msgid "" -"This opcode is a pseudo-instruction, replaced in final bytecode by the " -"directed versions (forward/backward)." -msgstr "" - -#: library/dis.rst:1349 +#: library/dis.rst:1415 msgid "" "If ``STACK[-1]`` is ``None``, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: library/dis.rst:1362 +#: library/dis.rst:1425 msgid "" "``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " "method. If this yields a new value, push it on the stack (leaving the " @@ -1364,187 +1438,218 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: library/dis.rst:1367 +#: library/dis.rst:1430 msgid "Up until 3.11 the iterator was popped when it was exhausted." msgstr "" -#: library/dis.rst:1372 +#: library/dis.rst:1435 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: library/dis.rst:1374 +#: library/dis.rst:1437 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " "before the global variable." msgstr "" -#: library/dis.rst:1380 +#: library/dis.rst:1443 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: library/dis.rst:1382 +#: library/dis.rst:1445 msgid "" "This opcode is now only used in situations where the local variable is " "guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`." msgstr "" -#: library/dis.rst:1388 +#: library/dis.rst:1451 +msgid "" +"Pushes a borrowed reference to the local ``co_varnames[var_num]`` onto the " +"stack." +msgstr "" + +#: library/dis.rst:1458 +msgid "" +"Pushes references to ``co_varnames[var_nums >> 4]`` and " +"``co_varnames[var_nums & 15]`` onto the stack." +msgstr "" + +#: library/dis.rst:1466 +msgid "" +"Pushes borrowed references to ``co_varnames[var_nums >> 4]`` and " +"``co_varnames[var_nums & 15]`` onto the stack." +msgstr "" + +#: library/dis.rst:1473 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack, " "raising an :exc:`UnboundLocalError` if the local variable has not been " "initialized." msgstr "" -#: library/dis.rst:1396 +#: library/dis.rst:1481 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack (or " "pushes ``NULL`` onto the stack if the local variable has not been " "initialized) and sets ``co_varnames[var_num]`` to ``NULL``." msgstr "" -#: library/dis.rst:1404 +#: library/dis.rst:1489 msgid "Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1409 +#: library/dis.rst:1493 +msgid "" +"Stores ``STACK[-1]`` into ``co_varnames[var_nums >> 4]`` and ``STACK[-2]`` " +"into ``co_varnames[var_nums & 15]``." +msgstr "" + +#: library/dis.rst:1500 +msgid "" +"Stores ``STACK.pop()`` into the local ``co_varnames[var_nums >> 4]`` and " +"pushes a reference to the local ``co_varnames[var_nums & 15]`` onto the " +"stack." +msgstr "" + +#: library/dis.rst:1508 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1414 +#: library/dis.rst:1513 msgid "" "Creates a new cell in slot ``i``. If that slot is nonempty then that value " "is stored into the new cell." msgstr "" -#: library/dis.rst:1422 +#: library/dis.rst:1521 msgid "" "Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: library/dis.rst:1447 library/dis.rst:1458 +#: library/dis.rst:1546 library/dis.rst:1557 msgid "" "``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`." msgstr "" -#: library/dis.rst:1431 +#: library/dis.rst:1530 msgid "" "Pops a mapping off the stack and looks up the name associated with slot " "``i`` of the \"fast locals\" storage in this mapping. If the name is not " -"found there, loads it from the cell contained in slot ``i``, similar to :" -"opcode:`LOAD_DEREF`. This is used for loading :term:`closure variables " +"found there, loads it from the cell contained in slot ``i``, similar " +"to :opcode:`LOAD_DEREF`. This is used for loading :term:`closure variables " "` in class bodies (which previously used :opcode:`!" "LOAD_CLASSDEREF`) and in :ref:`annotation scopes ` within " "class bodies." msgstr "" -#: library/dis.rst:1444 +#: library/dis.rst:1543 msgid "" "Stores ``STACK.pop()`` into the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: library/dis.rst:1453 +#: library/dis.rst:1552 msgid "" "Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " "Used by the :keyword:`del` statement." msgstr "" -#: library/dis.rst:1464 +#: library/dis.rst:1563 msgid "" "Copies the ``n`` :term:`free (closure) variables ` from " "the closure into the frame. Removes the need for special code on the " "caller's side when calling closures." msgstr "" -#: library/dis.rst:1473 +#: library/dis.rst:1572 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: library/dis.rst:1476 +#: library/dis.rst:1575 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: library/dis.rst:1477 +#: library/dis.rst:1576 msgid "" "1: ``raise STACK[-1]`` (raise exception instance or type at ``STACK[-1]``)" msgstr "" -#: library/dis.rst:1478 +#: library/dis.rst:1577 msgid "" "2: ``raise STACK[-2] from STACK[-1]`` (raise exception instance or type at " "``STACK[-2]`` with ``__cause__`` set to ``STACK[-1]``)" msgstr "" -#: library/dis.rst:1484 +#: library/dis.rst:1583 msgid "" "Calls a callable object with the number of arguments specified by ``argc``. " "On the stack are (in ascending order):" msgstr "" -#: library/dis.rst:1511 +#: library/dis.rst:1610 msgid "The callable" msgstr "" -#: library/dis.rst:1512 +#: library/dis.rst:1611 msgid "``self`` or ``NULL``" msgstr "" -#: library/dis.rst:1513 +#: library/dis.rst:1612 msgid "The remaining positional arguments" msgstr "" -#: library/dis.rst:1491 +#: library/dis.rst:1590 msgid "``argc`` is the total of the positional arguments, excluding ``self``." msgstr "" -#: library/dis.rst:1493 +#: library/dis.rst:1592 msgid "" "``CALL`` pops all arguments and the callable object off the stack, calls the " "callable object with those arguments, and pushes the return value returned " "by the callable object." msgstr "" -#: library/dis.rst:1499 +#: library/dis.rst:1598 msgid "The callable now always appears at the same position on the stack." msgstr "" -#: library/dis.rst:1502 +#: library/dis.rst:1601 msgid "Calls with keyword arguments are now handled by :opcode:`CALL_KW`." msgstr "" -#: library/dis.rst:1508 +#: library/dis.rst:1607 msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including one or more named arguments. On the stack are (in ascending order):" msgstr "" -#: library/dis.rst:1514 +#: library/dis.rst:1613 msgid "The named arguments" msgstr "" -#: library/dis.rst:1515 +#: library/dis.rst:1614 msgid "A :class:`tuple` of keyword argument names" msgstr "" -#: library/dis.rst:1517 +#: library/dis.rst:1616 msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self``. The length of the tuple of keyword argument names is the number of " "named arguments." msgstr "" -#: library/dis.rst:1520 +#: library/dis.rst:1619 msgid "" "``CALL_KW`` pops all arguments, the keyword names, and the callable object " "off the stack, calls the callable object with those arguments, and pushes " "the return value returned by the callable object." msgstr "" -#: library/dis.rst:1529 +#: library/dis.rst:1628 msgid "" "Calls a callable object with variable set of positional and keyword " "arguments. If the lowest bit of *flags* is set, the top of the stack " @@ -1556,33 +1661,33 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: library/dis.rst:1544 +#: library/dis.rst:1643 msgid "" "Pushes a ``NULL`` to the stack. Used in the call sequence to match the " -"``NULL`` pushed by :opcode:`LOAD_METHOD` for non-method calls." +"``NULL`` pushed by :opcode:`LOAD_ATTR` for non-method calls." msgstr "" -#: library/dis.rst:1553 +#: library/dis.rst:1652 msgid "" "Pushes a new function object on the stack built from the code object at " -"``STACK[1]``." +"``STACK[-1]``." msgstr "" -#: library/dis.rst:1555 +#: library/dis.rst:1654 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: library/dis.rst:1558 +#: library/dis.rst:1657 msgid "Qualified name at ``STACK[-1]`` was removed." msgstr "" -#: library/dis.rst:1561 +#: library/dis.rst:1660 msgid "" "Extra function attributes on the stack, signaled by oparg flags, were " "removed. They now use :opcode:`SET_FUNCTION_ATTRIBUTE`." msgstr "" -#: library/dis.rst:1568 +#: library/dis.rst:1667 msgid "" "Sets an attribute on a function object. Expects the function at " "``STACK[-1]`` and the attribute value to set at ``STACK[-2]``; consumes both " @@ -1590,39 +1695,48 @@ msgid "" "attribute to set:" msgstr "" -#: library/dis.rst:1572 +#: library/dis.rst:1671 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: library/dis.rst:1574 +#: library/dis.rst:1673 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: library/dis.rst:1575 +#: library/dis.rst:1674 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: library/dis.rst:1576 +#: library/dis.rst:1675 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: library/dis.rst:1585 +#: library/dis.rst:1676 +msgid "``0x10`` the :term:`annotate function` for the function object" +msgstr "" + +#: library/dis.rst:1680 +msgid "" +"Added ``0x10`` to indicate the annotate function for the function object." +msgstr "" + +#: library/dis.rst:1688 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "implements::" msgstr "" -#: library/dis.rst:1591 +#: library/dis.rst:1694 msgid "if it is 3, implements::" msgstr "" -#: library/dis.rst:1598 +#: library/dis.rst:1701 msgid "See the :func:`slice` built-in function for more information." msgstr "" -#: library/dis.rst:1603 +#: library/dis.rst:1706 msgid "" "Prefixes any opcode which has an argument too big to fit into the default " "one byte. *ext* holds an additional byte which act as higher bits in the " @@ -1630,42 +1744,42 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: library/dis.rst:1611 +#: library/dis.rst:1714 msgid "Convert value to a string, depending on ``oparg``::" msgstr "" -#: library/dis.rst:1617 +#: library/dis.rst:1720 msgid "``oparg == 1``: call :func:`str` on *value*" msgstr "" -#: library/dis.rst:1618 +#: library/dis.rst:1721 msgid "``oparg == 2``: call :func:`repr` on *value*" msgstr "" -#: library/dis.rst:1619 +#: library/dis.rst:1722 msgid "``oparg == 3``: call :func:`ascii` on *value*" msgstr "" -#: library/dis.rst:1634 library/dis.rst:1647 -msgid "Used for implementing formatted literal strings (f-strings)." +#: library/dis.rst:1737 library/dis.rst:1750 +msgid "Used for implementing formatted string literals (f-strings)." msgstr "" -#: library/dis.rst:1628 +#: library/dis.rst:1731 msgid "Formats the value on top of stack::" msgstr "" -#: library/dis.rst:1640 +#: library/dis.rst:1743 msgid "Formats the given value with the given format spec::" msgstr "" -#: library/dis.rst:1654 +#: library/dis.rst:1757 msgid "" "``STACK[-1]`` is a tuple of keyword attribute names, ``STACK[-2]`` is the " "class being matched against, and ``STACK[-3]`` is the match subject. " "*count* is the number of positional sub-patterns." msgstr "" -#: library/dis.rst:1658 +#: library/dis.rst:1761 msgid "" "Pop ``STACK[-1]``, ``STACK[-2]``, and ``STACK[-3]``. If ``STACK[-3]`` is an " "instance of ``STACK[-2]`` and has the positional and keyword attributes " @@ -1673,273 +1787,281 @@ msgid "" "Otherwise, push ``None``." msgstr "" -#: library/dis.rst:1672 +#: library/dis.rst:1775 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: library/dis.rst:1674 +#: library/dis.rst:1777 msgid "" -"The ``context`` oparand consists of two parts. The lowest two bits indicate " +"The ``context`` operand consists of two parts. The lowest two bits indicate " "where the ``RESUME`` occurs:" msgstr "" -#: library/dis.rst:1677 +#: library/dis.rst:1780 msgid "" "``0`` The start of a function, which is neither a generator, coroutine nor " "an async generator" msgstr "" -#: library/dis.rst:1679 +#: library/dis.rst:1782 msgid "``1`` After a ``yield`` expression" msgstr "" -#: library/dis.rst:1680 +#: library/dis.rst:1783 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: library/dis.rst:1681 +#: library/dis.rst:1784 msgid "``3`` After an ``await`` expression" msgstr "" -#: library/dis.rst:1683 +#: library/dis.rst:1786 msgid "" "The next bit is ``1`` if the RESUME is at except-depth ``1``, and ``0`` " "otherwise." msgstr "" -#: library/dis.rst:1688 +#: library/dis.rst:1791 msgid "The oparg value changed to include information about except-depth" msgstr "" -#: library/dis.rst:1694 +#: library/dis.rst:1797 msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Used as first opcode of in code object for the above mentioned callables. " "Clear the current frame and return the newly created generator." msgstr "" -#: library/dis.rst:1703 +#: library/dis.rst:1806 msgid "" "Equivalent to ``STACK[-1] = STACK[-2].send(STACK[-1])``. Used in ``yield " "from`` and ``await`` statements." msgstr "" -#: library/dis.rst:1706 +#: library/dis.rst:1809 msgid "" "If the call raises :exc:`StopIteration`, pop the top value from the stack, " "push the exception's ``value`` attribute, and increment the bytecode counter " "by *delta*." msgstr "" -#: library/dis.rst:1715 +#: library/dis.rst:1818 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes in the range [0,255] which don't use their argument and those that " "do (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: library/dis.rst:1719 +#: library/dis.rst:1822 msgid "" "If your application uses pseudo instructions or specialized instructions, " "use the :data:`hasarg` collection instead." msgstr "" -#: library/dis.rst:1722 +#: library/dis.rst:1825 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: library/dis.rst:1726 +#: library/dis.rst:1829 msgid "" -"Pseudo instructions were added to the :mod:`dis` module, and for them it is " +"Pseudo instructions were added to the :mod:`!dis` module, and for them it is " "not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use " "their arg." msgstr "" -#: library/dis.rst:1731 +#: library/dis.rst:1834 msgid "Use :data:`hasarg` instead." msgstr "" -#: library/dis.rst:1736 +#: library/dis.rst:1839 msgid "" "Calls an intrinsic function with one argument. Passes ``STACK[-1]`` as the " "argument and sets ``STACK[-1]`` to the result. Used to implement " "functionality that is not performance critical." msgstr "" -#: library/dis.rst:1794 +#: library/dis.rst:1897 msgid "The operand determines which intrinsic function is called:" msgstr "" -#: library/dis.rst:1797 +#: library/dis.rst:1900 msgid "Operand" msgstr "" -#: library/dis.rst:1797 +#: library/dis.rst:1900 msgid "Description" msgstr "Description" -#: library/dis.rst:1745 +#: library/dis.rst:1848 msgid "``INTRINSIC_1_INVALID``" msgstr "" -#: library/dis.rst:1799 +#: library/dis.rst:1902 msgid "Not valid" msgstr "" -#: library/dis.rst:1747 +#: library/dis.rst:1850 msgid "``INTRINSIC_PRINT``" msgstr "" -#: library/dis.rst:1747 +#: library/dis.rst:1850 msgid "Prints the argument to standard out. Used in the REPL." msgstr "" -#: library/dis.rst:1750 +#: library/dis.rst:1853 msgid "``INTRINSIC_IMPORT_STAR``" msgstr "" -#: library/dis.rst:1750 +#: library/dis.rst:1853 msgid "Performs ``import *`` for the named module." msgstr "" -#: library/dis.rst:1753 +#: library/dis.rst:1856 msgid "``INTRINSIC_STOPITERATION_ERROR``" msgstr "" -#: library/dis.rst:1753 +#: library/dis.rst:1856 msgid "Extracts the return value from a ``StopIteration`` exception." msgstr "" -#: library/dis.rst:1756 +#: library/dis.rst:1859 msgid "``INTRINSIC_ASYNC_GEN_WRAP``" msgstr "" -#: library/dis.rst:1756 +#: library/dis.rst:1859 msgid "Wraps an async generator value" msgstr "" -#: library/dis.rst:1758 +#: library/dis.rst:1861 msgid "``INTRINSIC_UNARY_POSITIVE``" msgstr "" -#: library/dis.rst:1758 +#: library/dis.rst:1861 msgid "Performs the unary ``+`` operation" msgstr "" -#: library/dis.rst:1761 +#: library/dis.rst:1864 msgid "``INTRINSIC_LIST_TO_TUPLE``" msgstr "" -#: library/dis.rst:1761 +#: library/dis.rst:1864 msgid "Converts a list to a tuple" msgstr "" -#: library/dis.rst:1763 +#: library/dis.rst:1866 msgid "``INTRINSIC_TYPEVAR``" msgstr "" -#: library/dis.rst:1763 +#: library/dis.rst:1866 msgid "Creates a :class:`typing.TypeVar`" msgstr "" -#: library/dis.rst:1765 +#: library/dis.rst:1868 msgid "``INTRINSIC_PARAMSPEC``" msgstr "" -#: library/dis.rst:1765 +#: library/dis.rst:1868 msgid "Creates a :class:`typing.ParamSpec`" msgstr "" -#: library/dis.rst:1768 +#: library/dis.rst:1871 msgid "``INTRINSIC_TYPEVARTUPLE``" msgstr "" -#: library/dis.rst:1768 +#: library/dis.rst:1871 msgid "Creates a :class:`typing.TypeVarTuple`" msgstr "" -#: library/dis.rst:1771 +#: library/dis.rst:1874 msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" msgstr "" -#: library/dis.rst:1771 +#: library/dis.rst:1874 msgid "Returns :class:`typing.Generic` subscripted with the argument" msgstr "" -#: library/dis.rst:1774 +#: library/dis.rst:1877 msgid "``INTRINSIC_TYPEALIAS``" msgstr "" -#: library/dis.rst:1774 +#: library/dis.rst:1877 msgid "" "Creates a :class:`typing.TypeAliasType`; used in the :keyword:`type` " "statement. The argument is a tuple of the type alias's name, type " "parameters, and value." msgstr "" -#: library/dis.rst:1786 +#: library/dis.rst:1889 msgid "" "Calls an intrinsic function with two arguments. Used to implement " "functionality that is not performance critical::" msgstr "" -#: library/dis.rst:1799 +#: library/dis.rst:1902 msgid "``INTRINSIC_2_INVALID``" msgstr "" -#: library/dis.rst:1801 +#: library/dis.rst:1904 msgid "``INTRINSIC_PREP_RERAISE_STAR``" msgstr "" -#: library/dis.rst:1801 +#: library/dis.rst:1904 msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." msgstr "" -#: library/dis.rst:1805 +#: library/dis.rst:1908 msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" msgstr "" -#: library/dis.rst:1805 +#: library/dis.rst:1908 msgid "Creates a :class:`typing.TypeVar` with a bound." msgstr "" -#: library/dis.rst:1808 +#: library/dis.rst:1911 msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" msgstr "" -#: library/dis.rst:1808 +#: library/dis.rst:1911 msgid "Creates a :class:`typing.TypeVar` with constraints." msgstr "" -#: library/dis.rst:1812 +#: library/dis.rst:1915 msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" msgstr "" -#: library/dis.rst:1812 +#: library/dis.rst:1915 msgid "Sets the ``__type_params__`` attribute of a function." msgstr "" -#: library/dis.rst:1819 +#: library/dis.rst:1924 +msgid "" +"Performs special method lookup on ``STACK[-1]``. If " +"``type(STACK[-1]).__xxx__`` is a method, leave ``type(STACK[-1]).__xxx__; " +"STACK[-1]`` on the stack. If ``type(STACK[-1]).__xxx__`` is not a method, " +"leave ``STACK[-1].__xxx__; NULL`` on the stack." +msgstr "" + +#: library/dis.rst:1933 msgid "**Pseudo-instructions**" msgstr "" -#: library/dis.rst:1821 +#: library/dis.rst:1935 msgid "" "These opcodes do not appear in Python bytecode. They are used by the " "compiler but are replaced by real opcodes or removed before bytecode is " "generated." msgstr "" -#: library/dis.rst:1826 +#: library/dis.rst:1940 msgid "" "Set up an exception handler for the following code block. If an exception " "occurs, the value stack level is restored to its current state and control " "is transferred to the exception handler at ``target``." msgstr "" -#: library/dis.rst:1833 +#: library/dis.rst:1947 msgid "" "Like ``SETUP_FINALLY``, but in case of an exception also pushes the last " "instruction (``lasti``) to the stack so that ``RERAISE`` can restore it. If " @@ -1948,91 +2070,92 @@ msgid "" "exception handler at ``target``." msgstr "" -#: library/dis.rst:1842 +#: library/dis.rst:1956 msgid "" "Like ``SETUP_CLEANUP``, but in case of an exception one more item is popped " "from the stack before control is transferred to the exception handler at " "``target``." msgstr "" -#: library/dis.rst:1846 +#: library/dis.rst:1960 msgid "" "This variant is used in :keyword:`with` and :keyword:`async with` " -"constructs, which push the return value of the context manager's :meth:" -"`~object.__enter__` or :meth:`~object.__aenter__` to the stack." +"constructs, which push the return value of the context " +"manager's :meth:`~object.__enter__` or :meth:`~object.__aenter__` to the " +"stack." msgstr "" -#: library/dis.rst:1853 +#: library/dis.rst:1967 msgid "" "Marks the end of the code block associated with the last ``SETUP_FINALLY``, " "``SETUP_CLEANUP`` or ``SETUP_WITH``." msgstr "" -#: library/dis.rst:1859 +#: library/dis.rst:1974 msgid "" "Undirected relative jump instructions which are replaced by their directed " "(forward/backward) counterparts by the assembler." msgstr "" -#: library/dis.rst:1864 +#: library/dis.rst:1980 +msgid "" +"Conditional jumps which do not impact the stack. Replaced by the sequence " +"``COPY 1``, ``TO_BOOL``, ``POP_JUMP_IF_TRUE/FALSE``." +msgstr "" + +#: library/dis.rst:1985 msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: library/dis.rst:1867 +#: library/dis.rst:1988 msgid "" "Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." msgstr "" -#: library/dis.rst:1869 +#: library/dis.rst:1990 msgid "This opcode is now a pseudo-instruction." msgstr "" -#: library/dis.rst:1875 -msgid "" -"Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode with a " -"flag set in the arg." -msgstr "" - -#: library/dis.rst:1882 +#: library/dis.rst:1997 msgid "Opcode collections" msgstr "" -#: library/dis.rst:1884 +#: library/dis.rst:1999 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: library/dis.rst:1887 +#: library/dis.rst:2002 msgid "" "The collections now contain pseudo instructions and instrumented " "instructions as well. These are opcodes with values ``>= MIN_PSEUDO_OPCODE`` " "and ``>= MIN_INSTRUMENTED_OPCODE``." msgstr "" -#: library/dis.rst:1894 +#: library/dis.rst:2009 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: library/dis.rst:1899 +#: library/dis.rst:2014 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: library/dis.rst:1904 +#: library/dis.rst:2019 msgid "Sequence of all compare operation names." msgstr "" -#: library/dis.rst:1909 +#: library/dis.rst:2024 msgid "Sequence of bytecodes that use their argument." msgstr "" -#: library/dis.rst:1916 +#: library/dis.rst:2031 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: library/dis.rst:1921 +#: library/dis.rst:2036 msgid "" "Sequence of bytecodes that access a :term:`free (closure) variable `. 'free' in this context refers to names in the current scope that " @@ -2041,42 +2164,45 @@ msgid "" "scopes." msgstr "" -#: library/dis.rst:1929 +#: library/dis.rst:2044 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: library/dis.rst:1934 +#: library/dis.rst:2049 msgid "Sequence of bytecodes that have a jump target. All jumps are relative." msgstr "" -#: library/dis.rst:1941 +#: library/dis.rst:2056 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: library/dis.rst:1946 +#: library/dis.rst:2061 msgid "Sequence of bytecodes of Boolean operations." msgstr "" -#: library/dis.rst:1950 +#: library/dis.rst:2065 msgid "Sequence of bytecodes that set an exception handler." msgstr "" -#: library/dis.rst:1957 +#: library/dis.rst:2072 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: library/dis.rst:1959 +#: library/dis.rst:2074 msgid "All jumps are now relative. Use :data:`hasjump`." msgstr "" -#: library/dis.rst:1965 +#: library/dis.rst:2080 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: library/dis.rst:1967 +#: library/dis.rst:2082 msgid "All jumps are now relative. This list is empty." msgstr "" +#~ msgid "the line number, for the first instruction of each line" +#~ msgstr "le numéro de ligne, pour la première instruction de chaque ligne" + #, fuzzy #~ msgid "built-in function" #~ msgstr "Analyse de fonctions" diff --git a/library/distutils.po b/library/distutils.po new file mode 100644 index 000000000..39ac89f6b --- /dev/null +++ b/library/distutils.po @@ -0,0 +1,35 @@ +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/distutils.rst:2 +msgid ":mod:`!distutils` --- Building and installing Python modules" +msgstr "" + +#: library/distutils.rst:10 +msgid "" +"This module is no longer part of the Python standard library. It " +"was :ref:`removed in Python 3.12 ` after " +"being deprecated in Python 3.10. The removal was decided in :pep:`632`, " +"which has `migration advice `_." +msgstr "" + +#: library/distutils.rst:16 +msgid "" +"The last version of Python that provided the :mod:`!distutils` module was " +"`Python 3.11 `_." +msgstr "" diff --git a/library/doctest.po b/library/doctest.po index 1a358a2bf..93550ab58 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-11-01 16:04+0100\n" "Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" @@ -19,13 +19,14 @@ msgstr "" msgid ":mod:`!doctest` --- Test interactive Python examples" msgstr ":mod:`!doctest` — Exemples de tests interactifs en Python" -#: library/doctest.rst:12 +#: library/doctest.rst:7 msgid "**Source code:** :source:`Lib/doctest.py`" msgstr "**Code source :** :source:`Lib/doctest.py`" -#: library/doctest.rst:16 +#: library/doctest.rst:11 +#, fuzzy msgid "" -"The :mod:`doctest` module searches for pieces of text that look like " +"The :mod:`!doctest` module searches for pieces of text that look like " "interactive Python sessions, and then executes those sessions to verify that " "they work exactly as shown. There are several common ways to use doctest:" msgstr "" @@ -34,7 +35,7 @@ msgstr "" "le fonctionnement correspond exactement à la description. Voici quelques cas " "d'utilisation de *doctest* :" -#: library/doctest.rst:20 +#: library/doctest.rst:15 msgid "" "To check that a module's docstrings are up-to-date by verifying that all " "interactive examples still work as documented." @@ -42,7 +43,7 @@ msgstr "" "Vérifier que les *docstrings* d'un module sont à jour en vérifiant que tous " "les exemples interactifs fonctionnent toujours tels que décrits." -#: library/doctest.rst:23 +#: library/doctest.rst:18 msgid "" "To perform regression testing by verifying that interactive examples from a " "test file or a test object work as expected." @@ -51,7 +52,7 @@ msgstr "" "provenant d'un fichier de test ou d'un objet de test fonctionnent comme " "prévu." -#: library/doctest.rst:26 +#: library/doctest.rst:21 msgid "" "To write tutorial documentation for a package, liberally illustrated with " "input-output examples. Depending on whether the examples or the expository " @@ -63,22 +64,24 @@ msgstr "" "comme des tests « dans le texte » ou de la « documentation exécutable », " "selon le point de vue." -#: library/doctest.rst:31 +#: library/doctest.rst:26 msgid "Here's a complete but small example module::" msgstr "Voici un petit exemple d'un module qui soit tout de même complet ::" -#: library/doctest.rst:88 +#: library/doctest.rst:83 +#, fuzzy msgid "" -"If you run :file:`example.py` directly from the command line, :mod:`doctest` " -"works its magic:" +"If you run :file:`example.py` directly from the command line, :mod:`!" +"doctest` works its magic:" msgstr "" "L'exécution du fichier :file:`example.py` directement à partir de la ligne " "de commande démontre la magie de :mod:`doctest` :" -#: library/doctest.rst:96 +#: library/doctest.rst:91 +#, fuzzy msgid "" "There's no output! That's normal, and it means all the examples worked. " -"Pass ``-v`` to the script, and :mod:`doctest` prints a detailed log of what " +"Pass ``-v`` to the script, and :mod:`!doctest` prints a detailed log of what " "it's trying, and prints a summary at the end:" msgstr "" "Il n'y a pas de sortie ! C'est normal, cela signifie que tous les exemples " @@ -86,15 +89,15 @@ msgstr "" "journal détaillé de ce qui a été essayé, avant d'afficher un résumé à la " "fin :" -#: library/doctest.rst:114 +#: library/doctest.rst:109 msgid "And so on, eventually ending with:" msgstr "Et ainsi de suite, jusqu'à ce qu'on atteigne :" -#: library/doctest.rst:133 +#: library/doctest.rst:128 #, fuzzy msgid "" -"That's all you need to know to start making productive use of :mod:" -"`doctest`! Jump in. The following sections provide full details. Note that " +"That's all you need to know to start making productive use of :mod:`!" +"doctest`! Jump in. The following sections provide full details. Note that " "there are many examples of doctests in the standard Python test suite and " "libraries. Especially useful examples can be found in the standard test " "file :file:`Lib/test/test_doctest/test_doctest.py`." @@ -106,25 +109,31 @@ msgstr "" "bibliothèques. Des exemples particulièrement utiles se situent dans le " "fichier de test standard :file:`Lib/test/test_doctest.py`." -#: library/doctest.rst:143 +#: library/doctest.rst:134 +msgid "" +"Output is colorized by default and can be :ref:`controlled using environment " +"variables `." +msgstr "" + +#: library/doctest.rst:142 msgid "Simple Usage: Checking Examples in Docstrings" msgstr "Utilisation simple : vérifier des exemples dans des *docstrings*" -#: library/doctest.rst:145 +#: library/doctest.rst:144 msgid "" "The simplest way to start using doctest (but not necessarily the way you'll " "continue to do it) is to end each module :mod:`!M` with::" msgstr "" "Le plus simple pour commencer à utiliser *doctest* (mais pas nécessairement " -"la façon avec laquelle vous continuerez) est de terminer chaque module :mod:" -"`!M` avec ::" +"la façon avec laquelle vous continuerez) est de terminer chaque " +"module :mod:`!M` avec ::" -#: library/doctest.rst:152 +#: library/doctest.rst:151 msgid ":mod:`!doctest` then examines docstrings in module :mod:`!M`." msgstr "" ":mod:`!doctest` examine alors les *docstrings* dans le module :mod:`!M`." -#: library/doctest.rst:154 +#: library/doctest.rst:153 msgid "" "Running the module as a script causes the examples in the docstrings to get " "executed and verified::" @@ -132,7 +141,7 @@ msgstr "" "Exécuter le module comme un script a comme conséquence d'exécuter et de " "vérifier les exemples dans les *docstrings* ::" -#: library/doctest.rst:159 +#: library/doctest.rst:158 msgid "" "This won't display anything unless an example fails, in which case the " "failing example(s) and the cause(s) of the failure(s) are printed to stdout, " @@ -144,11 +153,11 @@ msgstr "" "*stdout*, et la ligne finale de la sortie est ``***Test Failed*** *N " "failures*.``, où *N* est le nombre d'exemples défaillants." -#: library/doctest.rst:164 +#: library/doctest.rst:163 msgid "Run it with the ``-v`` switch instead::" msgstr "À la place, exécutez-la avec l'option de ligne de commande ``-v`` ::" -#: library/doctest.rst:168 +#: library/doctest.rst:167 msgid "" "and a detailed report of all examples tried is printed to standard output, " "along with assorted summaries at the end." @@ -156,62 +165,50 @@ msgstr "" "alors, un rapport détaillé de tous les exemples faisant partie de l'essai " "est affiché sur la sortie standard, accompagné à la fin de leurs résumés." -#: library/doctest.rst:171 +#: library/doctest.rst:170 +#, fuzzy msgid "" "You can force verbose mode by passing ``verbose=True`` to :func:`testmod`, " -"or prohibit it by passing ``verbose=False``. In either of those cases, " -"``sys.argv`` is not examined by :func:`testmod` (so passing ``-v`` or not " -"has no effect)." +"or prohibit it by passing ``verbose=False``. In either of those " +"cases, :data:`sys.argv` is not examined by :func:`testmod` (so passing ``-" +"v`` or not has no effect)." msgstr "" -"Vous pouvez activer le mode verbeux en passant ``verbose=True`` à :func:" -"`testmod`, ou vous le désactiver en lui passant ``verbose=False``. Dans ces " -"deux cas, ``sys.argv`` n'est pas inspecté par :func:`testmod` (ainsi, lui " -"passer ``-v`` ou pas n'a aucun effet)." +"Vous pouvez activer le mode verbeux en passant ``verbose=True`` " +"à :func:`testmod`, ou vous le désactiver en lui passant ``verbose=False``. " +"Dans ces deux cas, ``sys.argv`` n'est pas inspecté par :func:`testmod` " +"(ainsi, lui passer ``-v`` ou pas n'a aucun effet)." -#: library/doctest.rst:176 -msgid "" -"There is also a command line shortcut for running :func:`testmod`. You can " -"instruct the Python interpreter to run the doctest module directly from the " -"standard library and pass the module name(s) on the command line::" -msgstr "" -"Il y a un raccourci pour exécuter :func:`testmod` à partir de la ligne de " -"commande. Vous demandez à l'interpréteur Python d'exécuter le module " -"*doctest* directement à partir de la bibliothèque standard afin de passer le " -"ou les noms des modules à partir de la ligne de commande ainsi ::" - -#: library/doctest.rst:182 +#: library/doctest.rst:175 +#, fuzzy msgid "" -"This will import :file:`example.py` as a standalone module and run :func:" -"`testmod` on it. Note that this may not work correctly if the file is part " -"of a package and imports other submodules from that package." +"There is also a command line shortcut for running :func:`testmod`, see " +"section :ref:`doctest-cli`." msgstr "" -"Ceci importera :file:`example.py` comme un module autonome et exécutera :" -"func:`testmod` sur celui-ci. Notez que ceci peut ne pas fonctionner si le " -"fichier fait partie d'un paquet et importe d'autres sous-modules de ce " -"paquet." +"Pour plus d'informations sur :func:`testmod`, consultez la " +"section :ref:`doctest-basic-api`." -#: library/doctest.rst:186 +#: library/doctest.rst:178 msgid "" "For more information on :func:`testmod`, see section :ref:`doctest-basic-" "api`." msgstr "" -"Pour plus d'informations sur :func:`testmod`, consultez la section :ref:" -"`doctest-basic-api`." +"Pour plus d'informations sur :func:`testmod`, consultez la " +"section :ref:`doctest-basic-api`." -#: library/doctest.rst:192 +#: library/doctest.rst:184 msgid "Simple Usage: Checking Examples in a Text File" msgstr "Utilisation simple : vérifier des exemples dans un fichier texte" -#: library/doctest.rst:194 +#: library/doctest.rst:186 msgid "" "Another simple application of doctest is testing interactive examples in a " "text file. This can be done with the :func:`testfile` function::" msgstr "" "Une autre application simple de *doctest* est de tester des exemples " -"interactifs dans un fichier texte. Ceci est fait avec la fonction :func:" -"`testfile` ::" +"interactifs dans un fichier texte. Ceci est fait avec la " +"fonction :func:`testfile` ::" -#: library/doctest.rst:200 +#: library/doctest.rst:192 msgid "" "That short script executes and verifies any interactive Python examples " "contained in the file :file:`example.txt`. The file content is treated as " @@ -221,10 +218,10 @@ msgstr "" "Ce court script exécute et vérifie chacun des exemples Python interactifs " "contenus dans le fichier :file:`example.txt`. Le contenu du fichier est " "traité comme une seule *docstring* géante ; le fichier n'a pas besoin de " -"contenir un programme Python ! Par exemple, prenons un fichier :file:" -"`example.txt` contenant :" +"contenir un programme Python ! Par exemple, prenons un " +"fichier :file:`example.txt` contenant :" -#: library/doctest.rst:223 +#: library/doctest.rst:215 msgid "" "Running ``doctest.testfile(\"example.txt\")`` then finds the error in this " "documentation::" @@ -232,19 +229,20 @@ msgstr "" "Exécuter ``doctest.testfile(\"example.txt\")`` recherche les erreurs dans " "cette documentation ::" -#: library/doctest.rst:234 +#: library/doctest.rst:226 +#, fuzzy msgid "" "As with :func:`testmod`, :func:`testfile` won't display anything unless an " "example fails. If an example does fail, then the failing example(s) and the " -"cause(s) of the failure(s) are printed to stdout, using the same format as :" -"func:`testmod`." +"cause(s) of the failure(s) are printed to stdout, using the same format " +"as :func:`!testmod`." msgstr "" "Comme pour :func:`testmod`, :func:`testfile` n'affichera rien sauf si un " "exemple échoue. Si un exemple échoue, alors le ou les exemples défaillants " -"et leurs causes sont affichés sur *stdout*, dans le même format que :func:" -"`testmod`." +"et leurs causes sont affichés sur *stdout*, dans le même format " +"que :func:`testmod`." -#: library/doctest.rst:239 +#: library/doctest.rst:231 msgid "" "By default, :func:`testfile` looks for files in the calling module's " "directory. See section :ref:`doctest-basic-api` for a description of the " @@ -256,7 +254,7 @@ msgstr "" "pour une description des options de ligne de commande à utiliser afin de " "chercher dans d'autres répertoires." -#: library/doctest.rst:243 +#: library/doctest.rst:235 msgid "" "Like :func:`testmod`, :func:`testfile`'s verbosity can be set with the ``-" "v`` command-line switch or with the optional keyword argument *verbose*." @@ -265,39 +263,81 @@ msgstr "" "ajustée avec l'option de ligne de commande ``-v`` ou avec le mot clé " "*verbose*." -#: library/doctest.rst:247 +#: library/doctest.rst:239 +#, fuzzy +msgid "" +"There is also a command line shortcut for running :func:`testfile`, see " +"section :ref:`doctest-cli`." +msgstr "" +"Pour plus d'information sur :func:`testfile`, consultez la " +"section :ref:`doctest-basic-api`." + +#: library/doctest.rst:242 +msgid "" +"For more information on :func:`testfile`, see section :ref:`doctest-basic-" +"api`." +msgstr "" +"Pour plus d'information sur :func:`testfile`, consultez la " +"section :ref:`doctest-basic-api`." + +#: library/doctest.rst:248 +msgid "Command-line Usage" +msgstr "" + +#: library/doctest.rst:250 +msgid "" +"The :mod:`!doctest` module can be invoked as a script from the command line:" +msgstr "" + +#: library/doctest.rst:260 +#, fuzzy msgid "" -"There is also a command line shortcut for running :func:`testfile`. You can " -"instruct the Python interpreter to run the doctest module directly from the " -"standard library and pass the file name(s) on the command line::" +"Detailed report of all examples tried is printed to standard output, along " +"with assorted summaries at the end::" msgstr "" -"Il y a un raccourci pour exécuter :func:`testfile` à partir de la ligne de " -"commande. Demandez à l'interpréteur Python d'exécuter le module *doctest* " -"directement à partir de la bibliothèque standard et de passer le ou les noms " -"des modules à partir de la ligne de commande ainsi ::" +"alors, un rapport détaillé de tous les exemples faisant partie de l'essai " +"est affiché sur la sortie standard, accompagné à la fin de leurs résumés." -#: library/doctest.rst:253 +#: library/doctest.rst:265 +#, fuzzy msgid "" -"Because the file name does not end with :file:`.py`, :mod:`doctest` infers " -"that it must be run with :func:`testfile`, not :func:`testmod`." +"This will import :file:`example.py` as a standalone module and " +"run :func:`testmod` on it. Note that this may not work correctly if the file " +"is part of a package and imports other submodules from that package." +msgstr "" +"Ceci importera :file:`example.py` comme un module autonome et " +"exécutera :func:`testmod` sur celui-ci. Notez que ceci peut ne pas " +"fonctionner si le fichier fait partie d'un paquet et importe d'autres sous-" +"modules de ce paquet." + +#: library/doctest.rst:269 +#, fuzzy +msgid "" +"If the file name does not end with :file:`.py`, :mod:`!doctest` infers that " +"it must be run with :func:`testfile` instead::" msgstr "" "Puisque le nom du fichier ne se termine pas par :file:`.py`, :mod:`doctest` " -"en déduit qu'il s'exécute à l'aide de :func:`testfile`, et non pas :func:" -"`testmod`." +"en déduit qu'il s'exécute à l'aide de :func:`testfile`, et non " +"pas :func:`testmod`." -#: library/doctest.rst:256 +#: library/doctest.rst:276 msgid "" -"For more information on :func:`testfile`, see section :ref:`doctest-basic-" -"api`." +"Option flags control various aspects of doctest's behavior, see " +"section :ref:`doctest-options`." msgstr "" -"Pour plus d'information sur :func:`testfile`, consultez la section :ref:" -"`doctest-basic-api`." -#: library/doctest.rst:262 +#: library/doctest.rst:283 +#, fuzzy +msgid "This is shorthand for ``-o FAIL_FAST``." +msgstr "" +"La ligne de commande de *doctest* accepte l'option ``-f`` comme un raccourci " +"de ``-o FAIL_FAST``." + +#: library/doctest.rst:291 msgid "How It Works" msgstr "Comment ça marche" -#: library/doctest.rst:264 +#: library/doctest.rst:293 msgid "" "This section examines in detail how doctest works: which docstrings it looks " "at, how it finds interactive examples, what execution context it uses, how " @@ -315,11 +355,11 @@ msgstr "" "pour de l'information sur l'exécution de *doctest* sur ces exemples, " "consultez les sections suivantes." -#: library/doctest.rst:275 +#: library/doctest.rst:304 msgid "Which Docstrings Are Examined?" msgstr "Quelles *docstrings* sont considérées ?" -#: library/doctest.rst:277 +#: library/doctest.rst:306 msgid "" "The module docstring, and all function, class and method docstrings are " "searched. Objects imported into the module are not searched." @@ -328,7 +368,7 @@ msgstr "" "sont cherchées. Les objets qui sont importés dans le module ne sont pas " "cherchés." -#: library/doctest.rst:280 +#: library/doctest.rst:316 #, fuzzy msgid "" "In addition, there are cases when you want tests to be part of a module but " @@ -336,10 +376,10 @@ msgid "" "the docstring. Doctest looks for a module-level variable called ``__test__`` " "and uses it to locate other tests. If ``M.__test__`` exists, it must be a " "dict, and each entry maps a (string) name to a function object, class " -"object, or string. Function and class object docstrings found from ``M." -"__test__`` are searched, and strings are treated as if they were " -"docstrings. In output, a key ``K`` in ``M.__test__`` appears with name ``M." -"__test__.K``." +"object, or string. Function and class object docstrings found from " +"``M.__test__`` are searched, and strings are treated as if they were " +"docstrings. In output, a key ``K`` in ``M.__test__`` appears with name " +"``M.__test__.K``." msgstr "" "De plus, si ``M.__test__`` existe et qu'il est vrai, il doit être un *dict* " "dont chaque élément lie un nom (chaîne de caractère) à un objet (fonction, " @@ -348,20 +388,20 @@ msgstr "" "sont traitées comme si elles étaient des *docstrings*. En sortie, une clé " "``K`` dans ``M.__test__`` apparaît avec le nom ::" -#: library/doctest.rst:289 +#: library/doctest.rst:325 msgid "For example, place this block of code at the top of :file:`example.py`:" msgstr "" -#: library/doctest.rst:303 +#: library/doctest.rst:339 msgid "" "The value of ``example.__test__[\"numbers\"]`` will be treated as a " "docstring and all the tests inside it will be run. It is important to note " -"that the value can be mapped to a function, class object, or module; if so, :" -"mod:`!doctest` searches them recursively for docstrings, which are then " +"that the value can be mapped to a function, class object, or module; if " +"so, :mod:`!doctest` searches them recursively for docstrings, which are then " "scanned for tests." msgstr "" -#: library/doctest.rst:309 +#: library/doctest.rst:345 msgid "" "Any classes found are recursively searched similarly, to test docstrings in " "their contained methods and nested classes." @@ -369,11 +409,23 @@ msgstr "" "Toute classe trouvée est ainsi cherchée récursivement, afin de tester les " "*docstrings* contenues dans leurs méthodes et leurs classes imbriquées." -#: library/doctest.rst:316 +#: library/doctest.rst:350 +msgid "" +"``doctest`` can only automatically discover classes and functions that are " +"defined at the module level or inside other classes." +msgstr "" + +#: library/doctest.rst:353 +msgid "" +"Since nested classes and functions only exist when an outer function is " +"called, they cannot be discovered. Define them outside to make them visible." +msgstr "" + +#: library/doctest.rst:359 msgid "How are Docstring Examples Recognized?" msgstr "Comment les exemples *docstring* sont-ils identifiés ?" -#: library/doctest.rst:318 +#: library/doctest.rst:361 msgid "" "In most cases a copy-and-paste of an interactive console session works fine, " "but doctest isn't trying to do an exact emulation of any specific Python " @@ -383,7 +435,7 @@ msgstr "" "console fonctionne bien, mais *doctest* n'essaye pas de faire une simulation " "exacte d'un *shell* Python spécifique." -#: library/doctest.rst:343 +#: library/doctest.rst:386 msgid "" "Any expected output must immediately follow the final ``'>>> '`` or ``'... " "'`` line containing the code, and the expected output (if any) extends to " @@ -393,11 +445,11 @@ msgstr "" "dernier ``'... '`` contenant le code, et la sortie souhaitée, s'il y en a " "une, s'étend jusqu'au prochain ``'>>> '`` ou à la prochaine ligne vide." -#: library/doctest.rst:347 +#: library/doctest.rst:390 msgid "The fine print:" msgstr "En détail :" -#: library/doctest.rst:349 +#: library/doctest.rst:392 msgid "" "Expected output cannot contain an all-whitespace line, since such a line is " "taken to signal the end of expected output. If expected output does contain " @@ -409,19 +461,19 @@ msgstr "" "souhaitée doit contenir une ligne vide, ajoutez ```` dans votre " "exemple *doctest* à chaque endroit où une ligne vide est souhaitée." -#: library/doctest.rst:354 +#: library/doctest.rst:397 msgid "" "All hard tab characters are expanded to spaces, using 8-column tab stops. " "Tabs in output generated by the tested code are not modified. Because any " "hard tabs in the sample output *are* expanded, this means that if the code " -"output includes hard tabs, the only way the doctest can pass is if the :" -"const:`NORMALIZE_WHITESPACE` option or :ref:`directive ` " -"is in effect. Alternatively, the test can be rewritten to capture the output " -"and compare it to an expected value as part of the test. This handling of " -"tabs in the source was arrived at through trial and error, and has proven to " -"be the least error prone way of handling them. It is possible to use a " -"different algorithm for handling tabs by writing a custom :class:" -"`DocTestParser` class." +"output includes hard tabs, the only way the doctest can pass is if " +"the :const:`NORMALIZE_WHITESPACE` option or :ref:`directive ` is in effect. Alternatively, the test can be rewritten to " +"capture the output and compare it to an expected value as part of the test. " +"This handling of tabs in the source was arrived at through trial and error, " +"and has proven to be the least error prone way of handling them. It is " +"possible to use a different algorithm for handling tabs by writing a " +"custom :class:`DocTestParser` class." msgstr "" "Tous les caractères de tabulation insécables (*hard tab characters*) sont " "convertis en espaces, en utilisant des taquets de tabulation de 8 espaces. " @@ -436,10 +488,10 @@ msgstr "" "été obtenue suite à un processus d'essais et d'erreurs ; il a été démontré " "que c'était là la façon de les gérer qui soit la moins susceptible de " "générer des erreurs. Il est possible d'utiliser un algorithme différent pour " -"la gestion des tabulations en rédigeant une classe sur mesure :class:" -"`DocTestParser`." +"la gestion des tabulations en rédigeant une classe sur " +"mesure :class:`DocTestParser`." -#: library/doctest.rst:366 +#: library/doctest.rst:409 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." @@ -447,7 +499,7 @@ msgstr "" "La sortie vers *stdout* est capturée, mais pas la sortie vers *stderr* (les " "traces d'appel sont capturées par d'autres moyens)." -#: library/doctest.rst:369 +#: library/doctest.rst:412 msgid "" "If you continue a line via backslashing in an interactive session, or for " "any other reason use a backslash, you should use a raw docstring, which will " @@ -458,7 +510,7 @@ msgstr "" "séance interactive, ou quand vous utilisez une telle barre pour toute autre " "raison, vous devez utiliser une *docstring* brute ::" -#: library/doctest.rst:379 +#: library/doctest.rst:422 msgid "" "Otherwise, the backslash will be interpreted as part of the string. For " "example, the ``\\n`` above would be interpreted as a newline character. " @@ -471,11 +523,11 @@ msgstr "" "chaque barre oblique inversée dans la version *doctest* (et n'utilisez pas " "dans ce cas de *docstring* brute) ::" -#: library/doctest.rst:389 +#: library/doctest.rst:432 msgid "The starting column doesn't matter::" msgstr "La colonne de départ n'a pas d'importance ::" -#: library/doctest.rst:396 +#: library/doctest.rst:439 msgid "" "and as many leading whitespace characters are stripped from the expected " "output as appeared in the initial ``'>>> '`` line that started the example." @@ -483,13 +535,14 @@ msgstr "" "et autant d'espaces sont retirés de la sortie attendue qu'il y avait " "d'espaces avant la ligne commençant par ``'>>> '``." -#: library/doctest.rst:403 +#: library/doctest.rst:446 msgid "What's the Execution Context?" msgstr "Quel est le contexte d'exécution ?" -#: library/doctest.rst:405 +#: library/doctest.rst:448 +#, fuzzy msgid "" -"By default, each time :mod:`doctest` finds a docstring to test, it uses a " +"By default, each time :mod:`!doctest` finds a docstring to test, it uses a " "*shallow copy* of :mod:`!M`'s globals, so that running tests doesn't change " "the module's real globals, and so that one test in :mod:`!M` can't leave " "behind crumbs that accidentally allow another test to work. This means " @@ -507,20 +560,20 @@ msgstr "" "que les noms définis précédemment dans la *docstring* en cours d'exécution. " "Les exemples ne peuvent voir les noms définis dans d'autres *docstrings*." -#: library/doctest.rst:413 +#: library/doctest.rst:456 msgid "" "You can force use of your own dict as the execution context by passing " "``globs=your_dict`` to :func:`testmod` or :func:`testfile` instead." msgstr "" "Vous pouvez forcer l'utilisation de votre propre *dict* comme contexte " -"d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, à :" -"func:`testfile`." +"d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, " +"à :func:`testfile`." -#: library/doctest.rst:420 +#: library/doctest.rst:463 msgid "What About Exceptions?" msgstr "Qu'en est-il des exceptions ?" -#: library/doctest.rst:422 +#: library/doctest.rst:465 msgid "" "No problem, provided that the traceback is the only output produced by the " "example: just paste in the traceback. [#]_ Since tracebacks contain details " @@ -534,19 +587,19 @@ msgstr "" "chemin exact vers un fichier et les numéros de ligne), ceci est un cas où " "*doctest* fait un effort pour être flexible dans ce qu'il accepte." -#: library/doctest.rst:428 +#: library/doctest.rst:471 msgid "Simple example::" msgstr "Exemple simple ::" -#: library/doctest.rst:435 +#: library/doctest.rst:478 msgid "" -"That doctest succeeds if :exc:`ValueError` is raised, with the ``list." -"remove(x): x not in list`` detail as shown." +"That doctest succeeds if :exc:`ValueError` is raised, with the " +"``list.remove(x): x not in list`` detail as shown." msgstr "" -"Ce *doctest* réussit si :exc:`ValueError` est levée, avec le détail ``list." -"remote(x): x not in list`` tel que montré." +"Ce *doctest* réussit si :exc:`ValueError` est levée, avec le détail " +"``list.remote(x): x not in list`` tel que montré." -#: library/doctest.rst:438 +#: library/doctest.rst:481 msgid "" "The expected output for an exception must start with a traceback header, " "which may be either of the following two lines, indented the same as the " @@ -556,7 +609,7 @@ msgstr "" "d'appels, qui peut être l'une des deux lignes suivantes, avec la même " "indentation que la première ligne de l'exemple ::" -#: library/doctest.rst:445 +#: library/doctest.rst:488 msgid "" "The traceback header is followed by an optional traceback stack, whose " "contents are ignored by doctest. The traceback stack is typically omitted, " @@ -567,7 +620,7 @@ msgstr "" "habituellement omise, ou est copiée verbatim à partir d'une séance " "interactive." -#: library/doctest.rst:449 +#: library/doctest.rst:492 msgid "" "The traceback stack is followed by the most interesting part: the line(s) " "containing the exception type and detail. This is usually the last line of " @@ -580,7 +633,7 @@ msgstr "" "l'exception a un détail sur plusieurs lignes, il est possible de prolonger " "sur plusieurs lignes ::" -#: library/doctest.rst:461 +#: library/doctest.rst:504 msgid "" "The last three lines (starting with :exc:`ValueError`) are compared against " "the exception's type and detail, and the rest are ignored." @@ -589,7 +642,7 @@ msgstr "" "comparées avec le type et le détail de l'exception ; tout le reste est " "ignoré." -#: library/doctest.rst:464 +#: library/doctest.rst:507 msgid "" "Best practice is to omit the traceback stack, unless it adds significant " "documentation value to the example. So the last example is probably better " @@ -599,13 +652,13 @@ msgstr "" "celle-ci ait une valeur significative de documentation de l'exemple. Ainsi, " "le dernier exemple est probablement meilleur tel qui suit ::" -#: library/doctest.rst:474 +#: library/doctest.rst:517 msgid "" "Note that tracebacks are treated very specially. In particular, in the " -"rewritten example, the use of ``...`` is independent of doctest's :const:" -"`ELLIPSIS` option. The ellipsis in that example could be left out, or could " -"just as well be three (or three hundred) commas or digits, or an indented " -"transcript of a Monty Python skit." +"rewritten example, the use of ``...`` is independent of " +"doctest's :const:`ELLIPSIS` option. The ellipsis in that example could be " +"left out, or could just as well be three (or three hundred) commas or " +"digits, or an indented transcript of a Monty Python skit." msgstr "" "Prenez note que les traces d'appels sont traitées de façon vraiment " "particulière. Précisément, dans l'exemple ré-écrit, l'utilisation de ``...`` " @@ -614,13 +667,13 @@ msgstr "" "(ou trois cents) virgules ou chiffres, ou une retranscription indentée d'une " "parodie de Monty Python." -#: library/doctest.rst:480 +#: library/doctest.rst:523 msgid "Some details you should read once, but won't need to remember:" msgstr "" "Quelques détails que vous devriez lire une fois, mais que vous pouvez " "oublier :" -#: library/doctest.rst:482 +#: library/doctest.rst:525 msgid "" "Doctest can't guess whether your expected output came from an exception " "traceback or from ordinary printing. So, e.g., an example that expects " @@ -637,7 +690,7 @@ msgstr "" "une sortie ordinaire commence rarement par une ligne d'en-tête de trace " "d'appels ; ainsi, ceci ne pose pas de vrai problème." -#: library/doctest.rst:489 +#: library/doctest.rst:532 msgid "" "Each line of the traceback stack (if present) must be indented further than " "the first line of the example, *or* start with a non-alphanumeric character. " @@ -653,7 +706,7 @@ msgstr "" "début du détail de l'exception. Bien sûr, ceci fait la chose adéquate pour " "les traces d'appels véritables." -#: library/doctest.rst:495 +#: library/doctest.rst:538 msgid "" "When the :const:`IGNORE_EXCEPTION_DETAIL` doctest option is specified, " "everything following the leftmost colon and any module information in the " @@ -663,12 +716,13 @@ msgstr "" "tout ce qui suit le point-virgule se trouvant le plus à gauche ainsi que " "toute information liée au module dans le nom de l'exception sont ignorés." -#: library/doctest.rst:499 +#: library/doctest.rst:542 +#, fuzzy msgid "" -"The interactive shell omits the traceback header line for some :exc:" -"`SyntaxError`\\ s. But doctest uses the traceback header line to " +"The interactive shell omits the traceback header line for " +"some :exc:`SyntaxError`\\ s. But doctest uses the traceback header line to " "distinguish exceptions from non-exceptions. So in the rare case where you " -"need to test a :exc:`SyntaxError` that omits the traceback header, you will " +"need to test a :exc:`!SyntaxError` that omits the traceback header, you will " "need to manually add the traceback header line to your test example." msgstr "" "Le shell interactif omet la ligne d'en-tête de la trace d'appels pour " @@ -679,7 +733,7 @@ msgstr "" "trace d'appels, il vous est nécessaire d'ajouter manuellement la ligne d'en-" "tête de la trace d'appels à l'exemple de test." -#: library/doctest.rst:507 +#: library/doctest.rst:550 msgid "" "For some exceptions, Python displays the position of the error using ``^`` " "markers and tildes::" @@ -687,7 +741,7 @@ msgstr "" "Pour certaines erreurs, Python affiche la position de l'erreur en utilisant " "le marqueur ``^`` et des tildes ::" -#: library/doctest.rst:516 +#: library/doctest.rst:559 msgid "" "Since the lines showing the position of the error come before the exception " "type and detail, they are not checked by doctest. For example, the " @@ -699,18 +753,18 @@ msgstr "" "exemple, le test suivant réussira, même si le marqueur ``^`` n'est pas à la " "bonne place ::" -#: library/doctest.rst:531 +#: library/doctest.rst:574 msgid "Option Flags" msgstr "Options de ligne de commande" -#: library/doctest.rst:533 +#: library/doctest.rst:576 msgid "" "A number of option flags control various aspects of doctest's behavior. " -"Symbolic names for the flags are supplied as module constants, which can be :" -"ref:`bitwise ORed ` together and passed to various functions. The " -"names can also be used in :ref:`doctest directives `, " -"and may be passed to the doctest command line interface via the ``-o`` " -"option." +"Symbolic names for the flags are supplied as module constants, which can " +"be :ref:`bitwise ORed ` together and passed to various functions. " +"The names can also be used in :ref:`doctest directives `, and may be passed to the doctest command line interface via " +"the ``-o`` option." msgstr "" "Un ensemble d'options de ligne de commande contrôle différents aspects du " "comportement de *doctest*. Pour les options, des noms symboliques sont " @@ -720,11 +774,7 @@ msgstr "" "`, et peuvent être passés à l'interface de ligne de " "commande de *doctest* à l'aide de l'option ``-o``." -#: library/doctest.rst:539 -msgid "The ``-o`` command line option." -msgstr "L'option de ligne de commande ``-o``." - -#: library/doctest.rst:542 +#: library/doctest.rst:582 msgid "" "The first group of options define test semantics, controlling aspects of how " "doctest decides whether actual output matches an example's expected output:" @@ -733,35 +783,36 @@ msgstr "" "contrôler comment *doctest* décide si la sortie obtenue correspond à la " "sortie attendue de l'exemple :" -#: library/doctest.rst:548 +#: library/doctest.rst:588 msgid "" "By default, if an expected output block contains just ``1``, an actual " "output block containing just ``1`` or just ``True`` is considered to be a " -"match, and similarly for ``0`` versus ``False``. When :const:" -"`DONT_ACCEPT_TRUE_FOR_1` is specified, neither substitution is allowed. The " -"default behavior caters to that Python changed the return type of many " -"functions from integer to boolean; doctests expecting \"little integer\" " -"output still work in these cases. This option will probably go away, but " -"not for several years." +"match, and similarly for ``0`` versus ``False``. " +"When :const:`DONT_ACCEPT_TRUE_FOR_1` is specified, neither substitution is " +"allowed. The default behavior caters to that Python changed the return type " +"of many functions from integer to boolean; doctests expecting \"little " +"integer\" output still work in these cases. This option will probably go " +"away, but not for several years." msgstr "" "Par défaut, si un bloc de sortie attendu contient uniquement un ``1``, un " "vrai bloc de sortie contenant uniquement un ``1`` ou un ``True`` sera " "considéré comme étant une correspondance ; de façon similaire, nous avons " -"une correspondance pour ``0`` et ``False``. Lorsque l'option :const:" -"`DONT_ACCEPT_TRUE_FOR_1` est précisée, aucune de ces substitutions n'est " -"acceptée. Le comportement par défaut s'ajuste au fait que Python a changé le " -"type de renvoi de plusieurs fonctions, passant de nombres entiers à des " -"booléens ; les *doctests* s'attendant à une sortie de « petit entier » " -"(*little integer*) fonctionnent encore dans ces cas. Cette option " -"disparaîtra probablement, mais pas avant plusieurs années." +"une correspondance pour ``0`` et ``False``. Lorsque " +"l'option :const:`DONT_ACCEPT_TRUE_FOR_1` est précisée, aucune de ces " +"substitutions n'est acceptée. Le comportement par défaut s'ajuste au fait " +"que Python a changé le type de renvoi de plusieurs fonctions, passant de " +"nombres entiers à des booléens ; les *doctests* s'attendant à une sortie de " +"« petit entier » (*little integer*) fonctionnent encore dans ces cas. Cette " +"option disparaîtra probablement, mais pas avant plusieurs années." -#: library/doctest.rst:560 +#: library/doctest.rst:600 msgid "" "By default, if an expected output block contains a line containing only the " "string ````, then that line will match a blank line in the actual " "output. Because a genuinely blank line delimits the expected output, this " -"is the only way to communicate that a blank line is expected. When :const:" -"`DONT_ACCEPT_BLANKLINE` is specified, this substitution is not allowed." +"is the only way to communicate that a blank line is expected. " +"When :const:`DONT_ACCEPT_BLANKLINE` is specified, this substitution is not " +"allowed." msgstr "" "Par défaut, si un bloc de sortie attendue contient une ligne contenant " "uniquement la chaîne de caractères ````, alors cette ligne sera " @@ -771,7 +822,7 @@ msgstr "" "l'option :const:`DONT_ACCEPT_BLANKLINE` est précisée, cette substitution " "n'est pas permise." -#: library/doctest.rst:569 +#: library/doctest.rst:609 msgid "" "When specified, all sequences of whitespace (blanks and newlines) are " "treated as equal. Any sequence of whitespace within the expected output " @@ -789,7 +840,7 @@ msgstr "" "utile lorsqu'une ligne de sortie attendue est très longue, et que l'on " "souhaite la répartir sur plusieurs lignes dans le fichier source." -#: library/doctest.rst:580 +#: library/doctest.rst:620 msgid "" "When specified, an ellipsis marker (``...``) in the expected output can " "match any substring in the actual output. This includes substrings that " @@ -806,31 +857,31 @@ msgstr "" "correspondances !\" que l'utilisation de ``.*`` dans les expressions " "régulières." -#: library/doctest.rst:589 +#: library/doctest.rst:629 msgid "" "When specified, doctests expecting exceptions pass so long as an exception " "of the expected type is raised, even if the details (message and fully " "qualified exception name) don't match." msgstr "" -#: library/doctest.rst:593 +#: library/doctest.rst:633 msgid "" "For example, an example expecting ``ValueError: 42`` will pass if the actual " -"exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" -"`TypeError` is raised instead. It will also ignore any fully qualified name " -"included before the exception class, which can vary between implementations " -"and versions of Python and the code/libraries in use. Hence, all three of " -"these variations will work with the flag specified:" +"exception raised is ``ValueError: 3*14``, but will fail if, say, " +"a :exc:`TypeError` is raised instead. It will also ignore any fully " +"qualified name included before the exception class, which can vary between " +"implementations and versions of Python and the code/libraries in use. Hence, " +"all three of these variations will work with the flag specified:" msgstr "" -#: library/doctest.rst:615 +#: library/doctest.rst:655 msgid "" "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " "exception message, but such a test may still fail based on whether the " "module name is present or matches exactly." msgstr "" -#: library/doctest.rst:619 +#: library/doctest.rst:659 msgid "" ":const:`IGNORE_EXCEPTION_DETAIL` now also ignores any information relating " "to the module containing the exception under test." @@ -839,7 +890,7 @@ msgstr "" "information liée au module contenant l'exception qui est en train d'être " "testée." -#: library/doctest.rst:626 +#: library/doctest.rst:666 msgid "" "When specified, do not run the example at all. This can be useful in " "contexts where doctest examples serve as both documentation and test cases, " @@ -855,26 +906,26 @@ msgstr "" "l'exemple peut dépendre de ressources inatteignables pour l'exécuteur de " "test." -#: library/doctest.rst:632 +#: library/doctest.rst:672 msgid "" "The SKIP flag can also be used for temporarily \"commenting out\" examples." msgstr "" "L'option *SKIP* peut aussi être utilisée temporairement afin de commenter " "des exemples et d'en empêcher l'exécution." -#: library/doctest.rst:637 +#: library/doctest.rst:677 msgid "A bitmask or'ing together all the comparison flags above." msgstr "" "Un masque binaire effectuant une composition avec OU de toutes les options " "de comparaisons ci-dessus." -#: library/doctest.rst:639 +#: library/doctest.rst:679 msgid "The second group of options controls how test failures are reported:" msgstr "" "Le deuxième groupe d'options détermine comment les échecs de tests sont " "signalés :" -#: library/doctest.rst:644 +#: library/doctest.rst:684 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." @@ -882,7 +933,7 @@ msgstr "" "Lorsque précisé, les défaillances qui font intervenir des sorties attendues " "et réelles multi-lignes sont affichées dans une *diff* unifiée." -#: library/doctest.rst:650 +#: library/doctest.rst:690 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." @@ -890,7 +941,7 @@ msgstr "" "Lorsque précisé, les défaillances qui font intervenir des sorties attendues " "et réelles multi-lignes sont affichées dans une *diff* de contexte." -#: library/doctest.rst:656 +#: library/doctest.rst:696 msgid "" "When specified, differences are computed by ``difflib.Differ``, using the " "same algorithm as the popular :file:`ndiff.py` utility. This is the only " @@ -900,14 +951,15 @@ msgid "" "mismatching column positions." msgstr "" "Lorsque précisé, les différences sont obtenues grâce à ``difflib.Differ``, " -"en utilisant le même algorithme que le populaire utilitaire :file:`ndiff." -"py`. Ceci est la seule méthode qui puisse faire la différence à l'intérieur " -"des lignes ainsi que parmi les lignes prises conjointement. Par exemple, si " -"une ligne de sortie attendue contient le chiffre ``1`` alors que la sortie " -"réelle contient la lettre ``l``, une ligne est insérée avec un marqueur " -"caret démarquant les positions de colonnes où il n'y a pas de correspondance." +"en utilisant le même algorithme que le populaire " +"utilitaire :file:`ndiff.py`. Ceci est la seule méthode qui puisse faire la " +"différence à l'intérieur des lignes ainsi que parmi les lignes prises " +"conjointement. Par exemple, si une ligne de sortie attendue contient le " +"chiffre ``1`` alors que la sortie réelle contient la lettre ``l``, une ligne " +"est insérée avec un marqueur caret démarquant les positions de colonnes où " +"il n'y a pas de correspondance." -#: library/doctest.rst:665 +#: library/doctest.rst:705 msgid "" "When specified, display the first failing example in each doctest, but " "suppress output for all remaining examples. This will prevent doctest from " @@ -921,12 +973,12 @@ msgstr "" "affiché, mais la sortie est supprimée pour tous les autres exemples. Ceci " "empêche *doctest* de rapporter les exemples adéquats qui échouent du fait " "d'échecs précédents ; ceci peut aussi cacher des exemples inadéquats qui " -"échouent de façon indépendante au premier échec. Lorsque :const:" -"`REPORT_ONLY_FIRST_FAILURE` est précisé, les exemples restants sont toujours " -"exécutés, et sont toujours comptabilisés dans le nombre total des lignes " -"échouant ; seulement la sortie est omise." +"échouent de façon indépendante au premier échec. " +"Lorsque :const:`REPORT_ONLY_FIRST_FAILURE` est précisé, les exemples " +"restants sont toujours exécutés, et sont toujours comptabilisés dans le " +"nombre total des lignes échouant ; seulement la sortie est omise." -#: library/doctest.rst:676 +#: library/doctest.rst:716 msgid "" "When specified, exit after the first failing example and don't attempt to " "run the remaining examples. Thus, the number of failures reported will be at " @@ -939,61 +991,54 @@ msgstr "" "durant le débogage, étant donné que les exemples suivant le premier échec ne " "produiront aucune sortie de débogage." -#: library/doctest.rst:681 -msgid "" -"The doctest command line accepts the option ``-f`` as a shorthand for ``-o " -"FAIL_FAST``." -msgstr "" -"La ligne de commande de *doctest* accepte l'option ``-f`` comme un raccourci " -"de ``-o FAIL_FAST``." - -#: library/doctest.rst:689 +#: library/doctest.rst:724 msgid "A bitmask or'ing together all the reporting flags above." msgstr "" "Un masque binaire effectuant une composition avec le OU de toutes les " "options de signalement ci-dessus." -#: library/doctest.rst:692 +#: library/doctest.rst:727 +#, fuzzy msgid "" "There is also a way to register new option flag names, though this isn't " -"useful unless you intend to extend :mod:`doctest` internals via subclassing:" +"useful unless you intend to extend :mod:`!doctest` internals via subclassing:" msgstr "" "Il y a aussi une façon d'enregistrer des nouveaux noms d'option, quoique " "ceci n'est pas utile sauf dans le cas où vous devez faire une extension pour " "le code interne de :mod:`doctest` par le biais d'une sous-classe :" -#: library/doctest.rst:698 +#: library/doctest.rst:733 msgid "" "Create a new option flag with a given name, and return the new flag's " -"integer value. :func:`register_optionflag` can be used when subclassing :" -"class:`OutputChecker` or :class:`DocTestRunner` to create new options that " -"are supported by your subclasses. :func:`register_optionflag` should always " -"be called using the following idiom::" +"integer value. :func:`register_optionflag` can be used when " +"subclassing :class:`OutputChecker` or :class:`DocTestRunner` to create new " +"options that are supported by your subclasses. :func:`register_optionflag` " +"should always be called using the following idiom::" msgstr "" "Crée une nouvelle option avec un nom donné, et renvoie la valeur en nombre " "entier de la nouvelle option. La fonction :func:`register_optionflag` peut " -"être utilisée lors de la création de sous-classes à partir de :class:" -"`OutputChecker` ou :class:`DocTestRunner` pour créer de nouvelles options " -"qui sont supportées par vos sous-classes. La fonction :func:" -"`register_optionflag` devrait toujours être appelée par l'expression " -"suivante ::" +"être utilisée lors de la création de sous-classes à partir " +"de :class:`OutputChecker` ou :class:`DocTestRunner` pour créer de nouvelles " +"options qui sont supportées par vos sous-classes. La " +"fonction :func:`register_optionflag` devrait toujours être appelée par " +"l'expression suivante ::" -#: library/doctest.rst:714 +#: library/doctest.rst:749 msgid "Directives" msgstr "Instructions" -#: library/doctest.rst:716 +#: library/doctest.rst:751 msgid "" "Doctest directives may be used to modify the :ref:`option flags ` for an individual example. Doctest directives are special Python " "comments following an example's source code:" msgstr "" -"Les instructions *doctest* peuvent être utilisées afin de modifier les :ref:" -"`options ` pour un exemple individuel. Les instructions " -"*doctest* sont des commentaires Python spéciaux suivant le code source d'un " -"exemple :" +"Les instructions *doctest* peuvent être utilisées afin de modifier " +"les :ref:`options ` pour un exemple individuel. Les " +"instructions *doctest* sont des commentaires Python spéciaux suivant le code " +"source d'un exemple :" -#: library/doctest.rst:727 +#: library/doctest.rst:762 msgid "" "Whitespace is not allowed between the ``+`` or ``-`` and the directive " "option name. The directive option name can be any of the option flag names " @@ -1003,7 +1048,7 @@ msgstr "" "et le nom de l'option d'instruction. Le nom de l'option d'instruction peut " "être n'importe lequel des noms d'options expliqués ci-dessus." -#: library/doctest.rst:731 +#: library/doctest.rst:766 msgid "" "An example's doctest directives modify doctest's behavior for that single " "example. Use ``+`` to enable the named behavior, or ``-`` to disable it." @@ -1012,12 +1057,12 @@ msgstr "" "*doctest* et ce, seulement pour cet exemple. Utilisez ``+`` pour activer le " "comportement nommé, ou ``-`` pour le désactiver." -#: library/doctest.rst:734 +#: library/doctest.rst:769 #, fuzzy msgid "For example, this test passes:" msgstr "Par exemple, ce test réussit :" -#: library/doctest.rst:743 +#: library/doctest.rst:778 #, fuzzy msgid "" "Without the directive it would fail, both because the actual output doesn't " @@ -1031,7 +1076,7 @@ msgstr "" "ligne. Ce test réussit aussi, et nécessite lui aussi une instruction pour ce " "faire :" -#: library/doctest.rst:754 +#: library/doctest.rst:789 #, fuzzy msgid "" "Multiple directives can be used on a single physical line, separated by " @@ -1040,7 +1085,7 @@ msgstr "" "Plusieurs instructions sont utilisées sur une unique ligne physique, " "séparées par des virgules :" -#: library/doctest.rst:763 +#: library/doctest.rst:798 #, fuzzy msgid "" "If multiple directive comments are used for a single example, then they are " @@ -1049,7 +1094,7 @@ msgstr "" "Si plusieurs commentaires d'instructions sont utilisés pour un exemple " "unique, alors ils sont combinés :" -#: library/doctest.rst:773 +#: library/doctest.rst:808 #, fuzzy msgid "" "As the previous example shows, you can add ``...`` lines to your example " @@ -1061,7 +1106,7 @@ msgstr "" "des instructions. Ceci peut être utile lorsqu'un exemple est trop long pour " "qu'une instruction puisse être écrite sur la même ligne :" -#: library/doctest.rst:784 +#: library/doctest.rst:819 msgid "" "Note that since all options are disabled by default, and directives apply " "only to the example they appear in, enabling options (via ``+`` in a " @@ -1079,18 +1124,19 @@ msgstr "" "désactiver une option par l'utilisation de ``-`` dans une instruction peut " "être utile." -#: library/doctest.rst:794 +#: library/doctest.rst:829 msgid "Warnings" msgstr "Avertissements" -#: library/doctest.rst:796 +#: library/doctest.rst:831 +#, fuzzy msgid "" -":mod:`doctest` is serious about requiring exact matches in expected output. " -"If even a single character doesn't match, the test fails. This will " -"probably surprise you a few times, as you learn exactly what Python does and " -"doesn't guarantee about output. For example, when printing a set, Python " -"doesn't guarantee that the element is printed in any particular order, so a " -"test like ::" +":mod:`!doctest` is serious about requiring exact matches in expected " +"output. If even a single character doesn't match, the test fails. This " +"will probably surprise you a few times, as you learn exactly what Python " +"does and doesn't guarantee about output. For example, when printing a set, " +"Python doesn't guarantee that the element is printed in any particular " +"order, so a test like ::" msgstr "" "Le module :mod:`doctest` est rigoureux pour ce qui est d'inclure des " "correspondances exactes dans la sortie attendue. Si un seul caractère ne " @@ -1100,26 +1146,26 @@ msgstr "" "ensemble (set), Python ne garantit pas que les éléments sont affichés dans " "un ordre particulier ; ainsi un test tel que ::" -#: library/doctest.rst:805 +#: library/doctest.rst:840 msgid "is vulnerable! One workaround is to do ::" msgstr "est vulnérable ! Une alternative est de faire ::" -#: library/doctest.rst:810 +#: library/doctest.rst:845 msgid "instead. Another is to do ::" msgstr "à la place. Une autre façon de faire est ::" -#: library/doctest.rst:816 +#: library/doctest.rst:851 msgid "There are others, but you get the idea." msgstr "Il y en a d'autres, mais vous saisissez l'idée." -#: library/doctest.rst:818 +#: library/doctest.rst:853 #, fuzzy msgid "Another bad idea is to print things that embed an object address, like" msgstr "" "Une autre mauvaise idée est d'afficher des choses intégrant l'adresse d'un " "objet, comme ceci ::" -#: library/doctest.rst:828 +#: library/doctest.rst:863 #, fuzzy msgid "" "The :const:`ELLIPSIS` directive gives a nice approach for the last example:" @@ -1127,11 +1173,12 @@ msgstr "" "L'instruction :const:`ELLIPSIS` donne une approche sympathique pour le " "dernier exemple :" -#: library/doctest.rst:836 +#: library/doctest.rst:871 +#, fuzzy msgid "" "Floating-point numbers are also subject to small output variations across " -"platforms, because Python defers to the platform C library for float " -"formatting, and C libraries vary widely in quality here. ::" +"platforms, because Python defers to the platform C library for some floating-" +"point calculations, and C libraries vary widely in quality here. ::" msgstr "" "Les nombres à virgule flottante sont aussi sujets à de petites variations à " "la sortie, tout dépendamment de la plateforme utilisée, étant donné que " @@ -1139,7 +1186,7 @@ msgstr "" "des *floats*, et les bibliothèques C varient grandement pour ce qui de leur " "qualité sur ce point. ::" -#: library/doctest.rst:847 +#: library/doctest.rst:882 #, fuzzy msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " @@ -1149,7 +1196,7 @@ msgstr "" "plateformes, et je restreins souvent les exemples *doctest* à produire des " "nombres ayant cette forme ::" -#: library/doctest.rst:853 +#: library/doctest.rst:888 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." @@ -1157,11 +1204,11 @@ msgstr "" "Les fractions simples sont aussi plus faciles à comprendre, et cela fait une " "meilleure documentation." -#: library/doctest.rst:860 +#: library/doctest.rst:895 msgid "Basic API" msgstr "API de base" -#: library/doctest.rst:862 +#: library/doctest.rst:897 msgid "" "The functions :func:`testmod` and :func:`testfile` provide a simple " "interface to doctest that should be sufficient for most basic uses. For a " @@ -1174,7 +1221,7 @@ msgstr "" "voir les sections :ref:`doctest-simple-testmod` et :ref:`doctest-simple-" "testfile`." -#: library/doctest.rst:870 +#: library/doctest.rst:905 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." @@ -1182,7 +1229,7 @@ msgstr "" "Tous les arguments sauf *filename* sont optionnels, et doivent être précisés " "sous forme lettrée." -#: library/doctest.rst:873 +#: library/doctest.rst:908 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." @@ -1190,7 +1237,7 @@ msgstr "" "Teste les exemples dans le fichier nommé *filename*. Renvoie " "``(failure_count, test_count)``." -#: library/doctest.rst:876 +#: library/doctest.rst:911 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" @@ -1198,7 +1245,7 @@ msgstr "" "L'argument optionnel *module_relative* précise comment le nom de fichier " "doit être interprété :" -#: library/doctest.rst:879 +#: library/doctest.rst:914 msgid "" "If *module_relative* is ``True`` (the default), then *filename* specifies an " "OS-independent module-relative path. By default, this path is relative to " @@ -1216,7 +1263,7 @@ msgstr "" "séparer chaque segment de chemin, et ne peut pas être un chemin absolu " "(c'est-à-dire qu'il ne peut pas commencer par ``/``)." -#: library/doctest.rst:886 +#: library/doctest.rst:921 msgid "" "If *module_relative* is ``False``, then *filename* specifies an OS-specific " "path. The path may be absolute or relative; relative paths are resolved " @@ -1226,7 +1273,7 @@ msgstr "" "chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " "relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:890 +#: library/doctest.rst:925 msgid "" "Optional argument *name* gives the name of the test; by default, or if " "``None``, ``os.path.basename(filename)`` is used." @@ -1234,7 +1281,7 @@ msgstr "" "L'option *name* désigne le nom du test ; par défaut, ou si ``None`` est " "passé en argument, ``os.path.basename(filename)`` est utilisé." -#: library/doctest.rst:893 +#: library/doctest.rst:928 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for a module-" @@ -1249,7 +1296,7 @@ msgstr "" "les noms de fichiers liés au module. C'est une erreur que de spécifier " "*package* si *module_relative* a ``False`` comme valeur." -#: library/doctest.rst:899 +#: library/doctest.rst:934 msgid "" "Optional argument *globs* gives a dict to be used as the globals when " "executing examples. A new shallow copy of this dict is created for the " @@ -1261,7 +1308,7 @@ msgstr "" "le *doctest* ; ainsi, ces exemples commencent avec un état vide. Par défaut, " "ou si ``None`` est passé en argument, un nouveau *dict* vide est utilisé." -#: library/doctest.rst:904 +#: library/doctest.rst:939 msgid "" "Optional argument *extraglobs* gives a dict merged into the globals used to " "execute examples. This works like :meth:`dict.update`: if *globs* and " @@ -1274,28 +1321,30 @@ msgid "" "tested." msgstr "" "L'option *extraglobs* spécifie un *dict* intégré dans les variables globales " -"utilisées pour exécuter l'exemple. Ceci fonctionne comme :meth:`dict." -"update` : si *globs* et *extraglobs* ont une clé commune, la valeur associée " -"à *extraglobs* apparaît dans le *dict* combiné. Par défaut, ou si ``None`` " -"est passé en argument, aucune variable globale supplémentaire est utilisée. " -"Ceci est une fonctionnalité avancée qui permet la configuration des " -"*doctests*. Par exemple, un *doctest* peut être rédigé pour une classe de " -"base, en utilisant un nom générique pour la classe, puis réutilisé afin de " -"tester un nombre indéfini de sous-classes en passant un *dict* *extraglobs* " -"reliant le nom générique à la sous-classe qui doit être testée." - -#: library/doctest.rst:913 +"utilisées pour exécuter l'exemple. Ceci fonctionne " +"comme :meth:`dict.update` : si *globs* et *extraglobs* ont une clé commune, " +"la valeur associée à *extraglobs* apparaît dans le *dict* combiné. Par " +"défaut, ou si ``None`` est passé en argument, aucune variable globale " +"supplémentaire est utilisée. Ceci est une fonctionnalité avancée qui permet " +"la configuration des *doctests*. Par exemple, un *doctest* peut être rédigé " +"pour une classe de base, en utilisant un nom générique pour la classe, puis " +"réutilisé afin de tester un nombre indéfini de sous-classes en passant un " +"*dict* *extraglobs* reliant le nom générique à la sous-classe qui doit être " +"testée." + +#: library/doctest.rst:948 +#, fuzzy msgid "" "Optional argument *verbose* prints lots of stuff if true, and prints only " "failures if false; by default, or if ``None``, it's true if and only if ``'-" -"v'`` is in ``sys.argv``." +"v'`` is in :data:`sys.argv`." msgstr "" "L'option *verbose* affiche une grande quantité d'information si elle est " "vraie, et affiche uniquement les défaillances si elle est fausse ; par " "défaut, ou si ``None``, celle-ci est vraie si et seulement si ``-v`` est " "présent dans ``sys.argv``." -#: library/doctest.rst:917 +#: library/doctest.rst:952 msgid "" "Optional argument *report* prints a summary at the end when true, else " "prints nothing at the end. In verbose mode, the summary is detailed, else " @@ -1305,16 +1354,18 @@ msgstr "" "n'est affiché à la fin. En mode *verbose*, le résumé est détaillé, sinon le " "résumé est très bref (en fait, vide si tous les tests ont réussi)." -#: library/doctest.rst:921 +#: library/doctest.rst:956 +#, fuzzy msgid "" -"Optional argument *optionflags* (default value 0) takes the :ref:`bitwise OR " -"` of option flags. See section :ref:`doctest-options`." +"Optional argument *optionflags* (default value ``0``) takes " +"the :ref:`bitwise OR ` of option flags. See section :ref:`doctest-" +"options`." msgstr "" "L'option *optionflags* (dont la valeur par défaut est de zéro) calcule la " "valeur :ref:`bitwise OR ` des options de ligne de commande. Voir la " "section :ref:`doctest-options`." -#: library/doctest.rst:925 +#: library/doctest.rst:960 msgid "" "Optional argument *raise_on_error* defaults to false. If true, an exception " "is raised upon the first failure or unexpected exception in an example. " @@ -1327,18 +1378,18 @@ msgstr "" "lors d'un post-mortem. Le comportement par défaut est de poursuivre " "l'exécution des exemples." -#: library/doctest.rst:1072 +#: library/doctest.rst:1111 msgid "" "Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) " "that should be used to extract tests from the files. It defaults to a " "normal parser (i.e., ``DocTestParser()``)." msgstr "" -"L'option *parser* définit une classe ou une sous-classe :class:" -"`DocTestParser` qui doit être utilisée pour extraire les tests des fichiers. " -"Par défaut, on utilise un analyseur normal (c'est-à-dire, " +"L'option *parser* définit une classe ou une sous-" +"classe :class:`DocTestParser` qui doit être utilisée pour extraire les tests " +"des fichiers. Par défaut, on utilise un analyseur normal (c'est-à-dire, " "``DocTestParser()``)." -#: library/doctest.rst:1076 +#: library/doctest.rst:1115 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." @@ -1346,7 +1397,7 @@ msgstr "" "L'option *encoding* définit un encodage à utiliser pour convertir le fichier " "en format *unicode*." -#: library/doctest.rst:940 +#: library/doctest.rst:975 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." @@ -1354,7 +1405,7 @@ msgstr "" "Toutes les options sont facultatives, et toutes sauf *m* doivent être " "définies en format lettré." -#: library/doctest.rst:943 +#: library/doctest.rst:978 msgid "" "Test examples in docstrings in functions and classes reachable from module " "*m* (or module :mod:`__main__` if *m* is not supplied or is ``None``), " @@ -1364,71 +1415,73 @@ msgstr "" "accessibles depuis le module *m* (ou depuis le module :mod:`__main__` si *m* " "n'a pas été défini ou est ``None``), en commençant par ``m.__doc__``." -#: library/doctest.rst:947 +#: library/doctest.rst:982 #, fuzzy msgid "" -"Also test examples reachable from dict ``m.__test__``, if it exists. ``m." -"__test__`` maps names (strings) to functions, classes and strings; function " -"and class docstrings are searched for examples; strings are searched " -"directly, as if they were docstrings." +"Also test examples reachable from dict ``m.__test__``, if it exists. " +"``m.__test__`` maps names (strings) to functions, classes and strings; " +"function and class docstrings are searched for examples; strings are " +"searched directly, as if they were docstrings." msgstr "" "Ceci teste aussi les exemples accessibles depuis le *dict* ``m.__test__``, " -"si et seulement s'il existe et qu'il n'est pas ``None``. Le *dict* ``m." -"__test__`` associe des noms (chaînes de caractères) à des fonctions, des " +"si et seulement s'il existe et qu'il n'est pas ``None``. Le *dict* " +"``m.__test__`` associe des noms (chaînes de caractères) à des fonctions, des " "classes et des chaînes de caractères ; les *docstrings* de fonctions et de " "classes sont fouillées pour des exemples ; les chaînes de caractères sont " "fouillées directement, comme si elles étaient des *docstrings*." -#: library/doctest.rst:952 +#: library/doctest.rst:987 msgid "" "Only docstrings attached to objects belonging to module *m* are searched." msgstr "" "Seulement les *docstrings* attribuées à des objets appartenant au module *m* " "sont fouillées." -#: library/doctest.rst:954 +#: library/doctest.rst:989 msgid "Return ``(failure_count, test_count)``." msgstr "Renvoie ``(failure_count, test_count)``." -#: library/doctest.rst:956 +#: library/doctest.rst:991 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." msgstr "" -"L'option *name* donne le nom du module ; par défaut, ou si ``None``, ``m." -"__name__`` est utilisé." +"L'option *name* donne le nom du module ; par défaut, ou si ``None``, " +"``m.__name__`` est utilisé." -#: library/doctest.rst:959 +#: library/doctest.rst:994 #, fuzzy msgid "" "Optional argument *exclude_empty* defaults to false. If true, objects for " "which no doctests are found are excluded from consideration. The default is " -"a backward compatibility hack, so that code still using :meth:`doctest." -"master.summarize ` in conjunction with :func:" -"`testmod` continues to get output for objects with no tests. The " -"*exclude_empty* argument to the newer :class:`DocTestFinder` constructor " -"defaults to true." +"a backward compatibility hack, so that code still " +"using :meth:`doctest.master.summarize ` in " +"conjunction with :func:`testmod` continues to get output for objects with no " +"tests. The *exclude_empty* argument to the newer :class:`DocTestFinder` " +"constructor defaults to true." msgstr "" "L'option *exclude_empty* prend la valeur faux par défaut. Si la valeur est " "vraie, les objets pour lesquels aucun *doctest* n'est trouvé ne sont pas " "pris en compte. Le défaut est un bricolage permettant la compatibilité à " -"rebours, de façon à ce que le code qui utilise toujours :meth:`doctest." -"master.summarize` en conjonction avec :func:`testmod` puisse continuer " -"d'obtenir des sorties pour les objets n'ayant aucun test. L'option " -"*exclude_empty* dans le constructeur de la classe plus récente :class:" -"`DocTestFinder` prend vrai comme valeur par défaut." +"rebours, de façon à ce que le code qui utilise " +"toujours :meth:`doctest.master.summarize` en conjonction " +"avec :func:`testmod` puisse continuer d'obtenir des sorties pour les objets " +"n'ayant aucun test. L'option *exclude_empty* dans le constructeur de la " +"classe plus récente :class:`DocTestFinder` prend vrai comme valeur par " +"défaut." -#: library/doctest.rst:967 +#: library/doctest.rst:1002 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " "above, except that *globs* defaults to ``m.__dict__``." msgstr "" "Les options *extraglobs*, *verbose*, *report*, *optionflags*, " -"*raise_on_error*, et *globs* sont les mêmes que pour la fonction :func:" -"`testfile` ci-dessus, sauf pour *globs*, qui est ``m.__dict__`` par défaut." +"*raise_on_error*, et *globs* sont les mêmes que pour la " +"fonction :func:`testfile` ci-dessus, sauf pour *globs*, qui est " +"``m.__dict__`` par défaut." -#: library/doctest.rst:974 +#: library/doctest.rst:1009 msgid "" "Test examples associated with object *f*; for example, *f* may be a string, " "a module, a function, or a class object." @@ -1436,7 +1489,7 @@ msgstr "" "Les exemples de test associés à l'objet *f* ; par exemple, *f* peut être une " "chaîne de caractères, un module, une fonction, ou un objet de classe." -#: library/doctest.rst:977 +#: library/doctest.rst:1012 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." @@ -1444,7 +1497,7 @@ msgstr "" "Une copie superficielle de l'argument-dictionnaire *globs* est utilisée pour " "le contexte d'exécution." -#: library/doctest.rst:979 +#: library/doctest.rst:1014 msgid "" "Optional argument *name* is used in failure messages, and defaults to " "``\"NoName\"``." @@ -1452,7 +1505,7 @@ msgstr "" "L'option *name* est utilisée pour les messages d'échec, et prend " "``\"NoName\"`` comme valeur par défaut." -#: library/doctest.rst:982 +#: library/doctest.rst:1017 msgid "" "If optional argument *verbose* is true, output is generated even if there " "are no failures. By default, output is generated only in case of an example " @@ -1462,7 +1515,7 @@ msgstr "" "aucun échec. Par défaut, la sortie est générée seulement si un exemple " "échoue." -#: library/doctest.rst:985 +#: library/doctest.rst:1020 msgid "" "Optional argument *compileflags* gives the set of flags that should be used " "by the Python compiler when running the examples. By default, or if " @@ -1474,22 +1527,22 @@ msgstr "" "``None``, les options sont inférées à partir de l'ensemble des " "fonctionnalités futures trouvées dans *globs*." -#: library/doctest.rst:989 +#: library/doctest.rst:1024 msgid "" "Optional argument *optionflags* works as for function :func:`testfile` above." msgstr "" -"L'option *optionflags* fonctionne similairement à la fonction :func:" -"`testfile` ci-dessus." +"L'option *optionflags* fonctionne similairement à la " +"fonction :func:`testfile` ci-dessus." -#: library/doctest.rst:995 +#: library/doctest.rst:1030 msgid "Unittest API" msgstr "API de tests unitaires" -#: library/doctest.rst:997 +#: library/doctest.rst:1032 #, fuzzy msgid "" "As your collection of doctest'ed modules grows, you'll want a way to run all " -"their doctests systematically. :mod:`doctest` provides two functions that " +"their doctests systematically. :mod:`!doctest` provides two functions that " "can be used to create :mod:`unittest` test suites from modules and text " "files containing doctests. To integrate with :mod:`unittest` test " "discovery, include a :ref:`load_tests ` function in " @@ -1500,56 +1553,57 @@ msgstr "" "systématiquement tous les *doctests*. Le module :mod:`doctest` fournit deux " "fonctions qui peuvent être utilisées afin de créer des suites de tests " "unitaires :mod:`unittest` à partir des modules et des fichiers textes " -"contenant des *doctests*. Afin d'intégrer la découverte fournie par :mod:" -"`unittest`, il suffit d'ajouter une fonction :func:`load_tests` dans votre " -"module de test ::" +"contenant des *doctests*. Afin d'intégrer la découverte fournie " +"par :mod:`unittest`, il suffit d'ajouter une fonction :func:`load_tests` " +"dans votre module de test ::" -#: library/doctest.rst:1011 +#: library/doctest.rst:1046 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" msgstr "" -"Il y a deux fonctions principales pour créer des instances de la classe :" -"class:`unittest.TestSuite` à partir de fichiers textes et de modules ayant " -"des *doctests* :" +"Il y a deux fonctions principales pour créer des instances de la " +"classe :class:`unittest.TestSuite` à partir de fichiers textes et de modules " +"ayant des *doctests* :" -#: library/doctest.rst:1017 +#: library/doctest.rst:1052 msgid "" -"Convert doctest tests from one or more text files to a :class:`unittest." -"TestSuite`." +"Convert doctest tests from one or more text files to " +"a :class:`unittest.TestSuite`." msgstr "" "Convertit des tests *doctest* à partir d'un ou plusieurs fichiers vers une " "classe :class:`unittest.TestSuite`." -#: library/doctest.rst:1020 +#: library/doctest.rst:1055 #, fuzzy msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " -"framework and runs the interactive examples in each file. If an example in " -"any file fails, then the synthesized unit test fails, and a :exc:" -"`failureException` exception is raised showing the name of the file " -"containing the test and a (sometimes approximate) line number. If all the " -"examples in a file are skipped, then the synthesized unit test is also " -"marked as skipped." +"framework and runs the interactive examples in each file. Each file is run " +"as a separate unit test, and each example in a file is run as " +"a :ref:`subtest `. If any example in a file fails, then the " +"synthesized unit test fails. The traceback for failure or error contains the " +"name of the file containing the test and a (sometimes approximate) line " +"number. If all the examples in a file are skipped, then the synthesized unit " +"test is also marked as skipped." msgstr "" "La classe renvoyée :class:`unittest.TestSuite` doit être exécutée dans le " "cadriciel de tests unitaires et exécute les exemples interactifs trouvés " "dans chaque fichier. Si un exemple de n'importe quel fichier échoue, alors " -"le test unitaire de synthèse échoue aussi, et une exception :exc:" -"`failureException` est levée, affichant le nom du fichier contenant le test " -"et un numéro de ligne (celui-ci est parfois approximatif)." +"le test unitaire de synthèse échoue aussi, et une " +"exception :exc:`failureException` est levée, affichant le nom du fichier " +"contenant le test et un numéro de ligne (celui-ci est parfois approximatif)." -#: library/doctest.rst:1027 +#: library/doctest.rst:1065 msgid "Pass one or more paths (as strings) to text files to be examined." msgstr "" "Passe un ou plusieurs chemins (sous forme de chaînes de caractères) à des " "fichiers textes afin d'être vérifiés." -#: library/doctest.rst:1029 +#: library/doctest.rst:1067 msgid "Options may be provided as keyword arguments:" msgstr "Les options peuvent être fournies comme des options lettrées :" -#: library/doctest.rst:1031 +#: library/doctest.rst:1069 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" @@ -1557,7 +1611,7 @@ msgstr "" "L'option *module_relative* précise comment les noms de fichiers dans *paths* " "doivent être interprétés :" -#: library/doctest.rst:1034 +#: library/doctest.rst:1072 msgid "" "If *module_relative* is ``True`` (the default), then each filename in " "*paths* specifies an OS-independent module-relative path. By default, this " @@ -1576,7 +1630,7 @@ msgstr "" "caractères ``/`` afin de séparer les segments de chemin, et ne peut pas être " "un chemin absolu (c'est-à-dire, il ne peut pas commencer par ``/``)." -#: library/doctest.rst:1042 +#: library/doctest.rst:1080 msgid "" "If *module_relative* is ``False``, then each filename in *paths* specifies " "an OS-specific path. The path may be absolute or relative; relative paths " @@ -1586,7 +1640,7 @@ msgstr "" "chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " "relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:1046 +#: library/doctest.rst:1084 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for module-" @@ -1603,12 +1657,13 @@ msgstr "" "erreur que de spécifier *package* si *module_relative* a ``False`` comme " "valeur." -#: library/doctest.rst:1053 +#: library/doctest.rst:1091 +#, fuzzy msgid "" "Optional argument *setUp* specifies a set-up function for the test suite. " "This is called before running the tests in each file. The *setUp* function " -"will be passed a :class:`DocTest` object. The setUp function can access the " -"test globals as the *globs* attribute of the test passed." +"will be passed a :class:`DocTest` object. The *setUp* function can access " +"the test globals as the :attr:`~DocTest.globs` attribute of the test passed." msgstr "" "L'option *setUp* précise une fonction de mise-en-place pour la suite de " "tests. Ceci est appelé avant l'exécution des tests dans chaque fichier. La " @@ -1616,12 +1671,14 @@ msgstr "" "peut accéder aux valeurs globales du test par le biais de l'attribut *globs* " "du test passé." -#: library/doctest.rst:1058 +#: library/doctest.rst:1096 +#, fuzzy msgid "" "Optional argument *tearDown* specifies a tear-down function for the test " "suite. This is called after running the tests in each file. The *tearDown* " -"function will be passed a :class:`DocTest` object. The setUp function can " -"access the test globals as the *globs* attribute of the test passed." +"function will be passed a :class:`DocTest` object. The *tearDown* function " +"can access the test globals as the :attr:`~DocTest.globs` attribute of the " +"test passed." msgstr "" "L'option *tearDown* précise une fonction de démolition pour la suite de " "tests. Celle-ci est appelée après avoir exécuté les tests dans chaque " @@ -1629,7 +1686,7 @@ msgstr "" "fonction *setUp* peut accéder aux valeurs globales du test par l'attribut " "*globs* du test passé." -#: library/doctest.rst:1098 +#: library/doctest.rst:1102 msgid "" "Optional argument *globs* is a dictionary containing the initial global " "variables for the tests. A new copy of this dictionary is created for each " @@ -1639,20 +1696,21 @@ msgstr "" "initiales pour les tests. Une nouvelle copie de ce dictionnaire est créée " "pour chaque test. Par défaut, *globs* est un nouveau dictionnaire vide." -#: library/doctest.rst:1067 +#: library/doctest.rst:1106 msgid "" "Optional argument *optionflags* specifies the default doctest options for " -"the tests, created by or-ing together individual option flags. See section :" -"ref:`doctest-options`. See function :func:`set_unittest_reportflags` below " -"for a better way to set reporting options." +"the tests, created by or-ing together individual option flags. See " +"section :ref:`doctest-options`. See " +"function :func:`set_unittest_reportflags` below for a better way to set " +"reporting options." msgstr "" "Les options *optionflags* précisent les options par défaut de *doctest* pour " "les tests, créées en composant par un OU les différentes options " -"individuelles. Voir la section :ref:`doctest-options`. Voir la fonction :" -"func:`set_unittest_reportflags` ci-dessous pour une meilleure façon de " -"préciser des options de rapport." +"individuelles. Voir la section :ref:`doctest-options`. Voir la " +"fonction :func:`set_unittest_reportflags` ci-dessous pour une meilleure " +"façon de préciser des options de rapport." -#: library/doctest.rst:1079 +#: library/doctest.rst:1118 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." @@ -1661,21 +1719,27 @@ msgstr "" "les *doctests*, ceux-ci étant téléchargés d'un fichier texte utilisant la " "fonction :func:`DocFileSuite`." -#: library/doctest.rst:1085 +#: library/doctest.rst:1162 +msgid "Run each example as a :ref:`subtest `." +msgstr "" + +#: library/doctest.rst:1127 msgid "Convert doctest tests for a module to a :class:`unittest.TestSuite`." msgstr "" -"Convertit les tests *doctest* pour un module donné à une classe :class:" -"`unittest.TestSuite`." +"Convertit les tests *doctest* pour un module donné à une " +"classe :class:`unittest.TestSuite`." -#: library/doctest.rst:1087 +#: library/doctest.rst:1129 #, fuzzy msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " -"framework and runs each doctest in the module. If any of the doctests fail, " -"then the synthesized unit test fails, and a :exc:`failureException` " -"exception is raised showing the name of the file containing the test and a " -"(sometimes approximate) line number. If all the examples in a docstring are " -"skipped, then the synthesized unit test is also marked as skipped." +"framework and runs each doctest in the module. Each docstring is run as a " +"separate unit test, and each example in a docstring is run as " +"a :ref:`subtest `. If any of the doctests fail, then the " +"synthesized unit test fails. The traceback for failure or error contains the " +"name of the file containing the test and a (sometimes approximate) line " +"number. If all the examples in a docstring are skipped, then the synthesized " +"unit test is also marked as skipped." msgstr "" "La classe renvoyée :class:`unittest.TestSuite` doit être exécutée par le " "cadriciel de test unitaire, afin d'exécuter chaque *doctest* dans le module. " @@ -1684,7 +1748,7 @@ msgstr "" "affichant le nom du fichier contenant le test et un numéro de ligne pouvant " "être approximatif." -#: library/doctest.rst:1094 +#: library/doctest.rst:1139 msgid "" "Optional argument *module* provides the module to be tested. It can be a " "module object or a (possibly dotted) module name. If not specified, the " @@ -1694,7 +1758,18 @@ msgstr "" "d'un objet-module ou celle du nom d'un module (possiblement *dotted*). Si " "non-précisée, le module appelant cette fonction est utilisé." -#: library/doctest.rst:1102 +#: library/doctest.rst:1143 +#, fuzzy +msgid "" +"Optional argument *globs* is a dictionary containing the initial global " +"variables for the tests. A new copy of this dictionary is created for each " +"test. By default, *globs* is the module's :attr:`~module.__dict__`." +msgstr "" +"L'option *globs* est un dictionnaire contenant les variables globales " +"initiales pour les tests. Une nouvelle copie de ce dictionnaire est créée " +"pour chaque test. Par défaut, *globs* est un nouveau dictionnaire vide." + +#: library/doctest.rst:1147 msgid "" "Optional argument *extraglobs* specifies an extra set of global variables, " "which is merged into *globs*. By default, no extra globals are used." @@ -1703,7 +1778,7 @@ msgstr "" "globales, à fusionner avec *globs*. Par défaut, aucune variable globale " "supplémentaire est utilisée." -#: library/doctest.rst:1105 +#: library/doctest.rst:1150 msgid "" "Optional argument *test_finder* is the :class:`DocTestFinder` object (or a " "drop-in replacement) that is used to extract doctests from the module." @@ -1712,44 +1787,31 @@ msgstr "" "remplacement *drop-in*) qui est utilisée pour extraire les *doctests* à " "partir du module." -#: library/doctest.rst:1108 +#: library/doctest.rst:1153 +#, fuzzy msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " -"for function :func:`DocFileSuite` above." +"for function :func:`DocFileSuite` above, but they are called for each " +"docstring." msgstr "" "Les options *setUp*, *tearDown* et *optionflags* sont les mêmes que pour la " "fonction :func:`DocFileSuite` ci-dessus." -#: library/doctest.rst:1111 +#: library/doctest.rst:1156 msgid "This function uses the same search technique as :func:`testmod`." msgstr "" "Cette fonction utilise la même technique de recherche que :func:`testmod`." -#: library/doctest.rst:1113 +#: library/doctest.rst:1158 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." msgstr "" -"La fonction :func:`DocTestSuite` renvoie une instance vide de la classe :" -"class:`unittest.TestSuite` si *module* ne contient aucune *docstring*, et " -"ce, au lieu de lever l'exception :exc:`ValueError`." - -#: library/doctest.rst:1119 -#, fuzzy -msgid "" -"When doctests which have been converted to unit tests by :func:" -"`DocFileSuite` or :func:`DocTestSuite` fail, this exception is raised " -"showing the name of the file containing the test and a (sometimes " -"approximate) line number." -msgstr "" -"La classe renvoyée :class:`unittest.TestSuite` doit être exécutée par le " -"cadriciel de test unitaire, afin d'exécuter chaque *doctest* dans le module. " -"Si n'importe lequel des *doctests* échoue, alors le test unitaire de " -"synthèse échoue, et une exception :exc:`failureException` est levée, " -"affichant le nom du fichier contenant le test et un numéro de ligne pouvant " -"être approximatif." +"La fonction :func:`DocTestSuite` renvoie une instance vide de la " +"classe :class:`unittest.TestSuite` si *module* ne contient aucune " +"*docstring*, et ce, au lieu de lever l'exception :exc:`ValueError`." -#: library/doctest.rst:1123 +#: library/doctest.rst:1165 #, fuzzy msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " @@ -1758,65 +1820,70 @@ msgid "" "documented here (it's an internal detail), but studying its code can answer " "questions about the exact details of :mod:`unittest` integration." msgstr "" -"Sous le capot, :func:`DocTestSuite` crée une classe :class:`unittest." -"TestSuite` à partir d'instances de :class:`doctest.DocTestCase` ; de plus, :" -"class:`DocTestCase` est une sous-classe de :class:`unittest.TestCase`. La " -"classe :class:`DocTestCase` n'est pas documentée ici (c'est un détail " -"interne), mais l'étude de son code peut répondre à des questions concernant " -"les détails exacts de l'intégration du module :mod:`doctest`." +"Sous le capot, :func:`DocTestSuite` crée une " +"classe :class:`unittest.TestSuite` à partir d'instances " +"de :class:`doctest.DocTestCase` ; de plus, :class:`DocTestCase` est une sous-" +"classe de :class:`unittest.TestCase`. La classe :class:`DocTestCase` n'est " +"pas documentée ici (c'est un détail interne), mais l'étude de son code peut " +"répondre à des questions concernant les détails exacts de l'intégration du " +"module :mod:`doctest`." -#: library/doctest.rst:1129 +#: library/doctest.rst:1171 #, fuzzy msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`!doctest.DocFileCase` instances, and :class:`!DocFileCase` is a " "subclass of :class:`!DocTestCase`." msgstr "" -"De la même façon, :func:`DocFileSuite` crée une classe :class:`unittest." -"TestSuite` à partir des instances :class:`doctest.DocFileCase`, où :class:" -"`DocFileCase` est une sous-classe de :class:`DocTestCase`." +"De la même façon, :func:`DocFileSuite` crée une " +"classe :class:`unittest.TestSuite` à partir des " +"instances :class:`doctest.DocFileCase`, où :class:`DocFileCase` est une sous-" +"classe de :class:`DocTestCase`." -#: library/doctest.rst:1133 +#: library/doctest.rst:1175 #, fuzzy msgid "" -"So both ways of creating a :class:`unittest.TestSuite` run instances of :" -"class:`!DocTestCase`. This is important for a subtle reason: when you run :" -"mod:`doctest` functions yourself, you can control the :mod:`doctest` options " -"in use directly, by passing option flags to :mod:`doctest` functions. " -"However, if you're writing a :mod:`unittest` framework, :mod:`unittest` " -"ultimately controls when and how tests get run. The framework author " -"typically wants to control :mod:`doctest` reporting options (perhaps, e.g., " -"specified by command line options), but there's no way to pass options " -"through :mod:`unittest` to :mod:`doctest` test runners." +"So both ways of creating a :class:`unittest.TestSuite` run instances " +"of :class:`!DocTestCase`. This is important for a subtle reason: when you " +"run :mod:`!doctest` functions yourself, you can control the :mod:`!doctest` " +"options in use directly, by passing option flags to :mod:`!doctest` " +"functions. However, if you're writing a :mod:`unittest` framework, :mod:`!" +"unittest` ultimately controls when and how tests get run. The framework " +"author typically wants to control :mod:`!doctest` reporting options " +"(perhaps, e.g., specified by command line options), but there's no way to " +"pass options through :mod:`!unittest` to :mod:`!doctest` test runners." msgstr "" "Ainsi, les deux façons de créer une :class:`unittest.TestSuite` utilisent " "des instances de la classe :class:`DocTestCase`. Ceci est important pour une " -"raison subtile : lorsque vous exécutez par vous-même des fonctions :mod:" -"`doctest`, vous pouvez contrôler les options :mod:`doctest` qui sont " -"utilisées de façon directe, en passant des options aux fonctions :mod:" -"`doctest`. Toutefois, si vous écrivez un cadriciel :mod:`unittest`, alors :" -"mod:`unittest` a le contrôle final de quand et de comment les tests sont " -"exécutés. La personne qui écrit le cadriciel souhaite habituellement " -"contrôler les options de rapport de :mod:`doctest` (qui sont peut-être, par " -"exemple, spécifiées en options de ligne de commande), sauf qu'il n'y a pas " -"de moyen de spécifier des options à l'attention des exécuteurs de test de :" -"mod:`doctest` à partir de :mod:`unittest`." +"raison subtile : lorsque vous exécutez par vous-même des " +"fonctions :mod:`doctest`, vous pouvez contrôler les options :mod:`doctest` " +"qui sont utilisées de façon directe, en passant des options aux " +"fonctions :mod:`doctest`. Toutefois, si vous écrivez un " +"cadriciel :mod:`unittest`, alors :mod:`unittest` a le contrôle final de " +"quand et de comment les tests sont exécutés. La personne qui écrit le " +"cadriciel souhaite habituellement contrôler les options de rapport " +"de :mod:`doctest` (qui sont peut-être, par exemple, spécifiées en options de " +"ligne de commande), sauf qu'il n'y a pas de moyen de spécifier des options à " +"l'attention des exécuteurs de test de :mod:`doctest` à partir " +"de :mod:`unittest`." -#: library/doctest.rst:1143 +#: library/doctest.rst:1185 +#, fuzzy msgid "" -"For this reason, :mod:`doctest` also supports a notion of :mod:`doctest` " +"For this reason, :mod:`!doctest` also supports a notion of :mod:`!doctest` " "reporting flags specific to :mod:`unittest` support, via this function:" msgstr "" "Pour cette raison, :mod:`doctest` implémente le concept d'options de rapport " "de :mod:`doctest` qui soit spécifique à :mod:`unittest`, par le biais de " "cette fonction :" -#: library/doctest.rst:1149 -msgid "Set the :mod:`doctest` reporting flags to use." +#: library/doctest.rst:1191 +#, fuzzy +msgid "Set the :mod:`!doctest` reporting flags to use." msgstr "" "Voir les options de ligne de commandes de :mod:`doctest` pour l'utilisation." -#: library/doctest.rst:1151 +#: library/doctest.rst:1193 msgid "" "Argument *flags* takes the :ref:`bitwise OR ` of option flags. See " "section :ref:`doctest-options`. Only \"reporting flags\" can be used." @@ -1825,34 +1892,35 @@ msgstr "" "arguments. Voir la section :ref:`doctest-options`. Ce sont uniquement les " "\"options de rapport\" qui peuvent être utilisées." -#: library/doctest.rst:1154 +#: library/doctest.rst:1196 #, fuzzy msgid "" "This is a module-global setting, and affects all future doctests run by " "module :mod:`unittest`: the :meth:`!runTest` method of :class:`!" -"DocTestCase` looks at the option flags specified for the test case when the :" -"class:`!DocTestCase` instance was constructed. If no reporting flags were " -"specified (which is the typical and expected case), :mod:`!doctest`'s :mod:" -"`unittest` reporting flags are :ref:`bitwise ORed ` into the option " -"flags, and the option flags so augmented are passed to the :class:" -"`DocTestRunner` instance created to run the doctest. If any reporting flags " -"were specified when the :class:`!DocTestCase` instance was constructed, :mod:" -"`!doctest`'s :mod:`unittest` reporting flags are ignored." +"DocTestCase` looks at the option flags specified for the test case when " +"the :class:`!DocTestCase` instance was constructed. If no reporting flags " +"were specified (which is the typical and expected case), :mod:`!" +"doctest`'s :mod:`!unittest` reporting flags are :ref:`bitwise ORed " +"` into the option flags, and the option flags so augmented are " +"passed to the :class:`DocTestRunner` instance created to run the doctest. " +"If any reporting flags were specified when the :class:`!DocTestCase` " +"instance was constructed, :mod:`!doctest`'s :mod:`!unittest` reporting flags " +"are ignored." msgstr "" "Ceci est un paramètre au niveau global du module, et affecte tous les futurs " -"*doctests* exécutés par le module :mod:`unittest` : la méthode :meth:" -"`runTest` de :class:`DocTestCase` prend en compte les options précisées pour " -"le cas de test lorsque l'instance de la classe :class:`DocTestCase` a été " -"construite. Si aucune option de rapport n'a été précisée (ce qui est le cas " -"typique et attendu), les options de rapport du module :mod:`unitest` de :mod:" -"`doctest` sont :ref:`` vers les options, et " -"les options obtenues sont passées à l'instance de la classe :class:" -"`DocTestRunner` créée pour exécuter le *doctest*. Si une seule option de " -"rapport a été précisée lorsque l'instance de :class:`DocTestCase` a été " -"construite, les options de rapport du module :mod:`unittest` de :mod:" -"`doctest` sont ignorées." - -#: library/doctest.rst:1165 +"*doctests* exécutés par le module :mod:`unittest` : la " +"méthode :meth:`runTest` de :class:`DocTestCase` prend en compte les options " +"précisées pour le cas de test lorsque l'instance de la " +"classe :class:`DocTestCase` a été construite. Si aucune option de rapport " +"n'a été précisée (ce qui est le cas typique et attendu), les options de " +"rapport du module :mod:`unitest` de :mod:`doctest` sont :ref:`` vers les options, et les options obtenues sont passées à " +"l'instance de la classe :class:`DocTestRunner` créée pour exécuter le " +"*doctest*. Si une seule option de rapport a été précisée lorsque l'instance " +"de :class:`DocTestCase` a été construite, les options de rapport du " +"module :mod:`unittest` de :mod:`doctest` sont ignorées." + +#: library/doctest.rst:1207 msgid "" "The value of the :mod:`unittest` reporting flags in effect before the " "function was called is returned by the function." @@ -1860,11 +1928,11 @@ msgstr "" "La valeur prise par les options de rapport de :mod:`unittest` et ce, avant " "que la fonction n'ait été appelée, est renvoyée par la fonction." -#: library/doctest.rst:1172 +#: library/doctest.rst:1214 msgid "Advanced API" msgstr "API avancé" -#: library/doctest.rst:1174 +#: library/doctest.rst:1216 msgid "" "The basic API is a simple wrapper that's intended to make doctest easy to " "use. It is fairly flexible, and should meet most users' needs; however, if " @@ -1872,13 +1940,13 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: library/doctest.rst:1179 +#: library/doctest.rst:1221 msgid "" "The advanced API revolves around two container classes, which are used to " "store the interactive examples extracted from doctest cases:" msgstr "" -#: library/doctest.rst:1182 +#: library/doctest.rst:1224 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." @@ -1886,7 +1954,7 @@ msgstr "" ":class:`Example` : Un unique :term:`statement` Python, pris conjointement " "avec sa sortie attendue." -#: library/doctest.rst:1185 +#: library/doctest.rst:1227 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." @@ -1894,55 +1962,55 @@ msgstr "" ":class:`DocTest` : Une collection de :class:`Example`, habituellement " "extraits d'une seule *docstring* ou fichier texte." -#: library/doctest.rst:1188 +#: library/doctest.rst:1230 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: library/doctest.rst:1191 +#: library/doctest.rst:1233 msgid "" -":class:`DocTestFinder`: Finds all docstrings in a given module, and uses a :" -"class:`DocTestParser` to create a :class:`DocTest` from every docstring that " -"contains interactive examples." +":class:`DocTestFinder`: Finds all docstrings in a given module, and uses " +"a :class:`DocTestParser` to create a :class:`DocTest` from every docstring " +"that contains interactive examples." msgstr "" -#: library/doctest.rst:1195 +#: library/doctest.rst:1237 msgid "" ":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " "(such as an object's docstring)." msgstr "" -#: library/doctest.rst:1198 +#: library/doctest.rst:1240 msgid "" ":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " "uses an :class:`OutputChecker` to verify their output." msgstr "" -#: library/doctest.rst:1201 +#: library/doctest.rst:1243 msgid "" ":class:`OutputChecker`: Compares the actual output from a doctest example " "with the expected output, and decides whether they match." msgstr "" -#: library/doctest.rst:1204 +#: library/doctest.rst:1246 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: library/doctest.rst:1220 +#: library/doctest.rst:1262 msgid "DocTest Objects" msgstr "Objets *doctest*" -#: library/doctest.rst:1225 +#: library/doctest.rst:1267 msgid "" "A collection of doctest examples that should be run in a single namespace. " "The constructor arguments are used to initialize the attributes of the same " "names." msgstr "" -#: library/doctest.rst:1229 +#: library/doctest.rst:1271 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." @@ -1950,71 +2018,71 @@ msgstr "" ":class:`DocTest` définit les attributs suivants. Ils sont initialisés par le " "constructeur, et ne doivent pas être modifiés directement." -#: library/doctest.rst:1235 +#: library/doctest.rst:1277 msgid "" "A list of :class:`Example` objects encoding the individual interactive " "Python examples that should be run by this test." msgstr "" -#: library/doctest.rst:1241 +#: library/doctest.rst:1283 msgid "" "The namespace (aka globals) that the examples should be run in. This is a " "dictionary mapping names to values. Any changes to the namespace made by " -"the examples (such as binding new variables) will be reflected in :attr:" -"`globs` after the test is run." +"the examples (such as binding new variables) will be reflected " +"in :attr:`globs` after the test is run." msgstr "" -#: library/doctest.rst:1249 +#: library/doctest.rst:1291 msgid "" "A string name identifying the :class:`DocTest`. Typically, this is the name " "of the object or file that the test was extracted from." msgstr "" -#: library/doctest.rst:1255 +#: library/doctest.rst:1297 msgid "" "The name of the file that this :class:`DocTest` was extracted from; or " -"``None`` if the filename is unknown, or if the :class:`DocTest` was not " +"``None`` if the filename is unknown, or if the :class:`!DocTest` was not " "extracted from a file." msgstr "" -#: library/doctest.rst:1262 +#: library/doctest.rst:1304 msgid "" "The line number within :attr:`filename` where this :class:`DocTest` begins, " "or ``None`` if the line number is unavailable. This line number is zero-" "based with respect to the beginning of the file." msgstr "" -#: library/doctest.rst:1269 +#: library/doctest.rst:1311 msgid "" "The string that the test was extracted from, or ``None`` if the string is " "unavailable, or if the test was not extracted from a string." msgstr "" -#: library/doctest.rst:1276 +#: library/doctest.rst:1318 msgid "Example Objects" msgstr "Exemples d'objets" -#: library/doctest.rst:1281 +#: library/doctest.rst:1323 msgid "" "A single interactive example, consisting of a Python statement and its " "expected output. The constructor arguments are used to initialize the " "attributes of the same names." msgstr "" -#: library/doctest.rst:1286 +#: library/doctest.rst:1328 msgid "" ":class:`Example` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: library/doctest.rst:1292 +#: library/doctest.rst:1334 msgid "" "A string containing the example's source code. This source code consists of " "a single Python statement, and always ends with a newline; the constructor " "adds a newline when necessary." msgstr "" -#: library/doctest.rst:1299 +#: library/doctest.rst:1341 msgid "" "The expected output from running the example's source code (either from " "stdout, or a traceback in case of exception). :attr:`want` ends with a " @@ -2022,29 +2090,29 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: library/doctest.rst:1307 +#: library/doctest.rst:1349 msgid "" "The exception message generated by the example, if the example is expected " "to generate an exception; or ``None`` if it is not expected to generate an " -"exception. This exception message is compared against the return value of :" -"func:`traceback.format_exception_only`. :attr:`exc_msg` ends with a newline " -"unless it's ``None``. The constructor adds a newline if needed." +"exception. This exception message is compared against the return value " +"of :func:`traceback.format_exception_only`. :attr:`exc_msg` ends with a " +"newline unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: library/doctest.rst:1316 +#: library/doctest.rst:1358 msgid "" "The line number within the string containing this example where the example " "begins. This line number is zero-based with respect to the beginning of the " "containing string." msgstr "" -#: library/doctest.rst:1323 +#: library/doctest.rst:1365 msgid "" "The example's indentation in the containing string, i.e., the number of " "space characters that precede the example's first prompt." msgstr "" -#: library/doctest.rst:1329 +#: library/doctest.rst:1371 msgid "" "A dictionary mapping from option flags to ``True`` or ``False``, which is " "used to override default options for this example. Any option flags not " @@ -2053,11 +2121,11 @@ msgid "" "default, no options are set." msgstr "" -#: library/doctest.rst:1339 +#: library/doctest.rst:1381 msgid "DocTestFinder objects" msgstr "Objets *DocTestFinder*" -#: library/doctest.rst:1344 +#: library/doctest.rst:1386 msgid "" "A processing class used to extract the :class:`DocTest`\\ s that are " "relevant to a given object, from its docstring and the docstrings of its " @@ -2065,48 +2133,49 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: library/doctest.rst:1349 +#: library/doctest.rst:1391 msgid "" "The optional argument *verbose* can be used to display the objects searched " "by the finder. It defaults to ``False`` (no output)." msgstr "" -#: library/doctest.rst:1352 +#: library/doctest.rst:1394 msgid "" "The optional argument *parser* specifies the :class:`DocTestParser` object " "(or a drop-in replacement) that is used to extract doctests from docstrings." msgstr "" -#: library/doctest.rst:1355 +#: library/doctest.rst:1397 msgid "" "If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` " "will only examine the given object, and not any contained objects." msgstr "" -#: library/doctest.rst:1358 +#: library/doctest.rst:1400 msgid "" -"If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder." -"find` will include tests for objects with empty docstrings." +"If the optional argument *exclude_empty* is false, " +"then :meth:`DocTestFinder.find` will include tests for objects with empty " +"docstrings." msgstr "" -#: library/doctest.rst:1362 +#: library/doctest.rst:1404 msgid ":class:`DocTestFinder` defines the following method:" msgstr "La classe :class:`DocTestFinder` définit la méthode suivante :" -#: library/doctest.rst:1367 +#: library/doctest.rst:1409 msgid "" "Return a list of the :class:`DocTest`\\ s that are defined by *obj*'s " "docstring, or by any of its contained objects' docstrings." msgstr "" -#: library/doctest.rst:1370 +#: library/doctest.rst:1412 msgid "" "The optional argument *name* specifies the object's name; this name will be " "used to construct names for the returned :class:`DocTest`\\ s. If *name* is " "not specified, then ``obj.__name__`` is used." msgstr "" -#: library/doctest.rst:1374 +#: library/doctest.rst:1416 msgid "" "The optional parameter *module* is the module that contains the given " "object. If the module is not specified or is ``None``, then the test finder " @@ -2114,26 +2183,26 @@ msgid "" "module is used:" msgstr "" -#: library/doctest.rst:1378 +#: library/doctest.rst:1420 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: library/doctest.rst:1380 +#: library/doctest.rst:1422 msgid "" "To prevent the DocTestFinder from extracting DocTests from objects that are " "imported from other modules. (Contained objects with modules other than " "*module* are ignored.)" msgstr "" -#: library/doctest.rst:1384 +#: library/doctest.rst:1426 msgid "To find the name of the file containing the object." msgstr "Afin de trouver le nom du fichier contenant l'objet." -#: library/doctest.rst:1386 +#: library/doctest.rst:1428 msgid "To help find the line number of the object within its file." msgstr "" -#: library/doctest.rst:1388 +#: library/doctest.rst:1430 msgid "" "If *module* is ``False``, no attempt to find the module will be made. This " "is obscure, of use mostly in testing doctest itself: if *module* is " @@ -2142,49 +2211,50 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: library/doctest.rst:1394 +#: library/doctest.rst:1436 msgid "" "The globals for each :class:`DocTest` is formed by combining *globs* and " "*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " -"shallow copy of the globals dictionary is created for each :class:`DocTest`. " -"If *globs* is not specified, then it defaults to the module's *__dict__*, if " -"specified, or ``{}`` otherwise. If *extraglobs* is not specified, then it " -"defaults to ``{}``." +"shallow copy of the globals dictionary is created for each :class:`!" +"DocTest`. If *globs* is not specified, then it defaults to the " +"module's :attr:`~module.__dict__`, if specified, or ``{}`` otherwise. If " +"*extraglobs* is not specified, then it defaults to ``{}``." msgstr "" -#: library/doctest.rst:1405 +#: library/doctest.rst:1447 msgid "DocTestParser objects" msgstr "Objets *DocTestParser*" -#: library/doctest.rst:1410 +#: library/doctest.rst:1452 msgid "" "A processing class used to extract interactive examples from a string, and " "use them to create a :class:`DocTest` object." msgstr "" -#: library/doctest.rst:1414 +#: library/doctest.rst:1456 msgid ":class:`DocTestParser` defines the following methods:" msgstr "La classe :class:`DocTestFinder` définit les méthodes suivantes :" -#: library/doctest.rst:1419 +#: library/doctest.rst:1461 msgid "" -"Extract all doctest examples from the given string, and collect them into a :" -"class:`DocTest` object." +"Extract all doctest examples from the given string, and collect them into " +"a :class:`DocTest` object." msgstr "" "Extrait tous les exemples de *doctests* à partir de la chaîne de caractère " "donnée, et les réunit dans un objet :class:`DocTest`." -#: library/doctest.rst:1422 +#: library/doctest.rst:1464 +#, fuzzy msgid "" -"*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" -"`DocTest` object. See the documentation for :class:`DocTest` for more " -"information." +"*globs*, *name*, *filename*, and *lineno* are attributes for the " +"new :class:`!DocTest` object. See the documentation for :class:`DocTest` " +"for more information." msgstr "" "Notez que *globs*, *name*, *filname* et *lineno* sont des attributs pour le " "nouvel objet :class:`DocTest`. Voir la documentation pour :class:`DocTest` " "pour plus d'information." -#: library/doctest.rst:1429 +#: library/doctest.rst:1471 msgid "" "Extract all doctest examples from the given string, and return them as a " "list of :class:`Example` objects. Line numbers are 0-based. The optional " @@ -2192,154 +2262,164 @@ msgid "" "error messages." msgstr "" -#: library/doctest.rst:1436 +#: library/doctest.rst:1478 msgid "" "Divide the given string into examples and intervening text, and return them " "as a list of alternating :class:`Example`\\ s and strings. Line numbers for " -"the :class:`Example`\\ s are 0-based. The optional argument *name* is a " +"the :class:`!Example`\\ s are 0-based. The optional argument *name* is a " "name identifying this string, and is only used for error messages." msgstr "" -#: library/doctest.rst:1443 +#: library/doctest.rst:1485 msgid "TestResults objects" msgstr "Objets *TestResults*" -#: library/doctest.rst:1450 +#: library/doctest.rst:1492 msgid "Number of failed tests." msgstr "Nombre de tests échoués." -#: library/doctest.rst:1454 +#: library/doctest.rst:1496 msgid "Number of attempted tests." msgstr "Nombre de tests tentés." -#: library/doctest.rst:1458 +#: library/doctest.rst:1500 msgid "Number of skipped tests." msgstr "Nombre de tests sautés." -#: library/doctest.rst:1466 +#: library/doctest.rst:1508 msgid "DocTestRunner objects" msgstr "Objets *DocTestRunner*" -#: library/doctest.rst:1471 +#: library/doctest.rst:1513 msgid "" -"A processing class used to execute and verify the interactive examples in a :" -"class:`DocTest`." +"A processing class used to execute and verify the interactive examples in " +"a :class:`DocTest`." msgstr "" -#: library/doctest.rst:1474 +#: library/doctest.rst:1516 msgid "" -"The comparison between expected outputs and actual outputs is done by an :" -"class:`OutputChecker`. This comparison may be customized with a number of " -"option flags; see section :ref:`doctest-options` for more information. If " -"the option flags are insufficient, then the comparison may also be " -"customized by passing a subclass of :class:`OutputChecker` to the " +"The comparison between expected outputs and actual outputs is done by " +"an :class:`OutputChecker`. This comparison may be customized with a number " +"of option flags; see section :ref:`doctest-options` for more information. " +"If the option flags are insufficient, then the comparison may also be " +"customized by passing a subclass of :class:`!OutputChecker` to the " "constructor." msgstr "" -#: library/doctest.rst:1480 +#: library/doctest.rst:1522 msgid "" "The test runner's display output can be controlled in two ways. First, an " "output function can be passed to :meth:`run`; this function will be called " -"with strings that should be displayed. It defaults to ``sys.stdout." -"write``. If capturing the output is not sufficient, then the display output " -"can be also customized by subclassing DocTestRunner, and overriding the " -"methods :meth:`report_start`, :meth:`report_success`, :meth:" -"`report_unexpected_exception`, and :meth:`report_failure`." +"with strings that should be displayed. It defaults to " +"``sys.stdout.write``. If capturing the output is not sufficient, then the " +"display output can be also customized by subclassing DocTestRunner, and " +"overriding the " +"methods :meth:`report_skip`, :meth:`report_start`, :meth:`report_success`, :meth:`report_unexpected_exception`, " +"and :meth:`report_failure`." msgstr "" -#: library/doctest.rst:1488 +#: library/doctest.rst:1530 msgid "" "The optional keyword argument *checker* specifies the :class:`OutputChecker` " "object (or drop-in replacement) that should be used to compare the expected " "outputs to the actual outputs of doctest examples." msgstr "" -#: library/doctest.rst:1492 +#: library/doctest.rst:1534 msgid "" -"The optional keyword argument *verbose* controls the :class:" -"`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " -"printed about each example, as it is run. If *verbose* is ``False``, then " -"only failures are printed. If *verbose* is unspecified, or ``None``, then " -"verbose output is used iff the command-line switch ``-v`` is used." +"The optional keyword argument *verbose* controls " +"the :class:`DocTestRunner`'s verbosity. If *verbose* is ``True``, then " +"information is printed about each example, as it is run. If *verbose* is " +"``False``, then only failures are printed. If *verbose* is unspecified, or " +"``None``, then verbose output is used iff the command-line switch ``-v`` is " +"used." msgstr "" -#: library/doctest.rst:1498 +#: library/doctest.rst:1540 msgid "" "The optional keyword argument *optionflags* can be used to control how the " "test runner compares expected output to actual output, and how it displays " "failures. For more information, see section :ref:`doctest-options`." msgstr "" -#: library/doctest.rst:1502 +#: library/doctest.rst:1544 msgid "" "The test runner accumulates statistics. The aggregated number of attempted, " -"failed and skipped examples is also available via the :attr:`tries`, :attr:" -"`failures` and :attr:`skips` attributes. The :meth:`run` and :meth:" -"`summarize` methods return a :class:`TestResults` instance." +"failed and skipped examples is also available via " +"the :attr:`tries`, :attr:`failures` and :attr:`skips` attributes. " +"The :meth:`run` and :meth:`summarize` methods return a :class:`TestResults` " +"instance." msgstr "" -#: library/doctest.rst:1507 +#: library/doctest.rst:1549 msgid ":class:`DocTestRunner` defines the following methods:" msgstr "La classe :class:`DocTestRunner` définit les méthodes suivantes :" -#: library/doctest.rst:1512 +#: library/doctest.rst:1554 msgid "" -"Report that the test runner is about to process the given example. This " -"method is provided to allow subclasses of :class:`DocTestRunner` to " -"customize their output; it should not be called directly." +"Report that the given example was skipped. This method is provided to allow " +"subclasses of :class:`DocTestRunner` to customize their output; it should " +"not be called directly." msgstr "" -#: library/doctest.rst:1516 +#: library/doctest.rst:1571 msgid "" "*example* is the example about to be processed. *test* is the test " -"*containing example*. *out* is the output function that was passed to :meth:" -"`DocTestRunner.run`." +"containing *example*. *out* is the output function that was passed " +"to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1523 +#: library/doctest.rst:1567 +msgid "" +"Report that the test runner is about to process the given example. This " +"method is provided to allow subclasses of :class:`DocTestRunner` to " +"customize their output; it should not be called directly." +msgstr "" + +#: library/doctest.rst:1578 msgid "" "Report that the given example ran successfully. This method is provided to " "allow subclasses of :class:`DocTestRunner` to customize their output; it " "should not be called directly." msgstr "" -#: library/doctest.rst:1538 +#: library/doctest.rst:1593 msgid "" "*example* is the example about to be processed. *got* is the actual output " "from the example. *test* is the test containing *example*. *out* is the " "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1534 +#: library/doctest.rst:1589 msgid "" "Report that the given example failed. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: library/doctest.rst:1545 +#: library/doctest.rst:1600 msgid "" "Report that the given example raised an unexpected exception. This method is " "provided to allow subclasses of :class:`DocTestRunner` to customize their " "output; it should not be called directly." msgstr "" -#: library/doctest.rst:1549 +#: library/doctest.rst:1604 msgid "" "*example* is the example about to be processed. *exc_info* is a tuple " -"containing information about the unexpected exception (as returned by :func:" -"`sys.exc_info`). *test* is the test containing *example*. *out* is the " -"output function that was passed to :meth:`DocTestRunner.run`." +"containing information about the unexpected exception (as returned " +"by :func:`sys.exc_info`). *test* is the test containing *example*. *out* is " +"the output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1557 +#: library/doctest.rst:1612 msgid "" "Run the examples in *test* (a :class:`DocTest` object), and display the " "results using the writer function *out*. Return a :class:`TestResults` " "instance." msgstr "" -#: library/doctest.rst:1561 +#: library/doctest.rst:1616 msgid "" "The examples are run in the namespace ``test.globs``. If *clear_globs* is " "true (the default), then this namespace will be cleared after the test runs, " @@ -2347,92 +2427,92 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: library/doctest.rst:1566 +#: library/doctest.rst:1621 msgid "" "*compileflags* gives the set of flags that should be used by the Python " "compiler when running the examples. If not specified, then it will default " "to the set of future-import flags that apply to *globs*." msgstr "" -#: library/doctest.rst:1570 +#: library/doctest.rst:1625 msgid "" "The output of each example is checked using the :class:`DocTestRunner`'s " -"output checker, and the results are formatted by the :meth:`!DocTestRunner." -"report_\\*` methods." +"output checker, and the results are formatted by the :meth:`!" +"DocTestRunner.report_\\*` methods." msgstr "" -#: library/doctest.rst:1577 +#: library/doctest.rst:1632 msgid "" "Print a summary of all the test cases that have been run by this " "DocTestRunner, and return a :class:`TestResults` instance." msgstr "" -#: library/doctest.rst:1580 +#: library/doctest.rst:1635 msgid "" "The optional *verbose* argument controls how detailed the summary is. If " "the verbosity is not specified, then the :class:`DocTestRunner`'s verbosity " "is used." msgstr "" -#: library/doctest.rst:1584 +#: library/doctest.rst:1639 msgid ":class:`DocTestParser` has the following attributes:" msgstr ":class:`DocTestParser` définit les attributs suivants :" -#: library/doctest.rst:1588 +#: library/doctest.rst:1643 msgid "Number of attempted examples." msgstr "" -#: library/doctest.rst:1592 +#: library/doctest.rst:1647 msgid "Number of failed examples." msgstr "" -#: library/doctest.rst:1596 +#: library/doctest.rst:1651 msgid "Number of skipped examples." msgstr "" -#: library/doctest.rst:1604 +#: library/doctest.rst:1659 msgid "OutputChecker objects" msgstr "Objets *OutputChecker*" -#: library/doctest.rst:1609 +#: library/doctest.rst:1664 msgid "" "A class used to check the whether the actual output from a doctest example " -"matches the expected output. :class:`OutputChecker` defines two methods: :" -"meth:`check_output`, which compares a given pair of outputs, and returns " -"``True`` if they match; and :meth:`output_difference`, which returns a " -"string describing the differences between two outputs." +"matches the expected output. :class:`OutputChecker` defines two " +"methods: :meth:`check_output`, which compares a given pair of outputs, and " +"returns ``True`` if they match; and :meth:`output_difference`, which returns " +"a string describing the differences between two outputs." msgstr "" -#: library/doctest.rst:1616 +#: library/doctest.rst:1671 msgid ":class:`OutputChecker` defines the following methods:" msgstr "La classe :class:`OutputChecker` définit les méthodes suivantes :" -#: library/doctest.rst:1620 +#: library/doctest.rst:1675 msgid "" "Return ``True`` iff the actual output from an example (*got*) matches the " "expected output (*want*). These strings are always considered to match if " "they are identical; but depending on what option flags the test runner is " -"using, several non-exact match types are also possible. See section :ref:" -"`doctest-options` for more information about option flags." +"using, several non-exact match types are also possible. See " +"section :ref:`doctest-options` for more information about option flags." msgstr "" -#: library/doctest.rst:1629 +#: library/doctest.rst:1684 msgid "" "Return a string describing the differences between the expected output for a " "given example (*example*) and the actual output (*got*). *optionflags* is " "the set of option flags used to compare *want* and *got*." msgstr "" -#: library/doctest.rst:1637 +#: library/doctest.rst:1692 msgid "Debugging" msgstr "Débogage" -#: library/doctest.rst:1639 +#: library/doctest.rst:1694 msgid "Doctest provides several mechanisms for debugging doctest examples:" msgstr "" "*Doctest* fournit plusieurs mécanismes pour déboguer des exemples *doctest* :" -#: library/doctest.rst:1641 +#: library/doctest.rst:1696 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." @@ -2440,7 +2520,7 @@ msgstr "" "Plusieurs fonctions convertissent les *doctests* en programmes Python " "exécutables, qui peuvent être exécutés grâce au débogueur Python, :mod:`pdb`." -#: library/doctest.rst:1644 +#: library/doctest.rst:1699 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -2448,35 +2528,35 @@ msgid "" "debugging on the example." msgstr "" -#: library/doctest.rst:1649 +#: library/doctest.rst:1704 msgid "" -"The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" -"meth:`debug` method defined by :class:`unittest.TestCase`." +"The :mod:`unittest` cases generated by :func:`DocTestSuite` support " +"the :meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: library/doctest.rst:1652 +#: library/doctest.rst:1707 msgid "" "You can add a call to :func:`pdb.set_trace` in a doctest example, and you'll " "drop into the Python debugger when that line is executed. Then you can " -"inspect current values of variables, and so on. For example, suppose :file:" -"`a.py` contains just this module docstring::" +"inspect current values of variables, and so on. For example, " +"suppose :file:`a.py` contains just this module docstring::" msgstr "" -#: library/doctest.rst:1667 +#: library/doctest.rst:1722 msgid "Then an interactive Python session may look like this::" msgstr "Alors une séance interactive de Python peut ressembler à ceci ::" -#: library/doctest.rst:1700 +#: library/doctest.rst:1755 msgid "" "Functions that convert doctests to Python code, and possibly run the " "synthesized code under the debugger:" msgstr "" -#: library/doctest.rst:1706 +#: library/doctest.rst:1761 msgid "Convert text with examples to a script." msgstr "Convertit du texte contenant des exemples en un script." -#: library/doctest.rst:1708 +#: library/doctest.rst:1763 msgid "" "Argument *s* is a string containing doctest examples. The string is " "converted to a Python script, where doctest examples in *s* are converted to " @@ -2484,11 +2564,11 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: library/doctest.rst:1723 +#: library/doctest.rst:1778 msgid "displays::" msgstr "affiche::" -#: library/doctest.rst:1733 +#: library/doctest.rst:1788 msgid "" "This function is used internally by other functions (see below), but can " "also be useful when you want to transform an interactive Python session into " @@ -2498,11 +2578,11 @@ msgstr "" "bas), mais peut aussi être utile lorsque l'on souhaite transformer une " "séance interactive de Python en script Python." -#: library/doctest.rst:1740 +#: library/doctest.rst:1795 msgid "Convert the doctest for an object to a script." msgstr "Convertit en script l'objet *doctest*." -#: library/doctest.rst:1742 +#: library/doctest.rst:1797 msgid "" "Argument *module* is a module object, or dotted name of a module, containing " "the object whose doctests are of interest. Argument *name* is the name " @@ -2512,7 +2592,7 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`!f`, then ::" msgstr "" -#: library/doctest.rst:1752 +#: library/doctest.rst:1807 #, fuzzy msgid "" "prints a script version of function :func:`!f`'s docstring, with doctests " @@ -2521,19 +2601,19 @@ msgstr "" "affiche une version script de la *docstring* de la fonction :func:`f`, avec " "des *doctests* convertis en code, et le reste dans les commentaires." -#: library/doctest.rst:1758 +#: library/doctest.rst:1813 msgid "Debug the doctests for an object." msgstr "Débogue les *doctests* pour un objet." -#: library/doctest.rst:1760 +#: library/doctest.rst:1815 msgid "" -"The *module* and *name* arguments are the same as for function :func:" -"`testsource` above. The synthesized Python script for the named object's " -"docstring is written to a temporary file, and then that file is run under " -"the control of the Python debugger, :mod:`pdb`." +"The *module* and *name* arguments are the same as for " +"function :func:`testsource` above. The synthesized Python script for the " +"named object's docstring is written to a temporary file, and then that file " +"is run under the control of the Python debugger, :mod:`pdb`." msgstr "" -#: library/doctest.rst:1765 +#: library/doctest.rst:1820 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." @@ -2541,23 +2621,23 @@ msgstr "" "Une copie superficielle de ``module.__dict__`` est utilisée à la fois pour " "les contextes d'exécution locaux et globaux." -#: library/doctest.rst:1768 +#: library/doctest.rst:1823 msgid "" "Optional argument *pm* controls whether post-mortem debugging is used. If " "*pm* has a true value, the script file is run directly, and the debugger " "gets involved only if the script terminates via raising an unhandled " -"exception. If it does, then post-mortem debugging is invoked, via :func:" -"`pdb.post_mortem`, passing the traceback object from the unhandled " +"exception. If it does, then post-mortem debugging is invoked, " +"via :func:`pdb.post_mortem`, passing the traceback object from the unhandled " "exception. If *pm* is not specified, or is false, the script is run under " "the debugger from the start, via passing an appropriate :func:`exec` call " "to :func:`pdb.run`." msgstr "" -#: library/doctest.rst:1779 +#: library/doctest.rst:1834 msgid "Debug the doctests in a string." msgstr "Débogue les *doctests* dans une chaîne de caractères." -#: library/doctest.rst:1781 +#: library/doctest.rst:1836 msgid "" "This is like function :func:`debug` above, except that a string containing " "doctest examples is specified directly, via the *src* argument." @@ -2566,7 +2646,7 @@ msgstr "" "qu'une chaîne de caractères contenant des exemples *doctest* est définie " "directement, par l'option *src*." -#: library/doctest.rst:1784 +#: library/doctest.rst:1839 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." @@ -2574,7 +2654,7 @@ msgstr "" "L'option *pm* a la même définition que dans la fonction :func:`debug` ci-" "haut." -#: library/doctest.rst:1786 +#: library/doctest.rst:1841 msgid "" "Optional argument *globs* gives a dictionary to use as both local and global " "execution context. If not specified, or ``None``, an empty dictionary is " @@ -2585,7 +2665,7 @@ msgstr "" "dictionnaire vide est utilisé. Si définie, une copie superficielle du " "dictionnaire est utilisée." -#: library/doctest.rst:1791 +#: library/doctest.rst:1846 msgid "" "The :class:`DebugRunner` class, and the special exceptions it may raise, are " "of most interest to testing framework authors, and will only be sketched " @@ -2593,35 +2673,35 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: library/doctest.rst:1799 +#: library/doctest.rst:1854 msgid "" "A subclass of :class:`DocTestRunner` that raises an exception as soon as a " -"failure is encountered. If an unexpected exception occurs, an :exc:" -"`UnexpectedException` exception is raised, containing the test, the example, " -"and the original exception. If the output doesn't match, then a :exc:" -"`DocTestFailure` exception is raised, containing the test, the example, and " -"the actual output." +"failure is encountered. If an unexpected exception occurs, " +"an :exc:`UnexpectedException` exception is raised, containing the test, the " +"example, and the original exception. If the output doesn't match, then " +"a :exc:`DocTestFailure` exception is raised, containing the test, the " +"example, and the actual output." msgstr "" -#: library/doctest.rst:1806 +#: library/doctest.rst:1861 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" "api`." msgstr "" "Pour de l'information sur les paramètres et méthodes du constructeur, voir " -"la documentation pour la classe :class:`DocTestrunner` dans la section :reF:" -"`doctest-advanced-api`." +"la documentation pour la classe :class:`DocTestrunner` dans la " +"section :reF:`doctest-advanced-api`." -#: library/doctest.rst:1809 +#: library/doctest.rst:1864 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" msgstr "" -"Il y a deux exceptions qui peuvent être levées par des instances :class:" -"`DebugRunner` :" +"Il y a deux exceptions qui peuvent être levées par des " +"instances :class:`DebugRunner` :" -#: library/doctest.rst:1814 +#: library/doctest.rst:1869 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example's actual output did not match its expected output. The constructor " @@ -2632,25 +2712,25 @@ msgstr "" "Les arguments du constructeur sont utilisés pour initialiser les attributs " "des mêmes noms." -#: library/doctest.rst:1818 +#: library/doctest.rst:1873 msgid ":exc:`DocTestFailure` defines the following attributes:" msgstr ":exc:`DocTestFailure` définit les attributs suivants :" -#: library/doctest.rst:1847 +#: library/doctest.rst:1902 msgid "The :class:`DocTest` object that was being run when the example failed." msgstr "" "L'objet issu de la classe :class:`DocTest` qui était en cours d'exécution " "lorsque l'exemple a échoué." -#: library/doctest.rst:1852 +#: library/doctest.rst:1907 msgid "The :class:`Example` that failed." msgstr "L'exemple :class:`Example` qui a échoué." -#: library/doctest.rst:1833 +#: library/doctest.rst:1888 msgid "The example's actual output." msgstr "La sortie obtenue par l'exécution de l'exemple." -#: library/doctest.rst:1838 +#: library/doctest.rst:1893 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example raised an unexpected exception. The constructor arguments are used " @@ -2660,11 +2740,11 @@ msgstr "" "exemple *doctest* a levé une exception inattendue. Les arguments du " "constructeur sont utilisés pour initialiser les attributs des mêmes noms." -#: library/doctest.rst:1842 +#: library/doctest.rst:1897 msgid ":exc:`UnexpectedException` defines the following attributes:" msgstr ":exc:`UnexpectedException` définit les attributs suivants :" -#: library/doctest.rst:1857 +#: library/doctest.rst:1912 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." @@ -2672,38 +2752,39 @@ msgstr "" "Un n-uplet contenant l'information au sujet de l'exception inattendue, telle " "que retourné par :func:`sys.exc_info`." -#: library/doctest.rst:1864 +#: library/doctest.rst:1919 msgid "Soapbox" msgstr "Éditorial" -#: library/doctest.rst:1866 +#: library/doctest.rst:1921 +#, fuzzy msgid "" -"As mentioned in the introduction, :mod:`doctest` has grown to have three " +"As mentioned in the introduction, :mod:`!doctest` has grown to have three " "primary uses:" msgstr "" "Comme mentionné dans l'introduction, :mod:`doctest` a présentement trois " "usages principaux :" -#: library/doctest.rst:1869 +#: library/doctest.rst:1924 msgid "Checking examples in docstrings." msgstr "Vérifier les exemples dans les *docstrings*." -#: library/doctest.rst:1871 +#: library/doctest.rst:1926 msgid "Regression testing." msgstr "Test de régression." -#: library/doctest.rst:1873 +#: library/doctest.rst:1928 msgid "Executable documentation / literate testing." msgstr "De la documentation exécutable / des tests littéraires." -#: library/doctest.rst:1875 +#: library/doctest.rst:1930 msgid "" "These uses have different requirements, and it is important to distinguish " "them. In particular, filling your docstrings with obscure test cases makes " "for bad documentation." msgstr "" -#: library/doctest.rst:1879 +#: library/doctest.rst:1934 msgid "" "When writing a docstring, choose docstring examples with care. There's an " "art to this that needs to be learned---it may not be natural at first. " @@ -2711,11 +2792,11 @@ msgid "" "often be worth many words. If done with care, the examples will be " "invaluable for your users, and will pay back the time it takes to collect " "them many times over as the years go by and things change. I'm still amazed " -"at how often one of my :mod:`doctest` examples stops working after a " +"at how often one of my :mod:`!doctest` examples stops working after a " "\"harmless\" change." msgstr "" -#: library/doctest.rst:1887 +#: library/doctest.rst:1942 msgid "" "Doctest also makes an excellent tool for regression testing, especially if " "you don't skimp on explanatory text. By interleaving prose and examples, it " @@ -2736,13 +2817,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: library/doctest.rst:1905 +#: library/doctest.rst:1960 msgid "" "Regression testing is best confined to dedicated objects or files. There " "are several options for organizing tests:" msgstr "" -#: library/doctest.rst:1908 +#: library/doctest.rst:1963 msgid "" "Write text files containing test cases as interactive examples, and test the " "files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " @@ -2750,7 +2831,7 @@ msgid "" "doctest." msgstr "" -#: library/doctest.rst:1913 +#: library/doctest.rst:1968 msgid "" "Define functions named ``_regrtest_topic`` that consist of single " "docstrings, containing test cases for the named topics. These functions can " @@ -2758,13 +2839,13 @@ msgid "" "test file." msgstr "" -#: library/doctest.rst:1917 +#: library/doctest.rst:1972 msgid "" -"Define a ``__test__`` dictionary mapping from regression test topics to " -"docstrings containing test cases." +"Define a :attr:`~module.__test__` dictionary mapping from regression test " +"topics to docstrings containing test cases." msgstr "" -#: library/doctest.rst:1920 +#: library/doctest.rst:1975 msgid "" "When you have placed your tests in a module, the module can itself be the " "test runner. When a test fails, you can arrange for your test runner to re-" @@ -2777,11 +2858,11 @@ msgstr "" "échouent et ce, tant que vous travaillez sur le problème. Voici un exemple " "minimal d'un test exécuteur de tests ::" -#: library/doctest.rst:1942 +#: library/doctest.rst:1997 msgid "Footnotes" msgstr "Notes" -#: library/doctest.rst:1943 +#: library/doctest.rst:1998 msgid "" "Examples containing both expected output and an exception are not supported. " "Trying to guess where one ends and the other begins is too error-prone, and " @@ -2792,6 +2873,44 @@ msgstr "" "mener à plusieurs erreurs, en plus d'être un test qui soit source de " "confusion." +#~ msgid "" +#~ "There is also a command line shortcut for running :func:`testmod`. You " +#~ "can instruct the Python interpreter to run the doctest module directly " +#~ "from the standard library and pass the module name(s) on the command " +#~ "line::" +#~ msgstr "" +#~ "Il y a un raccourci pour exécuter :func:`testmod` à partir de la ligne de " +#~ "commande. Vous demandez à l'interpréteur Python d'exécuter le module " +#~ "*doctest* directement à partir de la bibliothèque standard afin de passer " +#~ "le ou les noms des modules à partir de la ligne de commande ainsi ::" + +#~ msgid "" +#~ "There is also a command line shortcut for running :func:`testfile`. You " +#~ "can instruct the Python interpreter to run the doctest module directly " +#~ "from the standard library and pass the file name(s) on the command line::" +#~ msgstr "" +#~ "Il y a un raccourci pour exécuter :func:`testfile` à partir de la ligne " +#~ "de commande. Demandez à l'interpréteur Python d'exécuter le module " +#~ "*doctest* directement à partir de la bibliothèque standard et de passer " +#~ "le ou les noms des modules à partir de la ligne de commande ainsi ::" + +#~ msgid "The ``-o`` command line option." +#~ msgstr "L'option de ligne de commande ``-o``." + +#, fuzzy +#~ msgid "" +#~ "When doctests which have been converted to unit tests " +#~ "by :func:`DocFileSuite` or :func:`DocTestSuite` fail, this exception is " +#~ "raised showing the name of the file containing the test and a (sometimes " +#~ "approximate) line number." +#~ msgstr "" +#~ "La classe renvoyée :class:`unittest.TestSuite` doit être exécutée par le " +#~ "cadriciel de test unitaire, afin d'exécuter chaque *doctest* dans le " +#~ "module. Si n'importe lequel des *doctests* échoue, alors le test unitaire " +#~ "de synthèse échoue, et une exception :exc:`failureException` est levée, " +#~ "affichant le nom du fichier contenant le test et un numéro de ligne " +#~ "pouvant être approximatif." + #~ msgid "^ (caret)" #~ msgstr "^ (caret)" @@ -2829,9 +2948,9 @@ msgstr "" #~ msgid "" #~ "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " #~ "exception message, but such a test may still fail based on whether or not " -#~ "the module details are printed as part of the exception name. Using :" -#~ "const:`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is also " -#~ "the only clear way to write a doctest that doesn't care about the " +#~ "the module details are printed as part of the exception name. " +#~ "Using :const:`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is " +#~ "also the only clear way to write a doctest that doesn't care about the " #~ "exception detail yet continues to pass under Python 2.3 or earlier (those " #~ "releases do not support :ref:`doctest directives ` " #~ "and ignore them as irrelevant comments). For example::" @@ -2839,12 +2958,12 @@ msgstr "" #~ "Prendre note que :const:`ELLIPSIS` peut aussi être utilisée afin " #~ "d'ignorer les détails du message d'exception, mais un tel test peut tout " #~ "de même échouer si les détails du module sont affichés comme faisant " -#~ "partie du nom de l'exception. L'utilisation de :const:" -#~ "`IGNORE_EXCEPTION_DETAIL` et des détails de Python 2.3 est aussi la seule " -#~ "façon claire d'écrire un *doctest* qui ne se soucie pas du détail " -#~ "d'exception tout en continuant de réussir, et ce, pour Python 2.3 ou " -#~ "antérieur (ces versions ne supportent pas les :ref:`instructions doctest " -#~ "`, les ignorant et les traitant comme des " +#~ "partie du nom de l'exception. L'utilisation " +#~ "de :const:`IGNORE_EXCEPTION_DETAIL` et des détails de Python 2.3 est " +#~ "aussi la seule façon claire d'écrire un *doctest* qui ne se soucie pas du " +#~ "détail d'exception tout en continuant de réussir, et ce, pour Python 2.3 " +#~ "ou antérieur (ces versions ne supportent pas les :ref:`instructions " +#~ "doctest `, les ignorant et les traitant comme des " #~ "commentaires sans pertinence). Par exemple ::" #~ msgid "" diff --git a/library/email.charset.po b/library/email.charset.po index aa8cb4e79..ed3bb34fc 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-03-15 22:42+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -45,18 +45,19 @@ msgid "" "This module provides a class :class:`Charset` for representing character " "sets and character set conversions in email messages, as well as a character " "set registry and several convenience methods for manipulating this registry. " -"Instances of :class:`Charset` are used in several other modules within the :" -"mod:`email` package." +"Instances of :class:`Charset` are used in several other modules within " +"the :mod:`email` package." msgstr "" "Ce module fournit une classe :class:`Charset` pour représenter les jeux de " "caractères et les conversions de jeux de caractères dans les messages " "électroniques, ainsi qu'un registre de jeux de caractères et plusieurs " -"méthodes pratiques pour manipuler ce registre. Les instances de :class:" -"`Charset` sont utilisées dans plusieurs autres modules du paquet :mod:" -"`email`." +"méthodes pratiques pour manipuler ce registre. Les instances " +"de :class:`Charset` sont utilisées dans plusieurs autres modules du " +"paquet :mod:`email`." #: library/email.charset.rst:22 -msgid "Import this class from the :mod:`email.charset` module." +#, fuzzy +msgid "Import this class from the :mod:`!email.charset` module." msgstr "Importez cette classe depuis le module :mod:`email.charset`." #: library/email.charset.rst:27 @@ -147,8 +148,8 @@ msgstr "" #, fuzzy msgid "" "Same as *header_encoding*, but describes the encoding for the mail message's " -"body, which indeed may be different than the header encoding. ``charset." -"SHORTEST`` is not allowed for *body_encoding*." +"body, which indeed may be different than the header encoding. " +"``charset.SHORTEST`` is not allowed for *body_encoding*." msgstr "" "Identique à *header_encoding*, mais décrit l'encodage du corps du message " "électronique, qui peut effectivement être différent de l'encodage de l'en-" @@ -294,20 +295,21 @@ msgid "" "This method allows you to compare two :class:`Charset` instances for " "equality." msgstr "" -"Cette méthode vous permet de tester l'égalité de deux instances de :class:" -"`Charset`." +"Cette méthode vous permet de tester l'égalité de deux instances " +"de :class:`Charset`." #: library/email.charset.rst:164 msgid "" "This method allows you to compare two :class:`Charset` instances for " "inequality." msgstr "" -"Cette méthode vous permet de tester l'inégalité de deux instances de :class:" -"`Charset`." +"Cette méthode vous permet de tester l'inégalité de deux instances " +"de :class:`Charset`." #: library/email.charset.rst:167 +#, fuzzy msgid "" -"The :mod:`email.charset` module also provides the following functions for " +"The :mod:`!email.charset` module also provides the following functions for " "adding new entries to the global character set, alias, and codec registries:" msgstr "" "Le module :mod:`email.charset` fournit également les fonctions suivantes " @@ -338,10 +340,10 @@ msgid "" "``None`` for no encoding." msgstr "" "*header_enc* et *body_enc* (facultatifs) sont soit ``Charset.QP`` pour " -"*quoted-printable*, ``Charset.BASE64`` pour l'encodage *base64*, ``Charset." -"SHORTEST`` pour le plus court entre *quoted-printable* et *base64*, ou " -"``None`` pour aucun encodage. ``SHORTEST`` n'est valide que pour " -"*header_enc*. La valeur par défaut est ``None`` pour aucun encodage." +"*quoted-printable*, ``Charset.BASE64`` pour l'encodage *base64*, " +"``Charset.SHORTEST`` pour le plus court entre *quoted-printable* et " +"*base64*, ou ``None`` pour aucun encodage. ``SHORTEST`` n'est valide que " +"pour *header_enc*. La valeur par défaut est ``None`` pour aucun encodage." #: library/email.charset.rst:184 msgid "" @@ -352,9 +354,9 @@ msgid "" msgstr "" "*output_charset* (facultatif) est le jeu de caractères dans lequel doit être " "la sortie. Les conversions se poursuivent du jeu de caractères d'entrée, " -"vers Unicode, vers le jeu de caractères de sortie lorsque la méthode :meth:" -"`Charset.convert` est appelée. La valeur par défaut est de sortir dans le " -"même jeu de caractères que l'entrée." +"vers Unicode, vers le jeu de caractères de sortie lorsque la " +"méthode :meth:`Charset.convert` est appelée. La valeur par défaut est de " +"sortir dans le même jeu de caractères que l'entrée." #: library/email.charset.rst:189 msgid "" @@ -405,8 +407,8 @@ msgstr "" #: library/email.charset.rst:211 msgid "" "*charset* is the canonical name of a character set. *codecname* is the name " -"of a Python codec, as appropriate for the second argument to the :class:" -"`str`'s :meth:`~str.encode` method." +"of a Python codec, as appropriate for the second argument to " +"the :class:`str`'s :meth:`~str.encode` method." msgstr "" "*charset* est le nom canonique d'un jeu de caractères. *codecname* est le " "nom d'un codec Python (c.-à-d. une valeur valable comme second argument de " diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 369d853cc..83481722a 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-08-28 00:13+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -17,27 +17,28 @@ msgstr "" #: library/email.compat32-message.rst:4 msgid "" -":mod:`email.message.Message`: Representing an email message using the :data:" -"`~email.policy.compat32` API" +":mod:`email.message.Message`: Representing an email message using " +"the :data:`~email.policy.compat32` API" msgstr "" ":mod:`email.message.Message` : représentation d'un message électronique à " "l'aide de l'API :data:`~email.policy.compat32`" #: library/email.compat32-message.rst:13 msgid "" -"The :class:`Message` class is very similar to the :class:`~email.message." -"EmailMessage` class, without the methods added by that class, and with the " -"default behavior of certain other methods being slightly different. We also " -"document here some methods that, while supported by the :class:`~email." -"message.EmailMessage` class, are not recommended unless you are dealing with " -"legacy code." -msgstr "" -"La classe :class:`Message` est très similaire à la classe :class:`~email." -"message.EmailMessage`, sans les méthodes ajoutées par cette classe et avec " -"le comportement par défaut légèrement différent pour certaines autres " -"méthodes. Nous documentons également ici certaines méthodes qui, bien que " -"prises en charge par la classe :class:`~email.message.EmailMessage`, ne sont " -"pas recommandées, sauf si vous avez affaire à du code hérité." +"The :class:`Message` class is very similar to " +"the :class:`~email.message.EmailMessage` class, without the methods added by " +"that class, and with the default behavior of certain other methods being " +"slightly different. We also document here some methods that, while " +"supported by the :class:`~email.message.EmailMessage` class, are not " +"recommended unless you are dealing with legacy code." +msgstr "" +"La classe :class:`Message` est très similaire à la " +"classe :class:`~email.message.EmailMessage`, sans les méthodes ajoutées par " +"cette classe et avec le comportement par défaut légèrement différent pour " +"certaines autres méthodes. Nous documentons également ici certaines méthodes " +"qui, bien que prises en charge par la " +"classe :class:`~email.message.EmailMessage`, ne sont pas recommandées, sauf " +"si vous avez affaire à du code hérité." #: library/email.compat32-message.rst:20 msgid "The philosophy and structure of the two classes is otherwise the same." @@ -46,26 +47,26 @@ msgstr "" #: library/email.compat32-message.rst:22 msgid "" -"This document describes the behavior under the default (for :class:" -"`Message`) policy :attr:`~email.policy.Compat32`. If you are going to use " -"another policy, you should be using the :class:`~email.message.EmailMessage` " -"class instead." +"This document describes the behavior under the default " +"(for :class:`Message`) policy :attr:`~email.policy.Compat32`. If you are " +"going to use another policy, you should be using " +"the :class:`~email.message.EmailMessage` class instead." msgstr "" -"Ce document décrit le comportement avec les règles par défaut (pour :class:" -"`Message`) :attr:`~email.policy.Compat32`. Si vous envisagez d'utiliser " -"d'autres règles, vous devriez plutôt utiliser la classe :class:`~email." -"message.EmailMessage`." +"Ce document décrit le comportement avec les règles par défaut " +"(pour :class:`Message`) :attr:`~email.policy.Compat32`. Si vous envisagez " +"d'utiliser d'autres règles, vous devriez plutôt utiliser la " +"classe :class:`~email.message.EmailMessage`." #: library/email.compat32-message.rst:26 msgid "" -"An email message consists of *headers* and a *payload*. Headers must be :" -"rfc:`5322` style names and values, where the field name and value are " +"An email message consists of *headers* and a *payload*. Headers must " +"be :rfc:`5322` style names and values, where the field name and value are " "separated by a colon. The colon is not part of either the field name or the " "field value. The payload may be a simple text message, or a binary object, " "or a structured sequence of sub-messages each with their own set of headers " "and their own payload. The latter type of payload is indicated by the " -"message having a MIME type such as :mimetype:`multipart/\\*` or :mimetype:" -"`message/rfc822`." +"message having a MIME type such as :mimetype:`multipart/\\*` " +"or :mimetype:`message/rfc822`." msgstr "" "Un message électronique se compose d'*en-têtes* et d'une *charge utile*. Les " "en-têtes doivent être des noms et des valeurs de style :rfc:`5322`, où le " @@ -74,8 +75,8 @@ msgstr "" "peut être un simple message texte, ou un objet binaire, ou une séquence " "structurée de sous-messages chacun avec son propre ensemble d'en-têtes et sa " "propre charge utile. Ce dernier type de charge utile est indiqué par le " -"message ayant un type MIME tel que :mimetype:`multipart/\\*` ou :mimetype:" -"`message/rfc822`." +"message ayant un type MIME tel que :mimetype:`multipart/\\*` " +"ou :mimetype:`message/rfc822`." #: library/email.compat32-message.rst:35 msgid "" @@ -104,8 +105,8 @@ msgid "" "matched case-insensitively. There may also be a single envelope header, " "also known as the *Unix-From* header or the ``From_`` header. The *payload* " "is either a string or bytes, in the case of simple message objects, or a " -"list of :class:`Message` objects, for MIME container documents (e.g. :" -"mimetype:`multipart/\\*` and :mimetype:`message/rfc822`)." +"list of :class:`Message` objects, for MIME container documents " +"(e.g. :mimetype:`multipart/\\*` and :mimetype:`message/rfc822`)." msgstr "" "Le pseudo-dictionnaire :class:`Message` est indicé par les noms d'en-tête, " "qui doivent être des valeurs ASCII. Les valeurs du dictionnaire sont des " @@ -117,8 +118,8 @@ msgstr "" "seul en-tête d'enveloppe, également appelé en-tête *Unix-From* ou en-tête " "``From_``. La *charge utile* est soit une chaîne ou des octets, dans le cas " "d'objets message simples, soit une liste d'objets :class:`Message`, pour les " -"documents conteneurs MIME (par exemple :mimetype:`multipart/\\*` et :" -"mimetype:`message/rfc822`)." +"documents conteneurs MIME (par exemple :mimetype:`multipart/\\*` " +"et :mimetype:`message/rfc822`)." #: library/email.compat32-message.rst:53 msgid "Here are the methods of the :class:`Message` class:" @@ -128,17 +129,18 @@ msgstr "Voici les méthodes de la classe :class:`Message` :" msgid "" "If *policy* is specified (it must be an instance of a :mod:`~email.policy` " "class) use the rules it specifies to update and serialize the representation " -"of the message. If *policy* is not set, use the :class:`compat32 ` policy, which maintains backward compatibility with the " -"Python 3.2 version of the email package. For more information see the :mod:" -"`~email.policy` documentation." -msgstr "" -"Si *policy* est spécifié (il doit s'agir d'une instance d'une classe :mod:" -"`~email.policy`), utilise les règles spécifiées pour mettre à jour et " -"sérialiser la représentation du message. Si *policy* n'est pas défini, " -"utilise les règles :class:`compat32 `, qui maintient " -"la rétrocompatibilité avec la version Python 3.2 du paquet de messagerie. " -"Pour plus d'informations, consultez la documentation :mod:`~email.policy`." +"of the message. If *policy* is not set, use the :class:`compat32 " +"` policy, which maintains backward compatibility with " +"the Python 3.2 version of the email package. For more information see " +"the :mod:`~email.policy` documentation." +msgstr "" +"Si *policy* est spécifié (il doit s'agir d'une instance d'une " +"classe :mod:`~email.policy`), utilise les règles spécifiées pour mettre à " +"jour et sérialiser la représentation du message. Si *policy* n'est pas " +"défini, utilise les règles :class:`compat32 `, qui " +"maintient la rétrocompatibilité avec la version Python 3.2 du paquet de " +"messagerie. Pour plus d'informations, consultez la " +"documentation :mod:`~email.policy`." # suit un : #: library/email.compat32-message.rst:65 @@ -174,33 +176,35 @@ msgid "" "defaults need to be filled in to complete the transformation to a string " "(for example, MIME boundaries may be generated or modified)." msgstr "" -"L'aplatissement du message peut déclencher des changements dans :class:" -"`Message` si les valeurs par défaut doivent être renseignées pour terminer " -"la transformation en chaîne (par exemple, les limites MIME peuvent être " -"générées ou modifiées)." +"L'aplatissement du message peut déclencher des changements " +"dans :class:`Message` si les valeurs par défaut doivent être renseignées " +"pour terminer la transformation en chaîne (par exemple, les limites MIME " +"peuvent être générées ou modifiées)." #: library/email.compat32-message.rst:84 msgid "" "Note that this method is provided as a convenience and may not always format " "the message the way you want. For example, by default it does not do the " "mangling of lines that begin with ``From`` that is required by the Unix mbox " -"format. For more flexibility, instantiate a :class:`~email.generator." -"Generator` instance and use its :meth:`~email.generator.Generator.flatten` " -"method directly. For example::" +"format. For more flexibility, instantiate " +"a :class:`~email.generator.Generator` instance and use " +"its :meth:`~email.generator.Generator.flatten` method directly. For " +"example::" msgstr "" "Notez que cette méthode est fournie à titre de commodité et peut ne pas " "toujours formater le message comme vous le souhaitez. Par exemple, par " "défaut, elle ne reformate pas les lignes qui commencent par ``From`` qui est " "requis par le format *mbox* Unix. Pour plus de flexibilité, instanciez une " -"instance :class:`~email.generator.Generator` et utilisez sa méthode :meth:" -"`~email.generator.Generator.flatten` directement. Par exemple ::" +"instance :class:`~email.generator.Generator` et utilisez sa " +"méthode :meth:`~email.generator.Generator.flatten` directement. Par " +"exemple ::" #: library/email.compat32-message.rst:98 msgid "" "If the message object contains binary data that is not encoded according to " "RFC standards, the non-compliant data will be replaced by unicode \"unknown " -"character\" code points. (See also :meth:`.as_bytes` and :class:`~email." -"generator.BytesGenerator`.)" +"character\" code points. (See also :meth:`.as_bytes` " +"and :class:`~email.generator.BytesGenerator`.)" msgstr "" "Si l'objet message contient des données binaires qui ne sont pas encodées " "selon les normes RFC, les données non conformes seront remplacées par des " @@ -242,16 +246,18 @@ msgid "" "Note that this method is provided as a convenience and may not always format " "the message the way you want. For example, by default it does not do the " "mangling of lines that begin with ``From`` that is required by the Unix mbox " -"format. For more flexibility, instantiate a :class:`~email.generator." -"BytesGenerator` instance and use its :meth:`~email.generator.BytesGenerator." -"flatten` method directly. For example::" +"format. For more flexibility, instantiate " +"a :class:`~email.generator.BytesGenerator` instance and use " +"its :meth:`~email.generator.BytesGenerator.flatten` method directly. For " +"example::" msgstr "" "Notez que cette méthode est fournie à titre de commodité et peut ne pas " "toujours formater le message comme vous le souhaitez. Par exemple, par " "défaut, elle ne reformate pas les lignes qui commencent par ``From`` qui est " "requis par le format *mbox* Unix. Pour plus de flexibilité, instanciez une " -"instance :class:`~email.generator.BytesGenerator` et utilisez sa méthode :" -"meth:`~email.generator.BytesGenerator.flatten` directement. Par exemple ::" +"instance :class:`~email.generator.BytesGenerator` et utilisez sa " +"méthode :meth:`~email.generator.BytesGenerator.flatten` directement. Par " +"exemple ::" #: library/email.compat32-message.rst:146 #, fuzzy @@ -264,20 +270,21 @@ msgstr "" #: library/email.compat32-message.rst:154 msgid "" -"Return ``True`` if the message's payload is a list of sub-\\ :class:" -"`Message` objects, otherwise return ``False``. When :meth:`is_multipart` " -"returns ``False``, the payload should be a string object (which might be a " -"CTE encoded binary payload). (Note that :meth:`is_multipart` returning " -"``True`` does not necessarily mean that \"msg.get_content_maintype() == " -"'multipart'\" will return the ``True``. For example, ``is_multipart`` will " -"return ``True`` when the :class:`Message` is of type ``message/rfc822``.)" +"Return ``True`` if the message's payload is a list of sub-" +"\\ :class:`Message` objects, otherwise return ``False``. " +"When :meth:`is_multipart` returns ``False``, the payload should be a string " +"object (which might be a CTE encoded binary payload). (Note " +"that :meth:`is_multipart` returning ``True`` does not necessarily mean that " +"\"msg.get_content_maintype() == 'multipart'\" will return the ``True``. For " +"example, ``is_multipart`` will return ``True`` when the :class:`Message` is " +"of type ``message/rfc822``.)" msgstr "" "Renvoie ``True`` si la charge utile du message est une liste d'objets sous-" "\\ :class:`Message`, sinon renvoie ``False``. Lorsque :meth:`is_multipart` " "renvoie ``False``, la charge utile doit être un objet chaîne (qui peut être " "une charge utile binaire encodée CTE). (Notez que :meth:`is_multipart` " -"renvoyant ``True`` ne signifie pas nécessairement que ``msg." -"get_content_maintype() == 'multipart'`` renvoie ``True``. Par exemple, " +"renvoyant ``True`` ne signifie pas nécessairement que " +"``msg.get_content_maintype() == 'multipart'`` renvoie ``True``. Par exemple, " "``is_multipart`` renvoie ``True`` lorsque le :class:`Message` est de type " "``message/rfc822``.)" @@ -311,14 +318,17 @@ msgstr "" "chaîne), utilisez :meth:`set_payload` à la place." #: library/email.compat32-message.rst:183 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." -"set_content` and the related ``make`` and ``add`` methods." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced " +"by :meth:`~email.message.EmailMessage.set_content` and the related ``make`` " +"and ``add`` methods." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage` sa fonctionnalité est remplacée par :meth:`~email.message." -"EmailMessage.set_content` et les méthodes associées ``make`` et ``add``." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage` sa fonctionnalité est " +"remplacée par :meth:`~email.message.EmailMessage.set_content` et les " +"méthodes associées ``make`` et ``add``." #: library/email.compat32-message.rst:191 msgid "" @@ -327,11 +337,11 @@ msgid "" "is ``False``. If the payload is a list and you mutate the list object, you " "modify the message's payload in place." msgstr "" -"Renvoie la charge utile actuelle, qui est une liste d'objets :class:" -"`Message` lorsque :meth:`is_multipart` est ``True``, ou une chaîne lorsque :" -"meth:`is_multipart` est ``False``. Si la charge utile est une liste et que " -"vous modifiez l'objet liste, vous modifiez la charge utile du message « sur " -"place »." +"Renvoie la charge utile actuelle, qui est une liste " +"d'objets :class:`Message` lorsque :meth:`is_multipart` est ``True``, ou une " +"chaîne lorsque :meth:`is_multipart` est ``False``. Si la charge utile est " +"une liste et que vous modifiez l'objet liste, vous modifiez la charge utile " +"du message « sur place »." #: library/email.compat32-message.rst:196 msgid "" @@ -339,8 +349,8 @@ msgid "" "element of the payload, counting from zero, if :meth:`is_multipart` is " "``True``. An :exc:`IndexError` will be raised if *i* is less than 0 or " "greater than or equal to the number of items in the payload. If the payload " -"is a string (i.e. :meth:`is_multipart` is ``False``) and *i* is given, a :" -"exc:`TypeError` is raised." +"is a string (i.e. :meth:`is_multipart` is ``False``) and *i* is given, " +"a :exc:`TypeError` is raised." msgstr "" "Avec l'argument optionnel *i*, :meth:`get_payload` renvoie le *i*:sup:`ème` " "élément de la charge utile, en partant de zéro, si :meth:`is_multipart` vaut " @@ -375,19 +385,20 @@ msgstr "" "que l'indicateur *decode* est ``True``, alors ``None`` est renvoyé. Si la " "charge utile est en base64 et qu'elle n'a pas été parfaitement formée " "(remplissage manquant, caractères en dehors de l'alphabet base64), alors un " -"défaut approprié est ajouté à la propriété de défaut du message (:class:" -"`~email.errors.InvalidBase64PaddingDefect` ou :class:`~email.errors." -"InvalidBase64CharactersDefect`, respectivement)." +"défaut approprié est ajouté à la propriété de défaut du message " +"(:class:`~email.errors.InvalidBase64PaddingDefect` " +"ou :class:`~email.errors.InvalidBase64CharactersDefect`, respectivement)." #: library/email.compat32-message.rst:217 msgid "" "When *decode* is ``False`` (the default) the body is returned as a string " "without decoding the :mailheader:`Content-Transfer-Encoding`. However, for " "a :mailheader:`Content-Transfer-Encoding` of 8bit, an attempt is made to " -"decode the original bytes using the ``charset`` specified by the :mailheader:" -"`Content-Type` header, using the ``replace`` error handler. If no " -"``charset`` is specified, or if the ``charset`` given is not recognized by " -"the email package, the body is decoded using the default ASCII charset." +"decode the original bytes using the ``charset`` specified by " +"the :mailheader:`Content-Type` header, using the ``replace`` error handler. " +"If no ``charset`` is specified, or if the ``charset`` given is not " +"recognized by the email package, the body is decoded using the default ASCII " +"charset." msgstr "" "Lorsque *decode* est ``False`` (valeur par défaut), le corps est renvoyé " "sous forme de chaîne sans décoder le :mailheader:`Content-Transfer-" @@ -400,14 +411,17 @@ msgstr "" "défaut." #: library/email.compat32-message.rst:226 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." -"get_content` and :meth:`~email.message.EmailMessage.iter_parts`." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced " +"by :meth:`~email.message.EmailMessage.get_content` " +"and :meth:`~email.message.EmailMessage.iter_parts`." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage` sa fonctionnalité est remplacée par :meth:`~email.message." -"EmailMessage.get_content` et :meth:`~email.message.EmailMessage.iter_parts`." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage` sa fonctionnalité est " +"remplacée par :meth:`~email.message.EmailMessage.get_content` " +"et :meth:`~email.message.EmailMessage.iter_parts`." #: library/email.compat32-message.rst:234 msgid "" @@ -421,72 +435,76 @@ msgstr "" "voir :meth:`set_charset` pour plus de détails." #: library/email.compat32-message.rst:238 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." -"set_content`." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced " +"by :meth:`~email.message.EmailMessage.set_content`." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage` sa fonctionnalité est remplacée par :meth:`~email.message." -"EmailMessage.set_content`." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage` sa fonctionnalité est " +"remplacée par :meth:`~email.message.EmailMessage.set_content`." #: library/email.compat32-message.rst:245 msgid "" -"Set the character set of the payload to *charset*, which can either be a :" -"class:`~email.charset.Charset` instance (see :mod:`email.charset`), a string " -"naming a character set, or ``None``. If it is a string, it will be " +"Set the character set of the payload to *charset*, which can either be " +"a :class:`~email.charset.Charset` instance (see :mod:`email.charset`), a " +"string naming a character set, or ``None``. If it is a string, it will be " "converted to a :class:`~email.charset.Charset` instance. If *charset* is " -"``None``, the ``charset`` parameter will be removed from the :mailheader:" -"`Content-Type` header (the message will not be otherwise modified). " -"Anything else will generate a :exc:`TypeError`." +"``None``, the ``charset`` parameter will be removed from " +"the :mailheader:`Content-Type` header (the message will not be otherwise " +"modified). Anything else will generate a :exc:`TypeError`." msgstr "" "Définit le jeu de caractères de la charge utile à *charset*, qui peut être " -"soit une instance de :class:`~email.charset.Charset` (voir :mod:`email." -"charset`), une chaîne nommant un jeu de caractères ou ``None``. S'il s'agit " -"d'une chaîne, elle est convertie en une instance :class:`~email.charset." -"Charset`. Si *charset* est ``None``, le paramètre ``charset`` est supprimé " -"de l'en-tête :mailheader:`Content-Type` (le message n'est pas modifié " -"autrement). Tout le reste lève une :exc:`TypeError`." +"soit une instance de :class:`~email.charset.Charset` " +"(voir :mod:`email.charset`), une chaîne nommant un jeu de caractères ou " +"``None``. S'il s'agit d'une chaîne, elle est convertie en une " +"instance :class:`~email.charset.Charset`. Si *charset* est ``None``, le " +"paramètre ``charset`` est supprimé de l'en-tête :mailheader:`Content-Type` " +"(le message n'est pas modifié autrement). Tout le reste lève " +"une :exc:`TypeError`." #: library/email.compat32-message.rst:253 msgid "" "If there is no existing :mailheader:`MIME-Version` header one will be " "added. If there is no existing :mailheader:`Content-Type` header, one will " -"be added with a value of :mimetype:`text/plain`. Whether the :mailheader:" -"`Content-Type` header already exists or not, its ``charset`` parameter will " -"be set to *charset.output_charset*. If *charset.input_charset* and " -"*charset.output_charset* differ, the payload will be re-encoded to the " -"*output_charset*. If there is no existing :mailheader:`Content-Transfer-" -"Encoding` header, then the payload will be transfer-encoded, if needed, " -"using the specified :class:`~email.charset.Charset`, and a header with the " -"appropriate value will be added. If a :mailheader:`Content-Transfer-" -"Encoding` header already exists, the payload is assumed to already be " -"correctly encoded using that :mailheader:`Content-Transfer-Encoding` and is " -"not modified." +"be added with a value of :mimetype:`text/plain`. Whether " +"the :mailheader:`Content-Type` header already exists or not, its ``charset`` " +"parameter will be set to *charset.output_charset*. If " +"*charset.input_charset* and *charset.output_charset* differ, the payload " +"will be re-encoded to the *output_charset*. If there is no " +"existing :mailheader:`Content-Transfer-Encoding` header, then the payload " +"will be transfer-encoded, if needed, using the " +"specified :class:`~email.charset.Charset`, and a header with the appropriate " +"value will be added. If a :mailheader:`Content-Transfer-Encoding` header " +"already exists, the payload is assumed to already be correctly encoded using " +"that :mailheader:`Content-Transfer-Encoding` and is not modified." msgstr "" "S'il n'y a pas d'en-tête :mailheader:`MIME-Version` existant, un en-tête est " "ajouté. S'il n'y a pas d'en-tête :mailheader:`Content-Type`, un en-tête est " -"ajouté avec une valeur de :mimetype:`text/plain`. Que l'en-tête :mailheader:" -"`Content-Type` existe déjà ou non, son paramètre ``charset`` est défini sur " -"*charset.output_charset*. Si *charset.input_charset* et *charset." -"output_charset* diffèrent, la charge utile est ré-encodée dans le " -"*output_charset*. S'il n'y a pas d'en-tête :mailheader:`Content-Transfer-" -"Encoding` existant, alors la charge utile est encodée par transfert, si " -"nécessaire, en utilisant le :class:`~email.charset.Charset` spécifié et un " -"en-tête avec cette valeur est ajouté. Si un en-tête :mailheader:`Content-" -"Transfer-Encoding` existe déjà, la charge utile est supposée être déjà " -"correctement encodée à l'aide de cet en-tête :mailheader:`Content-Transfer-" -"Encoding` et n'est pas modifiée." +"ajouté avec une valeur de :mimetype:`text/plain`. Que l'en-" +"tête :mailheader:`Content-Type` existe déjà ou non, son paramètre " +"``charset`` est défini sur *charset.output_charset*. Si " +"*charset.input_charset* et *charset.output_charset* diffèrent, la charge " +"utile est ré-encodée dans le *output_charset*. S'il n'y a pas d'en-" +"tête :mailheader:`Content-Transfer-Encoding` existant, alors la charge utile " +"est encodée par transfert, si nécessaire, en utilisant " +"le :class:`~email.charset.Charset` spécifié et un en-tête avec cette valeur " +"est ajouté. Si un en-tête :mailheader:`Content-Transfer-Encoding` existe " +"déjà, la charge utile est supposée être déjà correctement encodée à l'aide " +"de cet en-tête :mailheader:`Content-Transfer-Encoding` et n'est pas modifiée." #: library/email.compat32-message.rst:267 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the *charset* parameter of the :meth:" -"`email.emailmessage.EmailMessage.set_content` method." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the *charset* parameter of " +"the :meth:`email.message.EmailMessage.set_content` method." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage` sa fonctionnalité est remplacée par le paramètre *charset* de " -"la méthode :meth:`email.emailmessage.EmailMessage.set_content`." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage` sa fonctionnalité est " +"remplacée par le paramètre *charset* de la " +"méthode :meth:`email.emailmessage.EmailMessage.set_content`." #: library/email.compat32-message.rst:275 msgid "" @@ -497,12 +515,14 @@ msgstr "" "utile du message." #: library/email.compat32-message.rst:278 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class it always returns ``None``." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"it always returns ``None``." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage`, elle renvoie toujours ``None``." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage`, elle renvoie toujours " +"``None``." #: library/email.compat32-message.rst:283 msgid "" @@ -511,10 +531,11 @@ msgid "" "differences between these methods and a normal mapping (i.e. dictionary) " "interface. For example, in a dictionary there are no duplicate keys, but " "here there may be duplicate message headers. Also, in dictionaries there is " -"no guaranteed order to the keys returned by :meth:`keys`, but in a :class:" -"`Message` object, headers are always returned in the order they appeared in " -"the original message, or were added to the message later. Any header " -"deleted and then re-added are always appended to the end of the header list." +"no guaranteed order to the keys returned by :meth:`keys`, but in " +"a :class:`Message` object, headers are always returned in the order they " +"appeared in the original message, or were added to the message later. Any " +"header deleted and then re-added are always appended to the end of the " +"header list." msgstr "" "Les méthodes suivantes implémentent une interface de type correspondance " "pour accéder aux en-têtes :rfc:`2822` du message. Notez qu'il existe des " @@ -553,8 +574,8 @@ msgid "" msgstr "" "Dans un modèle généré à partir d'octets, toutes les valeurs d'en-tête qui " "(en violation des RFC) contiennent des octets non-ASCII sont, lorsqu'elles " -"sont récupérées via cette interface, représentées comme des objets :class:" -"`~email.header.Header` avec un *charset* à ``unknown-8bit``." +"sont récupérées via cette interface, représentées comme des " +"objets :class:`~email.header.Header` avec un *charset* à ``unknown-8bit``." #: library/email.compat32-message.rst:307 msgid "Return the total number of headers, including duplicates." @@ -573,8 +594,8 @@ msgstr "" #: library/email.compat32-message.rst:322 msgid "" "Return the value of the named header field. *name* should not include the " -"colon field separator. If the header is missing, ``None`` is returned; a :" -"exc:`KeyError` is never raised." +"colon field separator. If the header is missing, ``None`` is returned; " +"a :exc:`KeyError` is never raised." msgstr "" "Renvoie la valeur du champ d'en-tête désigné. *name* ne doit pas inclure le " "séparateur de champ deux-points. Si l'en-tête est manquant, ``None`` est " @@ -588,8 +609,9 @@ msgid "" "headers." msgstr "" "Notez que si le champ désigné apparaît plus d'une fois dans les en-têtes du " -"message, la valeur exacte renvoyée n'est pas définie. Utilisez la méthode :" -"meth:`get_all` pour obtenir les valeurs de tous les en-têtes existants." +"message, la valeur exacte renvoyée n'est pas définie. Utilisez la " +"méthode :meth:`get_all` pour obtenir les valeurs de tous les en-têtes " +"existants." #: library/email.compat32-message.rst:334 msgid "" @@ -639,13 +661,13 @@ msgstr "" #: library/email.compat32-message.rst:370 #, fuzzy msgid "" -"Return the value of the named header field. This is identical to :meth:" -"`~object.__getitem__` except that optional *failobj* is returned if the " -"named header is missing (defaults to ``None``)." +"Return the value of the named header field. This is identical " +"to :meth:`~object.__getitem__` except that optional *failobj* is returned if " +"the named header is missing (defaults to ``None``)." msgstr "" -"Renvoie la valeur du champ d'en-tête désigné. C'est identique à :meth:" -"`__getitem__` sauf que *failobj* est renvoyé si l'en-tête désigné est " -"manquant (facultatif, par défaut à ``None``)." +"Renvoie la valeur du champ d'en-tête désigné. C'est identique " +"à :meth:`__getitem__` sauf que *failobj* est renvoyé si l'en-tête désigné " +"est manquant (facultatif, par défaut à ``None``)." #: library/email.compat32-message.rst:374 msgid "Here are some additional useful methods:" @@ -668,10 +690,10 @@ msgid "" "arguments. *_name* is the header field to add and *_value* is the *primary* " "value for the header." msgstr "" -"Définition de paramètres d'en-têtes étendus. Cette méthode est similaire à :" -"meth:`__setitem__` sauf que des paramètres d'en-tête supplémentaires peuvent " -"être fournis en tant qu'arguments nommés. *_name* est le champ d'en-tête à " -"ajouter et *_value* est la valeur *primaire* de l'en-tête." +"Définition de paramètres d'en-têtes étendus. Cette méthode est similaire " +"à :meth:`__setitem__` sauf que des paramètres d'en-tête supplémentaires " +"peuvent être fournis en tant qu'arguments nommés. *_name* est le champ d'en-" +"tête à ajouter et *_value* est la valeur *primaire* de l'en-tête." #: library/email.compat32-message.rst:391 msgid "" @@ -682,11 +704,11 @@ msgid "" "key will be added. If the value contains non-ASCII characters, it can be " "specified as a three tuple in the format ``(CHARSET, LANGUAGE, VALUE)``, " "where ``CHARSET`` is a string naming the charset to be used to encode the " -"value, ``LANGUAGE`` can usually be set to ``None`` or the empty string (see :" -"rfc:`2231` for other possibilities), and ``VALUE`` is the string value " +"value, ``LANGUAGE`` can usually be set to ``None`` or the empty string " +"(see :rfc:`2231` for other possibilities), and ``VALUE`` is the string value " "containing non-ASCII code points. If a three tuple is not passed and the " -"value contains non-ASCII characters, it is automatically encoded in :rfc:" -"`2231` format using a ``CHARSET`` of ``utf-8`` and a ``LANGUAGE`` of " +"value contains non-ASCII characters, it is automatically encoded " +"in :rfc:`2231` format using a ``CHARSET`` of ``utf-8`` and a ``LANGUAGE`` of " "``None``." msgstr "" "Pour chaque élément du dictionnaire d'arguments nommés *_params*, la clé est " @@ -728,24 +750,24 @@ msgid "" msgstr "" "Remplace un en-tête. Remplace le premier en-tête trouvé dans le message qui " "correspond à *_name*, en conservant l'ordre des en-têtes et la casse des " -"noms de champs. Si aucun en-tête correspondant n'a été trouvé, une :exc:" -"`KeyError` est levée." +"noms de champs. Si aucun en-tête correspondant n'a été trouvé, " +"une :exc:`KeyError` est levée." #: library/email.compat32-message.rst:432 msgid "" "Return the message's content type. The returned string is coerced to lower " -"case of the form :mimetype:`maintype/subtype`. If there was no :mailheader:" -"`Content-Type` header in the message the default type as given by :meth:" -"`get_default_type` will be returned. Since according to :rfc:`2045`, " -"messages always have a default type, :meth:`get_content_type` will always " -"return a value." +"case of the form :mimetype:`maintype/subtype`. If there was " +"no :mailheader:`Content-Type` header in the message the default type as " +"given by :meth:`get_default_type` will be returned. Since according " +"to :rfc:`2045`, messages always have a default " +"type, :meth:`get_content_type` will always return a value." msgstr "" "Renvoie le type de contenu du message. La chaîne renvoyée est convertie en " "minuscules sous la forme :mimetype:`maintype/subtype`. S'il n'y avait pas " "d'en-tête :mailheader:`Content-Type` dans le message, le type par défaut tel " -"qu'indiqué par :meth:`get_default_type` est renvoyé. Puisque selon la :rfc:" -"`2045`, les messages ont toujours un type par défaut, :meth:" -"`get_content_type` renvoie toujours une valeur." +"qu'indiqué par :meth:`get_default_type` est renvoyé. Puisque selon " +"la :rfc:`2045`, les messages ont toujours un type par " +"défaut, :meth:`get_content_type` renvoie toujours une valeur." #: library/email.compat32-message.rst:439 msgid "" @@ -755,33 +777,36 @@ msgid "" "Type` header has an invalid type specification, :rfc:`2045` mandates that " "the default type be :mimetype:`text/plain`." msgstr "" -"La :rfc:`2045` définit le type par défaut d'un message comme étant :mimetype:" -"`text/plain` sauf s'il apparaît dans un conteneur :mimetype:`multipart/" -"digest`, auquel cas ce serait :mimetype:`message/rfc822`. Si l'en-tête :" -"mailheader:`Content-Type` a une spécification de type invalide, la :rfc:" -"`2045` exige que le type par défaut soit :mimetype:`text/plain`." +"La :rfc:`2045` définit le type par défaut d'un message comme " +"étant :mimetype:`text/plain` sauf s'il apparaît dans un " +"conteneur :mimetype:`multipart/digest`, auquel cas ce " +"serait :mimetype:`message/rfc822`. Si l'en-tête :mailheader:`Content-Type` a " +"une spécification de type invalide, la :rfc:`2045` exige que le type par " +"défaut soit :mimetype:`text/plain`." #: library/email.compat32-message.rst:448 msgid "" "Return the message's main content type. This is the :mimetype:`maintype` " "part of the string returned by :meth:`get_content_type`." msgstr "" -"Renvoie le type de contenu principal du message. C'est la partie :mimetype:" -"`maintype` de la chaîne renvoyée par :meth:`get_content_type`." +"Renvoie le type de contenu principal du message. C'est la " +"partie :mimetype:`maintype` de la chaîne renvoyée " +"par :meth:`get_content_type`." #: library/email.compat32-message.rst:454 msgid "" "Return the message's sub-content type. This is the :mimetype:`subtype` part " "of the string returned by :meth:`get_content_type`." msgstr "" -"Renvoie le type de sous-contenu du message. C'est la partie :mimetype:" -"`subtype` de la chaîne renvoyée par :meth:`get_content_type`." +"Renvoie le type de sous-contenu du message. C'est la " +"partie :mimetype:`subtype` de la chaîne renvoyée " +"par :meth:`get_content_type`." #: library/email.compat32-message.rst:460 msgid "" "Return the default content type. Most messages have a default content type " -"of :mimetype:`text/plain`, except for messages that are subparts of :" -"mimetype:`multipart/digest` containers. Such subparts have a default " +"of :mimetype:`text/plain`, except for messages that are subparts " +"of :mimetype:`multipart/digest` containers. Such subparts have a default " "content type of :mimetype:`message/rfc822`." msgstr "" "Renvoie le type de contenu par défaut. La plupart des messages ont un type " @@ -797,8 +822,8 @@ msgid "" msgstr "" "Définit le type de contenu par défaut. *ctype* doit être :mimetype:`text/" "plain` ou :mimetype:`message/rfc822`, bien que cela ne soit pas appliqué. Le " -"type de contenu par défaut n'est pas stocké dans l'en-tête :mailheader:" -"`Content-Type`." +"type de contenu par défaut n'est pas stocké dans l'en-" +"tête :mailheader:`Content-Type`." #: library/email.compat32-message.rst:476 msgid "" @@ -806,8 +831,9 @@ msgid "" "elements of the returned list are 2-tuples of key/value pairs, as split on " "the ``'='`` sign. The left hand side of the ``'='`` is the key, while the " "right hand side is the value. If there is no ``'='`` sign in the parameter " -"the value is the empty string, otherwise the value is as described in :meth:" -"`get_param` and is unquoted if optional *unquote* is ``True`` (the default)." +"the value is the empty string, otherwise the value is as described " +"in :meth:`get_param` and is unquoted if optional *unquote* is ``True`` (the " +"default)." msgstr "" "Renvoie les paramètres :mailheader:`Content-Type` du message, sous forme de " "liste. Les éléments de la liste renvoyée sont des couples clé-valeur, ayant " @@ -819,24 +845,26 @@ msgstr "" #: library/email.compat32-message.rst:484 msgid "" -"Optional *failobj* is the object to return if there is no :mailheader:" -"`Content-Type` header. Optional *header* is the header to search instead " -"of :mailheader:`Content-Type`." +"Optional *failobj* is the object to return if there is " +"no :mailheader:`Content-Type` header. Optional *header* is the header to " +"search instead of :mailheader:`Content-Type`." msgstr "" -"*failobj* (facultatif) est l'objet à renvoyer s'il n'y a pas d'en-tête :" -"mailheader:`Content-Type`. *header* (facultatif) est l'en-tête à rechercher " -"au lieu de :mailheader:`Content-Type`." +"*failobj* (facultatif) est l'objet à renvoyer s'il n'y a pas d'en-" +"tête :mailheader:`Content-Type`. *header* (facultatif) est l'en-tête à " +"rechercher au lieu de :mailheader:`Content-Type`." #: library/email.compat32-message.rst:488 #: library/email.compat32-message.rst:526 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the *params* property of the " -"individual header objects returned by the header access methods." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the *params* property of the individual " +"header objects returned by the header access methods." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage`, sa fonctionnalité est remplacée par la propriété *params* des " -"objets d'en-tête individuels renvoyés par les méthodes d'accès aux en-têtes." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage`, sa fonctionnalité est " +"remplacée par la propriété *params* des objets d'en-tête individuels " +"renvoyés par les méthodes d'accès aux en-têtes." #: library/email.compat32-message.rst:496 msgid "" @@ -846,14 +874,14 @@ msgid "" "(defaults to ``None``)." msgstr "" "Renvoie la valeur du paramètre *param* de l'en-tête :mailheader:`Content-" -"Type` sous forme de chaîne. Si le message n'a pas d'en-tête :mailheader:" -"`Content-Type` ou s'il n'y a pas un tel paramètre, alors *failobj* est " -"renvoyé (par défaut à ``None``)." +"Type` sous forme de chaîne. Si le message n'a pas d'en-" +"tête :mailheader:`Content-Type` ou s'il n'y a pas un tel paramètre, alors " +"*failobj* est renvoyé (par défaut à ``None``)." #: library/email.compat32-message.rst:501 msgid "" -"Optional *header* if given, specifies the message header to use instead of :" -"mailheader:`Content-Type`." +"Optional *header* if given, specifies the message header to use instead " +"of :mailheader:`Content-Type`." msgstr "" "*header* s'il est fourni, spécifie l'en-tête de message à utiliser à la " "place de :mailheader:`Content-Type`." @@ -877,11 +905,12 @@ msgstr "" #: library/email.compat32-message.rst:512 msgid "" -"If your application doesn't care whether the parameter was encoded as in :" -"rfc:`2231`, you can collapse the parameter value by calling :func:`email." -"utils.collapse_rfc2231_value`, passing in the return value from :meth:" -"`get_param`. This will return a suitably decoded Unicode string when the " -"value is a tuple, or the original string unquoted if it isn't. For example::" +"If your application doesn't care whether the parameter was encoded as " +"in :rfc:`2231`, you can collapse the parameter value by " +"calling :func:`email.utils.collapse_rfc2231_value`, passing in the return " +"value from :meth:`get_param`. This will return a suitably decoded Unicode " +"string when the value is a tuple, or the original string unquoted if it " +"isn't. For example::" msgstr "" "Si votre application ne se soucie pas de savoir si le paramètre a été encodé " "conformément à la :rfc:`2231`, vous pouvez réduire la valeur du paramètre en " @@ -955,8 +984,8 @@ msgid "" "Remove the given parameter completely from the :mailheader:`Content-Type` " "header. The header will be re-written in place without the parameter or its " "value. All values will be quoted as necessary unless *requote* is ``False`` " -"(the default is ``True``). Optional *header* specifies an alternative to :" -"mailheader:`Content-Type`." +"(the default is ``True``). Optional *header* specifies an alternative " +"to :mailheader:`Content-Type`." msgstr "" "Supprime complètement le paramètre donné de l'en-tête :mailheader:`Content-" "Type`. L'en-tête est réécrit « sur place » sans le paramètre ou sa valeur. " @@ -988,22 +1017,23 @@ msgstr "" #: library/email.compat32-message.rst:577 msgid "" -"An alternative header can be specified in the *header* argument. When the :" -"mailheader:`Content-Type` header is set a :mailheader:`MIME-Version` header " -"is also added." +"An alternative header can be specified in the *header* argument. When " +"the :mailheader:`Content-Type` header is set a :mailheader:`MIME-Version` " +"header is also added." msgstr "" "Un en-tête alternatif peut être spécifié dans l'argument *header*. Lorsque " -"l'en-tête :mailheader:`Content-Type` est défini, un en-tête :mailheader:" -"`MIME-Version` est également ajouté." +"l'en-tête :mailheader:`Content-Type` est défini, un en-" +"tête :mailheader:`MIME-Version` est également ajouté." #: library/email.compat32-message.rst:581 +#, fuzzy msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the ``make_`` and ``add_`` methods." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the ``make_`` and ``add_`` methods." msgstr "" -"Il s'agit d'une ancienne méthode. Dans la classe :class:`~email.emailmessage." -"EmailMessage` sa fonctionnalité est remplacée par les méthodes ``make_`` et " -"``add_``." +"Il s'agit d'une ancienne méthode. Dans la " +"classe :class:`~email.emailmessage.EmailMessage` sa fonctionnalité est " +"remplacée par les méthodes ``make_`` et ``add_``." #: library/email.compat32-message.rst:588 msgid "" @@ -1014,12 +1044,13 @@ msgid "" "the header is missing, then *failobj* is returned. The returned string will " "always be unquoted as per :func:`email.utils.unquote`." msgstr "" -"Renvoie la valeur du paramètre ``filename`` de l'en-tête :mailheader:" -"`Content-Disposition` du message. Si l'en-tête n'a pas de paramètre " -"``filename``, cette méthode revient à rechercher le paramètre ``name`` dans " -"l'en-tête :mailheader:`Content-Type`. Si aucun n'est trouvé, ou si l'en-tête " -"est manquant, alors *failobj* est renvoyé. La chaîne renvoyée est toujours " -"sans guillemets comme indiqué par :func:`email.utils.unquote`." +"Renvoie la valeur du paramètre ``filename`` de l'en-" +"tête :mailheader:`Content-Disposition` du message. Si l'en-tête n'a pas de " +"paramètre ``filename``, cette méthode revient à rechercher le paramètre " +"``name`` dans l'en-tête :mailheader:`Content-Type`. Si aucun n'est trouvé, " +"ou si l'en-tête est manquant, alors *failobj* est renvoyé. La chaîne " +"renvoyée est toujours sans guillemets comme indiqué " +"par :func:`email.utils.unquote`." #: library/email.compat32-message.rst:599 msgid "" @@ -1028,10 +1059,10 @@ msgid "" "or has no ``boundary`` parameter. The returned string will always be " "unquoted as per :func:`email.utils.unquote`." msgstr "" -"Renvoie la valeur du paramètre ``boundary`` de l'en-tête :mailheader:" -"`Content-Type` du message, ou *failobj* si l'en-tête est manquant ou n'a pas " -"de paramètre ``boundary``. La chaîne renvoyée est toujours sans guillemets " -"comme indiqué par :func:`email.utils.unquote`." +"Renvoie la valeur du paramètre ``boundary`` de l'en-" +"tête :mailheader:`Content-Type` du message, ou *failobj* si l'en-tête est " +"manquant ou n'a pas de paramètre ``boundary``. La chaîne renvoyée est " +"toujours sans guillemets comme indiqué par :func:`email.utils.unquote`." #: library/email.compat32-message.rst:607 msgid "" @@ -1047,20 +1078,20 @@ msgstr "" #: library/email.compat32-message.rst:612 msgid "" -"Note that using this method is subtly different than deleting the old :" -"mailheader:`Content-Type` header and adding a new one with the new boundary " -"via :meth:`add_header`, because :meth:`set_boundary` preserves the order of " -"the :mailheader:`Content-Type` header in the list of headers. However, it " -"does *not* preserve any continuation lines which may have been present in " -"the original :mailheader:`Content-Type` header." +"Note that using this method is subtly different than deleting the " +"old :mailheader:`Content-Type` header and adding a new one with the new " +"boundary via :meth:`add_header`, because :meth:`set_boundary` preserves the " +"order of the :mailheader:`Content-Type` header in the list of headers. " +"However, it does *not* preserve any continuation lines which may have been " +"present in the original :mailheader:`Content-Type` header." msgstr "" "Notez que l'utilisation de cette méthode est légèrement différente de la " "suppression de l'ancien en-tête :mailheader:`Content-Type` et de l'ajout " -"d'un nouveau avec la nouvelle limite via :meth:`add_header`, car :meth:" -"`set_boundary` préserve l'ordre des en-têtes :mailheader:`Content-Type` dans " -"la liste des en-têtes. Cependant, elle ne conserve *pas* les lignes de " -"continuation qui auraient pu être présentes dans l'en-tête original :" -"mailheader:`Content-Type`." +"d'un nouveau avec la nouvelle limite via :meth:`add_header`, " +"car :meth:`set_boundary` préserve l'ordre des en-têtes :mailheader:`Content-" +"Type` dans la liste des en-têtes. Cependant, elle ne conserve *pas* les " +"lignes de continuation qui auraient pu être présentes dans l'en-tête " +"original :mailheader:`Content-Type`." #: library/email.compat32-message.rst:622 msgid "" @@ -1074,8 +1105,8 @@ msgstr "" #: library/email.compat32-message.rst:626 msgid "" -"Note that this method differs from :meth:`get_charset` which returns the :" -"class:`~email.charset.Charset` instance for the default encoding of the " +"Note that this method differs from :meth:`get_charset` which returns " +"the :class:`~email.charset.Charset` instance for the default encoding of the " "message body." msgstr "" "Notez que cette méthode diffère de :meth:`get_charset` qui renvoie " @@ -1103,22 +1134,22 @@ msgid "" msgstr "" "Chaque élément de la liste est une chaîne qui est la valeur du paramètre " "``charset`` dans l'en-tête :mailheader:`Content-Type` pour la sous-partie " -"représentée. Cependant, si la sous-partie n'a pas d'en-tête :mailheader:" -"`Content-Type`, pas de paramètre ``charset``, ou n'est pas du type MIME " -"principal :mimetype:`text`, alors cet élément dans la liste renvoyée est " -"*failobj*." +"représentée. Cependant, si la sous-partie n'a pas d'en-" +"tête :mailheader:`Content-Type`, pas de paramètre ``charset``, ou n'est pas " +"du type MIME principal :mimetype:`text`, alors cet élément dans la liste " +"renvoyée est *failobj*." #: library/email.compat32-message.rst:646 msgid "" -"Return the lowercased value (without parameters) of the message's :" -"mailheader:`Content-Disposition` header if it has one, or ``None``. The " -"possible values for this method are *inline*, *attachment* or ``None`` if " -"the message follows :rfc:`2183`." +"Return the lowercased value (without parameters) of the " +"message's :mailheader:`Content-Disposition` header if it has one, or " +"``None``. The possible values for this method are *inline*, *attachment* or " +"``None`` if the message follows :rfc:`2183`." msgstr "" -"Renvoie la valeur en minuscules (sans paramètres) de l'en-tête :mailheader:" -"`Content-Disposition` du message s'il en a un, ou ``None``. Les valeurs " -"possibles pour cette méthode sont *inline*, *attachment* ou ``None`` si le " -"message suit la :rfc:`2183`." +"Renvoie la valeur en minuscules (sans paramètres) de l'en-" +"tête :mailheader:`Content-Disposition` du message s'il en a un, ou ``None``. " +"Les valeurs possibles pour cette méthode sont *inline*, *attachment* ou " +"``None`` si le message suit la :rfc:`2183`." #: library/email.compat32-message.rst:655 msgid "" @@ -1195,20 +1226,22 @@ msgid "" "The *preamble* attribute contains this leading extra-armor text for MIME " "documents. When the :class:`~email.parser.Parser` discovers some text after " "the headers but before the first boundary string, it assigns this text to " -"the message's *preamble* attribute. When the :class:`~email.generator." -"Generator` is writing out the plain text representation of a MIME message, " -"and it finds the message has a *preamble* attribute, it will write this text " -"in the area between the headers and the first boundary. See :mod:`email." -"parser` and :mod:`email.generator` for details." +"the message's *preamble* attribute. When " +"the :class:`~email.generator.Generator` is writing out the plain text " +"representation of a MIME message, and it finds the message has a *preamble* " +"attribute, it will write this text in the area between the headers and the " +"first boundary. See :mod:`email.parser` and :mod:`email.generator` for " +"details." msgstr "" "L'attribut *preamble* contient ce texte hors-cadre de tête pour les " "documents MIME. Lorsque :class:`~email.parser.Parser` découvre du texte " "après les en-têtes mais avant la première chaîne de délimitation, il " -"attribue ce texte à l'attribut *preamble* du message. Lorsque :class:`~email." -"generator.Generator` écrit la représentation en texte brut d'un message " -"MIME, et qu'il trouve que le message a un attribut *preamble*, il écrit ce " -"texte dans la zone entre les en-têtes et la première frontière. Voir :mod:" -"`email.parser` et :mod:`email.generator` pour plus de détails." +"attribue ce texte à l'attribut *preamble* du message. " +"Lorsque :class:`~email.generator.Generator` écrit la représentation en texte " +"brut d'un message MIME, et qu'il trouve que le message a un attribut " +"*preamble*, il écrit ce texte dans la zone entre les en-têtes et la première " +"frontière. Voir :mod:`email.parser` et :mod:`email.generator` pour plus de " +"détails." #: library/email.compat32-message.rst:741 msgid "" @@ -1230,12 +1263,13 @@ msgstr "" #: library/email.compat32-message.rst:751 msgid "" -"You do not need to set the epilogue to the empty string in order for the :" -"class:`~email.generator.Generator` to print a newline at the end of the file." +"You do not need to set the epilogue to the empty string in order for " +"the :class:`~email.generator.Generator` to print a newline at the end of the " +"file." msgstr "" -"Vous n'avez pas besoin de définir l'épilogue sur la chaîne vide pour que :" -"class:`~email.generator.Generator` imprime une nouvelle ligne à la fin du " -"fichier." +"Vous n'avez pas besoin de définir l'épilogue sur la chaîne vide pour " +"que :class:`~email.generator.Generator` imprime une nouvelle ligne à la fin " +"du fichier." #: library/email.compat32-message.rst:758 msgid "" diff --git a/library/email.contentmanager.po b/library/email.contentmanager.po index 090f96674..88b1e20d3 100644 --- a/library/email.contentmanager.po +++ b/library/email.contentmanager.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-10-29 22:15+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,15 +20,15 @@ msgstr "" msgid ":mod:`!email.contentmanager`: Managing MIME Content" msgstr ":mod:`email.contentmanager` : gestion du contenu MIME" -#: library/email.contentmanager.rst:10 +#: library/email.contentmanager.rst:7 msgid "**Source code:** :source:`Lib/email/contentmanager.py`" msgstr "**Code source :** :source:`Lib/email/contentmanager.py`" -#: library/email.contentmanager.rst:14 +#: library/email.contentmanager.rst:11 msgid "[1]_" msgstr "[1]_" -#: library/email.contentmanager.rst:19 +#: library/email.contentmanager.rst:16 msgid "" "Base class for content managers. Provides the standard registry mechanisms " "to register converters between MIME content and other representations, as " @@ -39,7 +39,7 @@ msgstr "" "et d'autres représentations, ainsi que les méthodes de répartition " "``get_content`` et ``set_content``." -#: library/email.contentmanager.rst:26 +#: library/email.contentmanager.rst:23 msgid "" "Look up a handler function based on the ``mimetype`` of *msg* (see next " "paragraph), call it, passing through all arguments, and return the result of " @@ -52,7 +52,7 @@ msgstr "" "utile de *msg* et renvoyer un objet qui encode les informations relatives " "aux données extraites." -#: library/email.contentmanager.rst:32 +#: library/email.contentmanager.rst:29 msgid "" "To find the handler, look for the following keys in the registry, stopping " "with the first one found:" @@ -60,19 +60,19 @@ msgstr "" "Pour trouver le gestionnaire, recherche les clés suivantes dans le registre, " "en s'arrêtant à la première trouvée :" -#: library/email.contentmanager.rst:35 +#: library/email.contentmanager.rst:32 msgid "the string representing the full MIME type (``maintype/subtype``)" msgstr "une chaîne représentant le type MIME complet (``maintype/subtype``) ;" -#: library/email.contentmanager.rst:36 +#: library/email.contentmanager.rst:33 msgid "the string representing the ``maintype``" msgstr "une chaîne représentant le ``maintype`` ;" -#: library/email.contentmanager.rst:37 +#: library/email.contentmanager.rst:34 msgid "the empty string" msgstr "une chaîne vide." -#: library/email.contentmanager.rst:39 +#: library/email.contentmanager.rst:36 msgid "" "If none of these keys produce a handler, raise a :exc:`KeyError` for the " "full MIME type." @@ -80,7 +80,7 @@ msgstr "" "Si aucune de ces clés ne produit de gestionnaire, lève une :exc:`KeyError` " "pour le type MIME complet." -#: library/email.contentmanager.rst:45 +#: library/email.contentmanager.rst:42 msgid "" "If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise " "look up a handler function based on the type of *obj* (see next paragraph), " @@ -92,14 +92,15 @@ msgid "" msgstr "" "Si le ``maintype`` est ``multipart``, lève une :exc:`TypeError` ; sinon " "recherche une fonction de gestion en se basant sur le type de *obj* (voir le " -"paragraphe suivant), appelle :meth:`~email.message.EmailMessage." -"clear_content` sur le *msg* et appelle la fonction de gestion en lui passant " -"tous les arguments. Le gestionnaire doit transformer et stocker *obj* en " -"*msg*, apportant éventuellement d'autres modifications à *msg* également, " -"comme l'ajout de divers en-têtes MIME pour coder les informations " -"nécessaires à l'interprétation des données stockées." - -#: library/email.contentmanager.rst:54 +"paragraphe suivant), " +"appelle :meth:`~email.message.EmailMessage.clear_content` sur le *msg* et " +"appelle la fonction de gestion en lui passant tous les arguments. Le " +"gestionnaire doit transformer et stocker *obj* en *msg*, apportant " +"éventuellement d'autres modifications à *msg* également, comme l'ajout de " +"divers en-têtes MIME pour coder les informations nécessaires à " +"l'interprétation des données stockées." + +#: library/email.contentmanager.rst:51 msgid "" "To find the handler, obtain the type of *obj* (``typ = type(obj)``), and " "look for the following keys in the registry, stopping with the first one " @@ -109,27 +110,27 @@ msgstr "" "type(obj)``) et recherche les clés suivantes dans le registre, en s'arrêtant " "à la première trouvée :" -#: library/email.contentmanager.rst:58 +#: library/email.contentmanager.rst:55 msgid "the type itself (``typ``)" msgstr "le type lui-même (``typ``) ;" -#: library/email.contentmanager.rst:59 +#: library/email.contentmanager.rst:56 msgid "" -"the type's fully qualified name (``typ.__module__ + '.' + typ." -"__qualname__``)." +"the type's fully qualified name (``typ.__module__ + '.' + " +"typ.__qualname__``)." msgstr "le nom complet du type (``typ.__module__ + '.' + typ.__qualname__``) ;" -#: library/email.contentmanager.rst:61 +#: library/email.contentmanager.rst:58 #, fuzzy msgid "the type's :attr:`qualname ` (``typ.__qualname__``)" msgstr "le nom qualifié du type (``typ.__qualname__``) ;" -#: library/email.contentmanager.rst:62 +#: library/email.contentmanager.rst:59 #, fuzzy msgid "the type's :attr:`name ` (``typ.__name__``)." msgstr "le nom du type (``typ.__name__``)." -#: library/email.contentmanager.rst:64 +#: library/email.contentmanager.rst:61 #, fuzzy msgid "" "If none of the above match, repeat all of the checks above for each of the " @@ -144,7 +145,7 @@ msgstr "" "pour la clé ``None``. S'il n'y a pas de gestionnaire pour ``None``, lève " "une :exc:`KeyError` pour le nom complet du type." -#: library/email.contentmanager.rst:71 +#: library/email.contentmanager.rst:68 msgid "" "Also add a :mailheader:`MIME-Version` header if one is not present (see " "also :class:`.MIMEPart`)." @@ -152,7 +153,7 @@ msgstr "" "Ajoute également un en-tête :mailheader:`MIME-Version` s'il n'y en a pas " "(voir aussi :class:`.MIMEPart`)." -#: library/email.contentmanager.rst:77 +#: library/email.contentmanager.rst:74 msgid "" "Record the function *handler* as the handler for *key*. For the possible " "values of *key*, see :meth:`get_content`." @@ -160,7 +161,7 @@ msgstr "" "Enregistre la fonction *handler* comme gestionnaire pour *key*. Pour les " "valeurs possibles de *key*, voir :meth:`get_content`." -#: library/email.contentmanager.rst:83 +#: library/email.contentmanager.rst:80 msgid "" "Record *handler* as the function to call when an object of a type matching " "*typekey* is passed to :meth:`set_content`. For the possible values of " @@ -170,24 +171,25 @@ msgstr "" "correspondant à *typekey* est passé à :meth:`set_content`. Pour les valeurs " "possibles de *typekey*, voir :meth:`set_content`." -#: library/email.contentmanager.rst:89 +#: library/email.contentmanager.rst:86 msgid "Content Manager Instances" msgstr "Instances de gestionnaires de contenus" -#: library/email.contentmanager.rst:91 +#: library/email.contentmanager.rst:88 msgid "" -"Currently the email package provides only one concrete content manager, :" -"data:`raw_data_manager`, although more may be added in the future. :data:" -"`raw_data_manager` is the :attr:`~email.policy.EmailPolicy.content_manager` " -"provided by :attr:`~email.policy.EmailPolicy` and its derivatives." +"Currently the email package provides only one concrete content " +"manager, :data:`raw_data_manager`, although more may be added in the " +"future. :data:`raw_data_manager` is " +"the :attr:`~email.policy.EmailPolicy.content_manager` provided " +"by :attr:`~email.policy.EmailPolicy` and its derivatives." msgstr "" "Actuellement, le paquet *email* ne fournit qu'un seul gestionnaire de " "contenu concret, :data:`raw_data_manager`, bien que d'autres puissent être " -"ajoutés à l'avenir. :data:`raw_data_manager` est le :attr:`~email.policy." -"EmailPolicy.content_manager` fourni par :attr:`~email.policy.EmailPolicy` et " -"ses dérivés." +"ajoutés à l'avenir. :data:`raw_data_manager` est " +"le :attr:`~email.policy.EmailPolicy.content_manager` fourni " +"par :attr:`~email.policy.EmailPolicy` et ses dérivés." -#: library/email.contentmanager.rst:100 +#: library/email.contentmanager.rst:97 msgid "" "This content manager provides only a minimum interface beyond that provided " "by :class:`~email.message.Message` itself: it deals only with text, raw " @@ -201,8 +203,8 @@ msgid "" msgstr "" "Ce gestionnaire de contenu ne fournit qu'une interface minimale au-delà de " "celle fournie par :class:`~email.message.Message` lui-même : il prend " -"seulement en charge le texte, les chaînes d'octets brutes et les objets :" -"class:`~email.message.Message`. Néanmoins, il offre des avantages " +"seulement en charge le texte, les chaînes d'octets brutes et les " +"objets :class:`~email.message.Message`. Néanmoins, il offre des avantages " "significatifs par rapport à l'API de base : ``get_content`` sur une partie " "de texte renvoie une chaîne Unicode sans que l'application ait besoin de la " "décoder manuellement, ``set_content`` fournit de nombreuses options pour " @@ -210,14 +212,14 @@ msgstr "" "contenu, et il permet l'utilisation des différentes méthodes ``add_``, ce " "qui simplifie la création de messages en plusieurs parties." -#: library/email.contentmanager.rst:112 +#: library/email.contentmanager.rst:109 msgid "" -"Return the payload of the part as either a string (for ``text`` parts), an :" -"class:`~email.message.EmailMessage` object (for ``message/rfc822`` parts), " -"or a ``bytes`` object (for all other non-multipart types). Raise a :exc:" -"`KeyError` if called on a ``multipart``. If the part is a ``text`` part and " -"*errors* is specified, use it as the error handler when decoding the payload " -"to unicode. The default error handler is ``replace``." +"Return the payload of the part as either a string (for ``text`` parts), " +"an :class:`~email.message.EmailMessage` object (for ``message/rfc822`` " +"parts), or a ``bytes`` object (for all other non-multipart types). Raise " +"a :exc:`KeyError` if called on a ``multipart``. If the part is a ``text`` " +"part and *errors* is specified, use it as the error handler when decoding " +"the payload to unicode. The default error handler is ``replace``." msgstr "" "Renvoie la charge utile de la partie sous la forme d'une chaîne (pour les " "parties ``text``), d'un objet :class:`~email.message.EmailMessage` (pour les " @@ -228,18 +230,18 @@ msgstr "" "d'erreurs lors du décodage de la charge utile en Unicode. Le gestionnaire " "d'erreurs par défaut est ``replace``." -#: library/email.contentmanager.rst:131 +#: library/email.contentmanager.rst:128 msgid "Add headers and payload to *msg*:" msgstr "Ajoute des en-têtes et une charge utile à *msg* :" -#: library/email.contentmanager.rst:133 +#: library/email.contentmanager.rst:130 msgid "" "Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` value." msgstr "" "Ajoute un en-tête :mailheader:`Content-Type` avec une valeur ``maintype/" "subtype``." -#: library/email.contentmanager.rst:136 +#: library/email.contentmanager.rst:133 msgid "" "For ``str``, set the MIME ``maintype`` to ``text``, and set the subtype to " "*subtype* if it is specified, or ``plain`` if it is not." @@ -247,15 +249,15 @@ msgstr "" "Pour ``str``, définit le ``maintype`` MIME à ``text`` et définit le sous-" "type à *subtype* s'il est spécifié, ou à ``plain`` s'il ne l'est pas." -#: library/email.contentmanager.rst:138 +#: library/email.contentmanager.rst:135 msgid "" -"For ``bytes``, use the specified *maintype* and *subtype*, or raise a :exc:" -"`TypeError` if they are not specified." +"For ``bytes``, use the specified *maintype* and *subtype*, or raise " +"a :exc:`TypeError` if they are not specified." msgstr "" -"Pour ``bytes``, utilise les *maintype* et *subtype* spécifiés, ou lève une :" -"exc:`TypeError` s'ils ne sont pas spécifiés." +"Pour ``bytes``, utilise les *maintype* et *subtype* spécifiés, ou lève " +"une :exc:`TypeError` s'ils ne sont pas spécifiés." -#: library/email.contentmanager.rst:140 +#: library/email.contentmanager.rst:137 msgid "" "For :class:`~email.message.EmailMessage` objects, set the maintype to " "``message``, and set the subtype to *subtype* if it is specified or " @@ -268,7 +270,7 @@ msgstr "" "``partial``, lève une erreur (les objets ``bytes`` doivent être utilisés " "pour construire les parties ``message/partial``)." -#: library/email.contentmanager.rst:146 +#: library/email.contentmanager.rst:143 msgid "" "If *charset* is provided (which is valid only for ``str``), encode the " "string to bytes using the specified character set. The default is " @@ -281,7 +283,7 @@ msgstr "" "nom de jeu de caractères MIME standard, utilise plutôt le jeu de caractères " "standard." -#: library/email.contentmanager.rst:151 +#: library/email.contentmanager.rst:148 msgid "" "If *cte* is set, encode the payload using the specified content transfer " "encoding, and set the :mailheader:`Content-Transfer-Encoding` header to that " @@ -298,15 +300,22 @@ msgstr "" "spécifiant un *cte* de ``7bit`` pour une entrée qui contient des valeurs non-" "ASCII), lève une :exc:`ValueError`." -#: library/email.contentmanager.rst:159 +#: library/email.contentmanager.rst:156 msgid "" "For ``str`` objects, if *cte* is not set use heuristics to determine the " -"most compact encoding." +"most compact encoding. Prior to encoding, :meth:`str.splitlines` is used to " +"normalize all line boundaries, ensuring that each line of the payload is " +"terminated by the current policy's :data:`~email.policy.Policy.linesep` " +"property (even if the original string did not end with one)." +msgstr "" + +#: library/email.contentmanager.rst:162 +msgid "" +"For ``bytes`` objects, *cte* is taken to be base64 if not set, and the " +"aforementioned newline translation is not performed." msgstr "" -"Pour les objets ``str``, si *cte* n'est pas défini, utilise une heuristique " -"pour déterminer l'encodage le plus compact." -#: library/email.contentmanager.rst:161 +#: library/email.contentmanager.rst:164 msgid "" "For :class:`~email.message.EmailMessage`, per :rfc:`2046`, raise an error if " "a *cte* of ``quoted-printable`` or ``base64`` is requested for *subtype* " @@ -322,18 +331,18 @@ msgstr "" "*sous-type*, la valeur par défaut de *cte* est ``7bit``." # suit un : -#: library/email.contentmanager.rst:168 +#: library/email.contentmanager.rst:171 msgid "" "A *cte* of ``binary`` does not actually work correctly yet. The " -"``EmailMessage`` object as modified by ``set_content`` is correct, but :" -"class:`~email.generator.BytesGenerator` does not serialize it correctly." +"``EmailMessage`` object as modified by ``set_content`` is correct, " +"but :class:`~email.generator.BytesGenerator` does not serialize it correctly." msgstr "" "la valeur ``binary`` pour *cte* ne fonctionne pas encore correctement. " "L'objet ``EmailMessage`` tel que modifié par ``set_content`` est correct, " "mais :class:`~email.generator.BytesGenerator` ne le sérialise pas " "correctement." -#: library/email.contentmanager.rst:173 +#: library/email.contentmanager.rst:176 msgid "" "If *disposition* is set, use it as the value of the :mailheader:`Content-" "Disposition` header. If not specified, and *filename* is specified, add the " @@ -341,13 +350,14 @@ msgid "" "*filename* is also not specified, do not add the header. The only valid " "values for *disposition* are ``attachment`` and ``inline``." msgstr "" -"Si *disposition* est spécifié, utilise cette valeur pour l'en-tête :" -"mailheader:`Content-Disposition`. S'il n'est pas spécifié et que *filename* " -"est spécifié, utilise la valeur ``attachment`` pour l'en-tête. Si ni " -"*disposition* ni *filename* ne sont spécifiés, n'ajoute pas cet en-tête. Les " -"seules valeurs valides pour *disposition* sont ``attachment`` et ``inline``." +"Si *disposition* est spécifié, utilise cette valeur pour l'en-" +"tête :mailheader:`Content-Disposition`. S'il n'est pas spécifié et que " +"*filename* est spécifié, utilise la valeur ``attachment`` pour l'en-tête. Si " +"ni *disposition* ni *filename* ne sont spécifiés, n'ajoute pas cet en-tête. " +"Les seules valeurs valides pour *disposition* sont ``attachment`` et " +"``inline``." -#: library/email.contentmanager.rst:180 +#: library/email.contentmanager.rst:183 msgid "" "If *filename* is specified, use it as the value of the ``filename`` " "parameter of the :mailheader:`Content-Disposition` header." @@ -355,7 +365,7 @@ msgstr "" "Si *filename* est spécifié, utilise cette valeur pour le paramètre " "``filename`` de l'en-tête :mailheader:`Content-Disposition`." -#: library/email.contentmanager.rst:183 +#: library/email.contentmanager.rst:186 msgid "" "If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as " "its value." @@ -363,17 +373,17 @@ msgstr "" "Si *cid* est spécifié, ajoute un en-tête :mailheader:`Content-ID` avec cette " "valeur." -#: library/email.contentmanager.rst:186 +#: library/email.contentmanager.rst:189 msgid "" "If *params* is specified, iterate its ``items`` method and use the resulting " -"``(key, value)`` pairs to set additional parameters on the :mailheader:" -"`Content-Type` header." +"``(key, value)`` pairs to set additional parameters on " +"the :mailheader:`Content-Type` header." msgstr "" "Si *params* est spécifié, itère sur sa méthode ``items`` et utilise les " "paires ``(clé, valeur)`` résultantes pour définir des paramètres " "supplémentaires dans l'en-tête :mailheader:`Content-Type`." -#: library/email.contentmanager.rst:190 +#: library/email.contentmanager.rst:193 msgid "" "If *headers* is specified and is a list of strings of the form ``headername: " "headervalue`` or a list of ``header`` objects (distinguished from strings by " @@ -383,13 +393,20 @@ msgstr "" "``headername: headervalue`` ou une liste d'objets ``header`` (distingués des " "chaînes par l'attribut ``name``), ajoute ces en-têtes à *msg*." -#: library/email.contentmanager.rst:197 +#: library/email.contentmanager.rst:200 msgid "Footnotes" msgstr "Notes" -#: library/email.contentmanager.rst:198 +#: library/email.contentmanager.rst:201 msgid "" "Originally added in 3.4 as a :term:`provisional module `" msgstr "" "Initialement ajouté dans 3.4 en tant que :term:`paquet provisoire " "`." + +#~ msgid "" +#~ "For ``str`` objects, if *cte* is not set use heuristics to determine the " +#~ "most compact encoding." +#~ msgstr "" +#~ "Pour les objets ``str``, si *cte* n'est pas défini, utilise une " +#~ "heuristique pour déterminer l'encodage le plus compact." diff --git a/library/email.encoders.po b/library/email.encoders.po index b73643835..67f150a8c 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 12:35+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -27,8 +27,8 @@ msgstr "**Code source :** :source:`Lib/email/encoders.py`" #: library/email.encoders.rst:11 msgid "" "This module is part of the legacy (``Compat32``) email API. In the new API " -"the functionality is provided by the *cte* parameter of the :meth:`~email." -"message.EmailMessage.set_content` method." +"the functionality is provided by the *cte* parameter of " +"the :meth:`~email.message.EmailMessage.set_content` method." msgstr "" "Ce module fait partie du code patrimonial (``Compat32``) de l'API mail. Dans " "la nouvelle API la fonctionnalité est fournie par le paramètre *cte* de la " @@ -42,9 +42,10 @@ msgid "" "values passed during the instantiation of that class." msgstr "" "Ce module est obsolète en Python 3. Il n'est pas de besoin d'appeler " -"explicitement les fonctions définies ici puisque la classe :class:`~email." -"mime.text.MIMEText` ajuste le type de contenu et l'entête CTE à l'aide des " -"paramètres *_subtype* et *_charset* de son constructeur." +"explicitement les fonctions définies ici puisque la " +"classe :class:`~email.mime.text.MIMEText` ajuste le type de contenu et " +"l'entête CTE à l'aide des paramètres *_subtype* et *_charset* de son " +"constructeur." #: library/email.encoders.rst:20 msgid "" @@ -58,8 +59,8 @@ msgstr "" msgid "" "When creating :class:`~email.message.Message` objects from scratch, you " "often need to encode the payloads for transport through compliant mail " -"servers. This is especially true for :mimetype:`image/\\*` and :mimetype:" -"`text/\\*` type messages containing binary data." +"servers. This is especially true for :mimetype:`image/\\*` " +"and :mimetype:`text/\\*` type messages containing binary data." msgstr "" "Au moment de la création d'objets :class:`~email.message.Message` à la main, " "il est souvent nécessaire d'encoder les charges utiles pour le transport à " @@ -70,30 +71,30 @@ msgstr "" #: library/email.encoders.rst:27 #, fuzzy msgid "" -"The :mod:`email` package provides some convenient encoders in its :mod:" -"`~email.encoders` module. These encoders are actually used by the :class:" -"`~email.mime.audio.MIMEAudio` and :class:`~email.mime.image.MIMEImage` class " -"constructors to provide default encodings. All encoder functions take " -"exactly one argument, the message object to encode. They usually extract " -"the payload, encode it, and reset the payload to this newly encoded value. " -"They should also set the :mailheader:`Content-Transfer-Encoding` header as " -"appropriate." +"The :mod:`email` package provides some convenient encoders in its :mod:`!" +"encoders` module. These encoders are actually used by " +"the :class:`~email.mime.audio.MIMEAudio` " +"and :class:`~email.mime.image.MIMEImage` class constructors to provide " +"default encodings. All encoder functions take exactly one argument, the " +"message object to encode. They usually extract the payload, encode it, and " +"reset the payload to this newly encoded value. They should also set " +"the :mailheader:`Content-Transfer-Encoding` header as appropriate." msgstr "" "Le paquet :mod:`email` fournit quelques encodeurs pratiques dans son " "module :mod:`encoders`. Ces encodeurs sont d'ailleurs utilisés par les " -"constructeurs des classes :class:`~email.mime.audio.MIMEAudio` et :class:" -"`~email.mime.image.MIMEImage` afin de fournir des encodages par défaut. " -"Toutes les fonctions d'encodage prennent exactement un argument, l'objet " -"message à encoder. Généralement, elles extraient la charge utile, l'encode, " -"puis change la charge utile pour la nouvelle valeur encodée. Elles devraient " -"également assigner l'en-tête :mailheader:`Content-Transfer-Encoding` si " -"besoin." +"constructeurs des classes :class:`~email.mime.audio.MIMEAudio` " +"et :class:`~email.mime.image.MIMEImage` afin de fournir des encodages par " +"défaut. Toutes les fonctions d'encodage prennent exactement un argument, " +"l'objet message à encoder. Généralement, elles extraient la charge utile, " +"l'encode, puis change la charge utile pour la nouvelle valeur encodée. Elles " +"devraient également assigner l'en-tête :mailheader:`Content-Transfer-" +"Encoding` si besoin." #: library/email.encoders.rst:35 msgid "" "Note that these functions are not meaningful for a multipart message. They " -"must be applied to individual subparts instead, and will raise a :exc:" -"`TypeError` if passed a message whose type is multipart." +"must be applied to individual subparts instead, and will raise " +"a :exc:`TypeError` if passed a message whose type is multipart." msgstr "" "À noter que ces fonctions n'ont pas de sens dans le cadre d'un message en " "plusieurs parties. Elles doivent à la place être appliquées aux sous-parties " @@ -106,10 +107,10 @@ msgstr "Voici les fonctions d'encodages fournies :" #: library/email.encoders.rst:44 msgid "" -"Encodes the payload into quoted-printable form and sets the :mailheader:" -"`Content-Transfer-Encoding` header to ``quoted-printable`` [#]_. This is a " -"good encoding to use when most of your payload is normal printable data, but " -"contains a few unprintable characters." +"Encodes the payload into quoted-printable form and sets " +"the :mailheader:`Content-Transfer-Encoding` header to ``quoted-printable`` " +"[#]_. This is a good encoding to use when most of your payload is normal " +"printable data, but contains a few unprintable characters." msgstr "" "Encode la charge utile au format Quoted-Printable, et assigne ``quoted-" "printable`` [#]_ à l'en-tête :mailheader:`Content-Transfer-Encoding`. C'est " @@ -132,21 +133,22 @@ msgstr "" #: library/email.encoders.rst:61 msgid "" -"This doesn't actually modify the message's payload, but it does set the :" -"mailheader:`Content-Transfer-Encoding` header to either ``7bit`` or ``8bit`` " -"as appropriate, based on the payload data." +"This doesn't actually modify the message's payload, but it does set " +"the :mailheader:`Content-Transfer-Encoding` header to either ``7bit`` or " +"``8bit`` as appropriate, based on the payload data." msgstr "" "Ceci ne modifie pas effectivement la charge utile du message, mais va bien " -"en revanche assigner la valeur ``7bit`` ou ``8bit`` à l'en-tête :mailheader:" -"`Content-Transfer-Encoding` selon la nature de la charge utile." +"en revanche assigner la valeur ``7bit`` ou ``8bit`` à l'en-" +"tête :mailheader:`Content-Transfer-Encoding` selon la nature de la charge " +"utile." #: library/email.encoders.rst:68 msgid "" "This does nothing; it doesn't even set the :mailheader:`Content-Transfer-" "Encoding` header." msgstr "" -"Ceci ne fait rien; et ne va même pas changer la valeur de l'en-tête :" -"mailheader:`Content-Transfer-Encoding`." +"Ceci ne fait rien; et ne va même pas changer la valeur de l'en-" +"tête :mailheader:`Content-Transfer-Encoding`." #: library/email.encoders.rst:72 msgid "Footnotes" diff --git a/library/email.errors.po b/library/email.errors.po index 7992909a6..93d2f6b9b 100644 --- a/library/email.errors.po +++ b/library/email.errors.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-11-06 21:40+0100\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -25,12 +25,13 @@ msgid "**Source code:** :source:`Lib/email/errors.py`" msgstr "**Code source :** :source:`Lib/email/errors.py`" #: library/email.errors.rst:11 +#, fuzzy msgid "" -"The following exception classes are defined in the :mod:`email.errors` " +"The following exception classes are defined in the :mod:`!email.errors` " "module:" msgstr "" -"Les classes d'exception suivantes sont définies dans le module :mod:`email." -"errors` :" +"Les classes d'exception suivantes sont définies dans le " +"module :mod:`email.errors` :" #: library/email.errors.rst:16 msgid "" @@ -38,96 +39,87 @@ msgid "" "raise. It is derived from the standard :exc:`Exception` class and defines " "no additional methods." msgstr "" -"Exception de base, dont héritent toutes les exceptions du paquet :mod:" -"`email`. Cette classe hérite de la classe native :exc:`Exception` et ne " -"définit aucune méthode additionnelle." +"Exception de base, dont héritent toutes les exceptions du " +"paquet :mod:`email`. Cette classe hérite de la classe " +"native :exc:`Exception` et ne définit aucune méthode additionnelle." #: library/email.errors.rst:23 msgid "" -"This is the base class for exceptions raised by the :class:`~email.parser." -"Parser` class. It is derived from :exc:`MessageError`. This class is also " -"used internally by the parser used by :mod:`~email.headerregistry`." +"This is the base class for exceptions raised by " +"the :class:`~email.parser.Parser` class. It is derived " +"from :exc:`MessageError`. This class is also used internally by the parser " +"used by :mod:`~email.headerregistry`." msgstr "" -"Exception de base pour les exceptions levées par la classe :class:`~email." -"parser.Parser`. Elle hérite de :exc:`MessageError`. Cette classe est aussi " -"utilisée en interne par l'analyseur de :mod:`~email.headerregistry`." +"Exception de base pour les exceptions levées par la " +"classe :class:`~email.parser.Parser`. Elle hérite de :exc:`MessageError`. " +"Cette classe est aussi utilisée en interne par l'analyseur " +"de :mod:`~email.headerregistry`." #: library/email.errors.rst:31 msgid "" "Raised under some error conditions when parsing the :rfc:`5322` headers of a " -"message, this class is derived from :exc:`MessageParseError`. The :meth:" -"`~email.message.EmailMessage.set_boundary` method will raise this error if " -"the content type is unknown when the method is called. :class:`~email.header." -"Header` may raise this error for certain base64 decoding errors, and when an " -"attempt is made to create a header that appears to contain an embedded " -"header (that is, there is what is supposed to be a continuation line that " -"has no leading whitespace and looks like a header)." +"message, this class is derived from :exc:`MessageParseError`. " +"The :meth:`~email.message.EmailMessage.set_boundary` method will raise this " +"error if the content type is unknown when the method is " +"called. :class:`~email.header.Header` may raise this error for certain " +"base64 decoding errors, and when an attempt is made to create a header that " +"appears to contain an embedded header (that is, there is what is supposed to " +"be a continuation line that has no leading whitespace and looks like a " +"header)." msgstr "" "Cette exception, dérivée de :exc:`MessageParseError`, est levée sous " "différentes conditions lors de l'analyse des en-têtes :rfc:`5322` du " -"message. Lorsque la méthode :meth:`~email.message.EmailMessage." -"set_boundary` est invoquée, elle lève cette erreur si le type du contenu est " -"inconnu. La classe :class:`~email.header.Header` lève cette exception pour " -"certains types d'erreurs provenant du décodage base64. Elle la lève aussi " -"quand un en-tête est créé et qu'il semble contenir un en-tête imbriqué, " -"c'est-à-dire que la ligne qui suit ressemble à un en-tête et ne commence pas " -"par des caractères d'espacement." +"message. Lorsque la " +"méthode :meth:`~email.message.EmailMessage.set_boundary` est invoquée, elle " +"lève cette erreur si le type du contenu est inconnu. La " +"classe :class:`~email.header.Header` lève cette exception pour certains " +"types d'erreurs provenant du décodage base64. Elle la lève aussi quand un " +"en-tête est créé et qu'il semble contenir un en-tête imbriqué, c'est-à-dire " +"que la ligne qui suit ressemble à un en-tête et ne commence pas par des " +"caractères d'espacement." #: library/email.errors.rst:43 msgid "Deprecated and no longer used." msgstr "Obsolète, n'est plus utilisé." #: library/email.errors.rst:48 +#, fuzzy msgid "" -"Raised when a payload is added to a :class:`~email.message.Message` object " -"using :meth:`add_payload`, but the payload is already a scalar and the " -"message's :mailheader:`Content-Type` main type is not either :mimetype:" -"`multipart` or missing. :exc:`MultipartConversionError` multiply inherits " -"from :exc:`MessageError` and the built-in :exc:`TypeError`." -msgstr "" -"Cette exception est levée quand le contenu, que la méthode :meth:" -"`add_payload` essaie d'ajouter à l'objet :class:`~email.message.Message`, " -"est déjà un scalaire et que le type principal du message :mailheader:" -"`Content-Type` est manquant ou différent de :mimetype:`multipart`. :exc:" -"`MultipartConversionError` hérite à la fois de :exc:`MessageError` et de :" -"exc:`TypeError`." - -#: library/email.errors.rst:54 -msgid "" -"Since :meth:`Message.add_payload` is deprecated, this exception is rarely " -"raised in practice. However the exception may also be raised if the :meth:" -"`~email.message.Message.attach` method is called on an instance of a class " -"derived from :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:" -"`~email.mime.image.MIMEImage`)." +"Raised if the :meth:`~email.message.Message.attach` method is called on an " +"instance of a class derived " +"from :class:`~email.mime.nonmultipart.MIMENonMultipart` " +"(e.g. :class:`~email.mime.image.MIMEImage`). :exc:`MultipartConversionError` " +"multiply inherits from :exc:`MessageError` and the built-in :exc:`TypeError`." msgstr "" -"Comme la méthode :meth:`Message.add_payload` est obsolète, cette exception " -"est rarement utilisée. Néanmoins, elle peut être levée si la méthode :meth:" -"`~email.message.Message.attach` est invoquée sur une instance de classe " -"dérivée de :class:`~email.mime.nonmultipart.MIMENonMultipart` (p. ex. :class:" -"`~email.mime.image.MIMEImage`)." +"Cette exception est levée quand le contenu, que la " +"méthode :meth:`add_payload` essaie d'ajouter à " +"l'objet :class:`~email.message.Message`, est déjà un scalaire et que le type " +"principal du message :mailheader:`Content-Type` est manquant ou différent " +"de :mimetype:`multipart`. :exc:`MultipartConversionError` hérite à la fois " +"de :exc:`MessageError` et de :exc:`TypeError`." -#: library/email.errors.rst:64 +#: library/email.errors.rst:58 msgid "" "Raised when an error occurs when the :mod:`~email.generator` outputs headers." msgstr "" -#: library/email.errors.rst:70 +#: library/email.errors.rst:64 msgid "" "This is the base class for all defects found when parsing email messages. It " "is derived from :exc:`ValueError`." msgstr "" -#: library/email.errors.rst:75 +#: library/email.errors.rst:69 #, fuzzy msgid "" "This is the base class for all defects found when parsing email headers. It " "is derived from :exc:`MessageDefect`." msgstr "" -"Exception de base, dont héritent toutes les exceptions du paquet :mod:" -"`email`. Cette classe hérite de la classe native :exc:`Exception` et ne " -"définit aucune méthode additionnelle." +"Exception de base, dont héritent toutes les exceptions du " +"paquet :mod:`email`. Cette classe hérite de la classe " +"native :exc:`Exception` et ne définit aucune méthode additionnelle." -#: library/email.errors.rst:78 +#: library/email.errors.rst:72 msgid "" "Here is the list of the defects that the :class:`~email.parser.FeedParser` " "can find while parsing messages. Note that the defects are added to the " @@ -136,131 +128,152 @@ msgid "" "nested message object would have a defect, but the containing messages would " "not." msgstr "" -"Voici la liste des anomalies que peut identifier :class:`~email.parser." -"FeedParser` pendant l'analyse des messages. Notez que les anomalies sont " -"signalées à l'endroit où elles sont détectées : par exemple, dans le cas " -"d'une malformation de l'en-tête d'un message imbriqué dans un message de " -"type :mimetype:`multipart/alternative`, l'anomalie est signalée sur le " -"message imbriqué seulement." +"Voici la liste des anomalies que peut " +"identifier :class:`~email.parser.FeedParser` pendant l'analyse des messages. " +"Notez que les anomalies sont signalées à l'endroit où elles sont détectées : " +"par exemple, dans le cas d'une malformation de l'en-tête d'un message " +"imbriqué dans un message de type :mimetype:`multipart/alternative`, " +"l'anomalie est signalée sur le message imbriqué seulement." -#: library/email.errors.rst:84 +#: library/email.errors.rst:78 msgid "" "All defect classes are subclassed from :class:`email.errors.MessageDefect`." msgstr "" -"Toutes les anomalies sont des sous-classes de :class:`email.errors." -"MessageDefect`." +"Toutes les anomalies sont des sous-classes " +"de :class:`email.errors.MessageDefect`." -#: library/email.errors.rst:86 +#: library/email.errors.rst:82 +#, fuzzy msgid "" -":class:`NoBoundaryInMultipartDefect` -- A message claimed to be a multipart, " -"but had no :mimetype:`boundary` parameter." +"A message claimed to be a multipart, but had no :mimetype:`boundary` " +"parameter." msgstr "" ":class:`NoBoundaryInMultipartDefect` — Un message qui prétend être composite " -"(*multipart* en anglais), mais qui ne contient pas de séparateur :mimetype:" -"`boundary`." +"(*multipart* en anglais), mais qui ne contient pas de " +"séparateur :mimetype:`boundary`." -#: library/email.errors.rst:89 +#: library/email.errors.rst:87 +#, fuzzy msgid "" -":class:`StartBoundaryNotFoundDefect` -- The start boundary claimed in the :" -"mailheader:`Content-Type` header was never found." +"The start boundary claimed in the :mailheader:`Content-Type` header was " +"never found." msgstr "" ":class:`StartBoundaryNotFoundDefect` — Le message ne contient pas le " "séparateur de départ indiqué dans le :mailheader:`Content-Type`." #: library/email.errors.rst:92 +#, fuzzy msgid "" -":class:`CloseBoundaryNotFoundDefect` -- A start boundary was found, but no " -"corresponding close boundary was ever found." +"A start boundary was found, but no corresponding close boundary was ever " +"found." msgstr "" ":class:`CloseBoundaryNotFoundDefect` — Le séparateur de départ a été trouvé, " "mais pas le séparateur de fin correspondant." -#: library/email.errors.rst:97 -msgid "" -":class:`FirstHeaderLineIsContinuationDefect` -- The message had a " -"continuation line as its first header line." +#: library/email.errors.rst:99 +#, fuzzy +msgid "The message had a continuation line as its first header line." msgstr "" ":class:`FirstHeaderLineIsContinuationDefect` — La première ligne de l'en-" "tête du message est une ligne de continuation." -#: library/email.errors.rst:100 -msgid "" -":class:`MisplacedEnvelopeHeaderDefect` - A \"Unix From\" header was found in " -"the middle of a header block." +#: library/email.errors.rst:103 +#, fuzzy +msgid "A \"Unix From\" header was found in the middle of a header block." msgstr "" ":class:`MisplacedEnvelopeHeaderDefect` — Un en-tête *Unix From* est présent " "à l'intérieur d'un bloc d'en-tête." -#: library/email.errors.rst:103 +#: library/email.errors.rst:107 +#, fuzzy msgid "" -":class:`MissingHeaderBodySeparatorDefect` - A line was found while parsing " -"headers that had no leading white space but contained no ':'. Parsing " -"continues assuming that the line represents the first line of the body." +"A line was found while parsing headers that had no leading white space but " +"contained no ':'. Parsing continues assuming that the line represents the " +"first line of the body." msgstr "" ":class:`MissingHeaderBodySeparatorDefect` — Une ligne d'en-tête ne contient " "pas de caractères d'espacement au début et aucun « : ». L'analyse continue " "en supposant qu'il s'agit donc de la première ligne du corps du message." -#: library/email.errors.rst:109 +#: library/email.errors.rst:115 +#, fuzzy msgid "" -":class:`MalformedHeaderDefect` -- A header was found that was missing a " -"colon, or was otherwise malformed." +"A header was found that was missing a colon, or was otherwise malformed." msgstr "" ":class:`MalformedHeaderDefect` -- Un en-tête est mal formé ou il manque un " "« : »." -#: library/email.errors.rst:112 +#: library/email.errors.rst:117 msgid "This defect has not been used for several Python versions." msgstr "Cette anomalie est obsolète depuis plusieurs versions de Python." -#: library/email.errors.rst:115 +#: library/email.errors.rst:122 +#, fuzzy msgid "" -":class:`MultipartInvariantViolationDefect` -- A message claimed to be a :" -"mimetype:`multipart`, but no subparts were found. Note that when a message " -"has this defect, its :meth:`~email.message.Message.is_multipart` method may " -"return ``False`` even though its content type claims to be :mimetype:" -"`multipart`." +"A message claimed to be a :mimetype:`multipart`, but no subparts were found. " +"Note that when a message has this defect, " +"its :meth:`~email.message.Message.is_multipart` method may return ``False`` " +"even though its content type claims to be :mimetype:`multipart`." msgstr "" ":class:`MultipartInvariantViolationDefect` — Le message indique être de " "type :mimetype:`multipart`, mais aucune pièce jointe n'a été trouvée. Notez " "que, dans ce cas, la méthode :meth:`~email.message.Message.is_multipart` " "peut renvoyer ``False`` même si le type de contenu est :mimetype:`multipart`." -#: library/email.errors.rst:120 +#: library/email.errors.rst:129 +#, fuzzy msgid "" -":class:`InvalidBase64PaddingDefect` -- When decoding a block of base64 " -"encoded bytes, the padding was not correct. Enough padding is added to " -"perform the decode, but the resulting decoded bytes may be invalid." +"When decoding a block of base64 encoded bytes, the padding was not correct. " +"Enough padding is added to perform the decode, but the resulting decoded " +"bytes may be invalid." msgstr "" ":class:`InvalidBase64PaddingDefect` — Remplissage incorrect d'un bloc " "d'octets encodés en base64. Des caractères de remplissage ont été ajoutés " "pour permettre le décodage, mais le résultat du décodage peut être invalide." -#: library/email.errors.rst:124 +#: library/email.errors.rst:135 +#, fuzzy msgid "" -":class:`InvalidBase64CharactersDefect` -- When decoding a block of base64 " -"encoded bytes, characters outside the base64 alphabet were encountered. The " -"characters are ignored, but the resulting decoded bytes may be invalid." +"When decoding a block of base64 encoded bytes, characters outside the base64 " +"alphabet were encountered. The characters are ignored, but the resulting " +"decoded bytes may be invalid." msgstr "" ":class:`InvalidBase64CharactersDefect` — Des caractères n'appartenant pas à " "l'alphabet base64 ont été rencontrés lors du décodage d'un bloc d'octets " "encodés en base64. Les caractères ont été ignorés, mais le résultat du " "décodage peut être invalide." -#: library/email.errors.rst:128 +#: library/email.errors.rst:141 +#, fuzzy msgid "" -":class:`InvalidBase64LengthDefect` -- When decoding a block of base64 " -"encoded bytes, the number of non-padding base64 characters was invalid (1 " -"more than a multiple of 4). The encoded block was kept as-is." +"When decoding a block of base64 encoded bytes, the number of non-padding " +"base64 characters was invalid (1 more than a multiple of 4). The encoded " +"block was kept as-is." msgstr "" ":class:`InvalidBase64LengthDefect` — Le nombre de caractères (autres que de " "remplissage) d'un bloc d'octets encodés en base64 est invalide (1 de plus " "qu'un multiple de 4). Le bloc encodé n'a pas été modifié." -#: library/email.errors.rst:132 +#: library/email.errors.rst:147 +#, fuzzy msgid "" -":class:`InvalidDateDefect` -- When decoding an invalid or unparsable date " -"field. The original value is kept as-is." +"When decoding an invalid or unparsable date field. The original value is " +"kept as-is." msgstr "" ":class:`InvalidDateDefect` — Le champ de date est invalide. La valeur est " "laissée telle-quelle." + +#~ msgid "" +#~ "Since :meth:`Message.add_payload` is deprecated, this exception is rarely " +#~ "raised in practice. However the exception may also be raised if " +#~ "the :meth:`~email.message.Message.attach` method is called on an instance " +#~ "of a class derived " +#~ "from :class:`~email.mime.nonmultipart.MIMENonMultipart` " +#~ "(e.g. :class:`~email.mime.image.MIMEImage`)." +#~ msgstr "" +#~ "Comme la méthode :meth:`Message.add_payload` est obsolète, cette " +#~ "exception est rarement utilisée. Néanmoins, elle peut être levée si la " +#~ "méthode :meth:`~email.message.Message.attach` est invoquée sur une " +#~ "instance de classe dérivée " +#~ "de :class:`~email.mime.nonmultipart.MIMENonMultipart` " +#~ "(p. ex. :class:`~email.mime.image.MIMEImage`)." diff --git a/library/email.examples.po b/library/email.examples.po index 16264a670..4b0c95b89 100644 --- a/library/email.examples.po +++ b/library/email.examples.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2023-02-17 14:44+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -24,9 +24,9 @@ msgid "" "Here are a few examples of how to use the :mod:`email` package to read, " "write, and send simple email messages, as well as more complex MIME messages." msgstr "" -"Cette page contient quelques exemples de l'utilisation du package :mod:" -"`email` pour lire, écrire, et envoyer de simples messages mail, ainsi que " -"des messages MIME plus complexes." +"Cette page contient quelques exemples de l'utilisation du " +"package :mod:`email` pour lire, écrire, et envoyer de simples messages mail, " +"ainsi que des messages MIME plus complexes." #: library/email.examples.rst:9 msgid "" diff --git a/library/email.generator.po b/library/email.generator.po index d46345926..576a6e3c5 100644 --- a/library/email.generator.po +++ b/library/email.generator.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-01-18 22:28+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -29,17 +29,17 @@ msgstr "**Code source :** :source:`Lib/email/igenerator.py`" msgid "" "One of the most common tasks is to generate the flat (serialized) version of " "the email message represented by a message object structure. You will need " -"to do this if you want to send your message via :meth:`smtplib.SMTP." -"sendmail`, or print the message on the console. Taking a message object " -"structure and producing a serialized representation is the job of the " -"generator classes." +"to do this if you want to send your message " +"via :meth:`smtplib.SMTP.sendmail`, or print the message on the console. " +"Taking a message object structure and producing a serialized representation " +"is the job of the generator classes." msgstr "" "L'une des tâches les plus courantes consiste à générer la version plate " "(sérialisée) du message électronique représenté par une structure d'objet " -"message. Vous devez le faire si vous voulez envoyer votre message via :meth:" -"`smtplib.SMTP.sendmail` ou le module :mod:`nntplib`, ou afficher le message " -"sur la console. Prendre une structure d'objet message et produire une " -"représentation sérialisée est le travail des classes génératrices." +"message. Vous devez le faire si vous voulez envoyer votre message " +"via :meth:`smtplib.SMTP.sendmail` ou le module :mod:`nntplib`, ou afficher " +"le message sur la console. Prendre une structure d'objet message et produire " +"une représentation sérialisée est le travail des classes génératrices." #: library/email.generator.rst:18 msgid "" @@ -48,14 +48,14 @@ msgid "" "yourself. However the bundled generator knows how to generate most email in " "a standards-compliant way, should handle MIME and non-MIME email messages " "just fine, and is designed so that the bytes-oriented parsing and generation " -"operations are inverses, assuming the same non-transforming :mod:`~email." -"policy` is used for both. That is, parsing the serialized byte stream via " -"the :class:`~email.parser.BytesParser` class and then regenerating the " -"serialized byte stream using :class:`BytesGenerator` should produce output " -"identical to the input [#]_. (On the other hand, using the generator on an :" -"class:`~email.message.EmailMessage` constructed by program may result in " -"changes to the :class:`~email.message.EmailMessage` object as defaults are " -"filled in.)" +"operations are inverses, assuming the same non-" +"transforming :mod:`~email.policy` is used for both. That is, parsing the " +"serialized byte stream via the :class:`~email.parser.BytesParser` class and " +"then regenerating the serialized byte stream using :class:`BytesGenerator` " +"should produce output identical to the input [#]_. (On the other hand, " +"using the generator on an :class:`~email.message.EmailMessage` constructed " +"by program may result in changes to the :class:`~email.message.EmailMessage` " +"object as defaults are filled in.)" msgstr "" "Comme avec le module :mod:`email.parser`, vous n'êtes pas limité aux " "fonctionnalités du générateur fourni ; vous pourriez en écrire un à partir " @@ -64,13 +64,14 @@ msgstr "" "correctement les e-mails MIME et non MIME, et pour que les opérations (sur " "des suites d'octets) d'analyse et de génération soient inverses, en " "supposant que la même :mod:`~email.policy` est utilisée pour les deux. " -"Autrement dit, l'analyse du flux d'octets sérialisé via la classe :class:" -"`~email.parser.BytesParser` puis la régénération du flux d'octets sérialisé " -"à l'aide de :class:`BytesGenerator` devrait produire une sortie identique à " -"l'entrée [#]_ (d'un autre côté, l'utilisation du générateur sur un :class:" -"`~email.message.EmailMessage` construit par programme peut entraîner des " -"modifications de l'objet :class:`~email.message.EmailMessage` car les " -"valeurs par défaut sont renseignées)." +"Autrement dit, l'analyse du flux d'octets sérialisé via la " +"classe :class:`~email.parser.BytesParser` puis la régénération du flux " +"d'octets sérialisé à l'aide de :class:`BytesGenerator` devrait produire une " +"sortie identique à l'entrée [#]_ (d'un autre côté, l'utilisation du " +"générateur sur un :class:`~email.message.EmailMessage` construit par " +"programme peut entraîner des modifications de " +"l'objet :class:`~email.message.EmailMessage` car les valeurs par défaut sont " +"renseignées)." #: library/email.generator.rst:32 msgid "" @@ -91,13 +92,13 @@ msgstr "" #: library/email.generator.rst:39 msgid "" -"To accommodate reproducible processing of SMIME-signed messages :class:" -"`Generator` disables header folding for message parts of type ``multipart/" -"signed`` and all subparts." +"To accommodate reproducible processing of SMIME-signed " +"messages :class:`Generator` disables header folding for message parts of " +"type ``multipart/signed`` and all subparts." msgstr "" -"Pour s'adapter au traitement reproductible des messages signés SMIME :class:" -"`Generator` ne raccourcit pas les en-têtes pour les parties de message de " -"type ``multipart/signed`` et toutes les sous-parties." +"Pour s'adapter au traitement reproductible des messages signés " +"SMIME :class:`Generator` ne raccourcit pas les en-têtes pour les parties de " +"message de type ``multipart/signed`` et toutes les sous-parties." #: library/email.generator.rst:47 msgid "" @@ -118,21 +119,22 @@ msgid "" "any line in the body that starts with the exact string ``\"From \"``, that " "is ``From`` followed by a space at the beginning of a line. *mangle_from_* " "defaults to the value of the :attr:`~email.policy.Policy.mangle_from_` " -"setting of the *policy* (which is ``True`` for the :data:`~email.policy." -"compat32` policy and ``False`` for all others). *mangle_from_* is intended " -"for use when messages are stored in Unix mbox format (see :mod:`mailbox` and " -"`WHY THE CONTENT-LENGTH FORMAT IS BAD `_)." +"setting of the *policy* (which is ``True`` for " +"the :data:`~email.policy.compat32` policy and ``False`` for all others). " +"*mangle_from_* is intended for use when messages are stored in Unix mbox " +"format (see :mod:`mailbox` and `WHY THE CONTENT-LENGTH FORMAT IS BAD " +"`_)." msgstr "" "Si l'option *mangle_from_* est ``True``, place un caractère ``>`` devant " "toute ligne du corps commençant par la chaîne exacte ``\"From \"``, c'est-à-" "dire une ligne commençant par ``From`` suivi par une espace. *mangle_from_* " -"prend par défaut la valeur du paramètre :attr:`~email.policy.Policy." -"mangle_from_` de la *policy* (qui est ``True`` pour la politique :data:" -"`~email.policy.compat32` et ``False`` pour tous les autres). *mangle_from_* " -"est destiné à être utilisé lorsque les messages sont stockés au format Unix " -"*mbox* (voir :mod:`mailbox` et `WHY THE CONTENT-LENGTH FORMAT IS BAD " -"`_)." +"prend par défaut la valeur du " +"paramètre :attr:`~email.policy.Policy.mangle_from_` de la *policy* (qui est " +"``True`` pour la politique :data:`~email.policy.compat32` et ``False`` pour " +"tous les autres). *mangle_from_* est destiné à être utilisé lorsque les " +"messages sont stockés au format Unix *mbox* (voir :mod:`mailbox` et `WHY THE " +"CONTENT-LENGTH FORMAT IS BAD `_)." #: library/email.generator.rst:163 msgid "" @@ -149,17 +151,17 @@ msgstr "" #: library/email.generator.rst:168 msgid "" "If *policy* is specified, use that policy to control message generation. If " -"*policy* is ``None`` (the default), use the policy associated with the :" -"class:`~email.message.Message` or :class:`~email.message.EmailMessage` " -"object passed to ``flatten`` to control the message generation. See :mod:" -"`email.policy` for details on what *policy* controls." +"*policy* is ``None`` (the default), use the policy associated with " +"the :class:`~email.message.Message` or :class:`~email.message.EmailMessage` " +"object passed to ``flatten`` to control the message generation. " +"See :mod:`email.policy` for details on what *policy* controls." msgstr "" "Si *policy* est spécifiée, utilise cette politique pour contrôler la " "génération des messages. Si *policy* est ``None`` (par défaut), utilise la " -"politique associée à l'objet :class:`~email.message.Message` ou :class:" -"`~email.message.EmailMessage` passée à ``flatten`` pour contrôler la " -"génération des messages. Voir :mod:`email.policy` pour plus de détails sur " -"ce que *policy* contrôle." +"politique associée à l'objet :class:`~email.message.Message` " +"ou :class:`~email.message.EmailMessage` passée à ``flatten`` pour contrôler " +"la génération des messages. Voir :mod:`email.policy` pour plus de détails " +"sur ce que *policy* contrôle." # suit un : #: library/email.generator.rst:174 @@ -190,29 +192,29 @@ msgid "" "If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type` is " "``8bit`` (the default), copy any headers in the original parsed message that " "have not been modified to the output with any bytes with the high bit set " -"reproduced as in the original, and preserve the non-ASCII :mailheader:" -"`Content-Transfer-Encoding` of any body parts that have them. If " -"``cte_type`` is ``7bit``, convert the bytes with the high bit set as needed " -"using an ASCII-compatible :mailheader:`Content-Transfer-Encoding`. That is, " -"transform parts with non-ASCII :mailheader:`Content-Transfer-Encoding` (:" -"mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :" -"mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII " -"bytes in headers using the MIME ``unknown-8bit`` character set, thus " -"rendering them RFC-compliant." +"reproduced as in the original, and preserve the non-" +"ASCII :mailheader:`Content-Transfer-Encoding` of any body parts that have " +"them. If ``cte_type`` is ``7bit``, convert the bytes with the high bit set " +"as needed using an ASCII-compatible :mailheader:`Content-Transfer-Encoding`. " +"That is, transform parts with non-ASCII :mailheader:`Content-Transfer-" +"Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII " +"compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid " +"non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, " +"thus rendering them RFC-compliant." msgstr "" "Si l'option :attr:`~email.policy.Policy.cte_type` de :mod:`~email.policy` " "est ``8bit`` (valeur par défaut), copie tous les en-têtes du message analysé " "d'origine qui n'ont pas été modifiés en sortie avec tous les octets dont le " -"bit de poids fort identique à l'original, et conserve le :mailheader:" -"`Content-Transfer-Encoding` non-ASCII de toutes les parties du corps qui en " -"ont. Si ``cte_type`` est ``7bit``, convertit les octets avec le bit de poids " -"fort défini selon les besoins en utilisant un :mailheader:`Content-Transfer-" -"Encoding` compatible ASCII. Autrement dit, transforme les parties non ASCII :" -"mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-" -"Encoding: 8bit`) en un :mailheader:`Content-Transfer-Encoding` compatible " -"ASCII, et encode les octets non ASCII non valides de la RFC dans les en-" -"têtes utilisant le jeu de caractères MIME ``unknown-8bit``, les rendant " -"ainsi conformes à la RFC." +"bit de poids fort identique à l'original, et conserve " +"le :mailheader:`Content-Transfer-Encoding` non-ASCII de toutes les parties " +"du corps qui en ont. Si ``cte_type`` est ``7bit``, convertit les octets avec " +"le bit de poids fort défini selon les besoins en utilisant " +"un :mailheader:`Content-Transfer-Encoding` compatible ASCII. Autrement dit, " +"transforme les parties non ASCII :mailheader:`Content-Transfer-Encoding` " +"(:mailheader:`Content-Transfer-Encoding: 8bit`) en un :mailheader:`Content-" +"Transfer-Encoding` compatible ASCII, et encode les octets non ASCII non " +"valides de la RFC dans les en-têtes utilisant le jeu de caractères MIME " +"``unknown-8bit``, les rendant ainsi conformes à la RFC." #: library/email.generator.rst:104 library/email.generator.rst:197 msgid "" @@ -250,8 +252,8 @@ msgstr "" #: library/email.generator.rst:125 msgid "" "Encode *s* using the ``ASCII`` codec and the ``surrogateescape`` error " -"handler, and pass it to the *write* method of the *outfp* passed to the :" -"class:`BytesGenerator`'s constructor." +"handler, and pass it to the *write* method of the *outfp* passed to " +"the :class:`BytesGenerator`'s constructor." msgstr "" "Encode *s* en utilisant le codec ``ASCII`` et le gestionnaire d'erreurs " "``surrogateescape``, et le passe à la méthode *write* du *outfp* passé au " @@ -259,15 +261,15 @@ msgstr "" #: library/email.generator.rst:130 msgid "" -"As a convenience, :class:`~email.message.EmailMessage` provides the methods :" -"meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` (a.k.a. :" -"meth:`~email.message.EmailMessage.__bytes__`), which simplify the generation " -"of a serialized binary representation of a message object. For more detail, " -"see :mod:`email.message`." +"As a convenience, :class:`~email.message.EmailMessage` provides the " +"methods :meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` " +"(a.k.a. :meth:`~email.message.EmailMessage.__bytes__`), which simplify the " +"generation of a serialized binary representation of a message object. For " +"more detail, see :mod:`email.message`." msgstr "" -"Par commodité, :class:`~email.message.EmailMessage` fournit les méthodes :" -"meth:`~email.message.EmailMessage.as_bytes` et ``bytes(aMessage)`` (alias :" -"meth:`~email.message .EmailMessage.__bytes__`), qui simplifient la " +"Par commodité, :class:`~email.message.EmailMessage` fournit les " +"méthodes :meth:`~email.message.EmailMessage.as_bytes` et ``bytes(aMessage)`` " +"(alias :meth:`~email.message .EmailMessage.__bytes__`), qui simplifient la " "génération d'une représentation binaire sérialisée d'un objet message. Pour " "plus de détails, voir :mod:`email.message`." @@ -275,19 +277,20 @@ msgstr "" msgid "" "Because strings cannot represent binary data, the :class:`Generator` class " "must convert any binary data in any message it flattens to an ASCII " -"compatible format, by converting them to an ASCII compatible :mailheader:" -"`Content-Transfer_Encoding`. Using the terminology of the email RFCs, you " -"can think of this as :class:`Generator` serializing to an I/O stream that is " -"not \"8 bit clean\". In other words, most applications will want to be " -"using :class:`BytesGenerator`, and not :class:`Generator`." +"compatible format, by converting them to an ASCII " +"compatible :mailheader:`Content-Transfer_Encoding`. Using the terminology " +"of the email RFCs, you can think of this as :class:`Generator` serializing " +"to an I/O stream that is not \"8 bit clean\". In other words, most " +"applications will want to be using :class:`BytesGenerator`, and " +"not :class:`Generator`." msgstr "" "Comme les chaînes ne peuvent pas représenter des données binaires, la " "classe :class:`Generator` doit convertir toutes les données binaires de tout " "message qu'elle aplatit en un format compatible ASCII, en les convertissant " "en un :mailheader:`Content-Transfer_Encoding` compatible ASCII. En utilisant " -"la terminologie des RFC des e-mails, vous pouvez considérer cela comme un :" -"class:`Generator` sérialisant vers un flux d'entrées-sorties qui n'est pas " -"« complètement 8 bits ». En d'autres termes, la plupart des applications " +"la terminologie des RFC des e-mails, vous pouvez considérer cela comme " +"un :class:`Generator` sérialisant vers un flux d'entrées-sorties qui n'est " +"pas « complètement 8 bits ». En d'autres termes, la plupart des applications " "voudront utiliser :class:`BytesGenerator` et pas :class:`Generator`." #: library/email.generator.rst:148 @@ -318,12 +321,13 @@ msgid "" "If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type` is " "``8bit``, generate the message as if the option were set to ``7bit``. (This " "is required because strings cannot represent non-ASCII bytes.) Convert any " -"bytes with the high bit set as needed using an ASCII-compatible :mailheader:" -"`Content-Transfer-Encoding`. That is, transform parts with non-ASCII :" -"mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-" -"Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-" -"Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME " -"``unknown-8bit`` character set, thus rendering them RFC-compliant." +"bytes with the high bit set as needed using an ASCII-" +"compatible :mailheader:`Content-Transfer-Encoding`. That is, transform " +"parts with non-ASCII :mailheader:`Content-Transfer-Encoding` " +"(:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII " +"compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid " +"non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, " +"thus rendering them RFC-compliant." msgstr "" "Si l'option :mod:`~email.policy` :attr:`~email.policy.Policy.cte_type` est " "``8bit``, génère le message comme si l'option était définie sur ``7bit`` " @@ -331,8 +335,8 @@ msgstr "" "ASCII). Convertit tous les octets avec le bit de poids fort défini selon les " "besoins à l'aide d'un :mailheader:`Content-Transfer-Encoding` compatible " "ASCII. Autrement dit, transforme les parties non ASCII :mailheader:`Content-" -"Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) en un :" -"mailheader:`Content-Transfer-Encoding` compatible ASCII, et encode les " +"Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) en " +"un :mailheader:`Content-Transfer-Encoding` compatible ASCII, et encode les " "octets non ASCII non valides RFC dans les en-têtes utilisant le jeu de " "caractères MIME ``unknown-8bit``, les rendant ainsi conformes à la RFC." @@ -355,49 +359,52 @@ msgstr "" #: library/email.generator.rst:222 msgid "" -"Write *s* to the *write* method of the *outfp* passed to the :class:" -"`Generator`'s constructor. This provides just enough file-like API for :" -"class:`Generator` instances to be used in the :func:`print` function." +"Write *s* to the *write* method of the *outfp* passed to " +"the :class:`Generator`'s constructor. This provides just enough file-like " +"API for :class:`Generator` instances to be used in the :func:`print` " +"function." msgstr "" -"Écrit *s* dans la méthode *write* de *outfp* passé au constructeur de :class:" -"`Generator`. Cela fournit une API ressemblant suffisamment au type fichier " -"pour les instances de :class:`Generator` utilisées dans la fonction :func:" -"`print`." +"Écrit *s* dans la méthode *write* de *outfp* passé au constructeur " +"de :class:`Generator`. Cela fournit une API ressemblant suffisamment au type " +"fichier pour les instances de :class:`Generator` utilisées dans la " +"fonction :func:`print`." #: library/email.generator.rst:228 msgid "" -"As a convenience, :class:`~email.message.EmailMessage` provides the methods :" -"meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` (a.k.a. :" -"meth:`~email.message.EmailMessage.__str__`), which simplify the generation " -"of a formatted string representation of a message object. For more detail, " -"see :mod:`email.message`." +"As a convenience, :class:`~email.message.EmailMessage` provides the " +"methods :meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` " +"(a.k.a. :meth:`~email.message.EmailMessage.__str__`), which simplify the " +"generation of a formatted string representation of a message object. For " +"more detail, see :mod:`email.message`." msgstr "" -"Par commodité, :class:`~email.message.EmailMessage` fournit les méthodes :" -"meth:`~email.message.EmailMessage.as_string` et ``str(aMessage)`` (alias :" -"meth:`~email.message .EmailMessage.__str__`), qui simplifient la génération " -"d'une représentation sous forme de chaîne formatée d'un objet message. Pour " -"plus de détails, voir :mod:`email.message`." +"Par commodité, :class:`~email.message.EmailMessage` fournit les " +"méthodes :meth:`~email.message.EmailMessage.as_string` et ``str(aMessage)`` " +"(alias :meth:`~email.message .EmailMessage.__str__`), qui simplifient la " +"génération d'une représentation sous forme de chaîne formatée d'un objet " +"message. Pour plus de détails, voir :mod:`email.message`." #: library/email.generator.rst:235 +#, fuzzy msgid "" -"The :mod:`email.generator` module also provides a derived class, :class:" -"`DecodedGenerator`, which is like the :class:`Generator` base class, except " -"that non-\\ :mimetype:`text` parts are not serialized, but are instead " -"represented in the output stream by a string derived from a template filled " -"in with information about the part." +"The :mod:`!email.generator` module also provides a derived " +"class, :class:`DecodedGenerator`, which is like the :class:`Generator` base " +"class, except that non-\\ :mimetype:`text` parts are not serialized, but are " +"instead represented in the output stream by a string derived from a template " +"filled in with information about the part." msgstr "" -"Le module :mod:`email.generator` fournit également une classe dérivée, :" -"class:`DecodedGenerator`, qui ressemble à la classe de base :class:" -"`Generator`, sauf que les parties non-\\ :mimetype:`text` ne sont pas " -"sérialisées, mais sont plutôt représentées dans le flux de sortie par une " -"chaîne dérivée d'un modèle rempli d'informations sur la partie concernée." +"Le module :mod:`email.generator` fournit également une classe " +"dérivée, :class:`DecodedGenerator`, qui ressemble à la classe de " +"base :class:`Generator`, sauf que les parties non-\\ :mimetype:`text` ne " +"sont pas sérialisées, mais sont plutôt représentées dans le flux de sortie " +"par une chaîne dérivée d'un modèle rempli d'informations sur la partie " +"concernée." #: library/email.generator.rst:244 msgid "" "Act like :class:`Generator`, except that for any subpart of the message " -"passed to :meth:`Generator.flatten`, if the subpart is of main type :" -"mimetype:`text`, print the decoded payload of the subpart, and if the main " -"type is not :mimetype:`text`, instead of printing it fill in the string " +"passed to :meth:`Generator.flatten`, if the subpart is of main " +"type :mimetype:`text`, print the decoded payload of the subpart, and if the " +"main type is not :mimetype:`text`, instead of printing it fill in the string " "*fmt* using information from the part and print the resulting filled-in " "string." msgstr "" @@ -458,8 +465,8 @@ msgstr "" #: library/email.generator.rst:270 msgid "" -"Optional *_mangle_from_* and *maxheaderlen* are as with the :class:" -"`Generator` base class." +"Optional *_mangle_from_* and *maxheaderlen* are as with " +"the :class:`Generator` base class." msgstr "" "*_mangle_from_* et *maxheaderlen* sont optionnels et fonctionnent comme avec " "la classe mère :class:`Generator`." @@ -473,18 +480,19 @@ msgstr "Notes" msgid "" "This statement assumes that you use the appropriate setting for " "``unixfrom``, and that there are no :mod:`email.policy` settings calling for " -"automatic adjustments (for example, :attr:`~email.policy.EmailPolicy." -"refold_source` must be ``none``, which is *not* the default). It is also " -"not 100% true, since if the message does not conform to the RFC standards " -"occasionally information about the exact original text is lost during " -"parsing error recovery. It is a goal to fix these latter edge cases when " -"possible." +"automatic adjustments (for " +"example, :attr:`~email.policy.EmailPolicy.refold_source` must be ``none``, " +"which is *not* the default). It is also not 100% true, since if the message " +"does not conform to the RFC standards occasionally information about the " +"exact original text is lost during parsing error recovery. It is a goal to " +"fix these latter edge cases when possible." msgstr "" "Cette déclaration suppose que vous utilisez le paramètre approprié pour " "``unixfrom`` et qu'il n'y a pas de paramètres :mod:`policy` entraînant des " -"ajustements automatiques (par exemple, :attr:`~email.policy.Policy." -"refold_source` doit être ``none``, ce qui n'est *pas* la valeur par défaut). " -"Ce n'est pas non plus vrai à 100 %, car si le message n'est pas conforme aux " -"normes RFC, des informations sur le texte original sont parfois perdues lors " -"de la récupération d'erreur d'analyse. L'objectif est de résoudre ces " -"derniers cas extrêmes lorsque c'est possible." +"ajustements automatiques (par " +"exemple, :attr:`~email.policy.Policy.refold_source` doit être ``none``, ce " +"qui n'est *pas* la valeur par défaut). Ce n'est pas non plus vrai à 100 %, " +"car si le message n'est pas conforme aux normes RFC, des informations sur le " +"texte original sont parfois perdues lors de la récupération d'erreur " +"d'analyse. L'objectif est de résoudre ces derniers cas extrêmes lorsque " +"c'est possible." diff --git a/library/email.header.po b/library/email.header.po index 1d415924c..3854c8ca6 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-03-15 22:51+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -35,10 +35,11 @@ msgid "" msgstr "" "Ce module fait partie de l'ancienne API de messagerie (``Compat32``). Dans " "l'API actuelle, l'encodage et le décodage des en-têtes sont gérés de manière " -"transparente par l'API de type dictionnaire de la classe :class:`~email." -"message.EmailMessage`. En plus des utilisations dans de l'ancien code, ce " -"module peut être utile dans les applications qui doivent contrôler " -"complètement les jeux de caractères utilisés lors de l'encodage des en-têtes." +"transparente par l'API de type dictionnaire de la " +"classe :class:`~email.message.EmailMessage`. En plus des utilisations dans " +"de l'ancien code, ce module peut être utile dans les applications qui " +"doivent contrôler complètement les jeux de caractères utilisés lors de " +"l'encodage des en-têtes." #: library/email.header.rst:17 msgid "" @@ -64,15 +65,17 @@ msgstr "" "ASCII 7 bits." #: library/email.header.rst:24 +#, fuzzy msgid "" "Of course, as email has been deployed worldwide, it has become " "internationalized, such that language specific character sets can now be " "used in email messages. The base standard still requires email messages to " "be transferred using only 7-bit ASCII characters, so a slew of RFCs have " "been written describing how to encode email containing non-ASCII characters " -"into :rfc:`2822`\\ -compliant format. These RFCs include :rfc:`2045`, :rfc:" -"`2046`, :rfc:`2047`, and :rfc:`2231`. The :mod:`email` package supports " -"these standards in its :mod:`email.header` and :mod:`email.charset` modules." +"into :rfc:`2822`\\ -compliant format. These RFCs " +"include :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, and :rfc:`2231`. " +"The :mod:`email` package supports these standards in its :mod:`!" +"email.header` and :mod:`email.charset` modules." msgstr "" "Bien sûr, à mesure que le courrier électronique a été déployé dans le monde, " "il s'est internationalisé, de sorte que des jeux de caractères spécifiques à " @@ -86,37 +89,41 @@ msgstr "" "et :mod:`email.charset`." #: library/email.header.rst:33 +#, fuzzy msgid "" "If you want to include non-ASCII characters in your email headers, say in " -"the :mailheader:`Subject` or :mailheader:`To` fields, you should use the :" -"class:`Header` class and assign the field in the :class:`~email.message." -"Message` object to an instance of :class:`Header` instead of using a string " -"for the header value. Import the :class:`Header` class from the :mod:`email." -"header` module. For example::" +"the :mailheader:`Subject` or :mailheader:`To` fields, you should use " +"the :class:`Header` class and assign the field in " +"the :class:`~email.message.Message` object to an instance of :class:`Header` " +"instead of using a string for the header value. Import the :class:`Header` " +"class from the :mod:`!email.header` module. For example::" msgstr "" "Si vous souhaitez inclure des caractères non-ASCII dans les en-têtes de vos " -"e-mails, par exemple dans les champs :mailheader:`Subject` ou :mailheader:" -"`To`, vous devez utiliser la classe :class:`Header` et affecter le champ " -"dans le :class:`~email.message.Message` à une instance de :class:`Header` au " -"lieu d'utiliser une chaîne pour la valeur de l'en-tête. Importez la classe :" -"class:`Header` du module :mod:`email.header`. Par exemple ::" +"e-mails, par exemple dans les champs :mailheader:`Subject` " +"ou :mailheader:`To`, vous devez utiliser la classe :class:`Header` et " +"affecter le champ dans le :class:`~email.message.Message` à une instance " +"de :class:`Header` au lieu d'utiliser une chaîne pour la valeur de l'en-" +"tête. Importez la classe :class:`Header` du module :mod:`email.header`. Par " +"exemple ::" #: library/email.header.rst:50 msgid "" "Notice here how we wanted the :mailheader:`Subject` field to contain a non-" "ASCII character? We did this by creating a :class:`Header` instance and " "passing in the character set that the byte string was encoded in. When the " -"subsequent :class:`~email.message.Message` instance was flattened, the :" -"mailheader:`Subject` field was properly :rfc:`2047` encoded. MIME-aware " -"mail readers would show this header using the embedded ISO-8859-1 character." +"subsequent :class:`~email.message.Message` instance was flattened, " +"the :mailheader:`Subject` field was properly :rfc:`2047` encoded. MIME-" +"aware mail readers would show this header using the embedded ISO-8859-1 " +"character." msgstr "" "Remarquez ici comment nous voulions que le champ :mailheader:`Subject` " -"contienne un caractère non-ASCII : nous avons créé une instance :class:" -"`Header` et transmis le jeu de caractères dans lequel la chaîne d'octets " -"était encodée. Lorsque l'instance suivante :class:`~email.message.Message` a " -"été aplatie, le champ :mailheader:`Subject` était correctement encodé selon " -"la :rfc:`2047`. Les lecteurs de courrier compatibles MIME afficheraient cet " -"en-tête en utilisant le caractère ISO-8859-1 intégré." +"contienne un caractère non-ASCII : nous avons créé une " +"instance :class:`Header` et transmis le jeu de caractères dans lequel la " +"chaîne d'octets était encodée. Lorsque l'instance " +"suivante :class:`~email.message.Message` a été aplatie, le " +"champ :mailheader:`Subject` était correctement encodé selon la :rfc:`2047`. " +"Les lecteurs de courrier compatibles MIME afficheraient cet en-tête en " +"utilisant le caractère ISO-8859-1 intégré." #: library/email.header.rst:57 msgid "Here is the :class:`Header` class description:" @@ -133,15 +140,16 @@ msgstr "" #: library/email.header.rst:65 msgid "" "Optional *s* is the initial header value. If ``None`` (the default), the " -"initial header value is not set. You can later append to the header with :" -"meth:`append` method calls. *s* may be an instance of :class:`bytes` or :" -"class:`str`, but see the :meth:`append` documentation for semantics." +"initial header value is not set. You can later append to the header " +"with :meth:`append` method calls. *s* may be an instance of :class:`bytes` " +"or :class:`str`, but see the :meth:`append` documentation for semantics." msgstr "" "*s* (facultatif) est la valeur d'en-tête initiale. S'il vaut ``None`` " "(valeur par défaut), la valeur d'en-tête initiale n'est pas définie. Vous " -"pouvez ensuite ajouter des choses à l'en-tête avec des appels de méthode :" -"meth:`append`. *s* peut être une instance de :class:`bytes` ou :class:`str`, " -"mais consultez la documentation :meth:`append` pour la sémantique." +"pouvez ensuite ajouter des choses à l'en-tête avec des appels de " +"méthode :meth:`append`. *s* peut être une instance de :class:`bytes` " +"ou :class:`str`, mais consultez la documentation :meth:`append` pour la " +"sémantique." #: library/email.header.rst:70 msgid "" @@ -208,11 +216,11 @@ msgid "" "``None`` (the default) means that the *charset* given in the constructor is " "used." msgstr "" -"Le *charset* facultatif, s'il est fourni, doit être une instance de :class:" -"`~email.charset.Charset` (voir :mod:`email.charset`) ou le nom d'un jeu de " -"caractères, qui est converti en une instance :class:`~email.charset." -"Charset`. Une valeur ``None`` (la valeur par défaut) signifie que le " -"*charset* donné dans le constructeur est utilisé." +"Le *charset* facultatif, s'il est fourni, doit être une instance " +"de :class:`~email.charset.Charset` (voir :mod:`email.charset`) ou le nom " +"d'un jeu de caractères, qui est converti en une " +"instance :class:`~email.charset.Charset`. Une valeur ``None`` (la valeur par " +"défaut) signifie que le *charset* donné dans le constructeur est utilisé." #: library/email.header.rst:102 msgid "" @@ -236,15 +244,16 @@ msgstr "" #: library/email.header.rst:110 msgid "" -"In either case, when producing an :rfc:`2822`\\ -compliant header using :rfc:" -"`2047` rules, the string will be encoded using the output codec of the " -"charset. If the string cannot be encoded using the output codec, a " +"In either case, when producing an :rfc:`2822`\\ -compliant header " +"using :rfc:`2047` rules, the string will be encoded using the output codec " +"of the charset. If the string cannot be encoded using the output codec, a " "UnicodeError will be raised." msgstr "" -"Dans les deux cas, lors de la production d'un en-tête conforme à la :rfc:" -"`2822` à l'aide des règles :rfc:`2047`, la chaîne est encodée à l'aide du " -"codec de sortie du jeu de caractères. Si la chaîne ne peut pas être encodée " -"à l'aide du codec de sortie, une erreur *UnicodeError* est levée." +"Dans les deux cas, lors de la production d'un en-tête conforme à " +"la :rfc:`2822` à l'aide des règles :rfc:`2047`, la chaîne est encodée à " +"l'aide du codec de sortie du jeu de caractères. Si la chaîne ne peut pas " +"être encodée à l'aide du codec de sortie, une erreur *UnicodeError* est " +"levée." #: library/email.header.rst:115 msgid "" @@ -281,15 +290,15 @@ msgstr "" "*splitchars* (facultatif) est une chaîne contenant des caractères auxquels " "l'algorithme de fractionnement doit donner un poids supplémentaire lors du " "reformatage normal de l'en-tête. Il s'agit d'une prise en charge très " -"approximative des « ruptures syntaxiques de niveau supérieur » de la :RFC:" -"`2822` : les points de séparation précédés d'un caractère de séparation sont " -"préférés lors de la séparation des lignes, les caractères étant préférés " -"dans l'ordre dans lequel ils apparaissent dans la chaîne. Une espace et une " -"tabulation peuvent être incluses dans la chaîne pour indiquer si la " -"préférence doit être donnée à l'une plutôt qu'à l'autre comme point de " +"approximative des « ruptures syntaxiques de niveau supérieur » de " +"la :RFC:`2822` : les points de séparation précédés d'un caractère de " +"séparation sont préférés lors de la séparation des lignes, les caractères " +"étant préférés dans l'ordre dans lequel ils apparaissent dans la chaîne. Une " +"espace et une tabulation peuvent être incluses dans la chaîne pour indiquer " +"si la préférence doit être donnée à l'une plutôt qu'à l'autre comme point de " "partage lorsque d'autres caractères fractionnés n'apparaissent pas dans la " -"ligne fractionnée. *splitchars* n'affecte pas les lignes encodées selon la :" -"RFC:`2047`." +"ligne fractionnée. *splitchars* n'affecte pas les lignes encodées selon " +"la :RFC:`2047`." #: library/email.header.rst:135 msgid "" @@ -347,20 +356,21 @@ msgstr "ajout de la gestion du jeu de caractères ``'unknown-8bit'``." msgid "" "This method allows you to compare two :class:`Header` instances for equality." msgstr "" -"Cette méthode vous permet de tester l'égalité de deux instances de :class:" -"`Header`." +"Cette méthode vous permet de tester l'égalité de deux instances " +"de :class:`Header`." #: library/email.header.rst:170 msgid "" "This method allows you to compare two :class:`Header` instances for " "inequality." msgstr "" -"Cette méthode vous permet de tester l'inégalité de deux instances de :class:" -"`Header`." +"Cette méthode vous permet de tester l'inégalité de deux instances " +"de :class:`Header`." #: library/email.header.rst:173 +#, fuzzy msgid "" -"The :mod:`email.header` module also provides the following convenient " +"The :mod:`!email.header` module also provides the following convenient " "functions." msgstr "" "Le module :mod:`email.header` fournit également les fonctions pratiques " @@ -375,30 +385,56 @@ msgstr "" "La valeur de l'en-tête est dans *header*." #: library/email.header.rst:181 +msgid "For historical reasons, this function may return either:" +msgstr "" + +#: library/email.header.rst:183 +msgid "" +"A list of pairs containing each of the decoded parts of the header, " +"``(decoded_bytes, charset)``, where *decoded_bytes* is always an instance " +"of :class:`bytes`, and *charset* is either:" +msgstr "" + +#: library/email.header.rst:187 +msgid "A lower case string containing the name of the character set specified." +msgstr "" + +#: library/email.header.rst:189 +msgid "``None`` for non-encoded parts of the header." +msgstr "" + +#: library/email.header.rst:191 msgid "" -"This function returns a list of ``(decoded_string, charset)`` pairs " -"containing each of the decoded parts of the header. *charset* is ``None`` " -"for non-encoded parts of the header, otherwise a lower case string " -"containing the name of the character set specified in the encoded string." +"A list of length 1 containing a pair ``(string, None)``, where *string* is " +"always an instance of :class:`str`." msgstr "" -"Cette fonction renvoie une liste de paires ``(decoded_string, charset)`` " -"contenant chacune des parties décodées de l'en-tête. *charset* est ``None`` " -"pour les parties non encodées de l'en-tête, sinon une chaîne en minuscules " -"contenant le nom du jeu de caractères spécifié dans la chaîne encodée." -#: library/email.header.rst:186 -msgid "Here's an example::" +#: library/email.header.rst:194 +msgid "" +"An :exc:`email.errors.HeaderParseError` may be raised when certain decoding " +"errors occur (e.g. a base64 decoding exception)." +msgstr "" + +#: library/email.header.rst:197 +#, fuzzy +msgid "Here are examples:" msgstr "Voici un exemple ::" -#: library/email.header.rst:195 +#: library/email.header.rst:209 msgid "" -"Create a :class:`Header` instance from a sequence of pairs as returned by :" -"func:`decode_header`." +"This function exists for backwards compatibility only. For new code, we " +"recommend using :class:`email.headerregistry.HeaderRegistry`." +msgstr "" + +#: library/email.header.rst:215 +msgid "" +"Create a :class:`Header` instance from a sequence of pairs as returned " +"by :func:`decode_header`." msgstr "" "Crée une instance :class:`Header` à partir d'une séquence de paires " "renvoyées par :func:`decode_header`." -#: library/email.header.rst:198 +#: library/email.header.rst:218 msgid "" ":func:`decode_header` takes a header value string and returns a sequence of " "pairs of the format ``(decoded_string, charset)`` where *charset* is the " @@ -408,12 +444,31 @@ msgstr "" "séquence de paires au format ``(decoded_string, charset)`` où *charset* est " "le nom du jeu de caractères." -#: library/email.header.rst:202 +#: library/email.header.rst:222 msgid "" -"This function takes one of those sequence of pairs and returns a :class:" -"`Header` instance. Optional *maxlinelen*, *header_name*, and " +"This function takes one of those sequence of pairs and returns " +"a :class:`Header` instance. Optional *maxlinelen*, *header_name*, and " "*continuation_ws* are as in the :class:`Header` constructor." msgstr "" "Cette fonction prend l'une de ces séquences de paires et renvoie une " "instance :class:`Header`. *maxlinelen*, *header_name* et *continuation_ws* " "(facultatifs) s'utilisent comme dans le constructeur :class:`Header`." + +#: library/email.header.rst:228 +msgid "" +"This function exists for backwards compatibility only, and is not " +"recommended for use in new code." +msgstr "" + +#~ msgid "" +#~ "This function returns a list of ``(decoded_string, charset)`` pairs " +#~ "containing each of the decoded parts of the header. *charset* is " +#~ "``None`` for non-encoded parts of the header, otherwise a lower case " +#~ "string containing the name of the character set specified in the encoded " +#~ "string." +#~ msgstr "" +#~ "Cette fonction renvoie une liste de paires ``(decoded_string, charset)`` " +#~ "contenant chacune des parties décodées de l'en-tête. *charset* est " +#~ "``None`` pour les parties non encodées de l'en-tête, sinon une chaîne en " +#~ "minuscules contenant le nom du jeu de caractères spécifié dans la chaîne " +#~ "encodée." diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 2f6883df7..290ae739c 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-03-17 22:00+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,98 +20,102 @@ msgstr "" msgid ":mod:`!email.headerregistry`: Custom Header Objects" msgstr ":mod:`email.headerregistry` : objets d'en-tête personnalisés" -#: library/email.headerregistry.rst:10 +#: library/email.headerregistry.rst:7 msgid "**Source code:** :source:`Lib/email/headerregistry.py`" msgstr "**Code source :** :source:`Lib/email/headerregistry.py`" -#: library/email.headerregistry.rst:14 +#: library/email.headerregistry.rst:11 msgid "[1]_" msgstr "[1]_" -#: library/email.headerregistry.rst:16 +#: library/email.headerregistry.rst:13 msgid "" "Headers are represented by customized subclasses of :class:`str`. The " -"particular class used to represent a given header is determined by the :attr:" -"`~email.policy.EmailPolicy.header_factory` of the :mod:`~email.policy` in " -"effect when the headers are created. This section documents the particular " -"``header_factory`` implemented by the email package for handling :RFC:`5322` " -"compliant email messages, which not only provides customized header objects " -"for various header types, but also provides an extension mechanism for " -"applications to add their own custom header types." -msgstr "" -"Les en-têtes sont représentés par des sous-classes personnalisées de :class:" -"`str`. La classe particulière utilisée pour représenter un en-tête donné est " -"déterminée par :attr:`~email.policy.EmailPolicy.header_factory` de la :mod:" -"`~email.policy` en vigueur lorsque les en-têtes sont créés. Cette section " -"documente la ``header_factory`` particulière implémentée par le paquet de " -"messagerie pour la gestion des messages électroniques conformes à la :RFC:" -"`5322`, qui fournit non seulement des objets d'en-tête personnalisés pour " -"différents types d'en-tête, mais fournit également un mécanisme d'extension " -"permettant aux applications d'ajouter leurs propres types d'en-tête " -"personnalisés." - -#: library/email.headerregistry.rst:25 -msgid "" -"When using any of the policy objects derived from :data:`~email.policy." -"EmailPolicy`, all headers are produced by :class:`.HeaderRegistry` and have :" -"class:`.BaseHeader` as their last base class. Each header class has an " -"additional base class that is determined by the type of the header. For " -"example, many headers have the class :class:`.UnstructuredHeader` as their " -"other base class. The specialized second class for a header is determined " -"by the name of the header, using a lookup table stored in the :class:`." -"HeaderRegistry`. All of this is managed transparently for the typical " -"application program, but interfaces are provided for modifying the default " -"behavior for use by more complex applications." +"particular class used to represent a given header is determined by " +"the :attr:`~email.policy.EmailPolicy.header_factory` of " +"the :mod:`~email.policy` in effect when the headers are created. This " +"section documents the particular ``header_factory`` implemented by the email " +"package for handling :RFC:`5322` compliant email messages, which not only " +"provides customized header objects for various header types, but also " +"provides an extension mechanism for applications to add their own custom " +"header types." +msgstr "" +"Les en-têtes sont représentés par des sous-classes personnalisées " +"de :class:`str`. La classe particulière utilisée pour représenter un en-tête " +"donné est déterminée par :attr:`~email.policy.EmailPolicy.header_factory` de " +"la :mod:`~email.policy` en vigueur lorsque les en-têtes sont créés. Cette " +"section documente la ``header_factory`` particulière implémentée par le " +"paquet de messagerie pour la gestion des messages électroniques conformes à " +"la :RFC:`5322`, qui fournit non seulement des objets d'en-tête personnalisés " +"pour différents types d'en-tête, mais fournit également un mécanisme " +"d'extension permettant aux applications d'ajouter leurs propres types d'en-" +"tête personnalisés." + +#: library/email.headerregistry.rst:22 +msgid "" +"When using any of the policy objects derived " +"from :data:`~email.policy.EmailPolicy`, all headers are produced " +"by :class:`.HeaderRegistry` and have :class:`.BaseHeader` as their last base " +"class. Each header class has an additional base class that is determined by " +"the type of the header. For example, many headers have the " +"class :class:`.UnstructuredHeader` as their other base class. The " +"specialized second class for a header is determined by the name of the " +"header, using a lookup table stored in the :class:`.HeaderRegistry`. All of " +"this is managed transparently for the typical application program, but " +"interfaces are provided for modifying the default behavior for use by more " +"complex applications." msgstr "" "Lors de l'utilisation de l'un des objets de définition de politique dérivés " -"de :data:`~email.policy.EmailPolicy`, tous les en-têtes sont produits par :" -"class:`.HeaderRegistry` et ont :class:`.BaseHeader` comme dernière classe " -"mère. Chaque classe d'en-tête a une classe mère supplémentaire qui est " -"déterminée par le type de l'en-tête. Par exemple, de nombreux en-têtes ont " -"la classe :class:`.UnstructuredHeader` comme autre classe mère. La deuxième " -"classe spécialisée pour un en-tête est déterminée par le nom de l'en-tête, " -"en utilisant un tableau de recherche stocké dans :class:`.HeaderRegistry`. " -"Tout cela est géré de manière transparente pour le programme d'application " -"typique, mais des interfaces sont fournies pour modifier le comportement par " -"défaut pour une utilisation par des applications plus complexes." - -#: library/email.headerregistry.rst:36 +"de :data:`~email.policy.EmailPolicy`, tous les en-têtes sont produits " +"par :class:`.HeaderRegistry` et ont :class:`.BaseHeader` comme dernière " +"classe mère. Chaque classe d'en-tête a une classe mère supplémentaire qui " +"est déterminée par le type de l'en-tête. Par exemple, de nombreux en-têtes " +"ont la classe :class:`.UnstructuredHeader` comme autre classe mère. La " +"deuxième classe spécialisée pour un en-tête est déterminée par le nom de " +"l'en-tête, en utilisant un tableau de recherche stocké " +"dans :class:`.HeaderRegistry`. Tout cela est géré de manière transparente " +"pour le programme d'application typique, mais des interfaces sont fournies " +"pour modifier le comportement par défaut pour une utilisation par des " +"applications plus complexes." + +#: library/email.headerregistry.rst:33 msgid "" "The sections below first document the header base classes and their " -"attributes, followed by the API for modifying the behavior of :class:`." -"HeaderRegistry`, and finally the support classes used to represent the data " -"parsed from structured headers." +"attributes, followed by the API for modifying the behavior " +"of :class:`.HeaderRegistry`, and finally the support classes used to " +"represent the data parsed from structured headers." msgstr "" "Les sections ci-dessous documentent d'abord les classes mères d'en-tête et " -"leurs attributs, suivies de l'API pour modifier le comportement de :class:`." -"HeaderRegistry`, et enfin les classes de gestion utilisées pour représenter " -"les données analysées à partir d'en-têtes structurés." +"leurs attributs, suivies de l'API pour modifier le comportement " +"de :class:`.HeaderRegistry`, et enfin les classes de gestion utilisées pour " +"représenter les données analysées à partir d'en-têtes structurés." -#: library/email.headerregistry.rst:44 +#: library/email.headerregistry.rst:41 msgid "" -"*name* and *value* are passed to ``BaseHeader`` from the :attr:`~email." -"policy.EmailPolicy.header_factory` call. The string value of any header " -"object is the *value* fully decoded to unicode." +"*name* and *value* are passed to ``BaseHeader`` from " +"the :attr:`~email.policy.EmailPolicy.header_factory` call. The string value " +"of any header object is the *value* fully decoded to unicode." msgstr "" -"*name* et *value* sont passés à ``BaseHeader`` à partir de l'appel :attr:" -"`~email.policy.EmailPolicy.header_factory`. La valeur de chaîne de tout " -"objet d'en-tête est la *value* entièrement décodée en Unicode." +"*name* et *value* sont passés à ``BaseHeader`` à partir de " +"l'appel :attr:`~email.policy.EmailPolicy.header_factory`. La valeur de " +"chaîne de tout objet d'en-tête est la *value* entièrement décodée en Unicode." -#: library/email.headerregistry.rst:48 +#: library/email.headerregistry.rst:45 msgid "This base class defines the following read-only properties:" msgstr "Cette classe mère définit les propriétés en lecture seule suivantes :" -#: library/email.headerregistry.rst:53 +#: library/email.headerregistry.rst:50 msgid "" "The name of the header (the portion of the field before the ':'). This is " -"exactly the value passed in the :attr:`~email.policy.EmailPolicy." -"header_factory` call for *name*; that is, case is preserved." +"exactly the value passed in " +"the :attr:`~email.policy.EmailPolicy.header_factory` call for *name*; that " +"is, case is preserved." msgstr "" "Nom de l'en-tête (la partie du champ avant le ``:``). C'est exactement la " "valeur passée dans l'appel :attr:`~email.policy.EmailPolicy.header_factory` " "pour *name* ; c'est-à-dire que la casse est préservée." -#: library/email.headerregistry.rst:61 +#: library/email.headerregistry.rst:58 msgid "" "A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any RFC " "compliance problems found during parsing. The email package tries to be " @@ -124,7 +128,7 @@ msgstr "" "conformité. Voir le module :mod:`~email.errors` pour une discussion sur les " "types de défauts qui peuvent être signalés." -#: library/email.headerregistry.rst:69 +#: library/email.headerregistry.rst:66 msgid "" "The maximum number of headers of this type that can have the same ``name``. " "A value of ``None`` means unlimited. The ``BaseHeader`` value for this " @@ -136,7 +140,7 @@ msgstr "" "attribut est ``None`` ; les classes d'en-tête spécialisées sont censées " "remplacer cette valeur si nécessaire." -#: library/email.headerregistry.rst:74 +#: library/email.headerregistry.rst:71 msgid "" "``BaseHeader`` also provides the following method, which is called by the " "email library code and should not in general be called by application " @@ -146,24 +150,24 @@ msgstr "" "code de la bibliothèque de messagerie et ne doit généralement pas être " "appelée par les programmes d'application :" -#: library/email.headerregistry.rst:80 +#: library/email.headerregistry.rst:77 msgid "" "Return a string containing :attr:`~email.policy.Policy.linesep` characters " -"as required to correctly fold the header according to *policy*. A :attr:" -"`~email.policy.Policy.cte_type` of ``8bit`` will be treated as if it were " -"``7bit``, since headers may not contain arbitrary binary data. If :attr:" -"`~email.policy.EmailPolicy.utf8` is ``False``, non-ASCII data will be :rfc:" -"`2047` encoded." -msgstr "" -"Renvoie une chaîne contenant les caractères :attr:`~email.policy.Policy." -"linesep` nécessaires pour remettre en forme correctement l'en-tête " -"conformément à *policy*. Un :attr:`~email.policy.Policy.cte_type` de " -"``8bit`` est traité comme s'il s'agissait de ``7bit``, car les en-têtes ne " -"peuvent pas contenir de données binaires arbitraires. Si :attr:`~email." -"policy.EmailPolicy.utf8` est ``False``, les données non-ASCII seront " -"encodées selon la :rfc:`2047`." - -#: library/email.headerregistry.rst:88 +"as required to correctly fold the header according to *policy*. " +"A :attr:`~email.policy.Policy.cte_type` of ``8bit`` will be treated as if it " +"were ``7bit``, since headers may not contain arbitrary binary data. " +"If :attr:`~email.policy.EmailPolicy.utf8` is ``False``, non-ASCII data will " +"be :rfc:`2047` encoded." +msgstr "" +"Renvoie une chaîne contenant les " +"caractères :attr:`~email.policy.Policy.linesep` nécessaires pour remettre en " +"forme correctement l'en-tête conformément à *policy*. " +"Un :attr:`~email.policy.Policy.cte_type` de ``8bit`` est traité comme s'il " +"s'agissait de ``7bit``, car les en-têtes ne peuvent pas contenir de données " +"binaires arbitraires. Si :attr:`~email.policy.EmailPolicy.utf8` est " +"``False``, les données non-ASCII seront encodées selon la :rfc:`2047`." + +#: library/email.headerregistry.rst:85 msgid "" "``BaseHeader`` by itself cannot be used to create a header object. It " "defines a protocol that each specialized header cooperates with in order to " @@ -177,17 +181,19 @@ msgstr "" "nécessite que la classe spécialisée fournisse une :func:`classmethod` nommée " "``parse``. Cette méthode s'appelle comme suit ::" -#: library/email.headerregistry.rst:96 +#: library/email.headerregistry.rst:93 +#, fuzzy msgid "" "``kwds`` is a dictionary containing one pre-initialized key, ``defects``. " "``defects`` is an empty list. The parse method should append any detected " "defects to this list. On return, the ``kwds`` dictionary *must* contain " -"values for at least the keys ``decoded`` and ``defects``. ``decoded`` " -"should be the string value for the header (that is, the header value fully " -"decoded to unicode). The parse method should assume that *string* may " -"contain content-transfer-encoded parts, but should correctly handle all " -"valid unicode characters as well so that it can parse un-encoded header " -"values." +"values for at least the keys ``decoded``, ``defects`` and ``parse_tree``. " +"``decoded`` should be the string value for the header (that is, the header " +"value fully decoded to unicode). ``parse_tree`` is set to the parse tree " +"obtained from parsing the header. The parse method should assume that " +"*string* may contain content-transfer-encoded parts, but should correctly " +"handle all valid unicode characters as well so that it can parse un-encoded " +"header values." msgstr "" "``kwds`` est un dictionnaire contenant une clé pré-initialisée : " "``defects``. ``defects`` est une liste vide. La méthode d'analyse doit " @@ -200,7 +206,7 @@ msgstr "" "les caractères Unicode valides afin de pouvoir analyser les valeurs d'en-" "tête non codées." -#: library/email.headerregistry.rst:105 +#: library/email.headerregistry.rst:103 msgid "" "``BaseHeader``'s ``__new__`` then creates the header instance, and calls its " "``init`` method. The specialized class only needs to provide an ``init`` " @@ -213,7 +219,7 @@ msgstr "" "de ceux fournis par ``BaseHeader`` lui-même. Une telle méthode ``init`` " "devrait ressembler à ceci ::" -#: library/email.headerregistry.rst:114 +#: library/email.headerregistry.rst:112 msgid "" "That is, anything extra that the specialized class puts in to the ``kwds`` " "dictionary should be removed and handled, and the remaining contents of " @@ -223,19 +229,19 @@ msgstr "" "``kwds`` doit être supprimé et géré, et le contenu restant de ``kw`` (et " "``args``) est passé à la méthode ``init`` de ``BaseHeader``." -#: library/email.headerregistry.rst:121 +#: library/email.headerregistry.rst:119 msgid "" "An \"unstructured\" header is the default type of header in :rfc:`5322`. Any " "header that does not have a specified syntax is treated as unstructured. " "The classic example of an unstructured header is the :mailheader:`Subject` " "header." msgstr "" -"Un en-tête « non structuré » est le type d'en-tête par défaut dans la :rfc:" -"`5322`. Tout en-tête qui n'a pas de syntaxe spécifiée est traité comme non " -"structuré. L'exemple classique d'en-tête non structuré est l'en-tête :" -"mailheader:`Subject`." +"Un en-tête « non structuré » est le type d'en-tête par défaut dans " +"la :rfc:`5322`. Tout en-tête qui n'a pas de syntaxe spécifiée est traité " +"comme non structuré. L'exemple classique d'en-tête non structuré est l'en-" +"tête :mailheader:`Subject`." -#: library/email.headerregistry.rst:126 +#: library/email.headerregistry.rst:124 msgid "" "In :rfc:`5322`, an unstructured header is a run of arbitrary text in the " "ASCII character set. :rfc:`2047`, however, has an :rfc:`5322` compatible " @@ -259,11 +265,11 @@ msgstr "" "des problèmes tels que des caractères non valides dans les mots codés ou le " "texte non codé." -#: library/email.headerregistry.rst:136 +#: library/email.headerregistry.rst:134 msgid "This header type provides no additional attributes." msgstr "Ce type d'en-tête ne fournit aucun attribut supplémentaire." -#: library/email.headerregistry.rst:141 +#: library/email.headerregistry.rst:139 msgid "" ":rfc:`5322` specifies a very specific format for dates within email headers. " "The ``DateHeader`` parser recognizes that date format, as well as " @@ -275,32 +281,34 @@ msgstr "" "format de date, ainsi qu'un certain nombre de formes variantes que l'on " "trouve parfois « dans la nature »." -#: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 +#: library/email.headerregistry.rst:144 library/email.headerregistry.rst:186 msgid "This header type provides the following additional attributes:" msgstr "Ce type d'en-tête fournit les attributs supplémentaires suivants :" -#: library/email.headerregistry.rst:150 +#: library/email.headerregistry.rst:148 msgid "" "If the header value can be recognized as a valid date of one form or " "another, this attribute will contain a :class:`~datetime.datetime` instance " "representing that date. If the timezone of the input date is specified as " "``-0000`` (indicating it is in UTC but contains no information about the " -"source timezone), then :attr:`.datetime` will be a naive :class:`~datetime." -"datetime`. If a specific timezone offset is found (including ``+0000``), " -"then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:" -"`datetime.timezone` to record the timezone offset." +"source timezone), then :attr:`.datetime` will be a " +"naive :class:`~datetime.datetime`. If a specific timezone offset is found " +"(including ``+0000``), then :attr:`.datetime` will contain an aware " +"``datetime`` that uses :class:`datetime.timezone` to record the timezone " +"offset." msgstr "" "Si la valeur d'en-tête peut être reconnue comme une date valide d'une forme " -"ou d'une autre, cet attribut contient une instance :class:`~datetime." -"datetime` représentant cette date. Si le fuseau horaire de la date d'entrée " -"est spécifié comme ``-0000`` (indiquant qu'il est en UTC mais ne contient " -"aucune information sur le fuseau horaire source), alors :attr:`.datetime` " -"est une :class:`~datetime.datetime` naïve. Si un décalage de fuseau horaire " -"spécifique est trouvé (y compris ``+0000``), alors :attr:`.datetime` " -"contient un ``datetime`` avisé qui utilise :class:`datetime.timezone` pour " -"enregistrer le décalage lié au fuseau horaire." - -#: library/email.headerregistry.rst:160 +"ou d'une autre, cet attribut contient une " +"instance :class:`~datetime.datetime` représentant cette date. Si le fuseau " +"horaire de la date d'entrée est spécifié comme ``-0000`` (indiquant qu'il " +"est en UTC mais ne contient aucune information sur le fuseau horaire " +"source), alors :attr:`.datetime` est une :class:`~datetime.datetime` naïve. " +"Si un décalage de fuseau horaire spécifique est trouvé (y compris " +"``+0000``), alors :attr:`.datetime` contient un ``datetime`` avisé qui " +"utilise :class:`datetime.timezone` pour enregistrer le décalage lié au " +"fuseau horaire." + +#: library/email.headerregistry.rst:158 msgid "" "The ``decoded`` value of the header is determined by formatting the " "``datetime`` according to the :rfc:`5322` rules; that is, it is set to::" @@ -309,29 +317,29 @@ msgstr "" "``datetime`` selon les règles de la :rfc:`5322` ; c'est-à-dire qu'elle est " "définie sur ::" -#: library/email.headerregistry.rst:165 +#: library/email.headerregistry.rst:163 msgid "" "When creating a ``DateHeader``, *value* may be :class:`~datetime.datetime` " "instance. This means, for example, that the following code is valid and " "does what one would expect::" msgstr "" -"Lors de la création d'un ``DateHeader``, *value* peut être une instance de :" -"class:`~datetime.datetime`. Cela signifie, par exemple, que le code suivant " -"est valide et fait ce à quoi on pourrait s'attendre ::" +"Lors de la création d'un ``DateHeader``, *value* peut être une instance " +"de :class:`~datetime.datetime`. Cela signifie, par exemple, que le code " +"suivant est valide et fait ce à quoi on pourrait s'attendre ::" -#: library/email.headerregistry.rst:171 +#: library/email.headerregistry.rst:169 msgid "" "Because this is a naive ``datetime`` it will be interpreted as a UTC " "timestamp, and the resulting value will have a timezone of ``-0000``. Much " -"more useful is to use the :func:`~email.utils.localtime` function from the :" -"mod:`~email.utils` module::" +"more useful is to use the :func:`~email.utils.localtime` function from " +"the :mod:`~email.utils` module::" msgstr "" "Comme il s'agit d'un ``datetime`` naïf, il est interprété comme un " "horodatage UTC et la valeur résultante a un fuseau horaire de ``-0000``. Il " -"est beaucoup plus utile d'utiliser la fonction :func:`~email.utils." -"localtime` du module :mod:`~email.utils` ::" +"est beaucoup plus utile d'utiliser la " +"fonction :func:`~email.utils.localtime` du module :mod:`~email.utils` ::" -#: library/email.headerregistry.rst:178 +#: library/email.headerregistry.rst:176 msgid "" "This example sets the date header to the current time and date using the " "current timezone offset." @@ -339,7 +347,7 @@ msgstr "" "Cet exemple définit l'en-tête de date sur l'heure et la date actuelles à " "l'aide du décalage horaire actuel." -#: library/email.headerregistry.rst:184 +#: library/email.headerregistry.rst:182 msgid "" "Address headers are one of the most complex structured header types. The " "``AddressHeader`` class provides a generic interface to any address header." @@ -348,7 +356,7 @@ msgstr "" "complexes. La classe ``AddressHeader`` fournit une interface générique à " "n'importe quel en-tête d'adresse." -#: library/email.headerregistry.rst:193 +#: library/email.headerregistry.rst:191 msgid "" "A tuple of :class:`.Group` objects encoding the addresses and groups found " "in the header value. Addresses that are not part of a group are represented " @@ -360,7 +368,7 @@ msgstr "" "groupe sont représentées dans cette liste comme des ``Groups`` à adresse " "unique dont :attr:`~.Group.display_name` est ``None``." -#: library/email.headerregistry.rst:201 +#: library/email.headerregistry.rst:199 msgid "" "A tuple of :class:`.Address` objects encoding all of the individual " "addresses from the header value. If the header value contains any groups, " @@ -374,7 +382,7 @@ msgstr "" "dans la liste au point où le groupe apparaît dans la valeur (c'est-à-dire " "que la liste d'adresses est « aplatie » en une liste unidimensionnelle)." -#: library/email.headerregistry.rst:207 +#: library/email.headerregistry.rst:205 msgid "" "The ``decoded`` value of the header will have all encoded words decoded to " "unicode. :class:`~encodings.idna` encoded domain names are also decoded to " @@ -388,7 +396,7 @@ msgstr "" "` la valeur :class:`str` des éléments de l'attribut " "``groups`` avec ``', '``." -#: library/email.headerregistry.rst:213 +#: library/email.headerregistry.rst:211 msgid "" "A list of :class:`.Address` and :class:`.Group` objects in any combination " "may be used to set the value of an address header. ``Group`` objects whose " @@ -403,14 +411,14 @@ msgstr "" "d'adresses avec des groupes intacts en utilisant la liste obtenue à partir " "de l'attribut ``groups`` de l'en-tête source." -#: library/email.headerregistry.rst:222 +#: library/email.headerregistry.rst:220 msgid "" "A subclass of :class:`.AddressHeader` that adds one additional attribute:" msgstr "" "Sous-classe de :class:`.AddressHeader` qui ajoute un attribut " "supplémentaire :" -#: library/email.headerregistry.rst:228 +#: library/email.headerregistry.rst:226 msgid "" "The single address encoded by the header value. If the header value " "actually contains more than one address (which would be a violation of the " @@ -422,7 +430,7 @@ msgstr "" "sous la valeur par défaut :mod:`~email.policy`), l'accès à cet attribut lève " "une :exc:`ValueError`." -#: library/email.headerregistry.rst:234 +#: library/email.headerregistry.rst:232 msgid "" "Many of the above classes also have a ``Unique`` variant (for example, " "``UniqueUnstructuredHeader``). The only difference is that in the " @@ -432,7 +440,7 @@ msgstr "" "exemple, ``UniqueUnstructuredHeader``). La seule différence est que dans la " "variante ``Unique``, :attr:`~.BaseHeader.max_count` est définie sur 1." -#: library/email.headerregistry.rst:241 +#: library/email.headerregistry.rst:239 msgid "" "There is really only one valid value for the :mailheader:`MIME-Version` " "header, and that is ``1.0``. For future proofing, this header class " @@ -440,26 +448,26 @@ msgid "" "per :rfc:`2045`, then the header object will have non-``None`` values for " "the following attributes:" msgstr "" -"Il n'y a vraiment qu'une seule valeur valide pour l'en-tête :mailheader:" -"`MIME-Version`, et c'est ``1.0``. Au cas où, cette classe d'en-tête prend en " -"charge d'autres numéros de version valides. Si un numéro de version a une " -"valeur valide selon la :rfc:`2045`, alors l'objet d'en-tête a des valeurs " -"autres que ``None`` pour les attributs suivants :" +"Il n'y a vraiment qu'une seule valeur valide pour l'en-" +"tête :mailheader:`MIME-Version`, et c'est ``1.0``. Au cas où, cette classe " +"d'en-tête prend en charge d'autres numéros de version valides. Si un numéro " +"de version a une valeur valide selon la :rfc:`2045`, alors l'objet d'en-tête " +"a des valeurs autres que ``None`` pour les attributs suivants :" -#: library/email.headerregistry.rst:249 +#: library/email.headerregistry.rst:247 msgid "" "The version number as a string, with any whitespace and/or comments removed." msgstr "Numéro de version sous forme de chaîne, sans espaces ni commentaires." -#: library/email.headerregistry.rst:254 +#: library/email.headerregistry.rst:252 msgid "The major version number as an integer" msgstr "Numéro de version majeure sous forme d'entier" -#: library/email.headerregistry.rst:258 +#: library/email.headerregistry.rst:256 msgid "The minor version number as an integer" msgstr "Numéro de version mineure sous forme d'entier" -#: library/email.headerregistry.rst:263 +#: library/email.headerregistry.rst:261 msgid "" "MIME headers all start with the prefix 'Content-'. Each specific header has " "a certain value, described under the class for that header. Some can also " @@ -472,42 +480,47 @@ msgstr "" "qui ont un format commun. Cette classe sert de base à tous les en-têtes MIME " "qui prennent des paramètres." -#: library/email.headerregistry.rst:270 +#: library/email.headerregistry.rst:268 msgid "A dictionary mapping parameter names to parameter values." msgstr "" "Dictionnaire de correspondance entre les noms de paramètres et leurs valeurs." -#: library/email.headerregistry.rst:275 +#: library/email.headerregistry.rst:270 +msgid "" +"It is now a :class:`frozendict` instead of a :class:`types.MappingProxyType`." +msgstr "" + +#: library/email.headerregistry.rst:277 msgid "" -"A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" -"`Content-Type` header." +"A :class:`ParameterizedMIMEHeader` class that handles " +"the :mailheader:`Content-Type` header." msgstr "" -"Classe :class:`ParameterizedMIMEHeader` qui gère l'en-tête :mailheader:" -"`Content-Type`." +"Classe :class:`ParameterizedMIMEHeader` qui gère l'en-" +"tête :mailheader:`Content-Type`." -#: library/email.headerregistry.rst:280 +#: library/email.headerregistry.rst:282 msgid "The content type string, in the form ``maintype/subtype``." msgstr "Chaîne de type de contenu, sous la forme ``maintype/subtype``." -#: library/email.headerregistry.rst:289 +#: library/email.headerregistry.rst:291 msgid "" -"A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" -"`Content-Disposition` header." +"A :class:`ParameterizedMIMEHeader` class that handles " +"the :mailheader:`Content-Disposition` header." msgstr "" -"Classe :class:`ParameterizedMIMEHeader` qui gère l'en-tête :mailheader:" -"`Content-Disposition`." +"Classe :class:`ParameterizedMIMEHeader` qui gère l'en-" +"tête :mailheader:`Content-Disposition`." -#: library/email.headerregistry.rst:294 +#: library/email.headerregistry.rst:296 msgid "``inline`` and ``attachment`` are the only valid values in common use." msgstr "" "``inline`` et ``attachment`` sont les seules valeurs valides couramment " "utilisées." -#: library/email.headerregistry.rst:299 +#: library/email.headerregistry.rst:301 msgid "Handles the :mailheader:`Content-Transfer-Encoding` header." msgstr "Gère l'en-tête :mailheader:`Content-Transfer-Encoding`." -#: library/email.headerregistry.rst:303 +#: library/email.headerregistry.rst:305 msgid "" "Valid values are ``7bit``, ``8bit``, ``base64``, and ``quoted-printable``. " "See :rfc:`2045` for more information." @@ -515,7 +528,7 @@ msgstr "" "Les valeurs valides sont ``7bit``, ``8bit``, ``base64`` et ``quoted-" "printable``. Voir la :rfc:`2045` pour plus d'informations." -#: library/email.headerregistry.rst:312 +#: library/email.headerregistry.rst:314 #, fuzzy msgid "" "This is the factory used by :class:`~email.policy.EmailPolicy` by default. " @@ -539,7 +552,7 @@ msgstr "" "l'initialisation. *base_class* est toujours la dernière classe dans la liste " "``__bases__`` de la classe générée." -#: library/email.headerregistry.rst:322 +#: library/email.headerregistry.rst:324 msgid "The default mappings are:" msgstr "Les correspondances par défaut sont :" @@ -547,7 +560,7 @@ msgstr "Les correspondances par défaut sont :" msgid "subject" msgstr "subject" -#: library/email.headerregistry.rst:324 +#: library/email.headerregistry.rst:326 msgid "UniqueUnstructuredHeader" msgstr "UniqueUnstructuredHeader" @@ -555,7 +568,7 @@ msgstr "UniqueUnstructuredHeader" msgid "date" msgstr "date" -#: library/email.headerregistry.rst:325 library/email.headerregistry.rst:327 +#: library/email.headerregistry.rst:327 library/email.headerregistry.rst:329 msgid "UniqueDateHeader" msgstr "UniqueDateHeader" @@ -563,7 +576,7 @@ msgstr "UniqueDateHeader" msgid "resent-date" msgstr "resent-date" -#: library/email.headerregistry.rst:326 +#: library/email.headerregistry.rst:328 msgid "DateHeader" msgstr "DateHeader" @@ -575,7 +588,7 @@ msgstr "orig-date" msgid "sender" msgstr "sender" -#: library/email.headerregistry.rst:328 +#: library/email.headerregistry.rst:330 msgid "UniqueSingleAddressHeader" msgstr "UniqueSingleAddressHeader" @@ -583,7 +596,7 @@ msgstr "UniqueSingleAddressHeader" msgid "resent-sender" msgstr "resent-sender" -#: library/email.headerregistry.rst:329 +#: library/email.headerregistry.rst:331 msgid "SingleAddressHeader" msgstr "SingleAddressHeader" @@ -591,9 +604,9 @@ msgstr "SingleAddressHeader" msgid "to" msgstr "to" -#: library/email.headerregistry.rst:330 library/email.headerregistry.rst:332 -#: library/email.headerregistry.rst:334 library/email.headerregistry.rst:336 -#: library/email.headerregistry.rst:338 +#: library/email.headerregistry.rst:332 library/email.headerregistry.rst:334 +#: library/email.headerregistry.rst:336 library/email.headerregistry.rst:338 +#: library/email.headerregistry.rst:340 msgid "UniqueAddressHeader" msgstr "UniqueAddressHeader" @@ -601,8 +614,8 @@ msgstr "UniqueAddressHeader" msgid "resent-to" msgstr "resent-to" -#: library/email.headerregistry.rst:331 library/email.headerregistry.rst:333 -#: library/email.headerregistry.rst:335 library/email.headerregistry.rst:337 +#: library/email.headerregistry.rst:333 library/email.headerregistry.rst:335 +#: library/email.headerregistry.rst:337 library/email.headerregistry.rst:339 msgid "AddressHeader" msgstr "AddressHeader" @@ -638,7 +651,7 @@ msgstr "reply-to" msgid "mime-version" msgstr "mime-version" -#: library/email.headerregistry.rst:339 +#: library/email.headerregistry.rst:341 msgid "MIMEVersionHeader" msgstr "MIMEVersionHeader" @@ -646,7 +659,7 @@ msgstr "MIMEVersionHeader" msgid "content-type" msgstr "content-type" -#: library/email.headerregistry.rst:340 +#: library/email.headerregistry.rst:342 msgid "ContentTypeHeader" msgstr "ContentTypeHeader" @@ -654,7 +667,7 @@ msgstr "ContentTypeHeader" msgid "content-disposition" msgstr "content-disposition" -#: library/email.headerregistry.rst:341 +#: library/email.headerregistry.rst:343 msgid "ContentDispositionHeader" msgstr "ContentDispositionHeader" @@ -662,7 +675,7 @@ msgstr "ContentDispositionHeader" msgid "content-transfer-encoding" msgstr "content-transfer-encoding" -#: library/email.headerregistry.rst:342 +#: library/email.headerregistry.rst:344 msgid "ContentTransferEncodingHeader" msgstr "ContentTransferEncodingHeader" @@ -670,15 +683,15 @@ msgstr "ContentTransferEncodingHeader" msgid "message-id" msgstr "message-id" -#: library/email.headerregistry.rst:343 +#: library/email.headerregistry.rst:345 msgid "MessageIDHeader" msgstr "MessageIDHeader" -#: library/email.headerregistry.rst:345 +#: library/email.headerregistry.rst:347 msgid "``HeaderRegistry`` has the following methods:" msgstr "``HeaderRegistry`` a les méthodes suivantes :" -#: library/email.headerregistry.rst:350 +#: library/email.headerregistry.rst:352 msgid "" "*name* is the name of the header to be mapped. It will be converted to " "lower case in the registry. *cls* is the specialized class to be used, " @@ -690,12 +703,12 @@ msgstr "" "avec *base_class*, pour créer la classe utilisée pour instancier les en-" "têtes qui correspondent à *name*." -#: library/email.headerregistry.rst:358 +#: library/email.headerregistry.rst:360 msgid "Construct and return a class to handle creating a *name* header." msgstr "" "Construit et renvoie une classe pour gérer la création d'un en-tête *name*." -#: library/email.headerregistry.rst:363 +#: library/email.headerregistry.rst:365 msgid "" "Retrieves the specialized header associated with *name* from the registry " "(using *default_class* if *name* does not appear in the registry) and " @@ -709,7 +722,7 @@ msgstr "" "classe construite, en lui passant la même liste d'arguments, et renvoie " "enfin l'instance de classe ainsi créée." -#: library/email.headerregistry.rst:370 +#: library/email.headerregistry.rst:372 msgid "" "The following classes are the classes used to represent data parsed from " "structured headers and can, in general, be used by an application program to " @@ -720,7 +733,7 @@ msgstr "" "être utilisées par un programme d'application pour construire des valeurs " "structurées à affecter à des en-têtes spécifiques." -#: library/email.headerregistry.rst:377 +#: library/email.headerregistry.rst:379 msgid "" "The class used to represent an email address. The general form of an " "address is::" @@ -728,19 +741,19 @@ msgstr "" "Classe utilisée pour représenter une adresse e-mail. La forme générale d'une " "adresse est :" -#: library/email.headerregistry.rst:382 +#: library/email.headerregistry.rst:384 msgid "or::" msgstr "ou ::" -#: library/email.headerregistry.rst:386 +#: library/email.headerregistry.rst:388 msgid "" -"where each part must conform to specific syntax rules spelled out in :rfc:" -"`5322`." +"where each part must conform to specific syntax rules spelled out " +"in :rfc:`5322`." msgstr "" "où chaque partie doit se conformer à des règles de syntaxe spécifiques " "énoncées dans la :rfc:`5322`." -#: library/email.headerregistry.rst:389 +#: library/email.headerregistry.rst:391 msgid "" "As a convenience *addr_spec* can be specified instead of *username* and " "*domain*, in which case *username* and *domain* will be parsed from the " @@ -757,7 +770,7 @@ msgstr "" "sérialisation. Cependant, selon les RFC, l’Unicode n'est *pas* autorisé dans " "la partie nom d'utilisateur de l'adresse." -#: library/email.headerregistry.rst:398 +#: library/email.headerregistry.rst:400 msgid "" "The display name portion of the address, if any, with all quoting removed. " "If the address does not have a display name, this attribute will be an empty " @@ -767,15 +780,15 @@ msgstr "" "citations supprimées. Si l'adresse n'a pas de nom d'affichage, cet attribut " "est une chaîne vide." -#: library/email.headerregistry.rst:404 +#: library/email.headerregistry.rst:406 msgid "The ``username`` portion of the address, with all quoting removed." msgstr "Partie ``username`` de l'adresse, sans guillemets." -#: library/email.headerregistry.rst:408 +#: library/email.headerregistry.rst:410 msgid "The ``domain`` portion of the address." msgstr "Partie ``domain`` de l'adresse." -#: library/email.headerregistry.rst:412 +#: library/email.headerregistry.rst:414 msgid "" "The ``username@domain`` portion of the address, correctly quoted for use as " "a bare address (the second form shown above). This attribute is not mutable." @@ -784,17 +797,17 @@ msgstr "" "utilisation en tant qu'adresse nue (la deuxième forme illustrée ci-dessus). " "Cet attribut n'est pas modifiable." -#: library/email.headerregistry.rst:418 +#: library/email.headerregistry.rst:420 msgid "" -"The ``str`` value of the object is the address quoted according to :rfc:" -"`5322` rules, but with no Content Transfer Encoding of any non-ASCII " +"The ``str`` value of the object is the address quoted according " +"to :rfc:`5322` rules, but with no Content Transfer Encoding of any non-ASCII " "characters." msgstr "" "La valeur ``str`` de l'objet est l'adresse entre guillemets selon les règles " "de la :rfc:`5322`, mais sans encodage de contenu pour les caractères non-" "ASCII." -#: library/email.headerregistry.rst:422 +#: library/email.headerregistry.rst:424 msgid "" "To support SMTP (:rfc:`5321`), ``Address`` handles one special case: if " "``username`` and ``domain`` are both the empty string (or ``None``), then " @@ -804,7 +817,7 @@ msgstr "" "particulier : si ``username`` et ``domain`` sont tous deux la chaîne vide " "(ou ``None``), alors la valeur de chaîne de ``Address`` est ``<>``." -#: library/email.headerregistry.rst:429 +#: library/email.headerregistry.rst:431 msgid "" "The class used to represent an address group. The general form of an " "address group is::" @@ -812,7 +825,7 @@ msgstr "" "Classe utilisée pour représenter un groupe d'adresses. La forme générale " "d'un groupe d'adresses est :" -#: library/email.headerregistry.rst:434 +#: library/email.headerregistry.rst:436 msgid "" "As a convenience for processing lists of addresses that consist of a mixture " "of groups and single addresses, a ``Group`` may also be used to represent " @@ -825,7 +838,7 @@ msgstr "" "définissant *display_name* sur ``None`` et en fournissant une liste de " "l'adresse unique sous la forme *adresses*." -#: library/email.headerregistry.rst:441 +#: library/email.headerregistry.rst:443 msgid "" "The ``display_name`` of the group. If it is ``None`` and there is exactly " "one ``Address`` in ``addresses``, then the ``Group`` represents a single " @@ -835,7 +848,7 @@ msgstr "" "``Adress`` dans ``adresses``, alors le ``Group`` représente une seule " "adresse qui n'est pas dans un groupe." -#: library/email.headerregistry.rst:447 +#: library/email.headerregistry.rst:449 msgid "" "A possibly empty tuple of :class:`.Address` objects representing the " "addresses in the group." @@ -843,7 +856,7 @@ msgstr "" "*n*-uplet éventuellement vide d'objets :class:`.Address` représentant les " "adresses du groupe." -#: library/email.headerregistry.rst:452 +#: library/email.headerregistry.rst:454 msgid "" "The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`, but " "with no Content Transfer Encoding of any non-ASCII characters. If " @@ -856,11 +869,11 @@ msgstr "" "est ``None`` et qu'il y a une seule ``Address`` dans la liste ``addresses``, " "la valeur ``str`` est la même que la ``str`` de cette seule ``Adress``." -#: library/email.headerregistry.rst:460 +#: library/email.headerregistry.rst:462 msgid "Footnotes" msgstr "Notes" -#: library/email.headerregistry.rst:461 +#: library/email.headerregistry.rst:463 msgid "" "Originally added in 3.3 as a :term:`provisional module `" msgstr "" diff --git a/library/email.iterators.po b/library/email.iterators.po index 1893f8151..16e4a5038 100644 --- a/library/email.iterators.po +++ b/library/email.iterators.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2019-06-20 19:13+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -25,16 +25,17 @@ msgid "**Source code:** :source:`Lib/email/iterators.py`" msgstr "**Code source :** :source:`Lib/email/iterators.py`" #: library/email.iterators.rst:11 +#, fuzzy msgid "" -"Iterating over a message object tree is fairly easy with the :meth:`Message." -"walk ` method. The :mod:`email.iterators` " -"module provides some useful higher level iterations over message object " -"trees." +"Iterating over a message object tree is fairly easy with " +"the :meth:`Message.walk ` method. The :mod:`!" +"email.iterators` module provides some useful higher level iterations over " +"message object trees." msgstr "" "Itérer sur l'arborescence d'un objet message est plutôt simple avec la " -"méthode :meth:`Message.walk `. Le module :mod:" -"`email.iterators` fournit des fonctionnalités d'itérations de plus haut " -"niveau sur les arbres d'objets messages." +"méthode :meth:`Message.walk `. Le " +"module :mod:`email.iterators` fournit des fonctionnalités d'itérations de " +"plus haut niveau sur les arbres d'objets messages." #: library/email.iterators.rst:19 msgid "" @@ -55,11 +56,11 @@ msgstr "" #: library/email.iterators.rst:26 msgid "" -"Optional *decode* is passed through to :meth:`Message.get_payload `." +"Optional *decode* is passed through to :meth:`Message.get_payload " +"`." msgstr "" -"Le paramètre optionnel *decode* est transmis à la méthode :meth:`Message." -"get_payload `." +"Le paramètre optionnel *decode* est transmis à la " +"méthode :meth:`Message.get_payload `." #: library/email.iterators.rst:32 msgid "" @@ -78,8 +79,8 @@ msgid "" msgstr "" "Notez que le paramètre *subtype* est optionnel ; s'il n'est pas présent, " "alors le type MIME du sous élément est seulement composé du type principal. " -"*maintype* est également optionnel ; sa valeur par défaut est :mimetype:" -"`text`." +"*maintype* est également optionnel ; sa valeur par défaut " +"est :mimetype:`text`." #: library/email.iterators.rst:39 msgid "" diff --git a/library/email.message.po b/library/email.message.po index 62e4c0a72..4c166aa3c 100644 --- a/library/email.message.po +++ b/library/email.message.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-07-29 23:04+0200\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,30 +20,31 @@ msgstr "" msgid ":mod:`!email.message`: Representing an email message" msgstr ":mod:`email.message` : représentation d'un message électronique" -#: library/email.message.rst:10 +#: library/email.message.rst:7 msgid "**Source code:** :source:`Lib/email/message.py`" msgstr "**Code source :** :source:`Lib/email/message.py`" -#: library/email.message.rst:14 +#: library/email.message.rst:11 msgid "[1]_" msgstr "[1]_" -#: library/email.message.rst:16 +#: library/email.message.rst:13 +#, fuzzy msgid "" "The central class in the :mod:`email` package is the :class:`EmailMessage` " -"class, imported from the :mod:`email.message` module. It is the base class " +"class, imported from the :mod:`!email.message` module. It is the base class " "for the :mod:`email` object model. :class:`EmailMessage` provides the core " "functionality for setting and querying header fields, for accessing message " "bodies, and for creating or modifying structured messages." msgstr "" -"La classe centrale du paquet :mod:`email` est la classe :class:" -"`EmailMessage`, importée du module :mod:`email.message`. C'est la classe " -"mère du modèle d'objet :mod:`email`. :class:`EmailMessage` fournit la " -"fonctionnalité de base pour définir et interroger les champs d'en-tête, pour " -"accéder au corps des messages et pour créer ou modifier des messages " +"La classe centrale du paquet :mod:`email` est la " +"classe :class:`EmailMessage`, importée du module :mod:`email.message`. C'est " +"la classe mère du modèle d'objet :mod:`email`. :class:`EmailMessage` fournit " +"la fonctionnalité de base pour définir et interroger les champs d'en-tête, " +"pour accéder au corps des messages et pour créer ou modifier des messages " "structurés." -#: library/email.message.rst:22 +#: library/email.message.rst:19 msgid "" "An email message consists of *headers* and a *payload* (which is also " "referred to as the *content*). Headers are :rfc:`5322` or :rfc:`6532` style " @@ -57,16 +58,16 @@ msgid "" msgstr "" "Un message électronique se compose d'en-têtes (*headers*) et d'une *charge " "utile* (*payload* en anglais, également appelée *contenu* – *content* en " -"anglais). Les en-têtes sont des noms et valeurs de champ de style :rfc:" -"`5322` ou :rfc:`6532`, où le nom et la valeur du champ sont séparés par deux " -"points. Les deux-points ne font partie ni du nom du champ ni de la valeur du " -"champ. La charge utile peut être un simple message texte, un objet binaire " -"ou une séquence structurée de sous-messages chacun avec son propre ensemble " -"d'en-têtes et sa propre charge utile. Ce dernier type de charge utile est " -"indiqué par le message ayant un type MIME tel que :mimetype:`multipart/\\*` " -"ou :mimetype:`message/rfc822`." +"anglais). Les en-têtes sont des noms et valeurs de champ de " +"style :rfc:`5322` ou :rfc:`6532`, où le nom et la valeur du champ sont " +"séparés par deux points. Les deux-points ne font partie ni du nom du champ " +"ni de la valeur du champ. La charge utile peut être un simple message texte, " +"un objet binaire ou une séquence structurée de sous-messages chacun avec son " +"propre ensemble d'en-têtes et sa propre charge utile. Ce dernier type de " +"charge utile est indiqué par le message ayant un type MIME tel " +"que :mimetype:`multipart/\\*` ou :mimetype:`message/rfc822`." -#: library/email.message.rst:31 +#: library/email.message.rst:28 msgid "" "The conceptual model provided by an :class:`EmailMessage` object is that of " "an ordered dictionary of headers coupled with a *payload* that represents " @@ -87,7 +88,7 @@ msgstr "" "sérialisée du message et pour parcourir récursivement l'arborescence " "d'objets." -#: library/email.message.rst:40 +#: library/email.message.rst:37 #, fuzzy msgid "" "The :class:`EmailMessage` dictionary-like interface is indexed by the header " @@ -106,7 +107,7 @@ msgstr "" "peut y avoir des clés en double. Des méthodes supplémentaires sont fournies " "pour travailler avec des en-têtes qui ont des clés en double." -#: library/email.message.rst:47 +#: library/email.message.rst:44 msgid "" "The *payload* is either a string or bytes object, in the case of simple " "message objects, or a list of :class:`EmailMessage` objects, for MIME " @@ -118,36 +119,37 @@ msgstr "" "pour les documents de conteneur MIME tels que :mimetype:`multipart/\\*` et " "les objets messages :mimetype:`message/rfc822`." -#: library/email.message.rst:55 +#: library/email.message.rst:52 +#, fuzzy msgid "" "If *policy* is specified use the rules it specifies to update and serialize " -"the representation of the message. If *policy* is not set, use the :class:" -"`~email.policy.default` policy, which follows the rules of the email RFCs " -"except for line endings (instead of the RFC mandated ``\\r\\n``, it uses the " -"Python standard ``\\n`` line endings). For more information see the :mod:" -"`~email.policy` documentation." +"the representation of the message. If *policy* is not set, use " +"the :class:`~email.policy.default` policy, which follows the rules of the " +"email RFCs except for line endings (instead of the RFC mandated ``\\r\\n``, " +"it uses the Python standard ``\\n`` line endings). For more information see " +"the :mod:`~email.policy` documentation. [2]_" msgstr "" "Si *policy* est spécifiée, Python utilise les règles qu'elle spécifie pour " "mettre à jour et sérialiser la représentation du message. Si *policy* n'est " "pas définie, Python utilise la politique :class:`~email.policy.default`, qui " "suit les règles des RFC de messagerie sauf pour les fins de ligne (au lieu " "de ``\\r\\n`` indiqués par la RFC, il utilise les fins de ligne standard " -"Python ``\\n``). Pour plus d'informations, consultez la documentation :mod:" -"`~email.policy`." +"Python ``\\n``). Pour plus d'informations, consultez la " +"documentation :mod:`~email.policy`." -#: library/email.message.rst:64 +#: library/email.message.rst:61 #, fuzzy msgid "" "Return the entire message flattened as a string. When optional *unixfrom* " "is true, the envelope header is included in the returned string. *unixfrom* " -"defaults to ``False``. For backward compatibility with the base :class:" -"`~email.message.Message` class *maxheaderlen* is accepted, but defaults to " -"``None``, which means that by default the line length is controlled by the :" -"attr:`~email.policy.Policy.max_line_length` of the policy. The *policy* " -"argument may be used to override the default policy obtained from the " -"message instance. This can be used to control some of the formatting " -"produced by the method, since the specified *policy* will be passed to the :" -"class:`~email.generator.Generator`." +"defaults to ``False``. For backward compatibility with the " +"base :class:`~email.message.Message` class *maxheaderlen* is accepted, but " +"defaults to ``None``, which means that by default the line length is " +"controlled by the :attr:`~email.policy.Policy.max_line_length` of the " +"policy. The *policy* argument may be used to override the default policy " +"obtained from the message instance. This can be used to control some of the " +"formatting produced by the method, since the specified *policy* will be " +"passed to the :class:`~email.generator.Generator`." msgstr "" "Renvoie le message entier aplati sous forme de chaîne. Lorsque l'option " "*unixfrom* est vraie, l'en-tête de l'enveloppe est inclus dans la chaîne " @@ -159,38 +161,40 @@ msgstr "" "de la politique. L'argument *policy* peut être utilisé pour remplacer la " "politique par défaut obtenue à partir de l'instance de message. Cela peut " "être utilisé pour contrôler une partie du formatage produit par la méthode, " -"puisque la *policy* spécifiée sera transmise à :class:`~email.generator." -"Generator`." +"puisque la *policy* spécifiée sera transmise " +"à :class:`~email.generator.Generator`." -#: library/email.message.rst:114 +#: library/email.message.rst:111 msgid "" "Flattening the message may trigger changes to the :class:`EmailMessage` if " "defaults need to be filled in to complete the transformation to a string " "(for example, MIME boundaries may be generated or modified)." msgstr "" -"L'aplatissement du message peut déclencher des changements dans :class:" -"`EmailMessage` si les valeurs par défaut doivent être renseignées pour " -"terminer la transformation en chaîne (par exemple, les limites MIME peuvent " -"être générées ou modifiées)." +"L'aplatissement du message peut déclencher des changements " +"dans :class:`EmailMessage` si les valeurs par défaut doivent être " +"renseignées pour terminer la transformation en chaîne (par exemple, les " +"limites MIME peuvent être générées ou modifiées)." -#: library/email.message.rst:80 +#: library/email.message.rst:77 msgid "" "Note that this method is provided as a convenience and may not be the most " "useful way to serialize messages in your application, especially if you are " "dealing with multiple messages. See :class:`email.generator.Generator` for " "a more flexible API for serializing messages. Note also that this method is " -"restricted to producing messages serialized as \"7 bit clean\" when :attr:" -"`~email.policy.EmailPolicy.utf8` is ``False``, which is the default." +"restricted to producing messages serialized as \"7 bit clean\" " +"when :attr:`~email.policy.EmailPolicy.utf8` is ``False``, which is the " +"default." msgstr "" "Notez que cette méthode est fournie à titre de commodité et n'est peut-être " "pas la méthode la plus utile pour sérialiser les messages dans votre " -"application, en particulier si vous traitez plusieurs messages. Voir :class:" -"`email.generator.Generator` pour une API plus flexible pour la sérialisation " -"des messages. Notez également que cette méthode est limitée à la production " -"de messages sérialisés en « 7 bits propres » lorsque :attr:`~email.policy." -"EmailPolicy.utf8` est ``False``, qui est la valeur par défaut." +"application, en particulier si vous traitez plusieurs messages. " +"Voir :class:`email.generator.Generator` pour une API plus flexible pour la " +"sérialisation des messages. Notez également que cette méthode est limitée à " +"la production de messages sérialisés en « 7 bits propres » " +"lorsque :attr:`~email.policy.EmailPolicy.utf8` est ``False``, qui est la " +"valeur par défaut." -#: library/email.message.rst:88 +#: library/email.message.rst:85 msgid "" "the default behavior when *maxheaderlen* is not specified was changed from " "defaulting to 0 to defaulting to the value of *max_line_length* from the " @@ -200,7 +204,7 @@ msgstr "" "passé de la valeur par défaut à 0 à la valeur par défaut de " "*max_line_length* de la politique." -#: library/email.message.rst:95 +#: library/email.message.rst:92 msgid "" "Equivalent to ``as_string(policy=self.policy.clone(utf8=True))``. Allows " "``str(msg)`` to produce a string containing the serialized message in a " @@ -210,25 +214,25 @@ msgstr "" "``str(msg)`` de produire une chaîne contenant le message sérialisé dans un " "format lisible." -#: library/email.message.rst:99 +#: library/email.message.rst:96 msgid "" "the method was changed to use ``utf8=True``, thus producing an :rfc:`6531`-" -"like message representation, instead of being a direct alias for :meth:" -"`as_string`." +"like message representation, instead of being a direct alias " +"for :meth:`as_string`." msgstr "" "la méthode a été modifiée pour utiliser ``utf8=True``, produisant ainsi une " "représentation de message semblable à :rfc:`6531`, au lieu d'être un alias " "direct pour :meth:`as_string`." -#: library/email.message.rst:106 +#: library/email.message.rst:103 msgid "" "Return the entire message flattened as a bytes object. When optional " "*unixfrom* is true, the envelope header is included in the returned string. " "*unixfrom* defaults to ``False``. The *policy* argument may be used to " "override the default policy obtained from the message instance. This can be " "used to control some of the formatting produced by the method, since the " -"specified *policy* will be passed to the :class:`~email.generator." -"BytesGenerator`." +"specified *policy* will be passed to " +"the :class:`~email.generator.BytesGenerator`." msgstr "" "Renvoie le message entier aplati en tant qu'objet bytes. Lorsque l'option " "*unixfrom* est vraie, l'en-tête de l'enveloppe est inclus dans la chaîne " @@ -238,7 +242,7 @@ msgstr "" "formatage produit par la méthode, puisque la *policy* spécifiée sera " "transmise à :class:`~email.generator.BytesGenerator`." -#: library/email.message.rst:118 +#: library/email.message.rst:115 msgid "" "Note that this method is provided as a convenience and may not be the most " "useful way to serialize messages in your application, especially if you are " @@ -247,11 +251,11 @@ msgid "" msgstr "" "Notez que cette méthode est fournie à titre de commodité et n'est peut-être " "pas la méthode la plus utile pour sérialiser les messages dans votre " -"application, en particulier si vous traitez plusieurs messages. Voir :class:" -"`email.generator.BytesGenerator` pour une API plus flexible pour la " -"sérialisation des messages." +"application, en particulier si vous traitez plusieurs messages. " +"Voir :class:`email.generator.BytesGenerator` pour une API plus flexible pour " +"la sérialisation des messages." -#: library/email.message.rst:127 +#: library/email.message.rst:124 #, fuzzy msgid "" "Equivalent to :meth:`.as_bytes`. Allows ``bytes(msg)`` to produce a bytes " @@ -260,27 +264,27 @@ msgstr "" "Équivalent à :meth:`.as_bytes()`. Permet à ``bytes(msg)`` de produire un " "objet bytes contenant le message sérialisé." -#: library/email.message.rst:133 +#: library/email.message.rst:130 msgid "" -"Return ``True`` if the message's payload is a list of sub-\\ :class:" -"`EmailMessage` objects, otherwise return ``False``. When :meth:" -"`is_multipart` returns ``False``, the payload should be a string object " -"(which might be a CTE encoded binary payload). Note that :meth:" -"`is_multipart` returning ``True`` does not necessarily mean that \"msg." -"get_content_maintype() == 'multipart'\" will return the ``True``. For " -"example, ``is_multipart`` will return ``True`` when the :class:" -"`EmailMessage` is of type ``message/rfc822``." +"Return ``True`` if the message's payload is a list of sub-" +"\\ :class:`EmailMessage` objects, otherwise return ``False``. " +"When :meth:`is_multipart` returns ``False``, the payload should be a string " +"object (which might be a CTE encoded binary payload). Note " +"that :meth:`is_multipart` returning ``True`` does not necessarily mean that " +"\"msg.get_content_maintype() == 'multipart'\" will return the ``True``. For " +"example, ``is_multipart`` will return ``True`` when " +"the :class:`EmailMessage` is of type ``message/rfc822``." msgstr "" -"Renvoie ``True`` si la charge utile du message est une liste d'objets :class:" -"`EmailMessage`, sinon renvoie ``False``. Lorsque :meth:`is_multipart` " -"renvoie ``False``, la charge utile doit être un objet chaîne (qui peut être " -"une charge utile binaire encodée CTE). Notez que :meth:`is_multipart` " -"renvoyant ``True`` ne signifie pas nécessairement que ``msg." -"get_content_maintype() == 'multipart'`` renvoie ``True``. Par exemple, " -"``is_multipart`` renvoie ``True`` lorsque le :class:`EmailMessage` est de " -"type ``message/rfc822``." +"Renvoie ``True`` si la charge utile du message est une liste " +"d'objets :class:`EmailMessage`, sinon renvoie ``False``. " +"Lorsque :meth:`is_multipart` renvoie ``False``, la charge utile doit être un " +"objet chaîne (qui peut être une charge utile binaire encodée CTE). Notez " +"que :meth:`is_multipart` renvoyant ``True`` ne signifie pas nécessairement " +"que ``msg.get_content_maintype() == 'multipart'`` renvoie ``True``. Par " +"exemple, ``is_multipart`` renvoie ``True`` lorsque le :class:`EmailMessage` " +"est de type ``message/rfc822``." -#: library/email.message.rst:145 +#: library/email.message.rst:142 msgid "" "Set the message's envelope header to *unixfrom*, which should be a string. " "(See :class:`~mailbox.mboxMessage` for a brief description of this header.)" @@ -289,7 +293,7 @@ msgstr "" "une chaîne (voir :class:`~mailbox.mboxMessage` pour une brève description de " "cet en-tête)." -#: library/email.message.rst:152 +#: library/email.message.rst:149 msgid "" "Return the message's envelope header. Defaults to ``None`` if the envelope " "header was never set." @@ -297,7 +301,7 @@ msgstr "" "Renvoie l'en-tête de l'enveloppe du message. La valeur par défaut est " "``None`` si l'en-tête de l'enveloppe n'a jamais été défini." -#: library/email.message.rst:156 +#: library/email.message.rst:153 msgid "" "The following methods implement the mapping-like interface for accessing the " "message's headers. Note that there are some semantic differences between " @@ -316,13 +320,13 @@ msgstr "" "(c'est-à-dire un dictionnaire). Par exemple, dans un dictionnaire, il n'y a " "pas de clés en double, mais ici, il peut y avoir des en-têtes de message en " "double. De plus, dans les dictionnaires, il n'y a pas d'ordre garanti pour " -"les clés renvoyées par :meth:`keys`, mais dans un objet :class:" -"`EmailMessage`, les en-têtes sont toujours renvoyés dans l'ordre dans lequel " -"ils sont apparus dans le message d'origine, ou dans lequel ils ont été " -"ajoutés au message plus tard. Tout en-tête supprimé puis rajouté est " -"toujours ajouté à la fin de la liste des en-têtes." +"les clés renvoyées par :meth:`keys`, mais dans un " +"objet :class:`EmailMessage`, les en-têtes sont toujours renvoyés dans " +"l'ordre dans lequel ils sont apparus dans le message d'origine, ou dans " +"lequel ils ont été ajoutés au message plus tard. Tout en-tête supprimé puis " +"rajouté est toujours ajouté à la fin de la liste des en-têtes." -#: library/email.message.rst:167 +#: library/email.message.rst:164 msgid "" "These semantic differences are intentional and are biased toward convenience " "in the most common use cases." @@ -330,7 +334,7 @@ msgstr "" "Ces différences sémantiques sont intentionnelles et privilégient la " "commodité dans les cas d'utilisation les plus courants." -#: library/email.message.rst:170 +#: library/email.message.rst:167 msgid "" "Note that in all cases, any envelope header present in the message is not " "included in the mapping interface." @@ -338,11 +342,11 @@ msgstr "" "Notez que dans tous les cas, tout en-tête d'enveloppe présent dans le " "message n'est pas inclus dans l'interface de correspondance." -#: library/email.message.rst:176 +#: library/email.message.rst:173 msgid "Return the total number of headers, including duplicates." msgstr "Renvoie le nombre total d'en-têtes, y compris les doublons." -#: library/email.message.rst:181 +#: library/email.message.rst:178 msgid "" "Return ``True`` if the message object has a field named *name*. Matching is " "done without regard to case and *name* does not include the trailing colon. " @@ -353,17 +357,17 @@ msgstr "" "n'inclut pas les deux-points de fin. Utilisé pour l'opérateur ``in``. Par " "exemple ::" -#: library/email.message.rst:191 +#: library/email.message.rst:188 msgid "" "Return the value of the named header field. *name* does not include the " -"colon field separator. If the header is missing, ``None`` is returned; a :" -"exc:`KeyError` is never raised." +"colon field separator. If the header is missing, ``None`` is returned; " +"a :exc:`KeyError` is never raised." msgstr "" "Renvoie la valeur du champ d'en-tête nommé. *name* n'inclut pas le " "séparateur de champ deux-points. Si l'en-tête est manquant, ``None`` est " "renvoyée ; :exc:`KeyError` n'est jamais levée." -#: library/email.message.rst:195 +#: library/email.message.rst:192 msgid "" "Note that if the named field appears more than once in the message's " "headers, exactly which of those field values will be returned is undefined. " @@ -375,16 +379,16 @@ msgstr "" "la méthode :meth:`get_all` pour obtenir les valeurs de tous les en-têtes " "existants nommés *name*." -#: library/email.message.rst:200 +#: library/email.message.rst:197 msgid "" "Using the standard (non-``compat32``) policies, the returned value is an " "instance of a subclass of :class:`email.headerregistry.BaseHeader`." msgstr "" "En utilisant les politiques standard (non-``compat32``), la valeur renvoyée " -"est une instance d'une sous-classe de :class:`email.headerregistry." -"BaseHeader`." +"est une instance d'une sous-classe " +"de :class:`email.headerregistry.BaseHeader`." -#: library/email.message.rst:206 +#: library/email.message.rst:203 msgid "" "Add a header to the message with field name *name* and value *val*. The " "field is appended to the end of the message's existing headers." @@ -392,7 +396,7 @@ msgstr "" "Ajoute un en-tête au message avec le nom de champ *name* et la valeur *val*. " "Le champ est ajouté à la fin des en-têtes existants du message." -#: library/email.message.rst:209 +#: library/email.message.rst:206 msgid "" "Note that this does *not* overwrite or delete any existing header with the " "same name. If you want to ensure that the new header is the only one " @@ -403,7 +407,7 @@ msgstr "" "présent dans le message avec le nom de champ *name*, supprimez d'abord le " "champ, par exemple ::" -#: library/email.message.rst:216 +#: library/email.message.rst:213 #, fuzzy msgid "" "If the :mod:`policy ` defines certain headers to be unique (as " @@ -414,14 +418,14 @@ msgid "" "existing header in the future." msgstr "" "Si la :mod:`policy` définit certains en-têtes comme étant uniques (comme le " -"font les politiques standards), cette méthode peut lever une :exc:" -"`ValueError` lorsqu'une tentative est faite pour attribuer une valeur à un " -"tel en-tête alors qu'il en existe déjà un. Ce comportement est intentionnel " -"pour des raisons de cohérence, mais ne vous y fiez pas car Python pourrait " -"choisir de faire en sorte que de telles affectations effectuent une " -"suppression automatique de l'en-tête existant à l'avenir." +"font les politiques standards), cette méthode peut lever " +"une :exc:`ValueError` lorsqu'une tentative est faite pour attribuer une " +"valeur à un tel en-tête alors qu'il en existe déjà un. Ce comportement est " +"intentionnel pour des raisons de cohérence, mais ne vous y fiez pas car " +"Python pourrait choisir de faire en sorte que de telles affectations " +"effectuent une suppression automatique de l'en-tête existant à l'avenir." -#: library/email.message.rst:226 +#: library/email.message.rst:223 msgid "" "Delete all occurrences of the field with name *name* from the message's " "headers. No exception is raised if the named field isn't present in the " @@ -431,15 +435,15 @@ msgstr "" "du message. Aucune exception n'est levée si le champ nommé n'est pas présent " "dans les en-têtes." -#: library/email.message.rst:233 +#: library/email.message.rst:230 msgid "Return a list of all the message's header field names." msgstr "Renvoie une liste de tous les noms de champs d'en-tête du message." -#: library/email.message.rst:238 +#: library/email.message.rst:235 msgid "Return a list of all the message's field values." msgstr "Renvoie une liste de toutes les valeurs de champ du message." -#: library/email.message.rst:243 +#: library/email.message.rst:240 msgid "" "Return a list of 2-tuples containing all the message's field headers and " "values." @@ -447,22 +451,22 @@ msgstr "" "Renvoie une liste de couples contenant tous les en-têtes et valeurs de champ " "du message." -#: library/email.message.rst:249 +#: library/email.message.rst:246 #, fuzzy msgid "" -"Return the value of the named header field. This is identical to :meth:" -"`~object.__getitem__` except that optional *failobj* is returned if the " -"named header is missing (*failobj* defaults to ``None``)." +"Return the value of the named header field. This is identical " +"to :meth:`~object.__getitem__` except that optional *failobj* is returned if " +"the named header is missing (*failobj* defaults to ``None``)." msgstr "" "Renvoie la valeur du champ d'en-tête nommé. Identique à :meth:`__getitem__` " "sauf que l'option *failobj* est renvoyée si l'en-tête nommé est manquant " "(*failobj* est ``None`` par défaut)." -#: library/email.message.rst:254 +#: library/email.message.rst:251 msgid "Here are some additional useful header related methods:" msgstr "Voici quelques méthodes supplémentaires utiles liées aux en-têtes :" -#: library/email.message.rst:259 +#: library/email.message.rst:256 msgid "" "Return a list of all the values for the field named *name*. If there are no " "such named headers in the message, *failobj* is returned (defaults to " @@ -472,7 +476,7 @@ msgstr "" "d'en-têtes nommés de ce type dans le message, *failobj* est renvoyé (la " "valeur par défaut est ``None``)." -#: library/email.message.rst:266 +#: library/email.message.rst:263 msgid "" "Extended header setting. This method is similar to :meth:`__setitem__` " "except that additional header parameters can be provided as keyword " @@ -484,7 +488,7 @@ msgstr "" "qu'arguments nommés. *_name* est le champ d'en-tête à ajouter et *_value* " "est la valeur *primaire* de l'en-tête." -#: library/email.message.rst:271 +#: library/email.message.rst:268 msgid "" "For each item in the keyword argument dictionary *_params*, the key is taken " "as the parameter name, with underscores converted to dashes (since dashes " @@ -498,7 +502,7 @@ msgstr "" "Normalement, le paramètre est ajouté en tant que ``key=\"value\"`` sauf si " "la valeur est ``None``, auquel cas seule la clé est ajoutée." -#: library/email.message.rst:277 +#: library/email.message.rst:274 msgid "" "If the value contains non-ASCII characters, the charset and language may be " "explicitly controlled by specifying the value as a three tuple in the format " @@ -521,19 +525,19 @@ msgstr "" "automatiquement encodée au format :rfc:`2231` en utilisant ``utf-8`` comme " "``CHARSET`` et ``None`` comme ``LANGUAGE``." -#: library/email.message.rst:287 +#: library/email.message.rst:284 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: library/email.message.rst:291 +#: library/email.message.rst:288 msgid "This will add a header that looks like ::" msgstr "Cela ajoute un en-tête qui ressemble à ::" -#: library/email.message.rst:295 +#: library/email.message.rst:292 msgid "An example of the extended interface with non-ASCII characters::" msgstr "Un exemple d'interface étendue avec des caractères non-ASCII ::" -#: library/email.message.rst:303 +#: library/email.message.rst:300 msgid "" "Replace a header. Replace the first header found in the message that " "matches *_name*, retaining header order and field name case of the original " @@ -544,59 +548,61 @@ msgstr "" "de champ de l'en-tête d'origine. Si aucun en-tête correspondant n'est " "trouvé, lève une :exc:`KeyError`." -#: library/email.message.rst:311 +#: library/email.message.rst:308 msgid "" -"Return the message's content type, coerced to lower case of the form :" -"mimetype:`maintype/subtype`. If there is no :mailheader:`Content-Type` " -"header in the message return the value returned by :meth:" -"`get_default_type`. If the :mailheader:`Content-Type` header is invalid, " -"return ``text/plain``." +"Return the message's content type, coerced to lower case of the " +"form :mimetype:`maintype/subtype`. If there is no :mailheader:`Content-" +"Type` header in the message return the value returned " +"by :meth:`get_default_type`. If the :mailheader:`Content-Type` header is " +"invalid, return ``text/plain``." msgstr "" -"Renvoie le type de contenu du message, contraint en minuscules de la forme :" -"mimetype:`maintype/subtype`. S'il n'y a pas d'en-tête :mailheader:`Content-" -"Type` dans le message, renvoie la valeur renvoyée par :meth:" -"`get_default_type`. Si l'en-tête :mailheader:`Content-Type` n'est pas " -"valide, renvoie ``text/plain``." +"Renvoie le type de contenu du message, contraint en minuscules de la " +"forme :mimetype:`maintype/subtype`. S'il n'y a pas d'en-" +"tête :mailheader:`Content-Type` dans le message, renvoie la valeur renvoyée " +"par :meth:`get_default_type`. Si l'en-tête :mailheader:`Content-Type` n'est " +"pas valide, renvoie ``text/plain``." -#: library/email.message.rst:317 +#: library/email.message.rst:314 msgid "" -"(According to :rfc:`2045`, messages always have a default type, :meth:" -"`get_content_type` will always return a value. :rfc:`2045` defines a " -"message's default type to be :mimetype:`text/plain` unless it appears inside " -"a :mimetype:`multipart/digest` container, in which case it would be :" -"mimetype:`message/rfc822`. If the :mailheader:`Content-Type` header has an " -"invalid type specification, :rfc:`2045` mandates that the default type be :" -"mimetype:`text/plain`.)" +"(According to :rfc:`2045`, messages always have a default " +"type, :meth:`get_content_type` will always return a value. :rfc:`2045` " +"defines a message's default type to be :mimetype:`text/plain` unless it " +"appears inside a :mimetype:`multipart/digest` container, in which case it " +"would be :mimetype:`message/rfc822`. If the :mailheader:`Content-Type` " +"header has an invalid type specification, :rfc:`2045` mandates that the " +"default type be :mimetype:`text/plain`.)" msgstr "" -"(Selon la :rfc:`2045`, les messages ont toujours un type par défaut, :meth:" -"`get_content_type` renvoie toujours une valeur. La :rfc:`2045` définit le " -"type par défaut d'un message comme étant :mimetype:`text/plain` à moins " -"qu'il n'apparaisse dans un conteneur :mimetype:`multipart/digest`, auquel " -"cas ce serait :mimetype:`message/rfc822`. Si l'en-tête :mailheader:`Content-" -"Type` a une spécification de type invalide, la :rfc:`2045` exige que le type " -"par défaut soit :mimetype:`text/plain`.)" +"(Selon la :rfc:`2045`, les messages ont toujours un type par " +"défaut, :meth:`get_content_type` renvoie toujours une valeur. La :rfc:`2045` " +"définit le type par défaut d'un message comme étant :mimetype:`text/plain` à " +"moins qu'il n'apparaisse dans un conteneur :mimetype:`multipart/digest`, " +"auquel cas ce serait :mimetype:`message/rfc822`. Si l'en-" +"tête :mailheader:`Content-Type` a une spécification de type invalide, " +"la :rfc:`2045` exige que le type par défaut soit :mimetype:`text/plain`.)" -#: library/email.message.rst:328 +#: library/email.message.rst:325 msgid "" "Return the message's main content type. This is the :mimetype:`maintype` " "part of the string returned by :meth:`get_content_type`." msgstr "" -"Renvoie le type de contenu principal du message. C'est la partie :mimetype:" -"`maintype` de la chaîne renvoyée par :meth:`get_content_type`." +"Renvoie le type de contenu principal du message. C'est la " +"partie :mimetype:`maintype` de la chaîne renvoyée " +"par :meth:`get_content_type`." -#: library/email.message.rst:334 +#: library/email.message.rst:331 msgid "" "Return the message's sub-content type. This is the :mimetype:`subtype` part " "of the string returned by :meth:`get_content_type`." msgstr "" -"Renvoie le type de sous-contenu du message. C'est la partie :mimetype:" -"`subtype` de la chaîne renvoyée par :meth:`get_content_type`." +"Renvoie le type de sous-contenu du message. C'est la " +"partie :mimetype:`subtype` de la chaîne renvoyée " +"par :meth:`get_content_type`." -#: library/email.message.rst:340 +#: library/email.message.rst:337 msgid "" "Return the default content type. Most messages have a default content type " -"of :mimetype:`text/plain`, except for messages that are subparts of :" -"mimetype:`multipart/digest` containers. Such subparts have a default " +"of :mimetype:`text/plain`, except for messages that are subparts " +"of :mimetype:`multipart/digest` containers. Such subparts have a default " "content type of :mimetype:`message/rfc822`." msgstr "" "Renvoie le type de contenu par défaut. La plupart des messages ont un type " @@ -604,7 +610,7 @@ msgstr "" "sont des sous-parties des conteneurs :mimetype:`multipart/digest`. Ces sous-" "parties ont un type de contenu par défaut de :mimetype:`message/rfc822`." -#: library/email.message.rst:348 +#: library/email.message.rst:345 msgid "" "Set the default content type. *ctype* should either be :mimetype:`text/" "plain` or :mimetype:`message/rfc822`, although this is not enforced. The " @@ -614,28 +620,29 @@ msgid "" msgstr "" "Définit le type de contenu par défaut. *ctype* doit être :mimetype:`text/" "plain` ou :mimetype:`message/rfc822`, bien que cela ne soit pas imposé. Le " -"type de contenu par défaut n'est pas stocké dans l'en-tête :mailheader:" -"`Content-Type`, il n'affecte donc que la valeur de retour des méthodes " -"``get_content_type`` lorsqu'aucun en-tête :mailheader:`Content-Type` n'est " -"présent dans le message ." +"type de contenu par défaut n'est pas stocké dans l'en-" +"tête :mailheader:`Content-Type`, il n'affecte donc que la valeur de retour " +"des méthodes ``get_content_type`` lorsqu'aucun en-tête :mailheader:`Content-" +"Type` n'est présent dans le message ." -#: library/email.message.rst:359 +#: library/email.message.rst:356 msgid "" "Set a parameter in the :mailheader:`Content-Type` header. If the parameter " "already exists in the header, replace its value with *value*. When *header* " "is ``Content-Type`` (the default) and the header does not yet exist in the " "message, add it, set its value to :mimetype:`text/plain`, and append the new " -"parameter value. Optional *header* specifies an alternative header to :" -"mailheader:`Content-Type`." +"parameter value. Optional *header* specifies an alternative header " +"to :mailheader:`Content-Type`." msgstr "" "Définit un paramètre dans l'en-tête :mailheader:`Content-Type`. Si le " "paramètre existe déjà dans l'en-tête, remplace sa valeur par *value*. " "Lorsque *header* est ``Content-Type`` (la valeur par défaut) et que l'en-" -"tête n'existe pas encore dans le message, l'ajoute, définit sa valeur sur :" -"mimetype:`text/plain` et ajoute la nouvelle valeur du paramètre. *header* " -"facultatif spécifie un en-tête alternatif à :mailheader:`Content-Type`." +"tête n'existe pas encore dans le message, l'ajoute, définit sa valeur " +"sur :mimetype:`text/plain` et ajoute la nouvelle valeur du paramètre. " +"*header* facultatif spécifie un en-tête alternatif à :mailheader:`Content-" +"Type`." -#: library/email.message.rst:366 +#: library/email.message.rst:363 msgid "" "If the value contains non-ASCII characters, the charset and language may be " "explicitly specified using the optional *charset* and *language* " @@ -646,12 +653,12 @@ msgid "" msgstr "" "Si la valeur contient des caractères non ASCII, le jeu de caractères et la " "langue peuvent être explicitement spécifiés à l'aide des paramètres " -"facultatifs *charset* et *language*. L'option *language* spécifie la langue :" -"rfc:`2231`, par défaut la chaîne vide. *charset* et *language* doivent être " -"des chaînes. La valeur par défaut est ``utf8`` pour *charset* et ``None`` " -"pour *language*." +"facultatifs *charset* et *language*. L'option *language* spécifie la " +"langue :rfc:`2231`, par défaut la chaîne vide. *charset* et *language* " +"doivent être des chaînes. La valeur par défaut est ``utf8`` pour *charset* " +"et ``None`` pour *language*." -#: library/email.message.rst:373 +#: library/email.message.rst:370 msgid "" "If *replace* is ``False`` (the default) the header is moved to the end of " "the list of headers. If *replace* is ``True``, the header will be updated " @@ -661,7 +668,7 @@ msgstr "" "fin de la liste des en-têtes. Si *replace* est ``True``, l'en-tête est mis à " "jour sur place." -#: library/email.message.rst:394 +#: library/email.message.rst:391 msgid "" "Use of the *requote* parameter with :class:`EmailMessage` objects is " "deprecated." @@ -669,24 +676,24 @@ msgstr "" "L'utilisation du paramètre *requote* avec les objets :class:`EmailMessage` " "est obsolète." -#: library/email.message.rst:380 +#: library/email.message.rst:377 #, fuzzy msgid "" -"Note that existing parameter values of headers may be accessed through the :" -"attr:`~email.headerregistry.ParameterizedMIMEHeader.params` attribute of the " -"header value (for example, ``msg['Content-Type'].params['charset']``)." +"Note that existing parameter values of headers may be accessed through " +"the :attr:`~email.headerregistry.ParameterizedMIMEHeader.params` attribute " +"of the header value (for example, ``msg['Content-Type'].params['charset']``)." msgstr "" "Notez que les valeurs existantes des paramètres des en-têtes sont " "accessibles via l'attribut :attr:`~email.headerregistry.BaseHeader.params` " -"de la valeur d'en-tête (par exemple, ``msg['Content-Type']." -"params['charset' ]``)." +"de la valeur d'en-tête (par exemple, ``msg['Content-" +"Type'].params['charset' ]``)." # suit un : -#: library/email.message.rst:384 +#: library/email.message.rst:381 msgid "``replace`` keyword was added." msgstr "le paramètre nommé ``replace`` a été ajouté." -#: library/email.message.rst:389 +#: library/email.message.rst:386 msgid "" "Remove the given parameter completely from the :mailheader:`Content-Type` " "header. The header will be re-written in place without the parameter or its " @@ -697,7 +704,7 @@ msgstr "" "Type`. L'en-tête est réécrit en place sans le paramètre ou sa valeur. " "L'option *header* spécifie une alternative à :mailheader:`Content-Type`." -#: library/email.message.rst:400 +#: library/email.message.rst:397 msgid "" "Return the value of the ``filename`` parameter of the :mailheader:`Content-" "Disposition` header of the message. If the header does not have a " @@ -706,26 +713,26 @@ msgid "" "the header is missing, then *failobj* is returned. The returned string will " "always be unquoted as per :func:`email.utils.unquote`." msgstr "" -"Renvoie la valeur du paramètre ``filename`` de l'en-tête :mailheader:" -"`Content-Disposition` du message. Si l'en-tête n'a pas de paramètre " -"``filename``, cette méthode revient à rechercher le paramètre ``name`` dans " -"l'en-tête :mailheader:`Content-Type`. Si aucun n'est trouvé, ou si l'en-tête " -"est manquant, alors *failobj* est renvoyé. La chaîne renvoyée est toujours " -"sans guillemets selon :func:`email.utils.unquote`." +"Renvoie la valeur du paramètre ``filename`` de l'en-" +"tête :mailheader:`Content-Disposition` du message. Si l'en-tête n'a pas de " +"paramètre ``filename``, cette méthode revient à rechercher le paramètre " +"``name`` dans l'en-tête :mailheader:`Content-Type`. Si aucun n'est trouvé, " +"ou si l'en-tête est manquant, alors *failobj* est renvoyé. La chaîne " +"renvoyée est toujours sans guillemets selon :func:`email.utils.unquote`." -#: library/email.message.rst:411 +#: library/email.message.rst:408 msgid "" "Return the value of the ``boundary`` parameter of the :mailheader:`Content-" "Type` header of the message, or *failobj* if either the header is missing, " "or has no ``boundary`` parameter. The returned string will always be " "unquoted as per :func:`email.utils.unquote`." msgstr "" -"Renvoie la valeur du paramètre ``boundary`` de l'en-tête :mailheader:" -"`Content-Type` du message, ou *failobj* si l'en-tête est manquant ou n'a pas " -"de paramètre ``boundary``. La chaîne renvoyée est toujours sans guillemets " -"selon :func:`email.utils.unquote`." +"Renvoie la valeur du paramètre ``boundary`` de l'en-" +"tête :mailheader:`Content-Type` du message, ou *failobj* si l'en-tête est " +"manquant ou n'a pas de paramètre ``boundary``. La chaîne renvoyée est " +"toujours sans guillemets selon :func:`email.utils.unquote`." -#: library/email.message.rst:419 +#: library/email.message.rst:416 msgid "" "Set the ``boundary`` parameter of the :mailheader:`Content-Type` header to " "*boundary*. :meth:`set_boundary` will always quote *boundary* if " @@ -737,20 +744,20 @@ msgstr "" "nécessaire. Une :exc:`~email.errors.HeaderParseError` est levée si l'objet " "message n'a pas d'en-tête :mailheader:`Content-Type`." -#: library/email.message.rst:424 +#: library/email.message.rst:421 msgid "" -"Note that using this method is subtly different from deleting the old :" -"mailheader:`Content-Type` header and adding a new one with the new boundary " -"via :meth:`add_header`, because :meth:`set_boundary` preserves the order of " -"the :mailheader:`Content-Type` header in the list of headers." +"Note that using this method is subtly different from deleting the " +"old :mailheader:`Content-Type` header and adding a new one with the new " +"boundary via :meth:`add_header`, because :meth:`set_boundary` preserves the " +"order of the :mailheader:`Content-Type` header in the list of headers." msgstr "" "Notez que l'utilisation de cette méthode est légèrement différente de la " "suppression de l'ancien en-tête :mailheader:`Content-Type` et de l'ajout " -"d'un nouveau avec la nouvelle délimitation via :meth:`add_header`, car :meth:" -"`set_boundary` préserve l'ordre des en-têtes :mailheader:`Content-Type` dans " -"la liste des en-têtes." +"d'un nouveau avec la nouvelle délimitation via :meth:`add_header`, " +"car :meth:`set_boundary` préserve l'ordre des en-têtes :mailheader:`Content-" +"Type` dans la liste des en-têtes." -#: library/email.message.rst:433 +#: library/email.message.rst:430 msgid "" "Return the ``charset`` parameter of the :mailheader:`Content-Type` header, " "coerced to lower case. If there is no :mailheader:`Content-Type` header, or " @@ -761,7 +768,7 @@ msgstr "" "Type`, ou si cet en-tête n'a pas de paramètre ``charset``, *failobj* est " "renvoyé." -#: library/email.message.rst:440 +#: library/email.message.rst:437 msgid "" "Return a list containing the character set names in the message. If the " "message is a :mimetype:`multipart`, then the list will contain one element " @@ -772,7 +779,7 @@ msgstr "" "pour chaque sous-partie dans la charge utile, sinon c'est une liste de " "longueur 1." -#: library/email.message.rst:444 +#: library/email.message.rst:441 msgid "" "Each item in the list will be a string which is the value of the ``charset`` " "parameter in the :mailheader:`Content-Type` header for the represented " @@ -783,10 +790,11 @@ msgstr "" "Chaque élément de la liste est une chaîne qui est la valeur du paramètre " "``charset`` dans l'en-tête :mailheader:`Content-Type` pour la sous-partie " "représentée. Si la sous-partie n'a pas d'en-tête :mailheader:`Content-Type`, " -"pas de paramètre ``charset`` ou n'est pas du type MIME principal :mimetype:" -"`text`, alors cet élément est *failobj* dans la liste renvoyée." +"pas de paramètre ``charset`` ou n'est pas du type MIME " +"principal :mimetype:`text`, alors cet élément est *failobj* dans la liste " +"renvoyée." -#: library/email.message.rst:453 +#: library/email.message.rst:450 msgid "" "Return ``True`` if there is a :mailheader:`Content-Disposition` header and " "its (case insensitive) value is ``attachment``, ``False`` otherwise." @@ -794,27 +802,27 @@ msgstr "" "Renvoie ``True`` s'il y a un en-tête :mailheader:`Content-Disposition` et " "que sa valeur (insensible à la casse) est ``attachment``, ``False`` sinon." -#: library/email.message.rst:456 +#: library/email.message.rst:453 msgid "" -"is_attachment is now a method instead of a property, for consistency with :" -"meth:`~email.message.Message.is_multipart`." +"is_attachment is now a method instead of a property, for consistency " +"with :meth:`~email.message.Message.is_multipart`." msgstr "" "*is_attachment* est maintenant une méthode au lieu d'une propriété, par " "souci de cohérence avec :meth:`~email.message.Message.is_multipart`." -#: library/email.message.rst:463 +#: library/email.message.rst:460 msgid "" -"Return the lowercased value (without parameters) of the message's :" -"mailheader:`Content-Disposition` header if it has one, or ``None``. The " -"possible values for this method are *inline*, *attachment* or ``None`` if " -"the message follows :rfc:`2183`." +"Return the lowercased value (without parameters) of the " +"message's :mailheader:`Content-Disposition` header if it has one, or " +"``None``. The possible values for this method are *inline*, *attachment* or " +"``None`` if the message follows :rfc:`2183`." msgstr "" -"Renvoie la valeur en minuscules (sans paramètres) de l'en-tête :mailheader:" -"`Content-Disposition` du message s'il en a un, ou ``None``. Les valeurs " -"possibles pour cette méthode sont *inline*, *attachment* ou ``None`` si le " -"message respecte la :rfc:`2183`." +"Renvoie la valeur en minuscules (sans paramètres) de l'en-" +"tête :mailheader:`Content-Disposition` du message s'il en a un, ou ``None``. " +"Les valeurs possibles pour cette méthode sont *inline*, *attachment* ou " +"``None`` si le message respecte la :rfc:`2183`." -#: library/email.message.rst:471 +#: library/email.message.rst:468 msgid "" "The following methods relate to interrogating and manipulating the content " "(payload) of the message." @@ -822,7 +830,7 @@ msgstr "" "Les méthodes suivantes concernent l'interrogation et la manipulation du " "contenu (charge utile) du message." -#: library/email.message.rst:477 +#: library/email.message.rst:474 msgid "" "The :meth:`walk` method is an all-purpose generator which can be used to " "iterate over all the parts and subparts of a message object tree, in depth-" @@ -835,7 +843,7 @@ msgstr "" "classique est d'itérer avec :meth:`walk` dans une boucle ``for`` ; chaque " "itération renvoie la sous-partie suivante." -#: library/email.message.rst:482 +#: library/email.message.rst:479 msgid "" "Here's an example that prints the MIME type of every part of a multipart " "message structure:" @@ -843,7 +851,7 @@ msgstr "" "Voici un exemple qui imprime le type MIME de chaque partie d'une structure " "de message en plusieurs parties :" -#: library/email.message.rst:503 +#: library/email.message.rst:500 msgid "" "``walk`` iterates over the subparts of any part where :meth:`is_multipart` " "returns ``True``, even though ``msg.get_content_maintype() == 'multipart'`` " @@ -855,7 +863,7 @@ msgstr "" "renvoyer ``False``. Nous pouvons le voir dans notre exemple en utilisant la " "fonction d'aide au débogage ``_structure`` :" -#: library/email.message.rst:531 +#: library/email.message.rst:528 msgid "" "Here the ``message`` parts are not ``multiparts``, but they do contain " "subparts. ``is_multipart()`` returns ``True`` and ``walk`` descends into the " @@ -865,7 +873,7 @@ msgstr "" "contiennent des sous-parties. ``is_multipart()`` renvoie ``True`` et " "``walk`` descend dans les sous-parties." -#: library/email.message.rst:538 +#: library/email.message.rst:535 msgid "" "Return the MIME part that is the best candidate to be the \"body\" of the " "message." @@ -873,7 +881,7 @@ msgstr "" "Renvoie la partie MIME qui est la meilleure candidate pour être le corps du " "message." -#: library/email.message.rst:541 +#: library/email.message.rst:538 msgid "" "*preferencelist* must be a sequence of strings from the set ``related``, " "``html``, and ``plain``, and indicates the order of preference for the " @@ -883,7 +891,7 @@ msgstr "" "``related``, ``html`` et ``plain``, et indique l'ordre de préférence pour le " "type de contenu de la partie renvoyée." -#: library/email.message.rst:545 +#: library/email.message.rst:542 msgid "" "Start looking for candidate matches with the object on which the " "``get_body`` method is called." @@ -891,7 +899,7 @@ msgstr "" "Elle commence par rechercher des correspondances candidates avec l'objet sur " "lequel la méthode ``get_body`` est appelée." -#: library/email.message.rst:548 +#: library/email.message.rst:545 msgid "" "If ``related`` is not included in *preferencelist*, consider the root part " "(or subpart of the root part) of any related encountered as a candidate if " @@ -901,7 +909,7 @@ msgstr "" "partie racine (ou sous-partie de la partie racine) de tout lien rencontré " "comme candidat si la (sous-)partie correspond à une préférence." -#: library/email.message.rst:552 +#: library/email.message.rst:549 msgid "" "When encountering a ``multipart/related``, check the ``start`` parameter and " "if a part with a matching :mailheader:`Content-ID` is found, consider only " @@ -914,7 +922,7 @@ msgstr "" "correspondances candidates. Sinon, elle ne considère que la première partie " "(racine par défaut) de ``multipart/related``." -#: library/email.message.rst:557 +#: library/email.message.rst:554 msgid "" "If a part has a :mailheader:`Content-Disposition` header, only consider the " "part a candidate match if the value of the header is ``inline``." @@ -923,7 +931,7 @@ msgstr "" "considère la partie comme une correspondance candidate que si la valeur de " "l'en-tête est ``inline``." -#: library/email.message.rst:560 +#: library/email.message.rst:557 msgid "" "If none of the candidates matches any of the preferences in " "*preferencelist*, return ``None``." @@ -931,7 +939,7 @@ msgstr "" "Si aucun des candidats ne correspond à aucune des préférences dans " "*preferencelist*, elle renvoie ``None``." -#: library/email.message.rst:563 +#: library/email.message.rst:560 msgid "" "Notes: (1) For most applications the only *preferencelist* combinations that " "really make sense are ``('plain',)``, ``('html', 'plain')``, and the default " @@ -955,13 +963,13 @@ msgstr "" "ce qui peut occasionnellement amener ``get_body`` à renvoyer des résultats " "inattendus." -#: library/email.message.rst:577 +#: library/email.message.rst:574 msgid "" "Return an iterator over all of the immediate sub-parts of the message that " "are not candidate \"body\" parts. That is, skip the first occurrence of " "each of ``text/plain``, ``text/html``, ``multipart/related``, or ``multipart/" -"alternative`` (unless they are explicitly marked as attachments via :" -"mailheader:`Content-Disposition: attachment`), and return all remaining " +"alternative`` (unless they are explicitly marked as attachments " +"via :mailheader:`Content-Disposition: attachment`), and return all remaining " "parts. When applied directly to a ``multipart/related``, return an iterator " "over the all the related parts except the root part (ie: the part pointed to " "by the ``start`` parameter, or the first part if there is no ``start`` " @@ -973,27 +981,27 @@ msgstr "" "ne sont pas des parties de « corps » candidates. Autrement dit, elle ignore " "la première occurrence de chacun des éléments suivants : ``text/plain``, " "``text/html``, ``multipart/related`` ou ``multipart/alternative`` (sauf " -"s'ils sont explicitement marqués comme pièces jointes via :mailheader:" -"`Content-Disposition: attachment`), et renvoie toutes les parties restantes. " -"Lorsqu'elle est appliquée directement à un ``multipart/related``, renvoie un " -"itérateur sur toutes les parties liées sauf la partie racine (c'est-à-dire " -"la partie pointée par le paramètre ``start``, ou la première partie s'il n'y " -"a pas de paramètre ``start`` ou si le paramètre ``start`` ne correspond pas " -"au :mailheader:`Content-ID` de l'une des parties). Lorsqu'elle est appliquée " -"directement à un ``multipart/alternative`` ou à un non-``multipart``, elle " -"renvoie un itérateur vide." - -#: library/email.message.rst:593 +"s'ils sont explicitement marqués comme pièces jointes " +"via :mailheader:`Content-Disposition: attachment`), et renvoie toutes les " +"parties restantes. Lorsqu'elle est appliquée directement à un ``multipart/" +"related``, renvoie un itérateur sur toutes les parties liées sauf la partie " +"racine (c'est-à-dire la partie pointée par le paramètre ``start``, ou la " +"première partie s'il n'y a pas de paramètre ``start`` ou si le paramètre " +"``start`` ne correspond pas au :mailheader:`Content-ID` de l'une des " +"parties). Lorsqu'elle est appliquée directement à un ``multipart/" +"alternative`` ou à un non-``multipart``, elle renvoie un itérateur vide." + +#: library/email.message.rst:590 msgid "" "Return an iterator over all of the immediate sub-parts of the message, which " -"will be empty for a non-``multipart``. (See also :meth:`~email.message." -"EmailMessage.walk`.)" +"will be empty for a non-``multipart``. (See " +"also :meth:`~email.message.EmailMessage.walk`.)" msgstr "" "Renvoie un itérateur sur toutes les sous-parties immédiates du message, qui " -"seront vides pour une non-``multipart`` (voir aussi :meth:`~email.message." -"EmailMessage.walk`)." +"seront vides pour une non-``multipart`` (voir " +"aussi :meth:`~email.message.EmailMessage.walk`)." -#: library/email.message.rst:600 +#: library/email.message.rst:597 msgid "" "Call the :meth:`~email.contentmanager.ContentManager.get_content` method of " "the *content_manager*, passing self as the message object, and passing along " @@ -1007,7 +1015,7 @@ msgstr "" "*content_manager* n'est pas spécifié, utilise le ``content_manager`` " "spécifié par la :mod:`~email.policy` actuelle." -#: library/email.message.rst:609 +#: library/email.message.rst:606 msgid "" "Call the :meth:`~email.contentmanager.ContentManager.set_content` method of " "the *content_manager*, passing self as the message object, and passing along " @@ -1021,7 +1029,7 @@ msgstr "" "*content_manager* n'est pas spécifié, utilise le ``content_manager`` " "spécifié par la :mod:`~email.policy` actuelle." -#: library/email.message.rst:618 +#: library/email.message.rst:615 msgid "" "Convert a non-``multipart`` message into a ``multipart/related`` message, " "moving any existing :mailheader:`Content-` headers and payload into a (new) " @@ -1037,7 +1045,7 @@ msgstr "" "*multipart*, sinon elle laisse la délimitation être créée automatiquement " "lorsque cela est nécessaire (par exemple, lorsque le message est sérialisé)." -#: library/email.message.rst:628 +#: library/email.message.rst:625 msgid "" "Convert a non-``multipart`` or a ``multipart/related`` into a ``multipart/" "alternative``, moving any existing :mailheader:`Content-` headers and " @@ -1054,83 +1062,85 @@ msgstr "" "automatiquement lorsque cela est nécessaire (par exemple, lorsque le message " "est sérialisé)." -#: library/email.message.rst:638 +#: library/email.message.rst:635 msgid "" "Convert a non-``multipart``, a ``multipart/related``, or a ``multipart-" -"alternative`` into a ``multipart/mixed``, moving any existing :mailheader:" -"`Content-` headers and payload into a (new) first part of the " -"``multipart``. If *boundary* is specified, use it as the boundary string in " -"the multipart, otherwise leave the boundary to be automatically created when " -"it is needed (for example, when the message is serialized)." +"alternative`` into a ``multipart/mixed``, moving any " +"existing :mailheader:`Content-` headers and payload into a (new) first part " +"of the ``multipart``. If *boundary* is specified, use it as the boundary " +"string in the multipart, otherwise leave the boundary to be automatically " +"created when it is needed (for example, when the message is serialized)." msgstr "" "Convertit un non-``multipart``, un ``multipart/related`` ou un ``multipart-" -"alternative`` en un ``multipart/mixed``, en déplaçant tous les en-têtes :" -"mailheader:`Content-` existants et charge utile dans une (nouvelle) première " -"partie du ``multipart``. Si *boundary* est spécifiée, l'utilise comme chaîne " -"de délimitation dans le *multipart*, sinon elle laisse la délimitation être " -"créée automatiquement lorsque cela est nécessaire (par exemple, lorsque le " -"message est sérialisé)." +"alternative`` en un ``multipart/mixed``, en déplaçant tous les en-" +"têtes :mailheader:`Content-` existants et charge utile dans une (nouvelle) " +"première partie du ``multipart``. Si *boundary* est spécifiée, l'utilise " +"comme chaîne de délimitation dans le *multipart*, sinon elle laisse la " +"délimitation être créée automatiquement lorsque cela est nécessaire (par " +"exemple, lorsque le message est sérialisé)." -#: library/email.message.rst:648 +#: library/email.message.rst:645 msgid "" "If the message is a ``multipart/related``, create a new message object, pass " -"all of the arguments to its :meth:`set_content` method, and :meth:`~email." -"message.Message.attach` it to the ``multipart``. If the message is a non-" -"``multipart``, call :meth:`make_related` and then proceed as above. If the " -"message is any other type of ``multipart``, raise a :exc:`TypeError`. If " -"*content_manager* is not specified, use the ``content_manager`` specified by " -"the current :mod:`~email.policy`. If the added part has no :mailheader:" -"`Content-Disposition` header, add one with the value ``inline``." +"all of the arguments to its :meth:`set_content` method, " +"and :meth:`~email.message.Message.attach` it to the ``multipart``. If the " +"message is a non-``multipart``, call :meth:`make_related` and then proceed " +"as above. If the message is any other type of ``multipart``, raise " +"a :exc:`TypeError`. If *content_manager* is not specified, use the " +"``content_manager`` specified by the current :mod:`~email.policy`. If the " +"added part has no :mailheader:`Content-Disposition` header, add one with the " +"value ``inline``." msgstr "" "Si le message est un ``multipart/related``, crée un nouvel objet message, " -"passe tous les arguments à sa méthode :meth:`set_content` et le joint avec :" -"meth:`~email.message.Message.attach` au ``multipart``. Si le message n'est " -"pas en ``multipart``, appelle :meth:`make_related` puis procède comme ci-" -"dessus. Si le message est un autre type de ``multipart``, lève une :exc:" -"`TypeError`. Si *content_manager* n'est pas spécifié, utilise le " +"passe tous les arguments à sa méthode :meth:`set_content` et le joint " +"avec :meth:`~email.message.Message.attach` au ``multipart``. Si le message " +"n'est pas en ``multipart``, appelle :meth:`make_related` puis procède comme " +"ci-dessus. Si le message est un autre type de ``multipart``, lève " +"une :exc:`TypeError`. Si *content_manager* n'est pas spécifié, utilise le " "``content_manager`` spécifié par la :mod:`~email.policy` actuelle. Si la " "partie ajoutée n'a pas d'en-tête :mailheader:`Content-Disposition`, en " "ajoute un avec la valeur ``inline``." -#: library/email.message.rst:661 +#: library/email.message.rst:658 msgid "" "If the message is a ``multipart/alternative``, create a new message object, " -"pass all of the arguments to its :meth:`set_content` method, and :meth:" -"`~email.message.Message.attach` it to the ``multipart``. If the message is " -"a non-``multipart`` or ``multipart/related``, call :meth:`make_alternative` " -"and then proceed as above. If the message is any other type of " -"``multipart``, raise a :exc:`TypeError`. If *content_manager* is not " -"specified, use the ``content_manager`` specified by the current :mod:`~email." -"policy`." +"pass all of the arguments to its :meth:`set_content` method, " +"and :meth:`~email.message.Message.attach` it to the ``multipart``. If the " +"message is a non-``multipart`` or ``multipart/related``, " +"call :meth:`make_alternative` and then proceed as above. If the message is " +"any other type of ``multipart``, raise a :exc:`TypeError`. If " +"*content_manager* is not specified, use the ``content_manager`` specified by " +"the current :mod:`~email.policy`." msgstr "" "Si le message est un ``multipart/alternative``, crée un nouvel objet " "message, transmet tous les arguments à sa méthode :meth:`set_content` et le " "joint avec :meth:`~email.message.Message.attach` au ``multipart``. Si le " -"message est non-``multipart`` ou ``multipart/related``, appelle :meth:" -"`make_alternative` puis procède comme ci-dessus. Si le message est un autre " -"type de ``multipart``, lève une :exc:`TypeError`. Si *content_manager* n'est " -"pas spécifié, utilise le ``content_manager`` spécifié par la :mod:`~email." -"policy` actuelle." +"message est non-``multipart`` ou ``multipart/related``, " +"appelle :meth:`make_alternative` puis procède comme ci-dessus. Si le message " +"est un autre type de ``multipart``, lève une :exc:`TypeError`. Si " +"*content_manager* n'est pas spécifié, utilise le ``content_manager`` " +"spécifié par la :mod:`~email.policy` actuelle." -#: library/email.message.rst:673 +#: library/email.message.rst:670 msgid "" "If the message is a ``multipart/mixed``, create a new message object, pass " -"all of the arguments to its :meth:`set_content` method, and :meth:`~email." -"message.Message.attach` it to the ``multipart``. If the message is a non-" -"``multipart``, ``multipart/related``, or ``multipart/alternative``, call :" -"meth:`make_mixed` and then proceed as above. If *content_manager* is not " -"specified, use the ``content_manager`` specified by the current :mod:`~email." -"policy`. If the added part has no :mailheader:`Content-Disposition` header, " -"add one with the value ``attachment``. This method can be used both for " -"explicit attachments (:mailheader:`Content-Disposition: attachment`) and " -"``inline`` attachments (:mailheader:`Content-Disposition: inline`), by " -"passing appropriate options to the ``content_manager``." +"all of the arguments to its :meth:`set_content` method, " +"and :meth:`~email.message.Message.attach` it to the ``multipart``. If the " +"message is a non-``multipart``, ``multipart/related``, or ``multipart/" +"alternative``, call :meth:`make_mixed` and then proceed as above. If " +"*content_manager* is not specified, use the ``content_manager`` specified by " +"the current :mod:`~email.policy`. If the added part has " +"no :mailheader:`Content-Disposition` header, add one with the value " +"``attachment``. This method can be used both for explicit attachments " +"(:mailheader:`Content-Disposition: attachment`) and ``inline`` attachments " +"(:mailheader:`Content-Disposition: inline`), by passing appropriate options " +"to the ``content_manager``." msgstr "" "Si le message est un ``multipart/mixed``, crée un nouvel objet message, " -"passe tous les arguments à sa méthode :meth:`set_content` et le joint avec :" -"meth:`~email.message.Message.attach` au ``multipart``. Si le message n'est " -"pas en ``multipart``, ``multipart/related`` ou ``multipart/alternative``, " -"appelle :meth:`make_mixed` puis procède comme ci-dessus. Si " +"passe tous les arguments à sa méthode :meth:`set_content` et le joint " +"avec :meth:`~email.message.Message.attach` au ``multipart``. Si le message " +"n'est pas en ``multipart``, ``multipart/related`` ou ``multipart/" +"alternative``, appelle :meth:`make_mixed` puis procède comme ci-dessus. Si " "*content_manager* n'est pas spécifié, utilise le ``content_manager`` " "spécifié par la :mod:`~email.policy` actuelle. Si la partie ajoutée n'a pas " "d'en-tête :mailheader:`Content-Disposition`, en ajoute un avec la valeur " @@ -1139,11 +1149,11 @@ msgstr "" "pièces jointes ``inline`` (:mailheader:`Content-Disposition:inline`), en " "passant les options appropriées au ``content_manager``." -#: library/email.message.rst:689 +#: library/email.message.rst:686 msgid "Remove the payload and all of the headers." msgstr "Supprime la charge utile et tous les en-têtes." -#: library/email.message.rst:694 +#: library/email.message.rst:691 #, fuzzy msgid "" "Remove the payload and all of the :mailheader:`!Content-` headers, leaving " @@ -1152,12 +1162,12 @@ msgstr "" "Supprime la charge utile et tous les en-têtes :exc:`Content-`, en laissant " "tous les autres en-têtes intacts et dans leur ordre d'origine." -#: library/email.message.rst:698 +#: library/email.message.rst:695 msgid ":class:`EmailMessage` objects have the following instance attributes:" msgstr "" "Les objets :class:`EmailMessage` ont les attributs d'instance suivants :" -#: library/email.message.rst:703 +#: library/email.message.rst:700 msgid "" "The format of a MIME document allows for some text between the blank line " "following the headers, and the first multipart boundary string. Normally, " @@ -1174,27 +1184,29 @@ msgstr "" "l'affichage du message dans un lecteur non compatible MIME, ce texte peut " "devenir visible." -#: library/email.message.rst:710 +#: library/email.message.rst:707 msgid "" "The *preamble* attribute contains this leading extra-armor text for MIME " "documents. When the :class:`~email.parser.Parser` discovers some text after " "the headers but before the first boundary string, it assigns this text to " -"the message's *preamble* attribute. When the :class:`~email.generator." -"Generator` is writing out the plain text representation of a MIME message, " -"and it finds the message has a *preamble* attribute, it will write this text " -"in the area between the headers and the first boundary. See :mod:`email." -"parser` and :mod:`email.generator` for details." +"the message's *preamble* attribute. When " +"the :class:`~email.generator.Generator` is writing out the plain text " +"representation of a MIME message, and it finds the message has a *preamble* " +"attribute, it will write this text in the area between the headers and the " +"first boundary. See :mod:`email.parser` and :mod:`email.generator` for " +"details." msgstr "" "L'attribut *preamble* contient ce texte hors cadre de tête pour les " "documents MIME. Lorsque :class:`~email.parser.Parser` découvre du texte " "après les en-têtes mais avant la première chaîne de délimitation, il " -"attribue ce texte à l'attribut *preamble* du message. Lorsque :class:`~email." -"generator.Generator` écrit la représentation en texte brut d'un message " -"MIME, et qu'il trouve que le message a un attribut *preamble*, il écrit ce " -"texte dans la zone entre les en-têtes et la première limite. Voir :mod:" -"`email.parser` et :mod:`email.generator` pour plus de détails." +"attribue ce texte à l'attribut *preamble* du message. " +"Lorsque :class:`~email.generator.Generator` écrit la représentation en texte " +"brut d'un message MIME, et qu'il trouve que le message a un attribut " +"*preamble*, il écrit ce texte dans la zone entre les en-têtes et la première " +"limite. Voir :mod:`email.parser` et :mod:`email.generator` pour plus de " +"détails." -#: library/email.message.rst:720 +#: library/email.message.rst:717 msgid "" "Note that if the message object has no preamble, the *preamble* attribute " "will be ``None``." @@ -1202,7 +1214,7 @@ msgstr "" "Notez que si l'objet message n'a pas de préambule, l'attribut *preamble* est " "``None``." -#: library/email.message.rst:726 +#: library/email.message.rst:723 msgid "" "The *epilogue* attribute acts the same way as the *preamble* attribute, " "except that it contains text that appears between the last boundary and the " @@ -1214,7 +1226,7 @@ msgstr "" "du message. Comme avec :attr:`~EmailMessage.preamble`, s'il n'y a pas de " "texte d'épilogue, cet attribut est ``None``." -#: library/email.message.rst:734 +#: library/email.message.rst:731 msgid "" "The *defects* attribute contains a list of all the problems found when " "parsing this message. See :mod:`email.errors` for a detailed description of " @@ -1224,24 +1236,24 @@ msgstr "" "lors de l'analyse de ce message. Voir :mod:`email.errors` pour une " "description détaillée des défauts d'analyse possibles." -#: library/email.message.rst:741 +#: library/email.message.rst:738 msgid "" -"This class represents a subpart of a MIME message. It is identical to :" -"class:`EmailMessage`, except that no :mailheader:`MIME-Version` headers are " -"added when :meth:`~EmailMessage.set_content` is called, since sub-parts do " -"not need their own :mailheader:`MIME-Version` headers." +"This class represents a subpart of a MIME message. It is identical " +"to :class:`EmailMessage`, except that no :mailheader:`MIME-Version` headers " +"are added when :meth:`~EmailMessage.set_content` is called, since sub-parts " +"do not need their own :mailheader:`MIME-Version` headers." msgstr "" "Cette classe représente une sous-partie d'un message MIME. Elle est " "identique à :class:`EmailMessage`, sauf qu'aucun en-tête :mailheader:`MIME-" "Version` n'est ajouté lorsque :meth:`~EmailMessage.set_content` est appelée, " -"car les sous-parties n'ont pas besoin de leurs propres en-têtes :mailheader:" -"`MIME-Version`." +"car les sous-parties n'ont pas besoin de leurs propres en-" +"têtes :mailheader:`MIME-Version`." -#: library/email.message.rst:748 +#: library/email.message.rst:745 msgid "Footnotes" msgstr "Notes" -#: library/email.message.rst:749 +#: library/email.message.rst:746 msgid "" "Originally added in 3.4 as a :term:`provisional module `. Docs for legacy message class moved to :ref:`compat32_message`." @@ -1249,3 +1261,12 @@ msgstr "" "Ajouté à l'origine dans 3.4 en tant que :term:`module provisoire `. Les documents pour la classe de message héritée ont été " "déplacés dans :ref:`compat32_message`." + +#: library/email.message.rst:750 +msgid "" +"The :class:`EmailMessage` class requires a policy that provides a " +"``content_manager`` attribute for content management methods like " +"``set_content()`` and ``get_content()`` to work. The " +"legacy :const:`~email.policy.compat32` policy does not support these methods " +"and should not be used with :class:`EmailMessage`." +msgstr "" diff --git a/library/email.mime.po b/library/email.mime.po index 9f264f39f..b1d3eaccf 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2024-03-15 22:55+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -32,9 +32,10 @@ msgid "" "even in non-legacy code." msgstr "" "Ce module fait partie de l'ancienne API de messagerie (``Compat32``). Sa " -"fonctionnalité est partiellement remplacée par le :mod:`~email." -"contentmanager` dans la nouvelle API mais, dans certaines applications, ces " -"classes peuvent toujours être utiles, même dans du code pas si ancien." +"fonctionnalité est partiellement remplacée par " +"le :mod:`~email.contentmanager` dans la nouvelle API mais, dans certaines " +"applications, ces classes peuvent toujours être utiles, même dans du code " +"pas si ancien." #: library/email.mime.rst:16 msgid "" @@ -42,31 +43,33 @@ msgid "" "text to a parser, which parses the text and returns the root message " "object. However you can also build a complete message structure from " "scratch, or even individual :class:`~email.message.Message` objects by " -"hand. In fact, you can also take an existing structure and add new :class:" -"`~email.message.Message` objects, move them around, etc. This makes a very " -"convenient interface for slicing-and-dicing MIME messages." +"hand. In fact, you can also take an existing structure and add " +"new :class:`~email.message.Message` objects, move them around, etc. This " +"makes a very convenient interface for slicing-and-dicing MIME messages." msgstr "" "Habituellement, vous obtenez une structure d'objet message en passant un " "fichier ou du texte à un analyseur, qui analyse le texte et renvoie l'objet " "message racine. Cependant, vous pouvez également créer une structure de " -"message complète à partir de zéro, ou même des objets individuels :class:" -"`~email.message.Message` à la main. En fait, vous pouvez également prendre " -"une structure existante et ajouter de nouveaux objets :class:`~email.message." -"Message`, les déplacer, etc. Cela crée une interface très pratique pour " -"découper et manipuler chaque morceau de messages MIME." +"message complète à partir de zéro, ou même des objets " +"individuels :class:`~email.message.Message` à la main. En fait, vous pouvez " +"également prendre une structure existante et ajouter de nouveaux " +"objets :class:`~email.message.Message`, les déplacer, etc. Cela crée une " +"interface très pratique pour découper et manipuler chaque morceau de " +"messages MIME." #: library/email.mime.rst:24 msgid "" -"You can create a new object structure by creating :class:`~email.message." -"Message` instances, adding attachments and all the appropriate headers " -"manually. For MIME messages though, the :mod:`email` package provides some " -"convenient subclasses to make things easier." +"You can create a new object structure by " +"creating :class:`~email.message.Message` instances, adding attachments and " +"all the appropriate headers manually. For MIME messages though, " +"the :mod:`email` package provides some convenient subclasses to make things " +"easier." msgstr "" -"Vous pouvez créer une nouvelle structure d'objet en créant des instances :" -"class:`~email.message.Message`, en ajoutant manuellement les pièces jointes " -"et tous les en-têtes appropriés. Pour les messages MIME cependant, le " -"paquet :mod:`email` fournit quelques sous-classes pratiques pour faciliter " -"les choses." +"Vous pouvez créer une nouvelle structure d'objet en créant des " +"instances :class:`~email.message.Message`, en ajoutant manuellement les " +"pièces jointes et tous les en-têtes appropriés. Pour les messages MIME " +"cependant, le paquet :mod:`email` fournit quelques sous-classes pratiques " +"pour faciliter les choses." #: library/email.mime.rst:29 msgid "Here are the classes:" @@ -78,39 +81,42 @@ msgstr "Module : :mod:`email.mime.base`" #: library/email.mime.rst:37 msgid "" -"This is the base class for all the MIME-specific subclasses of :class:" -"`~email.message.Message`. Ordinarily you won't create instances " +"This is the base class for all the MIME-specific subclasses " +"of :class:`~email.message.Message`. Ordinarily you won't create instances " "specifically of :class:`MIMEBase`, although you could. :class:`MIMEBase` is " "provided primarily as a convenient base class for more specific MIME-aware " "subclasses." msgstr "" -"C'est la classe mère pour toutes les sous-classes spécifiques à MIME de :" -"class:`~email.message.Message`. Normalement, vous ne créerez pas d'instances " -"spécifiques de :class:`MIMEBase`, bien que cela soit possible. :class:" -"`MIMEBase` est fourni principalement comme une classe mère pratique pour des " -"sous-classes plus spécifiques compatibles MIME." +"C'est la classe mère pour toutes les sous-classes spécifiques à MIME " +"de :class:`~email.message.Message`. Normalement, vous ne créerez pas " +"d'instances spécifiques de :class:`MIMEBase`, bien que cela soit " +"possible. :class:`MIMEBase` est fourni principalement comme une classe mère " +"pratique pour des sous-classes plus spécifiques compatibles MIME." #: library/email.mime.rst:43 msgid "" -"*_maintype* is the :mailheader:`Content-Type` major type (e.g. :mimetype:" -"`text` or :mimetype:`image`), and *_subtype* is the :mailheader:`Content-" -"Type` minor type (e.g. :mimetype:`plain` or :mimetype:`gif`). *_params* is " -"a parameter key/value dictionary and is passed directly to :meth:`Message." -"add_header `." +"*_maintype* is the :mailheader:`Content-Type` major type " +"(e.g. :mimetype:`text` or :mimetype:`image`), and *_subtype* is " +"the :mailheader:`Content-Type` minor type (e.g. :mimetype:`plain` " +"or :mimetype:`gif`). *_params* is a parameter key/value dictionary and is " +"passed directly to :meth:`Message.add_header " +"`." msgstr "" -"*_maintype* est le type majeur du :mailheader:`Content-Type` (par exemple :" -"mimetype:`text` ou :mimetype:`image`) et *_subtype* est le type mineur du :" -"mailheader:`Content-Type` (par exemple, :mimetype:`plain` ou :mimetype:" -"`gif`). *_params* est un paramètre dictionnaire clé-valeur et est transmis " -"directement à :meth:`Message.add_header `." +"*_maintype* est le type majeur du :mailheader:`Content-Type` (par " +"exemple :mimetype:`text` ou :mimetype:`image`) et *_subtype* est le type " +"mineur du :mailheader:`Content-Type` (par exemple, :mimetype:`plain` " +"ou :mimetype:`gif`). *_params* est un paramètre dictionnaire clé-valeur et " +"est transmis directement à :meth:`Message.add_header " +"`." #: library/email.mime.rst:49 msgid "" -"If *policy* is specified, (defaults to the :class:`compat32 ` policy) it will be passed to :class:`~email.message.Message`." +"If *policy* is specified, (defaults to the :class:`compat32 " +"` policy) it will be passed " +"to :class:`~email.message.Message`." msgstr "" -"Si *policy* est spécifiée, (par défaut la politique :class:`compat32 `) elle est passée à :class:`~email.message.Message`." +"Si *policy* est spécifiée, (par défaut la politique :class:`compat32 " +"`) elle est passée à :class:`~email.message.Message`." #: library/email.mime.rst:53 msgid "" @@ -119,8 +125,8 @@ msgid "" "Version` header (always set to ``1.0``)." msgstr "" "La classe :class:`MIMEBase` ajoute toujours un en-tête :mailheader:`Content-" -"Type` (basé sur *_maintype*, *_subtype* et *_params*) et un en-tête :" -"mailheader:`MIME-Version` (toujours défini à ``1.0``)." +"Type` (basé sur *_maintype*, *_subtype* et *_params*) et un en-" +"tête :mailheader:`MIME-Version` (toujours défini à ``1.0``)." # suit un : #: library/email.mime.rst:104 library/email.mime.rst:169 @@ -136,17 +142,19 @@ msgstr "Module : :mod:`email.mime.nonmultipart`" msgid "" "A subclass of :class:`~email.mime.base.MIMEBase`, this is an intermediate " "base class for MIME messages that are not :mimetype:`multipart`. The " -"primary purpose of this class is to prevent the use of the :meth:`~email." -"message.Message.attach` method, which only makes sense for :mimetype:" -"`multipart` messages. If :meth:`~email.message.Message.attach` is called, " +"primary purpose of this class is to prevent the use of " +"the :meth:`~email.message.Message.attach` method, which only makes sense " +"for :mimetype:`multipart` messages. " +"If :meth:`~email.message.Message.attach` is called, " "a :exc:`~email.errors.MultipartConversionError` exception is raised." msgstr "" "Sous-classe de :class:`~email.mime.base.MIMEBase`, c'est une classe mère " "intermédiaire pour les messages MIME qui ne sont pas :mimetype:`multipart`. " -"Le but principal de cette classe est d'empêcher l'utilisation de la méthode :" -"meth:`~email.message.Message.attach`, qui n'a de sens que pour les messages :" -"mimetype:`multipart`. Si :meth:`~email.message.Message.attach` est appelée, " -"une exception :exc:`~email.errors.MultipartConversionError` est levée." +"Le but principal de cette classe est d'empêcher l'utilisation de la " +"méthode :meth:`~email.message.Message.attach`, qui n'a de sens que pour les " +"messages :mimetype:`multipart`. Si :meth:`~email.message.Message.attach` est " +"appelée, une exception :exc:`~email.errors.MultipartConversionError` est " +"levée." #: library/email.mime.rst:80 msgid "Module: :mod:`email.mime.multipart`" @@ -157,16 +165,17 @@ msgid "" "A subclass of :class:`~email.mime.base.MIMEBase`, this is an intermediate " "base class for MIME messages that are :mimetype:`multipart`. Optional " "*_subtype* defaults to :mimetype:`mixed`, but can be used to specify the " -"subtype of the message. A :mailheader:`Content-Type` header of :mimetype:" -"`multipart/_subtype` will be added to the message object. A :mailheader:" -"`MIME-Version` header will also be added." +"subtype of the message. A :mailheader:`Content-Type` header " +"of :mimetype:`multipart/_subtype` will be added to the message object. " +"A :mailheader:`MIME-Version` header will also be added." msgstr "" "Sous-classe de :class:`~email.mime.base.MIMEBase`, c'est une classe mère " "intermédiaire pour les messages MIME qui sont :mimetype:`multipart`. " "*_subtype* (facultatif) est par défaut :mimetype:`mixed`, mais peut être " -"utilisé pour spécifier le sous-type du message. Un en-tête :mailheader:" -"`Content-Type` de :mimetype:`multipart/_subtype` sera ajouté à l'objet " -"message. Un en-tête :mailheader:`MIME-Version` sera également ajouté." +"utilisé pour spécifier le sous-type du message. Un en-" +"tête :mailheader:`Content-Type` de :mimetype:`multipart/_subtype` sera " +"ajouté à l'objet message. Un en-tête :mailheader:`MIME-Version` sera " +"également ajouté." #: library/email.mime.rst:89 msgid "" @@ -182,8 +191,8 @@ msgstr "" msgid "" "*_subparts* is a sequence of initial subparts for the payload. It must be " "possible to convert this sequence to a list. You can always attach new " -"subparts to the message by using the :meth:`Message.attach ` method." +"subparts to the message by using the :meth:`Message.attach " +"` method." msgstr "" "*_subparts* est une séquence de sous-parties initiales pour la charge utile. " "Il doit être possible de convertir cette séquence en une liste. Vous pouvez " @@ -193,11 +202,11 @@ msgstr "" #: library/email.mime.rst:131 library/email.mime.rst:200 #: library/email.mime.rst:254 msgid "" -"Optional *policy* argument defaults to :class:`compat32 `." +"Optional *policy* argument defaults to :class:`compat32 " +"`." msgstr "" -"L'argument facultatif *policy* est par défaut :class:`compat32 `." +"L'argument facultatif *policy* est par défaut :class:`compat32 " +"`." #: library/email.mime.rst:100 msgid "" @@ -215,10 +224,10 @@ msgstr "Module : :mod:`email.mime.application`" #: library/email.mime.rst:115 msgid "" -"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" -"`MIMEApplication` class is used to represent MIME message objects of major " -"type :mimetype:`application`. *_data* contains the bytes for the raw " -"application data. Optional *_subtype* specifies the MIME subtype and " +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, " +"the :class:`MIMEApplication` class is used to represent MIME message objects " +"of major type :mimetype:`application`. *_data* contains the bytes for the " +"raw application data. Optional *_subtype* specifies the MIME subtype and " "defaults to :mimetype:`octet-stream`." msgstr "" "Sous-classe de :class:`~email.mime.nonmultipart.MIMENonMultipart`, la " @@ -231,22 +240,23 @@ msgstr "" msgid "" "Optional *_encoder* is a callable (i.e. function) which will perform the " "actual encoding of the data for transport. This callable takes one " -"argument, which is the :class:`MIMEApplication` instance. It should use :" -"meth:`~email.message.Message.get_payload` and :meth:`~email.message.Message." -"set_payload` to change the payload to encoded form. It should also add any :" -"mailheader:`Content-Transfer-Encoding` or other headers to the message " -"object as necessary. The default encoding is base64. See the :mod:`email." -"encoders` module for a list of the built-in encoders." +"argument, which is the :class:`MIMEApplication` instance. It should " +"use :meth:`~email.message.Message.get_payload` " +"and :meth:`~email.message.Message.set_payload` to change the payload to " +"encoded form. It should also add any :mailheader:`Content-Transfer-" +"Encoding` or other headers to the message object as necessary. The default " +"encoding is base64. See the :mod:`email.encoders` module for a list of the " +"built-in encoders." msgstr "" "*_encoder* (facultatif) est un appelable (c'est-à-dire une fonction) qui " "effectue le codage réel des données pour le transport. Cet appelable prend " -"un argument, qui est l'instance :class:`MIMEApplication`. Il doit utiliser :" -"meth:`~email.message.Message.get_payload` et :meth:`~email.message.Message." -"set_payload` pour modifier la charge utile sous forme codée. Il doit " -"également ajouter n'importe quel :mailheader:`Content-Transfer-Encoding` ou " -"d'autres en-têtes à l'objet message si nécessaire. L'encodage par défaut est " -"base64. Voir le module :mod:`email.encoders` pour une liste des encodeurs " -"intégrés." +"un argument, qui est l'instance :class:`MIMEApplication`. Il doit " +"utiliser :meth:`~email.message.Message.get_payload` " +"et :meth:`~email.message.Message.set_payload` pour modifier la charge utile " +"sous forme codée. Il doit également ajouter n'importe " +"quel :mailheader:`Content-Transfer-Encoding` ou d'autres en-têtes à l'objet " +"message si nécessaire. L'encodage par défaut est base64. Voir le " +"module :mod:`email.encoders` pour une liste des encodeurs intégrés." #: library/email.mime.rst:167 msgid "*_params* are passed straight through to the base class constructor." @@ -259,14 +269,14 @@ msgstr "Module : :mod:`email.mime.audio`" #: library/email.mime.rst:146 msgid "" -"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" -"`MIMEAudio` class is used to create MIME message objects of major type :" -"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. " -"If this data can be decoded as au, wav, aiff, or aifc, then the subtype will " -"be automatically included in the :mailheader:`Content-Type` header. " -"Otherwise you can explicitly specify the audio subtype via the *_subtype* " -"argument. If the minor type could not be guessed and *_subtype* was not " -"given, then :exc:`TypeError` is raised." +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, " +"the :class:`MIMEAudio` class is used to create MIME message objects of major " +"type :mimetype:`audio`. *_audiodata* contains the bytes for the raw audio " +"data. If this data can be decoded as au, wav, aiff, or aifc, then the " +"subtype will be automatically included in the :mailheader:`Content-Type` " +"header. Otherwise you can explicitly specify the audio subtype via the " +"*_subtype* argument. If the minor type could not be guessed and *_subtype* " +"was not given, then :exc:`TypeError` is raised." msgstr "" "Sous-classe de :class:`~email.mime.nonmultipart.MIMENonMultipart`, la " "classe :class:`MIMEAudio` est utilisée pour créer des objets de message MIME " @@ -282,22 +292,23 @@ msgstr "" msgid "" "Optional *_encoder* is a callable (i.e. function) which will perform the " "actual encoding of the audio data for transport. This callable takes one " -"argument, which is the :class:`MIMEAudio` instance. It should use :meth:" -"`~email.message.Message.get_payload` and :meth:`~email.message.Message." -"set_payload` to change the payload to encoded form. It should also add any :" -"mailheader:`Content-Transfer-Encoding` or other headers to the message " -"object as necessary. The default encoding is base64. See the :mod:`email." -"encoders` module for a list of the built-in encoders." +"argument, which is the :class:`MIMEAudio` instance. It should " +"use :meth:`~email.message.Message.get_payload` " +"and :meth:`~email.message.Message.set_payload` to change the payload to " +"encoded form. It should also add any :mailheader:`Content-Transfer-" +"Encoding` or other headers to the message object as necessary. The default " +"encoding is base64. See the :mod:`email.encoders` module for a list of the " +"built-in encoders." msgstr "" "*_encoder* (facultatif) est un appelable (c'est-à-dire une fonction) qui " "effectue le codage réel des données audio pour le transport. Cet appelable " -"prend un argument, qui est l'instance :class:`MIMEAudio`. Il doit utiliser :" -"meth:`~email.message.Message.get_payload` et :meth:`~email.message.Message." -"set_payload` pour modifier la charge utile sous forme codée. Il doit " -"également ajouter n'importe quel :mailheader:`Content-Transfer-Encoding` ou " -"d'autres en-têtes à l'objet message si nécessaire. L'encodage par défaut est " -"base64. Voir le module :mod:`email.encoders` pour une liste des encodeurs " -"intégrés." +"prend un argument, qui est l'instance :class:`MIMEAudio`. Il doit " +"utiliser :meth:`~email.message.Message.get_payload` " +"et :meth:`~email.message.Message.set_payload` pour modifier la charge utile " +"sous forme codée. Il doit également ajouter n'importe " +"quel :mailheader:`Content-Transfer-Encoding` ou d'autres en-têtes à l'objet " +"message si nécessaire. L'encodage par défaut est base64. Voir le " +"module :mod:`email.encoders` pour une liste des encodeurs intégrés." #: library/email.mime.rst:178 msgid "Module: :mod:`email.mime.image`" @@ -305,15 +316,15 @@ msgstr "Module : :mod:`email.mime.image`" #: library/email.mime.rst:180 msgid "" -"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" -"`MIMEImage` class is used to create MIME message objects of major type :" -"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. " -"If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, " -"rast, xbm, bmp, webp, and exr attempted), then the subtype will be " +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, " +"the :class:`MIMEImage` class is used to create MIME message objects of major " +"type :mimetype:`image`. *_imagedata* contains the bytes for the raw image " +"data. If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, " +"pgm, ppm, rast, xbm, bmp, webp, and exr attempted), then the subtype will be " "automatically included in the :mailheader:`Content-Type` header. Otherwise " "you can explicitly specify the image subtype via the *_subtype* argument. If " -"the minor type could not be guessed and *_subtype* was not given, then :exc:" -"`TypeError` is raised." +"the minor type could not be guessed and *_subtype* was not given, " +"then :exc:`TypeError` is raised." msgstr "" "Sous-classe de :class:`~email.mime.nonmultipart.MIMENonMultipart`, la " "classe :class:`MIMEImage` est utilisée pour créer des objets de message MIME " @@ -330,30 +341,31 @@ msgstr "" msgid "" "Optional *_encoder* is a callable (i.e. function) which will perform the " "actual encoding of the image data for transport. This callable takes one " -"argument, which is the :class:`MIMEImage` instance. It should use :meth:" -"`~email.message.Message.get_payload` and :meth:`~email.message.Message." -"set_payload` to change the payload to encoded form. It should also add any :" -"mailheader:`Content-Transfer-Encoding` or other headers to the message " -"object as necessary. The default encoding is base64. See the :mod:`email." -"encoders` module for a list of the built-in encoders." +"argument, which is the :class:`MIMEImage` instance. It should " +"use :meth:`~email.message.Message.get_payload` " +"and :meth:`~email.message.Message.set_payload` to change the payload to " +"encoded form. It should also add any :mailheader:`Content-Transfer-" +"Encoding` or other headers to the message object as necessary. The default " +"encoding is base64. See the :mod:`email.encoders` module for a list of the " +"built-in encoders." msgstr "" "*_encoder* (facultatif) est un appelable (c'est-à-dire une fonction) qui " "effectue le codage réel des données d'image pour le transport. Cet appelable " -"prend un argument, qui est l'instance :class:`MIMEImage`. Il doit utiliser :" -"meth:`~email.message.Message.get_payload` et :meth:`~email.message.Message." -"set_payload` pour modifier la charge utile sous forme codée. Il doit " -"également ajouter n'importe quel :mailheader:`Content-Transfer-Encoding` ou " -"d'autres en-têtes à l'objet message si nécessaire. L'encodage par défaut est " -"base64. Voir le module :mod:`email.encoders` pour une liste des encodeurs " -"intégrés." +"prend un argument, qui est l'instance :class:`MIMEImage`. Il doit " +"utiliser :meth:`~email.message.Message.get_payload` " +"et :meth:`~email.message.Message.set_payload` pour modifier la charge utile " +"sous forme codée. Il doit également ajouter n'importe " +"quel :mailheader:`Content-Transfer-Encoding` ou d'autres en-têtes à l'objet " +"message si nécessaire. L'encodage par défaut est base64. Voir le " +"module :mod:`email.encoders` pour une liste des encodeurs intégrés." #: library/email.mime.rst:202 msgid "" -"*_params* are passed straight through to the :class:`~email.mime.base." -"MIMEBase` constructor." +"*_params* are passed straight through to " +"the :class:`~email.mime.base.MIMEBase` constructor." msgstr "" -"Les *_params* sont transmis directement au constructeur :class:`~email.mime." -"base.MIMEBase`." +"Les *_params* sont transmis directement au " +"constructeur :class:`~email.mime.base.MIMEBase`." #: library/email.mime.rst:212 msgid "Module: :mod:`email.mime.message`" @@ -361,11 +373,11 @@ msgstr "Module : :mod:`email.mime.message`" #: library/email.mime.rst:214 msgid "" -"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" -"`MIMEMessage` class is used to create MIME objects of main type :mimetype:" -"`message`. *_msg* is used as the payload, and must be an instance of class :" -"class:`~email.message.Message` (or a subclass thereof), otherwise a :exc:" -"`TypeError` is raised." +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, " +"the :class:`MIMEMessage` class is used to create MIME objects of main " +"type :mimetype:`message`. *_msg* is used as the payload, and must be an " +"instance of class :class:`~email.message.Message` (or a subclass thereof), " +"otherwise a :exc:`TypeError` is raised." msgstr "" "Sous-classe de :class:`~email.mime.nonmultipart.MIMENonMultipart`, la " "classe :class:`MIMEMessage` est utilisée pour créer des objets MIME de type " @@ -375,11 +387,11 @@ msgstr "" #: library/email.mime.rst:220 msgid "" -"Optional *_subtype* sets the subtype of the message; it defaults to :" -"mimetype:`rfc822`." +"Optional *_subtype* sets the subtype of the message; it defaults " +"to :mimetype:`rfc822`." msgstr "" -"L'option *_subtype* définit le sous-type du message ; par défaut c'est :" -"mimetype:`rfc822`." +"L'option *_subtype* définit le sous-type du message ; par défaut " +"c'est :mimetype:`rfc822`." #: library/email.mime.rst:232 msgid "Module: :mod:`email.mime.text`" @@ -387,15 +399,15 @@ msgstr "Module : :mod:`email.mime.text`" #: library/email.mime.rst:234 msgid "" -"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" -"`MIMEText` class is used to create MIME objects of major type :mimetype:" -"`text`. *_text* is the string for the payload. *_subtype* is the minor type " -"and defaults to :mimetype:`plain`. *_charset* is the character set of the " -"text and is passed as an argument to the :class:`~email.mime.nonmultipart." -"MIMENonMultipart` constructor; it defaults to ``us-ascii`` if the string " -"contains only ``ascii`` code points, and ``utf-8`` otherwise. The " -"*_charset* parameter accepts either a string or a :class:`~email.charset." -"Charset` instance." +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, " +"the :class:`MIMEText` class is used to create MIME objects of major " +"type :mimetype:`text`. *_text* is the string for the payload. *_subtype* is " +"the minor type and defaults to :mimetype:`plain`. *_charset* is the " +"character set of the text and is passed as an argument to " +"the :class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it " +"defaults to ``us-ascii`` if the string contains only ``ascii`` code points, " +"and ``utf-8`` otherwise. The *_charset* parameter accepts either a string " +"or a :class:`~email.charset.Charset` instance." msgstr "" "Sous-classe de :class:`~email.mime.nonmultipart.MIMENonMultipart`, la " "classe :class:`MIMEText` est utilisée pour créer des objets MIME de type " diff --git a/library/email.parser.po b/library/email.parser.po index d8a9c678c..637bef9fb 100644 --- a/library/email.parser.po +++ b/library/email.parser.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-01-18 22:43+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -34,12 +34,13 @@ msgid "" "message." msgstr "" "Les instances de messages peuvent être créées de deux façons : elles peuvent " -"être créées de toutes pièces en créant un objet :class:`~email.message." -"message.EmailMessage`, en ajoutant des en-têtes en utilisant l'interface de " -"dictionnaire, et en ajoutant un ou plusieurs corps de message en utilisant :" -"meth:`~email.message.message.EmailMessage.set_content` et les méthodes " -"associées, ou elles peuvent être créées en analysant une représentation " -"sérialisée de l'e-mail." +"être créées de toutes pièces en créant un " +"objet :class:`~email.message.message.EmailMessage`, en ajoutant des en-têtes " +"en utilisant l'interface de dictionnaire, et en ajoutant un ou plusieurs " +"corps de message en " +"utilisant :meth:`~email.message.message.EmailMessage.set_content` et les " +"méthodes associées, ou elles peuvent être créées en analysant une " +"représentation sérialisée de l'e-mail." #: library/email.parser.rst:18 msgid "" @@ -49,65 +50,66 @@ msgid "" "root :class:`~email.message.EmailMessage` instance of the object structure. " "For simple, non-MIME messages the payload of this root object will likely be " "a string containing the text of the message. For MIME messages, the root " -"object will return ``True`` from its :meth:`~email.message.EmailMessage." -"is_multipart` method, and the subparts can be accessed via the payload " -"manipulation methods, such as :meth:`~email.message.EmailMessage.get_body`, :" -"meth:`~email.message.EmailMessage.iter_parts`, and :meth:`~email.message." -"EmailMessage.walk`." +"object will return ``True`` from " +"its :meth:`~email.message.EmailMessage.is_multipart` method, and the " +"subparts can be accessed via the payload manipulation methods, such " +"as :meth:`~email.message.EmailMessage.get_body`, :meth:`~email.message.EmailMessage.iter_parts`, " +"and :meth:`~email.message.EmailMessage.walk`." msgstr "" "Le paquet :mod:`email` fournit un analyseur standard qui comprend la plupart " "des structures de documents de courrier électronique, y compris les " "documents MIME. Vous pouvez passer à l'analyseur un objet *bytes*, chaîne ou " -"fichier, et l'analyseur vous renverra l'instance racine :class:`~email." -"message.EmailMessage` de la structure de l'objet. Pour les messages simples " -"non MIME, la charge utile de cet objet racine sera probablement une chaîne " -"contenant le texte du message. Pour les messages MIME, la méthode :meth:" -"`~email.message.EmailMessage.is_multipart` de l'objet racine renvoie " -"``True``, et les sous-parties sont accessibles via les méthodes de " -"manipulation de la charge utile, telles que :meth:`~ email.message." -"EmailMessage.get_body`, :meth:`~email.message.EmailMessage.iter_parts` et :" -"meth:`~email.message.EmailMessage.walk`." +"fichier, et l'analyseur vous renverra l'instance " +"racine :class:`~email.message.EmailMessage` de la structure de l'objet. Pour " +"les messages simples non MIME, la charge utile de cet objet racine sera " +"probablement une chaîne contenant le texte du message. Pour les messages " +"MIME, la méthode :meth:`~email.message.EmailMessage.is_multipart` de l'objet " +"racine renvoie ``True``, et les sous-parties sont accessibles via les " +"méthodes de manipulation de la charge utile, telles que :meth:`~ " +"email.message.EmailMessage.get_body`, :meth:`~email.message.EmailMessage.iter_parts` " +"et :meth:`~email.message.EmailMessage.walk`." #: library/email.parser.rst:30 msgid "" -"There are actually two parser interfaces available for use, the :class:" -"`Parser` API and the incremental :class:`FeedParser` API. The :class:" -"`Parser` API is most useful if you have the entire text of the message in " -"memory, or if the entire message lives in a file on the file system. :class:" -"`FeedParser` is more appropriate when you are reading the message from a " -"stream which might block waiting for more input (such as reading an email " -"message from a socket). The :class:`FeedParser` can consume and parse the " -"message incrementally, and only returns the root object when you close the " -"parser." -msgstr "" -"Il existe en fait deux interfaces d'analyseur disponibles, l'API :class:" -"`Parser` et l'API incrémentale :class:`FeedParser`. L'API :class:`Parser` " -"est plus utile si vous avez le texte entier du message en mémoire ou si le " -"message entier réside dans un fichier sur le système de fichiers. :class:" -"`FeedParser` est plus appropriée lorsque vous lisez le message à partir d'un " -"flux qui peut bloquer en attente d'une entrée supplémentaire (comme la " -"lecture d'un message électronique à partir d'un connecteur réseau). :class:" -"`FeedParser` peut consommer et analyser le message de manière incrémentielle " -"et ne renvoie l'objet racine que lorsque vous fermez l'analyseur." +"There are actually two parser interfaces available for use, " +"the :class:`Parser` API and the incremental :class:`FeedParser` API. " +"The :class:`Parser` API is most useful if you have the entire text of the " +"message in memory, or if the entire message lives in a file on the file " +"system. :class:`FeedParser` is more appropriate when you are reading the " +"message from a stream which might block waiting for more input (such as " +"reading an email message from a socket). The :class:`FeedParser` can " +"consume and parse the message incrementally, and only returns the root " +"object when you close the parser." +msgstr "" +"Il existe en fait deux interfaces d'analyseur disponibles, " +"l'API :class:`Parser` et l'API incrémentale :class:`FeedParser`. " +"L'API :class:`Parser` est plus utile si vous avez le texte entier du message " +"en mémoire ou si le message entier réside dans un fichier sur le système de " +"fichiers. :class:`FeedParser` est plus appropriée lorsque vous lisez le " +"message à partir d'un flux qui peut bloquer en attente d'une entrée " +"supplémentaire (comme la lecture d'un message électronique à partir d'un " +"connecteur réseau). :class:`FeedParser` peut consommer et analyser le " +"message de manière incrémentielle et ne renvoie l'objet racine que lorsque " +"vous fermez l'analyseur." #: library/email.parser.rst:39 #, fuzzy msgid "" "Note that the parser can be extended in limited ways, and of course you can " "implement your own parser completely from scratch. All of the logic that " -"connects the :mod:`email` package's bundled parser and the :class:`~email." -"message.EmailMessage` class is embodied in the :class:`~email.policy.Policy` " -"class, so a custom parser can create message object trees any way it finds " -"necessary by implementing custom versions of the appropriate :class:`!" -"Policy` methods." +"connects the :mod:`email` package's bundled parser and " +"the :class:`~email.message.EmailMessage` class is embodied in " +"the :class:`~email.policy.Policy` class, so a custom parser can create " +"message object trees any way it finds necessary by implementing custom " +"versions of the appropriate :class:`!Policy` methods." msgstr "" "Notez que l'analyseur peut être étendu de manière limitée et, bien sûr, vous " "pouvez implémenter votre propre analyseur complètement à partir de zéro. " "Toute la logique qui relie l'analyseur intégré au paquet :mod:`email` et la " -"classe :class:`~email.message.EmailMessage` est incarnée dans la classe :mod:" -"`policy`, de sorte qu'un analyseur personnalisé peut créer des arborescences " -"d'objet message comme il le juge nécessaire en implémentant des versions " -"personnalisées des méthodes :mod:`policy` appropriées." +"classe :class:`~email.message.EmailMessage` est incarnée dans la " +"classe :mod:`policy`, de sorte qu'un analyseur personnalisé peut créer des " +"arborescences d'objet message comme il le juge nécessaire en implémentant " +"des versions personnalisées des méthodes :mod:`policy` appropriées." #: library/email.parser.rst:49 msgid "FeedParser API" @@ -118,21 +120,21 @@ msgid "" "The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` " "module, provides an API that is conducive to incremental parsing of email " "messages, such as would be necessary when reading the text of an email " -"message from a source that can block (such as a socket). The :class:" -"`BytesFeedParser` can of course be used to parse an email message fully " -"contained in a :term:`bytes-like object`, string, or file, but the :class:" -"`BytesParser` API may be more convenient for such use cases. The semantics " -"and results of the two parser APIs are identical." +"message from a source that can block (such as a socket). " +"The :class:`BytesFeedParser` can of course be used to parse an email message " +"fully contained in a :term:`bytes-like object`, string, or file, but " +"the :class:`BytesParser` API may be more convenient for such use cases. The " +"semantics and results of the two parser APIs are identical." msgstr "" ":class:`BytesFeedParser`, importée du module :mod:`email.feedparser`, " "fournit une API propice à l'analyse incrémentielle des messages " "électroniques, adaptée à la lecture du texte d'un message électronique à " -"partir d'une source qui peut bloquer (comme un connecteur). :class:" -"`BytesFeedParser` peut bien sûr être utilisée pour analyser un message " -"électronique entièrement contenu dans un :term:`objet octets-compatible " -"`, une chaîne ou un fichier, mais l'API :class:" -"`BytesParser` peut être plus pratique dans ces utilisations. La sémantique " -"et les résultats des deux API d'analyseurs sont identiques." +"partir d'une source qui peut bloquer (comme un " +"connecteur). :class:`BytesFeedParser` peut bien sûr être utilisée pour " +"analyser un message électronique entièrement contenu dans un :term:`objet " +"octets-compatible `, une chaîne ou un fichier, mais " +"l'API :class:`BytesParser` peut être plus pratique dans ces utilisations. La " +"sémantique et les résultats des deux API d'analyseurs sont identiques." #: library/email.parser.rst:60 msgid "" @@ -141,21 +143,21 @@ msgid "" "to retrieve the root message object. The :class:`BytesFeedParser` is " "extremely accurate when parsing standards-compliant messages, and it does a " "very good job of parsing non-compliant messages, providing information about " -"how a message was deemed broken. It will populate a message object's :attr:" -"`~email.message.EmailMessage.defects` attribute with a list of any problems " -"it found in a message. See the :mod:`email.errors` module for the list of " -"defects that it can find." +"how a message was deemed broken. It will populate a message " +"object's :attr:`~email.message.EmailMessage.defects` attribute with a list " +"of any problems it found in a message. See the :mod:`email.errors` module " +"for the list of defects that it can find." msgstr "" "L'API de :class:`BytesFeedParser` est simple ; vous créez une instance, " "l'alimentez d'une suite d'octets jusqu'à ce qu'il n'y en ait plus pour " -"l'alimenter, puis fermez l'analyseur pour récupérer l'objet message racine. :" -"class:`BytesFeedParser` est extrêmement précise lors de l'analyse des " -"messages conformes aux normes, et elle fait un très bon travail d'analyse " -"des messages non conformes, fournissant des informations sur ce qu'elle " -"considère comme non approprié dans un message. Elle remplit l'attribut :attr:" -"`~email.message.EmailMessage.defects` d'un objet message avec une liste de " -"tous les problèmes trouvés dans un message. Voir le module :mod:`email." -"errors` pour la liste des défauts qu'elle peut trouver." +"l'alimenter, puis fermez l'analyseur pour récupérer l'objet message " +"racine. :class:`BytesFeedParser` est extrêmement précise lors de l'analyse " +"des messages conformes aux normes, et elle fait un très bon travail " +"d'analyse des messages non conformes, fournissant des informations sur ce " +"qu'elle considère comme non approprié dans un message. Elle remplit " +"l'attribut :attr:`~email.message.EmailMessage.defects` d'un objet message " +"avec une liste de tous les problèmes trouvés dans un message. Voir le " +"module :mod:`email.errors` pour la liste des défauts qu'elle peut trouver." #: library/email.parser.rst:70 msgid "Here is the API for the :class:`BytesFeedParser`:" @@ -164,34 +166,35 @@ msgstr "Voici l’API de :class:`BytesFeedParser` :" #: library/email.parser.rst:75 msgid "" "Create a :class:`BytesFeedParser` instance. Optional *_factory* is a no-" -"argument callable; if not specified use the :attr:`~email.policy.Policy." -"message_factory` from the *policy*. Call *_factory* whenever a new message " -"object is needed." +"argument callable; if not specified use " +"the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call " +"*_factory* whenever a new message object is needed." msgstr "" "Crée une instance :class:`BytesFeedParser`. *_factory* est un appelable " -"facultatif sans argument ; s'il n'est pas spécifié, elle utilise la :attr:" -"`~email.policy.Policy.message_factory` de la *policy*. Elle appelle " +"facultatif sans argument ; s'il n'est pas spécifié, elle utilise " +"la :attr:`~email.policy.Policy.message_factory` de la *policy*. Elle appelle " "*_factory* chaque fois qu'un nouvel objet de message est nécessaire." #: library/email.parser.rst:80 msgid "" "If *policy* is specified use the rules it specifies to update the " -"representation of the message. If *policy* is not set, use the :class:" -"`compat32 ` policy, which maintains backward " -"compatibility with the Python 3.2 version of the email package and provides :" -"class:`~email.message.Message` as the default factory. All other policies " -"provide :class:`~email.message.EmailMessage` as the default *_factory*. For " -"more information on what else *policy* controls, see the :mod:`~email." -"policy` documentation." +"representation of the message. If *policy* is not set, use " +"the :class:`compat32 ` policy, which maintains " +"backward compatibility with the Python 3.2 version of the email package and " +"provides :class:`~email.message.Message` as the default factory. All other " +"policies provide :class:`~email.message.EmailMessage` as the default " +"*_factory*. For more information on what else *policy* controls, see " +"the :mod:`~email.policy` documentation." msgstr "" "Si *policy* est spécifiée, elle utilise les règles spécifiées pour mettre à " "jour la représentation du message. Si *policy* n'est pas définie, elle " "utilise la stratégie :class:`compat32 `, qui " "maintient la rétrocompatibilité avec la version Python 3.2 du paquet de " "messagerie et fournit :class:`~email.message.Message` comme usine par " -"défaut. Toutes les autres stratégies fournissent :class:`~email.message." -"EmailMessage` comme *_factory* par défaut. Pour plus d'informations sur ce " -"que *policy* régit, consultez la documentation :mod:`~email.policy`." +"défaut. Toutes les autres stratégies " +"fournissent :class:`~email.message.EmailMessage` comme *_factory* par " +"défaut. Pour plus d'informations sur ce que *policy* régit, consultez la " +"documentation :mod:`~email.policy`." #: library/email.parser.rst:145 msgid "" @@ -237,46 +240,49 @@ msgstr "" "l'appel de cette méthode n'est pas défini." #: library/email.parser.rst:116 +#, fuzzy msgid "" -"Works like :class:`BytesFeedParser` except that the input to the :meth:" -"`~BytesFeedParser.feed` method must be a string. This is of limited " -"utility, since the only way for such a message to be valid is for it to " -"contain only ASCII text or, if :attr:`~email.policy.Policy.utf8` is " +"Works like :class:`BytesFeedParser` except that the input to " +"the :meth:`~BytesFeedParser.feed` method must be a string. This is of " +"limited utility, since the only way for such a message to be valid is for it " +"to contain only ASCII text or, if :attr:`~email.policy.EmailPolicy.utf8` is " "``True``, no binary attachments." msgstr "" -"Fonctionne comme :class:`BytesFeedParser` sauf que l'entrée de la méthode :" -"meth:`~BytesFeedParser.feed` doit être une chaîne. Ceci est d'une utilité " -"limitée, car la seule façon pour qu'un tel message soit valide est qu'il ne " -"contienne que du texte ASCII ou, si :attr:`~email.policy.Policy.utf8` vaut " -"``True``, aucun binaire en pièce jointe." +"Fonctionne comme :class:`BytesFeedParser` sauf que l'entrée de la " +"méthode :meth:`~BytesFeedParser.feed` doit être une chaîne. Ceci est d'une " +"utilité limitée, car la seule façon pour qu'un tel message soit valide est " +"qu'il ne contienne que du texte ASCII ou, " +"si :attr:`~email.policy.Policy.utf8` vaut ``True``, aucun binaire en pièce " +"jointe." #: library/email.parser.rst:126 msgid "Parser API" msgstr "API de *Parser*" #: library/email.parser.rst:128 +#, fuzzy msgid "" -"The :class:`BytesParser` class, imported from the :mod:`email.parser` " +"The :class:`BytesParser` class, imported from the :mod:`!email.parser` " "module, provides an API that can be used to parse a message when the " "complete contents of the message are available in a :term:`bytes-like " -"object` or file. The :mod:`email.parser` module also provides :class:" -"`Parser` for parsing strings, and header-only parsers, :class:" -"`BytesHeaderParser` and :class:`HeaderParser`, which can be used if you're " -"only interested in the headers of the message. :class:`BytesHeaderParser` " -"and :class:`HeaderParser` can be much faster in these situations, since they " -"do not attempt to parse the message body, instead setting the payload to the " -"raw body." +"object` or file. The :mod:`!email.parser` module also " +"provides :class:`Parser` for parsing strings, and header-only " +"parsers, :class:`BytesHeaderParser` and :class:`HeaderParser`, which can be " +"used if you're only interested in the headers of the " +"message. :class:`BytesHeaderParser` and :class:`HeaderParser` can be much " +"faster in these situations, since they do not attempt to parse the message " +"body, instead setting the payload to the raw body." msgstr "" "La classe :class:`BytesParser`, importée du module :mod:`email.parser`, " "fournit une API qui peut être utilisée pour analyser un message lorsque le " "contenu complet du message est disponible dans un :term:`objet octets-" "compatible ` ou un fichier. Le module :mod:`email.parser` " "fournit également :class:`Parser` pour l'analyse des chaînes et des " -"analyseurs d'en-tête uniquement, :class:`BytesHeaderParser` et :class:" -"`HeaderParser`, qui peuvent être utilisés si vous ne vous intéressez qu'aux " -"en-têtes du message. :class:`BytesHeaderParser` et :class:`HeaderParser` " -"peuvent être beaucoup plus rapides dans ces situations, car ils n'essaient " -"pas d'analyser le corps du message." +"analyseurs d'en-tête uniquement, :class:`BytesHeaderParser` " +"et :class:`HeaderParser`, qui peuvent être utilisés si vous ne vous " +"intéressez qu'aux en-têtes du message. :class:`BytesHeaderParser` " +"et :class:`HeaderParser` peuvent être beaucoup plus rapides dans ces " +"situations, car ils n'essaient pas d'analyser le corps du message." #: library/email.parser.rst:141 msgid "" @@ -301,24 +307,27 @@ msgid "*_class* defaults to the policy ``message_factory``." msgstr "*_class* utilise par défaut la politique ``message_factory``." #: library/email.parser.rst:156 +#, fuzzy msgid "" "Read all the data from the binary file-like object *fp*, parse the resulting " -"bytes, and return the message object. *fp* must support both the :meth:`~io." -"IOBase.readline` and the :meth:`~io.IOBase.read` methods." +"bytes, and return the message object. *fp* must support both " +"the :meth:`~io.IOBase.readline` and the :meth:`~io.BufferedIOBase.read` " +"methods." msgstr "" "Lit toutes les données de l'objet de type fichier binaire *fp*, analyse les " "octets résultants et renvoie l'objet message. *fp* doit prendre en charge " "les méthodes :meth:`~io.IOBase.readline` et :meth:`~io.IOBase.read`." #: library/email.parser.rst:161 +#, fuzzy msgid "" "The bytes contained in *fp* must be formatted as a block of :rfc:`5322` (or, " -"if :attr:`~email.policy.Policy.utf8` is ``True``, :rfc:`6532`) style headers " -"and header continuation lines, optionally preceded by an envelope header. " -"The header block is terminated either by the end of the data or by a blank " -"line. Following the header block is the body of the message (which may " -"contain MIME-encoded subparts, including subparts with a :mailheader:" -"`Content-Transfer-Encoding` of ``8bit``)." +"if :attr:`~email.policy.EmailPolicy.utf8` is ``True``, :rfc:`6532`) style " +"headers and header continuation lines, optionally preceded by an envelope " +"header. The header block is terminated either by the end of the data or by " +"a blank line. Following the header block is the body of the message (which " +"may contain MIME-encoded subparts, including subparts with " +"a :mailheader:`Content-Transfer-Encoding` of ``8bit``)." msgstr "" "Les octets contenus dans *fp* doivent être formatés comme un bloc d'en-têtes " "de style conforme à la :rfc:`5322` (ou, si :attr:`~email.policy.Policy.utf8` " @@ -341,15 +350,15 @@ msgstr "" #: library/email.parser.rst:176 msgid "" "Similar to the :meth:`parse` method, except it takes a :term:`bytes-like " -"object` instead of a file-like object. Calling this method on a :term:" -"`bytes-like object` is equivalent to wrapping *bytes* in a :class:`~io." -"BytesIO` instance first and calling :meth:`parse`." +"object` instead of a file-like object. Calling this method on " +"a :term:`bytes-like object` is equivalent to wrapping *bytes* in " +"a :class:`~io.BytesIO` instance first and calling :meth:`parse`." msgstr "" "Semblable à la méthode :meth:`parse`, sauf qu'elle prend un :term:`objet " "octets-compatible ` au lieu d'un objet de type fichier. " "Appeler cette méthode sur un :term:`objet octets-compatible ` équivaut à envelopper *bytes* dans une instance :class:`~io." -"BytesIO` d'abord et à appeler :meth:`parse`." +"object>` équivaut à envelopper *bytes* dans une " +"instance :class:`~io.BytesIO` d'abord et à appeler :meth:`parse`." #: library/email.parser.rst:221 msgid "Optional *headersonly* is as with the :meth:`parse` method." @@ -387,23 +396,23 @@ msgid "" msgstr "" "Lit toutes les données de l'objet de type fichier en mode texte *fp*, " "analyse le texte résultant et renvoie l'objet message racine. *fp* doit " -"prendre en charge les méthodes :meth:`~io.TextIOBase.readline` et :meth:`~io." -"TextIOBase.read` sur les objets de type fichier." +"prendre en charge les méthodes :meth:`~io.TextIOBase.readline` " +"et :meth:`~io.TextIOBase.read` sur les objets de type fichier." #: library/email.parser.rst:210 msgid "" -"Other than the text mode requirement, this method operates like :meth:" -"`BytesParser.parse`." +"Other than the text mode requirement, this method operates " +"like :meth:`BytesParser.parse`." msgstr "" -"Outre l'exigence du mode texte, cette méthode fonctionne comme :meth:" -"`BytesParser.parse`." +"Outre l'exigence du mode texte, cette méthode fonctionne " +"comme :meth:`BytesParser.parse`." #: library/email.parser.rst:216 msgid "" "Similar to the :meth:`parse` method, except it takes a string object instead " "of a file-like object. Calling this method on a string is equivalent to " -"wrapping *text* in a :class:`~io.StringIO` instance first and calling :meth:" -"`parse`." +"wrapping *text* in a :class:`~io.StringIO` instance first and " +"calling :meth:`parse`." msgstr "" "Similaire à la méthode :meth:`parse`, sauf qu'elle prend un objet chaîne au " "lieu d'un objet de type fichier. Appeler cette méthode sur une chaîne " @@ -436,9 +445,10 @@ msgid "" "class constructor." msgstr "" "Renvoie une structure d'objet message à partir d'un :term:`objet octets-" -"compatible `. C'est équivalent à ``BytesParser()." -"parsebytes(s)``. *_class* et *policy* (facultatifs) sont interprétés comme " -"pour le constructeur de classe :class:`~email.parser.BytesParser`." +"compatible `. C'est équivalent à " +"``BytesParser().parsebytes(s)``. *_class* et *policy* (facultatifs) sont " +"interprétés comme pour le constructeur de " +"classe :class:`~email.parser.BytesParser`." #: library/email.parser.rst:252 msgid "" @@ -448,9 +458,9 @@ msgid "" "class constructor." msgstr "" "Renvoie une arborescence d'objets message à partir d'un :term:`objet fichier " -"` binaire ouvert. C'est équivalent à ``BytesParser()." -"parse(fp)``. *_class* et *policy* sont interprétés comme pour le " -"constructeur de classe :class:`~email.parser.BytesParser`." +"` binaire ouvert. C'est équivalent à " +"``BytesParser().parse(fp)``. *_class* et *policy* sont interprétés comme " +"pour le constructeur de classe :class:`~email.parser.BytesParser`." #: library/email.parser.rst:264 msgid "" @@ -468,9 +478,9 @@ msgid "" "This is equivalent to ``Parser().parse(fp)``. *_class* and *policy* are " "interpreted as with the :class:`~email.parser.Parser` class constructor." msgstr "" -"Renvoie une arborescence de structures d'objets messages à partir d'un :term:" -"`objet fichier ` ouvert. C'est équivalent à ``Parser()." -"parse(fp)``. *_class* et *policy* sont interprétés comme avec le " +"Renvoie une arborescence de structures d'objets messages à partir " +"d'un :term:`objet fichier ` ouvert. C'est équivalent à " +"``Parser().parse(fp)``. *_class* et *policy* sont interprétés comme avec le " "constructeur de classe :class:`~email.parser.Parser`." #: library/email.parser.rst:283 @@ -493,61 +503,65 @@ msgstr "Voici des remarques sur la sémantique d'analyse :" msgid "" "Most non-\\ :mimetype:`multipart` type messages are parsed as a single " "message object with a string payload. These objects will return ``False`` " -"for :meth:`~email.message.EmailMessage.is_multipart`, and :meth:`~email." -"message.EmailMessage.iter_parts` will yield an empty list." +"for :meth:`~email.message.EmailMessage.is_multipart`, " +"and :meth:`~email.message.EmailMessage.iter_parts` will yield an empty list." msgstr "" "La plupart des messages de type non-\\ :mimetype:`multipart` sont analysés " "comme un seul objet de message avec une charge utile de type chaîne. Ces " -"objets renvoient ``False`` pour :meth:`~email.message.EmailMessage." -"is_multipart` et :meth:`~email.message.EmailMessage.iter_parts` donne une " -"liste vide." +"objets renvoient ``False`` " +"pour :meth:`~email.message.EmailMessage.is_multipart` " +"et :meth:`~email.message.EmailMessage.iter_parts` donne une liste vide." #: library/email.parser.rst:300 msgid "" "All :mimetype:`multipart` type messages will be parsed as a container " "message object with a list of sub-message objects for their payload. The " -"outer container message will return ``True`` for :meth:`~email.message." -"EmailMessage.is_multipart`, and :meth:`~email.message.EmailMessage." -"iter_parts` will yield a list of subparts." +"outer container message will return ``True`` " +"for :meth:`~email.message.EmailMessage.is_multipart`, " +"and :meth:`~email.message.EmailMessage.iter_parts` will yield a list of " +"subparts." msgstr "" "Tous les messages de type :mimetype:`multipart` sont analysés comme un objet " "de message conteneur avec une liste d'objets de sous-messages pour leur " -"charge utile. Le message du conteneur externe renvoie ``True`` pour :meth:" -"`~email.message.EmailMessage.is_multipart` et :meth:`~email.message." -"EmailMessage.iter_parts` donne une liste de sous-parties." +"charge utile. Le message du conteneur externe renvoie ``True`` " +"pour :meth:`~email.message.EmailMessage.is_multipart` " +"et :meth:`~email.message.EmailMessage.iter_parts` donne une liste de sous-" +"parties." #: library/email.parser.rst:306 msgid "" -"Most messages with a content type of :mimetype:`message/\\*` (such as :" -"mimetype:`message/delivery-status` and :mimetype:`message/rfc822`) will also " -"be parsed as container object containing a list payload of length 1. Their :" -"meth:`~email.message.EmailMessage.is_multipart` method will return ``True``. " -"The single element yielded by :meth:`~email.message.EmailMessage.iter_parts` " -"will be a sub-message object." +"Most messages with a content type of :mimetype:`message/\\*` (such " +"as :mimetype:`message/delivery-status` and :mimetype:`message/rfc822`) will " +"also be parsed as container object containing a list payload of length 1. " +"Their :meth:`~email.message.EmailMessage.is_multipart` method will return " +"``True``. The single element yielded " +"by :meth:`~email.message.EmailMessage.iter_parts` will be a sub-message " +"object." msgstr "" "La plupart des messages avec un type de contenu de :mimetype:`message/\\*` " "(tels que :mimetype:`message/delivery-status` et :mimetype:`message/rfc822`) " "sont également analysés en tant qu'objet conteneur contenant une charge " -"utile de type « liste de longueur 1 ». Leur méthode :meth:`~email.message." -"EmailMessage.is_multipart` renvoie ``True``. L'élément unique généré par :" -"meth:`~email.message.EmailMessage.iter_parts` est un objet sous-message." +"utile de type « liste de longueur 1 ». Leur " +"méthode :meth:`~email.message.EmailMessage.is_multipart` renvoie ``True``. " +"L'élément unique généré par :meth:`~email.message.EmailMessage.iter_parts` " +"est un objet sous-message." #: library/email.parser.rst:313 msgid "" "Some non-standards-compliant messages may not be internally consistent about " -"their :mimetype:`multipart`\\ -edness. Such messages may have a :mailheader:" -"`Content-Type` header of type :mimetype:`multipart`, but their :meth:`~email." -"message.EmailMessage.is_multipart` method may return ``False``. If such " -"messages were parsed with the :class:`~email.parser.FeedParser`, they will " -"have an instance of the :class:`~email.errors." -"MultipartInvariantViolationDefect` class in their *defects* attribute list. " -"See :mod:`email.errors` for details." +"their :mimetype:`multipart`\\ -edness. Such messages may have " +"a :mailheader:`Content-Type` header of type :mimetype:`multipart`, but " +"their :meth:`~email.message.EmailMessage.is_multipart` method may return " +"``False``. If such messages were parsed with " +"the :class:`~email.parser.FeedParser`, they will have an instance of " +"the :class:`~email.errors.MultipartInvariantViolationDefect` class in their " +"*defects* attribute list. See :mod:`email.errors` for details." msgstr "" "Certains messages non conformes aux normes peuvent ne pas être cohérents en " "interne quant à :mimetype:`multipart`. De tels messages peuvent avoir un en-" "tête :mailheader:`Content-Type` de type :mimetype:`multipart`, mais leur " "méthode :meth:`~email.message.EmailMessage.is_multipart` peut renvoyer " -"``False``. Si de tels messages ont été analysés avec la :class:`~email." -"parser.FeedParser`, ils auront une instance de la classe :class:`~email." -"errors.MultipartInvariantViolationDefect` dans leur liste d'attributs " -"*defects*. Voir :mod:`email.errors` pour plus de détails." +"``False``. Si de tels messages ont été analysés avec " +"la :class:`~email.parser.FeedParser`, ils auront une instance de la " +"classe :class:`~email.errors.MultipartInvariantViolationDefect` dans leur " +"liste d'attributs *defects*. Voir :mod:`email.errors` pour plus de détails." diff --git a/library/email.po b/library/email.po index 6594ca07f..86cb7a8b1 100644 --- a/library/email.po +++ b/library/email.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-09-06 21:25+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,30 +20,30 @@ msgstr "" msgid ":mod:`!email` --- An email and MIME handling package" msgstr ":mod:`email` — Un paquet de gestion des e-mails et MIME" -#: library/email.rst:11 +#: library/email.rst:8 msgid "**Source code:** :source:`Lib/email/__init__.py`" msgstr "**Code source:** :source:`Lib/email/__init__.py`" -#: library/email.rst:15 +#: library/email.rst:12 #, fuzzy msgid "" -"The :mod:`email` package is a library for managing email messages. It is " -"specifically *not* designed to do any sending of email messages to SMTP (:" -"rfc:`2821`), NNTP, or other servers; those are functions of modules such as :" -"mod:`smtplib`. The :mod:`email` package attempts to be as RFC-compliant as " -"possible, supporting :rfc:`5322` and :rfc:`6532`, as well as such MIME-" -"related RFCs as :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, :rfc:`2183`, and :rfc:" -"`2231`." +"The :mod:`!email` package is a library for managing email messages. It is " +"specifically *not* designed to do any sending of email messages to SMTP " +"(:rfc:`2821`), NNTP, or other servers; those are functions of modules such " +"as :mod:`smtplib`. The :mod:`!email` package attempts to be as RFC-" +"compliant as possible, supporting :rfc:`5322` and :rfc:`6532`, as well as " +"such MIME-related RFCs " +"as :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, :rfc:`2183`, and :rfc:`2231`." msgstr "" "Le paquet :mod:`email` est une bibliothèque pour gérer les e-mails. Il est " -"spécifiquement conçu pour ne pas gérer les envois d'e-mails vers SMTP (:rfc:" -"`2821`), NNTP, ou autres serveurs ; ces fonctions sont du ressort " +"spécifiquement conçu pour ne pas gérer les envois d'e-mails vers SMTP " +"(:rfc:`2821`), NNTP, ou autres serveurs ; ces fonctions sont du ressort " "des modules comme :mod:`smtplib` et :mod:`nntplib`. Le paquet :mod:`email` " -"tente de respecter les RFC autant que possible, il gère :rfc:`5322` et :rfc:" -"`6532`, ainsi que les RFCs en rapport avec les MIME comme :rfc:`2045`, :rfc:" -"`2046`, :rfc:`2047`, :rfc:`2183`, et :rfc:`2231`." +"tente de respecter les RFC autant que possible, il gère :rfc:`5322` " +"et :rfc:`6532`, ainsi que les RFCs en rapport avec les MIME " +"comme :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, :rfc:`2183`, et :rfc:`2231`." -#: library/email.rst:23 +#: library/email.rst:20 msgid "" "The overall structure of the email package can be divided into three major " "components, plus a fourth component that controls the behavior of the other " @@ -52,7 +52,7 @@ msgstr "" "Ce paquet peut être divisé entre trois composants majeurs, et un quatrième " "composant qui contrôle le comportement des trois autres." -#: library/email.rst:27 +#: library/email.rst:24 msgid "" "The central component of the package is an \"object model\" that represents " "email messages. An application interacts with the package primarily through " @@ -61,68 +61,70 @@ msgid "" "to construct a new email, or to add or remove email subcomponents that " "themselves use the same object model interface. That is, following the " "nature of email messages and their MIME subcomponents, the email object " -"model is a tree structure of objects that all provide the :class:`~email." -"message.EmailMessage` API." +"model is a tree structure of objects that all provide " +"the :class:`~email.message.EmailMessage` API." msgstr "" "Le composant central du paquet est un \"modèle d'objet\" qui représente les " "messages. Une application interagit avec le paquet, dans un premier temps, à " -"travers l'interface de modèle d'objet définie dans le sous-module :mod:" -"`~email.message`. L'application peut utiliser cette API pour poser des " -"questions à propos d'un mail existant, pour créer un nouvel e-mail, ou " -"ajouter ou retirer des sous-composants d'e-mail qui utilisent la même " -"interface de modèle d'objet. Suivant la nature des messages et leurs sous-" -"composants MIME, le modèle d'objet d'e-mail est une structure arborescente " -"d'objets qui fournit tout à l'API de :class:`~email.message.EmailMessage`." +"travers l'interface de modèle d'objet définie dans le sous-" +"module :mod:`~email.message`. L'application peut utiliser cette API pour " +"poser des questions à propos d'un mail existant, pour créer un nouvel e-" +"mail, ou ajouter ou retirer des sous-composants d'e-mail qui utilisent la " +"même interface de modèle d'objet. Suivant la nature des messages et leurs " +"sous-composants MIME, le modèle d'objet d'e-mail est une structure " +"arborescente d'objets qui fournit tout à l'API " +"de :class:`~email.message.EmailMessage`." -#: library/email.rst:37 +#: library/email.rst:34 msgid "" "The other two major components of the package are the :mod:`~email.parser` " "and the :mod:`~email.generator`. The parser takes the serialized version of " -"an email message (a stream of bytes) and converts it into a tree of :class:" -"`~email.message.EmailMessage` objects. The generator takes an :class:" -"`~email.message.EmailMessage` and turns it back into a serialized byte " -"stream. (The parser and generator also handle streams of text characters, " -"but this usage is discouraged as it is too easy to end up with messages that " -"are not valid in one way or another.)" +"an email message (a stream of bytes) and converts it into a tree " +"of :class:`~email.message.EmailMessage` objects. The generator takes " +"an :class:`~email.message.EmailMessage` and turns it back into a serialized " +"byte stream. (The parser and generator also handle streams of text " +"characters, but this usage is discouraged as it is too easy to end up with " +"messages that are not valid in one way or another.)" msgstr "" -"Les deux autres composants majeurs de ce paquet sont l'analyseur (:mod:" -"`~email.parser`) et le générateur (:mod:`~email.generator`). L'analyseur " -"prend la version sérialisée d'un e-mail (un flux d'octets) et le convertit " -"en une arborescence d'objets :class:`~email.message.EmailMessage`. Le " -"générateur prend un objet :class:`~email.message.EmailMessage` et le " -"retransforme en un flux d'octets sérialisé (l'analyseur et le générateur " -"gèrent aussi des suites de caractères textuels, mais cette utilisation est " -"déconseillée car il est très facile de finir avec des messages invalides " -"d'une manière ou d'une autre)." +"Les deux autres composants majeurs de ce paquet sont " +"l'analyseur (:mod:`~email.parser`) et le " +"générateur (:mod:`~email.generator`). L'analyseur prend la version " +"sérialisée d'un e-mail (un flux d'octets) et le convertit en une " +"arborescence d'objets :class:`~email.message.EmailMessage`. Le générateur " +"prend un objet :class:`~email.message.EmailMessage` et le retransforme en un " +"flux d'octets sérialisé (l'analyseur et le générateur gèrent aussi des " +"suites de caractères textuels, mais cette utilisation est déconseillée car " +"il est très facile de finir avec des messages invalides d'une manière ou " +"d'une autre)." -#: library/email.rst:46 +#: library/email.rst:43 msgid "" -"The control component is the :mod:`~email.policy` module. Every :class:" -"`~email.message.EmailMessage`, every :mod:`~email.generator`, and every :mod:" -"`~email.parser` has an associated :mod:`~email.policy` object that controls " -"its behavior. Usually an application only needs to specify the policy when " -"an :class:`~email.message.EmailMessage` is created, either by directly " -"instantiating an :class:`~email.message.EmailMessage` to create a new " -"email, or by parsing an input stream using a :mod:`~email.parser`. But the " -"policy can be changed when the message is serialized using a :mod:`~email." -"generator`. This allows, for example, a generic email message to be parsed " -"from disk, but to serialize it using standard SMTP settings when sending it " -"to an email server." +"The control component is the :mod:`~email.policy` module. " +"Every :class:`~email.message.EmailMessage`, every :mod:`~email.generator`, " +"and every :mod:`~email.parser` has an associated :mod:`~email.policy` object " +"that controls its behavior. Usually an application only needs to specify " +"the policy when an :class:`~email.message.EmailMessage` is created, either " +"by directly instantiating an :class:`~email.message.EmailMessage` to create " +"a new email, or by parsing an input stream using a :mod:`~email.parser`. " +"But the policy can be changed when the message is serialized using " +"a :mod:`~email.generator`. This allows, for example, a generic email message " +"to be parsed from disk, but to serialize it using standard SMTP settings " +"when sending it to an email server." msgstr "" -"Le composant de contrôle est le module :mod:`~email.policy`. Chaque :class:" -"`~email.message.EmailMessage`, chaque :mod:`~email.generator` et chaque :mod:" -"`~email.parser` possède un objet associé :mod:`~email.policy` qui contrôle " -"son comportement. Habituellement une application n'a besoin de spécifier la " -"politique que quand un :class:`~email.message.EmailMessage` est créé, soit " -"en instanciant directement un :class:`~email.message.EmailMessage` pour " -"créer un nouvel e-mail, soit lors de l'analyse d'un flux entrant en " -"utilisant un :mod:`~email.parser`. Mais la politique peut être changée quand " -"le message est sérialisé en utilisant un :mod:`~email.generator`. Cela " -"permet, par exemple, d'analyser un message e-mail générique du disque, puis " -"de le sérialiser en utilisant une configuration SMTP standard quand on " -"l'envoie vers un serveur d'e-mail." +"Le composant de contrôle est le module :mod:`~email.policy`. " +"Chaque :class:`~email.message.EmailMessage`, chaque :mod:`~email.generator` " +"et chaque :mod:`~email.parser` possède un objet associé :mod:`~email.policy` " +"qui contrôle son comportement. Habituellement une application n'a besoin de " +"spécifier la politique que quand un :class:`~email.message.EmailMessage` est " +"créé, soit en instanciant directement " +"un :class:`~email.message.EmailMessage` pour créer un nouvel e-mail, soit " +"lors de l'analyse d'un flux entrant en utilisant un :mod:`~email.parser`. " +"Mais la politique peut être changée quand le message est sérialisé en " +"utilisant un :mod:`~email.generator`. Cela permet, par exemple, d'analyser " +"un message e-mail générique du disque, puis de le sérialiser en utilisant " +"une configuration SMTP standard quand on l'envoie vers un serveur d'e-mail." -#: library/email.rst:58 +#: library/email.rst:55 msgid "" "The email package does its best to hide the details of the various governing " "RFCs from the application. Conceptually the application should be able to " @@ -153,14 +155,15 @@ msgstr "" "couramment utilisés dans les logiciels internet modernes (et non uniquement " "les e-mails), les développeurs sont généralement familiers de ce concept." -#: library/email.rst:71 +#: library/email.rst:68 +#, fuzzy msgid "" -"The following sections describe the functionality of the :mod:`email` " +"The following sections describe the functionality of the :mod:`!email` " "package. We start with the :mod:`~email.message` object model, which is the " -"primary interface an application will use, and follow that with the :mod:" -"`~email.parser` and :mod:`~email.generator` components. Then we cover the :" -"mod:`~email.policy` controls, which completes the treatment of the main " -"components of the library." +"primary interface an application will use, and follow that with " +"the :mod:`~email.parser` and :mod:`~email.generator` components. Then we " +"cover the :mod:`~email.policy` controls, which completes the treatment of " +"the main components of the library." msgstr "" "La section suivante décrit les fonctionnalités du paquet :mod:`email`. Nous " "commençons avec le modèle d'objet :mod:`~email.message`, qui est la " @@ -169,28 +172,28 @@ msgstr "" "couvrons les contrôles :mod:`~email.policy`, qui complètent le traitement " "des principaux composants de la bibliothèque." -#: library/email.rst:78 +#: library/email.rst:75 msgid "" "The next three sections cover the exceptions the package may raise and the " "defects (non-compliance with the RFCs) that the :mod:`~email.parser` may " -"detect. Then we cover the :mod:`~email.headerregistry` and the :mod:`~email." -"contentmanager` sub-components, which provide tools for doing more detailed " -"manipulation of headers and payloads, respectively. Both of these " -"components contain features relevant to consuming and producing non-trivial " -"messages, but also document their extensibility APIs, which will be of " -"interest to advanced applications." +"detect. Then we cover the :mod:`~email.headerregistry` and " +"the :mod:`~email.contentmanager` sub-components, which provide tools for " +"doing more detailed manipulation of headers and payloads, respectively. " +"Both of these components contain features relevant to consuming and " +"producing non-trivial messages, but also document their extensibility APIs, " +"which will be of interest to advanced applications." msgstr "" "Les trois prochaines sections couvrent les exceptions que le paquet peut " -"rencontrer et les imperfections (non-respect des RFCs) que le module :mod:" -"`~email.parser` peut détecter. Ensuite nous couvrons les sous-composants :" -"mod:`~email.headerregistry` et :mod:`~email.contentmanager`, qui fournissent " -"des outils pour faire des manipulations plus détaillées des en-têtes et du " -"contenu, respectivement. Les deux composants contiennent des fonctionnalités " -"adaptées pour traiter et produire des messages qui sortent de l'ordinaire, " -"et elles documentent aussi leurs API pour pouvoir les étendre, ce qui ne " -"manquera pas d'intéresser les applications avancées." +"rencontrer et les imperfections (non-respect des RFCs) que le " +"module :mod:`~email.parser` peut détecter. Ensuite nous couvrons les sous-" +"composants :mod:`~email.headerregistry` et :mod:`~email.contentmanager`, qui " +"fournissent des outils pour faire des manipulations plus détaillées des en-" +"têtes et du contenu, respectivement. Les deux composants contiennent des " +"fonctionnalités adaptées pour traiter et produire des messages qui sortent " +"de l'ordinaire, et elles documentent aussi leurs API pour pouvoir les " +"étendre, ce qui ne manquera pas d'intéresser les applications avancées." -#: library/email.rst:87 +#: library/email.rst:84 msgid "" "Following those is a set of examples of using the fundamental parts of the " "APIs covered in the preceding sections." @@ -198,74 +201,77 @@ msgstr "" "Ci-dessous se trouve un ensemble d'exemples d'utilisations des éléments " "fondamentaux des API couvertes dans les sections précédentes." -#: library/email.rst:90 +#: library/email.rst:87 msgid "" "The foregoing represent the modern (unicode friendly) API of the email " -"package. The remaining sections, starting with the :class:`~email.message." -"Message` class, cover the legacy :data:`~email.policy.compat32` API that " -"deals much more directly with the details of how email messages are " -"represented. The :data:`~email.policy.compat32` API does *not* hide the " -"details of the RFCs from the application, but for applications that need to " -"operate at that level, they can be useful tools. This documentation is also " -"relevant for applications that are still using the :mod:`~email.policy." -"compat32` API for backward compatibility reasons." +"package. The remaining sections, starting with " +"the :class:`~email.message.Message` class, cover the " +"legacy :data:`~email.policy.compat32` API that deals much more directly with " +"the details of how email messages are represented. " +"The :data:`~email.policy.compat32` API does *not* hide the details of the " +"RFCs from the application, but for applications that need to operate at that " +"level, they can be useful tools. This documentation is also relevant for " +"applications that are still using the :mod:`~email.policy.compat32` API for " +"backward compatibility reasons." msgstr "" "Ce que nous venons d'aborder constitue l'API moderne (compatible Unicode) du " -"paquet *email*. Les sections restantes, commençant par la classe :class:" -"`~email.message.Message`, couvrent l'API héritée :data:`~email.policy." -"compat32` qui traite beaucoup plus directement des détails sur la manière " -"dont les e-mails sont représentés. L'API :data:`~email.policy.compat32` ne " -"cache *pas* les détails des RFCs à l'application, mais pour les applications " -"qui requièrent d'opérer à ce niveau, elle peut être un outil pratique. Cette " -"documentation est aussi pertinente pour les applications qui utilisent " -"toujours l'API :mod:`~email.policy.compat32` pour des raisons de " -"rétrocompatibilité." +"paquet *email*. Les sections restantes, commençant par la " +"classe :class:`~email.message.Message`, couvrent l'API " +"héritée :data:`~email.policy.compat32` qui traite beaucoup plus directement " +"des détails sur la manière dont les e-mails sont représentés. " +"L'API :data:`~email.policy.compat32` ne cache *pas* les détails des RFCs à " +"l'application, mais pour les applications qui requièrent d'opérer à ce " +"niveau, elle peut être un outil pratique. Cette documentation est aussi " +"pertinente pour les applications qui utilisent toujours " +"l'API :mod:`~email.policy.compat32` pour des raisons de rétrocompatibilité." -#: library/email.rst:100 +#: library/email.rst:97 msgid "" -"Docs reorganized and rewritten to promote the new :class:`~email.message." -"EmailMessage`/:class:`~email.policy.EmailPolicy` API." +"Docs reorganized and rewritten to promote the " +"new :class:`~email.message.EmailMessage`/:class:`~email.policy.EmailPolicy` " +"API." msgstr "" -"Documents réorganisés et réécrits pour promouvoir la nouvelle API :class:" -"`~email.message.EmailMessage`/:class:`~email.policy.EmailPolicy`." +"Documents réorganisés et réécrits pour promouvoir la nouvelle " +"API :class:`~email.message.EmailMessage`/:class:`~email.policy.EmailPolicy`." -#: library/email.rst:105 -msgid "Contents of the :mod:`email` package documentation:" +#: library/email.rst:102 +#, fuzzy +msgid "Contents of the :mod:`!email` package documentation:" msgstr "Contenus de la documentation du paquet :mod:`email` :" -#: library/email.rst:120 +#: library/email.rst:117 msgid "Legacy API:" msgstr "API héritée :" -#: library/email.rst:135 +#: library/email.rst:132 msgid "Module :mod:`smtplib`" msgstr "Module :mod:`smtplib`" -#: library/email.rst:136 +#: library/email.rst:133 msgid "SMTP (Simple Mail Transport Protocol) client" msgstr "Client SMTP (*Simple Mail Transport Protocol*)" -#: library/email.rst:138 +#: library/email.rst:135 msgid "Module :mod:`poplib`" msgstr "Module :mod:`poplib`" -#: library/email.rst:139 +#: library/email.rst:136 msgid "POP (Post Office Protocol) client" msgstr "Client POP (*Post Office Protocol*)" -#: library/email.rst:141 +#: library/email.rst:138 msgid "Module :mod:`imaplib`" msgstr "Module :mod:`imaplib`" -#: library/email.rst:142 +#: library/email.rst:139 msgid "IMAP (Internet Message Access Protocol) client" msgstr "Client IMAP (*Internet Message Access Protocol*)" -#: library/email.rst:144 +#: library/email.rst:141 msgid "Module :mod:`mailbox`" msgstr "Module :mod:`mailbox`" -#: library/email.rst:145 +#: library/email.rst:142 msgid "" "Tools for creating, reading, and managing collections of messages on disk " "using a variety standard formats." diff --git a/library/email.policy.po b/library/email.policy.po index f89b3c6e6..9d2ba0452 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-03-17 11:54+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!email.policy`: Policy Objects" msgstr ":mod:`email.policy` : objets de définition de politique" -#: library/email.policy.rst:12 +#: library/email.policy.rst:9 msgid "**Source code:** :source:`Lib/email/policy.py`" msgstr "**Code source :** :source:`Lib/email/policy.py`" -#: library/email.policy.rst:16 +#: library/email.policy.rst:13 msgid "" "The :mod:`email` package's prime focus is the handling of email messages as " "described by the various email and MIME RFCs. However, the general format " @@ -52,7 +52,7 @@ msgstr "" "implémentent des extensions que vous souhaitez utiliser d'une manière qui " "enfreint les normes." -#: library/email.policy.rst:28 +#: library/email.policy.rst:25 msgid "" "Policy objects give the email package the flexibility to handle all these " "disparate use cases." @@ -60,13 +60,13 @@ msgstr "" "Les objets de définition de politique donnent au paquet de messagerie la " "flexibilité nécessaire pour gérer tous ces cas d'utilisation disparates." -#: library/email.policy.rst:31 +#: library/email.policy.rst:28 msgid "" "A :class:`Policy` object encapsulates a set of attributes and methods that " -"control the behavior of various components of the email package during use. :" -"class:`Policy` instances can be passed to various classes and methods in the " -"email package to alter the default behavior. The settable values and their " -"defaults are described below." +"control the behavior of various components of the email package during " +"use. :class:`Policy` instances can be passed to various classes and methods " +"in the email package to alter the default behavior. The settable values and " +"their defaults are described below." msgstr "" "Un objet :class:`Policy` encapsule un ensemble d'attributs et de méthodes " "qui contrôlent le comportement de divers composants du paquet de messagerie " @@ -75,56 +75,58 @@ msgstr "" "électronique pour modifier le comportement par défaut. Les valeurs réglables " "et leurs valeurs par défaut sont décrites ci-dessous." -#: library/email.policy.rst:37 +#: library/email.policy.rst:34 msgid "" "There is a default policy used by all classes in the email package. For all " "of the :mod:`~email.parser` classes and the related convenience functions, " -"and for the :class:`~email.message.Message` class, this is the :class:" -"`Compat32` policy, via its corresponding pre-defined instance :const:" -"`compat32`. This policy provides for complete backward compatibility (in " -"some cases, including bug compatibility) with the pre-Python3.3 version of " -"the email package." +"and for the :class:`~email.message.Message` class, this is " +"the :class:`Compat32` policy, via its corresponding pre-defined " +"instance :const:`compat32`. This policy provides for complete backward " +"compatibility (in some cases, including bug compatibility) with the pre-" +"Python3.3 version of the email package." msgstr "" "Il existe une politique par défaut utilisée par toutes les classes dans le " "paquet de messagerie. Pour toutes les classes :mod:`~email.parser` et les " -"fonctions pratiques associées, et pour la classe :class:`~email.message." -"Message`, il s'agit de la politique :class:`Compat32`, via son instance " -"correspondante prédéfinie :const:`compat32`. Cette politique fournit une " -"rétrocompatibilité complète (dans certains cas, y compris la compatibilité " -"des bogues) avec la version pré-Python3.3 du paquet de messagerie." - -#: library/email.policy.rst:44 -msgid "" -"This default value for the *policy* keyword to :class:`~email.message." -"EmailMessage` is the :class:`EmailPolicy` policy, via its pre-defined " -"instance :data:`~default`." -msgstr "" -"Cette valeur par défaut pour le paramètre nommé *policy* de :class:`~email." -"message.EmailMessage` est la politique :class:`EmailPolicy`, via son " -"instance prédéfinie :data:`~default`." - -#: library/email.policy.rst:48 -msgid "" -"When a :class:`~email.message.Message` or :class:`~email.message." -"EmailMessage` object is created, it acquires a policy. If the message is " -"created by a :mod:`~email.parser`, a policy passed to the parser will be the " -"policy used by the message it creates. If the message is created by the " -"program, then the policy can be specified when it is created. When a " -"message is passed to a :mod:`~email.generator`, the generator uses the " -"policy from the message by default, but you can also pass a specific policy " -"to the generator that will override the one stored on the message object." -msgstr "" -"Lorsqu'un objet :class:`~email.message.Message` ou :class:`~email.message." -"EmailMessage` est créé, il acquiert une politique. Si le message est créé " -"par un :mod:`~email.parser`, la politique transmise à l'analyseur est la " -"politique utilisée par le message qu'il crée. Si le message est créé par le " -"programme, la stratégie peut être spécifiée lors de sa création. Lorsqu'un " -"message est passé à un :mod:`~email.generator`, le générateur utilise la " -"politique du message par défaut, mais vous pouvez également passer une " -"politique spécifique au générateur qui remplace celle stockée sur l'objet " -"message." - -#: library/email.policy.rst:57 +"fonctions pratiques associées, et pour la " +"classe :class:`~email.message.Message`, il s'agit de la " +"politique :class:`Compat32`, via son instance correspondante " +"prédéfinie :const:`compat32`. Cette politique fournit une rétrocompatibilité " +"complète (dans certains cas, y compris la compatibilité des bogues) avec la " +"version pré-Python3.3 du paquet de messagerie." + +#: library/email.policy.rst:41 +msgid "" +"This default value for the *policy* keyword " +"to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy` policy, " +"via its pre-defined instance :data:`~default`." +msgstr "" +"Cette valeur par défaut pour le paramètre nommé *policy* " +"de :class:`~email.message.EmailMessage` est la " +"politique :class:`EmailPolicy`, via son instance prédéfinie :data:`~default`." + +#: library/email.policy.rst:45 +msgid "" +"When a :class:`~email.message.Message` " +"or :class:`~email.message.EmailMessage` object is created, it acquires a " +"policy. If the message is created by a :mod:`~email.parser`, a policy " +"passed to the parser will be the policy used by the message it creates. If " +"the message is created by the program, then the policy can be specified when " +"it is created. When a message is passed to a :mod:`~email.generator`, the " +"generator uses the policy from the message by default, but you can also pass " +"a specific policy to the generator that will override the one stored on the " +"message object." +msgstr "" +"Lorsqu'un objet :class:`~email.message.Message` " +"ou :class:`~email.message.EmailMessage` est créé, il acquiert une politique. " +"Si le message est créé par un :mod:`~email.parser`, la politique transmise à " +"l'analyseur est la politique utilisée par le message qu'il crée. Si le " +"message est créé par le programme, la stratégie peut être spécifiée lors de " +"sa création. Lorsqu'un message est passé à un :mod:`~email.generator`, le " +"générateur utilise la politique du message par défaut, mais vous pouvez " +"également passer une politique spécifique au générateur qui remplace celle " +"stockée sur l'objet message." + +#: library/email.policy.rst:54 msgid "" "The default value for the *policy* keyword for the :mod:`email.parser` " "classes and the parser convenience functions **will be changing** in a " @@ -132,14 +134,14 @@ msgid "" "which policy you want to use** when calling any of the classes and functions " "described in the :mod:`~email.parser` module." msgstr "" -"La valeur par défaut du paramètre nommé *policy* pour les classes :mod:" -"`email.parser` et les fonctions pratiques de l'analyseur **va changer** dans " -"une future version de Python. Par conséquent, vous devez **toujours " -"spécifier explicitement la stratégie que vous souhaitez utiliser** lors de " -"l'appel de l'une des classes et fonctions décrites dans le module :mod:" -"`~email.parser`." +"La valeur par défaut du paramètre nommé *policy* pour les " +"classes :mod:`email.parser` et les fonctions pratiques de l'analyseur **va " +"changer** dans une future version de Python. Par conséquent, vous devez " +"**toujours spécifier explicitement la stratégie que vous souhaitez " +"utiliser** lors de l'appel de l'une des classes et fonctions décrites dans " +"le module :mod:`~email.parser`." -#: library/email.policy.rst:63 +#: library/email.policy.rst:60 msgid "" "The first part of this documentation covers the features of :class:`Policy`, " "an :term:`abstract base class` that defines the features that are common to " @@ -150,22 +152,22 @@ msgid "" "which implement the hooks that provide the standard behavior and the " "backward compatible behavior and features, respectively." msgstr "" -"La première partie de cette documentation couvre les fonctionnalités de :" -"class:`Policy`, une :term:`classe mère abstraite ` qui " -"définit les fonctionnalités communes à tous les objets de stratégie, y " +"La première partie de cette documentation couvre les fonctionnalités " +"de :class:`Policy`, une :term:`classe abstraite ` " +"qui définit les fonctionnalités communes à tous les objets de stratégie, y " "compris :const:`compat32`. Cela inclut certaines méthodes automatiques " "(*hooks* en anglais) appelées en interne par le paquet de messagerie, qu'une " "stratégie personnalisée peut remplacer pour obtenir un comportement " -"différent. La deuxième partie décrit les classes concrètes :class:" -"`EmailPolicy` et :class:`Compat32`, qui implémentent les points d'entrée " -"automatiques qui fournissent respectivement le comportement standard et le " -"comportement et les fonctionnalités rétrocompatibles." +"différent. La deuxième partie décrit les classes " +"concrètes :class:`EmailPolicy` et :class:`Compat32`, qui implémentent les " +"points d'entrée automatiques qui fournissent respectivement le comportement " +"standard et le comportement et les fonctionnalités rétrocompatibles." -#: library/email.policy.rst:72 +#: library/email.policy.rst:69 msgid "" ":class:`Policy` instances are immutable, but they can be cloned, accepting " -"the same keyword arguments as the class constructor and returning a new :" -"class:`Policy` instance that is a copy of the original but with the " +"the same keyword arguments as the class constructor and returning a " +"new :class:`Policy` instance that is a copy of the original but with the " "specified attributes values changed." msgstr "" "Les instances :class:`Policy` sont immuables, mais elles peuvent être " @@ -173,7 +175,7 @@ msgstr "" "classe et en renvoyant une nouvelle instance :class:`Policy` qui est une " "copie de l'original mais avec les valeurs d'attributs spécifiées modifiées." -#: library/email.policy.rst:77 +#: library/email.policy.rst:74 msgid "" "As an example, the following code could be used to read an email message " "from a file on disk and pass it to the system ``sendmail`` program on a Unix " @@ -183,7 +185,7 @@ msgstr "" "électronique à partir d'un fichier sur le disque et le transmettre au " "programme système ``sendmail`` sur un système Unix :" -#: library/email.policy.rst:114 +#: library/email.policy.rst:111 msgid "" "Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC " "correct line separator characters when creating the binary string to feed " @@ -195,7 +197,7 @@ msgstr "" "la chaîne binaire à fournir à ``stdin`` de ``sendmail``, où la politique par " "défaut utiliserait ``\\n`` comme séparateur de ligne." -#: library/email.policy.rst:119 +#: library/email.policy.rst:116 msgid "" "Some email package methods accept a *policy* keyword argument, allowing the " "policy to be overridden for that method. For example, the following code " @@ -205,12 +207,13 @@ msgid "" msgstr "" "Certaines méthodes du paquet de messagerie acceptent un argument nommé " "*policy*, permettant à la politique d'être remplacée pour cette méthode. Par " -"exemple, le code suivant utilise la méthode :meth:`~email.message.Message." -"as_bytes` de l'objet *msg* de l'exemple précédent et écrit le message dans " -"un fichier en utilisant les séparateurs de ligne natifs de la plate-forme " -"sur laquelle il est en cours d'exécution ::" +"exemple, le code suivant utilise la " +"méthode :meth:`~email.message.Message.as_bytes` de l'objet *msg* de " +"l'exemple précédent et écrit le message dans un fichier en utilisant les " +"séparateurs de ligne natifs de la plate-forme sur laquelle il est en cours " +"d'exécution ::" -#: library/email.policy.rst:130 +#: library/email.policy.rst:127 msgid "" "Policy objects can also be combined using the addition operator, producing a " "policy object whose settings are a combination of the non-default values of " @@ -221,7 +224,7 @@ msgstr "" "sont une combinaison des objets additionnées (en ne prenant en compte que " "les paramètres données explicitement) ::" -#: library/email.policy.rst:138 +#: library/email.policy.rst:135 msgid "" "This operation is not commutative; that is, the order in which the objects " "are added matters. To illustrate::" @@ -229,20 +232,20 @@ msgstr "" "Cette opération n'est pas commutative ; c'est-à-dire que l'ordre dans lequel " "les objets sont ajoutés est important. Pour illustrer ::" -#: library/email.policy.rst:153 +#: library/email.policy.rst:150 msgid "" "This is the :term:`abstract base class` for all policy classes. It provides " "default implementations for a couple of trivial methods, as well as the " "implementation of the immutability property, the :meth:`clone` method, and " "the constructor semantics." msgstr "" -"C'est la :term:`classe mère abstraite ` pour toutes les " +"C'est la :term:`classe abstraite ` pour toutes les " "classes de définition de politique. Elle fournit des implémentations par " "défaut pour quelques méthodes triviales, ainsi que l'implémentation de la " "propriété d'immutabilité, la méthode :meth:`clone` et la sémantique du " "constructeur." -#: library/email.policy.rst:158 +#: library/email.policy.rst:155 msgid "" "The constructor of a policy class can be passed various keyword arguments. " "The arguments that may be specified are any non-method properties on this " @@ -257,7 +260,7 @@ msgstr "" "concrète. Une valeur spécifiée dans le constructeur remplace la valeur par " "défaut de l'attribut correspondant." -#: library/email.policy.rst:164 +#: library/email.policy.rst:161 msgid "" "This class defines the following properties, and thus values for the " "following may be passed in the constructor of any policy class:" @@ -266,18 +269,18 @@ msgstr "" "éléments suivants peuvent être passées dans le constructeur de n'importe " "quelle classe de définition de politique :" -#: library/email.policy.rst:170 +#: library/email.policy.rst:167 msgid "" "The maximum length of any line in the serialized output, not counting the " "end of line character(s). Default is 78, per :rfc:`5322`. A value of ``0`` " "or :const:`None` indicates that no line wrapping should be done at all." msgstr "" "La longueur maximale de toute ligne dans la sortie sérialisée, sans compter " -"le(s) caractère(s) de fin de ligne. La valeur par défaut est 78, selon la :" -"rfc:`5322`. Une valeur de ``0`` ou :const:`None` indique qu'aucun retour à " -"la ligne ne doit être fait." +"le(s) caractère(s) de fin de ligne. La valeur par défaut est 78, selon " +"la :rfc:`5322`. Une valeur de ``0`` ou :const:`None` indique qu'aucun retour " +"à la ligne ne doit être fait." -#: library/email.policy.rst:178 +#: library/email.policy.rst:175 msgid "" "The string to be used to terminate lines in serialized output. The default " "is ``\\n`` because that's the internal end-of-line discipline used by " @@ -287,7 +290,7 @@ msgstr "" "valeur par défaut est ``\\n`` car c'est la définition interne de fin de " "ligne utilisée par Python, bien que ``\\r\\n`` soit requis par les RFC." -#: library/email.policy.rst:185 +#: library/email.policy.rst:182 msgid "" "Controls the type of Content Transfer Encodings that may be or are required " "to be used. The possible values are:" @@ -295,11 +298,11 @@ msgstr "" "Contrôle le type d'encodage de contenu qui peut ou doit être utilisé. Les " "valeurs possibles sont :" -#: library/email.policy.rst:191 +#: library/email.policy.rst:188 msgid "``7bit``" msgstr "``7bit``" -#: library/email.policy.rst:191 +#: library/email.policy.rst:188 msgid "" "all data must be \"7 bit clean\" (ASCII-only). This means that where " "necessary data will be encoded using either quoted-printable or base64 " @@ -309,11 +312,11 @@ msgstr "" "Cela signifie que si nécessaire, les données seront encodées à l'aide de " "l'encodage *quoted-printable* ou *base64*." -#: library/email.policy.rst:195 +#: library/email.policy.rst:192 msgid "``8bit``" msgstr "``8bit``" -#: library/email.policy.rst:195 +#: library/email.policy.rst:192 msgid "" "data is not constrained to be 7 bit clean. Data in headers is still " "required to be ASCII-only and so will be encoded (see :meth:`fold_binary` " @@ -326,7 +329,7 @@ msgstr "" "ci-dessous pour les exceptions), mais les parties du corps peuvent utiliser " "le ``8bit`` CTE." -#: library/email.policy.rst:201 +#: library/email.policy.rst:198 msgid "" "A ``cte_type`` value of ``8bit`` only works with ``BytesGenerator``, not " "``Generator``, because strings cannot contain binary data. If a " @@ -339,17 +342,17 @@ msgstr "" "politique qui spécifie ``cte_type=8bit``, il agit comme si ``cte_type`` " "était ``7bit``." -#: library/email.policy.rst:209 +#: library/email.policy.rst:206 msgid "" -"If :const:`True`, any defects encountered will be raised as errors. If :" -"const:`False` (the default), defects will be passed to the :meth:" -"`register_defect` method." +"If :const:`True`, any defects encountered will be raised as errors. " +"If :const:`False` (the default), defects will be passed to " +"the :meth:`register_defect` method." msgstr "" "Si :const:`True`, tous les défauts rencontrés sont signalés comme des " "erreurs. Si :const:`False` (la valeur par défaut), les défauts sont passés à " "la méthode :meth:`register_defect`." -#: library/email.policy.rst:216 +#: library/email.policy.rst:213 msgid "" "If :const:`True`, lines starting with *\"From \"* in the body are escaped by " "putting a ``>`` in front of them. This parameter is used when the message is " @@ -359,33 +362,33 @@ msgstr "" "échappées en mettant un ``>`` devant elles. Ce paramètre est utilisé lorsque " "le message est sérialisé par un générateur. Par défaut, vaut :const:`False`." -#: library/email.policy.rst:226 +#: library/email.policy.rst:223 msgid "" "A factory function for constructing a new empty message object. Used by the " -"parser when building messages. Defaults to ``None``, in which case :class:" -"`~email.message.Message` is used." +"parser when building messages. Defaults to ``None``, in which " +"case :class:`~email.message.Message` is used." msgstr "" "Une fonction de fabrique pour construire un nouvel objet de message vide. " "Utilisé par l'analyseur lors de la construction des messages. La valeur par " "défaut est ``None``, :class:`~email.message.Message` est alors utilisé." -#: library/email.policy.rst:235 +#: library/email.policy.rst:232 msgid "" -"If ``True`` (the default), the generator will raise :exc:`~email.errors." -"HeaderWriteError` instead of writing a header that is improperly folded or " -"delimited, such that it would be parsed as multiple headers or joined with " -"adjacent data. Such headers can be generated by custom header classes or " -"bugs in the ``email`` module." +"If ``True`` (the default), the generator will " +"raise :exc:`~email.errors.HeaderWriteError` instead of writing a header that " +"is improperly folded or delimited, such that it would be parsed as multiple " +"headers or joined with adjacent data. Such headers can be generated by " +"custom header classes or bugs in the ``email`` module." msgstr "" -#: library/email.policy.rst:242 +#: library/email.policy.rst:239 msgid "" -"As it's a security feature, this defaults to ``True`` even in the :class:" -"`~email.policy.Compat32` policy. For backwards compatible, but unsafe, " -"behavior, it must be set to ``False`` explicitly." +"As it's a security feature, this defaults to ``True`` even in " +"the :class:`~email.policy.Compat32` policy. For backwards compatible, but " +"unsafe, behavior, it must be set to ``False`` explicitly." msgstr "" -#: library/email.policy.rst:250 +#: library/email.policy.rst:247 msgid "" "The following :class:`Policy` method is intended to be called by code using " "the email library to create policy instances with custom settings:" @@ -394,7 +397,7 @@ msgstr "" "à l'aide de la bibliothèque de messagerie pour créer des instances de " "stratégie avec des paramètres personnalisés :" -#: library/email.policy.rst:256 +#: library/email.policy.rst:253 msgid "" "Return a new :class:`Policy` instance whose attributes have the same values " "as the current instance, except where those attributes are given new values " @@ -404,7 +407,7 @@ msgstr "" "mêmes valeurs que l'instance actuelle, sauf si ces attributs reçoivent de " "nouvelles valeurs par les arguments nommés." -#: library/email.policy.rst:261 +#: library/email.policy.rst:258 msgid "" "The remaining :class:`Policy` methods are called by the email package code, " "and are not intended to be called by an application using the email package. " @@ -415,16 +418,17 @@ msgstr "" "utilisant le paquet de messagerie. Une stratégie personnalisée doit " "implémenter toutes ces méthodes." -#: library/email.policy.rst:268 +#: library/email.policy.rst:265 +#, fuzzy msgid "" "Handle a *defect* found on *obj*. When the email package calls this method, " -"*defect* will always be a subclass of :class:`~email.errors.Defect`." +"*defect* will always be a subclass of :class:`~email.errors.MessageDefect`." msgstr "" "Gère un *defect* trouvé sur *obj*. Lorsque le paquet de messagerie appelle " -"cette méthode, *defect* est toujours une sous-classe de :class:`~email." -"errors.Defect`." +"cette méthode, *defect* est toujours une sous-classe " +"de :class:`~email.errors.Defect`." -#: library/email.policy.rst:272 +#: library/email.policy.rst:269 msgid "" "The default implementation checks the :attr:`raise_on_defect` flag. If it " "is ``True``, *defect* is raised as an exception. If it is ``False`` (the " @@ -434,15 +438,16 @@ msgstr "" "c'est ``True``, *defect* est levé comme une exception. Si c'est ``False`` " "(par défaut), *obj* et *defect* sont passés à :meth:`register_defect`." -#: library/email.policy.rst:279 +#: library/email.policy.rst:276 +#, fuzzy msgid "" "Register a *defect* on *obj*. In the email package, *defect* will always be " -"a subclass of :class:`~email.errors.Defect`." +"a subclass of :class:`~email.errors.MessageDefect`." msgstr "" "Enregistre un *defect* sur *obj*. Dans le paquet de messagerie, *defect* " "sera toujours une sous-classe de :class:`~email.errors.Defect`." -#: library/email.policy.rst:282 +#: library/email.policy.rst:279 msgid "" "The default implementation calls the ``append`` method of the ``defects`` " "attribute of *obj*. When the email package calls :attr:`handle_defect`, " @@ -452,31 +457,32 @@ msgid "" "defects in parsed messages will raise unexpected errors." msgstr "" "L'implémentation par défaut appelle la méthode ``append`` de l'attribut " -"``defects`` de *obj*. Lorsque le paquet de courrier électronique appelle :" -"attr:`handle_defect`, *obj* a normalement un attribut ``defects`` qui a une " -"méthode ``append``. Les types d'objets personnalisés utilisés avec le paquet " -"de messagerie (par exemple, les objets ``Message`` personnalisés) doivent " -"également fournir un tel attribut, sinon les défauts dans les messages " -"analysés généreront des erreurs inattendues." - -#: library/email.policy.rst:292 +"``defects`` de *obj*. Lorsque le paquet de courrier électronique " +"appelle :attr:`handle_defect`, *obj* a normalement un attribut ``defects`` " +"qui a une méthode ``append``. Les types d'objets personnalisés utilisés avec " +"le paquet de messagerie (par exemple, les objets ``Message`` personnalisés) " +"doivent également fournir un tel attribut, sinon les défauts dans les " +"messages analysés généreront des erreurs inattendues." + +#: library/email.policy.rst:289 msgid "Return the maximum allowed number of headers named *name*." msgstr "Renvoie le nombre maximal autorisé d'en-têtes nommés *name*." -#: library/email.policy.rst:294 +#: library/email.policy.rst:291 msgid "" -"Called when a header is added to an :class:`~email.message.EmailMessage` or :" -"class:`~email.message.Message` object. If the returned value is not ``0`` " -"or ``None``, and there are already a number of headers with the name *name* " -"greater than or equal to the value returned, a :exc:`ValueError` is raised." +"Called when a header is added to an :class:`~email.message.EmailMessage` " +"or :class:`~email.message.Message` object. If the returned value is not " +"``0`` or ``None``, and there are already a number of headers with the name " +"*name* greater than or equal to the value returned, a :exc:`ValueError` is " +"raised." msgstr "" -"Appelé lorsqu'un en-tête est ajouté à un objet :class:`~email.message." -"EmailMessage` ou :class:`~email.message.Message`. Si la valeur renvoyée " -"n'est pas ``0`` ou ``None``, et qu'il y a déjà un certain nombre d'en-têtes " -"avec le nom *name* supérieur ou égal à la valeur renvoyée, une :exc:" -"`ValueError` est levée." +"Appelé lorsqu'un en-tête est ajouté à un " +"objet :class:`~email.message.EmailMessage` " +"ou :class:`~email.message.Message`. Si la valeur renvoyée n'est pas ``0`` ou " +"``None``, et qu'il y a déjà un certain nombre d'en-têtes avec le nom *name* " +"supérieur ou égal à la valeur renvoyée, une :exc:`ValueError` est levée." -#: library/email.policy.rst:300 +#: library/email.policy.rst:297 msgid "" "Because the default behavior of ``Message.__setitem__`` is to append the " "value to the list of headers, it is easy to create duplicate headers without " @@ -493,12 +499,12 @@ msgstr "" "par l'analyseur, qui produit fidèlement autant d'en-têtes qu'il en existe " "dans le message analysé)." -#: library/email.policy.rst:308 +#: library/email.policy.rst:305 msgid "The default implementation returns ``None`` for all header names." msgstr "" "L'implémentation par défaut renvoie ``None`` pour tous les noms d'en-tête." -#: library/email.policy.rst:313 +#: library/email.policy.rst:310 msgid "" "The email package calls this method with a list of strings, each string " "ending with the line separation characters found in the source being " @@ -514,7 +520,7 @@ msgstr "" "sont préservés. La méthode doit renvoyer le couple ``(name, value)`` qui " "doit être stocké dans le ``Message`` pour représenter l'en-tête analysé." -#: library/email.policy.rst:320 +#: library/email.policy.rst:317 msgid "" "If an implementation wishes to retain compatibility with the existing email " "package policies, *name* should be the case preserved name (all characters " @@ -529,16 +535,16 @@ msgstr "" "séparation de ligne supprimés, mais les espaces blancs conservés intacts), " "dépouillés des espaces blancs de tête." -#: library/email.policy.rst:326 +#: library/email.policy.rst:323 msgid "*sourcelines* may contain surrogateescaped binary data." msgstr "" "*sourcelines* peut contenir des données binaires échappées de substitution." -#: library/email.policy.rst:344 library/email.policy.rst:360 +#: library/email.policy.rst:341 library/email.policy.rst:357 msgid "There is no default implementation" msgstr "Il n'y a pas d'implémentation par défaut" -#: library/email.policy.rst:333 +#: library/email.policy.rst:330 msgid "" "The email package calls this method with the name and value provided by the " "application program when the application program is modifying a ``Message`` " @@ -553,7 +559,7 @@ msgstr "" "``(name, value)`` qui doit être stocké dans le ``Message`` pour représenter " "l'en-tête." -#: library/email.policy.rst:339 +#: library/email.policy.rst:336 msgid "" "If an implementation wishes to retain compatibility with the existing email " "package policies, the *name* and *value* should be strings or string " @@ -564,7 +570,7 @@ msgstr "" "doivent être des chaînes ou des sous-classes de chaînes qui ne modifient pas " "le contenu des arguments transmis." -#: library/email.policy.rst:349 +#: library/email.policy.rst:346 msgid "" "The email package calls this method with the *name* and *value* currently " "stored in the ``Message`` when that header is requested by the application " @@ -582,7 +588,7 @@ msgstr "" "``Message`` ; la méthode reçoit le nom et la valeur spécifiques de l'en-tête " "destiné à être renvoyé à l'application." -#: library/email.policy.rst:357 +#: library/email.policy.rst:354 msgid "" "*value* may contain surrogateescaped binary data. There should be no " "surrogateescaped binary data in the value returned by the method." @@ -591,14 +597,14 @@ msgstr "" "doit pas y avoir de données binaires échappées de substitution dans la " "valeur renvoyée par la méthode." -#: library/email.policy.rst:365 +#: library/email.policy.rst:362 msgid "" "The email package calls this method with the *name* and *value* currently " "stored in the ``Message`` for a given header. The method should return a " "string that represents that header \"folded\" correctly (according to the " -"policy settings) by composing the *name* with the *value* and inserting :" -"attr:`linesep` characters at the appropriate places. See :rfc:`5322` for a " -"discussion of the rules for folding email headers." +"policy settings) by composing the *name* with the *value* and " +"inserting :attr:`linesep` characters at the appropriate places. " +"See :rfc:`5322` for a discussion of the rules for folding email headers." msgstr "" "Le paquet de courrier électronique appelle cette méthode avec le *name* et " "la *value* actuellement stockés dans le ``Message`` pour un en-tête donné. " @@ -609,7 +615,7 @@ msgstr "" "mise en forme (« pliage » ou *folding* en anglais) des en-têtes de courrier " "électronique." -#: library/email.policy.rst:372 +#: library/email.policy.rst:369 msgid "" "*value* may contain surrogateescaped binary data. There should be no " "surrogateescaped binary data in the string returned by the method." @@ -618,7 +624,7 @@ msgstr "" "doit pas y avoir de données binaires échappées de substitution dans la " "chaîne renvoyée par la méthode." -#: library/email.policy.rst:378 +#: library/email.policy.rst:375 msgid "" "The same as :meth:`fold`, except that the returned value should be a bytes " "object rather than a string." @@ -626,7 +632,7 @@ msgstr "" "Identique à :meth:`fold`, sauf que la valeur renvoyée doit être un objet " "bytes plutôt qu'une chaîne." -#: library/email.policy.rst:381 +#: library/email.policy.rst:378 msgid "" "*value* may contain surrogateescaped binary data. These could be converted " "back into binary data in the returned bytes object." @@ -635,7 +641,7 @@ msgstr "" "ci pourraient être reconverties en données binaires dans l'objet bytes " "renvoyé." -#: library/email.policy.rst:388 +#: library/email.policy.rst:385 msgid "" "This concrete :class:`Policy` provides behavior that is intended to be fully " "compliant with the current email RFCs. These include (but are not limited " @@ -645,7 +651,7 @@ msgstr "" "entièrement conforme aux RFC de messagerie actuelles. Ce qui inclut (mais " "n'est pas limité à) la :rfc:`5322`, la :rfc:`2047` et les RFC MIME actuelles." -#: library/email.policy.rst:392 +#: library/email.policy.rst:389 msgid "" "This policy adds new header parsing and folding algorithms. Instead of " "simple strings, headers are ``str`` subclasses with attributes that depend " @@ -658,15 +664,16 @@ msgstr "" "L'algorithme d'analyse et de pliage implémente entièrement la :rfc:`2047` et " "la :rfc:`5322`." -#: library/email.policy.rst:397 +#: library/email.policy.rst:394 msgid "" "The default value for the :attr:`~email.policy.Policy.message_factory` " "attribute is :class:`~email.message.EmailMessage`." msgstr "" -"La valeur par défaut de l'attribut :attr:`~email.policy.Policy." -"message_factory` est :class:`~email.message.EmailMessage`." +"La valeur par défaut de " +"l'attribut :attr:`~email.policy.Policy.message_factory` " +"est :class:`~email.message.EmailMessage`." -#: library/email.policy.rst:400 +#: library/email.policy.rst:397 msgid "" "In addition to the settable attributes listed above that apply to all " "policies, this policy adds the following additional attributes:" @@ -675,16 +682,18 @@ msgstr "" "toutes les règles, cette règle ajoute les attributs supplémentaires " "suivants :" -#: library/email.policy.rst:403 +#: library/email.policy.rst:400 msgid "[1]_" msgstr "[1]_" -#: library/email.policy.rst:408 +#: library/email.policy.rst:405 +#, fuzzy msgid "" "If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers " -"by encoding them as \"encoded words\". If ``True``, follow :rfc:`6532` and " -"use ``utf-8`` encoding for headers. Messages formatted in this way may be " -"passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`)." +"by encoding them as :rfc:`2047` \"encoded words\". If ``True``, " +"follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages " +"formatted in this way may be passed to SMTP servers that support the " +"``SMTPUTF8`` extension (:rfc:`6531`)." msgstr "" "Si c'est ``False``, suit la :rfc:`5322`, en prenant en charge les caractères " "non-ASCII dans les en-têtes en les encodant comme des « mots encodés ». Si " @@ -692,34 +701,54 @@ msgstr "" "en-têtes. Les messages formatés de cette manière peuvent être transmis aux " "serveurs SMTP qui gèrent l'extension ``SMTPUTF8`` (:rfc:`6531`)." -#: library/email.policy.rst:417 +#: library/email.policy.rst:411 +msgid "" +"When ``False``, the generator will " +"raise :exc:`~email.errors.HeaderWriteError` if any header includes non-ASCII " +"characters in a context where :rfc:`2047` does not permit encoded words. " +"This particularly applies to mailboxes (\"addr-spec\") with non-ASCII " +"characters, which can be created via :class:`~email.headerregistry.Address`. " +"To use a mailbox with a non-ASCII domain name with ``utf8=False``, first " +"encode the domain using the third-party :pypi:`idna` or :pypi:`uts46` module " +"or with :mod:`encodings.idna`. It is not possible to use a non-ASCII " +"username (\"local-part\") in a mailbox when ``utf8=False``." +msgstr "" + +#: library/email.policy.rst:422 +msgid "" +"Can trigger the raising of :exc:`~email.errors.HeaderWriteError`. (Earlier " +"versions incorrectly applied :rfc:`2047` in certain contexts, mostly notably " +"in addr-specs.)" +msgstr "" + +#: library/email.policy.rst:429 msgid "" -"If the value for a header in the ``Message`` object originated from a :mod:" -"`~email.parser` (as opposed to being set by a program), this attribute " -"indicates whether or not a generator should refold that value when " +"If the value for a header in the ``Message`` object originated from " +"a :mod:`~email.parser` (as opposed to being set by a program), this " +"attribute indicates whether or not a generator should refold that value when " "transforming the message back into serialized form. The possible values are:" msgstr "" -"Si la valeur d'un en-tête dans l'objet ``Message`` provient d'un :mod:" -"`~email.parser` (au lieu d'être définie par un programme), cet attribut " -"indique si un générateur doit ou non remettre en forme cette valeur " +"Si la valeur d'un en-tête dans l'objet ``Message`` provient " +"d'un :mod:`~email.parser` (au lieu d'être définie par un programme), cet " +"attribut indique si un générateur doit ou non remettre en forme cette valeur " "lorsqu'il retransforme le message sous forme sérialisée. Les valeurs " "possibles sont :" -#: library/email.policy.rst:424 +#: library/email.policy.rst:436 msgid "``none``" msgstr "``none``" -#: library/email.policy.rst:424 +#: library/email.policy.rst:436 msgid "all source values use original folding" msgstr "" "toutes les valeurs sources utilisent la mise en forme (*folding* en anglais) " "d'origine" -#: library/email.policy.rst:426 +#: library/email.policy.rst:438 msgid "``long``" msgstr "``long``" -#: library/email.policy.rst:426 +#: library/email.policy.rst:438 msgid "" "source values that have any line that is longer than ``max_line_length`` " "will be refolded" @@ -727,19 +756,19 @@ msgstr "" "les valeurs sources dont une ligne est plus longue que ``max_line_length`` " "sont remises en forme" -#: library/email.policy.rst:429 +#: library/email.policy.rst:441 msgid "``all``" msgstr "``all``" -#: library/email.policy.rst:429 +#: library/email.policy.rst:441 msgid "all values are refolded." msgstr "toutes les valeurs sont remises en forme." -#: library/email.policy.rst:432 +#: library/email.policy.rst:444 msgid "The default is ``long``." msgstr "La valeur par défaut est ``long``." -#: library/email.policy.rst:437 +#: library/email.policy.rst:449 msgid "" "A callable that takes two arguments, ``name`` and ``value``, where ``name`` " "is a header field name and ``value`` is an unfolded header field value, and " @@ -759,26 +788,28 @@ msgstr "" "prise en charge d'une analyse personnalisée supplémentaire sera ajoutée à " "l'avenir." -#: library/email.policy.rst:448 +#: library/email.policy.rst:460 msgid "" -"An object with at least two methods: get_content and set_content. When the :" -"meth:`~email.message.EmailMessage.get_content` or :meth:`~email.message." -"EmailMessage.set_content` method of an :class:`~email.message.EmailMessage` " -"object is called, it calls the corresponding method of this object, passing " -"it the message object as its first argument, and any arguments or keywords " -"that were passed to it as additional arguments. By default " -"``content_manager`` is set to :data:`~email.contentmanager.raw_data_manager`." +"An object with at least two methods: get_content and set_content. When " +"the :meth:`~email.message.EmailMessage.get_content` " +"or :meth:`~email.message.EmailMessage.set_content` method of " +"an :class:`~email.message.EmailMessage` object is called, it calls the " +"corresponding method of this object, passing it the message object as its " +"first argument, and any arguments or keywords that were passed to it as " +"additional arguments. By default ``content_manager`` is set " +"to :data:`~email.contentmanager.raw_data_manager`." msgstr "" "Objet avec au moins deux méthodes : *get_content* et *set_content*. Lorsque " -"la méthode :meth:`~email.message.EmailMessage.get_content` ou :meth:`~email." -"message.EmailMessage.set_content` d'un objet :class:`~email.message." -"EmailMessage` est appelée, elle appelle la méthode correspondante de cet " -"objet, en lui transmettant l'objet message comme premier argument, et tous " -"les arguments positionnels ou nommés qui lui ont été transmis comme " -"arguments supplémentaires. Par défaut, ``content_manager`` est défini sur :" -"data:`~email.contentmanager.raw_data_manager`." +"la méthode :meth:`~email.message.EmailMessage.get_content` " +"ou :meth:`~email.message.EmailMessage.set_content` d'un " +"objet :class:`~email.message.EmailMessage` est appelée, elle appelle la " +"méthode correspondante de cet objet, en lui transmettant l'objet message " +"comme premier argument, et tous les arguments positionnels ou nommés qui lui " +"ont été transmis comme arguments supplémentaires. Par défaut, " +"``content_manager`` est défini " +"sur :data:`~email.contentmanager.raw_data_manager`." -#: library/email.policy.rst:618 +#: library/email.policy.rst:630 msgid "" "The class provides the following concrete implementations of the abstract " "methods of :class:`Policy`:" @@ -786,17 +817,17 @@ msgstr "" "La classe fournit les implémentations concrètes suivantes des méthodes " "abstraites de :class:`Policy` :" -#: library/email.policy.rst:466 +#: library/email.policy.rst:478 msgid "" "Returns the value of the :attr:`~email.headerregistry.BaseHeader.max_count` " "attribute of the specialized class used to represent the header with the " "given name." msgstr "" -"Renvoie la valeur de l'attribut :attr:`~email.headerregistry.BaseHeader." -"max_count` de la classe spécialisée utilisée pour représenter l'en-tête avec " -"le nom donné." +"Renvoie la valeur de " +"l'attribut :attr:`~email.headerregistry.BaseHeader.max_count` de la classe " +"spécialisée utilisée pour représenter l'en-tête avec le nom donné." -#: library/email.policy.rst:624 +#: library/email.policy.rst:636 msgid "" "The name is parsed as everything up to the '``:``' and returned unmodified. " "The value is determined by stripping leading whitespace off the remainder of " @@ -809,7 +840,7 @@ msgstr "" "et en supprimant tous les caractères de retour chariot ou de saut de ligne " "de fin." -#: library/email.policy.rst:482 +#: library/email.policy.rst:494 msgid "" "The name is returned unchanged. If the input value has a ``name`` attribute " "and it matches *name* ignoring case, the value is returned unchanged. " @@ -824,7 +855,7 @@ msgstr "" "Dans ce cas, une ``ValueError`` est levée si la valeur d'entrée contient des " "caractères CR ou LF." -#: library/email.policy.rst:492 +#: library/email.policy.rst:504 msgid "" "If the value has a ``name`` attribute, it is returned to unmodified. " "Otherwise the *name*, and the *value* with any CR or LF characters removed, " @@ -838,7 +869,7 @@ msgstr "" "octets échappés de substitution sont transformés en glyphe Unicode de " "caractère inconnu." -#: library/email.policy.rst:501 +#: library/email.policy.rst:513 msgid "" "Header folding is controlled by the :attr:`refold_source` policy setting. A " "value is considered to be a 'source value' if and only if it does not have a " @@ -849,17 +880,17 @@ msgid "" "Folding of a header object is done by calling its ``fold`` method with the " "current policy." msgstr "" -"La mise en forme d'en-tête est contrôlée par le paramètre de politique :attr:" -"`refold_source`. Une valeur est considérée comme une « valeur source » si et " -"seulement si elle n'a pas d'attribut ``name`` (avoir un attribut ``name`` " -"signifie qu'il s'agit d'un objet d'en-tête quelconque). Si une valeur source " -"doit être mise en forme conformément à la politique, elle est convertie en " -"un objet d'en-tête en passant le *name* et la *value* avec tous les " -"caractères CR et LF supprimés à ``header_factory``. La mise en forme multi-" -"lignes d'un objet d'en-tête (« pliage » ou *folding* en anglais) se fait en " -"appelant sa méthode ``fold`` avec la politique actuelle." +"La mise en forme d'en-tête est contrôlée par le paramètre de " +"politique :attr:`refold_source`. Une valeur est considérée comme une " +"« valeur source » si et seulement si elle n'a pas d'attribut ``name`` (avoir " +"un attribut ``name`` signifie qu'il s'agit d'un objet d'en-tête quelconque). " +"Si une valeur source doit être mise en forme conformément à la politique, " +"elle est convertie en un objet d'en-tête en passant le *name* et la *value* " +"avec tous les caractères CR et LF supprimés à ``header_factory``. La mise en " +"forme multi-lignes d'un objet d'en-tête (« pliage » ou *folding* en anglais) " +"se fait en appelant sa méthode ``fold`` avec la politique actuelle." -#: library/email.policy.rst:510 +#: library/email.policy.rst:522 msgid "" "Source values are split into lines using :meth:`~str.splitlines`. If the " "value is not to be refolded, the lines are rejoined using the ``linesep`` " @@ -868,15 +899,15 @@ msgid "" "``refold_source`` setting, which causes the binary data to be CTE encoded " "using the ``unknown-8bit`` charset." msgstr "" -"Les valeurs sources sont divisées en lignes en utilisant :meth:`~str." -"splitlines`. Si la valeur ne doit pas être remise en forme, les lignes sont " -"jointes en utilisant le caractère ``linesep`` de la politique et renvoyées. " -"L'exception concerne les lignes contenant des données binaires non ASCII. " -"Dans ce cas, la valeur est remise en forme quel que soit le paramètre " -"``refold_source``, ce qui entraîne le codage CTE des données binaires à " -"l'aide du jeu de caractères ``unknown-8bit``." +"Les valeurs sources sont divisées en lignes en " +"utilisant :meth:`~str.splitlines`. Si la valeur ne doit pas être remise en " +"forme, les lignes sont jointes en utilisant le caractère ``linesep`` de la " +"politique et renvoyées. L'exception concerne les lignes contenant des " +"données binaires non ASCII. Dans ce cas, la valeur est remise en forme quel " +"que soit le paramètre ``refold_source``, ce qui entraîne le codage CTE des " +"données binaires à l'aide du jeu de caractères ``unknown-8bit``." -#: library/email.policy.rst:520 +#: library/email.policy.rst:532 msgid "" "The same as :meth:`fold` if :attr:`~Policy.cte_type` is ``7bit``, except " "that the returned value is bytes." @@ -884,7 +915,7 @@ msgstr "" "Identique à :meth:`fold` si :attr:`~Policy.cte_type` vaut ``7bit``, sauf que " "la valeur renvoyée est de type *bytes*." -#: library/email.policy.rst:523 +#: library/email.policy.rst:535 msgid "" "If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is converted " "back into bytes. Headers with binary data are not refolded, regardless of " @@ -898,7 +929,7 @@ msgstr "" "constituées de caractères à un seul octet ou de caractères à plusieurs " "octets." -#: library/email.policy.rst:530 +#: library/email.policy.rst:542 msgid "" "The following instances of :class:`EmailPolicy` provide defaults suitable " "for specific application domains. Note that in the future the behavior of " @@ -911,7 +942,7 @@ msgstr "" "``HTTP``) pourra être ajusté pour se conformer encore plus étroitement aux " "RFC relatives à leurs domaines." -#: library/email.policy.rst:538 +#: library/email.policy.rst:550 msgid "" "An instance of ``EmailPolicy`` with all defaults unchanged. This policy " "uses the standard Python ``\\n`` line endings rather than the RFC-correct " @@ -921,7 +952,7 @@ msgstr "" "inchangées. Cette politique utilise les fins de ligne standard Python " "``\\n`` plutôt que le ``\\r\\n`` conforme à la RFC." -#: library/email.policy.rst:545 +#: library/email.policy.rst:557 msgid "" "Suitable for serializing messages in conformance with the email RFCs. Like " "``default``, but with ``linesep`` set to ``\\r\\n``, which is RFC compliant." @@ -930,13 +961,13 @@ msgstr "" "mails. Comme ``default``, mais avec ``linesep`` défini sur ``\\r\\n``, ce " "qui est conforme à la RFC." -#: library/email.policy.rst:552 +#: library/email.policy.rst:564 msgid "" "The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``. " "Useful for serializing messages to a message store without using encoded " "words in the headers. Should only be used for SMTP transmission if the " -"sender or recipient addresses have non-ASCII characters (the :meth:`smtplib." -"SMTP.send_message` method handles this automatically)." +"sender or recipient addresses have non-ASCII characters " +"(the :meth:`smtplib.SMTP.send_message` method handles this automatically)." msgstr "" "Identique à ``SMTP`` sauf que :attr:`~EmailPolicy.utf8` vaut ``True``. Utile " "pour sérialiser des messages dans une banque de messages sans utiliser de " @@ -945,7 +976,7 @@ msgstr "" "caractères non ASCII (la méthode :meth:`smtplib.SMTP.send_message` gère cela " "automatiquement)." -#: library/email.policy.rst:561 +#: library/email.policy.rst:573 msgid "" "Suitable for serializing headers with for use in HTTP traffic. Like " "``SMTP`` except that ``max_line_length`` is set to ``None`` (unlimited)." @@ -954,7 +985,7 @@ msgstr "" "Comme ``SMTP`` sauf que ``max_line_length`` est défini sur ``None`` " "(illimité)." -#: library/email.policy.rst:567 +#: library/email.policy.rst:579 msgid "" "Convenience instance. The same as ``default`` except that " "``raise_on_defect`` is set to ``True``. This allows any policy to be made " @@ -964,7 +995,7 @@ msgstr "" "est défini sur ``True``. Cela permet de rendre stricte toute politique en " "écrivant ::" -#: library/email.policy.rst:574 +#: library/email.policy.rst:586 msgid "" "With all of these :class:`EmailPolicies <.EmailPolicy>`, the effective API " "of the email package is changed from the Python 3.2 API in the following " @@ -974,7 +1005,7 @@ msgstr "" "paquet de messagerie est modifiée par rapport à l'API Python 3.2 de la " "manière suivante :" -#: library/email.policy.rst:577 +#: library/email.policy.rst:589 msgid "" "Setting a header on a :class:`~email.message.Message` results in that header " "being parsed and a header object created." @@ -982,16 +1013,16 @@ msgstr "" "Définir un en-tête sur un :class:`~email.message.Message` entraîne l'analyse " "de cet en-tête et la création d'un objet d'en-tête." -#: library/email.policy.rst:580 +#: library/email.policy.rst:592 msgid "" "Fetching a header value from a :class:`~email.message.Message` results in " "that header being parsed and a header object created and returned." msgstr "" -"La récupération d'une valeur d'en-tête à partir d'un :class:`~email.message." -"Message` entraîne l'analyse de cet en-tête ainsi que la création et le " -"renvoi d'un objet d'en-tête." +"La récupération d'une valeur d'en-tête à partir " +"d'un :class:`~email.message.Message` entraîne l'analyse de cet en-tête ainsi " +"que la création et le renvoi d'un objet d'en-tête." -#: library/email.policy.rst:584 +#: library/email.policy.rst:596 msgid "" "Any header object, or any header that is refolded due to the policy " "settings, is folded using an algorithm that fully implements the RFC folding " @@ -1002,38 +1033,39 @@ msgstr "" "implémente entièrement les algorithmes de pliage de la RFC, notamment en " "sachant où les mots encodés sont requis et autorisés." -#: library/email.policy.rst:589 +#: library/email.policy.rst:601 msgid "" -"From the application view, this means that any header obtained through the :" -"class:`~email.message.EmailMessage` is a header object with extra " +"From the application view, this means that any header obtained through " +"the :class:`~email.message.EmailMessage` is a header object with extra " "attributes, whose string value is the fully decoded unicode value of the " "header. Likewise, a header may be assigned a new value, or a new header " "created, using a unicode string, and the policy will take care of converting " "the unicode string into the correct RFC encoded form." msgstr "" -"Du point de vue de l'application, cela signifie que tout en-tête obtenu via :" -"class:`~email.message.EmailMessage` est un objet d'en-tête avec des " +"Du point de vue de l'application, cela signifie que tout en-tête obtenu " +"via :class:`~email.message.EmailMessage` est un objet d'en-tête avec des " "attributs supplémentaires, dont la valeur de chaîne est la valeur Unicode " "entièrement décodée de l'en-tête. De même, un en-tête peut se voir attribuer " "une nouvelle valeur, ou un nouvel en-tête créé, à l'aide d'une chaîne " "Unicode, et la politique se chargera de convertir la chaîne Unicode dans la " "forme encodée RFC correcte." -#: library/email.policy.rst:596 +#: library/email.policy.rst:608 msgid "" -"The header objects and their attributes are described in :mod:`~email." -"headerregistry`." +"The header objects and their attributes are described " +"in :mod:`~email.headerregistry`." msgstr "" -"Les objets d'en-tête et leurs attributs sont décrits dans :mod:`~email." -"headerregistry`." +"Les objets d'en-tête et leurs attributs sont décrits " +"dans :mod:`~email.headerregistry`." -#: library/email.policy.rst:603 +#: library/email.policy.rst:615 +#, fuzzy msgid "" "This concrete :class:`Policy` is the backward compatibility policy. It " -"replicates the behavior of the email package in Python 3.2. The :mod:" -"`~email.policy` module also defines an instance of this class, :const:" -"`compat32`, that is used as the default policy. Thus the default behavior " -"of the email package is to maintain compatibility with Python 3.2." +"replicates the behavior of the email package in Python 3.2. The :mod:`!" +"policy` module also defines an instance of this class, :const:`compat32`, " +"that is used as the default policy. Thus the default behavior of the email " +"package is to maintain compatibility with Python 3.2." msgstr "" "Cette :class:`Policy` concrète est la politique de rétrocompatibilité. Elle " "reproduit le comportement du paquet de courrier électronique dans Python " @@ -1042,46 +1074,46 @@ msgstr "" "Ainsi, le comportement par défaut du paquet de messagerie est de maintenir " "la compatibilité avec Python 3.2." -#: library/email.policy.rst:609 +#: library/email.policy.rst:621 msgid "" -"The following attributes have values that are different from the :class:" -"`Policy` default:" +"The following attributes have values that are different from " +"the :class:`Policy` default:" msgstr "" "Les attributs suivants ont des valeurs différentes de la valeur par défaut " "de :class:`Policy` :" -#: library/email.policy.rst:615 +#: library/email.policy.rst:627 msgid "The default is ``True``." msgstr "La valeur par défaut est ``True``." -#: library/email.policy.rst:632 +#: library/email.policy.rst:644 msgid "The name and value are returned unmodified." msgstr "Le nom et la valeur sont renvoyés sans modification." -#: library/email.policy.rst:637 +#: library/email.policy.rst:649 msgid "" -"If the value contains binary data, it is converted into a :class:`~email." -"header.Header` object using the ``unknown-8bit`` charset. Otherwise it is " -"returned unmodified." +"If the value contains binary data, it is converted into " +"a :class:`~email.header.Header` object using the ``unknown-8bit`` charset. " +"Otherwise it is returned unmodified." msgstr "" -"Si la valeur contient des données binaires, elle est convertie en un objet :" -"class:`~email.header.Header` en utilisant le jeu de caractères " +"Si la valeur contient des données binaires, elle est convertie en un " +"objet :class:`~email.header.Header` en utilisant le jeu de caractères " "``unknown-8bit``. Sinon, elle est renvoyée sans modification." -#: library/email.policy.rst:644 +#: library/email.policy.rst:656 msgid "" "Headers are folded using the :class:`~email.header.Header` folding " "algorithm, which preserves existing line breaks in the value, and wraps each " "resulting line to the ``max_line_length``. Non-ASCII binary data are CTE " "encoded using the ``unknown-8bit`` charset." msgstr "" -"Les en-têtes sont mis en forme à l'aide de l'algorithme de pliage :class:" -"`~email.header.Header`, qui préserve les sauts de ligne existants dans la " -"valeur et encapsule chaque ligne résultante dans la ``max_line_length``. Les " -"données binaires non-ASCII sont codées en CTE à l'aide du jeu de caractères " -"``unknown-8bit``." +"Les en-têtes sont mis en forme à l'aide de l'algorithme de " +"pliage :class:`~email.header.Header`, qui préserve les sauts de ligne " +"existants dans la valeur et encapsule chaque ligne résultante dans la " +"``max_line_length``. Les données binaires non-ASCII sont codées en CTE à " +"l'aide du jeu de caractères ``unknown-8bit``." -#: library/email.policy.rst:652 +#: library/email.policy.rst:664 msgid "" "Headers are folded using the :class:`~email.header.Header` folding " "algorithm, which preserves existing line breaks in the value, and wraps each " @@ -1090,15 +1122,16 @@ msgid "" "Otherwise the original source header is used, with its existing line breaks " "and any (RFC invalid) binary data it may contain." msgstr "" -"Les en-têtes sont mis en forme à l'aide de l'algorithme de pliage :class:" -"`~email.header.Header`, qui préserve les sauts de ligne existants dans la " -"valeur et encapsule chaque ligne résultante dans la ``max_line_length``. Si " -"``cte_type`` est ``7bit``, les données binaires non-ASCII sont encodées en " -"CTE en utilisant le jeu de caractères ``unknown-8bit``. Sinon, l'en-tête " -"source d'origine est utilisé, avec ses sauts de ligne existants et toutes " -"les données binaires (non conformes à la RFC) qu'il peut contenir." +"Les en-têtes sont mis en forme à l'aide de l'algorithme de " +"pliage :class:`~email.header.Header`, qui préserve les sauts de ligne " +"existants dans la valeur et encapsule chaque ligne résultante dans la " +"``max_line_length``. Si ``cte_type`` est ``7bit``, les données binaires non-" +"ASCII sont encodées en CTE en utilisant le jeu de caractères " +"``unknown-8bit``. Sinon, l'en-tête source d'origine est utilisé, avec ses " +"sauts de ligne existants et toutes les données binaires (non conformes à la " +"RFC) qu'il peut contenir." -#: library/email.policy.rst:662 +#: library/email.policy.rst:674 msgid "" "An instance of :class:`Compat32`, providing backward compatibility with the " "behavior of the email package in Python 3.2." @@ -1106,11 +1139,18 @@ msgstr "" "Instance de :class:`Compat32`, offrant une rétrocompatibilité avec le " "comportement du paquet de messagerie dans Python 3.2." -#: library/email.policy.rst:667 +#: library/email.policy.rst:679 +msgid "" +"The :const:`compat32` policy should not be used as a policy " +"for :class:`~email.message.EmailMessage` objects, and should only be used to " +"serialize messages that were created using the :const:`compat32` policy." +msgstr "" + +#: library/email.policy.rst:686 msgid "Footnotes" msgstr "Notes" -#: library/email.policy.rst:668 +#: library/email.policy.rst:687 msgid "" "Originally added in 3.3 as a :term:`provisional feature `." diff --git a/library/email.utils.po b/library/email.utils.po index fdcac24c0..32b7458f3 100644 --- a/library/email.utils.po +++ b/library/email.utils.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-03-15 22:58+0100\n" "Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \n" @@ -25,22 +25,22 @@ msgid "**Source code:** :source:`Lib/email/utils.py`" msgstr "**Code source :** :source:`Lib/email/utils.py`" #: library/email.utils.rst:11 +#, fuzzy msgid "" -"There are a couple of useful utilities provided in the :mod:`email.utils` " +"There are a couple of useful utilities provided in the :mod:`!email.utils` " "module:" msgstr "" -"Il y a quelques utilitaires utiles fournis dans le module :mod:`email." -"utils` :" +"Il y a quelques utilitaires utiles fournis dans le " +"module :mod:`email.utils` :" #: library/email.utils.rst:16 #, fuzzy msgid "" "Return local time as an aware datetime object. If called without arguments, " -"return current time. Otherwise *dt* argument should be a :class:`~datetime." -"datetime` instance, and it is converted to the local time zone according to " -"the system time zone database. If *dt* is naive (that is, ``dt.tzinfo`` is " -"``None``), it is assumed to be in local time. The *isdst* parameter is " -"ignored." +"return current time. Otherwise *dt* argument should be " +"a :class:`~datetime.datetime` instance, and it is converted to the local " +"time zone according to the system time zone database. If *dt* is naive " +"(that is, ``dt.tzinfo`` is ``None``), it is assumed to be in local time." msgstr "" "Renvoie l'heure locale en tant qu'objet *datetime* avisé. S'il est appelé " "sans arguments, renvoie l'heure actuelle. Sinon, l'argument *dt* doit être " @@ -53,19 +53,19 @@ msgstr "" "valeur négative pour *isdst* fait que ``localtime`` tente de deviner si " "l'heure d'été est en vigueur pour l'heure spécifiée." -#: library/email.utils.rst:25 +#: library/email.utils.rst:24 msgid "The *isdst* parameter." msgstr "" -#: library/email.utils.rst:30 +#: library/email.utils.rst:29 msgid "" -"Returns a string suitable for an :rfc:`2822`\\ -compliant :mailheader:" -"`Message-ID` header. Optional *idstring* if given, is a string used to " -"strengthen the uniqueness of the message id. Optional *domain* if given " -"provides the portion of the msgid after the '@'. The default is the local " -"hostname. It is not normally necessary to override this default, but may be " -"useful certain cases, such as a constructing distributed system that uses a " -"consistent domain name across multiple hosts." +"Returns a string suitable for an :rfc:`2822`\\ " +"-compliant :mailheader:`Message-ID` header. Optional *idstring* if given, " +"is a string used to strengthen the uniqueness of the message id. Optional " +"*domain* if given provides the portion of the msgid after the '@'. The " +"default is the local hostname. It is not normally necessary to override " +"this default, but may be useful certain cases, such as a constructing " +"distributed system that uses a consistent domain name across multiple hosts." msgstr "" "Renvoie une chaîne adaptée à un en-tête :mailheader:`Message-ID` " "compatible :rfc:`2822`. *idstring*, s'il est fourni, est une chaîne utilisée " @@ -77,11 +77,11 @@ msgstr "" "un nom de domaine cohérent sur plusieurs hôtes." # suit un : -#: library/email.utils.rst:38 +#: library/email.utils.rst:37 msgid "Added the *domain* keyword." msgstr "ajout du mot-clé *domaine*." -#: library/email.utils.rst:42 +#: library/email.utils.rst:41 msgid "" "The remaining functions are part of the legacy (``Compat32``) email API. " "There is no need to directly use these with the new API, since the parsing " @@ -94,7 +94,7 @@ msgstr "" "effectués automatiquement par le mécanisme d'analyse d'en-tête de la " "nouvelle API." -#: library/email.utils.rst:50 +#: library/email.utils.rst:49 msgid "" "Return a new string with backslashes in *str* replaced by two backslashes, " "and double quotes replaced by backslash-double quote." @@ -104,7 +104,7 @@ msgstr "" "doubles remplacés par des guillemets doubles échappés par une barre oblique " "inverse." -#: library/email.utils.rst:56 +#: library/email.utils.rst:55 msgid "" "Return a new string which is an *unquoted* version of *str*. If *str* ends " "and begins with double quotes, they are stripped off. Likewise if *str* " @@ -115,7 +115,7 @@ msgstr "" "supprimés. De même, si *str* est encadrée par des chevrons mathématiques, " "ils sont supprimés." -#: library/email.utils.rst:63 +#: library/email.utils.rst:62 msgid "" "Parse address -- which should be the value of some address-containing field " "such as :mailheader:`To` or :mailheader:`Cc` -- into its constituent " @@ -128,21 +128,21 @@ msgstr "" "information, sauf si l'analyse échoue, alors un couple ``('', '')`` est " "renvoyé." -#: library/email.utils.rst:96 +#: library/email.utils.rst:95 msgid "" "If *strict* is true, use a strict parser which rejects malformed inputs." msgstr "" -#: library/email.utils.rst:108 +#: library/email.utils.rst:107 msgid "Add *strict* optional parameter and reject malformed inputs by default." msgstr "" -#: library/email.utils.rst:76 +#: library/email.utils.rst:75 msgid "" "The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form " -"``(realname, email_address)`` and returns the string value suitable for a :" -"mailheader:`To` or :mailheader:`Cc` header. If the first element of *pair* " -"is false, then the second element is returned unmodified." +"``(realname, email_address)`` and returns the string value suitable for " +"a :mailheader:`To` or :mailheader:`Cc` header. If the first element of " +"*pair* is false, then the second element is returned unmodified." msgstr "" "L'inverse de :meth:`parseaddr`, elle prend un couple de la forme " "``(realname, email_address)`` et renvoie la valeur de chaîne appropriée pour " @@ -150,24 +150,24 @@ msgstr "" "*pair* s'évalue à faux, alors le deuxième élément est renvoyé sans " "modification." -#: library/email.utils.rst:81 +#: library/email.utils.rst:80 msgid "" "Optional *charset* is the character set that will be used in the :rfc:`2047` " "encoding of the ``realname`` if the ``realname`` contains non-ASCII " -"characters. Can be an instance of :class:`str` or a :class:`~email.charset." -"Charset`. Defaults to ``utf-8``." +"characters. Can be an instance of :class:`str` or " +"a :class:`~email.charset.Charset`. Defaults to ``utf-8``." msgstr "" "Le *charset* optionnel est le jeu de caractères qui est utilisé dans " "l'encodage :rfc:`2047` du ``realname`` si le ``realname`` contient des " -"caractères non-ASCII. Cela peut être une instance de :class:`str` ou un :" -"class:`~email.charset.Charset`. La valeur par défaut est ``utf-8``." +"caractères non-ASCII. Cela peut être une instance de :class:`str` ou " +"un :class:`~email.charset.Charset`. La valeur par défaut est ``utf-8``." # suit un : -#: library/email.utils.rst:86 +#: library/email.utils.rst:85 msgid "Added the *charset* option." msgstr "ajout de l'option *charset*." -#: library/email.utils.rst:92 +#: library/email.utils.rst:91 #, fuzzy msgid "" "This method returns a list of 2-tuples of the form returned by " @@ -176,34 +176,34 @@ msgid "" msgstr "" "Cette méthode renvoie une liste de couples de la forme renvoyée par " "``parseaddr()``. *fieldvalues* est une séquence de valeurs de champ d'en-" -"tête pouvant être renvoyée par :meth:`Message.get_all `. Voici un exemple simple qui récupère tous les destinataires d'un " -"message ::" +"tête pouvant être renvoyée par :meth:`Message.get_all " +"`. Voici un exemple simple qui récupère tous " +"les destinataires d'un message ::" -#: library/email.utils.rst:98 +#: library/email.utils.rst:97 msgid "Here's a simple example that gets all the recipients of a message::" msgstr "" -#: library/email.utils.rst:114 +#: library/email.utils.rst:113 msgid "" "Attempts to parse a date according to the rules in :rfc:`2822`. however, " "some mailers don't follow that format as specified, so :func:`parsedate` " -"tries to guess correctly in such cases. *date* is a string containing an :" -"rfc:`2822` date, such as ``\"Mon, 20 Nov 1995 19:12:08 -0500\"``. If it " -"succeeds in parsing the date, :func:`parsedate` returns a 9-tuple that can " -"be passed directly to :func:`time.mktime`; otherwise ``None`` will be " +"tries to guess correctly in such cases. *date* is a string containing " +"an :rfc:`2822` date, such as ``\"Mon, 20 Nov 1995 19:12:08 -0500\"``. If " +"it succeeds in parsing the date, :func:`parsedate` returns a 9-tuple that " +"can be passed directly to :func:`time.mktime`; otherwise ``None`` will be " "returned. Note that indexes 6, 7, and 8 of the result tuple are not usable." msgstr "" "Tente d'analyser une date selon les règles de la :rfc:`2822`. Cependant, " -"certains expéditeurs ne suivent pas ce format comme spécifié, donc :func:" -"`parsedate` fait son possible dans de tels cas. *date* est une chaîne " -"contenant une date :rfc:`2822`, telle que ``\"Mon, 20 Nov 1995 19:12:08 " -"-0500\"``. Si elle réussit à analyser la date, :func:`parsedate` renvoie un " -"9-uplet qui peut être passé directement à :func:`time.mktime` ; sinon " -"``None`` est renvoyé. Notez que les indices 6, 7 et 8 du *n*-uplet résultat " -"ne sont pas utilisables." - -#: library/email.utils.rst:125 +"certains expéditeurs ne suivent pas ce format comme spécifié, " +"donc :func:`parsedate` fait son possible dans de tels cas. *date* est une " +"chaîne contenant une date :rfc:`2822`, telle que ``\"Mon, 20 Nov 1995 " +"19:12:08 -0500\"``. Si elle réussit à analyser la date, :func:`parsedate` " +"renvoie un 9-uplet qui peut être passé directement à :func:`time.mktime` ; " +"sinon ``None`` est renvoyé. Notez que les indices 6, 7 et 8 du *n*-uplet " +"résultat ne sont pas utilisables." + +#: library/email.utils.rst:124 msgid "" "Performs the same function as :func:`parsedate`, but returns either ``None`` " "or a 10-tuple; the first 9 elements make up a tuple that can be passed " @@ -222,32 +222,32 @@ msgstr "" "l'UTC. Notez que les indices 6, 7 et 8 du *n*-uplet résultat ne sont pas " "utilisables." -#: library/email.utils.rst:135 +#: library/email.utils.rst:134 msgid "" -"The inverse of :func:`format_datetime`. Performs the same function as :func:" -"`parsedate`, but on success returns a :mod:`~datetime.datetime`; otherwise " -"``ValueError`` is raised if *date* contains an invalid value such as an hour " -"greater than 23 or a timezone offset not between -24 and 24 hours. If the " -"input date has a timezone of ``-0000``, the ``datetime`` will be a naive " -"``datetime``, and if the date is conforming to the RFCs it will represent a " -"time in UTC but with no indication of the actual source timezone of the " -"message the date comes from. If the input date has any other valid timezone " -"offset, the ``datetime`` will be an aware ``datetime`` with the " +"The inverse of :func:`format_datetime`. Performs the same function " +"as :func:`parsedate`, but on success returns a :mod:`~datetime.datetime`; " +"otherwise ``ValueError`` is raised if *date* contains an invalid value such " +"as an hour greater than 23 or a timezone offset not between -24 and 24 " +"hours. If the input date has a timezone of ``-0000``, the ``datetime`` will " +"be a naive ``datetime``, and if the date is conforming to the RFCs it will " +"represent a time in UTC but with no indication of the actual source timezone " +"of the message the date comes from. If the input date has any other valid " +"timezone offset, the ``datetime`` will be an aware ``datetime`` with the " "corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`." msgstr "" -"L'inverse de :func:`format_datetime`. Effectue la même fonction que :func:" -"`parsedate` mais, en cas de succès, renvoie un :mod:`~datetime.datetime` ; " -"sinon une ``ValueError`` est levée si *date* contient une valeur invalide " -"telle qu'une heure supérieure à 23 ou un décalage de fuseau horaire non " -"compris entre −24 et 24 heures. Si la date d'entrée a un fuseau horaire de " -"``-0000``, le ``datetime`` sera un ``datetime`` naïf, et si la date est " -"conforme aux RFC, elle représentera une heure en UTC mais sans indication du " -"fuseau horaire source réel du message d'où provient la date. Si la date " -"d'entrée a un autre décalage de fuseau horaire valide, le ``datetime`` sera " -"un ``datetime`` avisé avec le :class:`~datetime.timezone` :class:`~datetime." -"tzinfo` adéquat." - -#: library/email.utils.rst:151 +"L'inverse de :func:`format_datetime`. Effectue la même fonction " +"que :func:`parsedate` mais, en cas de succès, renvoie " +"un :mod:`~datetime.datetime` ; sinon une ``ValueError`` est levée si *date* " +"contient une valeur invalide telle qu'une heure supérieure à 23 ou un " +"décalage de fuseau horaire non compris entre −24 et 24 heures. Si la date " +"d'entrée a un fuseau horaire de ``-0000``, le ``datetime`` sera un " +"``datetime`` naïf, et si la date est conforme aux RFC, elle représentera une " +"heure en UTC mais sans indication du fuseau horaire source réel du message " +"d'où provient la date. Si la date d'entrée a un autre décalage de fuseau " +"horaire valide, le ``datetime`` sera un ``datetime`` avisé avec " +"le :class:`~datetime.timezone` :class:`~datetime.tzinfo` adéquat." + +#: library/email.utils.rst:150 msgid "" "Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp " "(seconds since the Epoch). If the timezone item in the tuple is ``None``, " @@ -257,22 +257,22 @@ msgstr "" "(en secondes depuis *Epoch*). Si l'élément de fuseau horaire dans le *n*-" "uplet est ``None``, elle considère que l'heure est locale." -#: library/email.utils.rst:158 +#: library/email.utils.rst:157 msgid "Returns a date string as per :rfc:`2822`, e.g.::" msgstr "Renvoie une chaîne de date conforme à la :rfc:`2822`, par exemple ::" -#: library/email.utils.rst:162 +#: library/email.utils.rst:161 #, fuzzy msgid "" -"Optional *timeval* if given is a floating-point time value as accepted by :" -"func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is " -"used." +"Optional *timeval* if given is a floating-point time value as accepted " +"by :func:`time.gmtime` and :func:`time.localtime`, otherwise the current " +"time is used." msgstr "" "*timeval*, s'il est fourni, est une valeur de temps à virgule flottante " "telle qu'acceptée par :func:`time.gmtime` et :func:`time.localtime`, sinon " "l'heure actuelle est utilisée." -#: library/email.utils.rst:166 +#: library/email.utils.rst:165 msgid "" "Optional *localtime* is a flag that when ``True``, interprets *timeval*, and " "returns a date relative to the local timezone instead of UTC, properly " @@ -284,7 +284,7 @@ msgstr "" "lieu de UTC, en tenant correctement compte de l'heure d'été. La valeur par " "défaut est ``False``, ce qui signifie que l'UTC est utilisée." -#: library/email.utils.rst:171 +#: library/email.utils.rst:170 msgid "" "Optional *usegmt* is a flag that when ``True``, outputs a date string with " "the timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. " @@ -297,7 +297,7 @@ msgstr "" "protocoles (tels que HTTP). Cela ne s'applique que lorsque *localtime* est " "``False``. La valeur par défaut est ``False``." -#: library/email.utils.rst:179 +#: library/email.utils.rst:178 msgid "" "Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is " "a naive datetime, it is assumed to be \"UTC with no information about the " @@ -318,11 +318,11 @@ msgstr "" "à la place du décalage numérique du fuseau horaire. Cela fournit un moyen de " "générer des en-têtes de date HTTP conformes aux normes." -#: library/email.utils.rst:193 +#: library/email.utils.rst:192 msgid "Decode the string *s* according to :rfc:`2231`." msgstr "Décode la chaîne *s* selon la :rfc:`2231`." -#: library/email.utils.rst:198 +#: library/email.utils.rst:197 msgid "" "Encode the string *s* according to :rfc:`2231`. Optional *charset* and " "*language*, if given is the character set name and language name to use. If " @@ -336,37 +336,37 @@ msgstr "" "est donné mais que *language* ne l'est pas, la chaîne est encodée en " "utilisant la chaîne vide pour *language*." -#: library/email.utils.rst:206 +#: library/email.utils.rst:205 msgid "" -"When a header parameter is encoded in :rfc:`2231` format, :meth:`Message." -"get_param ` may return a 3-tuple containing " -"the character set, language, and value. :func:`collapse_rfc2231_value` " -"turns this into a unicode string. Optional *errors* is passed to the " -"*errors* argument of :class:`str`'s :func:`~str.encode` method; it defaults " -"to ``'replace'``. Optional *fallback_charset* specifies the character set " -"to use if the one in the :rfc:`2231` header is not known by Python; it " -"defaults to ``'us-ascii'``." +"When a header parameter is encoded in :rfc:`2231` " +"format, :meth:`Message.get_param ` may " +"return a 3-tuple containing the character set, language, and " +"value. :func:`collapse_rfc2231_value` turns this into a unicode string. " +"Optional *errors* is passed to the *errors* argument " +"of :class:`str`'s :func:`~str.encode` method; it defaults to ``'replace'``. " +"Optional *fallback_charset* specifies the character set to use if the one in " +"the :rfc:`2231` header is not known by Python; it defaults to ``'us-ascii'``." msgstr "" -"Lorsqu'un paramètre d'en-tête est encodé au format :rfc:`2231`, :meth:" -"`Message.get_param ` peut renvoyer un " -"triplet contenant le jeu de caractères, la langue et la valeur. :func:" -"`collapse_rfc2231_value` transforme cela en une chaîne Unicode. *errors* " -"(facultatif) est passé à l'argument *errors* de la méthode :func:`~str." -"encode` de :class:`str` ; sa valeur par défaut est ``'replace'``. " -"*fallback_charset* (facultatif) spécifie le jeu de caractères à utiliser si " -"celui de l'en-tête :rfc:`2231` n'est pas connu de Python ; sa valeur par " -"défaut est ``'us-ascii'``." - -#: library/email.utils.rst:215 +"Lorsqu'un paramètre d'en-tête est encodé au " +"format :rfc:`2231`, :meth:`Message.get_param " +"` peut renvoyer un triplet contenant le jeu " +"de caractères, la langue et la valeur. :func:`collapse_rfc2231_value` " +"transforme cela en une chaîne Unicode. *errors* (facultatif) est passé à " +"l'argument *errors* de la méthode :func:`~str.encode` de :class:`str` ; sa " +"valeur par défaut est ``'replace'``. *fallback_charset* (facultatif) " +"spécifie le jeu de caractères à utiliser si celui de l'en-tête :rfc:`2231` " +"n'est pas connu de Python ; sa valeur par défaut est ``'us-ascii'``." + +#: library/email.utils.rst:214 msgid "" "For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is " "not a tuple, it should be a string and it is returned unquoted." msgstr "" -"Pour plus de commodité, si la *valeur* transmise à :func:" -"`collapse_rfc2231_value` n'est pas un *n*-uplet, ce doit être une chaîne et " -"elle est renvoyée sans guillemets." +"Pour plus de commodité, si la *valeur* transmise " +"à :func:`collapse_rfc2231_value` n'est pas un *n*-uplet, ce doit être une " +"chaîne et elle est renvoyée sans guillemets." -#: library/email.utils.rst:221 +#: library/email.utils.rst:220 msgid "" "Decode parameters list according to :rfc:`2231`. *params* is a sequence of " "2-tuples containing elements of the form ``(content-type, string-value)``." @@ -375,11 +375,11 @@ msgstr "" "séquence de couples contenant des éléments de la forme ``(content-type, " "string-value)``." -#: library/email.utils.rst:226 +#: library/email.utils.rst:225 msgid "Footnotes" msgstr "Notes" -#: library/email.utils.rst:227 +#: library/email.utils.rst:226 msgid "" "Note that the sign of the timezone offset is the opposite of the sign of the " "``time.timezone`` variable for the same timezone; the latter variable " diff --git a/library/ensurepip.po b/library/ensurepip.po index 8f064d668..ac110338c 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-10-17 12:41+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -25,8 +25,9 @@ msgid "**Source code:** :source:`Lib/ensurepip`" msgstr "" #: library/ensurepip.rst:14 +#, fuzzy msgid "" -"The :mod:`ensurepip` package provides support for bootstrapping the ``pip`` " +"The :mod:`!ensurepip` package provides support for bootstrapping the ``pip`` " "installer into an existing Python installation or virtual environment. This " "bootstrapping approach reflects the fact that ``pip`` is an independent " "project with its own release cycle, and the latest available stable version " @@ -61,27 +62,35 @@ msgstr "" "Ce module n'accède *pas* au réseau. Tout ce qu'il faut pour amorcer ``pip`` " "est compris dans le paquet." -#: library/ensurepip.rst:35 +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + +#: library/ensurepip.rst:37 msgid ":ref:`installing-index`" msgstr ":ref:`installing-index`" -#: library/ensurepip.rst:36 +#: library/ensurepip.rst:38 msgid "The end user guide for installing Python packages" msgstr "Guide de l'utilisateur final pour installer des paquets Python" -#: library/ensurepip.rst:38 +#: library/ensurepip.rst:40 msgid ":pep:`453`: Explicit bootstrapping of pip in Python installations" msgstr "" ":pep:`453` : Amorçage explicite de pip dans les installations de Python" -#: library/ensurepip.rst:39 +#: library/ensurepip.rst:41 msgid "The original rationale and specification for this module." msgstr "" "Les motivations pour l'ajout de ce module et sa spécification d'origine" #: includes/wasm-mobile-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-mobile-notavail.rst:5 msgid "" @@ -89,22 +98,23 @@ msgid "" "availability>` or :ref:`WebAssembly platforms `." msgstr "" -#: library/ensurepip.rst:44 -msgid "Command line interface" +#: library/ensurepip.rst:48 +#, fuzzy +msgid "Command-line interface" msgstr "Interface en ligne de commande" -#: library/ensurepip.rst:46 +#: library/ensurepip.rst:52 msgid "" "The command line interface is invoked using the interpreter's ``-m`` switch." msgstr "" "On fait appel à l'interface en ligne de commande à l'aide de l'option ``-m`` " "de l'interpréteur." -#: library/ensurepip.rst:48 +#: library/ensurepip.rst:54 msgid "The simplest possible invocation is::" msgstr "L'invocation la plus simple est ::" -#: library/ensurepip.rst:52 +#: library/ensurepip.rst:58 msgid "" "This invocation will install ``pip`` if it is not already installed, but " "otherwise does nothing. To ensure the installed version of ``pip`` is at " @@ -116,7 +126,7 @@ msgstr "" "récente que celle embarquée dans ``ensurepip``, passer l'option ``--" "upgrade`` ::" -#: library/ensurepip.rst:59 +#: library/ensurepip.rst:65 msgid "" "By default, ``pip`` is installed into the current virtual environment (if " "one is active) or into the system site packages (if there is no active " @@ -127,28 +137,29 @@ msgstr "" "en a un, ou bien dans le dossier ``site-packages`` du système. L'emplacement " "d'installation se règle à travers deux options :" -#: library/ensurepip.rst:64 +#: library/ensurepip.rst:72 #, fuzzy msgid "" -":samp:`--root {dir}`: Installs ``pip`` relative to the given root directory " -"rather than the root of the currently active virtual environment (if any) or " -"the default root for the current Python installation." +"Installs ``pip`` relative to the given root directory rather than the root " +"of the currently active virtual environment (if any) or the default root for " +"the current Python installation." msgstr "" "``--root `` : installe ``pip`` sur un chemin relatif à la racine " "*dossier* au lieu de la racine de l'environnement virtuel ou la racine par " "défaut de l'installation de Python." -#: library/ensurepip.rst:67 +#: library/ensurepip.rst:78 +#, fuzzy msgid "" -"``--user``: Installs ``pip`` into the user site packages directory rather " -"than globally for the current Python installation (this option is not " -"permitted inside an active virtual environment)." +"Installs ``pip`` into the user site packages directory rather than globally " +"for the current Python installation (this option is not permitted inside an " +"active virtual environment)." msgstr "" "``--user`` : installe ``pip`` dans le dossier ``site-packages`` propre à " "l'utilisateur au lieu du dossier global de l'installation de Python. Cette " "option n'est pas valide dans un environnement virtuel." -#: library/ensurepip.rst:71 +#: library/ensurepip.rst:82 msgid "" "By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " "stands for the version of Python used to invoke ``ensurepip``). The scripts " @@ -158,38 +169,41 @@ msgstr "" "version de Python avec laquelle ``ensurepip`` est utilisé). Cela se contrôle " "par deux options supplémentaires :" -#: library/ensurepip.rst:76 +#: library/ensurepip.rst:89 +#, fuzzy msgid "" -"``--altinstall``: if an alternate installation is requested, the ``pipX`` " -"script will *not* be installed." +"If an alternate installation is requested, the ``pipX`` script will *not* be " +"installed." msgstr "" "``--altinstall`` : dans ce mode d'« installation parallèle », seule la " "commande ``pipX.Y`` est ajoutée, et pas la commande ``pipX``." -#: library/ensurepip.rst:79 +#: library/ensurepip.rst:94 +#, fuzzy msgid "" -"``--default-pip``: if a \"default pip\" installation is requested, the " -"``pip`` script will be installed in addition to the two regular scripts." +"If a \"default pip\" installation is requested, the ``pip`` script will be " +"installed in addition to the two regular scripts." msgstr "" "``--default-pip`` : ce mode d'« installation de la version par défaut » crée " "la commande ``pip`` en plus de ``pipX`` et ``pipX.Y``." -#: library/ensurepip.rst:82 +#: library/ensurepip.rst:97 msgid "" "Providing both of the script selection options will trigger an exception." msgstr "Combiner ces deux options conduit à une exception." -#: library/ensurepip.rst:86 +#: library/ensurepip.rst:100 msgid "Module API" msgstr "API du module" -#: library/ensurepip.rst:88 -msgid ":mod:`ensurepip` exposes two functions for programmatic use:" +#: library/ensurepip.rst:102 +#, fuzzy +msgid ":mod:`!ensurepip` exposes two functions for programmatic use:" msgstr "" "Le module :mod:`ensurepip` définit deux fonctions pour utilisation dans les " "programmes :" -#: library/ensurepip.rst:92 +#: library/ensurepip.rst:106 msgid "" "Returns a string specifying the available version of pip that will be " "installed when bootstrapping an environment." @@ -197,12 +211,12 @@ msgstr "" "Renvoie, sous forme de chaîne, la version de ``pip`` qui serait installée " "par ``ensurepip``." -#: library/ensurepip.rst:99 +#: library/ensurepip.rst:113 msgid "Bootstraps ``pip`` into the current or designated environment." msgstr "" "Amorce ``pip`` dans l'environnement courant ou un environnement spécifique." -#: library/ensurepip.rst:101 +#: library/ensurepip.rst:115 msgid "" "*root* specifies an alternative root directory to install relative to. If " "*root* is ``None``, then installation uses the default install location for " @@ -212,7 +226,7 @@ msgstr "" "*root* vaut ``None`` (la valeur par défaut), l'installation se fait dans la " "racine par défaut pour l'environnement courant." -#: library/ensurepip.rst:105 +#: library/ensurepip.rst:119 msgid "" "*upgrade* indicates whether or not to upgrade an existing installation of an " "earlier version of ``pip`` to the available version." @@ -221,7 +235,7 @@ msgstr "" "version plus ancienne de ``pip`` déjà installée vers la version embarquée " "dans ``ensurepip``." -#: library/ensurepip.rst:108 +#: library/ensurepip.rst:122 msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." @@ -230,7 +244,7 @@ msgstr "" "disponible pour cet utilisateur uniquement, et non pour tous les " "utilisateurs de l'installation de Python." -#: library/ensurepip.rst:111 +#: library/ensurepip.rst:125 msgid "" "By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " "stands for the current version of Python)." @@ -238,11 +252,11 @@ msgstr "" "Par défaut, les commandes créées sont ``pipX`` et ``pipX.Y`` (où X.Y est la " "version de Python)." -#: library/ensurepip.rst:114 +#: library/ensurepip.rst:128 msgid "If *altinstall* is set, then ``pipX`` will *not* be installed." msgstr "Si *altinstall* vaut vrai, ``pipX`` n'est pas créée." -#: library/ensurepip.rst:116 +#: library/ensurepip.rst:130 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." @@ -250,40 +264,40 @@ msgstr "" "Si *default_pip* vaut vrai, la commande ``pip`` est créée en plus des deux " "autres." -#: library/ensurepip.rst:119 +#: library/ensurepip.rst:133 msgid "" "Setting both *altinstall* and *default_pip* will trigger :exc:`ValueError`." msgstr "" -"Le fait de combiner *altinstall* et *default_pip* lève l'exception :exc:" -"`ValueError`." +"Le fait de combiner *altinstall* et *default_pip* lève " +"l'exception :exc:`ValueError`." -#: library/ensurepip.rst:122 +#: library/ensurepip.rst:136 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." msgstr "" -"*verbosity* règle le niveau de verbosité des messages émis sur :data:`sys." -"stdout` pendant l'amorçage." +"*verbosity* règle le niveau de verbosité des messages émis " +"sur :data:`sys.stdout` pendant l'amorçage." -#: library/ensurepip.rst:125 +#: library/ensurepip.rst:139 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." msgstr "" -"Cette fonction lève un :ref:`événement d'audit ` ``ensurepip." -"bootstrap`` avec l'argument ``root``." +"Cette fonction lève un :ref:`événement d'audit ` " +"``ensurepip.bootstrap`` avec l'argument ``root``." -#: library/ensurepip.rst:129 +#: library/ensurepip.rst:143 msgid "" -"The bootstrapping process has side effects on both ``sys.path`` and ``os." -"environ``. Invoking the command line interface in a subprocess instead " +"The bootstrapping process has side effects on both ``sys.path`` and " +"``os.environ``. Invoking the command line interface in a subprocess instead " "allows these side effects to be avoided." msgstr "" -"Le processus d'amorçage a des effets de bord sur ``sys.path`` et ``os." -"environ``. Pour les éviter, on peut appeler l'interface en ligne de commande " -"dans un sous-processus." +"Le processus d'amorçage a des effets de bord sur ``sys.path`` et " +"``os.environ``. Pour les éviter, on peut appeler l'interface en ligne de " +"commande dans un sous-processus." -#: library/ensurepip.rst:135 +#: library/ensurepip.rst:149 msgid "" "The bootstrapping process may install additional modules required by " "``pip``, but other software should not assume those dependencies will always " diff --git a/library/enum.po b/library/enum.po index 73f68b37a..6a07c6595 100644 --- a/library/enum.po +++ b/library/enum.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-01-07 22:57+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -20,11 +20,15 @@ msgstr "" msgid ":mod:`!enum` --- Support for enumerations" msgstr ":mod:`enum` — Énumérations" -#: library/enum.rst:14 +#: library/enum.rst:9 msgid "**Source code:** :source:`Lib/enum.py`" msgstr "**Code source :** :source:`Lib/enum.py`" -#: library/enum.rst:18 +#: library/enum.rst:11 +msgid "Important" +msgstr "" + +#: library/enum.rst:13 msgid "" "This page contains the API reference information. For tutorial information " "and discussion of more advanced topics, see" @@ -33,29 +37,29 @@ msgstr "" "informations sur le didacticiel et une discussion sur des sujets plus " "avancés, reportez-vous à" -#: library/enum.rst:21 +#: library/enum.rst:16 msgid ":ref:`Basic Tutorial `" msgstr ":ref:`Tutoriel de base `" -#: library/enum.rst:22 +#: library/enum.rst:17 msgid ":ref:`Advanced Tutorial `" msgstr ":ref:`Tutoriel avancé `" -#: library/enum.rst:23 +#: library/enum.rst:18 msgid ":ref:`Enum Cookbook `" msgstr ":ref:`Recettes pour les énumérations `" -#: library/enum.rst:27 +#: library/enum.rst:22 msgid "An enumeration:" msgstr "Une énumération :" -#: library/enum.rst:29 +#: library/enum.rst:24 msgid "is a set of symbolic names (members) bound to unique values" msgstr "" "est un ensemble de noms symboliques (appelés membres) liés à des valeurs " "uniques," -#: library/enum.rst:30 +#: library/enum.rst:25 #, fuzzy msgid "" "can be iterated over to return its canonical (i.e. non-alias) members in " @@ -64,15 +68,15 @@ msgstr "" "peut être utilisée comme itérable et renvoie ses membres dans l'ordre de " "définition," -#: library/enum.rst:32 +#: library/enum.rst:27 msgid "uses *call* syntax to return members by value" msgstr "utilise la syntaxe *d'appel* pour renvoyer les valeurs de ses membres," -#: library/enum.rst:33 +#: library/enum.rst:28 msgid "uses *index* syntax to return members by name" msgstr "utilise la syntaxe *d'indiçage* pour renvoyer les noms de ses membres." -#: library/enum.rst:35 +#: library/enum.rst:30 msgid "" "Enumerations are created either by using :keyword:`class` syntax, or by " "using function-call syntax::" @@ -80,27 +84,27 @@ msgstr "" "Les énumérations sont créées soit en utilisant la syntaxe :keyword:`class`, " "soit en utilisant la syntaxe d'appel de fonction ::" -#: library/enum.rst:49 +#: library/enum.rst:44 msgid "" "Even though we can use :keyword:`class` syntax to create Enums, Enums are " "not normal Python classes. See :ref:`How are Enums different? ` for more details." msgstr "" "Même si on peut utiliser la syntaxe :keyword:`class` pour créer des " -"énumérations, les *Enums* ne sont pas des vraies classes Python. Lisez :ref:" -"`En quoi les énumérations sont-elles différentes ? ` " -"pour plus de détails." +"énumérations, les *Enums* ne sont pas des vraies classes Python. " +"Lisez :ref:`En quoi les énumérations sont-elles différentes ? ` pour plus de détails." -#: library/enum.rst:53 +#: library/enum.rst:48 msgid "Nomenclature" msgstr "Nomenclature" -#: library/enum.rst:55 +#: library/enum.rst:50 #, fuzzy msgid "The class :class:`!Color` is an *enumeration* (or *enum*)" msgstr "La classe :class:`Color` est une *énumération* (ou une *enum*)." -#: library/enum.rst:56 +#: library/enum.rst:51 #, fuzzy msgid "" "The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are " @@ -110,7 +114,7 @@ msgstr "" "*membres de l'énumération* (ou *membres*) et sont fonctionnellement des " "constantes." -#: library/enum.rst:58 +#: library/enum.rst:53 #, fuzzy msgid "" "The enum members have *names* and *values* (the name of :attr:`!Color.RED` " @@ -120,95 +124,97 @@ msgstr "" "de :attr:`Color.RED` est ``RED``, la valeur de :attr:`Color.BLUE` est ``3``, " "etc." -#: library/enum.rst:65 -msgid "Module Contents" +#: library/enum.rst:60 +#, fuzzy +msgid "Module contents" msgstr "Contenu du module" -#: library/enum.rst:67 +#: library/enum.rst:62 msgid ":class:`EnumType`" msgstr ":class:`EnumType`" -#: library/enum.rst:69 +#: library/enum.rst:64 msgid "The ``type`` for Enum and its subclasses." msgstr "Le ``type`` d'*Enum* et de ses sous-classes." -#: library/enum.rst:71 +#: library/enum.rst:66 msgid ":class:`Enum`" msgstr ":class:`Enum`" -#: library/enum.rst:73 +#: library/enum.rst:68 msgid "Base class for creating enumerated constants." msgstr "Classe mère pour créer une énumération de constantes." -#: library/enum.rst:75 +#: library/enum.rst:70 msgid ":class:`IntEnum`" msgstr ":class:`IntEnum`" -#: library/enum.rst:77 +#: library/enum.rst:72 msgid "" -"Base class for creating enumerated constants that are also subclasses of :" -"class:`int`. (`Notes`_)" +"Base class for creating enumerated constants that are also subclasses " +"of :class:`int`. (`Notes`_)" msgstr "" "Classe mère pour créer une énumération de constantes qui sont également des " "sous-classes de :class:`int` (`notes`_)." -#: library/enum.rst:80 +#: library/enum.rst:75 msgid ":class:`StrEnum`" msgstr ":class:`StrEnum`" -#: library/enum.rst:82 +#: library/enum.rst:77 msgid "" -"Base class for creating enumerated constants that are also subclasses of :" -"class:`str`. (`Notes`_)" +"Base class for creating enumerated constants that are also subclasses " +"of :class:`str`. (`Notes`_)" msgstr "" "Classe mère pour créer une énumération de constantes qui sont également des " "sous-classes de :class:`str` (`notes`_)." -#: library/enum.rst:85 +#: library/enum.rst:80 msgid ":class:`Flag`" msgstr ":class:`Flag`" -#: library/enum.rst:87 +#: library/enum.rst:82 msgid "" "Base class for creating enumerated constants that can be combined using the " "bitwise operations without losing their :class:`Flag` membership." msgstr "" "Classe mère pour créer une énumération de constantes pouvant être combinées " -"avec des opérateurs de comparaison bit-à-bit, sans perdre leur qualité de :" -"class:`Flag`." +"avec des opérateurs de comparaison bit-à-bit, sans perdre leur qualité " +"de :class:`Flag`." -#: library/enum.rst:90 +#: library/enum.rst:85 msgid ":class:`IntFlag`" msgstr ":class:`IntFlag`" -#: library/enum.rst:92 +#: library/enum.rst:87 msgid "" "Base class for creating enumerated constants that can be combined using the " -"bitwise operators without losing their :class:`IntFlag` membership. :class:" -"`IntFlag` members are also subclasses of :class:`int`. (`Notes`_)" +"bitwise operators without losing their :class:`IntFlag` " +"membership. :class:`IntFlag` members are also subclasses of :class:`int`. " +"(`Notes`_)" msgstr "" "Classe mère pour créer une énumération de constantes pouvant être combinées " -"avec des opérateurs de comparaison bit-à-bit, sans perdre leur qualité de :" -"class:`IntFlag`. Les membres de :class:`IntFlag` sont aussi des sous-classes " -"de :class:`int` (`notes`_)." +"avec des opérateurs de comparaison bit-à-bit, sans perdre leur qualité " +"de :class:`IntFlag`. Les membres de :class:`IntFlag` sont aussi des sous-" +"classes de :class:`int` (`notes`_)." -#: library/enum.rst:96 +#: library/enum.rst:91 #, fuzzy msgid ":class:`ReprEnum`" msgstr ":class:`Enum`" -#: library/enum.rst:98 +#: library/enum.rst:93 #, fuzzy msgid "" "Used by :class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag` to keep " "the :class:`str() ` of the mixed-in type." msgstr ":class:`IntEnum`, :class:`StrEnum` et :class:`IntFlag`" -#: library/enum.rst:101 +#: library/enum.rst:96 msgid ":class:`EnumCheck`" msgstr ":class:`EnumCheck`" -#: library/enum.rst:103 +#: library/enum.rst:98 msgid "" "An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and " "``UNIQUE``, for use with :func:`verify` to ensure various constraints are " @@ -218,11 +224,11 @@ msgstr "" "à utiliser avec :func:`verify` pour s'assurer que diverses contraintes sont " "satisfaites par une énumération donnée." -#: library/enum.rst:107 +#: library/enum.rst:102 msgid ":class:`FlagBoundary`" msgstr ":class:`FlagBoundary`" -#: library/enum.rst:109 +#: library/enum.rst:104 msgid "" "An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and " "``KEEP`` which allows for more fine-grained control over how invalid values " @@ -232,26 +238,35 @@ msgstr "" "qui permet un contrôle plus précis sur la façon dont les valeurs invalides " "sont traitées dans une énumération." -#: library/enum.rst:113 +#: library/enum.rst:108 +#, fuzzy +msgid ":class:`EnumDict`" +msgstr ":class:`Enum`" + +#: library/enum.rst:110 +msgid "A subclass of :class:`dict` for use when subclassing :class:`EnumType`." +msgstr "" + +#: library/enum.rst:112 msgid ":class:`auto`" msgstr ":class:`auto`" -#: library/enum.rst:115 +#: library/enum.rst:114 msgid "" -"Instances are replaced with an appropriate value for Enum members. :class:" -"`StrEnum` defaults to the lower-cased version of the member name, while " -"other Enums default to 1 and increase from there." +"Instances are replaced with an appropriate value for Enum " +"members. :class:`StrEnum` defaults to the lower-cased version of the member " +"name, while other Enums default to 1 and increase from there." msgstr "" "Les instances sont remplacées par une valeur appropriée pour les membres de " "l'énumération. :class:`StrEnum` utilise par défaut la version minuscule du " "nom du membre, tandis que les autres énumérations utilisent 1 par défaut et " "puis augmentent." -#: library/enum.rst:119 +#: library/enum.rst:118 msgid ":func:`~enum.property`" msgstr ":func:`~enum.property`" -#: library/enum.rst:121 +#: library/enum.rst:120 #, fuzzy msgid "" "Allows :class:`Enum` members to have attributes without conflicting with " @@ -261,22 +276,22 @@ msgstr "" "Permet aux membres d'une :class:`Enum` d'avoir des attributs sans entrer en " "conflit avec les noms des membres." -#: library/enum.rst:125 +#: library/enum.rst:124 msgid ":func:`unique`" msgstr ":func:`unique`" -#: library/enum.rst:127 +#: library/enum.rst:126 msgid "" "Enum class decorator that ensures only one name is bound to any one value." msgstr "" "Décorateur de classe qui garantit qu'une valeur ne puisse être associée qu'à " "un seul nom." -#: library/enum.rst:129 +#: library/enum.rst:128 msgid ":func:`verify`" msgstr ":func:`verify`" -#: library/enum.rst:131 +#: library/enum.rst:130 msgid "" "Enum class decorator that checks user-selectable constraints on an " "enumeration." @@ -284,58 +299,75 @@ msgstr "" "Décorateur de classe qui vérifie des contraintes personnalisées pour une " "énumération." -#: library/enum.rst:134 +#: library/enum.rst:133 msgid ":func:`member`" msgstr ":func:`member`" -#: library/enum.rst:136 +#: library/enum.rst:135 msgid "Make ``obj`` a member. Can be used as a decorator." msgstr "Fait de ``obj`` un membre. Peut être utilisé comme décorateur." -#: library/enum.rst:138 +#: library/enum.rst:137 msgid ":func:`nonmember`" msgstr ":func:`nonmember`" -#: library/enum.rst:140 +#: library/enum.rst:139 msgid "Do not make ``obj`` a member. Can be used as a decorator." msgstr "" "Fait que ``obj`` n'est pas un membre. Peut être utilisé comme décorateur." -#: library/enum.rst:142 +#: library/enum.rst:141 #, fuzzy msgid ":func:`global_enum`" msgstr ":func:`nonmember`" -#: library/enum.rst:144 +#: library/enum.rst:143 msgid "" "Modify the :class:`str() ` and :func:`repr` of an enum to show its " "members as belonging to the module instead of its class, and export the enum " "members to the global namespace." msgstr "" -#: library/enum.rst:148 +#: library/enum.rst:147 msgid ":func:`show_flag_values`" msgstr "" -#: library/enum.rst:150 +#: library/enum.rst:149 msgid "Return a list of all power-of-two integers contained in a flag." msgstr "" -#: library/enum.rst:153 +#: library/enum.rst:151 +#, fuzzy +msgid ":func:`enum.bin`" +msgstr ":func:`member`" + +#: library/enum.rst:1076 +msgid "" +"Like built-in :func:`bin`, except negative values are represented in two's " +"complement, and the leading bit always indicates sign (``0`` implies " +"positive, ``1`` implies negative)." +msgstr "" + +#: library/enum.rst:158 msgid "``Flag``, ``IntFlag``, ``auto``" msgstr "``Flag``, ``IntFlag``, ``auto``" -#: library/enum.rst:154 +#: library/enum.rst:159 msgid "" "``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " "``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" msgstr "" -#: library/enum.rst:159 -msgid "Data Types" +#: library/enum.rst:160 +msgid "``EnumDict``" +msgstr "" + +#: library/enum.rst:165 +#, fuzzy +msgid "Data types" msgstr "Types de données" -#: library/enum.rst:164 +#: library/enum.rst:170 msgid "" "*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " "to subclass *EnumType* -- see :ref:`Subclassing EnumType ` pour plus de détails." -#: library/enum.rst:168 +#: library/enum.rst:174 #, fuzzy msgid "" -"``EnumType`` is responsible for setting the correct :meth:`!__repr__`, :meth:" -"`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the " -"final *enum*, as well as creating the enum members, properly handling " -"duplicates, providing iteration over the enum class, etc." +"``EnumType`` is responsible for setting the correct :meth:`!" +"__repr__`, :meth:`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` " +"methods on the final *enum*, as well as creating the enum members, properly " +"handling duplicates, providing iteration over the enum class, etc." +msgstr "" +"*EnumType* est chargé de définir les méthodes " +"correctes :meth:`__repr__`, :meth:`__str__`, :meth:`__format__` " +"et :meth:`__reduce__` sur l'énumération finale, ainsi que de créer les " +"membres de l'énumération, de gérer correctement les doublons, de fournir une " +"itération sur la classe *enum*, etc." + +#: library/enum.rst:181 +msgid "" +"Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available " +"as an alias." msgstr "" -"*EnumType* est chargé de définir les méthodes correctes :meth:`__repr__`, :" -"meth:`__str__`, :meth:`__format__` et :meth:`__reduce__` sur l'énumération " -"finale, ainsi que de créer les membres de l'énumération, de gérer " -"correctement les doublons, de fournir une itération sur la classe *enum*, " -"etc." -#: library/enum.rst:175 +#: library/enum.rst:185 msgid "This method is called in two different ways:" msgstr "Cette méthode peut être appelée de deux manières différentes :" -#: library/enum.rst:177 +#: library/enum.rst:187 msgid "to look up an existing member:" msgstr "pour chercher un membre existant :" @@ -371,7 +409,7 @@ msgstr "pour chercher un membre existant :" msgid "cls" msgstr "cls" -#: library/enum.rst:185 +#: library/enum.rst:195 msgid "The enum class being called." msgstr "Classe de l'énumération concernée." @@ -379,11 +417,11 @@ msgstr "Classe de l'énumération concernée." msgid "value" msgstr "value" -#: library/enum.rst:180 +#: library/enum.rst:190 msgid "The value to lookup." msgstr "Valeur à chercher." -#: library/enum.rst:182 +#: library/enum.rst:192 #, fuzzy msgid "" "to use the ``cls`` enum to create a new enum (only if the existing enum does " @@ -391,7 +429,7 @@ msgid "" msgstr "" "pour utiliser l'énumération ``cls`` afin de créer une nouvelle énumération :" -#: library/enum.rst:186 +#: library/enum.rst:196 msgid "The name of the new Enum to create." msgstr "Nom de la nouvelle énumération à créer." @@ -399,7 +437,7 @@ msgstr "Nom de la nouvelle énumération à créer." msgid "names" msgstr "names" -#: library/enum.rst:187 +#: library/enum.rst:197 msgid "The names/values of the members for the new Enum." msgstr "Couples nom-valeur des membres de la nouvelle énumération." @@ -407,7 +445,7 @@ msgstr "Couples nom-valeur des membres de la nouvelle énumération." msgid "module" msgstr "module" -#: library/enum.rst:188 +#: library/enum.rst:198 msgid "The name of the module the new Enum is created in." msgstr "Nom du module dans lequel la classe *Enum* se trouve." @@ -415,7 +453,7 @@ msgstr "Nom du module dans lequel la classe *Enum* se trouve." msgid "qualname" msgstr "qualname" -#: library/enum.rst:189 +#: library/enum.rst:199 msgid "The actual location in the module where this Enum can be found." msgstr "Position dans le module où la classe *Enum* se trouve." @@ -423,7 +461,7 @@ msgstr "Position dans le module où la classe *Enum* se trouve." msgid "type" msgstr "type" -#: library/enum.rst:190 +#: library/enum.rst:200 msgid "A mix-in type for the new Enum." msgstr "Type à mélanger pour la nouvelle énumération." @@ -431,7 +469,7 @@ msgstr "Type à mélanger pour la nouvelle énumération." msgid "start" msgstr "start" -#: library/enum.rst:191 +#: library/enum.rst:201 #, fuzzy msgid "The first integer value for the Enum (used by :class:`auto`)." msgstr "Première valeur entière de l'énumération (utilisé par :class:`auto`)" @@ -440,19 +478,19 @@ msgstr "Première valeur entière de l'énumération (utilisé par :class:`auto msgid "boundary" msgstr "boundary" -#: library/enum.rst:192 +#: library/enum.rst:202 #, fuzzy msgid "" "How to handle out-of-range values from bit operations (:class:`Flag` only)." msgstr "" -"Définit la gestion les valeurs hors plage des opérations bit-à-bit (:class:" -"`Flag` uniquement)" +"Définit la gestion les valeurs hors plage des opérations bit-à-bit " +"(:class:`Flag` uniquement)" -#: library/enum.rst:196 +#: library/enum.rst:206 msgid "Returns ``True`` if member belongs to the ``cls``::" msgstr "Renvoie ``True`` si le membre appartient à ``cls`` ::" -#: library/enum.rst:206 +#: library/enum.rst:216 #, fuzzy msgid "" "Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used " @@ -462,7 +500,7 @@ msgstr "" "pas seulement les membres ; en attendant, une ``TypeError`` est levée si un " "membre non-Enum est utilisé dans une vérification d'appartenance." -#: library/enum.rst:211 +#: library/enum.rst:221 msgid "" "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " "names of the members in *cls*::" @@ -470,85 +508,69 @@ msgstr "" "Renvoie ``['__class__', '__doc__', '__members__', '__module__']`` et les " "noms des membres de *cls* ::" -#: library/enum.rst:219 +#: library/enum.rst:229 #, fuzzy msgid "" -"Returns the Enum member in *cls* matching *name*, or raises a :exc:" -"`KeyError`::" +"Returns the Enum member in *cls* matching *name*, or raises " +"a :exc:`KeyError`::" msgstr "" -"Renvoie le membre de l'énumération *cls* correspondant à *name* ou lève une :" -"exc:`KeyError` ::" +"Renvoie le membre de l'énumération *cls* correspondant à *name* ou lève " +"une :exc:`KeyError` ::" -#: library/enum.rst:226 +#: library/enum.rst:236 msgid "Returns each member in *cls* in definition order::" msgstr "Renvoie chaque membre de *cls* dans l'ordre de définition ::" -#: library/enum.rst:233 -msgid "Returns the number of member in *cls*::" +#: library/enum.rst:243 +#, fuzzy +msgid "Returns the number of members in *cls*::" msgstr "Renvoie le nombre de membres de *cls* ::" -#: library/enum.rst:240 +#: library/enum.rst:250 msgid "Returns a mapping of every enum name to its member, including aliases" msgstr "" -#: library/enum.rst:244 +#: library/enum.rst:254 msgid "Returns each member in *cls* in reverse definition order::" msgstr "Renvoie chaque membre de *cls* dans l'ordre inverse de définition ::" -#: library/enum.rst:251 -msgid "" -"Adds a new name as an alias to an existing member. Raises a :exc:" -"`NameError` if the name is already assigned to a different member." -msgstr "" - -#: library/enum.rst:256 -msgid "" -"Adds a new value as an alias to an existing member. Raises a :exc:" -"`ValueError` if the value is already linked with a different member." -msgstr "" - -#: library/enum.rst:261 -msgid "" -"Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available " -"as an alias." -msgstr "" - -#: library/enum.rst:266 +#: library/enum.rst:262 msgid "*Enum* is the base class for all *enum* enumerations." msgstr "*Enum* est la classe mère de toutes les énumérations." -#: library/enum.rst:270 +#: library/enum.rst:266 msgid "The name used to define the ``Enum`` member::" msgstr "Le nom utilisé pour définir le membre de l'``Enum`` ::" -#: library/enum.rst:277 +#: library/enum.rst:273 msgid "The value given to the ``Enum`` member::" msgstr "La valeur attribuée au membre de l'``Enum`` ::" -#: library/enum.rst:302 +#: library/enum.rst:298 #, fuzzy msgid "Value of the member, can be set in :meth:`~Enum.__new__`." msgstr "" "``_value_`` — valeur du membre ; il est possible d'y accéder et de la " "modifier dans ``__new__``" -#: library/enum.rst:284 +#: library/enum.rst:280 msgid "Enum member values" msgstr "Valeurs des membres d'une *Enum*" -#: library/enum.rst:286 +#: library/enum.rst:282 #, fuzzy msgid "" "Member values can be anything: :class:`int`, :class:`str`, etc. If the " "exact value is unimportant you may use :class:`auto` instances and an " "appropriate value will be chosen for you. See :class:`auto` for the details." msgstr "" -"La valeur d'un membre peut être de n'importe quel type : :class:`int`, :" -"class:`str`, etc. Si la valeur exacte n'a pas d'importance, utilisez des " -"instances de :class:`auto` et une valeur appropriée sera choisie pour vous. " -"Soyez vigilant si vous mélangez :class:`auto` avec d'autres valeurs." +"La valeur d'un membre peut être de n'importe quel " +"type : :class:`int`, :class:`str`, etc. Si la valeur exacte n'a pas " +"d'importance, utilisez des instances de :class:`auto` et une valeur " +"appropriée sera choisie pour vous. Soyez vigilant si vous " +"mélangez :class:`auto` avec d'autres valeurs." -#: library/enum.rst:291 +#: library/enum.rst:287 msgid "" "While mutable/unhashable values, such as :class:`dict`, :class:`list` or a " "mutable :class:`~dataclasses.dataclass`, can be used, they will have a " @@ -556,12 +578,12 @@ msgid "" "mutable/unhashable values in the enum." msgstr "" -#: library/enum.rst:298 +#: library/enum.rst:294 #, fuzzy msgid "Name of the member." msgstr "``_name_`` — nom du membre" -#: library/enum.rst:306 +#: library/enum.rst:302 #, fuzzy msgid "" "No longer used, kept for backward compatibility. (class attribute, removed " @@ -571,7 +593,27 @@ msgstr "" "membres est cohérent dans les différentes versions de Python (attribut de " "classe, supprimé durant la création de la classe)" -#: library/enum.rst:311 +#: library/enum.rst:305 +#, fuzzy +msgid "" +"The :attr:`~Enum._order_` attribute can be provided to help keep Python 2 / " +"Python 3 code in sync. It will be checked against the actual order of the " +"enumeration and raise an error if the two do not match::" +msgstr "" +"Pour faciliter la transition de Python 2 en Python 3, " +"l'attribut :attr:`_order_` peut être défini. Il sera comparé au véritable " +"ordre de l'énumération et lève une erreur si les deux ne correspondent pas ::" + +#: library/enum.rst:322 +#, fuzzy +msgid "" +"In Python 2 code the :attr:`~Enum._order_` attribute is necessary as " +"definition order is lost before it can be recorded." +msgstr "" +"En Python 2, l'attribut :attr:`_order_` est indispensable car l'ordre de la " +"définition est perdu avant de pouvoir être enregistré." + +#: library/enum.rst:329 msgid "" "``_ignore_`` is only used during creation and is removed from the " "enumeration once creation is complete." @@ -579,17 +621,17 @@ msgstr "" "``_ignore_`` n'est utilisé que lors de la création et est supprimé de " "l'énumération une fois la création terminée." -#: library/enum.rst:314 +#: library/enum.rst:332 msgid "" "``_ignore_`` is a list of names that will not become members, and whose " -"names will also be removed from the completed enumeration. See :ref:" -"`TimePeriod ` for an example." +"names will also be removed from the completed enumeration. " +"See :ref:`TimePeriod ` for an example." msgstr "" "``_ignore_`` est une liste de noms qui ne deviendront pas membres et qui " "seront également supprimés de l'énumération terminée. Voir :ref:`Intervalle " "de temps ` pour un exemple." -#: library/enum.rst:320 +#: library/enum.rst:340 msgid "" "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " "public methods defined on *self.__class__*::" @@ -601,11 +643,11 @@ msgstr "" msgid "name" msgstr "name" -#: library/enum.rst:341 +#: library/enum.rst:362 msgid "The name of the member being defined (e.g. 'RED')." msgstr "Nom du membre en cours de définition (par ex. ``RED``)." -#: library/enum.rst:342 +#: library/enum.rst:363 msgid "The start value for the Enum; the default is 1." msgstr "Valeur de départ pour l'énumération ; 1 par défaut." @@ -613,7 +655,7 @@ msgstr "Valeur de départ pour l'énumération ; 1 par défaut." msgid "count" msgstr "count" -#: library/enum.rst:343 +#: library/enum.rst:364 msgid "The number of members currently defined, not including this one." msgstr "" "Nombre de membres actuellement définis, le membre actuel n'étant pas inclus." @@ -622,31 +664,59 @@ msgstr "" msgid "last_values" msgstr "last_values" -#: library/enum.rst:344 +#: library/enum.rst:365 msgid "A list of the previous values." msgstr "Liste des valeurs précédentes." -#: library/enum.rst:346 +#: library/enum.rst:367 +#, fuzzy msgid "" -"A *staticmethod* that is used to determine the next value returned by :class:" -"`auto`::" +"A *staticmethod* that is used to determine the next value returned " +"by :class:`auto`." msgstr "" "Méthode statique utilisée pour déterminer la prochaine valeur à renvoyer " "par :class:`auto` ::" -#: library/enum.rst:362 +#: library/enum.rst:371 +#, fuzzy +msgid "" +"For standard :class:`Enum` classes the next value chosen is the highest " +"value seen incremented by one." +msgstr "" +"Pour les classes standard :class:`Enum`, la valeur suivante choisie est la " +"dernière valeur vue incrémentée de un." + +#: library/enum.rst:374 +#, fuzzy +msgid "" +"For :class:`Flag` classes the next value chosen will be the next highest " +"power-of-two." +msgstr "" +"Pour les classes :class:`Flag`, la valeur suivante choisie est la puissance " +"de deux la plus élevée suivante, quelle que soit la dernière valeur vue." + +#: library/enum.rst:377 +msgid "This method may be overridden, e.g.::" +msgstr "" + +#: library/enum.rst:391 +msgid "" +"Prior versions would use the last seen value instead of the highest value." +msgstr "" + +#: library/enum.rst:396 msgid "" "By default, does nothing. If multiple values are given in the member " "assignment, those values become separate arguments to ``__init__``; e.g." msgstr "" -#: library/enum.rst:369 +#: library/enum.rst:403 msgid "" "``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, " "'Mon')``" msgstr "" -#: library/enum.rst:373 +#: library/enum.rst:407 msgid "" "A *classmethod* that is used to further configure subsequent subclasses. By " "default, does nothing." @@ -654,7 +724,7 @@ msgstr "" "Méthode de classe utilisée pour personnaliser davantage les sous-classes à " "venir. Ne fait rien par défaut." -#: library/enum.rst:378 +#: library/enum.rst:412 msgid "" "A *classmethod* for looking up values not found in *cls*. By default it " "does nothing, but can be overridden to implement custom search behavior::" @@ -663,25 +733,25 @@ msgstr "" "rien par défaut mais peut être surchargée pour implémenter un comportement " "personnalisé de recherche ::" -#: library/enum.rst:400 +#: library/enum.rst:436 msgid "" "By default, doesn't exist. If specified, either in the enum class " "definition or in a mixin class (such as ``int``), all values given in the " "member assignment will be passed; e.g." msgstr "" -#: library/enum.rst:408 +#: library/enum.rst:444 msgid "" "results in the call ``int('1a', 16)`` and a value of ``26`` for the member." msgstr "" -#: library/enum.rst:412 +#: library/enum.rst:448 msgid "" "When writing a custom ``__new__``, do not use ``super().__new__`` -- call " "the appropriate ``__new__`` instead." msgstr "" -#: library/enum.rst:417 +#: library/enum.rst:453 msgid "" "Returns the string used for *repr()* calls. By default, returns the *Enum* " "name, member name, and value, but can be overridden::" @@ -690,7 +760,7 @@ msgstr "" "le nom de l'énumération, le nom du membre et sa valeur, mais peut être " "surchargée ::" -#: library/enum.rst:433 +#: library/enum.rst:470 msgid "" "Returns the string used for *str()* calls. By default, returns the *Enum* " "name and member name, but can be overridden::" @@ -698,7 +768,7 @@ msgstr "" "Renvoie la chaîne utilisée pour les appels à *str()*. Par défaut, renvoie le " "nom *Enum* et le nom du membre, mais peut être remplacé ::" -#: library/enum.rst:448 +#: library/enum.rst:486 #, fuzzy msgid "" "Returns the string used for *format()* and *f-string* calls. By default, " @@ -708,7 +778,7 @@ msgstr "" "défaut, renvoie la valeur renvoyée par :meth:`__str__`, mais peut être " "remplacé ::" -#: library/enum.rst:463 +#: library/enum.rst:502 msgid "" "Using :class:`auto` with :class:`Enum` results in integers of increasing " "value, starting with ``1``." @@ -716,11 +786,35 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`Enum` donne des nombres entiers " "de valeur croissante, en commençant par ``1``." -#: library/enum.rst:466 -msgid "Added :ref:`enum-dataclass-support`" +#: library/enum.rst:505 +msgid "Added :ref:`enum-dataclass-support`." +msgstr "" + +#: library/enum.rst:509 +msgid "Adds a new name as an alias to an existing member::" +msgstr "" + +#: library/enum.rst:515 +msgid "" +"Raises a :exc:`NameError` if the name is already assigned to a different " +"member." +msgstr "" + +#: library/enum.rst:521 +msgid "Adds a new value as an alias to an existing member::" msgstr "" -#: library/enum.rst:471 +#: library/enum.rst:527 +msgid "" +"Raises a :exc:`ValueError` if the value is already linked with a different " +"member." +msgstr "" + +#: library/enum.rst:528 +msgid "See :ref:`multi-value-enum` for an example." +msgstr "" + +#: library/enum.rst:535 #, fuzzy msgid "" "*IntEnum* is the same as :class:`Enum`, but its members are also integers " @@ -733,7 +827,7 @@ msgstr "" "une opération sur un entier est effectuée avec un membre *IntEnum*, la " "valeur résultante perd son statut de membre d'énumération." -#: library/enum.rst:492 +#: library/enum.rst:556 msgid "" "Using :class:`auto` with :class:`IntEnum` results in integers of increasing " "value, starting with ``1``." @@ -741,7 +835,7 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`IntEnum` donne des entiers de " "valeur croissante, en commençant par ``1``." -#: library/enum.rst:495 +#: library/enum.rst:559 #, fuzzy msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " @@ -749,37 +843,38 @@ msgid "" "already :meth:`!int.__format__` for that same reason." msgstr "" ":meth:`__str__` est maintenant :func:`int.__str__` pour mieux prendre en " -"charge le cas d'utilisation du *remplacement de constantes existantes*. :" -"meth:`__format__` était déjà :func:`int.__format__` pour la même raison." +"charge le cas d'utilisation du *remplacement de constantes " +"existantes*. :meth:`__format__` était déjà :func:`int.__format__` pour la " +"même raison." -#: library/enum.rst:502 +#: library/enum.rst:566 #, fuzzy msgid "" -"``StrEnum`` is the same as :class:`Enum`, but its members are also strings " -"and can be used in most of the same places that a string can be used. The " -"result of any string operation performed on or with a *StrEnum* member is " -"not part of the enumeration." +"*StrEnum* is the same as :class:`Enum`, but its members are also strings and " +"can be used in most of the same places that a string can be used. The result " +"of any string operation performed on or with a *StrEnum* member is not part " +"of the enumeration." msgstr "" "*StrEnum* est identique à *Enum*, mais ses membres sont également des " "chaînes et peuvent être utilisés dans la plupart des endroits où une chaîne " "peut être utilisée. Le résultat de toute opération de chaîne effectuée sur " "ou avec un membre *StrEnum* ne fait pas partie de l'énumération." -#: library/enum.rst:508 +#: library/enum.rst:587 #, fuzzy msgid "" "There are places in the stdlib that check for an exact :class:`str` instead " "of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " "``isinstance(unknown, str)``), and in those locations you will need to use " -"``str(StrEnum.member)``." +"``str(MyStrEnum.MY_MEMBER)``." msgstr "" "Il y a des endroits dans la bibliothèque standard qui vérifient s'ils ont " -"affaire à une sous-classe :class:`str` exacte au lieu d'une sous-classe :" -"class:`str` (c'est-à-dire ``type(unknown) == str`` au lieu de " +"affaire à une sous-classe :class:`str` exacte au lieu d'une sous-" +"classe :class:`str` (c'est-à-dire ``type(unknown) == str`` au lieu de " "``isinstance(str, unknown)``) et, dans ce cas, vous devez utiliser " "``str(StrEnum.member)``." -#: library/enum.rst:515 +#: library/enum.rst:594 msgid "" "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " "name as the value." @@ -787,7 +882,7 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`StrEnum` donne le nom du membre " "en minuscule comme valeur." -#: library/enum.rst:520 +#: library/enum.rst:599 #, fuzzy msgid "" ":meth:`~object.__str__` is :meth:`!str.__str__` to better support the " @@ -798,7 +893,7 @@ msgstr "" "d'utilisation de *remplacement de constantes existantes*. :meth:`__format__` " "est également :func:`str.__format__` pour la même raison." -#: library/enum.rst:528 +#: library/enum.rst:607 #, fuzzy msgid "" "``Flag`` is the same as :class:`Enum`, but its members support the bitwise " @@ -809,44 +904,44 @@ msgstr "" "``|`` (*OU*), ``^`` (*OU EXCLUSIF*) et ``~`` (*NON*) ; les résultats de ces " "opérations sont membres de l'énumération." -#: library/enum.rst:534 +#: library/enum.rst:613 msgid "Returns *True* if value is in self::" msgstr "Renvoie *True* si la valeur est dans *self* ::" -#: library/enum.rst:555 +#: library/enum.rst:634 #, fuzzy msgid "Returns all contained non-alias members::" msgstr "Renvoie tous les membres ::" -#: library/enum.rst:566 +#: library/enum.rst:645 msgid "Returns number of members in flag::" msgstr "Renvoie le nombre de membres de *Flag* ::" -#: library/enum.rst:577 +#: library/enum.rst:656 msgid "Returns *True* if any members in flag, *False* otherwise::" msgstr "" "Renvoie *True* s'il y a un membre dans les bits de *Flag*, *False* sinon ::" -#: library/enum.rst:589 +#: library/enum.rst:668 msgid "Returns current flag binary or'ed with other::" msgstr "Renvoie le *OU* logique entre le membre et *other* ::" -#: library/enum.rst:596 +#: library/enum.rst:675 msgid "Returns current flag binary and'ed with other::" msgstr "Renvoie le *ET* logique entre le membre et *other* ::" -#: library/enum.rst:605 +#: library/enum.rst:684 msgid "Returns current flag binary xor'ed with other::" msgstr "Renvoie le *OU Exclusif* logique entre le membre et *other* ::" -#: library/enum.rst:614 +#: library/enum.rst:693 #, fuzzy msgid "Returns all the flags in *type(self)* that are not in *self*::" msgstr "" "Renvoie tous les membres de *type(self)* qui ne sont pas dans *self* " "(opération logique sur les bits) ::" -#: library/enum.rst:625 +#: library/enum.rst:704 msgid "" "Function used to format any remaining unnamed numeric values. Default is " "the value's repr; common choices are :func:`hex` and :func:`oct`." @@ -855,7 +950,7 @@ msgstr "" "restantes. La valeur par défaut est la représentation de la valeur ; les " "choix courants sont :func:`hex` et :func:`oct`." -#: library/enum.rst:630 +#: library/enum.rst:709 msgid "" "Using :class:`auto` with :class:`Flag` results in integers that are powers " "of two, starting with ``1``." @@ -863,11 +958,12 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`Flag` donne des entiers qui sont " "des puissances de deux, en commençant par ``1``." -#: library/enum.rst:633 -msgid "The *repr()* of zero-valued flags has changed. It is now::" +#: library/enum.rst:712 +#, fuzzy +msgid "The *repr()* of zero-valued flags has changed. It is now:" msgstr "La *repr()* des membres de valeur zéro a changé. C'est maintenant ::" -#: library/enum.rst:641 +#: library/enum.rst:720 #, fuzzy msgid "" "``IntFlag`` is the same as :class:`Flag`, but its members are also integers " @@ -876,7 +972,7 @@ msgstr "" "*IntFlag* est identique à *Flag*, mais ses membres sont également des " "entiers et peuvent être utilisés partout où un entier peut être utilisé." -#: library/enum.rst:655 +#: library/enum.rst:734 msgid "" "If any integer operation is performed with an *IntFlag* member, the result " "is not an *IntFlag*::" @@ -884,32 +980,32 @@ msgstr "" "Si une opération sur un entier est effectuée avec un membre d'un *IntFlag*, " "le résultat n'est pas un *IntFlag* ::" -#: library/enum.rst:661 +#: library/enum.rst:740 #, fuzzy msgid "If a :class:`Flag` operation is performed with an *IntFlag* member and:" msgstr "Si une opération *Flag* est effectuée avec un membre *IntFlag* et :" -#: library/enum.rst:663 +#: library/enum.rst:742 msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" msgstr "le résultat est un *IntFlag* valide : un *IntFlag* est renvoyé ;" -#: library/enum.rst:664 +#: library/enum.rst:743 #, fuzzy msgid "" -"the result is not a valid *IntFlag*: the result depends on the :class:" -"`FlagBoundary` setting" +"the result is not a valid *IntFlag*: the result depends on " +"the :class:`FlagBoundary` setting" msgstr "" "le résultat n'est pas un *IntFlag* valide : le résultat dépend du paramètre " "*FlagBoundary*." -#: library/enum.rst:666 +#: library/enum.rst:745 #, fuzzy -msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now:" +msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now::" msgstr "" "La *repr()* des *intflag* sans nom à valeur nulle a changé. C'est " "maintenant :" -#: library/enum.rst:673 +#: library/enum.rst:752 msgid "" "Using :class:`auto` with :class:`IntFlag` results in integers that are " "powers of two, starting with ``1``." @@ -917,7 +1013,7 @@ msgstr "" "L'utilisation de :class:`auto` avec :class:`IntFlag` donne des entiers qui " "sont des puissances de deux, en commençant par ``1``." -#: library/enum.rst:678 +#: library/enum.rst:757 #, fuzzy msgid "" ":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " @@ -925,40 +1021,41 @@ msgid "" "was already :meth:`!int.__format__` for that same reason." msgstr "" ":meth:`__str__` est maintenant :func:`int.__str__` pour mieux prendre en " -"charge le cas d'utilisation du *remplacement de constantes existantes*. :" -"meth:`__format__` était déjà :func:`int.__format__` pour la même raison." +"charge le cas d'utilisation du *remplacement de constantes " +"existantes*. :meth:`__format__` était déjà :func:`int.__format__` pour la " +"même raison." -#: library/enum.rst:682 +#: library/enum.rst:761 msgid "" "Inversion of an :class:`!IntFlag` now returns a positive value that is the " "union of all flags not in the given flag, rather than a negative value. This " "matches the existing :class:`Flag` behavior." msgstr "" -#: library/enum.rst:688 +#: library/enum.rst:767 #, fuzzy msgid "" ":class:`!ReprEnum` uses the :meth:`repr() ` of :class:`Enum`, " "but the :class:`str() ` of the mixed-in data type:" msgstr ":class:`IntEnum`, :class:`StrEnum` et :class:`IntFlag` :" -#: library/enum.rst:691 +#: library/enum.rst:770 #, fuzzy msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`" msgstr ":class:`IntEnum`, :class:`StrEnum` et :class:`IntFlag`" -#: library/enum.rst:692 +#: library/enum.rst:771 msgid ":meth:`!str.__str__` for :class:`StrEnum`" msgstr "" -#: library/enum.rst:694 +#: library/enum.rst:773 msgid "" -"Inherit from :class:`!ReprEnum` to keep the :class:`str() ` / :func:" -"`format` of the mixed-in data type instead of using the :class:`Enum`-" -"default :meth:`str() `." +"Inherit from :class:`!ReprEnum` to keep the :class:`str() " +"` / :func:`format` of the mixed-in data type instead of using " +"the :class:`Enum`-default :meth:`str() `." msgstr "" -#: library/enum.rst:703 +#: library/enum.rst:782 msgid "" "*EnumCheck* contains the options used by the :func:`verify` decorator to " "ensure various constraints; failed constraints result in a :exc:`ValueError`." @@ -967,11 +1064,11 @@ msgstr "" "pour assurer diverses contraintes ; si une contrainte n'est pas validée, " "une :exc:`ValueError` est levée." -#: library/enum.rst:708 +#: library/enum.rst:787 msgid "Ensure that each value has only one name::" msgstr "Assure que chaque valeur n'a qu'un seul nom ::" -#: library/enum.rst:724 +#: library/enum.rst:803 msgid "" "Ensure that there are no missing values between the lowest-valued member and " "the highest-valued member::" @@ -979,7 +1076,7 @@ msgstr "" "Assure qu'il n'y a pas de valeurs manquantes entre le membre ayant la valeur " "la plus faible et le membre ayant la valeur la plus élevée ::" -#: library/enum.rst:739 +#: library/enum.rst:818 #, fuzzy msgid "" "Ensure that any flag groups/masks contain only named flags -- useful when " @@ -989,23 +1086,23 @@ msgstr "" "membres nommés — utile lorsque des valeurs sont spécifiées au lieu d'être " "générées par :func:`auto` ::" -#: library/enum.rst:756 +#: library/enum.rst:835 msgid "" "CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." msgstr "" "CONTINUOUS et NAMED_FLAGS sont conçus pour fonctionner avec des membres à " "valeur entière." -#: library/enum.rst:762 +#: library/enum.rst:841 #, fuzzy msgid "" -"``FlagBoundary`` controls how out-of-range values are handled in :class:" -"`Flag` and its subclasses." +"``FlagBoundary`` controls how out-of-range values are handled " +"in :class:`Flag` and its subclasses." msgstr "" "*FlagBoundary* contrôle la façon dont les valeurs hors plage sont gérées " "dans *Flag* et ses sous-classes." -#: library/enum.rst:767 +#: library/enum.rst:846 #, fuzzy msgid "" "Out-of-range values cause a :exc:`ValueError` to be raised. This is the " @@ -1014,25 +1111,25 @@ msgstr "" "Les valeurs hors plage provoquent la levée d'une :exc:`ValueError`. C'est la " "valeur par défaut pour :class:`Flag` ::" -#: library/enum.rst:785 +#: library/enum.rst:864 #, fuzzy msgid "" -"Out-of-range values have invalid values removed, leaving a valid :class:" -"`Flag` value::" +"Out-of-range values have invalid values removed, leaving a " +"valid :class:`Flag` value::" msgstr "" "Les valeurs hors plage, invalides, sont supprimées laissant une valeur " "*Flag* valide ::" -#: library/enum.rst:799 +#: library/enum.rst:878 #, fuzzy msgid "" -"Out-of-range values lose their :class:`Flag` membership and revert to :class:" -"`int`." +"Out-of-range values lose their :class:`Flag` membership and revert " +"to :class:`int`." msgstr "" -"Les valeurs hors plage perdent leur appartenance à *Flag* et reviennent à :" -"class:`int`. C'est la valeur par défaut pour :class:`IntFlag` ::" +"Les valeurs hors plage perdent leur appartenance à *Flag* et reviennent " +"à :class:`int`. C'est la valeur par défaut pour :class:`IntFlag` ::" -#: library/enum.rst:812 +#: library/enum.rst:891 #, fuzzy msgid "" "Out-of-range values are kept, and the :class:`Flag` membership is kept. This " @@ -1041,11 +1138,34 @@ msgstr "" "Les valeurs hors plage sont conservées et l'appartenance *Flag* est " "conservée. C'est utilisé pour certains drapeaux de la bibliothèque standard :" -#: library/enum.rst:829 +#: library/enum.rst:907 +msgid "" +"*EnumDict* is a subclass of :class:`dict` that is used as the namespace for " +"defining enum classes (see :ref:`prepare`). It is exposed to allow " +"subclasses of :class:`EnumType` with advanced behavior like having multiple " +"values per member. It should be called with the name of the enum class being " +"created, otherwise private names and internal classes will not be handled " +"correctly." +msgstr "" + +#: library/enum.rst:914 +msgid "" +"Note that only the :class:`~collections.abc.MutableMapping` interface " +"(:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may " +"be possible to bypass the checks using other :class:`!dict` operations " +"like :meth:`|= `." +msgstr "" + +#: library/enum.rst:921 +#, fuzzy +msgid "A list of member names." +msgstr "Liste des valeurs précédentes." + +#: library/enum.rst:930 msgid "Supported ``__dunder__`` names" msgstr "Noms de la forme ``__dunder__`` disponibles" -#: library/enum.rst:831 +#: library/enum.rst:932 #, fuzzy msgid "" ":attr:`~EnumType.__members__` is a read-only ordered mapping of " @@ -1054,47 +1174,36 @@ msgstr "" ":attr:`__members__` est un dictionnaire en lecture seule ordonné d'éléments " "``nom_du_membre`` : ``membre``. Il n'est disponible que depuis la classe." -#: library/enum.rst:834 +#: library/enum.rst:935 #, fuzzy msgid "" ":meth:`~Enum.__new__`, if specified, must create and return the enum " -"members; it is also a very good idea to set the member's :attr:`!_value_` " -"appropriately. Once all the members are created it is no longer used." +"members; it is also a very good idea to set the " +"member's :attr:`~Enum._value_` appropriately. Once all the members are " +"created it is no longer used." msgstr "" "La méthode :meth:`__new__`, si elle est définie, doit créer et renvoyer les " "membres de l'énumération ; affecter correctement l'attribut :attr:`_value_` " "du membre est également conseillé. Une fois que tous les membres ont été " "créés, cette méthode n'est plus utilisée." -#: library/enum.rst:840 +#: library/enum.rst:941 msgid "Supported ``_sunder_`` names" msgstr "Noms de la forme ``_sunder_`` disponibles" -#: library/enum.rst:842 -msgid "" -":meth:`~EnumType._add_alias_` -- adds a new name as an alias to an existing " -"member." -msgstr "" - -#: library/enum.rst:844 -msgid "" -":meth:`~EnumType._add_value_alias_` -- adds a new value as an alias to an " -"existing member." -msgstr "" - -#: library/enum.rst:846 +#: library/enum.rst:943 #, fuzzy msgid ":attr:`~Enum._name_` -- name of the member" msgstr "``_name_`` — nom du membre" -#: library/enum.rst:847 +#: library/enum.rst:944 #, fuzzy msgid ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" msgstr "" "``_value_`` — valeur du membre ; il est possible d'y accéder et de la " "modifier dans ``__new__``" -#: library/enum.rst:848 +#: library/enum.rst:945 #, fuzzy msgid "" ":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " @@ -1103,18 +1212,18 @@ msgstr "" "``_missing_`` — fonction de recherche appelée quand la valeur n'est pas " "trouvée ; elle peut être redéfinie" -#: library/enum.rst:850 +#: library/enum.rst:947 #, fuzzy msgid "" -":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a :" -"class:`str`, that will not be transformed into members, and will be removed " -"from the final class" +":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or " +"a :class:`str`, that will not be transformed into members, and will be " +"removed from the final class" msgstr "" -"``_ignore_`` — liste de noms, sous la forme d'une :func:`list` ou d'une :" -"func:`str`, qui ne sont pas convertis en membres et sont supprimés de la " -"classe résultante" +"``_ignore_`` — liste de noms, sous la forme d'une :func:`list` ou " +"d'une :func:`str`, qui ne sont pas convertis en membres et sont supprimés de " +"la classe résultante" -#: library/enum.rst:853 +#: library/enum.rst:950 #, fuzzy msgid "" ":attr:`~Enum._order_` -- no longer used, kept for backward compatibility " @@ -1124,7 +1233,7 @@ msgstr "" "membres est cohérent dans les différentes versions de Python (attribut de " "classe, supprimé durant la création de la classe)" -#: library/enum.rst:855 +#: library/enum.rst:953 #, fuzzy msgid "" ":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " @@ -1133,61 +1242,57 @@ msgstr "" "``_generate_next_value_`` — utilisée pour obtenir une valeur appropriée à " "affecter à un membre de l’énumération ; elle peut être redéfinie" -#: library/enum.rst:860 -#, fuzzy +#: library/enum.rst:956 msgid "" -"For standard :class:`Enum` classes the next value chosen is the highest " -"value seen incremented by one." +":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " +"member." msgstr "" -"Pour les classes standard :class:`Enum`, la valeur suivante choisie est la " -"dernière valeur vue incrémentée de un." -#: library/enum.rst:863 -#, fuzzy +#: library/enum.rst:958 msgid "" -"For :class:`Flag` classes the next value chosen will be the next highest " -"power-of-two." +":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " +"existing member." msgstr "" -"Pour les classes :class:`Flag`, la valeur suivante choisie est la puissance " -"de deux la plus élevée suivante, quelle que soit la dernière valeur vue." -#: library/enum.rst:866 +#: library/enum.rst:961 msgid "" "While ``_sunder_`` names are generally reserved for the further development " "of the :class:`Enum` class and can not be used, some are explicitly allowed:" msgstr "" -#: library/enum.rst:869 +#: library/enum.rst:964 msgid "" "``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_" msgstr "" -#: library/enum.rst:871 +#: library/enum.rst:966 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" -#: library/enum.rst:872 +#: library/enum.rst:967 msgid "``_ignore_``" msgstr "``_ignore_``" -#: library/enum.rst:873 +#: library/enum.rst:968 msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``" msgstr "" -#: library/enum.rst:879 -msgid "Utilities and Decorators" +#: library/enum.rst:974 +#, fuzzy +msgid "Utilities and decorators" msgstr "Utilitaires et décorateurs" -#: library/enum.rst:883 +#: library/enum.rst:978 #, fuzzy msgid "" "*auto* can be used in place of a value. If used, the *Enum* machinery will " "call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an " "appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate " -"value will be the last value plus one; for :class:`Flag` and :class:" -"`IntFlag` it will be the first power-of-two greater than the highest value; " -"for :class:`StrEnum` it will be the lower-cased version of the member's " -"name. Care must be taken if mixing *auto()* with manually specified values." +"value will be the highest value seen plus one; for :class:`Flag` " +"and :class:`IntFlag` it will be the first power-of-two greater than the " +"highest value seen; for :class:`StrEnum` it will be the lower-cased version " +"of the member's name. Care must be taken if mixing *auto()* with manually " +"specified values." msgstr "" "*auto* peut être utilisée à la place d'une valeur. Si elle est utilisée, le " "fonctionnement interne d'*Enum* appelle :meth:`_generate_next_value_` pour " @@ -1196,34 +1301,35 @@ msgstr "" "la première puissance de deux supérieure à la plus grande valeur ; pour " "*StrEnum*, c'est le nom du membre en minuscules." -#: library/enum.rst:891 +#: library/enum.rst:986 msgid "" -"*auto* instances are only resolved when at the top level of an assignment:" +"*auto* instances are only resolved when at the top level of an assignment, " +"either by itself or as part of a tuple:" msgstr "" -#: library/enum.rst:893 +#: library/enum.rst:989 msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);" msgstr "" -#: library/enum.rst:894 +#: library/enum.rst:990 msgid "" "``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` " "is used to create the ``SECOND`` enum member;" msgstr "" -#: library/enum.rst:896 +#: library/enum.rst:992 msgid "" -"``THREE = [auto(), -3]`` will *not* work (``, -3`` is used to " -"create the ``THREE`` enum member)" +"``THIRD = [auto(), -3]`` will *not* work (``[, -3]`` is used " +"to create the ``THIRD`` enum member)" msgstr "" -#: library/enum.rst:901 +#: library/enum.rst:997 msgid "" "In prior versions, ``auto()`` had to be the only thing on the assignment " "line to work properly." msgstr "" -#: library/enum.rst:904 +#: library/enum.rst:1000 msgid "" "``_generate_next_value_`` can be overridden to customize the values used by " "*auto*." @@ -1231,14 +1337,14 @@ msgstr "" "``_generate_next_value_`` peut être surchargée pour personnaliser les " "valeurs produites par *auto*." -#: library/enum.rst:907 +#: library/enum.rst:1003 msgid "" -"in 3.13 the default ``_generate_next_value_`` will always return the highest " -"member value incremented by 1, and will fail if any member is an " +"In version 3.13 the default ``_generate_next_value_`` will always return the " +"highest member value incremented by 1, and will fail if any member is an " "incompatible type." msgstr "" -#: library/enum.rst:913 +#: library/enum.rst:1009 msgid "" "A decorator similar to the built-in *property*, but specifically for " "enumerations. It allows member attributes to have the same names as members " @@ -1248,9 +1354,10 @@ msgstr "" "Il permet aux attributs de membre d'avoir les mêmes noms que les membres eux-" "mêmes." -#: library/enum.rst:917 +#: library/enum.rst:1013 +#, fuzzy msgid "" -"the *property* and the member must be defined in separate classes; for " +"The *property* and the member must be defined in separate classes; for " "example, the *value* and *name* attributes are defined in the *Enum* class, " "and *Enum* subclasses can define members with the names ``value`` and " "``name``." @@ -1260,7 +1367,7 @@ msgstr "" "*Enum*, et les sous-classes d'*Enum* peuvent définir des membres avec les " "noms ``value`` et ``name``." -#: library/enum.rst:926 +#: library/enum.rst:1022 #, fuzzy msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " @@ -1272,28 +1379,28 @@ msgstr "" "synonymes ; s'il en trouve, l'exception :exc:`ValueError` est levée avec des " "détails ::" -#: library/enum.rst:944 +#: library/enum.rst:1040 msgid "" -"A :keyword:`class` decorator specifically for enumerations. Members from :" -"class:`EnumCheck` are used to specify which constraints should be checked on " -"the decorated enumeration." +"A :keyword:`class` decorator specifically for enumerations. Members " +"from :class:`EnumCheck` are used to specify which constraints should be " +"checked on the decorated enumeration." msgstr "" "Décorateur de :keyword:`classe ` spécifique aux énumérations. Utilisé " "pour spécifier quelles contraintes doivent être vérifiées par les membres de " "l':class:`EnumCheck` décorée." -#: library/enum.rst:952 +#: library/enum.rst:1048 msgid "A decorator for use in enums: its target will become a member." msgstr "" "Décorateur à utiliser dans les énumérations : sa cible devient un membre." -#: library/enum.rst:958 +#: library/enum.rst:1054 msgid "A decorator for use in enums: its target will not become a member." msgstr "" "Décorateur à utiliser dans les énumérations : sa cible ne devient pas un " "membre." -#: library/enum.rst:964 +#: library/enum.rst:1060 msgid "" "A decorator to change the :class:`str() ` and :func:`repr` of an enum " "to show its members as belonging to the module instead of its class. Should " @@ -1301,19 +1408,19 @@ msgid "" "namespace (see :class:`re.RegexFlag` for an example)." msgstr "" -#: library/enum.rst:974 +#: library/enum.rst:1070 msgid "Return a list of all power-of-two integers contained in a flag *value*." msgstr "" -#: library/enum.rst:981 +#: library/enum.rst:1091 msgid "Notes" msgstr "Notes" -#: library/enum.rst:983 +#: library/enum.rst:1093 msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" msgstr ":class:`IntEnum`, :class:`StrEnum` et :class:`IntFlag`" -#: library/enum.rst:985 +#: library/enum.rst:1095 msgid "" "These three enum types are designed to be drop-in replacements for existing " "integer- and string-based values; as such, they have extra limitations:" @@ -1322,11 +1429,11 @@ msgstr "" "valeurs existantes basées sur des entiers et des chaînes ; en tant que tels, " "ils ont des limitations supplémentaires :" -#: library/enum.rst:988 +#: library/enum.rst:1098 msgid "``__str__`` uses the value and not the name of the enum member" msgstr "``__str__`` utilise la valeur et pas le nom du membre de l'énumération" -#: library/enum.rst:990 +#: library/enum.rst:1100 msgid "" "``__format__``, because it uses ``__str__``, will also use the value of the " "enum member instead of its name" @@ -1334,7 +1441,7 @@ msgstr "" "``__format__``, parce qu'elle fait appel à ``__str__``, utilise également la " "valeur du membre de l'énumération au lieu de son nom" -#: library/enum.rst:993 +#: library/enum.rst:1103 msgid "" "If you do not need/want those limitations, you can either create your own " "base class by mixing in the ``int`` or ``str`` type yourself::" @@ -1342,15 +1449,15 @@ msgstr "" "Si ces limitations ne vous conviennent pas, vous pouvez créer votre propre " "classe mère en mélangeant vous-même le type ``int`` ou ``str`` ::" -#: library/enum.rst:1000 +#: library/enum.rst:1110 msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" msgstr "" "ou vous pouvez réassigner la :meth:`str` appropriée, etc., dans votre " "énumération ::" #~ msgid "" -#~ "Returns the Enum member in *cls* matching *name*, or raises an :exc:" -#~ "`AttributeError`::" +#~ "Returns the Enum member in *cls* matching *name*, or raises " +#~ "an :exc:`AttributeError`::" #~ msgstr "" #~ "Renvoie le membre de l'énumération *cls* correspondant à *name* ou lève " #~ "une :exc:`AttributeError` ::" @@ -1365,8 +1472,9 @@ msgstr "" #~ "already :func:`int.__format__` for that same reason." #~ msgstr "" #~ ":meth:`__str__` est maintenant :func:`int.__str__` pour mieux prendre en " -#~ "charge le cas d'utilisation du *remplacement de constantes existantes*. :" -#~ "meth:`__format__` était déjà :func:`int.__format__` pour la même raison." +#~ "charge le cas d'utilisation du *remplacement de constantes " +#~ "existantes*. :meth:`__format__` était déjà :func:`int.__format__` pour la " +#~ "même raison." #~ msgid "``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``" #~ msgstr "``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``" @@ -1399,14 +1507,16 @@ msgstr "" #~ msgid "" #~ "This module defines four enumeration classes that can be used to define " -#~ "unique sets of names and values: :class:`Enum`, :class:`IntEnum`, :class:" -#~ "`Flag`, and :class:`IntFlag`. It also defines one decorator, :func:" -#~ "`unique`, and one helper, :class:`auto`." +#~ "unique sets of names and " +#~ "values: :class:`Enum`, :class:`IntEnum`, :class:`Flag`, " +#~ "and :class:`IntFlag`. It also defines one decorator, :func:`unique`, and " +#~ "one helper, :class:`auto`." #~ msgstr "" #~ "Ce module définit quatre classes d'énumération qui permettent de définir " -#~ "des ensembles uniques de noms et de valeurs : :class:`Enum`, :class:" -#~ "`IntEnum`, :class:`Flag` et :class:`IntFlag`. Il fournit également un " -#~ "décorateur, :func:`unique`, ainsi qu'une classe utilitaire, :class:`auto`." +#~ "des ensembles uniques de noms et de " +#~ "valeurs : :class:`Enum`, :class:`IntEnum`, :class:`Flag` " +#~ "et :class:`IntFlag`. Il fournit également un décorateur, :func:`unique`, " +#~ "ainsi qu'une classe utilitaire, :class:`auto`." #~ msgid "" #~ "Base class for creating enumerated constants. See section `Functional " @@ -1426,8 +1536,8 @@ msgstr "" #~ msgstr "" #~ "Une énumération est créée comme une :keyword:`class`, ce qui la rend " #~ "facile à lire et à écrire. Une autre méthode de création est décrite dans " -#~ "`API par fonction`_. Pour définir une énumération, il faut hériter de :" -#~ "class:`Enum` de la manière suivante ::" +#~ "`API par fonction`_. Pour définir une énumération, il faut hériter " +#~ "de :class:`Enum` de la manière suivante ::" #~ msgid "Enumeration members have human readable string representations::" #~ msgstr "" @@ -1521,8 +1631,8 @@ msgstr "" #~ msgid "If the exact value is unimportant you can use :class:`auto`::" #~ msgstr "" -#~ "Si la valeur exacte n'a pas d'importance, vous pouvez utiliser :class:" -#~ "`auto` ::" +#~ "Si la valeur exacte n'a pas d'importance, vous pouvez " +#~ "utiliser :class:`auto` ::" #~ msgid "" #~ "The values are chosen by :func:`_generate_next_value_`, which can be " @@ -1537,9 +1647,9 @@ msgstr "" #~ "provided, but the way it does this is an implementation detail and may " #~ "change." #~ msgstr "" -#~ "La méthode :meth:`_generate_next_value_` doit renvoyer le prochain :class:" -#~ "`int` de la séquence à partir du dernier :class:`int` fourni, mais " -#~ "l'implémentation de cette fonction peut changer." +#~ "La méthode :meth:`_generate_next_value_` doit renvoyer le " +#~ "prochain :class:`int` de la séquence à partir du dernier :class:`int` " +#~ "fourni, mais l'implémentation de cette fonction peut changer." #~ msgid "" #~ "The :meth:`_generate_next_value_` method must be defined before any " @@ -1628,8 +1738,8 @@ msgstr "" #~ "The rules for what is allowed are as follows: names that start and end " #~ "with a single underscore are reserved by enum and cannot be used; all " #~ "other attributes defined within an enumeration will become members of " -#~ "this enumeration, with the exception of special methods (:meth:" -#~ "`__str__`, :meth:`__add__`, etc.), descriptors (methods are also " +#~ "this enumeration, with the exception of special methods " +#~ "(:meth:`__str__`, :meth:`__add__`, etc.), descriptors (methods are also " #~ "descriptors), and variable names listed in :attr:`_ignore_`." #~ msgstr "" #~ "Les règles pour ce qui est autorisé sont les suivantes : les noms qui " @@ -1641,13 +1751,13 @@ msgstr "" #~ "dans :attr:`_ignore_`." #~ msgid "" -#~ "Note: if your enumeration defines :meth:`__new__` and/or :meth:" -#~ "`__init__` then any value(s) given to the enum member will be passed into " -#~ "those methods. See `Planet`_ for an example." +#~ "Note: if your enumeration defines :meth:`__new__` and/" +#~ "or :meth:`__init__` then any value(s) given to the enum member will be " +#~ "passed into those methods. See `Planet`_ for an example." #~ msgstr "" -#~ "Remarque : si votre énumération définit :meth:`__new__` ou :meth:" -#~ "`__init__`, alors les valeurs affectées aux membres seront passées à ces " -#~ "méthodes. Voir `Planet`_ pour exemple." +#~ "Remarque : si votre énumération définit :meth:`__new__` " +#~ "ou :meth:`__init__`, alors les valeurs affectées aux membres seront " +#~ "passées à ces méthodes. Voir `Planet`_ pour exemple." #~ msgid "Restricted Enum subclassing" #~ msgstr "Restrictions sur l'héritage" @@ -1728,9 +1838,9 @@ msgstr "" #~ "first argument of the call to :class:`Enum` is the name of the " #~ "enumeration." #~ msgstr "" -#~ "La sémantique de cette API est similaire à :class:`~collections." -#~ "namedtuple`. Le premier argument de l'appel à :class:`Enum` est le nom de " -#~ "l'énumération." +#~ "La sémantique de cette API est similaire " +#~ "à :class:`~collections.namedtuple`. Le premier argument de l'appel " +#~ "à :class:`Enum` est le nom de l'énumération." #~ msgid "" #~ "The second argument is the *source* of enumeration member names. It can " @@ -1788,10 +1898,10 @@ msgstr "" #~ "désactivée." #~ msgid "" -#~ "The new pickle protocol 4 also, in some circumstances, relies on :attr:" -#~ "`~definition.__qualname__` being set to the location where pickle will be " -#~ "able to find the class. For example, if the class was made available in " -#~ "class SomeData in the global scope::" +#~ "The new pickle protocol 4 also, in some circumstances, relies " +#~ "on :attr:`~definition.__qualname__` being set to the location where " +#~ "pickle will be able to find the class. For example, if the class was " +#~ "made available in class SomeData in the global scope::" #~ msgstr "" #~ "Le nouveau protocole version 4 de *pickle* se base lui aussi, dans " #~ "certains cas, sur le fait que :attr:`~definition.__qualname__` pointe sur " @@ -1865,28 +1975,29 @@ msgstr "" #~ "The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " #~ "based on :class:`int`. The difference being :class:`IntFlag` members can " #~ "be combined using the bitwise operators (&, \\|, ^, ~) and the result is " -#~ "still an :class:`IntFlag` member. However, as the name implies, :class:" -#~ "`IntFlag` members also subclass :class:`int` and can be used wherever an :" -#~ "class:`int` is used. Any operation on an :class:`IntFlag` member besides " -#~ "the bit-wise operations will lose the :class:`IntFlag` membership." +#~ "still an :class:`IntFlag` member. However, as the name " +#~ "implies, :class:`IntFlag` members also subclass :class:`int` and can be " +#~ "used wherever an :class:`int` is used. Any operation on " +#~ "an :class:`IntFlag` member besides the bit-wise operations will lose " +#~ "the :class:`IntFlag` membership." #~ msgstr "" #~ "La version dérivée suivante de :class:`Enum` est :class:`IntFlag`. Elle " #~ "est aussi basée sur :class:`int`, à la différence près que les membres " #~ "de :class:`IntFlag` peuvent être combinés en utilisant les opérateurs bit-" -#~ "à-bit (&, \\|, ^, ~) et que le résultat reste un membre de :class:" -#~ "`IntFlag`. Cependant, comme le nom l'indique, les membres d'une classe :" -#~ "class:`IntFlag` héritent aussi de :class:`int` et peuvent être utilisés " -#~ "là où un :class:`int` est utilisé. Toute opération sur un membre d'une " -#~ "classe :class:`IntFlag`, autre qu'un opérateur bit-à-bit lui fait perdre " -#~ "sa qualité de :class:`IntFlag`." +#~ "à-bit (&, \\|, ^, ~) et que le résultat reste un membre " +#~ "de :class:`IntFlag`. Cependant, comme le nom l'indique, les membres d'une " +#~ "classe :class:`IntFlag` héritent aussi de :class:`int` et peuvent être " +#~ "utilisés là où un :class:`int` est utilisé. Toute opération sur un membre " +#~ "d'une classe :class:`IntFlag`, autre qu'un opérateur bit-à-bit lui fait " +#~ "perdre sa qualité de :class:`IntFlag`." #~ msgid "It is also possible to name the combinations::" #~ msgstr "Il est aussi possible de nommer les combinaisons ::" #~ msgid "" #~ "Another important difference between :class:`IntFlag` and :class:`Enum` " -#~ "is that if no flags are set (the value is 0), its boolean evaluation is :" -#~ "data:`False`::" +#~ "is that if no flags are set (the value is 0), its boolean evaluation " +#~ "is :data:`False`::" #~ msgstr "" #~ "Une autre différence importante entre :class:`IntFlag` et :class:`Enum` " #~ "est que, si aucune option n'est activée (la valeur vaut 0), son " @@ -1896,36 +2007,36 @@ msgstr "" #~ "Because :class:`IntFlag` members are also subclasses of :class:`int` they " #~ "can be combined with them::" #~ msgstr "" -#~ "Comme les membres d'une classe :class:`IntFlag` héritent aussi de :class:" -#~ "`int`, ils peuvent être combinés avec eux ::" +#~ "Comme les membres d'une classe :class:`IntFlag` héritent aussi " +#~ "de :class:`int`, ils peuvent être combinés avec eux ::" #~ msgid "Flag" #~ msgstr "Option" #~ msgid "" -#~ "The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:" -#~ "`Flag` members can be combined using the bitwise operators (&, \\|, ^, " -#~ "~). Unlike :class:`IntFlag`, they cannot be combined with, nor compared " -#~ "against, any other :class:`Flag` enumeration, nor :class:`int`. While it " -#~ "is possible to specify the values directly it is recommended to use :" -#~ "class:`auto` as the value and let :class:`Flag` select an appropriate " -#~ "value." +#~ "The last variation is :class:`Flag`. " +#~ "Like :class:`IntFlag`, :class:`Flag` members can be combined using the " +#~ "bitwise operators (&, \\|, ^, ~). Unlike :class:`IntFlag`, they cannot " +#~ "be combined with, nor compared against, any other :class:`Flag` " +#~ "enumeration, nor :class:`int`. While it is possible to specify the " +#~ "values directly it is recommended to use :class:`auto` as the value and " +#~ "let :class:`Flag` select an appropriate value." #~ msgstr "" -#~ "La dernière version dérivée est la classe :class:`Flag`. Comme :class:" -#~ "`IntFlag`, les membres d'une classe :class:`Flag` peuvent être combinés " -#~ "en utilisant les opérateurs de comparaison bit-à-bit. Cependant, à la " -#~ "différence de :class:`IntFlag`, ils ne peuvent ni être combinés, ni être " -#~ "comparés avec une autre énumération :class:`Flag`, ni avec :class:`int`. " -#~ "Bien qu'il soit possible de définir directement les valeurs, il est " -#~ "recommandé d'utiliser :class:`auto` comme valeur et de laisser :class:" -#~ "`Flag` choisir une valeur appropriée." +#~ "La dernière version dérivée est la classe :class:`Flag`. " +#~ "Comme :class:`IntFlag`, les membres d'une classe :class:`Flag` peuvent " +#~ "être combinés en utilisant les opérateurs de comparaison bit-à-bit. " +#~ "Cependant, à la différence de :class:`IntFlag`, ils ne peuvent ni être " +#~ "combinés, ni être comparés avec une autre énumération :class:`Flag`, ni " +#~ "avec :class:`int`. Bien qu'il soit possible de définir directement les " +#~ "valeurs, il est recommandé d'utiliser :class:`auto` comme valeur et de " +#~ "laisser :class:`Flag` choisir une valeur appropriée." #~ msgid "" #~ "Like :class:`IntFlag`, if a combination of :class:`Flag` members results " #~ "in no flags being set, the boolean evaluation is :data:`False`::" #~ msgstr "" -#~ "Comme avec :class:`IntFlag`, si une combinaison de membres d'une classe :" -#~ "class:`Flag` n'active aucune option, l'évaluation booléenne de la " +#~ "Comme avec :class:`IntFlag`, si une combinaison de membres d'une " +#~ "classe :class:`Flag` n'active aucune option, l'évaluation booléenne de la " #~ "comparaison est :data:`False` ::" #~ msgid "" @@ -1946,21 +2057,21 @@ msgstr "" #~ "For the majority of new code, :class:`Enum` and :class:`Flag` are " #~ "strongly recommended, since :class:`IntEnum` and :class:`IntFlag` break " #~ "some semantic promises of an enumeration (by being comparable to " -#~ "integers, and thus by transitivity to other unrelated enumerations). :" -#~ "class:`IntEnum` and :class:`IntFlag` should be used only in cases where :" -#~ "class:`Enum` and :class:`Flag` will not do; for example, when integer " -#~ "constants are replaced with enumerations, or for interoperability with " -#~ "other systems." -#~ msgstr "" -#~ "Dans la plupart des cas, il est fortement recommandé d'utiliser :class:" -#~ "`Enum` et :class:`Flag` pour écrire du code nouveau, car :class:`IntEnum` " -#~ "et :class:`IntFlag` violent certains principes sémantiques d'une " -#~ "énumération (en pouvant être comparées à des entiers et donc, par " -#~ "transitivité, à d'autres énumérations). :class:`IntEnum` et :class:" -#~ "`IntFlag` ne doivent être utilisées que dans les cas où :class:`Enum` et :" -#~ "class:`Flag` ne suffisent pas ; par exemple quand des constantes entières " -#~ "sont remplacées par des énumérations, ou pour l’interopérabilité avec " -#~ "d'autres systèmes." +#~ "integers, and thus by transitivity to other unrelated " +#~ "enumerations). :class:`IntEnum` and :class:`IntFlag` should be used only " +#~ "in cases where :class:`Enum` and :class:`Flag` will not do; for example, " +#~ "when integer constants are replaced with enumerations, or for " +#~ "interoperability with other systems." +#~ msgstr "" +#~ "Dans la plupart des cas, il est fortement recommandé " +#~ "d'utiliser :class:`Enum` et :class:`Flag` pour écrire du code nouveau, " +#~ "car :class:`IntEnum` et :class:`IntFlag` violent certains principes " +#~ "sémantiques d'une énumération (en pouvant être comparées à des entiers et " +#~ "donc, par transitivité, à d'autres énumérations). :class:`IntEnum` " +#~ "et :class:`IntFlag` ne doivent être utilisées que dans les cas " +#~ "où :class:`Enum` et :class:`Flag` ne suffisent pas ; par exemple quand " +#~ "des constantes entières sont remplacées par des énumérations, ou pour " +#~ "l’interopérabilité avec d'autres systèmes." #~ msgid "Others" #~ msgstr "Autres" @@ -1974,8 +2085,8 @@ msgstr "" #~ msgid "" #~ "This demonstrates how similar derived enumerations can be defined; for " -#~ "example a :class:`StrEnum` that mixes in :class:`str` instead of :class:" -#~ "`int`." +#~ "example a :class:`StrEnum` that mixes in :class:`str` instead " +#~ "of :class:`int`." #~ msgstr "" #~ "Ceci montre comment définir des énumérations dérivées similaires ; par " #~ "exemple une classe :class:`StrEnum` qui dériverait de :class:`str` au " @@ -1985,9 +2096,9 @@ msgstr "" #~ msgstr "Quelques règles :" #~ msgid "" -#~ "When subclassing :class:`Enum`, mix-in types must appear before :class:" -#~ "`Enum` itself in the sequence of bases, as in the :class:`IntEnum` " -#~ "example above." +#~ "When subclassing :class:`Enum`, mix-in types must appear " +#~ "before :class:`Enum` itself in the sequence of bases, as in " +#~ "the :class:`IntEnum` example above." #~ msgstr "" #~ "Pour hériter de :class:`Enum`, les types de mélange doivent être placés " #~ "avant la classe :class:`Enum` elle-même dans la liste des classes de " @@ -1995,9 +2106,9 @@ msgstr "" #~ msgid "" #~ "While :class:`Enum` can have members of any type, once you mix in an " -#~ "additional type, all the members must have values of that type, e.g. :" -#~ "class:`int` above. This restriction does not apply to mix-ins which only " -#~ "add methods and don't specify another type." +#~ "additional type, all the members must have values of that type, " +#~ "e.g. :class:`int` above. This restriction does not apply to mix-ins " +#~ "which only add methods and don't specify another type." #~ msgstr "" #~ "Même si une classe :class:`Enum` peut avoir des membres de n'importe quel " #~ "type, dès qu'un type est spécifié à la déclaration de la classe, alors " @@ -2015,9 +2126,10 @@ msgstr "" #~ "soient équivalents et égaux en comparaison." #~ msgid "" -#~ "%-style formatting: `%s` and `%r` call the :class:`Enum` class's :meth:" -#~ "`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or " -#~ "`%h` for IntEnum) treat the enum member as its mixed-in type." +#~ "%-style formatting: `%s` and `%r` call the :class:`Enum` " +#~ "class's :meth:`__str__` and :meth:`__repr__` respectively; other codes " +#~ "(such as `%i` or `%h` for IntEnum) treat the enum member as its mixed-in " +#~ "type." #~ msgstr "" #~ "Formatage de style *%* : `%s` et `%r` appellent respectivement les " #~ "méthodes :meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; " @@ -2025,20 +2137,20 @@ msgstr "" #~ "membre comme si celui-ci était converti en son type de mélange." #~ msgid "" -#~ ":ref:`Formatted string literals `, :meth:`str.format`, and :" -#~ "func:`format` will use the mixed-in type's :meth:`__format__` unless :" -#~ "meth:`__str__` or :meth:`__format__` is overridden in the subclass, in " -#~ "which case the overridden methods or :class:`Enum` methods will be used. " -#~ "Use the !s and !r format codes to force usage of the :class:`Enum` " -#~ "class's :meth:`__str__` and :meth:`__repr__` methods." +#~ ":ref:`Formatted string literals `, :meth:`str.format`, " +#~ "and :func:`format` will use the mixed-in type's :meth:`__format__` " +#~ "unless :meth:`__str__` or :meth:`__format__` is overridden in the " +#~ "subclass, in which case the overridden methods or :class:`Enum` methods " +#~ "will be used. Use the !s and !r format codes to force usage of " +#~ "the :class:`Enum` class's :meth:`__str__` and :meth:`__repr__` methods." #~ msgstr "" #~ "Les :ref:`chaînes littérales formatées ` : :meth:`str.format` " #~ "et :func:`format` appellent la méthode :meth:`__format__` du type dérivé " #~ "à moins que :meth:`__str__` ou :meth:`__format__` soit surchargée dans la " -#~ "sous-classe, auquel cas les méthodes surchargées ou celles de la classe :" -#~ "class:`Enum` seront utilisées. Pour appeler les méthodes :meth:`__str__` " -#~ "ou :meth:`__repr__` de la classe :class:`Enum`, il faut utiliser les " -#~ "codes de formatage ``!s`` ou ``!r``." +#~ "sous-classe, auquel cas les méthodes surchargées ou celles de la " +#~ "classe :class:`Enum` seront utilisées. Pour appeler les " +#~ "méthodes :meth:`__str__` ou :meth:`__repr__` de la classe :class:`Enum`, " +#~ "il faut utiliser les codes de formatage ``!s`` ou ``!r``." #~ msgid "When to use :meth:`__new__` vs. :meth:`__init__`" #~ msgstr "Quand utiliser :meth:`__new__` ou :meth:`__init__`" @@ -2065,16 +2177,17 @@ msgstr "" #~ msgstr "Exemples intéressants" #~ msgid "" -#~ "While :class:`Enum`, :class:`IntEnum`, :class:`IntFlag`, and :class:" -#~ "`Flag` are expected to cover the majority of use-cases, they cannot cover " -#~ "them all. Here are recipes for some different types of enumerations that " -#~ "can be used directly, or as examples for creating one's own." +#~ "While :class:`Enum`, :class:`IntEnum`, :class:`IntFlag`, " +#~ "and :class:`Flag` are expected to cover the majority of use-cases, they " +#~ "cannot cover them all. Here are recipes for some different types of " +#~ "enumerations that can be used directly, or as examples for creating one's " +#~ "own." #~ msgstr "" -#~ "Bien que :class:`Enum`, :class:`IntEnum`, :class:`IntFlag` et :class:" -#~ "`Flag` soient conçues pour répondre à la majorité des besoins, elles ne " -#~ "peuvent répondre à tous. Voici quelques recettes d'énumération qui " -#~ "peuvent être réutilisées telles quelles, ou peuvent servir d'exemple pour " -#~ "développer vos propres énumérations." +#~ "Bien que :class:`Enum`, :class:`IntEnum`, :class:`IntFlag` " +#~ "et :class:`Flag` soient conçues pour répondre à la majorité des besoins, " +#~ "elles ne peuvent répondre à tous. Voici quelques recettes d'énumération " +#~ "qui peuvent être réutilisées telles quelles, ou peuvent servir d'exemple " +#~ "pour développer vos propres énumérations." #~ msgid "Omitting values" #~ msgstr "Omettre les valeurs" @@ -2117,8 +2230,9 @@ msgstr "" #~ "Whichever method you choose, you should provide a :meth:`repr` that also " #~ "hides the (unimportant) value::" #~ msgstr "" -#~ "Quelle que soit la méthode choisie, il faut fournir une méthode :meth:" -#~ "`repr` qui masque les valeurs (pas importantes de toute façon) ::" +#~ "Quelle que soit la méthode choisie, il faut fournir une " +#~ "méthode :meth:`repr` qui masque les valeurs (pas importantes de toute " +#~ "façon) ::" #~ msgid "Using :class:`auto` would look like::" #~ msgstr "On utilise :class:`auto` de la manière suivante ::" @@ -2163,9 +2277,9 @@ msgstr "" #~ "after class creation for lookup of existing members." #~ msgstr "" #~ "La méthode :meth:`__new__`, si définie, est appelée à la création des " -#~ "membres de l'énumération ; elle est ensuite remplacée par la méthode :" -#~ "meth:`__new__` de *Enum*, qui est utilisée après la création de la classe " -#~ "pour la recherche des membres existants." +#~ "membres de l'énumération ; elle est ensuite remplacée par la " +#~ "méthode :meth:`__new__` de *Enum*, qui est utilisée après la création de " +#~ "la classe pour la recherche des membres existants." #~ msgid "OrderedEnum" #~ msgstr "OrderedEnum" @@ -2228,66 +2342,52 @@ msgstr "" #~ msgstr "Classes *Enum*" #~ msgid "" -#~ "The :class:`EnumMeta` metaclass is responsible for providing the :meth:" -#~ "`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " -#~ "allow one to do things with an :class:`Enum` class that fail on a typical " -#~ "class, such as `list(Color)` or `some_enum_var in Color`. :class:" -#~ "`EnumMeta` is responsible for ensuring that various other methods on the " -#~ "final :class:`Enum` class are correct (such as :meth:`__new__`, :meth:" -#~ "`__getnewargs__`, :meth:`__str__` and :meth:`__repr__`)." -#~ msgstr "" -#~ "La métaclasse :class:`EnumMeta` se charge de fournir les méthodes :meth:" -#~ "`__contains__`, :meth:`__dir__`, :meth:`__iter__` etc. qui permettent de " -#~ "faire des opérations sur une classe :class:`Enum` qui ne fonctionneraient " -#~ "pas sur une classe standard, comme `list(Color)` ou `some_enum_var in " -#~ "Color`. :class:`EnumMeta` garantit que les autres méthodes de la classe " -#~ "finale :class:`Enum` sont correctes (comme :meth:`__new__`, :meth:" -#~ "`__getnewargs__`, :meth:`__str__` et :meth:`__repr__`)." +#~ "The :class:`EnumMeta` metaclass is responsible for providing " +#~ "the :meth:`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other " +#~ "methods that allow one to do things with an :class:`Enum` class that fail " +#~ "on a typical class, such as `list(Color)` or `some_enum_var in " +#~ "Color`. :class:`EnumMeta` is responsible for ensuring that various other " +#~ "methods on the final :class:`Enum` class are correct (such " +#~ "as :meth:`__new__`, :meth:`__getnewargs__`, :meth:`__str__` " +#~ "and :meth:`__repr__`)." +#~ msgstr "" +#~ "La métaclasse :class:`EnumMeta` se charge de fournir les " +#~ "méthodes :meth:`__contains__`, :meth:`__dir__`, :meth:`__iter__` etc. qui " +#~ "permettent de faire des opérations sur une classe :class:`Enum` qui ne " +#~ "fonctionneraient pas sur une classe standard, comme `list(Color)` ou " +#~ "`some_enum_var in Color`. :class:`EnumMeta` garantit que les autres " +#~ "méthodes de la classe finale :class:`Enum` sont correctes " +#~ "(comme :meth:`__new__`, :meth:`__getnewargs__`, :meth:`__str__` " +#~ "et :meth:`__repr__`)." #~ msgid "Enum Members (aka instances)" #~ msgstr "Membres d'Enum (c.-à-d. instances)" #~ msgid "" #~ "The most interesting thing about Enum members is that they are " -#~ "singletons. :class:`EnumMeta` creates them all while it is creating the :" -#~ "class:`Enum` class itself, and then puts a custom :meth:`__new__` in " +#~ "singletons. :class:`EnumMeta` creates them all while it is creating " +#~ "the :class:`Enum` class itself, and then puts a custom :meth:`__new__` in " #~ "place to ensure that no new ones are ever instantiated by returning only " #~ "the existing member instances." #~ msgstr "" #~ "Il est intéressant de souligner que les membres d'une *Enum* sont des " #~ "singletons. La classe :class:`EnumMeta` les crée tous au moment de la " -#~ "création de la classe :class:`Enum` elle-même et implémente une méthode :" -#~ "meth:`__new__` spécifique. Cette méthode renvoie toujours les instances " -#~ "de membres déjà existantes pour être sûr de ne jamais en instancier de " -#~ "nouvelles." +#~ "création de la classe :class:`Enum` elle-même et implémente une " +#~ "méthode :meth:`__new__` spécifique. Cette méthode renvoie toujours les " +#~ "instances de membres déjà existantes pour être sûr de ne jamais en " +#~ "instancier de nouvelles." #~ msgid "Finer Points" #~ msgstr "Aspects approfondis" -#~ msgid "" -#~ "To help keep Python 2 / Python 3 code in sync an :attr:`_order_` " -#~ "attribute can be provided. It will be checked against the actual order " -#~ "of the enumeration and raise an error if the two do not match::" -#~ msgstr "" -#~ "Pour faciliter la transition de Python 2 en Python 3, l'attribut :attr:" -#~ "`_order_` peut être défini. Il sera comparé au véritable ordre de " -#~ "l'énumération et lève une erreur si les deux ne correspondent pas ::" - -#~ msgid "" -#~ "In Python 2 code the :attr:`_order_` attribute is necessary as definition " -#~ "order is lost before it can be recorded." -#~ msgstr "" -#~ "En Python 2, l'attribut :attr:`_order_` est indispensable car l'ordre de " -#~ "la définition est perdu avant de pouvoir être enregistré." - #~ msgid "_Private__names" #~ msgstr "_Noms__privés" #~ msgid "" #~ ":ref:`Private names ` will be normal attributes in " #~ "Python 3.11 instead of either an error or a member (depending on if the " -#~ "name ends with an underscore). Using these names in 3.10 will issue a :" -#~ "exc:`DeprecationWarning`." +#~ "name ends with an underscore). Using these names in 3.10 will issue " +#~ "a :exc:`DeprecationWarning`." #~ msgstr "" #~ "Les :ref:`noms privés ` seront des attributs " #~ "habituels avec Python 3.11 et non plus des erreurs ou membres (selon si " @@ -2305,13 +2405,13 @@ msgstr "" #~ "the :class:`Enum` member you are looking for (this is another good reason " #~ "to use all-uppercase names for members)::" #~ msgstr "" -#~ "Les membres de :class:`Enum` sont des instances de leur classe :class:" -#~ "`Enum`. On y accède normalement par ``ClasseEnum.membre``. Dans certains " -#~ "cas, on peut également y accéder par ``ClasseEnum.membre.membre``, mais " -#~ "ceci est fortement déconseillé car cette indirection est susceptible " -#~ "d'échouer, ou pire, de ne pas renvoyer le membre de la classe :class:" -#~ "`Enum` désiré (c'est une autre bonne raison pour définir tous les noms " -#~ "des membres en majuscules) ::" +#~ "Les membres de :class:`Enum` sont des instances de leur " +#~ "classe :class:`Enum`. On y accède normalement par ``ClasseEnum.membre``. " +#~ "Dans certains cas, on peut également y accéder par " +#~ "``ClasseEnum.membre.membre``, mais ceci est fortement déconseillé car " +#~ "cette indirection est susceptible d'échouer, ou pire, de ne pas renvoyer " +#~ "le membre de la classe :class:`Enum` désiré (c'est une autre bonne raison " +#~ "pour définir tous les noms des membres en majuscules) ::" #~ msgid "This behavior is deprecated and will be removed in 3.11." #~ msgstr "Ce comportement est obsolète et sera retiré en 3.11." @@ -2328,9 +2428,10 @@ msgstr "" #~ msgstr "" #~ "Les membres d'une classe :class:`Enum` mélangée avec un type non dérivé " #~ "de :class:`Enum` (comme :class:`int`, :class:`str`, etc.) sont évalués " -#~ "selon les règles du type de mélange. Sinon, tous les membres valent :data:" -#~ "`True`. Pour faire dépendre l'évaluation booléenne de votre propre *Enum* " -#~ "de la valeur du membre, il faut ajouter le code suivant à votre classe ::" +#~ "selon les règles du type de mélange. Sinon, tous les membres " +#~ "valent :data:`True`. Pour faire dépendre l'évaluation booléenne de votre " +#~ "propre *Enum* de la valeur du membre, il faut ajouter le code suivant à " +#~ "votre classe ::" #~ msgid ":class:`Enum` classes always evaluate as :data:`True`." #~ msgstr "Les classes :class:`Enum` valent toujours :data:`True`." @@ -2344,8 +2445,8 @@ msgstr "" #~ "but not of the class::" #~ msgstr "" #~ "Si votre classe :class:`Enum` contient des méthodes supplémentaires, " -#~ "comme la classe `Planet`_ ci-dessus, elles s'afficheront avec un appel à :" -#~ "func:`dir` sur le membre, mais pas avec un appel sur la classe ::" +#~ "comme la classe `Planet`_ ci-dessus, elles s'afficheront avec un appel " +#~ "à :func:`dir` sur le membre, mais pas avec un appel sur la classe ::" #~ msgid "Combining members of ``Flag``" #~ msgstr "Combinaison de membres de ``Flag``" diff --git a/library/errno.po b/library/errno.po index 4254bac7d..c96af1a28 100644 --- a/library/errno.po +++ b/library/errno.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2019-06-10 15:48+0200\n" "Last-Translator: Dylan Gouin \n" "Language-Team: FRENCH \n" @@ -45,11 +45,11 @@ msgstr "" #: library/errno.rst:21 msgid "" -"To translate a numeric error code to an error message, use :func:`os." -"strerror`." +"To translate a numeric error code to an error message, " +"use :func:`os.strerror`." msgstr "" -"Pour traduire un code d'erreur en message d'erreur, utilisez :func:`os." -"strerror`." +"Pour traduire un code d'erreur en message d'erreur, " +"utilisez :func:`os.strerror`." #: library/errno.rst:23 msgid "" @@ -65,29 +65,29 @@ msgstr "" #: library/errno.rst:30 #, fuzzy msgid "" -"Operation not permitted. This error is mapped to the exception :exc:" -"`PermissionError`." +"Operation not permitted. This error is mapped to the " +"exception :exc:`PermissionError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:36 #, fuzzy msgid "" -"No such file or directory. This error is mapped to the exception :exc:" -"`FileNotFoundError`." +"No such file or directory. This error is mapped to the " +"exception :exc:`FileNotFoundError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:42 #, fuzzy msgid "" -"No such process. This error is mapped to the exception :exc:" -"`ProcessLookupError`." +"No such process. This error is mapped to the " +"exception :exc:`ProcessLookupError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:48 #, fuzzy msgid "" -"Interrupted system call. This error is mapped to the exception :exc:" -"`InterruptedError`." +"Interrupted system call. This error is mapped to the " +"exception :exc:`InterruptedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:54 @@ -113,8 +113,8 @@ msgstr "Mauvais descripteur de fichier" #: library/errno.rst:79 #, fuzzy msgid "" -"No child processes. This error is mapped to the exception :exc:" -"`ChildProcessError`." +"No child processes. This error is mapped to the " +"exception :exc:`ChildProcessError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:85 @@ -130,8 +130,8 @@ msgstr "Mémoire insuffisante" #: library/errno.rst:95 #, fuzzy msgid "" -"Permission denied. This error is mapped to the exception :exc:" -"`PermissionError`." +"Permission denied. This error is mapped to the " +"exception :exc:`PermissionError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:101 @@ -163,15 +163,15 @@ msgstr "Dispositif inexistant" #: library/errno.rst:132 #, fuzzy msgid "" -"Not a directory. This error is mapped to the exception :exc:" -"`NotADirectoryError`." +"Not a directory. This error is mapped to the " +"exception :exc:`NotADirectoryError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:138 #, fuzzy msgid "" -"Is a directory. This error is mapped to the exception :exc:" -"`IsADirectoryError`." +"Is a directory. This error is mapped to the " +"exception :exc:`IsADirectoryError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:144 @@ -255,8 +255,8 @@ msgstr "Trop de liens symboliques trouvés" #: library/errno.rst:240 #, fuzzy msgid "" -"Operation would block. This error is mapped to the exception :exc:" -"`BlockingIOError`." +"Operation would block. This error is mapped to the " +"exception :exc:`BlockingIOError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:246 @@ -513,15 +513,15 @@ msgstr "Connexion annulée par le réseau" #: library/errno.rst:558 #, fuzzy msgid "" -"Software caused connection abort. This error is mapped to the exception :exc:" -"`ConnectionAbortedError`." +"Software caused connection abort. This error is mapped to the " +"exception :exc:`ConnectionAbortedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:564 #, fuzzy msgid "" -"Connection reset by peer. This error is mapped to the exception :exc:" -"`ConnectionResetError`." +"Connection reset by peer. This error is mapped to the " +"exception :exc:`ConnectionResetError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:570 @@ -550,15 +550,15 @@ msgstr "Trop de descripteurs : impossible d'effectuer la liaison" #: library/errno.rst:596 #, fuzzy msgid "" -"Connection timed out. This error is mapped to the exception :exc:" -"`TimeoutError`." +"Connection timed out. This error is mapped to the " +"exception :exc:`TimeoutError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:602 #, fuzzy msgid "" -"Connection refused. This error is mapped to the exception :exc:" -"`ConnectionRefusedError`." +"Connection refused. This error is mapped to the " +"exception :exc:`ConnectionRefusedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:608 @@ -570,72 +570,189 @@ msgid "No route to host" msgstr "Pas de route vers l'hôte" #: library/errno.rst:618 +msgid "Memory page has hardware error." +msgstr "" + +#: library/errno.rst:625 #, fuzzy msgid "" -"Operation already in progress. This error is mapped to the exception :exc:" -"`BlockingIOError`." +"Operation already in progress. This error is mapped to the " +"exception :exc:`BlockingIOError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:624 +#: library/errno.rst:631 #, fuzzy msgid "" -"Operation now in progress. This error is mapped to the exception :exc:" -"`BlockingIOError`." +"Operation now in progress. This error is mapped to the " +"exception :exc:`BlockingIOError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:630 +#: library/errno.rst:637 msgid "Stale NFS file handle" msgstr "Descripteur de fichier NFS corrompu" -#: library/errno.rst:635 +#: library/errno.rst:642 msgid "Structure needs cleaning" msgstr "La structure a besoin d'être nettoyée" -#: library/errno.rst:640 +#: library/errno.rst:647 msgid "Not a XENIX named type file" msgstr "N'est pas un fichier nommé du type *XENIX*" -#: library/errno.rst:645 +#: library/errno.rst:652 msgid "No XENIX semaphores available" msgstr "Pas de sémaphore *XENIX* disponible" -#: library/errno.rst:650 +#: library/errno.rst:657 msgid "Is a named type file" msgstr "Est un fichier nommé" -#: library/errno.rst:655 +#: library/errno.rst:662 msgid "Remote I/O error" msgstr "Erreur d'entrées-sorties distante" -#: library/errno.rst:660 +#: library/errno.rst:667 msgid "Quota exceeded" msgstr "Quota dépassé" -#: library/errno.rst:664 +#: library/errno.rst:671 msgid "Interface output queue is full" msgstr "" -#: library/errno.rst:670 +#: library/errno.rst:678 +msgid "No medium found" +msgstr "" + +#: library/errno.rst:683 +msgid "Wrong medium type" +msgstr "" + +#: library/errno.rst:688 +#, fuzzy +msgid "Required key not available" +msgstr "Protocole pas disponible" + +#: library/errno.rst:693 +#, fuzzy +msgid "Key has expired" +msgstr "Délai maximal atteint" + +#: library/errno.rst:698 +#, fuzzy +msgid "Key has been revoked" +msgstr "Lien coupé" + +#: library/errno.rst:703 +msgid "Key was rejected by service" +msgstr "" + +#: library/errno.rst:708 +#, fuzzy +msgid "Operation not possible due to RF-kill" +msgstr "Opération interdite" + +#: library/errno.rst:713 +msgid "Locked lock was unmapped" +msgstr "" + +#: library/errno.rst:718 +msgid "Facility is not active" +msgstr "" + +#: library/errno.rst:723 +#, fuzzy +msgid "Authentication error" +msgstr "Erreur de communication lors de l'envoi" + +#: library/errno.rst:730 +msgid "Bad CPU type in executable" +msgstr "" + +#: library/errno.rst:737 +#, fuzzy +msgid "Bad executable (or shared library)" +msgstr "Impossible d'exécuter directement une bibliothèque partagée" + +#: library/errno.rst:744 +msgid "Malformed Mach-o file" +msgstr "" + +#: library/errno.rst:751 +#, fuzzy +msgid "Device error" +msgstr "Erreur d'annonce" + +#: library/errno.rst:758 +msgid "Inappropriate file type or format" +msgstr "" + +#: library/errno.rst:765 +msgid "Need authenticator" +msgstr "" + +#: library/errno.rst:772 +msgid "Attribute not found" +msgstr "" + +#: library/errno.rst:779 +msgid "Policy not found" +msgstr "" + +#: library/errno.rst:786 +#, fuzzy +msgid "Too many processes" +msgstr "Trop d'utilisateurs" + +#: library/errno.rst:793 +msgid "Bad procedure for program" +msgstr "" + +#: library/errno.rst:800 +msgid "Program version wrong" +msgstr "" + +#: library/errno.rst:807 +#, fuzzy +msgid "RPC prog. not avail" +msgstr "Protocole pas disponible" + +#: library/errno.rst:814 +msgid "Device power is off" +msgstr "" + +#: library/errno.rst:821 +msgid "RPC struct is bad" +msgstr "" + +#: library/errno.rst:828 +msgid "RPC version wrong" +msgstr "" + +#: library/errno.rst:835 +msgid "Shared library version mismatch" +msgstr "" + +#: library/errno.rst:842 #, fuzzy msgid "" -"Capabilities insufficient. This error is mapped to the exception :exc:" -"`PermissionError`." +"Capabilities insufficient. This error is mapped to the " +"exception :exc:`PermissionError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:673 +#: library/errno.rst:845 msgid "Availability" -msgstr "" +msgstr "Disponibilité" -#: library/errno.rst:680 +#: library/errno.rst:852 #, fuzzy msgid "Operation canceled" msgstr "Opération interdite" -#: library/errno.rst:687 +#: library/errno.rst:859 msgid "Owner died" msgstr "" -#: library/errno.rst:694 +#: library/errno.rst:866 #, fuzzy msgid "State not recoverable" msgstr "Résultat mathématique non représentable" diff --git a/library/exceptions.po b/library/exceptions.po index f214f6ec3..ccf08dc89 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-11-21 21:57+0100\n" "Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" @@ -21,19 +21,20 @@ msgstr "Exceptions natives" #: library/exceptions.rst:10 msgid "" -"In Python, all exceptions must be instances of a class that derives from :" -"class:`BaseException`. In a :keyword:`try` statement with an :keyword:" -"`except` clause that mentions a particular class, that clause also handles " -"any exception classes derived from that class (but not exception classes " -"from which *it* is derived). Two exception classes that are not related via " -"subclassing are never equivalent, even if they have the same name." -msgstr "" -"En python, une exception est une instance d'une classe héritée de :class:" -"`BaseException`. Dans un bloc :keyword:`try`, la clause :keyword:`except` " -"traite non seulement la classe d'exception qu'elle mentionne, mais aussi " -"toutes les classes dérivées de cette classe (contrairement à ses classes " -"mères). Deux classes qui ne sont pas liées par héritage ne sont jamais " -"équivalentes, même si elles ont le même nom." +"In Python, all exceptions must be instances of a class that derives " +"from :class:`BaseException`. In a :keyword:`try` statement with " +"an :keyword:`except` clause that mentions a particular class, that clause " +"also handles any exception classes derived from that class (but not " +"exception classes from which *it* is derived). Two exception classes that " +"are not related via subclassing are never equivalent, even if they have the " +"same name." +msgstr "" +"En python, une exception est une instance d'une classe héritée " +"de :class:`BaseException`. Dans un bloc :keyword:`try`, la " +"clause :keyword:`except` traite non seulement la classe d'exception qu'elle " +"mentionne, mais aussi toutes les classes dérivées de cette classe " +"(contrairement à ses classes mères). Deux classes qui ne sont pas liées par " +"héritage ne sont jamais équivalentes, même si elles ont le même nom." #: library/exceptions.rst:19 #, fuzzy @@ -69,10 +70,10 @@ msgstr "" #: library/exceptions.rst:31 msgid "" "The built-in exception classes can be subclassed to define new exceptions; " -"programmers are encouraged to derive new exceptions from the :exc:" -"`Exception` class or one of its subclasses, and not from :exc:" -"`BaseException`. More information on defining exceptions is available in " -"the Python Tutorial under :ref:`tut-userexceptions`." +"programmers are encouraged to derive new exceptions from " +"the :exc:`Exception` class or one of its subclasses, and not " +"from :exc:`BaseException`. More information on defining exceptions is " +"available in the Python Tutorial under :ref:`tut-userexceptions`." msgstr "" "Les classes d'exception natives peuvent être héritées pour définir de " "nouvelles exceptions ; les programmeurs sont encouragés à faire dériver les " @@ -96,15 +97,15 @@ msgstr "" msgid "" "When raising a new exception while another exception is already being " "handled, the new exception's :attr:`!__context__` attribute is automatically " -"set to the handled exception. An exception may be handled when an :keyword:" -"`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is " -"used." +"set to the handled exception. An exception may be handled when " +"an :keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " +"statement, is used." msgstr "" "Quand une exception est levée pendant qu'une autre exception est déjà en " "traitement, l'attribut :attr:`__context__` de la nouvelle exception est " "automatiquement affecté à l'exception qui est en cours de traitement. Une " -"exception peut être traitée quand une clause :keyword:`except` ou :keyword:" -"`finally`, ou une instruction :keyword:`with` est utilisée." +"exception peut être traitée quand une clause :keyword:`except` " +"ou :keyword:`finally`, ou une instruction :keyword:`with` est utilisée." #: library/exceptions.rst:59 msgid "" @@ -128,12 +129,13 @@ msgid "" msgstr "" "L'expression suivant :keyword:`from` doit être une exception ou " "``None``. Elle sera assignée en tant que :attr:`__cause__` dans l'exception " -"levée. Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" -"`__suppress_context__` à ``True``, de sorte que l'utilisation de ``raise " -"new_exc from None`` remplace bien l'ancienne exception avec la nouvelle à " -"des fins d'affichage (par exemple, convertir :exc:`KeyError` en :exc:" -"`AttributeError`), tout en laissant l'ancienne exception disponible dans :" -"attr:`__context__` pour introspection lors du débogage." +"levée. Changer :attr:`__cause__` change aussi implicitement " +"l'attribut :attr:`__suppress_context__` à ``True``, de sorte que " +"l'utilisation de ``raise new_exc from None`` remplace bien l'ancienne " +"exception avec la nouvelle à des fins d'affichage (par exemple, " +"convertir :exc:`KeyError` en :exc:`AttributeError`), tout en laissant " +"l'ancienne exception disponible dans :attr:`__context__` pour introspection " +"lors du débogage." #: library/exceptions.rst:74 #, fuzzy @@ -148,8 +150,8 @@ msgstr "" "chaînées en plus de la trace de l'exception elle-même. Si elle est présente, " "une exception chaînée explicitement dans :attr:`__cause__` est toujours " "affichée. Une exception implicitement chaînée dans :attr:`__context__` n'est " -"affichée que si :attr:`__cause__` est :const:`None` et :attr:" -"`__suppress_context__` est faux." +"affichée que si :attr:`__cause__` est :const:`None` " +"et :attr:`__suppress_context__` est faux." #: library/exceptions.rst:80 msgid "" @@ -180,12 +182,13 @@ msgstr "" #: library/exceptions.rst:95 msgid "" -"Most built-in exceptions are implemented in C for efficiency, see: :source:" -"`Objects/exceptions.c`. Some have custom memory layouts which makes it " -"impossible to create a subclass that inherits from multiple exception types. " -"The memory layout of a type is an implementation detail and might change " -"between Python versions, leading to new conflicts in the future. Therefore, " -"it's recommended to avoid subclassing multiple exception types altogether." +"Most built-in exceptions are implemented in C for efficiency, " +"see: :source:`Objects/exceptions.c`. Some have custom memory layouts which " +"makes it impossible to create a subclass that inherits from multiple " +"exception types. The memory layout of a type is an implementation detail and " +"might change between Python versions, leading to new conflicts in the " +"future. Therefore, it's recommended to avoid subclassing multiple exception " +"types altogether." msgstr "" "La majorité des exceptions natives sont implémentées en C pour des raisons " "d'efficacité, voir :source:`Objects/exceptions.c`. L'architecture interne de " @@ -210,16 +213,16 @@ msgstr "" #: library/exceptions.rst:111 msgid "" "The base class for all built-in exceptions. It is not meant to be directly " -"inherited by user-defined classes (for that, use :exc:`Exception`). If :" -"func:`str` is called on an instance of this class, the representation of the " -"argument(s) to the instance are returned, or the empty string when there " +"inherited by user-defined classes (for that, use :exc:`Exception`). " +"If :func:`str` is called on an instance of this class, the representation of " +"the argument(s) to the instance are returned, or the empty string when there " "were no arguments." msgstr "" "La classe mère pour toutes les exceptions natives. Elle n'est pas vouée à " -"être héritée directement par des classes utilisateur (pour cela, utilisez :" -"exc:`Exception`). Si :func:`str` est appelée sur une instance de cette " -"classe, la représentation du ou des argument(s) de l'instance est retournée, " -"ou la chaîne vide s'il n'y avait pas d'arguments." +"être héritée directement par des classes utilisateur (pour cela, " +"utilisez :exc:`Exception`). Si :func:`str` est appelée sur une instance de " +"cette classe, la représentation du ou des argument(s) de l'instance est " +"retournée, ou la chaîne vide s'il n'y avait pas d'arguments." #: library/exceptions.rst:119 msgid "" @@ -270,8 +273,9 @@ msgstr "" #: library/exceptions.rst:157 msgid "" -"A list of the notes of this exception, which were added with :meth:" -"`add_note`. This attribute is created when :meth:`add_note` is called." +"A list of the notes of this exception, which were added " +"with :meth:`add_note`. This attribute is created when :meth:`add_note` is " +"called." msgstr "" #: library/exceptions.rst:165 @@ -286,12 +290,12 @@ msgstr "" #: library/exceptions.rst:171 msgid "" "The base class for those built-in exceptions that are raised for various " -"arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" -"`FloatingPointError`." +"arithmetic " +"errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:`FloatingPointError`." msgstr "" "La classe mère pour les exceptions natives qui sont levées pour diverses " -"erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" -"`FloatingPointError`." +"erreurs " +"arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:`FloatingPointError`." #: library/exceptions.rst:178 msgid "" @@ -330,54 +334,60 @@ msgid "" "assignment fails. (When an object does not support attribute references or " "attribute assignments at all, :exc:`TypeError` is raised.)" msgstr "" -"Levée lorsqu'une référence ou une assignation d'attribut (voir :ref:" -"`attribute-references`) échoue. (Lorsqu'un objet ne supporte pas du tout la " -"référence ou l'assignation d'attribut, :exc:`TypeError` est levé.)" +"Levée lorsqu'une référence ou une assignation d'attribut " +"(voir :ref:`attribute-references`) échoue. (Lorsqu'un objet ne supporte pas " +"du tout la référence ou l'assignation d'attribut, :exc:`TypeError` est " +"levé.)" #: library/exceptions.rst:207 msgid "" -"The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " -"arguments to the constructor. When set they represent the name of the " -"attribute that was attempted to be accessed and the object that was accessed " -"for said attribute, respectively." +"The optional *name* and *obj* keyword-only arguments set the corresponding " +"attributes:" msgstr "" -"Les attributs :attr:`name` et :attr:`obj` peuvent être définis uniquement à " -"l'aide d'arguments nommés passés au constructeur. Lorsqu'ils sont définis, " -"ils représentent respectivement le nom de l'attribut pour lequel il y a eu " -"une tentative d'accès et l'objet qui a été accédé pour cet attribut." #: library/exceptions.rst:212 +#, fuzzy +msgid "The name of the attribute that was attempted to be accessed." +msgstr "Le nom de l'encodage qui a provoqué l'erreur." + +#: library/exceptions.rst:216 +msgid "The object that was accessed for the named attribute." +msgstr "" + +#: library/exceptions.rst:218 msgid "Added the :attr:`name` and :attr:`obj` attributes." msgstr "Ajout des attributs :attr:`name` et :attr:`obj`." -#: library/exceptions.rst:217 +#: library/exceptions.rst:223 +#, fuzzy msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " -"without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." -"IOBase.readline` methods return an empty string when they hit EOF.)" +"without reading any data. (Note: the :meth:`io.TextIOBase.read` " +"and :meth:`io.IOBase.readline` methods return an empty string when they hit " +"EOF.)" msgstr "" "Levée lorsque la fonction :func:`input` atteint une condition de fin de " -"fichier (EOF) sans lire aucune donnée. (N.B. : les méthodes :meth:`io.IOBase." -"read` et :meth:`io.IOBase.readline` retournent une chaîne vide lorsqu'elles " -"atteignent EOF.)" +"fichier (EOF) sans lire aucune donnée. (N.B. : les " +"méthodes :meth:`io.IOBase.read` et :meth:`io.IOBase.readline` retournent une " +"chaîne vide lorsqu'elles atteignent EOF.)" -#: library/exceptions.rst:224 +#: library/exceptions.rst:230 msgid "Not currently used." msgstr "N’est pas utilisé pour le moment." -#: library/exceptions.rst:229 +#: library/exceptions.rst:235 msgid "" -"Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" -"`generator.close` and :meth:`coroutine.close`. It directly inherits from :" -"exc:`BaseException` instead of :exc:`Exception` since it is technically not " -"an error." +"Raised when a :term:`generator` or :term:`coroutine` is closed; " +"see :meth:`generator.close` and :meth:`coroutine.close`. It directly " +"inherits from :exc:`BaseException` instead of :exc:`Exception` since it is " +"technically not an error." msgstr "" -"Levée lorsqu'un :term:`generator` ou une :term:`coroutine` est fermé, voir :" -"meth:`generator.close` et :meth:`coroutine.close`. Elle hérite directement " -"de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne s'agit pas " -"techniquement d'une erreur." +"Levée lorsqu'un :term:`generator` ou une :term:`coroutine` est fermé, " +"voir :meth:`generator.close` et :meth:`coroutine.close`. Elle hérite " +"directement de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne " +"s'agit pas techniquement d'une erreur." -#: library/exceptions.rst:237 +#: library/exceptions.rst:243 msgid "" "Raised when the :keyword:`import` statement has troubles trying to load a " "module. Also raised when the \"from list\" in ``from ... import`` has a " @@ -387,36 +397,42 @@ msgstr "" "de charger un module. Également levée lorsque Python ne trouve pas un nom " "dans ``from ... import``." -#: library/exceptions.rst:241 +#: library/exceptions.rst:247 msgid "" "The optional *name* and *path* keyword-only arguments set the corresponding " "attributes:" msgstr "" -#: library/exceptions.rst:246 +#: library/exceptions.rst:252 #, fuzzy msgid "The name of the module that was attempted to be imported." msgstr "Le nom de l'encodage qui a provoqué l'erreur." -#: library/exceptions.rst:250 +#: library/exceptions.rst:256 msgid "The path to any file which triggered the exception." msgstr "" -#: library/exceptions.rst:252 +#: library/exceptions.rst:258 msgid "Added the :attr:`name` and :attr:`path` attributes." msgstr "Ajout des attributs :attr:`name` et :attr:`path`." -#: library/exceptions.rst:257 +#: library/exceptions.rst:263 msgid "" "A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a " -"module could not be located. It is also raised when ``None`` is found in :" -"data:`sys.modules`." +"module could not be located. It is also raised when ``None`` is found " +"in :data:`sys.modules`." msgstr "" "Une sous-classe de :exc:`ImportError` qui est levée par :keyword:`import` " "lorsqu'un module n'a pas pu être localisé. Elle est généralement levée quand " "``None`` est trouvé dans :data:`sys.modules`." -#: library/exceptions.rst:266 +#: library/exceptions.rst:271 +msgid "" +"A subclass of :exc:`ImportError` which is raised when a lazy import fails " +"because it (directly or indirectly) tries to import itself." +msgstr "" + +#: library/exceptions.rst:278 msgid "" "Raised when a sequence subscript is out of range. (Slice indices are " "silently truncated to fall in the allowed range; if an index is not an " @@ -426,7 +442,7 @@ msgstr "" "tranches (*slices*) sont tronqués silencieusement pour tomber dans la plage " "autorisée ; si un indice n'est pas un entier, :exc:`TypeError` est levée.)" -#: library/exceptions.rst:275 +#: library/exceptions.rst:287 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." @@ -434,11 +450,11 @@ msgstr "" "Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " "des clefs existantes." -#: library/exceptions.rst:282 +#: library/exceptions.rst:294 msgid "" -"Raised when the user hits the interrupt key (normally :kbd:`Control-C` or :" -"kbd:`Delete`). During execution, a check for interrupts is made regularly. " -"The exception inherits from :exc:`BaseException` so as to not be " +"Raised when the user hits the interrupt key (normally :kbd:`Control-C` " +"or :kbd:`Delete`). During execution, a check for interrupts is made " +"regularly. The exception inherits from :exc:`BaseException` so as to not be " "accidentally caught by code that catches :exc:`Exception` and thus prevent " "the interpreter from exiting." msgstr "" @@ -449,7 +465,7 @@ msgstr "" "du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " "quitter." -#: library/exceptions.rst:290 +#: library/exceptions.rst:302 msgid "" "Catching a :exc:`KeyboardInterrupt` requires special consideration. Because " "it can be raised at unpredictable points, it may, in some circumstances, " @@ -460,19 +476,21 @@ msgstr "" "Attraper une :exc:`KeyboardInterrupt` demande une considération " "particulière. Comme elle peut être levée à des moments imprévisibles, elle " "peut dans certains cas laisser le programme en cours d'exécution dans un " -"état incohérent. Il est généralement préférable de laisser :exc:" -"`KeyboardInterrupt` arrêter le programme aussi rapidement que possible ou " -"d'éviter catégoriquement de la lever (voir :ref:`handlers-and-exceptions`)." +"état incohérent. Il est généralement préférable de " +"laisser :exc:`KeyboardInterrupt` arrêter le programme aussi rapidement que " +"possible ou d'éviter catégoriquement de la lever (voir :ref:`handlers-and-" +"exceptions`)." -#: library/exceptions.rst:300 +#: library/exceptions.rst:312 msgid "" "Raised when an operation runs out of memory but the situation may still be " "rescued (by deleting some objects). The associated value is a string " "indicating what kind of (internal) operation ran out of memory. Note that " -"because of the underlying memory management architecture (C's :c:func:" -"`malloc` function), the interpreter may not always be able to completely " -"recover from this situation; it nevertheless raises an exception so that a " -"stack traceback can be printed, in case a run-away program was the cause." +"because of the underlying memory management architecture " +"(C's :c:func:`malloc` function), the interpreter may not always be able to " +"completely recover from this situation; it nevertheless raises an exception " +"so that a stack traceback can be printed, in case a run-away program was the " +"cause." msgstr "" "Levée lorsqu'une opération est à court de mémoire mais que la situation peut " "encore être rattrapée (en supprimant certains objets). La valeur associée " @@ -483,7 +501,7 @@ msgstr "" "une exception pour qu'une pile d'appels puisse être affichée, dans le cas où " "un programme en cours d'exécution en était la cause." -#: library/exceptions.rst:311 +#: library/exceptions.rst:323 msgid "" "Raised when a local or global name is not found. This applies only to " "unqualified names. The associated value is an error message that includes " @@ -493,21 +511,20 @@ msgstr "" "qu'aux noms non qualifiés. La valeur associée est un message d'erreur qui " "inclut le nom qui n'a pas pu être trouvé." -#: library/exceptions.rst:315 -msgid "" -"The :attr:`name` attribute can be set using a keyword-only argument to the " -"constructor. When set it represent the name of the variable that was " -"attempted to be accessed." +#: library/exceptions.rst:327 +msgid "The optional *name* keyword-only argument sets the attribute:" msgstr "" -"L'attribut :attr:`name` doit être défini uniquement à l'aide d'un argument " -"nommé passé au constructeur. Lorsqu'il est défini, il représente le nom de " -"la variable pour laquelle il y a eu une tentative d'accès." -#: library/exceptions.rst:319 +#: library/exceptions.rst:331 +#, fuzzy +msgid "The name of the variable that was attempted to be accessed." +msgstr "Le nom de l'encodage qui a provoqué l'erreur." + +#: library/exceptions.rst:333 msgid "Added the :attr:`name` attribute." msgstr "Ajout de l'attribut :attr:`name`." -#: library/exceptions.rst:325 +#: library/exceptions.rst:339 msgid "" "This exception is derived from :exc:`RuntimeError`. In user defined base " "classes, abstract methods should raise this exception when they require " @@ -520,7 +537,7 @@ msgstr "" "méthode, ou lorsque la classe est en cours de développement pour indiquer " "que l'implémentation concrète doit encore être ajoutée." -#: library/exceptions.rst:332 +#: library/exceptions.rst:346 msgid "" "It should not be used to indicate that an operator or method is not meant to " "be supported at all -- in that case either leave the operator / method " @@ -531,18 +548,19 @@ msgstr "" "évitez de définir l'opérateur ou la méthode, ou s'il s'agit d'une sous-" "classe, assignez-le à :data:`None`." -#: library/exceptions.rst:338 +#: library/exceptions.rst:352 #, fuzzy msgid "" -"``NotImplementedError`` and :data:`NotImplemented` are not interchangeable, " -"even though they have similar names and purposes. See :data:`!" -"NotImplemented` for details on when to use it." +":exc:`!NotImplementedError` and :data:`!NotImplemented` are not " +"interchangeable. This exception should only be used as described above; " +"see :data:`NotImplemented` for details on correct usage of the built-in " +"constant." msgstr "" "``NotImplementedError`` et ``NotImplemented`` ne sont pas interchangeables, " -"même s'ils ont des noms et des objectifs similaires. Voir :data:" -"`NotImplemented` pour des détails sur la façon de les utiliser." +"même s'ils ont des noms et des objectifs similaires. " +"Voir :data:`NotImplemented` pour des détails sur la façon de les utiliser." -#: library/exceptions.rst:347 +#: library/exceptions.rst:363 msgid "" "This exception is raised when a system function returns a system-related " "error, including I/O failures such as \"file not found\" or \"disk full\" " @@ -553,13 +571,13 @@ msgstr "" "non trouvé\" ou \"disque plein\" (pas pour les types d'arguments illégaux ou " "d'autres erreurs accidentelles)." -#: library/exceptions.rst:351 +#: library/exceptions.rst:367 msgid "" "The second form of the constructor sets the corresponding attributes, " "described below. The attributes default to :const:`None` if not specified. " -"For backwards compatibility, if three arguments are passed, the :attr:" -"`~BaseException.args` attribute contains only a 2-tuple of the first two " -"constructor arguments." +"For backwards compatibility, if three arguments are passed, " +"the :attr:`~BaseException.args` attribute contains only a 2-tuple of the " +"first two constructor arguments." msgstr "" "La deuxième forme du constructeur définit les attributs correspondants, " "décrits ci-dessous. Les attributs par défaut sont :const:`None` si non " @@ -567,13 +585,13 @@ msgstr "" "l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " "valeurs des deux premiers arguments du constructeur." -#: library/exceptions.rst:357 +#: library/exceptions.rst:373 msgid "" "The constructor often actually returns a subclass of :exc:`OSError`, as " "described in `OS exceptions`_ below. The particular subclass depends on the " -"final :attr:`.errno` value. This behaviour only occurs when constructing :" -"exc:`OSError` directly or via an alias, and is not inherited when " -"subclassing." +"final :attr:`.errno` value. This behaviour only occurs when " +"constructing :exc:`OSError` directly or via an alias, and is not inherited " +"when subclassing." msgstr "" "Le constructeur retourne souvent une sous-classe d':exc:`OSError`, comme " "décrit dans `OS exceptions`_ ci-dessous. La sous-classe particulière dépend " @@ -581,88 +599,91 @@ msgstr "" "de la construction d':exc:`OSError` directement ou via un alias, et n'est " "pas hérité lors du sous-classement." -#: library/exceptions.rst:365 +#: library/exceptions.rst:381 msgid "A numeric error code from the C variable :c:data:`errno`." msgstr "Code d'erreur numérique de la variable C :c:data:`errno`." -#: library/exceptions.rst:369 +#: library/exceptions.rst:385 msgid "" -"Under Windows, this gives you the native Windows error code. The :attr:`." -"errno` attribute is then an approximate translation, in POSIX terms, of that " -"native error code." +"Under Windows, this gives you the native Windows error code. " +"The :attr:`.errno` attribute is then an approximate translation, in POSIX " +"terms, of that native error code." msgstr "" -"Sous Windows, cela donne le code d'erreur Windows natif. L'attribut :attr:`." -"errno` est alors une traduction approximative, en termes POSIX, de ce code " -"d'erreur natif." +"Sous Windows, cela donne le code d'erreur Windows natif. " +"L'attribut :attr:`.errno` est alors une traduction approximative, en termes " +"POSIX, de ce code d'erreur natif." -#: library/exceptions.rst:373 +#: library/exceptions.rst:389 msgid "" -"Under Windows, if the *winerror* constructor argument is an integer, the :" -"attr:`.errno` attribute is determined from the Windows error code, and the " -"*errno* argument is ignored. On other platforms, the *winerror* argument is " -"ignored, and the :attr:`winerror` attribute does not exist." +"Under Windows, if the *winerror* constructor argument is an integer, " +"the :attr:`.errno` attribute is determined from the Windows error code, and " +"the *errno* argument is ignored. On other platforms, the *winerror* " +"argument is ignored, and the :attr:`winerror` attribute does not exist." msgstr "" "Sous Windows, si l'argument du constructeur *winerror* est un entier, " "l'attribut :attr:`.errno` est déterminé à partir du code d'erreur Windows, " "et l'argument *errno* est ignoré. Sur d'autres plateformes, l'argument " "*winerror* est ignoré, et l'attribut :attr:`winerror` n'existe pas." -#: library/exceptions.rst:381 +#: library/exceptions.rst:397 +#, fuzzy msgid "" "The corresponding error message, as provided by the operating system. It is " -"formatted by the C functions :c:func:`perror` under POSIX, and :c:func:" -"`FormatMessage` under Windows." +"formatted by the C functions :c:func:`!perror` under POSIX, and :c:func:`!" +"FormatMessage` under Windows." msgstr "" "Le message d'erreur correspondant, tel que fourni par le système " "d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " "POSIX, et :c:func:`FormatMessage` sous Windows." -#: library/exceptions.rst:389 +#: library/exceptions.rst:405 msgid "" -"For exceptions that involve a file system path (such as :func:`open` or :" -"func:`os.unlink`), :attr:`filename` is the file name passed to the function. " -"For functions that involve two file system paths (such as :func:`os." -"rename`), :attr:`filename2` corresponds to the second file name passed to " -"the function." +"For exceptions that involve a file system path (such as :func:`open` " +"or :func:`os.unlink`), :attr:`filename` is the file name passed to the " +"function. For functions that involve two file system paths (such " +"as :func:`os.rename`), :attr:`filename2` corresponds to the second file name " +"passed to the function." msgstr "" "Pour les exceptions qui font référence à un chemin d'accès au système de " "fichiers (comme :func:`open` ou :func:`os.unlink`), :attr:`filename` est le " "nom du fichier transmis à la fonction. Pour les fonctions qui font référence " -"à deux chemins d'accès au système de fichiers (comme :func:`os.rename`), :" -"attr:`filename2` correspond au deuxième nom de fichier passé à la fonction." +"à deux chemins d'accès au système de fichiers " +"(comme :func:`os.rename`), :attr:`filename2` correspond au deuxième nom de " +"fichier passé à la fonction." -#: library/exceptions.rst:396 +#: library/exceptions.rst:412 +#, fuzzy msgid "" -":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." -"error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" -"`OSError`, and the constructor may return a subclass." +":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket.error`, :exc:`select.error` " +"and :exc:`!mmap.error` have been merged into :exc:`OSError`, and the " +"constructor may return a subclass." msgstr "" -":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." -"error`, :exc:`select.error` et :exc:`mmap.error` ont fusionnées en :exc:" -"`OSError`, et le constructeur peut renvoyer une sous-classe." +":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket.error`, :exc:`select.error` " +"et :exc:`mmap.error` ont fusionnées en :exc:`OSError`, et le constructeur " +"peut renvoyer une sous-classe." -#: library/exceptions.rst:402 +#: library/exceptions.rst:418 msgid "" "The :attr:`filename` attribute is now the original file name passed to the " -"function, instead of the name encoded to or decoded from the :term:" -"`filesystem encoding and error handler`. Also, the *filename2* constructor " -"argument and attribute was added." +"function, instead of the name encoded to or decoded from " +"the :term:`filesystem encoding and error handler`. Also, the *filename2* " +"constructor argument and attribute was added." msgstr "" "L'attribut :attr:`filename` est maintenant le nom du fichier originel passé " -"à la fonction, au lieu du nom encodé ou décodé à partir du :term:" -"`gestionnaire d'encodage et d'erreur du système de fichiers `. De plus, l'argument du constructeur et " -"attribut *filename2* a été ajouté." +"à la fonction, au lieu du nom encodé ou décodé à partir " +"du :term:`gestionnaire d'encodage et d'erreur du système de fichiers " +"`. De plus, l'argument du " +"constructeur et attribut *filename2* a été ajouté." -#: library/exceptions.rst:411 +#: library/exceptions.rst:427 #, fuzzy msgid "" "Raised when the result of an arithmetic operation is too large to be " -"represented. This cannot occur for integers (which would rather raise :exc:" -"`MemoryError` than give up). However, for historical reasons, OverflowError " -"is sometimes raised for integers that are outside a required range. " -"Because of the lack of standardization of floating-point exception handling " -"in C, most floating-point operations are not checked." +"represented. This cannot occur for integers (which would rather " +"raise :exc:`MemoryError` than give up). However, for historical reasons, " +"OverflowError is sometimes raised for integers that are outside a required " +"range. Because of the lack of standardization of floating-point exception " +"handling in C, most floating-point operations are not checked." msgstr "" "Levée lorsque le résultat d'une opération arithmétique est trop grand pour " "être représenté. Cela ne peut pas se produire pour les entiers (qui " @@ -672,7 +693,7 @@ msgstr "" "normalisation de la gestion des exceptions de virgule flottante en C, la " "plupart des opérations en virgule flottante ne sont pas vérifiées." -#: library/exceptions.rst:421 +#: library/exceptions.rst:437 #, fuzzy msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when an " @@ -680,55 +701,75 @@ msgid "" "finalization `." msgstr "" "Cette exception est dérivée de :exc:`RuntimeError`. Elle est levée lorsque " -"l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" -"`sys.getrecursionlimit`) est dépassée." +"l'interpréteur détecte que la profondeur de récursivité maximale " +"(voir :func:`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:425 +#: library/exceptions.rst:441 msgid "" -"Examples of operations which can be blocked with a :exc:" -"`PythonFinalizationError` during the Python finalization:" +"Examples of operations which can be blocked with " +"a :exc:`PythonFinalizationError` during the Python finalization:" msgstr "" -#: library/exceptions.rst:428 +#: library/exceptions.rst:444 msgid "Creating a new Python thread." msgstr "" -#: library/exceptions.rst:429 -msgid ":func:`os.fork`." +#: library/exceptions.rst:445 +msgid ":meth:`Joining ` a running daemon thread." +msgstr "" + +#: library/exceptions.rst:446 +msgid ":func:`os.fork`," msgstr "" -#: library/exceptions.rst:431 +#: library/exceptions.rst:447 +msgid "" +"acquiring a lock such as :class:`threading.Lock`, when it is known that the " +"operation would otherwise deadlock." +msgstr "" + +#: library/exceptions.rst:450 msgid "See also the :func:`sys.is_finalizing` function." msgstr "" -#: library/exceptions.rst:443 +#: library/exceptions.rst:470 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." -#: library/exceptions.rst:439 +#: library/exceptions.rst:457 +msgid ":meth:`threading.Thread.join` can now raise this exception." +msgstr "" + +#: library/exceptions.rst:461 +msgid "" +"This exception may be raised when acquiring :meth:`threading.Lock` " +"or :meth:`threading.RLock`." +msgstr "" + +#: library/exceptions.rst:466 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when the " -"interpreter detects that the maximum recursion depth (see :func:`sys." -"getrecursionlimit`) is exceeded." +"interpreter detects that the maximum recursion depth " +"(see :func:`sys.getrecursionlimit`) is exceeded." msgstr "" "Cette exception est dérivée de :exc:`RuntimeError`. Elle est levée lorsque " -"l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" -"`sys.getrecursionlimit`) est dépassée." +"l'interpréteur détecte que la profondeur de récursivité maximale " +"(voir :func:`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:449 +#: library/exceptions.rst:476 msgid "" -"This exception is raised when a weak reference proxy, created by the :func:" -"`weakref.proxy` function, is used to access an attribute of the referent " -"after it has been garbage collected. For more information on weak " +"This exception is raised when a weak reference proxy, created by " +"the :func:`weakref.proxy` function, is used to access an attribute of the " +"referent after it has been garbage collected. For more information on weak " "references, see the :mod:`weakref` module." msgstr "" "Cette exception est levée lorsqu'un pointeur faible d'un objet proxy, créé " "par la fonction :func:`weakref.proxy`, est utilisé pour accéder à un " "attribut du référent après qu'il ait été récupéré par le ramasse-miettes. " -"Pour plus d'informations sur les pointeurs faibles, voir le module :mod:" -"`weakref`." +"Pour plus d'informations sur les pointeurs faibles, voir le " +"module :mod:`weakref`." -#: library/exceptions.rst:457 +#: library/exceptions.rst:484 msgid "" "Raised when an error is detected that doesn't fall in any of the other " "categories. The associated value is a string indicating what precisely went " @@ -738,49 +779,50 @@ msgstr "" "détectée. La valeur associée est une chaîne de caractères indiquant " "précisément ce qui s'est mal passé." -#: library/exceptions.rst:464 +#: library/exceptions.rst:491 msgid "" -"Raised by built-in function :func:`next` and an :term:`iterator`\\'s :meth:" -"`~iterator.__next__` method to signal that there are no further items " -"produced by the iterator." +"Raised by built-in function :func:`next` and " +"an :term:`iterator`\\'s :meth:`~iterator.__next__` method to signal that " +"there are no further items produced by the iterator." msgstr "" -"Levée par la fonction native :func:`next` et la méthode :meth:`~iterator." -"__next__` d'un :term:`iterator` (itérateur) pour signaler qu'il n'y a pas " -"d'autres éléments produits par l'itérateur." +"Levée par la fonction native :func:`next` et la " +"méthode :meth:`~iterator.__next__` d'un :term:`iterator` (itérateur) pour " +"signaler qu'il n'y a pas d'autres éléments produits par l'itérateur." -#: library/exceptions.rst:470 +#: library/exceptions.rst:497 #, fuzzy msgid "" "The exception object has a single attribute :attr:`!value`, which is given " -"as an argument when constructing the exception, and defaults to :const:" -"`None`." +"as an argument when constructing the exception, and defaults " +"to :const:`None`." msgstr "" "L'objet exception a un unique attribut :attr:`value`, qui est donné en " "argument lors de la construction de l'exception, et vaut :const:`None` par " "défaut." -#: library/exceptions.rst:474 +#: library/exceptions.rst:501 msgid "" -"When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" -"`StopIteration` instance is raised, and the value returned by the function " -"is used as the :attr:`value` parameter to the constructor of the exception." +"When a :term:`generator` or :term:`coroutine` function returns, a " +"new :exc:`StopIteration` instance is raised, and the value returned by the " +"function is used as the :attr:`value` parameter to the constructor of the " +"exception." msgstr "" "Lorsqu'une fonction de type :term:`generator` ou :term:`coroutine` retourne " "une valeur, une nouvelle instance de :exc:`StopIteration` est levée, et la " "valeur retournée par la fonction est passée au paramètre :attr:`value` du " "constructeur de l'exception." -#: library/exceptions.rst:479 +#: library/exceptions.rst:506 msgid "" "If a generator code directly or indirectly raises :exc:`StopIteration`, it " "is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " "as the new exception's cause)." msgstr "" -"Si le code d'un générateur lève, directement ou indirectement, une :exc:" -"`StopIteration`, elle est convertie en :exc:`RuntimeError` (en conservant :" -"exc:`StopIteration` comme cause de la nouvelle exception)." +"Si le code d'un générateur lève, directement ou indirectement, " +"une :exc:`StopIteration`, elle est convertie en :exc:`RuntimeError` (en " +"conservant :exc:`StopIteration` comme cause de la nouvelle exception)." -#: library/exceptions.rst:483 +#: library/exceptions.rst:510 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." @@ -788,7 +830,7 @@ msgstr "" "Ajout de l'attribut ``value`` et de la possibilité pour les fonctions de " "générateur de l'utiliser pour retourner une valeur." -#: library/exceptions.rst:487 +#: library/exceptions.rst:514 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." @@ -796,30 +838,30 @@ msgstr "" "Introduit la transformation des erreurs ``RuntimeError`` via ``from " "__future__ import generator_stop``, cf. :pep:`479`." -#: library/exceptions.rst:491 +#: library/exceptions.rst:518 msgid "" "Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " "raised in a generator is transformed into a :exc:`RuntimeError`." msgstr "" -"Active :pep:`479` pour tout le code par défaut : quand une erreur :exc:" -"`StopIteration` est levée dans un générateur elle est transformée en une :" -"exc:`RuntimeError`." +"Active :pep:`479` pour tout le code par défaut : quand une " +"erreur :exc:`StopIteration` est levée dans un générateur elle est " +"transformée en une :exc:`RuntimeError`." -#: library/exceptions.rst:497 +#: library/exceptions.rst:524 #, fuzzy msgid "" "Must be raised by :meth:`~object.__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." msgstr "" -"Doit être levée par la méthode :meth:`__anext__` d'un objet :term:" -"`asynchronous iterator` pour arrêter l'itération." +"Doit être levée par la méthode :meth:`__anext__` d'un " +"objet :term:`asynchronous iterator` pour arrêter l'itération." -#: library/exceptions.rst:504 +#: library/exceptions.rst:531 msgid "" -"Raised when the parser encounters a syntax error. This may occur in an :" -"keyword:`import` statement, in a call to the built-in functions :func:" -"`compile`, :func:`exec`, or :func:`eval`, or when reading the initial script " -"or standard input (also interactively)." +"Raised when the parser encounters a syntax error. This may occur in " +"an :keyword:`import` statement, in a call to the built-in " +"functions :func:`compile`, :func:`exec`, or :func:`eval`, or when reading " +"the initial script or standard input (also interactively)." msgstr "" "Levée lorsque l'analyseur syntaxique rencontre une erreur de syntaxe. Cela " "peut se produire dans une instruction :keyword:`import`, dans un appel aux " @@ -827,7 +869,7 @@ msgstr "" "la lecture du script initial ou de l'entrée standard (également de manière " "interactive)." -#: library/exceptions.rst:510 +#: library/exceptions.rst:537 msgid "" "The :func:`str` of the exception instance returns only the error message. " "Details is a tuple whose members are also available as separate attributes." @@ -836,11 +878,11 @@ msgstr "" "renvoie que le message d'erreur. L'argument ``details`` est un *n*-uplet " "dont les membres sont disponibles en tant qu'attributs séparés." -#: library/exceptions.rst:515 +#: library/exceptions.rst:542 msgid "The name of the file the syntax error occurred in." msgstr "Le nom du fichier dans lequel l'erreur de syntaxe a été rencontrée." -#: library/exceptions.rst:519 +#: library/exceptions.rst:546 msgid "" "Which line number in the file the error occurred in. This is 1-indexed: the " "first line in the file has a ``lineno`` of 1." @@ -848,7 +890,7 @@ msgstr "" "Le numéro de la ligne dans le fichier où l'erreur s'est produite. L'indiçage " "commence à 1 : ``lineno`` vaut 1 pour la première ligne du fichier." -#: library/exceptions.rst:524 +#: library/exceptions.rst:551 msgid "" "The column in the line where the error occurred. This is 1-indexed: the " "first character in the line has an ``offset`` of 1." @@ -856,11 +898,11 @@ msgstr "" "La colonne dans la ligne où l'erreur s'est produite. L'indiçage commence à " "1 : ``offset`` vaut 1 pour le premier caractère de la ligne." -#: library/exceptions.rst:529 +#: library/exceptions.rst:556 msgid "The source code text involved in the error." msgstr "Le texte du code source impliqué dans l'erreur." -#: library/exceptions.rst:533 +#: library/exceptions.rst:560 msgid "" "Which line number in the file the error occurred ends in. This is 1-indexed: " "the first line in the file has a ``lineno`` of 1." @@ -868,7 +910,7 @@ msgstr "" "Le numéro de la dernière ligne produisant l'erreur. L'indiçage commence à " "1 : ``lineno`` vaut 1 pour la première ligne du fichier." -#: library/exceptions.rst:538 +#: library/exceptions.rst:565 msgid "" "The column in the end line where the error occurred finishes. This is 1-" "indexed: the first character in the line has an ``offset`` of 1." @@ -877,7 +919,7 @@ msgstr "" "L'indiçage commence à 1 : ``offset`` vaut 1 pour le premier caractère de la " "ligne." -#: library/exceptions.rst:541 +#: library/exceptions.rst:568 msgid "" "For errors in f-string fields, the message is prefixed by \"f-string: \" and " "the offsets are offsets in a text constructed from the replacement " @@ -890,11 +932,11 @@ msgstr "" "compiler ``f'Bad {a b} field'`` produit cet attribut *args* : ``('f-" "string: ...', ('', 1, 2, '(a b)\\n', 1, 5)).``" -#: library/exceptions.rst:546 +#: library/exceptions.rst:573 msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." msgstr "Ajout des attributs :attr:`end_lineno` et :attr:`end_offset`." -#: library/exceptions.rst:551 +#: library/exceptions.rst:578 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." @@ -902,7 +944,7 @@ msgstr "" "Classe mère pour les erreurs de syntaxe liées à une indentation incorrecte. " "C'est une sous-classe de :exc:`SyntaxError`." -#: library/exceptions.rst:557 +#: library/exceptions.rst:584 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." @@ -910,57 +952,64 @@ msgstr "" "Levée lorsqu'une indentation contient une utilisation incohérente des " "tabulations et des espaces. C'est une sous-classe de :exc:`IndentationError`." -#: library/exceptions.rst:563 +#: library/exceptions.rst:590 +#, fuzzy msgid "" "Raised when the interpreter finds an internal error, but the situation does " "not look so serious to cause it to abandon all hope. The associated value is " -"a string indicating what went wrong (in low-level terms)." +"a string indicating what went wrong (in low-level terms). " +"In :term:`CPython`, this could be raised by incorrectly using Python's C " +"API, such as returning a ``NULL`` value without an exception set." msgstr "" "Levée lorsque l'interpréteur trouve une erreur interne, mais que la " "situation ne semble pas si grave au point de lui faire abandonner tout " "espoir. La valeur associée est une chaîne de caractères indiquant l'erreur " "qui est survenue (en termes bas niveau)." -#: library/exceptions.rst:567 +#: library/exceptions.rst:596 +#, fuzzy msgid "" -"You should report this to the author or maintainer of your Python " -"interpreter. Be sure to report the version of the Python interpreter (``sys." -"version``; it is also printed at the start of an interactive Python " -"session), the exact error message (the exception's associated value) and if " -"possible the source of the program that triggered the error." +"If you're confident that this exception wasn't your fault, or the fault of a " +"package you're using, you should report this to the author or maintainer of " +"your Python interpreter. Be sure to report the version of the Python " +"interpreter (``sys.version``; it is also printed at the start of an " +"interactive Python session), the exact error message (the exception's " +"associated value) and if possible the source of the program that triggered " +"the error." msgstr "" "Vous devriez le signaler à l'auteur ou au responsable de votre interpréteur " -"Python. Assurez-vous de signaler la version de l'interpréteur (``sys." -"version`` ; elle est également affichée au lancement d'une session " +"Python. Assurez-vous de signaler la version de l'interpréteur " +"(``sys.version`` ; elle est également affichée au lancement d'une session " "interactive), le message d'erreur exact (la valeur associée à l'exception) " "et si possible le code source du programme qui a déclenché l'erreur." -#: library/exceptions.rst:576 +#: library/exceptions.rst:607 +#, fuzzy msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " "from :exc:`BaseException` instead of :exc:`Exception` so that it is not " "accidentally caught by code that catches :exc:`Exception`. This allows the " "exception to properly propagate up and cause the interpreter to exit. When " "it is not handled, the Python interpreter exits; no stack traceback is " -"printed. The constructor accepts the same optional argument passed to :func:" -"`sys.exit`. If the value is an integer, it specifies the system exit status " -"(passed to C's :c:func:`exit` function); if it is ``None``, the exit status " -"is zero; if it has another type (such as a string), the object's value is " -"printed and the exit status is one." -msgstr "" -"Cette exception est levée par la fonction :func:`sys.exit`. Elle hérite de :" -"exc:`BaseException` au lieu d':exc:`Exception` pour ne pas qu'elle soit " +"printed. The constructor accepts the same optional argument passed " +"to :func:`sys.exit`. If the value is an integer, it specifies the system " +"exit status (passed to C's :c:func:`!exit` function); if it is ``None``, the " +"exit status is zero; if it has another type (such as a string), the object's " +"value is printed and the exit status is one." +msgstr "" +"Cette exception est levée par la fonction :func:`sys.exit`. Elle hérite " +"de :exc:`BaseException` au lieu d':exc:`Exception` pour ne pas qu'elle soit " "interceptée accidentellement par du code qui intercepte :exc:`Exception`. " "Cela permet à l'exception de se propager correctement et de faire quitter " "l'interpréteur. Lorsqu'elle n'est pas gérée, l'interpréteur Python quitte ; " "aucune trace d'appels n'est affichée. Le constructeur accepte le même " "argument optionnel passé à :func:`sys.exit`. Si la valeur est un entier, " -"elle spécifie l'état de sortie du système (passé à la fonction C :c:func:" -"`exit`) ; si elle est ``None``, l'état de sortie est zéro ; si elle a un " -"autre type (comme une chaîne de caractères), la valeur de l'objet est " -"affichée et l'état de sortie est un." +"elle spécifie l'état de sortie du système (passé à la fonction " +"C :c:func:`exit`) ; si elle est ``None``, l'état de sortie est zéro ; si " +"elle a un autre type (comme une chaîne de caractères), la valeur de l'objet " +"est affichée et l'état de sortie est un." -#: library/exceptions.rst:587 +#: library/exceptions.rst:618 msgid "" "A call to :func:`sys.exit` is translated into an exception so that clean-up " "handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " @@ -970,14 +1019,14 @@ msgid "" "child process after a call to :func:`os.fork`)." msgstr "" "Un appel à :func:`sys.exit` est traduit en une exception pour que les " -"gestionnaires de nettoyage (les clauses :keyword:`finally` des instructions :" -"keyword:`try`) puissent être exécutés, et pour qu'un débogueur puisse " -"exécuter un script sans courir le risque de perdre le contrôle. La fonction :" -"func:`os._exit` peut être utilisée s'il est absolument nécessaire de sortir " -"immédiatement (par exemple, dans le processus enfant après un appel à :func:" -"`os.fork`)." +"gestionnaires de nettoyage (les clauses :keyword:`finally` des " +"instructions :keyword:`try`) puissent être exécutés, et pour qu'un débogueur " +"puisse exécuter un script sans courir le risque de perdre le contrôle. La " +"fonction :func:`os._exit` peut être utilisée s'il est absolument nécessaire " +"de sortir immédiatement (par exemple, dans le processus enfant après un " +"appel à :func:`os.fork`)." -#: library/exceptions.rst:596 +#: library/exceptions.rst:627 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" @@ -985,7 +1034,7 @@ msgstr "" "L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " "défaut.)" -#: library/exceptions.rst:602 +#: library/exceptions.rst:633 msgid "" "Raised when an operation or function is applied to an object of " "inappropriate type. The associated value is a string giving details about " @@ -995,7 +1044,7 @@ msgstr "" "inapproprié. La valeur associée est une chaîne de caractères donnant des " "détails sur le type d'inadéquation." -#: library/exceptions.rst:605 +#: library/exceptions.rst:636 msgid "" "This exception may be raised by user code to indicate that an attempted " "operation on an object is not supported, and is not meant to be. If an " @@ -1005,32 +1054,32 @@ msgstr "" "Cette exception peut être levée par du code utilisateur pour indiquer qu'une " "tentative d'opération sur un objet n'est pas prise en charge, et n'est pas " "censée l'être. Si un objet est destiné à prendre en charge une opération " -"donnée mais n'a pas encore fourni une implémentation, lever :exc:" -"`NotImplementedError` est plus approprié." +"donnée mais n'a pas encore fourni une implémentation, " +"lever :exc:`NotImplementedError` est plus approprié." -#: library/exceptions.rst:610 +#: library/exceptions.rst:641 msgid "" -"Passing arguments of the wrong type (e.g. passing a :class:`list` when an :" -"class:`int` is expected) should result in a :exc:`TypeError`, but passing " -"arguments with the wrong value (e.g. a number outside expected boundaries) " -"should result in a :exc:`ValueError`." +"Passing arguments of the wrong type (e.g. passing a :class:`list` when " +"an :class:`int` is expected) should result in a :exc:`TypeError`, but " +"passing arguments with the wrong value (e.g. a number outside expected " +"boundaries) should result in a :exc:`ValueError`." msgstr "" "Le passage d'arguments du mauvais type (e.g. passer une :class:`list` quand " "un :class:`int` est attendu) devrait résulter en un :exc:`TypeError`, mais " "le passage d'arguments avec la mauvaise valeur (e.g. un nombre en dehors des " "limites attendues) devrait résulter en une :exc:`ValueError`." -#: library/exceptions.rst:617 +#: library/exceptions.rst:648 msgid "" "Raised when a reference is made to a local variable in a function or method, " -"but no value has been bound to that variable. This is a subclass of :exc:" -"`NameError`." +"but no value has been bound to that variable. This is a subclass " +"of :exc:`NameError`." msgstr "" "Levée lorsqu'une référence est faite à une variable locale dans une fonction " "ou une méthode, mais qu'aucune valeur n'a été liée à cette variable. C'est " "une sous-classe de :exc:`NameError`." -#: library/exceptions.rst:624 +#: library/exceptions.rst:655 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." @@ -1038,7 +1087,7 @@ msgstr "" "Levée lorsqu'une erreur d'encodage ou de décodage liée à Unicode se produit. " "C'est une sous-classe de :exc:`ValueError`." -#: library/exceptions.rst:627 +#: library/exceptions.rst:658 msgid "" ":exc:`UnicodeError` has attributes that describe the encoding or decoding " "error. For example, ``err.object[err.start:err.end]`` gives the particular " @@ -1048,27 +1097,33 @@ msgstr "" "décodage. Par exemple, ``err.object[err.start:err.end]`` donne l'entrée " "particulière invalide sur laquelle le codec a échoué." -#: library/exceptions.rst:633 +#: library/exceptions.rst:664 msgid "The name of the encoding that raised the error." msgstr "Le nom de l'encodage qui a provoqué l'erreur." -#: library/exceptions.rst:637 +#: library/exceptions.rst:668 msgid "A string describing the specific codec error." msgstr "Une chaîne de caractères décrivant l'erreur de codec spécifique." -#: library/exceptions.rst:641 +#: library/exceptions.rst:672 msgid "The object the codec was attempting to encode or decode." msgstr "L'objet que le codec essayait d'encoder ou de décoder." -#: library/exceptions.rst:645 +#: library/exceptions.rst:676 msgid "The first index of invalid data in :attr:`object`." msgstr "Le premier index des données invalides dans :attr:`object`." -#: library/exceptions.rst:649 +#: library/exceptions.rst:685 +msgid "" +"This value should not be negative as it is interpreted as an absolute offset " +"but this constraint is not enforced at runtime." +msgstr "" + +#: library/exceptions.rst:683 msgid "The index after the last invalid data in :attr:`object`." msgstr "L'index après la dernière donnée invalide dans :attr:`object`." -#: library/exceptions.rst:654 +#: library/exceptions.rst:691 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." @@ -1076,7 +1131,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant l'encodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:660 +#: library/exceptions.rst:697 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." @@ -1084,7 +1139,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant le décodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:666 +#: library/exceptions.rst:703 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." @@ -1092,7 +1147,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant la traduction. " "C'est une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:672 +#: library/exceptions.rst:709 msgid "" "Raised when an operation or function receives an argument that has the right " "type but an inappropriate value, and the situation is not described by a " @@ -1102,7 +1157,7 @@ msgstr "" "le bon type mais une valeur inappropriée, et que la situation n'est pas " "décrite par une exception plus précise telle que :exc:`IndexError`." -#: library/exceptions.rst:679 +#: library/exceptions.rst:716 msgid "" "Raised when the second argument of a division or modulo operation is zero. " "The associated value is a string indicating the type of the operands and the " @@ -1112,7 +1167,7 @@ msgstr "" "est zéro. La valeur associée est une chaîne indiquant le type des opérandes " "et de l'opération." -#: library/exceptions.rst:684 +#: library/exceptions.rst:721 msgid "" "The following exceptions are kept for compatibility with previous versions; " "starting from Python 3.3, they are aliases of :exc:`OSError`." @@ -1120,15 +1175,15 @@ msgstr "" "Les exceptions suivantes sont conservées pour la compatibilité avec les " "anciennes versions ; depuis Python 3.3, ce sont des alias d':exc:`OSError`." -#: library/exceptions.rst:693 +#: library/exceptions.rst:730 msgid "Only available on Windows." msgstr "Seulement disponible sous Windows." -#: library/exceptions.rst:697 +#: library/exceptions.rst:734 msgid "OS exceptions" msgstr "Exceptions système" -#: library/exceptions.rst:699 +#: library/exceptions.rst:736 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." @@ -1136,20 +1191,20 @@ msgstr "" "Les exceptions suivantes sont des sous-classes d':exc:`OSError`, elles sont " "levées en fonction du code d'erreur système." -#: library/exceptions.rst:704 +#: library/exceptions.rst:741 #, fuzzy msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" -"blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno." -"EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` and :py:" -"const:`~errno.EINPROGRESS`." +"blocking operation. Corresponds " +"to :c:data:`errno` :py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` " +"and :py:const:`~errno.EINPROGRESS`." msgstr "" "Levée lorsqu'une opération bloque sur un objet (par exemple un connecteur) " -"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` :py:" -"data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno." -"EWOULDBLOCK` et :py:data:`~errno.EINPROGRESS`." +"configuré pour une opération non-bloquante. Correspond " +"à :c:data:`errno` :py:data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` " +"et :py:data:`~errno.EINPROGRESS`." -#: library/exceptions.rst:709 +#: library/exceptions.rst:746 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" @@ -1157,85 +1212,87 @@ msgstr "" "En plus de ceux de :exc:`OSError`, :exc:`BlockingIOError` peut avoir un " "attribut de plus :" -#: library/exceptions.rst:714 +#: library/exceptions.rst:751 +#, fuzzy msgid "" -"An integer containing the number of characters written to the stream before " -"it blocked. This attribute is available when using the buffered I/O classes " +"An integer containing the number of **bytes** written to the stream before " +"it blocked. This attribute is available when using the buffered I/O classes " "from the :mod:`io` module." msgstr "" "Un nombre entier contenant le nombre de caractères écrits dans le flux avant " "qu'il ne soit bloqué. Cet attribut est disponible lors de l'utilisation des " "classes tampon entrées-sorties du module :mod:`io`." -#: library/exceptions.rst:720 +#: library/exceptions.rst:757 #, fuzzy msgid "" -"Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` :py:const:`~errno.ECHILD`." +"Raised when an operation on a child process failed. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ECHILD`." msgstr "" -"Levée lorsqu'une opération sur un processus enfant a échoué. Correspond à :c:" -"data:`errno` :py:data:`~errno.ECHILD`." +"Levée lorsqu'une opération sur un processus enfant a échoué. Correspond " +"à :c:data:`errno` :py:data:`~errno.ECHILD`." -#: library/exceptions.rst:725 +#: library/exceptions.rst:762 msgid "A base class for connection-related issues." msgstr "Classe mère pour les problèmes de connexion." -#: library/exceptions.rst:727 +#: library/exceptions.rst:764 msgid "" -"Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" -"`ConnectionRefusedError` and :exc:`ConnectionResetError`." +"Subclasses " +"are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:`ConnectionRefusedError` " +"and :exc:`ConnectionResetError`." msgstr "" -"Les sous-classes sont :exc:`BrokenPipeError`, :exc:" -"`ConnectionAbortedError`, :exc:`ConnectionRefusedError` et :exc:" -"`ConnectionResetError`." +"Les sous-classes " +"sont :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:`ConnectionRefusedError` " +"et :exc:`ConnectionResetError`." -#: library/exceptions.rst:732 +#: library/exceptions.rst:769 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " -"has been shutdown for writing. Corresponds to :c:data:`errno` :py:const:" -"`~errno.EPIPE` and :py:const:`~errno.ESHUTDOWN`." +"has been shutdown for writing. Corresponds " +"to :c:data:`errno` :py:const:`~errno.EPIPE` and :py:const:`~errno.ESHUTDOWN`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levé en essayant d'écrire sur un " "*pipe* alors que l'autre extrémité a été fermée, ou en essayant d'écrire sur " "un connecteur (*socket* en anglais) qui a été fermé pour l'écriture. " -"Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` et :py:data:`~errno." -"ESHUTDOWN`." +"Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` " +"et :py:data:`~errno.ESHUTDOWN`." -#: library/exceptions.rst:739 +#: library/exceptions.rst:776 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"aborted by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." -"ECONNABORTED`." +"aborted by the peer. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ECONNABORTED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est interrompue par le pair. Correspond à :c:data:`errno` :py:data:" -"`~errno.ECONNABORTED`." +"connexion est interrompue par le pair. Correspond " +"à :c:data:`errno` :py:data:`~errno.ECONNABORTED`." -#: library/exceptions.rst:745 +#: library/exceptions.rst:782 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"refused by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." -"ECONNREFUSED`." +"refused by the peer. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ECONNREFUSED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est refusée par le pair. Correspond à :c:data:`errno` :py:data:" -"`~errno.ECONNREFUSED`." +"connexion est refusée par le pair. Correspond " +"à :c:data:`errno` :py:data:`~errno.ECONNREFUSED`." -#: library/exceptions.rst:751 +#: library/exceptions.rst:788 #, fuzzy msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " "the peer. Corresponds to :c:data:`errno` :py:const:`~errno.ECONNRESET`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une connexion est " -"réinitialisée par le pair. Correspond à :c:data:`errno` :py:data:`~errno." -"ECONNRESET`." +"réinitialisée par le pair. Correspond " +"à :c:data:`errno` :py:data:`~errno.ECONNRESET`." -#: library/exceptions.rst:757 +#: library/exceptions.rst:794 #, fuzzy msgid "" "Raised when trying to create a file or directory which already exists. " @@ -1244,7 +1301,7 @@ msgstr "" "Levée pendant la tentative de création d'un fichier ou d'un répertoire qui " "existe déjà. Correspond à :c:data:`errno` :py:data:`~errno.EEXIST`." -#: library/exceptions.rst:762 +#: library/exceptions.rst:799 #, fuzzy msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " @@ -1253,7 +1310,7 @@ msgstr "" "Levée lorsqu'un fichier ou répertoire est demandé mais n'existe pas. " "Correspond à :c:data:`errno` :py:data:`~errno.ENOENT`." -#: library/exceptions.rst:767 +#: library/exceptions.rst:804 #, fuzzy msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " @@ -1262,34 +1319,34 @@ msgstr "" "Levée lorsqu'un appel système est interrompu par un signal entrant. " "Correspond à :c:data:`errno` :py:data:`~errno.EINTR`." -#: library/exceptions.rst:770 +#: library/exceptions.rst:807 msgid "" "Python now retries system calls when a syscall is interrupted by a signal, " "except if the signal handler raises an exception (see :pep:`475` for the " "rationale), instead of raising :exc:`InterruptedError`." msgstr "" "Python relance maintenant les appels système lorsqu'ils sont interrompus par " -"un signal, sauf si le gestionnaire de signal lève une exception (voir :pep:" -"`475` pour les raisons), au lieu de lever :exc:`InterruptedError`." +"un signal, sauf si le gestionnaire de signal lève une exception " +"(voir :pep:`475` pour les raisons), au lieu de lever :exc:`InterruptedError`." -#: library/exceptions.rst:777 +#: library/exceptions.rst:814 #, fuzzy msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " "directory. Corresponds to :c:data:`errno` :py:const:`~errno.EISDIR`." msgstr "" "Levée lorsqu'une opération sur un fichier (comme :func:`os.remove`) est " -"demandée sur un répertoire. Correspond à :c:data:`errno` :py:data:`~errno." -"EISDIR`." +"demandée sur un répertoire. Correspond " +"à :c:data:`errno` :py:data:`~errno.EISDIR`." -#: library/exceptions.rst:783 +#: library/exceptions.rst:820 #, fuzzy msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " "on something which is not a directory. On most POSIX platforms, it may also " "be raised if an operation attempts to open or traverse a non-directory file " -"as if it were a directory. Corresponds to :c:data:`errno` :py:const:`~errno." -"ENOTDIR`." +"as if it were a directory. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ENOTDIR`." msgstr "" "Levée lorsqu'une opération sur un répertoire (comme :func:`os.listdir`) est " "demandée sur autre chose qu'un répertoire. Sur la majorité des plateformes " @@ -1297,71 +1354,71 @@ msgstr "" "traverser un fichier qui n'est pas un répertoire comme s'il en était un. " "Correspond à :c:data:`errno` :py:data:`~errno.ENOTDIR`." -#: library/exceptions.rst:791 +#: library/exceptions.rst:828 #, fuzzy msgid "" "Raised when trying to run an operation without the adequate access rights - " -"for example filesystem permissions. Corresponds to :c:data:`errno` :py:const:" -"`~errno.EACCES`, :py:const:`~errno.EPERM`, and :py:const:`~errno." -"ENOTCAPABLE`." +"for example filesystem permissions. Corresponds " +"to :c:data:`errno` :py:const:`~errno.EACCES`, :py:const:`~errno.EPERM`, " +"and :py:const:`~errno.ENOTCAPABLE`." msgstr "" "Levée lorsqu'on essaye d'exécuter une opération sans les droits d'accès " -"adéquats — par exemple les permissions du système de fichiers. Correspond à :" -"c:data:`errno` :py:data:`~errno.EACCES` et :py:data:`~errno.EPERM`." +"adéquats — par exemple les permissions du système de fichiers. Correspond " +"à :c:data:`errno` :py:data:`~errno.EACCES` et :py:data:`~errno.EPERM`." -#: library/exceptions.rst:796 +#: library/exceptions.rst:833 msgid "" -"WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped to :exc:" -"`PermissionError`." +"WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped " +"to :exc:`PermissionError`." msgstr "" -#: library/exceptions.rst:802 +#: library/exceptions.rst:839 #, fuzzy msgid "" -"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" -"py:const:`~errno.ESRCH`." +"Raised when a given process doesn't exist. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ESRCH`." msgstr "" -"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` :" -"py:data:`~errno.ESRCH`." +"Levée lorsqu'un processus donné n'existe pas. Correspond " +"à :c:data:`errno` :py:data:`~errno.ESRCH`." -#: library/exceptions.rst:807 +#: library/exceptions.rst:844 #, fuzzy msgid "" -"Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` :py:const:`~errno.ETIMEDOUT`." +"Raised when a system function timed out at the system level. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ETIMEDOUT`." msgstr "" -"Levée lorsqu'une fonction système a expiré au niveau système. Correspond à :" -"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." +"Levée lorsqu'une fonction système a expiré au niveau système. Correspond " +"à :c:data:`errno` :py:data:`~errno.ETIMEDOUT`." -#: library/exceptions.rst:810 +#: library/exceptions.rst:847 msgid "All the above :exc:`OSError` subclasses were added." msgstr "Toutes les sous-classes d':exc:`OSError` ci-dessus ont été ajoutées." -#: library/exceptions.rst:816 +#: library/exceptions.rst:853 msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" msgstr ":pep:`3151` -- Refonte de la hiérarchie des exceptions système et IO" -#: library/exceptions.rst:822 +#: library/exceptions.rst:859 msgid "Warnings" msgstr "Avertissements" -#: library/exceptions.rst:824 +#: library/exceptions.rst:861 msgid "" -"The following exceptions are used as warning categories; see the :ref:" -"`warning-categories` documentation for more details." +"The following exceptions are used as warning categories; see " +"the :ref:`warning-categories` documentation for more details." msgstr "" "Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " "voir :mod:`warning-categories` pour plus d'informations." -#: library/exceptions.rst:829 +#: library/exceptions.rst:866 msgid "Base class for warning categories." msgstr "Classe mère pour les catégories d'avertissement." -#: library/exceptions.rst:834 +#: library/exceptions.rst:871 msgid "Base class for warnings generated by user code." msgstr "Classe mère pour les avertissements générés par du code utilisateur." -#: library/exceptions.rst:839 +#: library/exceptions.rst:876 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." @@ -1369,21 +1426,21 @@ msgstr "" "Classe mère pour les avertissements sur les fonctionnalités obsolètes, " "lorsque ces avertissements sont destinés aux autres développeurs Python." -#: library/exceptions.rst:842 +#: library/exceptions.rst:879 msgid "" -"Ignored by the default warning filters, except in the ``__main__`` module (:" -"pep:`565`). Enabling the :ref:`Python Development Mode ` shows this " -"warning." +"Ignored by the default warning filters, except in the ``__main__`` module " +"(:pep:`565`). Enabling the :ref:`Python Development Mode ` shows " +"this warning." msgstr "" "Ignoré par les filtres d'avertissements par défaut, sauf dans le module " "``__main__`` (:pep:`565`). Activer le :ref:`mode de développement de Python " "` affiche cet avertissement." -#: library/exceptions.rst:862 +#: library/exceptions.rst:899 msgid "The deprecation policy is described in :pep:`387`." msgstr "La politique relative à l'obsolescence est décrite dans la :pep:`387`." -#: library/exceptions.rst:851 +#: library/exceptions.rst:888 msgid "" "Base class for warnings about features which are obsolete and expected to be " "deprecated in the future, but are not deprecated at the moment." @@ -1392,7 +1449,7 @@ msgstr "" "que la fonctionnalité peut encore être utilisée actuellement, mais qu'elle " "sera supprimée dans le futur." -#: library/exceptions.rst:855 +#: library/exceptions.rst:892 msgid "" "This class is rarely used as emitting a warning about a possible upcoming " "deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " @@ -1402,7 +1459,7 @@ msgstr "" "d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " "préféré pour les obsolescences actuelles." -#: library/exceptions.rst:885 library/exceptions.rst:912 +#: library/exceptions.rst:925 library/exceptions.rst:952 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." @@ -1410,17 +1467,23 @@ msgstr "" "Ignoré par les filtres d'avertissements par défaut. Activer le :ref:`mode de " "développement de Python ` affiche cet avertissement." -#: library/exceptions.rst:867 +#: library/exceptions.rst:904 msgid "Base class for warnings about dubious syntax." msgstr "Classe mère pour les avertissements sur de la syntaxe douteuse." -#: library/exceptions.rst:872 +#: library/exceptions.rst:906 +msgid "" +"This warning is typically emitted when compiling Python source code, and " +"usually won't be reported when running already compiled code." +msgstr "" + +#: library/exceptions.rst:912 msgid "Base class for warnings about dubious runtime behavior." msgstr "" "Classe mère pour les avertissements sur les comportements d'exécution " "douteux." -#: library/exceptions.rst:877 +#: library/exceptions.rst:917 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for end users of applications that are written in Python." @@ -1429,42 +1492,42 @@ msgstr "" "obsolètes dans le futur quand ces avertissements destinés aux utilisateurs " "finaux des applications écrites en Python." -#: library/exceptions.rst:883 +#: library/exceptions.rst:923 msgid "Base class for warnings about probable mistakes in module imports." msgstr "" "Classe mère pour les avertissements sur des erreurs probables dans les " "importations de modules." -#: library/exceptions.rst:891 +#: library/exceptions.rst:931 msgid "Base class for warnings related to Unicode." msgstr "Classe mère pour les avertissements liés à l'Unicode." -#: library/exceptions.rst:896 +#: library/exceptions.rst:936 msgid "Base class for warnings related to encodings." msgstr "Classe mère pour les avertissements liés à l'encodage des chaînes." -#: library/exceptions.rst:898 +#: library/exceptions.rst:938 msgid "See :ref:`io-encoding-warning` for details." msgstr "Voir :ref:`io-encoding-warning` pour plus d'informations." -#: library/exceptions.rst:905 +#: library/exceptions.rst:945 msgid "" "Base class for warnings related to :class:`bytes` and :class:`bytearray`." msgstr "" -"Classe mère pour les avertissements liés à :class:`bytes` et :class:" -"`bytearray`." +"Classe mère pour les avertissements liés à :class:`bytes` " +"et :class:`bytearray`." -#: library/exceptions.rst:910 +#: library/exceptions.rst:950 msgid "Base class for warnings related to resource usage." msgstr "" "Classe mère pour les avertissements liés à l'utilisation des ressources." -#: library/exceptions.rst:921 +#: library/exceptions.rst:961 #, fuzzy msgid "Exception groups" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:923 +#: library/exceptions.rst:963 msgid "" "The following are used when it is necessary to raise multiple unrelated " "exceptions. They are part of the exception hierarchy so they can be handled " @@ -1473,43 +1536,57 @@ msgid "" "based on the types of the contained exceptions." msgstr "" -#: library/exceptions.rst:932 +#: library/exceptions.rst:972 msgid "" "Both of these exception types wrap the exceptions in the sequence ``excs``. " "The ``msg`` parameter must be a string. The difference between the two " "classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and " -"it can wrap any exception, while :exc:`ExceptionGroup` extends :exc:" -"`Exception` and it can only wrap subclasses of :exc:`Exception`. This design " -"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :" -"exc:`BaseExceptionGroup`." +"it can wrap any exception, while :exc:`ExceptionGroup` " +"extends :exc:`Exception` and it can only wrap subclasses " +"of :exc:`Exception`. This design is so that ``except Exception`` catches " +"an :exc:`ExceptionGroup` but not :exc:`BaseExceptionGroup`." msgstr "" -#: library/exceptions.rst:940 +#: library/exceptions.rst:980 msgid "" "The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup` " -"rather than a :exc:`BaseExceptionGroup` if all contained exceptions are :exc:" -"`Exception` instances, so it can be used to make the selection automatic. " -"The :exc:`ExceptionGroup` constructor, on the other hand, raises a :exc:" -"`TypeError` if any contained exception is not an :exc:`Exception` subclass." +"rather than a :exc:`BaseExceptionGroup` if all contained exceptions " +"are :exc:`Exception` instances, so it can be used to make the selection " +"automatic. The :exc:`ExceptionGroup` constructor, on the other hand, raises " +"a :exc:`TypeError` if any contained exception is not an :exc:`Exception` " +"subclass." +msgstr "" + +#: library/exceptions.rst:987 +msgid "" +"Exception groups are :ref:`generic ` over the type of their " +"contained exceptions." +msgstr "" + +#: library/exceptions.rst:992 +msgid "" +"The ``excs`` parameter may be any sequence, but lists and tuples are " +"specifically processed more efficiently here. For optimal performance, pass " +"a tuple as ``excs``." msgstr "" -#: library/exceptions.rst:949 +#: library/exceptions.rst:998 msgid "The ``msg`` argument to the constructor. This is a read-only attribute." msgstr "" -#: library/exceptions.rst:953 +#: library/exceptions.rst:1002 msgid "" "A tuple of the exceptions in the ``excs`` sequence given to the constructor. " "This is a read-only attribute." msgstr "" -#: library/exceptions.rst:958 +#: library/exceptions.rst:1007 msgid "" "Returns an exception group that contains only the exceptions from the " "current group that match *condition*, or ``None`` if the result is empty." msgstr "" -#: library/exceptions.rst:961 +#: library/exceptions.rst:1010 msgid "" "The condition can be an exception type or tuple of exception types, in which " "case each exception is checked for a match using the same check that is used " @@ -1518,40 +1595,40 @@ msgid "" "true for the exceptions that should be in the subgroup." msgstr "" -#: library/exceptions.rst:967 +#: library/exceptions.rst:1016 msgid "" "The nesting structure of the current exception is preserved in the result, " -"as are the values of its :attr:`message`, :attr:`~BaseException." -"__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." -"__context__` and :attr:`~BaseException.__notes__` fields. Empty nested " -"groups are omitted from the result." +"as are the values of " +"its :attr:`message`, :attr:`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException.__context__` " +"and :attr:`~BaseException.__notes__` fields. Empty nested groups are omitted " +"from the result." msgstr "" -#: library/exceptions.rst:974 +#: library/exceptions.rst:1023 msgid "" "The condition is checked for all exceptions in the nested exception group, " "including the top-level and any nested exception groups. If the condition is " "true for such an exception group, it is included in the result in full." msgstr "" -#: library/exceptions.rst:978 +#: library/exceptions.rst:1027 msgid "``condition`` can be any callable which is not a type object." msgstr "" -#: library/exceptions.rst:983 +#: library/exceptions.rst:1032 msgid "" "Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where " "``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-" "matching part." msgstr "" -#: library/exceptions.rst:989 +#: library/exceptions.rst:1038 msgid "" "Returns an exception group with the same :attr:`message`, but which wraps " "the exceptions in ``excs``." msgstr "" -#: library/exceptions.rst:992 +#: library/exceptions.rst:1041 msgid "" "This method is used by :meth:`subgroup` and :meth:`split`, which are used in " "various contexts to break up an exception group. A subclass needs to " @@ -1559,39 +1636,60 @@ msgid "" "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -#: library/exceptions.rst:998 +#: library/exceptions.rst:1047 msgid "" -":meth:`subgroup` and :meth:`split` copy the :attr:`~BaseException." -"__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." -"__context__` and :attr:`~BaseException.__notes__` fields from the original " -"exception group to the one returned by :meth:`derive`, so these fields do " -"not need to be updated by :meth:`derive`." +":meth:`subgroup` and :meth:`split` copy " +"the :attr:`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException.__context__` " +"and :attr:`~BaseException.__notes__` fields from the original exception " +"group to the one returned by :meth:`derive`, so these fields do not need to " +"be updated by :meth:`derive`." msgstr "" -#: library/exceptions.rst:1031 +#: library/exceptions.rst:1080 msgid "" "Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " "subclasses that need a different constructor signature need to override that " "rather than :meth:`~object.__init__`. For example, the following defines an " -"exception group subclass which accepts an exit_code and and constructs the " +"exception group subclass which accepts an exit_code and constructs the " "group's message from it. ::" msgstr "" -#: library/exceptions.rst:1046 +#: library/exceptions.rst:1095 msgid "" "Like :exc:`ExceptionGroup`, any subclass of :exc:`BaseExceptionGroup` which " -"is also a subclass of :exc:`Exception` can only wrap instances of :exc:" -"`Exception`." +"is also a subclass of :exc:`Exception` can only wrap instances " +"of :exc:`Exception`." msgstr "" -#: library/exceptions.rst:1054 +#: library/exceptions.rst:1103 msgid "Exception hierarchy" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:1056 +#: library/exceptions.rst:1105 msgid "The class hierarchy for built-in exceptions is:" msgstr "La hiérarchie de classes pour les exceptions natives est la suivante :" +#~ msgid "" +#~ "The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " +#~ "arguments to the constructor. When set they represent the name of the " +#~ "attribute that was attempted to be accessed and the object that was " +#~ "accessed for said attribute, respectively." +#~ msgstr "" +#~ "Les attributs :attr:`name` et :attr:`obj` peuvent être définis uniquement " +#~ "à l'aide d'arguments nommés passés au constructeur. Lorsqu'ils sont " +#~ "définis, ils représentent respectivement le nom de l'attribut pour lequel " +#~ "il y a eu une tentative d'accès et l'objet qui a été accédé pour cet " +#~ "attribut." + +#~ msgid "" +#~ "The :attr:`name` attribute can be set using a keyword-only argument to " +#~ "the constructor. When set it represent the name of the variable that was " +#~ "attempted to be accessed." +#~ msgstr "" +#~ "L'attribut :attr:`name` doit être défini uniquement à l'aide d'un " +#~ "argument nommé passé au constructeur. Lorsqu'il est défini, il représente " +#~ "le nom de la variable pour laquelle il y a eu une tentative d'accès." + #~ msgid "statement" #~ msgstr "instruction" @@ -1638,17 +1736,17 @@ msgstr "La hiérarchie de classes pour les exceptions natives est la suivante : #~ "l'exception." #~ msgid "" -#~ "When raising (or re-raising) an exception in an :keyword:`except` or :" -#~ "keyword:`finally` clause :attr:`__context__` is automatically set to the " -#~ "last exception caught; if the new exception is not handled the traceback " -#~ "that is eventually displayed will include the originating exception(s) " -#~ "and the final exception." +#~ "When raising (or re-raising) an exception in an :keyword:`except` " +#~ "or :keyword:`finally` clause :attr:`__context__` is automatically set to " +#~ "the last exception caught; if the new exception is not handled the " +#~ "traceback that is eventually displayed will include the originating " +#~ "exception(s) and the final exception." #~ msgstr "" -#~ "En levant (ou levant à nouveau) une exception dans une clause :keyword:" -#~ "`except` ou :keyword:`finally`, :attr:`__context__` est automatiquement " -#~ "assigné à la dernière exception interceptée ; si la nouvelle exception " -#~ "n'est pas gérée, la trace d'appels affichée inclut la ou les exception(s) " -#~ "d'origine et l'exception finale." +#~ "En levant (ou levant à nouveau) une exception dans une " +#~ "clause :keyword:`except` ou :keyword:`finally`, :attr:`__context__` est " +#~ "automatiquement assigné à la dernière exception interceptée ; si la " +#~ "nouvelle exception n'est pas gérée, la trace d'appels affichée inclut la " +#~ "ou les exception(s) d'origine et l'exception finale." #~ msgid "" #~ "This method sets *tb* as the new traceback for the exception and returns " @@ -1660,14 +1758,16 @@ msgstr "La hiérarchie de classes pour les exceptions natives est la suivante : #~ "dans du code de gestion d'exceptions comme ceci ::" #~ msgid "" -#~ "Instances of this class have attributes :attr:`filename`, :attr:" -#~ "`lineno`, :attr:`offset` and :attr:`text` for easier access to the " -#~ "details. :func:`str` of the exception instance returns only the message." +#~ "Instances of this class have " +#~ "attributes :attr:`filename`, :attr:`lineno`, :attr:`offset` " +#~ "and :attr:`text` for easier access to the details. :func:`str` of the " +#~ "exception instance returns only the message." #~ msgstr "" -#~ "Les instances de cette classe ont des attributs :attr:`filename`, :attr:" -#~ "`lineno`, :attr:`offset` et :attr:`text` pour accéder plus facilement aux " -#~ "détails. La représentation :func:`str` de l'instance de l'exception " -#~ "retourne seulement le message." +#~ "Les instances de cette classe ont des " +#~ "attributs :attr:`filename`, :attr:`lineno`, :attr:`offset` " +#~ "et :attr:`text` pour accéder plus facilement aux détails. La " +#~ "représentation :func:`str` de l'instance de l'exception retourne " +#~ "seulement le message." #~ msgid "" #~ "Base class for warnings related to resource usage. Ignored by the default " diff --git a/library/faulthandler.po b/library/faulthandler.po index 9035719f1..0347fe0c8 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,10 +21,10 @@ msgstr "" #: library/faulthandler.rst:11 msgid "" "This module contains functions to dump Python tracebacks explicitly, on a " -"fault, after a timeout, or on a user signal. Call :func:`faulthandler." -"enable` to install fault handlers for the :const:`~signal.SIGSEGV`, :const:" -"`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and :" -"const:`~signal.SIGILL` signals. You can also enable them at startup by " +"fault, after a timeout, or on a user signal. " +"Call :func:`faulthandler.enable` to install fault handlers for " +"the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, " +"and :const:`~signal.SIGILL` signals. You can also enable them at startup by " "setting the :envvar:`PYTHONFAULTHANDLER` environment variable or by using " "the :option:`-X` ``faulthandler`` command line option." msgstr "" @@ -62,175 +62,246 @@ msgid "" msgstr "" #: library/faulthandler.rst:34 -msgid "It is limited to 100 frames and 100 threads." +msgid "" +"It is limited to 100 frames per thread, and 100 threads (configurable via " +"*max_threads*)." msgstr "" -#: library/faulthandler.rst:35 +#: library/faulthandler.rst:36 msgid "The order is reversed: the most recent call is shown first." msgstr "" -#: library/faulthandler.rst:37 +#: library/faulthandler.rst:38 msgid "" "By default, the Python traceback is written to :data:`sys.stderr`. To see " "tracebacks, applications must be run in the terminal. A log file can " "alternatively be passed to :func:`faulthandler.enable`." msgstr "" -#: library/faulthandler.rst:41 +#: library/faulthandler.rst:42 msgid "" "The module is implemented in C, so tracebacks can be dumped on a crash or " "when Python is deadlocked." msgstr "" -#: library/faulthandler.rst:44 +#: library/faulthandler.rst:45 msgid "" -"The :ref:`Python Development Mode ` calls :func:`faulthandler." -"enable` at Python startup." +"The :ref:`Python Development Mode ` " +"calls :func:`faulthandler.enable` at Python startup." msgstr "" -#: library/faulthandler.rst:49 +#: library/faulthandler.rst:50 msgid "Module :mod:`pdb`" msgstr "" -#: library/faulthandler.rst:50 +#: library/faulthandler.rst:51 msgid "Interactive source code debugger for Python programs." msgstr "" -#: library/faulthandler.rst:52 +#: library/faulthandler.rst:53 msgid "Module :mod:`traceback`" msgstr "" -#: library/faulthandler.rst:53 +#: library/faulthandler.rst:54 msgid "" "Standard interface to extract, format and print stack traces of Python " "programs." msgstr "" -#: library/faulthandler.rst:56 +#: library/faulthandler.rst:57 msgid "Dumping the traceback" msgstr "" -#: library/faulthandler.rst:60 +#: library/faulthandler.rst:61 msgid "" "Dump the tracebacks of all threads into *file*. If *all_threads* is " -"``False``, dump only the current thread." +"``False``, dump only the current thread. *max_threads* caps the number of " +"threads dumped." msgstr "" -#: library/faulthandler.rst:63 +#: library/faulthandler.rst:65 msgid "" ":func:`traceback.print_tb`, which can be used to print a traceback object." msgstr "" -#: library/faulthandler.rst:84 library/faulthandler.rst:148 +#: library/faulthandler.rst:126 library/faulthandler.rst:204 msgid "Added support for passing file descriptor to this function." msgstr "" -#: library/faulthandler.rst:70 +#: library/faulthandler.rst:143 library/faulthandler.rst:207 +msgid "Added the *max_threads* keyword argument." +msgstr "" + +#: library/faulthandler.rst:75 +msgid "Dumping the C stack" +msgstr "" + +#: library/faulthandler.rst:81 +msgid "Dump the C stack trace of the current thread into *file*." +msgstr "" + +#: library/faulthandler.rst:83 +msgid "" +"If the Python build does not support it or the operating system does not " +"provide a stack trace, then this prints an error in place of a dumped C " +"stack." +msgstr "" + +#: library/faulthandler.rst:90 +msgid "C Stack Compatibility" +msgstr "" + +#: library/faulthandler.rst:92 +msgid "" +"If the system does not support the C-level :manpage:`backtrace(3)` " +"or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be " +"printed instead of the stack." +msgstr "" + +#: library/faulthandler.rst:96 +msgid "" +"Additionally, some compilers do not support :term:`CPython's ` " +"implementation of C stack dumps. As a result, a different error may be " +"printed instead of the stack, even if the operating system supports dumping " +"stacks." +msgstr "" + +#: library/faulthandler.rst:102 +msgid "" +"Dumping C stacks can be arbitrarily slow, depending on the DWARF level of " +"the binaries in the call stack." +msgstr "" + +#: library/faulthandler.rst:106 msgid "Fault handler state" msgstr "" -#: library/faulthandler.rst:74 +#: library/faulthandler.rst:110 msgid "" -"Enable the fault handler: install handlers for the :const:`~signal." -"SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal." -"SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If " +"Enable the fault handler: install handlers for " +"the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` " +"and :const:`~signal.SIGILL` signals to dump the Python traceback. If " "*all_threads* is ``True``, produce tracebacks for every running thread. " "Otherwise, dump only the current thread." msgstr "" -#: library/faulthandler.rst:81 +#: library/faulthandler.rst:117 msgid "" -"The *file* must be kept open until the fault handler is disabled: see :ref:" -"`issue with file descriptors `." +"The *file* must be kept open until the fault handler is disabled: " +"see :ref:`issue with file descriptors `." msgstr "" -#: library/faulthandler.rst:87 +#: library/faulthandler.rst:120 +msgid "" +"If *c_stack* is ``True``, then the C stack trace is printed after the Python " +"traceback, unless the system does not support it. See :func:`dump_c_stack` " +"for more information on compatibility." +msgstr "" + +#: library/faulthandler.rst:124 +msgid "" +"*max_threads* caps the number of threads dumped when a fatal signal fires." +msgstr "" + +#: library/faulthandler.rst:129 msgid "On Windows, a handler for Windows exception is also installed." msgstr "" -#: library/faulthandler.rst:90 +#: library/faulthandler.rst:132 msgid "" "The dump now mentions if a garbage collector collection is running if " "*all_threads* is true." msgstr "" -#: library/faulthandler.rst:96 +#: library/faulthandler.rst:136 msgid "" -"Disable the fault handler: uninstall the signal handlers installed by :func:" -"`enable`." +"Only the current thread is dumped if the :term:`GIL` is disabled to prevent " +"the risk of data races." msgstr "" -#: library/faulthandler.rst:101 +#: library/faulthandler.rst:140 +msgid "The dump now displays the C stack trace if *c_stack* is true." +msgstr "" + +#: library/faulthandler.rst:148 +msgid "" +"Disable the fault handler: uninstall the signal handlers installed " +"by :func:`enable`." +msgstr "" + +#: library/faulthandler.rst:153 msgid "Check if the fault handler is enabled." msgstr "" -#: library/faulthandler.rst:105 +#: library/faulthandler.rst:157 msgid "Dumping the tracebacks after a timeout" msgstr "" -#: library/faulthandler.rst:109 +#: library/faulthandler.rst:161 msgid "" "Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or " "every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, " -"call :c:func:`!_exit` with status=1 after dumping the tracebacks. (Note :c:" -"func:`!_exit` exits the process immediately, which means it doesn't do any " -"cleanup like flushing file buffers.) If the function is called twice, the " -"new call replaces previous parameters and resets the timeout. The timer has " -"a sub-second resolution." +"call :c:func:`!_exit` with status=1 after dumping the tracebacks. " +"(Note :c:func:`!_exit` exits the process immediately, which means it doesn't " +"do any cleanup like flushing file buffers.) If the function is called twice, " +"the new call replaces previous parameters and resets the timeout. The timer " +"has a sub-second resolution. *max_threads* caps the number of threads dumped." msgstr "" -#: library/faulthandler.rst:117 +#: library/faulthandler.rst:169 msgid "" -"The *file* must be kept open until the traceback is dumped or :func:" -"`cancel_dump_traceback_later` is called: see :ref:`issue with file " +"The *file* must be kept open until the traceback is dumped " +"or :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file " "descriptors `." msgstr "" -#: library/faulthandler.rst:121 +#: library/faulthandler.rst:173 msgid "This function is implemented using a watchdog thread." msgstr "" -#: library/faulthandler.rst:126 +#: library/faulthandler.rst:178 msgid "This function is now always available." msgstr "" -#: library/faulthandler.rst:131 +#: library/faulthandler.rst:186 msgid "Cancel the last call to :func:`dump_traceback_later`." msgstr "" -#: library/faulthandler.rst:135 +#: library/faulthandler.rst:190 msgid "Dumping the traceback on a user signal" msgstr "" -#: library/faulthandler.rst:139 +#: library/faulthandler.rst:194 msgid "" "Register a user signal: install a handler for the *signum* signal to dump " "the traceback of all threads, or of the current thread if *all_threads* is " -"``False``, into *file*. Call the previous handler if chain is ``True``." +"``False``, into *file*. Call the previous handler if chain is ``True``. " +"*max_threads* caps the number of threads dumped." msgstr "" -#: library/faulthandler.rst:143 +#: library/faulthandler.rst:199 msgid "" -"The *file* must be kept open until the signal is unregistered by :func:" -"`unregister`: see :ref:`issue with file descriptors `." +"The *file* must be kept open until the signal is unregistered " +"by :func:`unregister`: see :ref:`issue with file descriptors `." msgstr "" -#: library/faulthandler.rst:157 +#: library/faulthandler.rst:216 msgid "Not available on Windows." msgstr "" -#: library/faulthandler.rst:153 +#: library/faulthandler.rst:212 msgid "" "Unregister a user signal: uninstall the handler of the *signum* signal " "installed by :func:`register`. Return ``True`` if the signal was registered, " "``False`` otherwise." msgstr "" -#: library/faulthandler.rst:163 +#: library/faulthandler.rst:222 msgid "Issue with file descriptors" msgstr "" -#: library/faulthandler.rst:165 +#: library/faulthandler.rst:224 msgid "" ":func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the " "file descriptor of their *file* argument. If the file is closed and its file " @@ -239,11 +310,11 @@ msgid "" "Call these functions again each time that the file is replaced." msgstr "" -#: library/faulthandler.rst:173 +#: library/faulthandler.rst:232 msgid "Example" msgstr "Exemple" -#: library/faulthandler.rst:175 +#: library/faulthandler.rst:234 msgid "" "Example of a segmentation fault on Linux with and without enabling the fault " "handler:" diff --git a/library/fcntl.po b/library/fcntl.po index bf68124fb..bcacdbb3c 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2017-08-10 00:59+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -19,72 +19,72 @@ msgstr "" msgid ":mod:`!fcntl` --- The ``fcntl`` and ``ioctl`` system calls" msgstr "" -#: library/fcntl.rst:16 +#: library/fcntl.rst:13 msgid "" "This module performs file and I/O control on file descriptors. It is an " -"interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :" -"manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full " +"interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See " +"the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full " "details." msgstr "" -#: library/fcntl.rst:21 +#: library/fcntl.rst:18 msgid "Availability" -msgstr "" +msgstr "Disponibilité" -#: library/fcntl.rst:23 +#: library/fcntl.rst:20 msgid "" "All functions in this module take a file descriptor *fd* as their first " -"argument. This can be an integer file descriptor, such as returned by ``sys." -"stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` " -"itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine " -"file descriptor." +"argument. This can be an integer file descriptor, such as returned by " +"``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as " +"``sys.stdin`` itself, which provides a :meth:`~io.IOBase.fileno` that " +"returns a genuine file descriptor." msgstr "" -#: library/fcntl.rst:29 +#: library/fcntl.rst:26 msgid "" "Operations in this module used to raise an :exc:`IOError` where they now " "raise an :exc:`OSError`." msgstr "" -#: library/fcntl.rst:33 +#: library/fcntl.rst:30 msgid "" "The :mod:`!fcntl` module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and " "``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file " "descriptors." msgstr "" -#: library/fcntl.rst:38 +#: library/fcntl.rst:35 msgid "" "On macOS, the :mod:`!fcntl` module exposes the ``F_GETPATH`` constant, which " -"obtains the path of a file from a file descriptor. On Linux(>=3.15), the :" -"mod:`!fcntl` module exposes the ``F_OFD_GETLK``, ``F_OFD_SETLK`` and " +"obtains the path of a file from a file descriptor. On Linux(>=3.15), " +"the :mod:`!fcntl` module exposes the ``F_OFD_GETLK``, ``F_OFD_SETLK`` and " "``F_OFD_SETLKW`` constants, which are used when working with open file " "description locks." msgstr "" -#: library/fcntl.rst:45 +#: library/fcntl.rst:42 msgid "" "On Linux >= 2.6.11, the :mod:`!fcntl` module exposes the ``F_GETPIPE_SZ`` " "and ``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's " "size respectively." msgstr "" -#: library/fcntl.rst:50 +#: library/fcntl.rst:47 msgid "" "On FreeBSD, the :mod:`!fcntl` module exposes the ``F_DUP2FD`` and " "``F_DUP2FD_CLOEXEC`` constants, which allow to duplicate a file descriptor, " "the latter setting ``FD_CLOEXEC`` flag in addition." msgstr "" -#: library/fcntl.rst:55 +#: library/fcntl.rst:52 msgid "" -"On Linux >= 4.5, the :mod:`fcntl` module exposes the ``FICLONE`` and " +"On Linux >= 4.5, the :mod:`!fcntl` module exposes the ``FICLONE`` and " "``FICLONERANGE`` constants, which allow to share some data of one file with " "another file by reflinking on some filesystems (e.g., btrfs, OCFS2, and " "XFS). This behavior is commonly referred to as \"copy-on-write\"." msgstr "" -#: library/fcntl.rst:61 +#: library/fcntl.rst:58 msgid "" "On Linux >= 2.6.32, the :mod:`!fcntl` module exposes the ``F_GETOWN_EX``, " "``F_SETOWN_EX``, ``F_OWNER_TID``, ``F_OWNER_PID``, ``F_OWNER_PGRP`` " @@ -105,107 +105,141 @@ msgid "" "and ``F_SETNOSIGPIPE`` constant." msgstr "" -#: library/fcntl.rst:82 +#: library/fcntl.rst:79 +msgid "" +"On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY`` to " +"query a file descriptor pointing to the same file." +msgstr "" + +#: library/fcntl.rst:83 msgid "The module defines the following functions:" msgstr "Le module définit les fonctions suivantes :" -#: library/fcntl.rst:87 +#: library/fcntl.rst:88 msgid "" "Perform the operation *cmd* on file descriptor *fd* (file objects providing " "a :meth:`~io.IOBase.fileno` method are accepted as well). The values used " "for *cmd* are operating system dependent, and are available as constants in " -"the :mod:`fcntl` module, using the same names as used in the relevant C " -"header files. The argument *arg* can either be an integer value, or a :class:" -"`bytes` object. With an integer value, the return value of this function is " -"the integer return value of the C :c:func:`fcntl` call. When the argument " -"is bytes it represents a binary structure, e.g. created by :func:`struct." -"pack`. The binary data is copied to a buffer whose address is passed to the " -"C :c:func:`fcntl` call. The return value after a successful call is the " -"contents of the buffer, converted to a :class:`bytes` object. The length of " -"the returned object will be the same as the length of the *arg* argument. " -"This is limited to 1024 bytes. If the information returned in the buffer by " -"the operating system is larger than 1024 bytes, this is most likely to " -"result in a segmentation violation or a more subtle data corruption." -msgstr "" - -#: library/fcntl.rst:104 +"the :mod:`!fcntl` module, using the same names as used in the relevant C " +"header files. The argument *arg* can either be an integer value, " +"a :term:`bytes-like object`, or a string. The type and size of *arg* must " +"match the type and size of the argument of the operation as specified in the " +"relevant C documentation." +msgstr "" + +#: library/fcntl.rst:97 +msgid "" +"When *arg* is an integer, the function returns the integer return value of " +"the C :c:func:`fcntl` call." +msgstr "" + +#: library/fcntl.rst:100 +msgid "" +"When the argument is bytes-like object, it represents a binary structure, " +"for example, created by :func:`struct.pack`. A string value is encoded to " +"binary using the UTF-8 encoding. The binary data is copied to a buffer whose " +"address is passed to the C :c:func:`fcntl` call. The return value after a " +"successful call is the contents of the buffer, converted to a :class:`bytes` " +"object. The length of the returned object will be the same as the length of " +"the *arg* argument." +msgstr "" + +#: library/fcntl.rst:109 msgid "If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:106 +#: library/fcntl.rst:161 +msgid "" +"If the type or size of *arg* does not match the type or size of the " +"operation's argument (for example, if an integer is passed when a pointer is " +"expected, or the information returned in the buffer by the operating system " +"is larger than the size of *arg*), this is most likely to result in a " +"segmentation violation or a more subtle data corruption." +msgstr "" + +#: library/fcntl.rst:119 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:111 +#: library/fcntl.rst:121 msgid "" -"This function is identical to the :func:`~fcntl.fcntl` function, except that " -"the argument handling is even more complicated." +"Add support of arbitrary :term:`bytes-like objects `, not " +"only :class:`bytes`." msgstr "" -#: library/fcntl.rst:114 -msgid "" -"The *request* parameter is limited to values that can fit in 32-bits. " -"Additional constants of interest for use as the *request* argument can be " -"found in the :mod:`termios` module, under the same names as used in the " -"relevant C header files." +#: library/fcntl.rst:125 +msgid "The size of bytes-like objects is no longer limited to 1024 bytes." msgstr "" -#: library/fcntl.rst:119 +#: library/fcntl.rst:131 msgid "" -"The parameter *arg* can be one of an integer, an object supporting the read-" -"only buffer interface (like :class:`bytes`) or an object supporting the read-" -"write buffer interface (like :class:`bytearray`)." +"This function is identical to the :func:`~fcntl.fcntl` function, except that " +"the argument handling is even more complicated." msgstr "" -#: library/fcntl.rst:123 +#: library/fcntl.rst:134 msgid "" -"In all but the last case, behaviour is as for the :func:`~fcntl.fcntl` " -"function." +"The *request* parameter is limited to values that can fit in 32-bits or 64-" +"bits, depending on the platform. Additional constants of interest for use as " +"the *request* argument can be found in the :mod:`termios` module, under the " +"same names as used in the relevant C header files." msgstr "" -#: library/fcntl.rst:126 +#: library/fcntl.rst:140 msgid "" -"If a mutable buffer is passed, then the behaviour is determined by the value " -"of the *mutate_flag* parameter." +"The parameter *arg* can be an integer, a :term:`bytes-like object`, or a " +"string. The type and size of *arg* must match the type and size of the " +"argument of the operation as specified in the relevant C documentation." msgstr "" -#: library/fcntl.rst:129 +#: library/fcntl.rst:145 msgid "" -"If it is false, the buffer's mutability is ignored and behaviour is as for a " -"read-only buffer, except that the 1024 byte limit mentioned above is avoided " -"-- so long as the buffer you pass is at least as long as what the operating " -"system wants to put there, things should work." +"If *arg* does not support the read-write buffer interface or the " +"*mutate_flag* is false, behavior is as for the :func:`~fcntl.fcntl` function." msgstr "" -#: library/fcntl.rst:134 +#: library/fcntl.rst:149 msgid "" -"If *mutate_flag* is true (the default), then the buffer is (in effect) " -"passed to the underlying :func:`ioctl` system call, the latter's return code " -"is passed back to the calling Python, and the buffer's new contents reflect " -"the action of the :func:`ioctl`. This is a slight simplification, because " -"if the supplied buffer is less than 1024 bytes long it is first copied into " -"a static buffer 1024 bytes long which is then passed to :func:`ioctl` and " -"copied back into the supplied buffer." +"If *arg* supports the read-write buffer interface (like :class:`bytearray`) " +"and *mutate_flag* is true (the default), then the buffer is (in effect) " +"passed to the underlying :c:func:`!ioctl` system call, the latter's return " +"code is passed back to the calling Python, and the buffer's new contents " +"reflect the action of the :c:func:`ioctl`. This is a slight simplification, " +"because if the supplied buffer is less than 1024 bytes long it is first " +"copied into a static buffer 1024 bytes long which is then passed " +"to :func:`ioctl` and copied back into the supplied buffer." msgstr "" -#: library/fcntl.rst:142 +#: library/fcntl.rst:158 msgid "" "If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:144 +#: library/fcntl.rst:168 msgid "An example::" msgstr "Un exemple ::" -#: library/fcntl.rst:157 +#: library/fcntl.rst:181 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:162 +#: library/fcntl.rst:183 +msgid "" +"The GIL is always released during a system call. System calls failing with " +"EINTR are automatically retried." +msgstr "" + +#: library/fcntl.rst:187 +msgid "" +"The size of not mutated bytes-like objects is no longer limited to 1024 " +"bytes." +msgstr "" + +#: library/fcntl.rst:193 msgid "" "Perform the lock operation *operation* on file descriptor *fd* (file objects " "providing a :meth:`~io.IOBase.fileno` method are accepted as well). See the " @@ -213,90 +247,90 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:167 +#: library/fcntl.rst:198 msgid "" "If the :c:func:`flock` call fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:169 +#: library/fcntl.rst:200 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:174 +#: library/fcntl.rst:205 msgid "" "This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls. " -"*fd* is the file descriptor (file objects providing a :meth:`~io.IOBase." -"fileno` method are accepted as well) of the file to lock or unlock, and " -"*cmd* is one of the following values:" +"*fd* is the file descriptor (file objects providing " +"a :meth:`~io.IOBase.fileno` method are accepted as well) of the file to lock " +"or unlock, and *cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:181 +#: library/fcntl.rst:212 msgid "Release an existing lock." msgstr "" -#: library/fcntl.rst:185 +#: library/fcntl.rst:216 msgid "Acquire a shared lock." msgstr "" -#: library/fcntl.rst:189 +#: library/fcntl.rst:220 msgid "Acquire an exclusive lock." msgstr "" -#: library/fcntl.rst:193 +#: library/fcntl.rst:224 msgid "" "Bitwise OR with any of the other three ``LOCK_*`` constants to make the " "request non-blocking." msgstr "" -#: library/fcntl.rst:196 +#: library/fcntl.rst:227 msgid "" -"If :const:`!LOCK_NB` is used and the lock cannot be acquired, an :exc:" -"`OSError` will be raised and the exception will have an *errno* attribute " -"set to :const:`~errno.EACCES` or :const:`~errno.EAGAIN` (depending on the " -"operating system; for portability, check for both values). On at least some " -"systems, :const:`!LOCK_EX` can only be used if the file descriptor refers to " -"a file opened for writing." +"If :const:`!LOCK_NB` is used and the lock cannot be acquired, " +"an :exc:`OSError` will be raised and the exception will have an *errno* " +"attribute set to :const:`~errno.EACCES` or :const:`~errno.EAGAIN` (depending " +"on the operating system; for portability, check for both values). On at " +"least some systems, :const:`!LOCK_EX` can only be used if the file " +"descriptor refers to a file opened for writing." msgstr "" -#: library/fcntl.rst:203 +#: library/fcntl.rst:234 msgid "" "*len* is the number of bytes to lock, *start* is the byte offset at which " -"the lock starts, relative to *whence*, and *whence* is as with :func:`io." -"IOBase.seek`, specifically:" +"the lock starts, relative to *whence*, and *whence* is as " +"with :func:`io.IOBase.seek`, specifically:" msgstr "" -#: library/fcntl.rst:207 +#: library/fcntl.rst:238 msgid "``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:208 +#: library/fcntl.rst:239 msgid "``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:209 +#: library/fcntl.rst:240 msgid "``2`` -- relative to the end of the file (:const:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:211 +#: library/fcntl.rst:242 msgid "" "The default for *start* is 0, which means to start at the beginning of the " "file. The default for *len* is 0 which means to lock to the end of the " "file. The default for *whence* is also 0." msgstr "" -#: library/fcntl.rst:215 +#: library/fcntl.rst:246 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:217 +#: library/fcntl.rst:248 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:227 +#: library/fcntl.rst:258 msgid "" "Note that in the first example the return value variable *rv* will hold an " "integer value; in the second example it will hold a :class:`bytes` object. " @@ -304,11 +338,11 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:235 +#: library/fcntl.rst:266 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/fcntl.rst:236 +#: library/fcntl.rst:267 msgid "" "If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are " "present in the :mod:`os` module (on BSD only), the :func:`os.open` function " diff --git a/library/filecmp.po b/library/filecmp.po index c87bccc4f..3ff73c9e8 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2019-05-23 20:39+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-24 10:39+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -20,13 +20,14 @@ msgstr "" msgid ":mod:`!filecmp` --- File and Directory Comparisons" msgstr ":mod:`filecmp` – Comparaisons de fichiers et de répertoires" -#: library/filecmp.rst:9 +#: library/filecmp.rst:7 msgid "**Source code:** :source:`Lib/filecmp.py`" msgstr "**Code source :** :source:`Lib/filecmp.py`" -#: library/filecmp.rst:13 +#: library/filecmp.rst:11 +#, fuzzy msgid "" -"The :mod:`filecmp` module defines functions to compare files and " +"The :mod:`!filecmp` module defines functions to compare files and " "directories, with various optional time/correctness trade-offs. For " "comparing files, see also the :mod:`difflib` module." msgstr "" @@ -34,11 +35,12 @@ msgstr "" "fichiers et les répertoires, avec différents compromis optionnels durée / " "exactitude. Pour comparer des fichiers, voir aussi le module :mod:`difflib`." -#: library/filecmp.rst:17 -msgid "The :mod:`filecmp` module defines the following functions:" +#: library/filecmp.rst:15 +#, fuzzy +msgid "The :mod:`!filecmp` module defines the following functions:" msgstr "Le module :mod:`filecmp` définit les fonctions suivantes :" -#: library/filecmp.rst:22 +#: library/filecmp.rst:20 msgid "" "Compare the files named *f1* and *f2*, returning ``True`` if they seem " "equal, ``False`` otherwise." @@ -46,7 +48,7 @@ msgstr "" "Compare les fichiers nommés *f1* et *f2* , renvoie ``True`` s’ils semblent " "égaux, ``False`` sinon." -#: library/filecmp.rst:25 +#: library/filecmp.rst:23 #, fuzzy msgid "" "If *shallow* is true and the :func:`os.stat` signatures (file type, size, " @@ -57,13 +59,13 @@ msgstr "" "identiques sont considérés comme égaux. Sinon, le contenu des fichiers est " "comparé." -#: library/filecmp.rst:29 +#: library/filecmp.rst:27 msgid "" "Otherwise, the files are treated as different if their sizes or contents " "differ." msgstr "" -#: library/filecmp.rst:31 +#: library/filecmp.rst:29 msgid "" "Note that no external programs are called from this function, giving it " "portability and efficiency." @@ -71,18 +73,18 @@ msgstr "" "Notez qu'aucun programme externe n'est appelé à partir de cette fonction, ce " "qui lui confère des qualités de portabilité et d'efficacité." -#: library/filecmp.rst:34 +#: library/filecmp.rst:32 msgid "" "This function uses a cache for past comparisons and the results, with cache " "entries invalidated if the :func:`os.stat` information for the file " "changes. The entire cache may be cleared using :func:`clear_cache`." msgstr "" "Cette fonction utilise un cache pour les comparaisons antérieures et les " -"résultats, les entrées du cache étant invalidées si les informations :func:" -"`os.stat()` du fichier sont modifiées. La totalité du cache peut être " -"effacée avec :func:`clear_cache()`." +"résultats, les entrées du cache étant invalidées si les " +"informations :func:`os.stat` du fichier sont modifiées. La totalité du cache " +"peut être effacée avec :func:`clear_cache`." -#: library/filecmp.rst:41 +#: library/filecmp.rst:39 msgid "" "Compare the files in the two directories *dir1* and *dir2* whose names are " "given by *common*." @@ -90,7 +92,7 @@ msgstr "" "Compare les fichiers des deux répertoires *dir1* et *dir2* dont les noms " "sont donnés par *common*." -#: library/filecmp.rst:44 +#: library/filecmp.rst:42 msgid "" "Returns three lists of file names: *match*, *mismatch*, *errors*. *match* " "contains the list of files that match, *mismatch* contains the names of " @@ -107,15 +109,15 @@ msgstr "" "l'utilisateur ne dispose pas de l'autorisation nécessaire pour les lire ou " "si la comparaison n'a pas pu être effectuée pour une autre raison." -#: library/filecmp.rst:51 +#: library/filecmp.rst:49 msgid "" -"The *shallow* parameter has the same meaning and default value as for :func:" -"`filecmp.cmp`." +"The *shallow* parameter has the same meaning and default value as " +"for :func:`filecmp.cmp`." msgstr "" "Le paramètre *shallow* a la même signification et la même valeur par défaut " "que pour :func:`filecmp.cmp`." -#: library/filecmp.rst:54 +#: library/filecmp.rst:52 msgid "" "For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with " "``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in " @@ -125,7 +127,7 @@ msgstr "" "c`` et ``a/d/e`` avec ``b/d/e``. ``'c'`` et ``'d/e'`` seront chacun dans " "l'une des trois listes renvoyées." -#: library/filecmp.rst:61 +#: library/filecmp.rst:59 msgid "" "Clear the filecmp cache. This may be useful if a file is compared so quickly " "after it is modified that it is within the mtime resolution of the " @@ -135,24 +137,24 @@ msgstr "" "juste après avoir été modifié (dans un délai inférieur à la résolution " "*mtime* du système de fichiers sous-jacent)." -#: library/filecmp.rst:71 +#: library/filecmp.rst:69 msgid "The :class:`dircmp` class" msgstr "La classe :class:`dircmp`" -#: library/filecmp.rst:75 +#: library/filecmp.rst:73 #, fuzzy msgid "" "Construct a new directory comparison object, to compare the directories *a* " -"and *b*. *ignore* is a list of names to ignore, and defaults to :const:" -"`filecmp.DEFAULT_IGNORES`. *hide* is a list of names to hide, and defaults " -"to ``[os.curdir, os.pardir]``." +"and *b*. *ignore* is a list of names to ignore, and defaults " +"to :const:`filecmp.DEFAULT_IGNORES`. *hide* is a list of names to hide, and " +"defaults to ``[os.curdir, os.pardir]``." msgstr "" "Construit un nouvel objet de comparaison de répertoires, pour comparer les " "répertoires *a* et *b*. *ignore* est une liste de noms à ignorer, par défaut " "à :attr:`filecmp.DEFAULT_IGNORES`. *hide* est une liste de noms à cacher, " "par défaut à ``[os.curdir, os.pardir]``." -#: library/filecmp.rst:80 +#: library/filecmp.rst:78 #, fuzzy msgid "" "The :class:`dircmp` class compares files by doing *shallow* comparisons as " @@ -161,26 +163,26 @@ msgstr "" "La classe :class:`dircmp` compare les fichiers en faisant des comparaisons " "*superficielles* comme décrit pour :func:`filecmp.cmp`." -#: library/filecmp.rst:86 +#: library/filecmp.rst:84 msgid "Added the *shallow* parameter." msgstr "" -#: library/filecmp.rst:88 +#: library/filecmp.rst:86 msgid "The :class:`dircmp` class provides the following methods:" msgstr "La classe :class:`dircmp` fournit les méthodes suivantes :" -#: library/filecmp.rst:92 +#: library/filecmp.rst:90 msgid "Print (to :data:`sys.stdout`) a comparison between *a* and *b*." msgstr "Affiche (sur :data:`sys.stdout`) une comparaison entre *a* et *b*." -#: library/filecmp.rst:96 +#: library/filecmp.rst:94 msgid "" "Print a comparison between *a* and *b* and common immediate subdirectories." msgstr "" "Affiche une comparaison entre *a* et *b* et les sous-répertoires immédiats " "communs." -#: library/filecmp.rst:101 +#: library/filecmp.rst:99 msgid "" "Print a comparison between *a* and *b* and common subdirectories " "(recursively)." @@ -188,7 +190,7 @@ msgstr "" "Affiche une comparaison entre a et b et les sous-répertoires communs " "(récursivement)." -#: library/filecmp.rst:104 +#: library/filecmp.rst:102 msgid "" "The :class:`dircmp` class offers a number of interesting attributes that may " "be used to get various bits of information about the directory trees being " @@ -198,7 +200,7 @@ msgstr "" "qui peuvent être utilisés pour obtenir diverses informations sur les " "arborescences de répertoires comparées." -#: library/filecmp.rst:108 +#: library/filecmp.rst:106 #, fuzzy msgid "" "Note that via :meth:`~object.__getattr__` hooks, all attributes are computed " @@ -209,45 +211,45 @@ msgstr "" "sont calculés de manière paresseuse. Il n'y a donc pas de pénalité en " "vitesse si seuls les attributs rapides à calculer sont utilisés." -#: library/filecmp.rst:115 +#: library/filecmp.rst:113 msgid "The directory *a*." msgstr "Le répertoire *a*." -#: library/filecmp.rst:120 +#: library/filecmp.rst:118 msgid "The directory *b*." msgstr "Le répertoire *b*." -#: library/filecmp.rst:125 +#: library/filecmp.rst:123 msgid "Files and subdirectories in *a*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *a* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:130 +#: library/filecmp.rst:128 msgid "Files and subdirectories in *b*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *b* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:135 +#: library/filecmp.rst:133 msgid "Files and subdirectories in both *a* and *b*." msgstr "Fichiers et sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:140 +#: library/filecmp.rst:138 msgid "Files and subdirectories only in *a*." msgstr "Fichiers et sous-répertoires uniquement dans *a*." -#: library/filecmp.rst:145 +#: library/filecmp.rst:143 msgid "Files and subdirectories only in *b*." msgstr "Fichiers et sous-répertoires uniquement dans *b*." -#: library/filecmp.rst:150 +#: library/filecmp.rst:148 msgid "Subdirectories in both *a* and *b*." msgstr "Sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:155 +#: library/filecmp.rst:153 msgid "Files in both *a* and *b*." msgstr "Fichiers à la fois dans *a* et *b*." -#: library/filecmp.rst:160 +#: library/filecmp.rst:158 msgid "" "Names in both *a* and *b*, such that the type differs between the " "directories, or names for which :func:`os.stat` reports an error." @@ -255,7 +257,7 @@ msgstr "" "Noms dans *a* et *b* , tels que le type diffère entre les répertoires, ou " "noms pour lesquels :func:`os.stat` signale une erreur." -#: library/filecmp.rst:166 +#: library/filecmp.rst:164 msgid "" "Files which are identical in both *a* and *b*, using the class's file " "comparison operator." @@ -263,7 +265,7 @@ msgstr "" "Fichiers identiques dans *a* et *b*, en utilisant l'opérateur de comparaison " "de fichiers de la classe." -#: library/filecmp.rst:172 +#: library/filecmp.rst:170 msgid "" "Files which are in both *a* and *b*, whose contents differ according to the " "class's file comparison operator." @@ -271,12 +273,12 @@ msgstr "" "Fichiers figurant à la fois dans *a* et dans *b* , dont le contenu diffère " "en fonction de l'opérateur de comparaison de fichiers de la classe." -#: library/filecmp.rst:178 +#: library/filecmp.rst:176 msgid "Files which are in both *a* and *b*, but could not be compared." msgstr "" "Fichiers à la fois dans *a* et dans *b* , mais ne pouvant pas être comparés." -#: library/filecmp.rst:183 +#: library/filecmp.rst:181 #, fuzzy msgid "" "A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` " @@ -286,17 +288,17 @@ msgstr "" "Un dictionnaire faisant correspondre les noms dans :attr:`common_dirs` vers " "des objets :class:`dircmp`." -#: library/filecmp.rst:187 +#: library/filecmp.rst:185 msgid "" "Previously entries were always :class:`dircmp` instances. Now entries are " "the same type as *self*, if *self* is a subclass of :class:`dircmp`." msgstr "" -#: library/filecmp.rst:196 +#: library/filecmp.rst:194 msgid "List of directories ignored by :class:`dircmp` by default." msgstr "Liste des répertoires ignorés par défaut par :class:`dircmp`." -#: library/filecmp.rst:199 +#: library/filecmp.rst:197 msgid "" "Here is a simplified example of using the ``subdirs`` attribute to search " "recursively through two directories to show common different files::" diff --git a/library/fileinput.po b/library/fileinput.po index 59200b9f5..43673b47f 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-09-19 23:19+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!fileinput` --- Iterate over lines from multiple input streams" msgstr ":mod:`fileinput` — Parcourt les lignes provenant de plusieurs entrées" -#: library/fileinput.rst:10 +#: library/fileinput.rst:7 msgid "**Source code:** :source:`Lib/fileinput.py`" msgstr "**Code source :** :source:`Lib/fileinput.py`" -#: library/fileinput.rst:14 +#: library/fileinput.rst:11 msgid "" "This module implements a helper class and functions to quickly write a loop " "over standard input or a list of files. If you just want to read or write " @@ -34,11 +34,11 @@ msgstr "" "l'entrée standard ou bien les fichiers d'une liste. Si vous n'avez besoin de " "lire ou écrire qu'un seul fichier, il suffit de :func:`open`." -#: library/fileinput.rst:18 +#: library/fileinput.rst:15 msgid "The typical use is::" msgstr "Ce module s'utilise le plus couramment comme ceci ::" -#: library/fileinput.rst:24 +#: library/fileinput.rst:21 msgid "" "This iterates over the lines of all files listed in ``sys.argv[1:]``, " "defaulting to ``sys.stdin`` if the list is empty. If a filename is ``'-'``, " @@ -54,26 +54,26 @@ msgstr "" "peut aussi passer la liste des fichiers comme argument à :func:`.input`, " "voire un nom de fichier unique." -#: library/fileinput.rst:30 +#: library/fileinput.rst:27 msgid "" "All files are opened in text mode by default, but you can override this by " -"specifying the *mode* parameter in the call to :func:`.input` or :class:" -"`FileInput`. If an I/O error occurs during opening or reading a file, :exc:" -"`OSError` is raised." +"specifying the *mode* parameter in the call to :func:`.input` " +"or :class:`FileInput`. If an I/O error occurs during opening or reading a " +"file, :exc:`OSError` is raised." msgstr "" "Par défaut, tous les fichiers sont ouverts en mode texte. On peut changer ce " "comportement à l'aide du paramètre *mode* de la fonction :func:`.input` ou " "du constructeur de :class:`FileInput`. Si une erreur d'entrée-sortie se " -"produit durant l'ouverture ou la lecture d'un fichier, l'exception :exc:" -"`OSError` est levée." +"produit durant l'ouverture ou la lecture d'un fichier, " +"l'exception :exc:`OSError` est levée." -#: library/fileinput.rst:35 +#: library/fileinput.rst:32 msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`." msgstr "" -":exc:`IOError` était levée auparavant, elle est devenue un alias de :exc:" -"`OSError`." +":exc:`IOError` était levée auparavant, elle est devenue un alias " +"de :exc:`OSError`." -#: library/fileinput.rst:38 +#: library/fileinput.rst:35 msgid "" "If ``sys.stdin`` is used more than once, the second and further use will " "return no lines, except perhaps for interactive use, or if it has been " @@ -84,7 +84,7 @@ msgstr "" "interactif ou si le flux d'entrée standard a été modifié dans l'intervalle " "(par exemple avec ``sys.stdin.seek(0)``)." -#: library/fileinput.rst:42 +#: library/fileinput.rst:39 msgid "" "Empty files are opened and immediately closed; the only time their presence " "in the list of filenames is noticeable at all is when the last file opened " @@ -94,7 +94,7 @@ msgstr "" "détectables dans la liste des fichiers, sauf éventuellement dans le cas où " "le dernier fichier est vide." -#: library/fileinput.rst:46 +#: library/fileinput.rst:43 msgid "" "Lines are returned with any newlines intact, which means that the last line " "in a file may not have one." @@ -103,7 +103,7 @@ msgstr "" "terminent par un saut de ligne, sauf éventuellement la dernière ligne d'un " "fichier." -#: library/fileinput.rst:49 +#: library/fileinput.rst:46 #, fuzzy msgid "" "You can control how files are opened by providing an opening hook via the " @@ -122,11 +122,11 @@ msgstr "" "module contient deux fonctions prédéfinies qui peuvent être passées pour " "*openhook*." -#: library/fileinput.rst:56 +#: library/fileinput.rst:53 msgid "The following function is the primary interface of this module:" msgstr "La fonction suivante constitue l'interface principale du module :" -#: library/fileinput.rst:61 +#: library/fileinput.rst:58 msgid "" "Create an instance of the :class:`FileInput` class. The instance will be " "used as global state for the functions of this module, and is also returned " @@ -136,44 +136,45 @@ msgstr "" "Crée une instance de :class:`FileInput`, qui devient l'état global pour " "toutes les fonctions du module. Elle est également renvoyée afin que " "l'utilisateur puisse la parcourir comme un objet itérable. Tous les " -"paramètres de cette fonction sont transmis au constructeur de :class:" -"`FileInput`." +"paramètres de cette fonction sont transmis au constructeur " +"de :class:`FileInput`." -#: library/fileinput.rst:66 +#: library/fileinput.rst:63 msgid "" -"The :class:`FileInput` instance can be used as a context manager in the :" -"keyword:`with` statement. In this example, *input* is closed after the :" -"keyword:`!with` statement is exited, even if an exception occurs::" +"The :class:`FileInput` instance can be used as a context manager in " +"the :keyword:`with` statement. In this example, *input* is closed after " +"the :keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" "Les instances de :class:`FileInput` peuvent s'utiliser comme gestionnaires " "de contexte, avec l'instruction :keyword:`with`. Dans le code suivant, " "*input* est fermé lorsque le bloc :keyword:`!with` se termine, y compris si " "une exception l'a interrompu ::" -#: library/fileinput.rst:170 +#: library/fileinput.rst:167 msgid "Can be used as a context manager." msgstr "prise en charge du protocole de gestionnaire de contexte." -#: library/fileinput.rst:77 +#: library/fileinput.rst:74 msgid "The keyword parameters *mode* and *openhook* are now keyword-only." msgstr "les paramètres *mode* et *openhook* doivent être nommés." -#: library/fileinput.rst:176 library/fileinput.rst:210 +#: library/fileinput.rst:173 library/fileinput.rst:207 #, fuzzy msgid "The keyword-only parameter *encoding* and *errors* are added." msgstr "" "les paramètres *mode* et *openhook* doivent impérativement être nommés." -#: library/fileinput.rst:84 +#: library/fileinput.rst:81 msgid "" -"The following functions use the global state created by :func:`fileinput." -"input`; if there is no active state, :exc:`RuntimeError` is raised." +"The following functions use the global state created " +"by :func:`fileinput.input`; if there is no active state, :exc:`RuntimeError` " +"is raised." msgstr "" "Toutes les fonctions suivantes font appel à l'état global du module mis en " "place par :func:`fileinput.input`. L'absence de cet état déclenche " "l'exception :exc:`RuntimeError`." -#: library/fileinput.rst:90 +#: library/fileinput.rst:87 msgid "" "Return the name of the file currently being read. Before the first line has " "been read, returns ``None``." @@ -181,7 +182,7 @@ msgstr "" "Renvoie le nom du fichier en train d'être lu, ou ``None`` avant la lecture " "de la toute première ligne." -#: library/fileinput.rst:96 +#: library/fileinput.rst:93 msgid "" "Return the integer \"file descriptor\" for the current file. When no file is " "opened (before the first line and between files), returns ``-1``." @@ -190,7 +191,7 @@ msgstr "" "fichier courant. Si aucun fichier n'est ouvert (avant la première ligne et " "entre les fichiers), le résultat est ``-1``." -#: library/fileinput.rst:102 +#: library/fileinput.rst:99 msgid "" "Return the cumulative line number of the line that has just been read. " "Before the first line has been read, returns ``0``. After the last line of " @@ -201,7 +202,7 @@ msgstr "" "``0``. Après la dernière ligne du dernier fichier, renvoie le numéro de " "cette ligne." -#: library/fileinput.rst:109 +#: library/fileinput.rst:106 msgid "" "Return the line number in the current file. Before the first line has been " "read, returns ``0``. After the last line of the last file has been read, " @@ -211,7 +212,7 @@ msgstr "" "première ligne, renvoie ``0``. Après la toute dernière ligne, renvoie le " "numéro de cette ligne par rapport à son fichier source." -#: library/fileinput.rst:116 +#: library/fileinput.rst:113 msgid "" "Return ``True`` if the line just read is the first line of its file, " "otherwise return ``False``." @@ -219,15 +220,15 @@ msgstr "" "Renvoie ``True`` ou ``False`` selon que la ligne qui vient d'être lue est la " "première du fichier." -#: library/fileinput.rst:122 +#: library/fileinput.rst:119 msgid "" "Return ``True`` if the last line was read from ``sys.stdin``, otherwise " "return ``False``." msgstr "" -"``True`` ou ``False`` selon que la dernière ligne lue provenait de ``sys." -"stdin`` ou non." +"``True`` ou ``False`` selon que la dernière ligne lue provenait de " +"``sys.stdin`` ou non." -#: library/fileinput.rst:128 +#: library/fileinput.rst:125 msgid "" "Close the current file so that the next iteration will read the first line " "from the next file (if any); lines not read from the file will not count " @@ -245,13 +246,13 @@ msgstr "" "fichier suivant a été lue. Cette fonction n'a pas d'effet avant la lecture " "de la première ligne (elle ne peut pas sauter le premier fichier)." -#: library/fileinput.rst:138 +#: library/fileinput.rst:135 msgid "Close the sequence." msgstr "" "Ferme le fichier courant et termine la lecture en sautant les fichiers " "suivants." -#: library/fileinput.rst:140 +#: library/fileinput.rst:137 msgid "" "The class which implements the sequence behavior provided by the module is " "available for subclassing as well:" @@ -259,29 +260,27 @@ msgstr "" "La classe qui implémente ce comportement du module est publique. On peut en " "créer des classes filles :" -#: library/fileinput.rst:146 +#: library/fileinput.rst:143 #, fuzzy msgid "" -"Class :class:`FileInput` is the implementation; its methods :meth:" -"`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" -"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` and :meth:`close` " -"correspond to the functions of the same name in the module. In addition it " -"is :term:`iterable` and has a :meth:`~io.TextIOBase.readline` method which " -"returns the next input line. The sequence must be accessed in strictly " -"sequential order; random access and :meth:`~io.TextIOBase.readline` cannot " -"be mixed." -msgstr "" -":class:`FileInput` est l'implémentation principale du module. Ses méthodes :" -"meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" -"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` et :meth:`close` " -"correspondent aux fonctions du même nom au niveau du module. Elle possède " -"également une méthode :meth:`~io.TextIOBase.readline`, qui lit une nouvelle " -"ligne et la renvoie, ainsi qu'une méthode :meth:`__getitem__` qui permet " -"l'accès à un indice. Il faut lire les éléments de la séquence strictement " -"dans l'ordre (l'accès à un indice arbitraire n'étant pas compatible avec :" -"meth:`~io.TextIOBase.readline`)." - -#: library/fileinput.rst:154 +"Class :class:`FileInput` is the implementation; its " +"methods :meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`, :meth:`isstdin`, :meth:`nextfile` " +"and :meth:`close` correspond to the functions of the same name in the " +"module. In addition it is :term:`iterable` and has " +"a :meth:`~io.TextIOBase.readline` method which returns the next input line. " +"The sequence must be accessed in strictly sequential order; random access " +"and :meth:`~io.TextIOBase.readline` cannot be mixed." +msgstr "" +":class:`FileInput` est l'implémentation principale du module. Ses " +"méthodes :meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`, :meth:`isstdin`, :meth:`nextfile` " +"et :meth:`close` correspondent aux fonctions du même nom au niveau du " +"module. Elle possède également une méthode :meth:`~io.TextIOBase.readline`, " +"qui lit une nouvelle ligne et la renvoie, ainsi qu'une " +"méthode :meth:`__getitem__` qui permet l'accès à un indice. Il faut lire les " +"éléments de la séquence strictement dans l'ordre (l'accès à un indice " +"arbitraire n'étant pas compatible avec :meth:`~io.TextIOBase.readline`)." + +#: library/fileinput.rst:151 #, fuzzy msgid "" "With *mode* you can specify which file mode will be passed to :func:`open`. " @@ -291,7 +290,7 @@ msgstr "" "est passé directement à :func:`open`. Les valeurs possibles sont ``'r'``, " "``'rU'``, ``'U'`` et ``'rb'``." -#: library/fileinput.rst:157 +#: library/fileinput.rst:154 msgid "" "The *openhook*, when given, must be a function that takes two arguments, " "*filename* and *mode*, and returns an accordingly opened file-like object. " @@ -302,34 +301,34 @@ msgstr "" "compatible ouvert selon *mode*. Notez que *openhook* et *inplace* sont " "mutuellement exclusifs." -#: library/fileinput.rst:161 +#: library/fileinput.rst:158 msgid "" "You can specify *encoding* and *errors* that is passed to :func:`open` or " "*openhook*." msgstr "" -#: library/fileinput.rst:163 +#: library/fileinput.rst:160 msgid "" -"A :class:`FileInput` instance can be used as a context manager in the :" -"keyword:`with` statement. In this example, *input* is closed after the :" -"keyword:`!with` statement is exited, even if an exception occurs::" +"A :class:`FileInput` instance can be used as a context manager in " +"the :keyword:`with` statement. In this example, *input* is closed after " +"the :keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" "Les objets :class:`FileInput` peuvent aussi fonctionner comme gestionnaires " "de contexte dans un bloc :keyword:`with`. Dans l'exemple suivant, *input* " "est fermé à la fin du bloc :keyword:`!with`, même arrêté par une exception ::" -#: library/fileinput.rst:173 +#: library/fileinput.rst:170 msgid "The keyword parameter *mode* and *openhook* are now keyword-only." msgstr "" "les paramètres *mode* et *openhook* doivent impérativement être nommés." -#: library/fileinput.rst:179 +#: library/fileinput.rst:176 msgid "" "The ``'rU'`` and ``'U'`` modes and the :meth:`!__getitem__` method have been " "removed." msgstr "" -#: library/fileinput.rst:184 +#: library/fileinput.rst:181 msgid "" "**Optional in-place filtering:** if the keyword argument ``inplace=True`` is " "passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, " @@ -342,24 +341,25 @@ msgid "" "extension is ``'.bak'`` and it is deleted when the output file is closed. " "In-place filtering is disabled when standard input is read." msgstr "" -"**Filtrage sur place optionnel :** si ``inplace=True`` est passé à :func:" -"`fileinput.input` ou au constructeur de :class:`FileInput`, chaque fichier " -"d'entrée est déplacé vers une sauvegarde et la sortie standard est redirigée " -"vers le fichier lui-même, ce qui permet d'écrire des filtres qui modifient " -"directement les fichiers existants. Si le paramètre *backup* est fourni, il " -"donne l'extension des fichiers de sauvegarde. Dans ce cas, la sauvegarde est " -"conservée après l'opération. Par défaut, les fichiers de sauvegarde ont " -"l'extension ``'.bak'`` et sont supprimés dès que le fichier de sortie est " -"fermé. Si un fichier existe avec le même nom que la sauvegarde, il est " -"écrasé. Le filtrage sur place ne fait rien pour l'entrée standard." - -#: library/fileinput.rst:196 +"**Filtrage sur place optionnel :** si ``inplace=True`` est passé " +"à :func:`fileinput.input` ou au constructeur de :class:`FileInput`, chaque " +"fichier d'entrée est déplacé vers une sauvegarde et la sortie standard est " +"redirigée vers le fichier lui-même, ce qui permet d'écrire des filtres qui " +"modifient directement les fichiers existants. Si le paramètre *backup* est " +"fourni, il donne l'extension des fichiers de sauvegarde. Dans ce cas, la " +"sauvegarde est conservée après l'opération. Par défaut, les fichiers de " +"sauvegarde ont l'extension ``'.bak'`` et sont supprimés dès que le fichier " +"de sortie est fermé. Si un fichier existe avec le même nom que la " +"sauvegarde, il est écrasé. Le filtrage sur place ne fait rien pour l'entrée " +"standard." + +#: library/fileinput.rst:193 msgid "The two following opening hooks are provided by this module:" msgstr "" "Les deux fonctions suivantes fournissent des valeurs prédéfinies pour " "*openhook* :" -#: library/fileinput.rst:200 +#: library/fileinput.rst:197 msgid "" "Transparently opens files compressed with gzip and bzip2 (recognized by the " "extensions ``'.gz'`` and ``'.bz2'``) using the :mod:`gzip` and :mod:`bz2` " @@ -369,25 +369,25 @@ msgstr "" "Ouvre de façon transparente les fichiers compressés avec gzip ou bzip2, à " "l'aide des modules :mod:`gzip` et :mod:`bz2`. Les fichiers compressés sont " "reconnus aux extensions ``'.gz'`` et ``'.bz2'``. Tous les fichiers qui n'ont " -"pas l'une de ces deux extensions sont ouverts normalement (avec :func:" -"`open`, sans décompression)." +"pas l'une de ces deux extensions sont ouverts normalement " +"(avec :func:`open`, sans décompression)." -#: library/fileinput.rst:205 +#: library/fileinput.rst:202 msgid "" "The *encoding* and *errors* values are passed to :class:`io.TextIOWrapper` " "for compressed files and open for normal files." msgstr "" -#: library/fileinput.rst:208 +#: library/fileinput.rst:205 #, fuzzy msgid "" -"Usage example: ``fi = fileinput.FileInput(openhook=fileinput." -"hook_compressed, encoding=\"utf-8\")``" +"Usage example: ``fi = " +"fileinput.FileInput(openhook=fileinput.hook_compressed, encoding=\"utf-8\")``" msgstr "" -"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." -"hook_compressed)``." +"Exemple d'utilisation : ``fi = " +"fileinput.FileInput(openhook=fileinput.hook_compressed)``." -#: library/fileinput.rst:216 +#: library/fileinput.rst:213 msgid "" "Returns a hook which opens each file with :func:`open`, using the given " "*encoding* and *errors* to read the file." @@ -396,22 +396,24 @@ msgstr "" "arguments *encoding* et *errors*. Le résultat peut être exploité à travers " "le point d'entrée automatique *openhook*." -#: library/fileinput.rst:219 +#: library/fileinput.rst:216 msgid "" -"Usage example: ``fi = fileinput.FileInput(openhook=fileinput." -"hook_encoded(\"utf-8\", \"surrogateescape\"))``" +"Usage example: ``fi = " +"fileinput.FileInput(openhook=fileinput.hook_encoded(\"utf-8\", " +"\"surrogateescape\"))``" msgstr "" -"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." -"hook_encoded(\"utf-8\", \"surrogateescape\"))``." +"Exemple d'utilisation : ``fi = " +"fileinput.FileInput(openhook=fileinput.hook_encoded(\"utf-8\", " +"\"surrogateescape\"))``." -#: library/fileinput.rst:223 +#: library/fileinput.rst:220 msgid "Added the optional *errors* parameter." msgstr "ajout du paramètre facultatif *errors*." -#: library/fileinput.rst:226 +#: library/fileinput.rst:223 msgid "" -"This function is deprecated since :func:`fileinput.input` and :class:" -"`FileInput` now have *encoding* and *errors* parameters." +"This function is deprecated since :func:`fileinput.input` " +"and :class:`FileInput` now have *encoding* and *errors* parameters." msgstr "" #~ msgid "The ``'rU'`` and ``'U'`` modes." diff --git a/library/filesys.po b/library/filesys.po index ec1387487..20298fa9c 100644 --- a/library/filesys.po +++ b/library/filesys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-09-28 11:33+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -31,11 +31,11 @@ msgstr "" "manipuler des chemins de manière portable, et créer des fichiers " "temporaires. La liste exhaustive des modules de ce chapitre est :" -#: library/filesys.rst:31 +#: library/filesys.rst:28 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/filesys.rst:30 +#: library/filesys.rst:29 msgid "" "Operating system interfaces, including functions to work with files at a " "lower level than Python :term:`file objects `." @@ -44,11 +44,11 @@ msgstr "" "avec des fichiers dans un niveau plus bas que les :term:`objets fichiers " "` de Python." -#: library/filesys.rst:35 +#: library/filesys.rst:32 msgid "Module :mod:`io`" msgstr "Module :mod:`io`" -#: library/filesys.rst:34 +#: library/filesys.rst:33 msgid "" "Python's built-in I/O library, including both abstract classes and some " "concrete classes such as file I/O." @@ -56,11 +56,11 @@ msgstr "" "Bibliothèque d'entrées/sorties native de Python, incluant des classes " "abstraites et concrètes tel que les I/O sur les fichiers." -#: library/filesys.rst:37 +#: library/filesys.rst:36 msgid "Built-in function :func:`open`" msgstr "Fonction native :func:`open`" -#: library/filesys.rst:38 +#: library/filesys.rst:37 msgid "The standard way to open files for reading and writing with Python." msgstr "" "Le moyen classique pour ouvrir des fichiers pour les lire ou y écrire avec " diff --git a/library/fnmatch.po b/library/fnmatch.po index 64051bfbf..6fffa03e5 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-04-28 20:16+0200\n" "Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" @@ -86,10 +86,10 @@ msgstr "" #: library/fnmatch.rst:43 msgid "" "Note that the filename separator (``'/'`` on Unix) is *not* special to this " -"module. See module :mod:`glob` for pathname expansion (:mod:`glob` uses :" -"func:`.filter` to match pathname segments). Similarly, filenames starting " -"with a period are not special for this module, and are matched by the ``*`` " -"and ``?`` patterns." +"module. See module :mod:`glob` for pathname expansion (:mod:`glob` " +"uses :func:`.filter` to match pathname segments). Similarly, filenames " +"starting with a period are not special for this module, and are matched by " +"the ``*`` and ``?`` patterns." msgstr "" "Notons que le séparateur de nom de fichiers (``'/'`` sous Unix) n'est *pas* " "traité de manière spéciale par ce module. Voir le module :mod:`glob` pour la " @@ -100,27 +100,36 @@ msgstr "" #: library/fnmatch.rst:49 msgid "" -"Also note that :func:`functools.lru_cache` with the *maxsize* of 32768 is " -"used to cache the compiled regex patterns in the following functions: :func:" -"`fnmatch`, :func:`fnmatchcase`, :func:`.filter`." +"Unless stated otherwise, \"filename string\" and \"pattern string\" either " +"refer to :class:`str` or ``ISO-8859-1`` encoded :class:`bytes` objects. Note " +"that the functions documented below do not allow to mix a :class:`!bytes` " +"pattern with a :class:`!str` filename, and vice-versa." msgstr "" -#: library/fnmatch.rst:55 +#: library/fnmatch.rst:54 +msgid "" +"Finally, note that :func:`functools.lru_cache` with a *maxsize* of 32768 is " +"used to cache the (typed) compiled regex patterns in the following " +"functions: :func:`fnmatch`, :func:`fnmatchcase`, :func:`.filter`, :func:`.filterfalse`." +msgstr "" + +#: library/fnmatch.rst:61 #, fuzzy msgid "" "Test whether the filename string *name* matches the pattern string *pat*, " -"returning ``True`` or ``False``. Both parameters are case-normalized using :" -"func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a case-" -"sensitive comparison, regardless of whether that's standard for the " +"returning ``True`` or ``False``. Both parameters are case-normalized " +"using :func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a " +"case-sensitive comparison, regardless of whether that's standard for the " "operating system." msgstr "" "Teste si la chaîne de caractères *filename* correspond au motif *pattern*, " "en renvoyant :const:`True` ou :const:`False`. La casse de chacun des " -"paramètres peut être normalisée en utilisant :func:`os.path.normcase`. :func:" -"`fnmatchcase` peut être utilisée pour réaliser une comparaison sensible à la " -"casse, indépendamment du système d'exploitation." +"paramètres peut être normalisée en " +"utilisant :func:`os.path.normcase`. :func:`fnmatchcase` peut être utilisée " +"pour réaliser une comparaison sensible à la casse, indépendamment du système " +"d'exploitation." -#: library/fnmatch.rst:61 +#: library/fnmatch.rst:67 msgid "" "This example will print all file names in the current directory with the " "extension ``.txt``::" @@ -128,46 +137,59 @@ msgstr "" "Cet exemple affiche tous les noms de fichiers du répertoire courant ayant " "pour extension ``.txt`` ::" -#: library/fnmatch.rst:74 +#: library/fnmatch.rst:80 #, fuzzy msgid "" "Test whether the filename string *name* matches the pattern string *pat*, " "returning ``True`` or ``False``; the comparison is case-sensitive and does " "not apply :func:`os.path.normcase`." msgstr "" -"Teste si *filename* correspond au motif *pattern*, en renvoyant :const:" -"`True` ou :const:`False` ; la comparaison est sensible à la casse et " -"n'utilise pas la fonction :func:`os.path.normcase`." +"Teste si *filename* correspond au motif *pattern*, en " +"renvoyant :const:`True` ou :const:`False` ; la comparaison est sensible à la " +"casse et n'utilise pas la fonction :func:`os.path.normcase`." + +#: library/fnmatch.rst:87 +#, fuzzy +msgid "" +"Construct a list from those elements of the :term:`iterable` of filename " +"strings *names* that match the pattern string *pat*. It is the same as ``[n " +"for n in names if fnmatch(n, pat)]``, but implemented more efficiently." +msgstr "" +"Renvoie un sous-ensemble de la liste *names* correspondant au motif " +"*pattern*. Similaire à ``[n for n in names if fnmatch(n, pattern)]``, mais " +"implémenté plus efficacement." -#: library/fnmatch.rst:81 +#: library/fnmatch.rst:95 #, fuzzy msgid "" -"Construct a list from those elements of the :term:`iterable` *names* that " -"match pattern *pat*. It is the same as ``[n for n in names if fnmatch(n, " -"pat)]``, but implemented more efficiently." +"Construct a list from those elements of the :term:`iterable` of filename " +"strings *names* that do not match the pattern string *pat*. It is the same " +"as ``[n for n in names if not fnmatch(n, pat)]``, but implemented more " +"efficiently." msgstr "" "Renvoie un sous-ensemble de la liste *names* correspondant au motif " "*pattern*. Similaire à ``[n for n in names if fnmatch(n, pattern)]``, mais " "implémenté plus efficacement." -#: library/fnmatch.rst:89 +#: library/fnmatch.rst:105 #, fuzzy msgid "" "Return the shell-style pattern *pat* converted to a regular expression for " -"using with :func:`re.match`." +"using with :func:`re.prefixmatch`. The pattern is expected to be " +"a :class:`str`." msgstr "" "Renvoie le motif *pattern*, de style shell, converti en une expression " "régulière utilisable avec :func:`re.match`." -#: library/fnmatch.rst:92 +#: library/fnmatch.rst:109 msgid "Example:" msgstr "Exemple :" -#: library/fnmatch.rst:106 +#: library/fnmatch.rst:123 msgid "Module :mod:`glob`" msgstr "Module :mod:`glob`" -#: library/fnmatch.rst:107 +#: library/fnmatch.rst:124 msgid "Unix shell-style path expansion." msgstr "Recherche de chemins de style shell Unix." diff --git a/library/fractions.po b/library/fractions.po index f4d7598a3..ce20f120f 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 15:57+0200\n" "Last-Translator: Loc Cosnier \n" "Language-Team: FRENCH \n" @@ -21,101 +21,113 @@ msgstr "" msgid ":mod:`!fractions` --- Rational numbers" msgstr ":mod:`fractions` — Nombres rationnels" -#: library/fractions.rst:10 +#: library/fractions.rst:7 msgid "**Source code:** :source:`Lib/fractions.py`" msgstr "**Code source :** :source:`Lib/fractions.py`" -#: library/fractions.rst:14 +#: library/fractions.rst:11 +#, fuzzy msgid "" -"The :mod:`fractions` module provides support for rational number arithmetic." +"The :mod:`!fractions` module provides support for rational number arithmetic." msgstr "" "Le module :mod:`fractions` fournit un support de l'arithmétique des nombres " "rationnels." -#: library/fractions.rst:17 +#: library/fractions.rst:14 +#, fuzzy msgid "" -"A Fraction instance can be constructed from a pair of integers, from another " -"rational number, or from a string." +"A Fraction instance can be constructed from a pair of rational numbers, from " +"a single number, or from a string." msgstr "" "Une instance de *Fraction* peut être construite depuis une paire d'entiers, " "depuis un autre nombre rationnel, ou depuis une chaîne de caractères." -#: library/fractions.rst:26 -#, fuzzy +#: library/fractions.rst:23 msgid "" "The first version requires that *numerator* and *denominator* are instances " "of :class:`numbers.Rational` and returns a new :class:`Fraction` instance " -"with value ``numerator/denominator``. If *denominator* is ``0``, it raises " -"a :exc:`ZeroDivisionError`. The second version requires that " -"*other_fraction* is an instance of :class:`numbers.Rational` and returns a :" -"class:`Fraction` instance with the same value. The next two versions accept " -"either a :class:`float` or a :class:`decimal.Decimal` instance, and return " -"a :class:`Fraction` instance with exactly the same value. Note that due to " -"the usual issues with binary floating point (see :ref:`tut-fp-issues`), the " -"argument to ``Fraction(1.1)`` is not exactly equal to 11/10, and so " -"``Fraction(1.1)`` does *not* return ``Fraction(11, 10)`` as one might " -"expect. (But see the documentation for the :meth:`limit_denominator` method " -"below.) The last version of the constructor expects a string or unicode " -"instance. The usual form for this instance is::" +"with a value equal to ``numerator/denominator``. If *denominator* is zero, " +"it raises a :exc:`ZeroDivisionError`." +msgstr "" + +#: library/fractions.rst:28 +#, fuzzy +msgid "" +"The second version requires that *number* is an instance " +"of :class:`numbers.Rational` or has the :meth:`!as_integer_ratio` method " +"(this includes :class:`float` and :class:`decimal.Decimal`). It returns " +"a :class:`Fraction` instance with exactly the same value. Assumed, that " +"the :meth:`!as_integer_ratio` method returns a pair of coprime integers and " +"last one is positive. Note that due to the usual issues with binary point " +"(see :ref:`tut-fp-issues`), the argument to ``Fraction(1.1)`` is not exactly " +"equal to 11/10, and so ``Fraction(1.1)`` does *not* return ``Fraction(11, " +"10)`` as one might expect. (But see the documentation for " +"the :meth:`limit_denominator` method below.)" msgstr "" "La première version demande que *numerator* et *denominator* soient des " -"instance de :class:`numbers.Rational` et renvoie une instance de :class:" -"`Fraction` valant ``numerator/denominator``. Si *denominator* vaut :const:" -"`0`, une :exc:`ZeroDivisionError` est levée. La seconde version demande que " -"*other_fraction* soit une instance de :class:`numbers.Rational` et renvoie " -"une instance de :class:`Fraction` avec la même valeur. Les deux versions " -"suivantes acceptent un :class:`float` ou une instance de :class:`decimal." -"Decimal`, et renvoient une instance de :class:`Fraction` avec exactement la " -"même valeur. Notez que les problèmes usuels des virgules flottantes " -"binaires (voir :ref:`tut-fp-issues`) font que ``Fraction(1.1)`` n'est pas " -"exactement égal à 11/10, et donc ``Fraction(1.1)`` ne renvoie *pas* " -"``Fraction(11, 10)`` comme on pourrait le penser. (Mais référez-vous à la " -"documentation de la méthode :meth:`limit_denominator` ci-dessous.) La " +"instance de :class:`numbers.Rational` et renvoie une instance " +"de :class:`Fraction` valant ``numerator/denominator``. Si *denominator* " +"vaut :const:`0`, une :exc:`ZeroDivisionError` est levée. La seconde version " +"demande que *other_fraction* soit une instance de :class:`numbers.Rational` " +"et renvoie une instance de :class:`Fraction` avec la même valeur. Les deux " +"versions suivantes acceptent un :class:`float` ou une instance " +"de :class:`decimal.Decimal`, et renvoient une instance de :class:`Fraction` " +"avec exactement la même valeur. Notez que les problèmes usuels des virgules " +"flottantes binaires (voir :ref:`tut-fp-issues`) font que ``Fraction(1.1)`` " +"n'est pas exactement égal à 11/10, et donc ``Fraction(1.1)`` ne renvoie " +"*pas* ``Fraction(11, 10)`` comme on pourrait le penser. (Mais référez-vous à " +"la documentation de la méthode :meth:`limit_denominator` ci-dessous.) La " "dernière version du constructeur attend une chaîne de caractères ou Unicode. " "La représentation habituelle de cette forme est ::" -#: library/fractions.rst:43 +#: library/fractions.rst:40 +msgid "" +"The last version of the constructor expects a string. The usual form for " +"this instance is::" +msgstr "" + +#: library/fractions.rst:45 #, fuzzy msgid "" "where the optional ``sign`` may be either '+' or '-' and ``numerator`` and " "``denominator`` (if present) are strings of decimal digits (underscores may " "be used to delimit digits as with integral literals in code). In addition, " -"any string that represents a finite value and is accepted by the :class:" -"`float` constructor is also accepted by the :class:`Fraction` constructor. " -"In either form the input string may also have leading and/or trailing " -"whitespace. Here are some examples::" +"any string that represents a finite value and is accepted by " +"the :class:`float` constructor is also accepted by the :class:`Fraction` " +"constructor. In either form the input string may also have leading and/or " +"trailing whitespace. Here are some examples::" msgstr "" "où le ``sign`` optionnel peut être soit ``+`` soit ``-``, et ``numerator`` " "et ``denominator`` (si présent) sont des chaînes de chiffres décimaux. De " "plus, toute chaîne qui représente une valeur finie et acceptée par le " -"constructeur de :class:`float` est aussi acceptée par celui de :class:" -"`Fraction`. Dans ces deux formes, la chaîne d'entrée peut aussi contenir " -"des espaces en début ou en fin de chaîne. Voici quelques exemples ::" +"constructeur de :class:`float` est aussi acceptée par celui " +"de :class:`Fraction`. Dans ces deux formes, la chaîne d'entrée peut aussi " +"contenir des espaces en début ou en fin de chaîne. Voici quelques exemples ::" -#: library/fractions.rst:78 +#: library/fractions.rst:80 #, fuzzy msgid "" -"The :class:`Fraction` class inherits from the abstract base class :class:" -"`numbers.Rational`, and implements all of the methods and operations from " -"that class. :class:`Fraction` instances are :term:`hashable`, and should be " -"treated as immutable. In addition, :class:`Fraction` has the following " -"properties and methods:" +"The :class:`Fraction` class inherits from the abstract base " +"class :class:`numbers.Rational`, and implements all of the methods and " +"operations from that class. :class:`Fraction` instances " +"are :term:`hashable`, and should be treated as immutable. In " +"addition, :class:`Fraction` has the following properties and methods:" msgstr "" -"La classe :class:`Fraction` hérite de la classe abstraite :class:`numbers." -"Rational`, et implémente toutes les méthodes et opérations de cette classe. " -"Les instances de :class:`Fraction` sont hachables, et doivent être traitées " -"comme immuables. En plus de cela, :class:`Fraction` possède les propriétés " -"et méthodes suivantes :" +"La classe :class:`Fraction` hérite de la classe " +"abstraite :class:`numbers.Rational`, et implémente toutes les méthodes et " +"opérations de cette classe. Les instances de :class:`Fraction` sont " +"hachables, et doivent être traitées comme immuables. En plus de " +"cela, :class:`Fraction` possède les propriétés et méthodes suivantes :" -#: library/fractions.rst:84 +#: library/fractions.rst:86 msgid "" -"The :class:`Fraction` constructor now accepts :class:`float` and :class:" -"`decimal.Decimal` instances." +"The :class:`Fraction` constructor now accepts :class:`float` " +"and :class:`decimal.Decimal` instances." msgstr "" -"Le constructeur de :class:`Fraction` accepte maintenant des instances de :" -"class:`float` et :class:`decimal.Decimal`." +"Le constructeur de :class:`Fraction` accepte maintenant des instances " +"de :class:`float` et :class:`decimal.Decimal`." -#: library/fractions.rst:88 +#: library/fractions.rst:90 #, fuzzy msgid "" "The :func:`math.gcd` function is now used to normalize the *numerator* and " @@ -123,49 +135,59 @@ msgid "" "Previously, the GCD type depended on *numerator* and *denominator*." msgstr "" "La fonction :func:`math.gcd` est maintenant utilisée pour normaliser le " -"*numerator* et le *denominator*. :func:`math.gcd` renvoie toujours un type :" -"class:`int`. Auparavant, le type du PGCD dépendait du *numerator* et du " -"*denominator*." +"*numerator* et le *denominator*. :func:`math.gcd` renvoie toujours un " +"type :class:`int`. Auparavant, le type du PGCD dépendait du *numerator* et " +"du *denominator*." -#: library/fractions.rst:93 +#: library/fractions.rst:95 msgid "" "Underscores are now permitted when creating a :class:`Fraction` instance " "from a string, following :PEP:`515` rules." msgstr "" -#: library/fractions.rst:97 +#: library/fractions.rst:99 msgid "" -":class:`Fraction` implements ``__int__`` now to satisfy ``typing." -"SupportsInt`` instance checks." +":class:`Fraction` implements ``__int__`` now to satisfy " +"``typing.SupportsInt`` instance checks." msgstr "" -#: library/fractions.rst:101 +#: library/fractions.rst:103 msgid "" "Space is allowed around the slash for string inputs: ``Fraction('2 / 3')``." msgstr "" -#: library/fractions.rst:104 +#: library/fractions.rst:106 msgid "" ":class:`Fraction` instances now support float-style formatting, with " "presentation types ``\"e\"``, ``\"E\"``, ``\"f\"``, ``\"F\"``, ``\"g\"``, " "``\"G\"`` and ``\"%\"\"``." msgstr "" -#: library/fractions.rst:109 +#: library/fractions.rst:111 msgid "" "Formatting of :class:`Fraction` instances without a presentation type now " "supports fill, alignment, sign handling, minimum width and grouping." msgstr "" #: library/fractions.rst:115 +#, fuzzy +msgid "" +"The :class:`Fraction` constructor now accepts any objects with the :meth:`!" +"as_integer_ratio` method." +msgstr "" +"Le constructeur de :class:`Fraction` accepte maintenant des instances " +"de :class:`float` et :class:`decimal.Decimal`." + +#: library/fractions.rst:121 msgid "Numerator of the Fraction in lowest term." msgstr "Numérateur de la fraction irréductible." -#: library/fractions.rst:119 -msgid "Denominator of the Fraction in lowest term." +#: library/fractions.rst:125 +#, fuzzy +msgid "Denominator of the Fraction in lowest terms. Guaranteed to be positive." msgstr "Dénominateur de la fraction irréductible." -#: library/fractions.rst:124 +#: library/fractions.rst:131 #, fuzzy msgid "" "Return a tuple of two integers, whose ratio is equal to the original " @@ -174,46 +196,55 @@ msgstr "" "Renvoie un *n*-uplet de deux entiers, dont le quotient est égal à la " "fraction et dont le dénominateur est positif." -#: library/fractions.rst:132 +#: library/fractions.rst:139 msgid "Return ``True`` if the Fraction is an integer." msgstr "" -#: library/fractions.rst:138 +#: library/fractions.rst:145 msgid "" -"Alternative constructor which only accepts instances of :class:`float` or :" -"class:`numbers.Integral`. Beware that ``Fraction.from_float(0.3)`` is not " -"the same value as ``Fraction(3, 10)``." +"Alternative constructor which only accepts instances of :class:`float` " +"or :class:`numbers.Integral`. Beware that ``Fraction.from_float(0.3)`` is " +"not the same value as ``Fraction(3, 10)``." msgstr "" "Ce constructeur alternatif accepte (uniquement) des nombres à virgule " -"flottante, de classe :class:`float`, ou plus généralement des instances de :" -"class:`numbers.Integral`. Attention, ``Fraction.from_float(0.3)`` est " +"flottante, de classe :class:`float`, ou plus généralement des instances " +"de :class:`numbers.Integral`. Attention, ``Fraction.from_float(0.3)`` est " "différent de ``Fraction(3, 10)``." -#: library/fractions.rst:144 +#: library/fractions.rst:151 msgid "" "From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " "directly from a :class:`float`." msgstr "" -"Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" -"`Fraction` directement depuis un :class:`float`." +"Depuis Python 3.2, vous pouvez aussi construire une instance " +"de :class:`Fraction` directement depuis un :class:`float`." -#: library/fractions.rst:150 +#: library/fractions.rst:157 msgid "" -"Alternative constructor which only accepts instances of :class:`decimal." -"Decimal` or :class:`numbers.Integral`." +"Alternative constructor which only accepts instances " +"of :class:`decimal.Decimal` or :class:`numbers.Integral`." msgstr "" -"Ce constructeur alternatif accepte (uniquement) les instances de :class:" -"`decimal.Decimal` ou :class:`numbers.Integral`." +"Ce constructeur alternatif accepte (uniquement) les instances " +"de :class:`decimal.Decimal` ou :class:`numbers.Integral`." -#: library/fractions.rst:155 +#: library/fractions.rst:162 msgid "" "From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " "directly from a :class:`decimal.Decimal` instance." msgstr "" -"Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" -"`Fraction` directement depuis une instance de :class:`decimal.Decimal`." +"Depuis Python 3.2, vous pouvez aussi construire une instance " +"de :class:`Fraction` directement depuis une instance " +"de :class:`decimal.Decimal`." -#: library/fractions.rst:162 +#: library/fractions.rst:169 +msgid "" +"Alternative constructor which only accepts instances " +"of :class:`numbers.Integral`, :class:`numbers.Rational`, :class:`float` " +"or :class:`decimal.Decimal`, and objects with the :meth:`!as_integer_ratio` " +"method, but not strings." +msgstr "" + +#: library/fractions.rst:179 msgid "" "Finds and returns the closest :class:`Fraction` to ``self`` that has " "denominator at most max_denominator. This method is useful for finding " @@ -223,11 +254,11 @@ msgstr "" "plus *max_denominator* comme dénominateur. Cette méthode est utile pour " "trouver des approximations rationnelles de nombres flottants donnés :" -#: library/fractions.rst:170 +#: library/fractions.rst:187 msgid "or for recovering a rational number that's represented as a float:" msgstr "ou pour retrouver un nombre rationnel représenté par un flottant :" -#: library/fractions.rst:183 +#: library/fractions.rst:200 msgid "" "Returns the greatest :class:`int` ``<= self``. This method can also be " "accessed through the :func:`math.floor` function:" @@ -235,7 +266,7 @@ msgstr "" "Renvoie le plus grand :class:`int` ``<= self``. Cette méthode peut aussi " "être utilisée à travers la fonction :func:`math.floor` :" -#: library/fractions.rst:193 +#: library/fractions.rst:210 msgid "" "Returns the least :class:`int` ``>= self``. This method can also be " "accessed through the :func:`math.ceil` function." @@ -243,13 +274,13 @@ msgstr "" "Renvoie le plus petit :class:`int` ``>= self``. Cette méthode peut aussi " "être utilisée à travers la fonction :func:`math.ceil`." -#: library/fractions.rst:200 +#: library/fractions.rst:217 msgid "" "The first version returns the nearest :class:`int` to ``self``, rounding " "half to even. The second version rounds ``self`` to the nearest multiple of " "``Fraction(1, 10**ndigits)`` (logically, if ``ndigits`` is negative), again " -"rounding half toward even. This method can also be accessed through the :" -"func:`round` function." +"rounding half toward even. This method can also be accessed through " +"the :func:`round` function." msgstr "" "La première version renvoie l':class:`int` le plus proche de ``self``, " "arrondissant les demis au nombre pair le plus proche. La seconde version " @@ -258,14 +289,14 @@ msgstr "" "au nombre pair le plus proche. Cette méthode peut aussi être utilisée à via " "la fonction :func:`round`." -#: library/fractions.rst:208 +#: library/fractions.rst:225 msgid "" -"Provides support for formatting of :class:`Fraction` instances via the :meth:" -"`str.format` method, the :func:`format` built-in function, or :ref:" -"`Formatted string literals `." +"Provides support for formatting of :class:`Fraction` instances via " +"the :meth:`str.format` method, the :func:`format` built-in function, " +"or :ref:`Formatted string literals `." msgstr "" -#: library/fractions.rst:212 +#: library/fractions.rst:229 msgid "" "If the ``format_spec`` format specification string does not end with one of " "the presentation types ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, ``'G'`` " @@ -277,7 +308,7 @@ msgid "" "exact integer. The zero-fill flag ``'0'`` is not supported." msgstr "" -#: library/fractions.rst:222 +#: library/fractions.rst:239 msgid "" "If the ``format_spec`` format specification string ends with one of the " "presentation types ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, ``'G'`` or " @@ -285,15 +316,15 @@ msgid "" "type in the :ref:`formatspec` section." msgstr "" -#: library/fractions.rst:227 +#: library/fractions.rst:244 msgid "Here are some examples::" msgstr "Voici quelques exemples ::" -#: library/fractions.rst:251 +#: library/fractions.rst:268 msgid "Module :mod:`numbers`" msgstr "Module :mod:`numbers`" -#: library/fractions.rst:252 +#: library/fractions.rst:269 msgid "The abstract base classes making up the numeric tower." msgstr "Les classes abstraites représentant la hiérarchie des nombres." @@ -313,9 +344,9 @@ msgstr "Les classes abstraites représentant la hiérarchie des nombres." #~ msgstr "" #~ "Renvoie le plus grand diviseur commun (PGCD) des entiers *a* et *b*. Si " #~ "*a* et *b* sont tous deux non nuls, alors la valeur absolue de ``gcd(a, " -#~ "b)`` est le plus grand entier qui divise à la fois *a* et *b*. ``gcd(a," -#~ "b)`` a le même signe que *b* si *b* n'est pas nul ; autrement il prend le " -#~ "signe de *a*. ``gcd(0, 0)`` renvoie ``0``." +#~ "b)`` est le plus grand entier qui divise à la fois *a* et *b*. " +#~ "``gcd(a,b)`` a le même signe que *b* si *b* n'est pas nul ; autrement il " +#~ "prend le signe de *a*. ``gcd(0, 0)`` renvoie ``0``." #~ msgid "Use :func:`math.gcd` instead." #~ msgstr "Utilisez plutôt :func:`math.gcd`." diff --git a/library/frameworks.po b/library/frameworks.po index c04813c00..7a30d61e5 100644 --- a/library/frameworks.po +++ b/library/frameworks.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: 2017-11-07 22:57+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -14,21 +14,38 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: library/frameworks.rst:5 -msgid "Program Frameworks" +#: library/frameworks.rst:7 +#, fuzzy +msgid "Program frameworks" msgstr "Cadriciels d'applications" -#: library/frameworks.rst:7 +#: library/frameworks.rst:9 msgid "" -"The modules described in this chapter are frameworks that will largely " -"dictate the structure of your program. Currently the modules described " -"here are all oriented toward writing command-line interfaces." +"This chapter is no longer maintained, and the modules it contained have been " +"moved to their respective topical documentation." msgstr "" -"Les modules décrits dans ce chapitre sont des cadriciels (*frameworks*, en " -"anglais) qui encadreront la structure de vos programmes. Actuellement tous " -"les modules décrits ici sont destinés à écrire des interfaces en ligne de " -"commande." #: library/frameworks.rst:11 -msgid "The full list of modules described in this chapter is:" -msgstr "La liste complète des modules décrits dans ce chapitre est :" +msgid ":mod:`cmd` — :doc:`Command Line Interface Libraries <./cmdlinelibs>`" +msgstr "" + +#: library/frameworks.rst:12 +msgid ":mod:`shlex` — :doc:`Unix Specific Services <./unix>`" +msgstr "" + +#: library/frameworks.rst:13 +msgid ":mod:`turtle` — :doc:`Graphical User Interfaces with Tk <./tk>`" +msgstr "" + +#~ msgid "" +#~ "The modules described in this chapter are frameworks that will largely " +#~ "dictate the structure of your program. Currently the modules described " +#~ "here are all oriented toward writing command-line interfaces." +#~ msgstr "" +#~ "Les modules décrits dans ce chapitre sont des cadriciels (*frameworks*, " +#~ "en anglais) qui encadreront la structure de vos programmes. Actuellement " +#~ "tous les modules décrits ici sont destinés à écrire des interfaces en " +#~ "ligne de commande." + +#~ msgid "The full list of modules described in this chapter is:" +#~ msgstr "La liste complète des modules décrits dans ce chapitre est :" diff --git a/library/ftplib.po b/library/ftplib.po index e99da2801..29de1a5b3 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2023-04-09 16:01+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -26,12 +26,12 @@ msgstr "**Code source :** :source:`Lib/ftplib.py`" #: library/ftplib.rst:15 msgid "" -"This module defines the class :class:`FTP` and a few related items. The :" -"class:`FTP` class implements the client side of the FTP protocol. You can " -"use this to write Python programs that perform a variety of automated FTP " -"jobs, such as mirroring other FTP servers. It is also used by the module :" -"mod:`urllib.request` to handle URLs that use FTP. For more information on " -"FTP (File Transfer Protocol), see internet :rfc:`959`." +"This module defines the class :class:`FTP` and a few related items. " +"The :class:`FTP` class implements the client side of the FTP protocol. You " +"can use this to write Python programs that perform a variety of automated " +"FTP jobs, such as mirroring other FTP servers. It is also used by the " +"module :mod:`urllib.request` to handle URLs that use FTP. For more " +"information on FTP (File Transfer Protocol), see internet :rfc:`959`." msgstr "" "Ce module définit la classe :class:`FTP` et quelques éléments associés. La " "classe :class:`FTP` implémente le côté client du protocole FTP. Vous pouvez " @@ -47,7 +47,7 @@ msgstr "L'encodage par défaut est UTF-8, voir la :rfc:`2640`." #: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -56,7 +56,8 @@ msgid "" msgstr "" #: library/ftplib.rst:26 -msgid "Here's a sample session using the :mod:`ftplib` module::" +#, fuzzy +msgid "Here's a sample session using the :mod:`!ftplib` module::" msgstr "Voici un exemple de session utilisant le module :mod:`ftplib` ::" #: library/ftplib.rst:51 @@ -126,8 +127,8 @@ msgstr "" #: library/ftplib.rst:505 msgid "" -"If the *timeout* parameter is set to be zero, it will raise a :class:" -"`ValueError` to prevent the creation of a non-blocking socket. The " +"If the *timeout* parameter is set to be zero, it will raise " +"a :class:`ValueError` to prevent the creation of a non-blocking socket. The " "*encoding* parameter was added, and the default was changed from Latin-1 to " "UTF-8 to follow :rfc:`2640`." msgstr "" @@ -297,9 +298,9 @@ msgstr "" #: library/ftplib.rst:292 msgid "" -"A file object (opened in binary mode) which is read until EOF, using its :" -"meth:`~io.RawIOBase.read` method in blocks of size *blocksize* to provide " -"the data to be stored." +"A file object (opened in binary mode) which is read until EOF, using " +"its :meth:`~io.RawIOBase.read` method in blocks of size *blocksize* to " +"provide the data to be stored." msgstr "" #: library/ftplib.rst:298 @@ -357,14 +358,14 @@ msgstr "" #: library/ftplib.rst:354 msgid "" -"List a directory in a standardized format by using ``MLSD`` command (:rfc:" -"`3659`). If *path* is omitted the current directory is assumed. *facts* is " -"a list of strings representing the type of information desired (e.g. " -"``[\"type\", \"size\", \"perm\"]``). Return a generator object yielding a " -"tuple of two elements for every file found in path. First element is the " -"file name, the second one is a dictionary containing facts about the file " -"name. Content of this dictionary might be limited by the *facts* argument " -"but server is not guaranteed to return all requested facts." +"List a directory in a standardized format by using ``MLSD`` command " +"(:rfc:`3659`). If *path* is omitted the current directory is assumed. " +"*facts* is a list of strings representing the type of information desired " +"(e.g. ``[\"type\", \"size\", \"perm\"]``). Return a generator object " +"yielding a tuple of two elements for every file found in path. First " +"element is the file name, the second one is a dictionary containing facts " +"about the file name. Content of this dictionary might be limited by the " +"*facts* argument but server is not guaranteed to return all requested facts." msgstr "" #: library/ftplib.rst:368 @@ -462,15 +463,15 @@ msgstr "" #: library/ftplib.rst:452 msgid "" -"An :class:`FTP` subclass which adds TLS support to FTP as described in :rfc:" -"`4217`. Connect to port 21 implicitly securing the FTP control connection " -"before authenticating." +"An :class:`FTP` subclass which adds TLS support to FTP as described " +"in :rfc:`4217`. Connect to port 21 implicitly securing the FTP control " +"connection before authenticating." msgstr "" #: library/ftplib.rst:458 msgid "" -"The user must explicitly secure the data connection by calling the :meth:" -"`prot_p` method." +"The user must explicitly secure the data connection by calling " +"the :meth:`prot_p` method." msgstr "" #: library/ftplib.rst:476 @@ -492,8 +493,9 @@ msgstr "" #: library/ftplib.rst:500 msgid "" -"The class now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." +"The class now supports hostname check " +"with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* " +"(see :const:`ssl.HAS_SNI`)." msgstr "" #: library/ftplib.rst:511 @@ -511,45 +513,42 @@ msgid "" msgstr "" #: library/ftplib.rst:529 -msgid "The SSL version to use (defaults to :data:`ssl.PROTOCOL_SSLv23`)." -msgstr "" - -#: library/ftplib.rst:533 -msgid "" -"Set up a secure control connection by using TLS or SSL, depending on what is " -"specified in the :attr:`ssl_version` attribute." -msgstr "" +#, fuzzy +msgid "Set up a secure control connection by using TLS." +msgstr "Établit une connexion de données sécurisée." -#: library/ftplib.rst:536 +#: library/ftplib.rst:531 msgid "" -"The method now supports hostname check with :attr:`ssl.SSLContext." -"check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." +"The method now supports hostname check " +"with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* " +"(see :const:`ssl.HAS_SNI`)." msgstr "" -#: library/ftplib.rst:543 +#: library/ftplib.rst:538 msgid "" "Revert control channel back to plaintext. This can be useful to take " "advantage of firewalls that know how to handle NAT with non-secure FTP " "without opening fixed ports." msgstr "" -#: library/ftplib.rst:551 -msgid "Set up secure data connection." +#: library/ftplib.rst:546 +#, fuzzy +msgid "Set up secure data connection by using TLS." msgstr "Établit une connexion de données sécurisée." -#: library/ftplib.rst:555 +#: library/ftplib.rst:550 msgid "Set up clear text data connection." msgstr "Établit une connexion de données non sécurisées." -#: library/ftplib.rst:559 +#: library/ftplib.rst:554 msgid "Module variables" msgstr "" -#: library/ftplib.rst:563 +#: library/ftplib.rst:558 msgid "Exception raised when an unexpected reply is received from the server." msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." -#: library/ftplib.rst:568 +#: library/ftplib.rst:563 msgid "" "Exception raised when an error code signifying a temporary error (response " "codes in the range 400--499) is received." @@ -557,7 +556,7 @@ msgstr "" "Exception levée lorsqu'un code d'erreur signifiant une erreur temporaire " "(code de réponse dans l'intervalle 400-499) est reçu." -#: library/ftplib.rst:574 +#: library/ftplib.rst:569 msgid "" "Exception raised when an error code signifying a permanent error (response " "codes in the range 500--599) is received." @@ -565,7 +564,7 @@ msgstr "" "Exception levée lorsqu'un code d'erreur signifiant une erreur permanente " "(code de réponse dans l'intervalle 500-599) est reçu." -#: library/ftplib.rst:580 +#: library/ftplib.rst:575 msgid "" "Exception raised when a reply is received from the server that does not fit " "the response specifications of the File Transfer Protocol, i.e. begin with a " @@ -575,7 +574,7 @@ msgstr "" "la spécification de File Transfer Protocol, c.-à-d. qu'elle doit commencer " "par un chiffre dans l'intervalle 1-5." -#: library/ftplib.rst:587 +#: library/ftplib.rst:582 msgid "" "The set of all exceptions (as a tuple) that methods of :class:`FTP` " "instances may raise as a result of problems with the FTP connection (as " @@ -583,11 +582,11 @@ msgid "" "four exceptions listed above as well as :exc:`OSError` and :exc:`EOFError`." msgstr "" -#: library/ftplib.rst:595 +#: library/ftplib.rst:590 msgid "Module :mod:`netrc`" msgstr "" -#: library/ftplib.rst:596 +#: library/ftplib.rst:591 msgid "" "Parser for the :file:`.netrc` file format. The file :file:`.netrc` is " "typically used by FTP clients to load user authentication information before " diff --git a/library/functions.po b/library/functions.po index c426e3855..3cae27414 100644 --- a/library/functions.po +++ b/library/functions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2024-11-03 21:36+0100\n" "Last-Translator: Édith Viau \n" "Language-Team: FRENCH \n" @@ -28,397 +28,407 @@ msgstr "" "L'interpréteur Python propose quelques fonctions et types natifs qui sont " "toujours disponibles. Ils sont listés ici par ordre alphabétique." -#: library/functions.rst:0 +#: library/functions.rst:13 msgid "**A**" msgstr "**A**" -#: library/functions.rst:0 +#: library/functions.rst:14 msgid ":func:`abs`" msgstr ":func:`abs`" -#: library/functions.rst:0 +#: library/functions.rst:15 msgid ":func:`aiter`" msgstr ":func:`aiter`" -#: library/functions.rst:0 +#: library/functions.rst:16 msgid ":func:`all`" msgstr ":func:`all`" -#: library/functions.rst:0 +#: library/functions.rst:17 msgid ":func:`anext`" msgstr ":func:`anext`" -#: library/functions.rst:0 +#: library/functions.rst:18 msgid ":func:`any`" msgstr ":func:`any`" -#: library/functions.rst:0 +#: library/functions.rst:19 msgid ":func:`ascii`" msgstr ":func:`ascii`" -#: library/functions.rst:0 +#: library/functions.rst:21 msgid "**B**" msgstr "**B**" -#: library/functions.rst:0 +#: library/functions.rst:22 msgid ":func:`bin`" msgstr ":func:`bin`" -#: library/functions.rst:0 +#: library/functions.rst:23 msgid ":func:`bool`" msgstr ":func:`bool`" -#: library/functions.rst:0 +#: library/functions.rst:24 msgid ":func:`breakpoint`" msgstr ":func:`breakpoint`" -#: library/functions.rst:0 +#: library/functions.rst:25 msgid "|func-bytearray|_" msgstr "|func-bytearray|_" -#: library/functions.rst:0 +#: library/functions.rst:26 msgid "|func-bytes|_" msgstr "|func-bytes|_" -#: library/functions.rst:0 +#: library/functions.rst:28 msgid "**C**" msgstr "**C**" -#: library/functions.rst:0 +#: library/functions.rst:29 msgid ":func:`callable`" msgstr ":func:`callable`" -#: library/functions.rst:0 +#: library/functions.rst:30 msgid ":func:`chr`" msgstr ":func:`chr`" -#: library/functions.rst:0 +#: library/functions.rst:31 msgid ":func:`classmethod`" msgstr ":func:`classmethod`" -#: library/functions.rst:0 +#: library/functions.rst:32 msgid ":func:`compile`" msgstr ":func:`compile`" -#: library/functions.rst:0 +#: library/functions.rst:33 msgid ":func:`complex`" msgstr ":func:`complex`" -#: library/functions.rst:0 +#: library/functions.rst:35 msgid "**D**" msgstr "**D**" -#: library/functions.rst:0 +#: library/functions.rst:36 msgid ":func:`delattr`" msgstr ":func:`delattr`" -#: library/functions.rst:0 +#: library/functions.rst:37 msgid "|func-dict|_" msgstr "|func-dict|_" -#: library/functions.rst:0 +#: library/functions.rst:38 msgid ":func:`dir`" msgstr ":func:`dir`" -#: library/functions.rst:0 +#: library/functions.rst:39 msgid ":func:`divmod`" msgstr ":func:`divmod`" -#: library/functions.rst:0 +#: library/functions.rst:13 msgid "**E**" msgstr "**E**" -#: library/functions.rst:0 +#: library/functions.rst:14 msgid ":func:`enumerate`" msgstr ":func:`enumerate`" -#: library/functions.rst:0 +#: library/functions.rst:15 msgid ":func:`eval`" msgstr ":func:`eval`" -#: library/functions.rst:0 +#: library/functions.rst:16 msgid ":func:`exec`" msgstr ":func:`exec`" -#: library/functions.rst:0 +#: library/functions.rst:18 msgid "**F**" msgstr "**F**" -#: library/functions.rst:0 +#: library/functions.rst:19 msgid ":func:`filter`" msgstr ":func:`filter`" -#: library/functions.rst:0 +#: library/functions.rst:20 msgid ":func:`float`" msgstr ":func:`float`" -#: library/functions.rst:0 +#: library/functions.rst:21 msgid ":func:`format`" msgstr ":func:`format`" -#: library/functions.rst:0 +#: library/functions.rst:22 +#, fuzzy +msgid "|func-frozendict|_" +msgstr "|func-frozenset|_" + +#: library/functions.rst:23 msgid "|func-frozenset|_" msgstr "|func-frozenset|_" -#: library/functions.rst:0 +#: library/functions.rst:25 msgid "**G**" msgstr "**G**" -#: library/functions.rst:0 +#: library/functions.rst:26 msgid ":func:`getattr`" msgstr ":func:`getattr`" -#: library/functions.rst:0 +#: library/functions.rst:27 msgid ":func:`globals`" msgstr ":func:`globals`" -#: library/functions.rst:0 +#: library/functions.rst:29 msgid "**H**" msgstr "**H**" -#: library/functions.rst:0 +#: library/functions.rst:30 msgid ":func:`hasattr`" msgstr ":func:`hasattr`" -#: library/functions.rst:0 +#: library/functions.rst:31 msgid ":func:`hash`" msgstr ":func:`hash`" -#: library/functions.rst:0 +#: library/functions.rst:32 msgid ":func:`help`" msgstr ":func:`help`" -#: library/functions.rst:0 +#: library/functions.rst:33 msgid ":func:`hex`" msgstr ":func:`hex`" -#: library/functions.rst:0 +#: library/functions.rst:35 msgid "**I**" msgstr "**I**" -#: library/functions.rst:0 +#: library/functions.rst:36 msgid ":func:`id`" msgstr ":func:`id`" -#: library/functions.rst:0 +#: library/functions.rst:37 msgid ":func:`input`" msgstr ":func:`input`" -#: library/functions.rst:0 +#: library/functions.rst:38 msgid ":func:`int`" msgstr ":func:`int`" -#: library/functions.rst:0 +#: library/functions.rst:39 msgid ":func:`isinstance`" msgstr ":func:`isinstance`" -#: library/functions.rst:0 +#: library/functions.rst:40 msgid ":func:`issubclass`" msgstr ":func:`issubclass`" -#: library/functions.rst:0 +#: library/functions.rst:41 msgid ":func:`iter`" msgstr ":func:`iter`" -#: library/functions.rst:0 +#: library/functions.rst:13 msgid "**L**" msgstr "**L**" -#: library/functions.rst:0 +#: library/functions.rst:14 msgid ":func:`len`" msgstr ":func:`len`" -#: library/functions.rst:0 +#: library/functions.rst:15 msgid "|func-list|_" msgstr "|func-list|_" -#: library/functions.rst:0 +#: library/functions.rst:16 msgid ":func:`locals`" msgstr ":func:`locals`" -#: library/functions.rst:0 +#: library/functions.rst:18 msgid "**M**" msgstr "**M**" -#: library/functions.rst:0 +#: library/functions.rst:19 msgid ":func:`map`" msgstr ":func:`map`" -#: library/functions.rst:0 +#: library/functions.rst:20 msgid ":func:`max`" msgstr ":func:`max`" -#: library/functions.rst:0 +#: library/functions.rst:21 msgid "|func-memoryview|_" msgstr "|func-memoryview|_" -#: library/functions.rst:0 +#: library/functions.rst:22 msgid ":func:`min`" msgstr ":func:`min`" -#: library/functions.rst:0 +#: library/functions.rst:24 msgid "**N**" msgstr "**N**" -#: library/functions.rst:0 +#: library/functions.rst:25 msgid ":func:`next`" msgstr ":func:`next`" -#: library/functions.rst:0 +#: library/functions.rst:27 msgid "**O**" msgstr "**O**" -#: library/functions.rst:0 +#: library/functions.rst:28 msgid ":func:`object`" msgstr ":func:`object`" -#: library/functions.rst:0 +#: library/functions.rst:29 msgid ":func:`oct`" msgstr ":func:`oct`" -#: library/functions.rst:0 +#: library/functions.rst:30 msgid ":func:`open`" msgstr ":func:`open`" -#: library/functions.rst:0 +#: library/functions.rst:31 msgid ":func:`ord`" msgstr ":func:`ord`" -#: library/functions.rst:0 +#: library/functions.rst:33 msgid "**P**" msgstr "**P**" -#: library/functions.rst:0 +#: library/functions.rst:34 msgid ":func:`pow`" msgstr ":func:`pow`" -#: library/functions.rst:0 +#: library/functions.rst:35 msgid ":func:`print`" msgstr ":func:`print`" -#: library/functions.rst:0 +#: library/functions.rst:36 msgid ":func:`property`" msgstr ":func:`property`" -#: library/functions.rst:0 +#: library/functions.rst:13 msgid "**R**" msgstr "**R**" -#: library/functions.rst:0 +#: library/functions.rst:14 msgid "|func-range|_" msgstr "|func-range|_" -#: library/functions.rst:0 +#: library/functions.rst:15 msgid ":func:`repr`" msgstr ":func:`repr`" -#: library/functions.rst:0 +#: library/functions.rst:16 msgid ":func:`reversed`" msgstr ":func:`reversed`" -#: library/functions.rst:0 +#: library/functions.rst:17 msgid ":func:`round`" msgstr ":func:`round`" -#: library/functions.rst:0 +#: library/functions.rst:19 msgid "**S**" msgstr "**S**" -#: library/functions.rst:0 +#: library/functions.rst:20 msgid "|func-set|_" msgstr "|func-set|_" -#: library/functions.rst:0 +#: library/functions.rst:21 msgid ":func:`setattr`" msgstr ":func:`setattr`" -#: library/functions.rst:0 +#: library/functions.rst:22 +#, fuzzy +msgid ":func:`sentinel`" +msgstr ":func:`isinstance`" + +#: library/functions.rst:23 msgid ":func:`slice`" msgstr ":func:`slice`" -#: library/functions.rst:0 +#: library/functions.rst:24 msgid ":func:`sorted`" msgstr ":func:`sorted`" -#: library/functions.rst:0 +#: library/functions.rst:25 msgid ":func:`staticmethod`" msgstr ":func:`staticmethod`" -#: library/functions.rst:0 +#: library/functions.rst:26 msgid "|func-str|_" msgstr "|func-str|_" -#: library/functions.rst:0 +#: library/functions.rst:27 msgid ":func:`sum`" msgstr ":func:`sum`" -#: library/functions.rst:0 +#: library/functions.rst:28 msgid ":func:`super`" msgstr ":func:`super`" -#: library/functions.rst:0 +#: library/functions.rst:30 msgid "**T**" msgstr "**T**" -#: library/functions.rst:0 +#: library/functions.rst:31 msgid "|func-tuple|_" msgstr "|func-tuple|_" -#: library/functions.rst:0 +#: library/functions.rst:32 msgid ":func:`type`" msgstr ":func:`type`" -#: library/functions.rst:0 +#: library/functions.rst:34 msgid "**V**" msgstr "**V**" -#: library/functions.rst:0 +#: library/functions.rst:35 msgid ":func:`vars`" msgstr ":func:`vars`" -#: library/functions.rst:0 +#: library/functions.rst:37 msgid "**Z**" msgstr "**Z**" -#: library/functions.rst:0 +#: library/functions.rst:38 msgid ":func:`zip`" msgstr ":func:`zip`" -#: library/functions.rst:0 +#: library/functions.rst:40 msgid "**_**" msgstr "**_**" -#: library/functions.rst:0 +#: library/functions.rst:41 msgid ":func:`__import__`" msgstr ":func:`__import__`" -#: library/functions.rst:59 +#: library/functions.rst:61 msgid "" "Return the absolute value of a number. The argument may be an integer, a " "floating-point number, or an object implementing :meth:`~object.__abs__`. If " "the argument is a complex number, its magnitude is returned." msgstr "" "Renvoie la valeur absolue d'un nombre. L'argument peut être un nombre " -"entier, un nombre à virgule flottante, ou tout objet définissant :meth:" -"`~object.__abs__`. Si l'argument est un nombre complexe, son module est " -"renvoyé." +"entier, un nombre à virgule flottante, ou tout objet " +"définissant :meth:`~object.__abs__`. Si l'argument est un nombre complexe, " +"son module est renvoyé." -#: library/functions.rst:67 +#: library/functions.rst:69 msgid "" "Return an :term:`asynchronous iterator` for an :term:`asynchronous " "iterable`. Equivalent to calling ``x.__aiter__()``." msgstr "" -"Renvoie un :term:`itérateur asynchrone ` pour l':term:" -"`itérable asynchrone ` donné. Équivaut à appeler ``x." -"__aiter__()``." +"Renvoie un :term:`itérateur asynchrone ` pour " +"l':term:`itérable asynchrone ` donné. Équivaut à " +"appeler ``x.__aiter__()``." -#: library/functions.rst:70 +#: library/functions.rst:72 msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." msgstr "" "Remarque : contrairement à :func:`iter`, :func:`aiter` n'a pas de variante à " "2 arguments." -#: library/functions.rst:76 +#: library/functions.rst:78 msgid "" "Return ``True`` if all elements of the *iterable* are true (or if the " "iterable is empty). Equivalent to::" @@ -426,35 +436,35 @@ msgstr "" "Renvoie ``True`` si tous les éléments de *iterable* sont vrais (ou s'il est " "vide). Équivaut à ::" -#: library/functions.rst:89 +#: library/functions.rst:91 msgid "" "When awaited, return the next item from the given :term:`asynchronous " "iterator`, or *default* if given and the iterator is exhausted." msgstr "" -"Lorsqu'il est attendu, renvoie l'élément suivant à partir de l':term:" -"`itérateur asynchrone ` donné, ou *default* s'il est " -"fourni et que l'itérateur est épuisé." +"Lorsqu'il est attendu, renvoie l'élément suivant à partir de " +"l':term:`itérateur asynchrone ` donné, ou *default* " +"s'il est fourni et que l'itérateur est épuisé." -#: library/functions.rst:92 +#: library/functions.rst:94 msgid "" "This is the async variant of the :func:`next` builtin, and behaves similarly." msgstr "" "Il s'agit de la variante asynchrone de la fonction native :func:`next` et " "elle se comporte de la même manière." -#: library/functions.rst:95 +#: library/functions.rst:97 msgid "" "This calls the :meth:`~object.__anext__` method of *async_iterator*, " "returning an :term:`awaitable`. Awaiting this returns the next value of the " "iterator. If *default* is given, it is returned if the iterator is " "exhausted, otherwise :exc:`StopAsyncIteration` is raised." msgstr "" -"Renvoie un :term:`attendable ` en appelant la méthode :meth:" -"`~object.__anext__` de *async_iterator*. L'attente renvoie la prochaine " -"valeur de l'itérateur. Si *default* est fourni, il est renvoyé si " +"Renvoie un :term:`attendable ` en appelant la " +"méthode :meth:`~object.__anext__` de *async_iterator*. L'attente renvoie la " +"prochaine valeur de l'itérateur. Si *default* est fourni, il est renvoyé si " "l'itérateur est épuisé, sinon :exc:`StopAsyncIteration` est levée." -#: library/functions.rst:104 +#: library/functions.rst:106 msgid "" "Return ``True`` if any element of the *iterable* is true. If the iterable " "is empty, return ``False``. Equivalent to::" @@ -462,12 +472,12 @@ msgstr "" "Renvoie ``True`` si au moins un élément de *iterable* est vrai. ``False`` " "est renvoyé dans le cas où *iterable* est vide. Équivaut à ::" -#: library/functions.rst:116 +#: library/functions.rst:118 msgid "" "As :func:`repr`, return a string containing a printable representation of an " -"object, but escape the non-ASCII characters in the string returned by :func:" -"`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string " -"similar to that returned by :func:`repr` in Python 2." +"object, but escape the non-ASCII characters in the string returned " +"by :func:`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates " +"a string similar to that returned by :func:`repr` in Python 2." msgstr "" "Renvoie, tout comme :func:`repr`, une chaîne contenant une représentation " "d'un objet destinée à l'affichage, mais en transformant les caractères non " @@ -475,19 +485,20 @@ msgstr "" "``\\x``, ``\\u`` ou ``\\U``. Cela génère une chaîne similaire à ce que " "renvoie :func:`repr` dans Python 2." -#: library/functions.rst:124 +#: library/functions.rst:126 +#, fuzzy msgid "" "Convert an integer number to a binary string prefixed with \"0b\". The " -"result is a valid Python expression. If *x* is not a Python :class:`int` " -"object, it has to define an :meth:`~object.__index__` method that returns an " -"integer. Some examples:" +"result is a valid Python expression. If *integer* is not a " +"Python :class:`int` object, it has to define an :meth:`~object.__index__` " +"method that returns an integer. Some examples:" msgstr "" "Convertit un nombre entier en binaire dans une chaîne avec le préfixe " -"\"0b\". Le résultat est une expression Python valide. Si *x* n'est pas un :" -"class:`int`, il doit définir une méthode :meth:`__index__` donnant un nombre " -"entier. Voici quelques exemples :" +"\"0b\". Le résultat est une expression Python valide. Si *x* n'est pas " +"un :class:`int`, il doit définir une méthode :meth:`__index__` donnant un " +"nombre entier. Voici quelques exemples :" -#: library/functions.rst:134 +#: library/functions.rst:136 msgid "" "If the prefix \"0b\" is desired or not, you can use either of the following " "ways." @@ -495,32 +506,37 @@ msgstr "" "Vous pouvez contrôler l'affichage du préfixe ``\"0b\"`` à l'aide d'un des " "moyens suivants." -#: library/functions.rst:942 library/functions.rst:1323 +#: library/functions.rst:143 +msgid "" +"See also :func:`enum.bin` to represent negative values as twos-complement." +msgstr "" + +#: library/functions.rst:986 library/functions.rst:1370 msgid "See also :func:`format` for more information." msgstr "Voir aussi :func:`format` pour plus d'informations." -#: library/functions.rst:146 +#: library/functions.rst:150 msgid "" "Return a Boolean value, i.e. one of ``True`` or ``False``. The argument is " "converted using the standard :ref:`truth testing procedure `. If the " "argument is false or omitted, this returns ``False``; otherwise, it returns " -"``True``. The :class:`bool` class is a subclass of :class:`int` (see :ref:" -"`typesnumeric`). It cannot be subclassed further. Its only instances are " -"``False`` and ``True`` (see :ref:`typebool`)." +"``True``. The :class:`bool` class is a subclass of :class:`int` " +"(see :ref:`typesnumeric`). It cannot be subclassed further. Its only " +"instances are ``False`` and ``True`` (see :ref:`typebool`)." msgstr "" "Renvoie une valeur booléenne, c'est-à-dire soit ``True``, soit ``False``. " "L'argument est converti en utilisant la :ref:`procédure standard " "d'évaluation de valeur de vérité `. Si l'argument est faux, ou omis, " -"elle renvoie ``False``, sinon, elle renvoie ``True``. La classe :class:" -"`bool` hérite de la classe :class:`int` (voir :ref:`typesnumeric`). Il n'est " -"pas possible d'en hériter. Ses seules instances sont ``False`` et ``True`` " -"(voir :ref:`typebool`)." +"elle renvoie ``False``, sinon, elle renvoie ``True``. La " +"classe :class:`bool` hérite de la classe :class:`int` " +"(voir :ref:`typesnumeric`). Il n'est pas possible d'en hériter. Ses seules " +"instances sont ``False`` et ``True`` (voir :ref:`typebool`)." -#: library/functions.rst:807 +#: library/functions.rst:836 msgid "The parameter is now positional-only." msgstr "Le paramètre est désormais un argument exclusivement positionnel." -#: library/functions.rst:161 +#: library/functions.rst:165 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -534,27 +550,27 @@ msgid "" msgstr "" "Cette fonction vous place dans le débogueur lorsqu'elle est appelée. Plus " "précisément, elle appelle :func:`sys.breakpointhook`, en lui passant les " -"arguments ``args`` et ``kws``. Par défaut, ``sys.breakpointhook()`` appelle :" -"func:`pdb.set_trace` qui n'attend aucun argument. Dans ce cas, c'est " -"purement une fonction de commodité donc vous n'avez pas à importer " +"arguments ``args`` et ``kws``. Par défaut, ``sys.breakpointhook()`` " +"appelle :func:`pdb.set_trace` qui n'attend aucun argument. Dans ce cas, " +"c'est purement une fonction de commodité donc vous n'avez pas à importer " "explicitement :mod:`pdb` ou à taper plus de code pour entrer dans le " -"débogueur. Cependant, il est possible d'affecter une autre fonction à :func:" -"`sys.breakpointhook`, que :func:`breakpoint` appellera automatiquement, vous " -"permettant ainsi de basculer dans le débogueur de votre choix. Si :func:`sys." -"breakpointhook` n'est pas accessible, cette fonction lève :exc:" -"`RuntimeError`." +"débogueur. Cependant, il est possible d'affecter une autre fonction " +"à :func:`sys.breakpointhook`, que :func:`breakpoint` appellera " +"automatiquement, vous permettant ainsi de basculer dans le débogueur de " +"votre choix. Si :func:`sys.breakpointhook` n'est pas accessible, cette " +"fonction lève :exc:`RuntimeError`." -#: library/functions.rst:173 +#: library/functions.rst:177 msgid "" -"By default, the behavior of :func:`breakpoint` can be changed with the :" -"envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." -"breakpointhook` for usage details." +"By default, the behavior of :func:`breakpoint` can be changed with " +"the :envvar:`PYTHONBREAKPOINT` environment variable. " +"See :func:`sys.breakpointhook` for usage details." msgstr "" "Par défaut, le comportement de la fonction :func:`breakpoint` peut être " -"changé par la variable d'environnement :envvar:`PYTHONBREAKPOINT`. Voir :" -"func:`sys.breakpointhook` pour plus de détails." +"changé par la variable d'environnement :envvar:`PYTHONBREAKPOINT`. " +"Voir :func:`sys.breakpointhook` pour plus de détails." -#: library/functions.rst:177 +#: library/functions.rst:181 msgid "" "Note that this is not guaranteed if :func:`sys.breakpointhook` has been " "replaced." @@ -562,7 +578,7 @@ msgstr "" "Notez que ceci n'est plus garanti si la fonction :func:`sys.breakpointhook` " "a été remplacée." -#: library/functions.rst:180 +#: library/functions.rst:184 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." @@ -570,7 +586,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:190 +#: library/functions.rst:193 msgid "" "Return a new array of bytes. The :class:`bytearray` class is a mutable " "sequence of integers in the range 0 <= x < 256. It has most of the usual " @@ -579,11 +595,11 @@ msgid "" msgstr "" "Renvoie un nouveau tableau d'octets. La classe :class:`bytearray` est une " "séquence mutable de nombres entiers dans l'intervalle 0 ≤ x < 256. Il " -"possède la plupart des méthodes des séquences variables, décrites dans :ref:" -"`typesseq-mutable`, ainsi que la plupart des méthodes de la classe :class:" -"`bytes`, voir :ref:`bytes-methods`." +"possède la plupart des méthodes des séquences variables, décrites " +"dans :ref:`typesseq-mutable`, ainsi que la plupart des méthodes de la " +"classe :class:`bytes`, voir :ref:`bytes-methods`." -#: library/functions.rst:195 +#: library/functions.rst:198 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" @@ -592,7 +608,7 @@ msgstr "" "tableau de plusieurs façons :" # énumération -#: library/functions.rst:198 +#: library/functions.rst:201 msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " "*errors*) parameters; :func:`bytearray` then converts the string to bytes " @@ -603,7 +619,7 @@ msgstr "" "convertit ensuite la chaîne en octets *via* la méthode :meth:`str.encode` ;" # énumération -#: library/functions.rst:202 +#: library/functions.rst:205 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." @@ -612,7 +628,7 @@ msgstr "" "*null* ;" # énumération -#: library/functions.rst:205 +#: library/functions.rst:208 msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " @@ -622,7 +638,7 @@ msgstr "" "tampon en lecture seule de l'objet est utilisé pour initialiser le tableau ;" # énumération -#: library/functions.rst:208 +#: library/functions.rst:211 msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " "<= x < 256``, which are used as the initial contents of the array." @@ -631,19 +647,19 @@ msgstr "" "l'intervalle ``0 <= x < 256``, qui sont utilisés pour initialiser le contenu " "du tableau." -#: library/functions.rst:211 +#: library/functions.rst:214 msgid "Without an argument, an array of size 0 is created." msgstr "Sans argument, un tableau vide est créé." -#: library/functions.rst:213 +#: library/functions.rst:216 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "Voir :ref:`binaryseq` et :ref:`typebytearray`." -#: library/functions.rst:222 +#: library/functions.rst:224 msgid "" "Return a new \"bytes\" object which is an immutable sequence of integers in " -"the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" -"class:`bytearray` -- it has the same non-mutating methods and the same " +"the range ``0 <= x < 256``. :class:`bytes` is an immutable version " +"of :class:`bytearray` -- it has the same non-mutating methods and the same " "indexing and slicing behavior." msgstr "" "Renvoie un nouvel objet *bytes*, qui est une séquence immuable de nombres " @@ -651,41 +667,43 @@ msgstr "" "version immuable de :class:`bytearray` — avec les mêmes méthodes d'accès, et " "le même comportement lors de l'indexation ou du découpage." -#: library/functions.rst:227 +#: library/functions.rst:229 msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "" -"En conséquence, les arguments du constructeur sont les mêmes que pour :func:" -"`bytearray`." +"En conséquence, les arguments du constructeur sont les mêmes que " +"pour :func:`bytearray`." -#: library/functions.rst:229 +#: library/functions.rst:231 msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "" -"Les objets *bytes* peuvent aussi être créés à partir de littéraux, voir :ref:" -"`strings`." +"Les objets *bytes* peuvent aussi être créés à partir de littéraux, " +"voir :ref:`strings`." -#: library/functions.rst:231 +#: library/functions.rst:233 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "" "Voir aussi :ref:`binaryseq`, :ref:`typebytes`, et :ref:`bytes-methods`." -#: library/functions.rst:236 +#: library/functions.rst:238 msgid "" -"Return :const:`True` if the *object* argument appears callable, :const:" -"`False` if not. If this returns ``True``, it is still possible that a call " -"fails, but if it is ``False``, calling *object* will never succeed. Note " -"that classes are callable (calling a class returns a new instance); " -"instances are callable if their class has a :meth:`~object.__call__` method." +"Return :const:`True` if the *object* argument appears " +"callable, :const:`False` if not. If this returns ``True``, it is still " +"possible that a call fails, but if it is ``False``, calling *object* will " +"never succeed. Note that classes are callable (calling a class returns a new " +"instance); instances are callable if their class has " +"a :meth:`~object.__call__` method." msgstr "" -"Renvoie :const:`True` si l'argument *object* semble être appelable, sinon :" -"const:`False`. Lorsqu'elle renvoie ``True``, il est toujours possible qu'un " -"appel échoue. Cependant, lorsqu'elle renvoie ``False``, il n'est jamais " -"possible d'appeler *object*. Notez qu'une classe est toujours appelable " -"(appeler une classe donne une nouvelle instance) ; une instance n'est " -"appelable que si sa classe définit une méthode :meth:`~object.__call__`." +"Renvoie :const:`True` si l'argument *object* semble être appelable, " +"sinon :const:`False`. Lorsqu'elle renvoie ``True``, il est toujours possible " +"qu'un appel échoue. Cependant, lorsqu'elle renvoie ``False``, il n'est " +"jamais possible d'appeler *object*. Notez qu'une classe est toujours " +"appelable (appeler une classe donne une nouvelle instance) ; une instance " +"n'est appelable que si sa classe définit une " +"méthode :meth:`~object.__call__`." # suit un : -#: library/functions.rst:242 +#: library/functions.rst:244 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." @@ -693,10 +711,11 @@ msgstr "" "cette fonction a d'abord été supprimée avec Python 3.0 puis elle a été " "remise dans Python 3.2." -#: library/functions.rst:249 +#: library/functions.rst:251 +#, fuzzy msgid "" -"Return the string representing a character whose Unicode code point is the " -"integer *i*. For example, ``chr(97)`` returns the string ``'a'``, while " +"Return the string representing a character with the specified Unicode code " +"point. For example, ``chr(97)`` returns the string ``'a'``, while " "``chr(8364)`` returns the string ``'€'``. This is the inverse of :func:`ord`." msgstr "" "Renvoie la chaîne représentant un caractère dont le code de caractère " @@ -704,20 +723,21 @@ msgstr "" "de caractères ``'a'``, tandis que ``chr(8364)`` renvoie ``'€'``. Il s'agit " "de la réciproque de :func:`ord`." -#: library/functions.rst:253 +#: library/functions.rst:255 +#, fuzzy msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " -"base 16). :exc:`ValueError` will be raised if *i* is outside that range." +"base 16). :exc:`ValueError` will be raised if it is outside that range." msgstr "" "L'intervalle valide pour cet argument est de ``0`` à ``1114111`` " "(``0x10FFFF`` en base 16). Une exception :exc:`ValueError` est levée si *i* " "est en dehors de l'intervalle." -#: library/functions.rst:259 +#: library/functions.rst:261 msgid "Transform a method into a class method." msgstr "Transforme une méthode en méthode de classe." -#: library/functions.rst:261 +#: library/functions.rst:263 msgid "" "A class method receives the class as an implicit first argument, just like " "an instance method receives the instance. To declare a class method, use " @@ -727,15 +747,15 @@ msgstr "" "tout comme une méthode d'instance reçoit l'instance. Voici comment déclarer " "une méthode de classe ::" -#: library/functions.rst:269 +#: library/functions.rst:271 msgid "" -"The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" -"`function` for details." +"The ``@classmethod`` form is a function :term:`decorator` -- " +"see :ref:`function` for details." msgstr "" "La forme ``@classmethod`` est un :term:`décorateur ` de fonction " "— consultez :ref:`function` pour plus de détails." -#: library/functions.rst:272 +#: library/functions.rst:274 msgid "" "A class method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). The instance is ignored except for its " @@ -747,48 +767,48 @@ msgstr "" "sa classe. Si la méthode est appelée sur une instance de classe fille, c'est " "la classe fille qui sera donnée en premier argument implicite." -#: library/functions.rst:277 +#: library/functions.rst:279 msgid "" "Class methods are different than C++ or Java static methods. If you want " "those, see :func:`staticmethod` in this section. For more information on " "class methods, see :ref:`types`." msgstr "" "Les méthodes de classe sont différentes des méthodes statiques du C++ ou du " -"Java. Si ce sont elles dont vous avez besoin, regardez du côté de :func:" -"`staticmethod` dans cette section. Voir aussi :ref:`types`." +"Java. Si ce sont elles dont vous avez besoin, regardez du côté " +"de :func:`staticmethod` dans cette section. Voir aussi :ref:`types`." # suit un : -#: library/functions.rst:281 +#: library/functions.rst:283 msgid "" -"Class methods can now wrap other :term:`descriptors ` such as :" -"func:`property`." +"Class methods can now wrap other :term:`descriptors ` such " +"as :func:`property`." msgstr "" "les méthodes de classe peuvent encapsuler d'autres :term:`descripteurs " "` comme :func:`property`." # suit un : -#: library/functions.rst:285 +#: library/functions.rst:287 msgid "" -"Class methods now inherit the method attributes (:attr:`~function." -"__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" -"attr:`~function.__doc__` and :attr:`~function.__annotations__`) and have a " -"new ``__wrapped__`` attribute." +"Class methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " +"and :attr:`~function.__annotations__`) and have a new ``__wrapped__`` " +"attribute." msgstr "" -"les méthodes de classe héritent dorénavant des attributs des méthodes (:attr:" -"`~function.__module__`, :attr:`~function.__name__`, :attr:`~function." -"__qualname__`, :attr:`~function.__doc__` et :attr:`~function." -"__annotations__`) et ont un nouvel attribut ``__wrapped__``." +"les méthodes de classe héritent dorénavant des attributs des méthodes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " +"et :attr:`~function.__annotations__`) et ont un nouvel attribut " +"``__wrapped__``." # suit un : -#: library/functions.rst:292 +#: library/functions.rst:294 msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." msgstr "" -"les méthodes de classe ne peuvent plus encapsuler d'autres :term:" -"`descripteurs ` comme :func:`property`." +"les méthodes de classe ne peuvent plus encapsuler " +"d'autres :term:`descripteurs ` comme :func:`property`." -#: library/functions.rst:299 +#: library/functions.rst:303 msgid "" "Compile the *source* into a code or AST object. Code objects can be " "executed by :func:`exec` or :func:`eval`. *source* can either be a normal " @@ -797,10 +817,10 @@ msgid "" msgstr "" "Compile *source* en un objet code ou objet AST. Les objets code peuvent être " "exécutés par :func:`exec` ou :func:`eval`. *source* peut être une chaîne, " -"une chaîne d'octets, ou un objet AST. Consultez la documentation du module :" -"mod:`ast` pour des informations sur la manipulation d'objets AST." +"une chaîne d'octets, ou un objet AST. Consultez la documentation du " +"module :mod:`ast` pour des informations sur la manipulation d'objets AST." -#: library/functions.rst:304 +#: library/functions.rst:308 msgid "" "The *filename* argument should give the file from which the code was read; " "pass some recognizable value if it wasn't read from a file (``''`` " @@ -810,7 +830,7 @@ msgstr "" "lu. Donnez quelque chose de reconnaissable lorsqu'il n'a pas été lu depuis " "un fichier (typiquement ``\"\"``)." -#: library/functions.rst:308 +#: library/functions.rst:312 msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " "``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " @@ -824,49 +844,50 @@ msgstr "" "(dans ce dernier cas, les résultats d'expressions donnant autre chose que " "``None`` sont affichés)." -#: library/functions.rst:314 -msgid "" -"The optional arguments *flags* and *dont_inherit* control which :ref:" -"`compiler options ` should be activated and which :ref:" -"`future features ` should be allowed. If neither is present (or both " -"are zero) the code is compiled with the same flags that affect the code that " -"is calling :func:`compile`. If the *flags* argument is given and " -"*dont_inherit* is not (or is zero) then the compiler options and the future " -"statements specified by the *flags* argument are used in addition to those " -"that would be used anyway. If *dont_inherit* is a non-zero integer then the " -"*flags* argument is it -- the flags (future features and compiler options) " -"in the surrounding code are ignored." -msgstr "" -"Les arguments optionnels *flags* et *dont_inherit* contrôlent quelles :ref:" -"`options de compilation ` seront activées et quelles :" -"ref:`instructions future ` seront autorisées. Si aucun des deux " -"n'est présent (ou que les deux sont à 0), le code est compilé avec les mêmes " -"paramètres que le code appelant :func:`compile`. Si l'argument *flags* est " -"fourni alors que *dont_inherit* ne l'est pas (ou vaut 0), les options de " -"compilation et les instructions *futures* utilisées sont celles définies par " -"*flags* en plus de celles qui auraient été utilisées. Si *dont_inherit* est " -"un entier différent de zéro, *flags* est utilisé tel quel — les *flags* " -"(instructions futures et options de compilation) valables pour le code " -"encadrant *compile* sont ignorés." - -#: library/functions.rst:325 +#: library/functions.rst:318 +msgid "" +"The optional arguments *flags* and *dont_inherit* control " +"which :ref:`compiler options ` should be activated and " +"which :ref:`future features ` should be allowed. If neither is " +"present (or both are zero) the code is compiled with the same flags that " +"affect the code that is calling :func:`compile`. If the *flags* argument is " +"given and *dont_inherit* is not (or is zero) then the compiler options and " +"the future statements specified by the *flags* argument are used in addition " +"to those that would be used anyway. If *dont_inherit* is a non-zero integer " +"then the *flags* argument is it -- the flags (future features and compiler " +"options) in the surrounding code are ignored." +msgstr "" +"Les arguments optionnels *flags* et *dont_inherit* contrôlent " +"quelles :ref:`options de compilation ` seront activées " +"et quelles :ref:`instructions future ` seront autorisées. Si aucun " +"des deux n'est présent (ou que les deux sont à 0), le code est compilé avec " +"les mêmes paramètres que le code appelant :func:`compile`. Si l'argument " +"*flags* est fourni alors que *dont_inherit* ne l'est pas (ou vaut 0), les " +"options de compilation et les instructions *futures* utilisées sont celles " +"définies par *flags* en plus de celles qui auraient été utilisées. Si " +"*dont_inherit* est un entier différent de zéro, *flags* est utilisé tel quel " +"— les *flags* (instructions futures et options de compilation) valables pour " +"le code encadrant *compile* sont ignorés." + +#: library/functions.rst:329 msgid "" "Compiler options and future statements are specified by bits which can be " "bitwise ORed together to specify multiple options. The bitfield required to " -"specify a given future feature can be found as the :attr:`~__future__." -"_Feature.compiler_flag` attribute on the :class:`~__future__._Feature` " -"instance in the :mod:`__future__` module. :ref:`Compiler flags ` can be found in :mod:`ast` module, with ``PyCF_`` prefix." +"specify a given future feature can be found as " +"the :attr:`~__future__._Feature.compiler_flag` attribute on " +"the :class:`~__future__._Feature` instance in the :mod:`__future__` " +"module. :ref:`Compiler flags ` can be found " +"in :mod:`ast` module, with ``PyCF_`` prefix." msgstr "" "Les instructions *future* sont contrôlées par des bits, il est ainsi " "possible d'en activer plusieurs en les combinant avec un *OU* binaire. Les " "bits requis pour demander une certaine fonctionnalité se trouvent dans " -"l'attribut :attr:`~__future__._Feature.compiler_flag` de la classe :class:" -"`~__future__.Feature` du module :mod:`__future__`. Les :ref:`options du " -"compilateur ` se trouvent dans le module :mod:`ast`, " -"avec le préfixe ``PyCF_``." +"l'attribut :attr:`~__future__._Feature.compiler_flag` de la " +"classe :class:`~__future__.Feature` du module :mod:`__future__`. " +"Les :ref:`options du compilateur ` se trouvent dans le " +"module :mod:`ast`, avec le préfixe ``PyCF_``." -#: library/functions.rst:333 +#: library/functions.rst:337 msgid "" "The argument *optimize* specifies the optimization level of the compiler; " "the default value of ``-1`` selects the optimization level of the " @@ -881,23 +902,30 @@ msgstr "" "``1`` (les ``assert`` sont supprimés, ``__debug__`` est ``False``) ou ``2`` " "(les chaines de documentation sont également supprimées)." -#: library/functions.rst:339 +#: library/functions.rst:343 +msgid "" +"The optional argument *module* specifies the module name. It is needed to " +"unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "" + +#: library/functions.rst:347 +#, fuzzy msgid "" -"This function raises :exc:`SyntaxError` if the compiled source is invalid, " -"and :exc:`ValueError` if the source contains null bytes." +"This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled " +"source is invalid." msgstr "" "Cette fonction lève une :exc:`SyntaxError` si la source n'est pas valide, " "et :exc:`ValueError` si la source contient des octets *null*." -#: library/functions.rst:342 +#: library/functions.rst:350 msgid "" -"If you want to parse Python code into its AST representation, see :func:`ast." -"parse`." +"If you want to parse Python code into its AST representation, " +"see :func:`ast.parse`." msgstr "" -"Si vous voulez transformer du code Python en sa représentation AST, voyez :" -"func:`ast.parse`." +"Si vous voulez transformer du code Python en sa représentation AST, " +"voyez :func:`ast.parse`." -#: library/functions.rst:347 +#: library/functions.rst:355 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -908,12 +936,12 @@ msgstr "" "compilation implicite." # suit un : -#: library/functions.rst:353 +#: library/functions.rst:361 msgid "" "When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " "mode, input must be terminated by at least one newline character. This is " -"to facilitate detection of incomplete and complete statements in the :mod:" -"`code` module." +"to facilitate detection of incomplete and complete statements in " +"the :mod:`code` module." msgstr "" "lors de la compilation d'une chaîne de plusieurs lignes de code avec les " "modes ``'single'`` ou ``'eval'``, celles-ci doivent être terminées par au " @@ -921,7 +949,7 @@ msgstr "" "les instructions complètes et incomplètes dans le module :mod:`code`." # suit un : -#: library/functions.rst:360 +#: library/functions.rst:368 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string when compiling to an AST object due to stack depth " @@ -932,7 +960,7 @@ msgstr "" "Ceci est dû à limitation de la profondeur de la pile d'appels." # suit un : -#: library/functions.rst:364 +#: library/functions.rst:372 msgid "" "Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " "does not have to end in a newline anymore. Added the *optimize* parameter." @@ -942,7 +970,7 @@ msgstr "" "ligne. Ajout du paramètre *optimize*." # suit un : -#: library/functions.rst:368 +#: library/functions.rst:376 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." @@ -950,7 +978,7 @@ msgstr "" "précédemment, l'exception :exc:`TypeError` était levée quand un caractère " "nul était rencontré dans *source*." -#: library/functions.rst:372 +#: library/functions.rst:380 msgid "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " "support for top-level ``await``, ``async for``, and ``async with``." @@ -959,17 +987,23 @@ msgstr "" "pour permettre une gestion haut niveau de ``await``, ``async for`` et " "``async with``." -#: library/functions.rst:381 +# suit un : +#: library/functions.rst:384 +#, fuzzy +msgid "Added the *module* parameter." +msgstr "ajout du paramètre *closure*." + +#: library/functions.rst:392 msgid "" "Convert a single string or number to a complex number, or create a complex " "number from real and imaginary parts." msgstr "" -#: library/functions.rst:752 library/functions.rst:998 +#: library/functions.rst:779 library/functions.rst:1042 msgid "Examples:" msgstr "Exemples :" -#: library/functions.rst:405 +#: library/functions.rst:416 msgid "" "If the argument is a string, it must contain either a real part (in the same " "format as for :func:`float`) or an imaginary part (in the same format but " @@ -979,19 +1013,19 @@ msgid "" "and ``')'``, which are ignored. The string must not contain whitespace " "between ``'+'``, ``'-'``, the ``'j'`` or ``'J'`` suffix, and the decimal " "number. For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` " -"raises :exc:`ValueError`. More precisely, the input must conform to the :" -"token:`~float:complexvalue` production rule in the following grammar, after " -"parentheses and leading and trailing whitespace characters are removed:" +"raises :exc:`ValueError`. More precisely, the input must conform to " +"the :token:`~float:complexvalue` production rule in the following grammar, " +"after parentheses and leading and trailing whitespace characters are removed:" msgstr "" -#: library/functions.rst:424 +#: library/functions.rst:435 msgid "" "If the argument is a number, the constructor serves as a numeric conversion " "like :class:`int` and :class:`float`. For a general Python object ``x``, " -"``complex(x)`` delegates to ``x.__complex__()``. If :meth:`~object." -"__complex__` is not defined then it falls back to :meth:`~object.__float__`. " -"If :meth:`!__float__` is not defined then it falls back to :meth:`~object." -"__index__`." +"``complex(x)`` delegates to ``x.__complex__()``. " +"If :meth:`~object.__complex__` is not defined then it falls back " +"to :meth:`~object.__float__`. If :meth:`!__float__` is not defined then it " +"falls back to :meth:`~object.__index__`." msgstr "" "Si l'argument est un nombre, le constructeur le convertit, comme le font les " "classes :class:`int` et :class:`float`. Pour les autres objets ``x``, " @@ -999,7 +1033,7 @@ msgstr "" "n'est pas définie, elle délègue à :meth:`~object.__float__`. Si :meth:`!" "__float__` n'est pas défini, alors elle délègue à :meth:`~object.__index__`." -#: library/functions.rst:433 +#: library/functions.rst:444 msgid "" "If two arguments are provided or keyword arguments are used, each argument " "may be any numeric type (including complex). If both arguments are real " @@ -1010,31 +1044,43 @@ msgid "" "number, only its real component is used in the above expressions." msgstr "" -#: library/functions.rst:443 +#: library/functions.rst:454 +msgid "" +"See also :meth:`complex.from_number` which only accepts a single numeric " +"argument." +msgstr "" + +#: library/functions.rst:456 msgid "If all arguments are omitted, returns ``0j``." msgstr "" -#: library/functions.rst:445 +#: library/functions.rst:458 msgid "The complex type is described in :ref:`typesnumeric`." msgstr "Le type complexe est décrit dans :ref:`typesnumeric`." # suit un : -#: library/functions.rst:804 library/functions.rst:1047 +#: library/functions.rst:833 library/functions.rst:1090 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" "les chiffres peuvent être groupés avec des tirets bas comme dans les " "expressions littérales." # suit un : -#: library/functions.rst:450 +#: library/functions.rst:463 +msgid "" +"Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` " +"and :meth:`~object.__float__` are not defined." +msgstr "" +"délègue à :meth:`~object.__index__` si :meth:`~object.__complex__` " +"et :meth:`~object.__float__` ne sont pas définies." + +#: library/functions.rst:467 msgid "" -"Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and :" -"meth:`~object.__float__` are not defined." +"Passing a complex number as the *real* or *imag* argument is now deprecated; " +"it should only be passed as a single positional argument." msgstr "" -"délègue à :meth:`~object.__index__` si :meth:`~object.__complex__` et :meth:" -"`~object.__float__` ne sont pas définies." -#: library/functions.rst:457 +#: library/functions.rst:474 msgid "" "This is a relative of :func:`setattr`. The arguments are an object and a " "string. The string must be the name of one of the object's attributes. The " @@ -1048,7 +1094,7 @@ msgstr "" "``delattr(x, 'foobar')`` est l'équivalent de ``del x.foobar``. *name* n'a " "pas besoin d'être un identifiant Python (voir :func:`setattr`)." -#: library/functions.rst:470 +#: library/functions.rst:487 msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See :class:`dict` and :ref:`typesmapping` for documentation about this class." @@ -1057,15 +1103,18 @@ msgstr "" "dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " "sur cette classe." -#: library/functions.rst:473 +#: library/functions.rst:490 +#, fuzzy msgid "" -"For other containers see the built-in :class:`list`, :class:`set`, and :" -"class:`tuple` classes, as well as the :mod:`collections` module." +"For other containers see the built-" +"in :class:`frozendict`, :class:`list`, :class:`set`, and :class:`tuple` " +"classes, as well as the :mod:`collections` module." msgstr "" -"Pour les autres conteneurs, voir les classes natives :class:`list`, :class:" -"`set`, et :class:`tuple`, ainsi que le module :mod:`collections`." +"D'autres conteneurs existent, " +"comme : :class:`frozenset`, :class:`list`, :class:`tuple`, et :class:`dict`, " +"ainsi que le module :mod:`collections`." -#: library/functions.rst:480 +#: library/functions.rst:497 msgid "" "Without arguments, return the list of names in the current local scope. " "With an argument, attempt to return a list of valid attributes for that " @@ -1075,34 +1124,34 @@ msgstr "" "Avec un argument, elle essaye de donner une liste d'attributs valides pour " "cet objet." -#: library/functions.rst:483 +#: library/functions.rst:500 msgid "" "If the object has a method named :meth:`~object.__dir__`, this method will " "be called and must return the list of attributes. This allows objects that " -"implement a custom :func:`~object.__getattr__` or :func:`~object." -"__getattribute__` function to customize the way :func:`dir` reports their " -"attributes." +"implement a custom :func:`~object.__getattr__` " +"or :func:`~object.__getattribute__` function to customize the " +"way :func:`dir` reports their attributes." msgstr "" "Si l'objet a une méthode :meth:`~object.__dir__`, elle est appelée et doit " -"donner une liste d'attributs. Cela permet aux objets implémentant :func:" -"`~object.__getattr__` ou :func:`~object.__getattribute__` de personnaliser " -"ce que renvoie :func:`dir`." +"donner une liste d'attributs. Cela permet aux objets " +"implémentant :func:`~object.__getattr__` ou :func:`~object.__getattribute__` " +"de personnaliser ce que renvoie :func:`dir`." -#: library/functions.rst:490 +#: library/functions.rst:507 msgid "" "If the object does not provide :meth:`~object.__dir__`, the function tries " "its best to gather information from the object's :attr:`~object.__dict__` " "attribute, if defined, and from its type object. The resulting list is not " -"necessarily complete and may be inaccurate when the object has a custom :" -"func:`~object.__getattr__`." +"necessarily complete and may be inaccurate when the object has a " +"custom :func:`~object.__getattr__`." msgstr "" "Si l'objet ne fournit pas de méthode :meth:`~object.__dir__`, la fonction " -"fait de son mieux en rassemblant les informations de l'attribut :attr:" -"`~object.__dict__` de l'objet, s'il est défini, et depuis son type. La liste " -"résultante n'est pas nécessairement complète, et peut être erronée quand " -"l'objet a une :func:`~object.__getattr__` personnalisée." +"fait de son mieux en rassemblant les informations de " +"l'attribut :attr:`~object.__dict__` de l'objet, s'il est défini, et depuis " +"son type. La liste résultante n'est pas nécessairement complète, et peut " +"être erronée quand l'objet a une :func:`~object.__getattr__` personnalisée." -#: library/functions.rst:496 +#: library/functions.rst:513 msgid "" "The default :func:`dir` mechanism behaves differently with different types " "of objects, as it attempts to produce the most relevant, rather than " @@ -1113,7 +1162,7 @@ msgstr "" "pertinente plutôt qu'exhaustive :" # énumération -#: library/functions.rst:500 +#: library/functions.rst:517 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." @@ -1122,7 +1171,7 @@ msgstr "" "module ;" # énumération -#: library/functions.rst:503 +#: library/functions.rst:520 msgid "" "If the object is a type or class object, the list contains the names of its " "attributes, and recursively of the attributes of its bases." @@ -1131,7 +1180,7 @@ msgstr "" "attributs et, récursivement, des attributs de ses parents ;" # énumération -#: library/functions.rst:506 +#: library/functions.rst:523 msgid "" "Otherwise, the list contains the object's attributes' names, the names of " "its class's attributes, and recursively of the attributes of its class's " @@ -1141,12 +1190,12 @@ msgstr "" "attributs de la classe, et récursivement des attributs des parents de la " "classe." -#: library/functions.rst:510 +#: library/functions.rst:527 msgid "The resulting list is sorted alphabetically. For example:" msgstr "La liste donnée est triée par ordre alphabétique, par exemple :" # suit un : -#: library/functions.rst:530 +#: library/functions.rst:547 msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " "interactive prompt, it tries to supply an interesting set of names more than " @@ -1160,16 +1209,16 @@ msgstr "" "peut aussi changer d'une version à l'autre. Par exemple, les attributs de " "méta-classes ne sont pas donnés lorsque l'argument est une classe." -#: library/functions.rst:540 +#: library/functions.rst:557 msgid "" "Take two (non-complex) numbers as arguments and return a pair of numbers " "consisting of their quotient and remainder when using integer division. " "With mixed operand types, the rules for binary arithmetic operators apply. " "For integers, the result is the same as ``(a // b, a % b)``. For floating-" -"point numbers the result is ``(q, a % b)``, where *q* is usually ``math." -"floor(a / b)`` but may be 1 less than that. In any case ``q * b + a % b`` " -"is very close to *a*, if ``a % b`` is non-zero it has the same sign as *b*, " -"and ``0 <= abs(a % b) < abs(b)``." +"point numbers the result is ``(q, a % b)``, where *q* is usually " +"``math.floor(a / b)`` but may be 1 less than that. In any case ``q * b + a " +"% b`` is very close to *a*, if ``a % b`` is non-zero it has the same sign as " +"*b*, and ``0 <= abs(a % b) < abs(b)``." msgstr "" "Prend deux nombres (qui ne sont pas des nombres complexes) et renvoie leur " "quotient et reste de leur division entière sous forme d'une paire de " @@ -1181,21 +1230,21 @@ msgstr "" "b`` est différent de zéro, il a le même signe que *b* et ``0 <= abs(a % b) < " "abs(b)``." -#: library/functions.rst:552 +#: library/functions.rst:569 msgid "" -"Return an enumerate object. *iterable* must be a sequence, an :term:" -"`iterator`, or some other object which supports iteration. The :meth:" -"`~iterator.__next__` method of the iterator returned by :func:`enumerate` " -"returns a tuple containing a count (from *start* which defaults to 0) and " -"the values obtained from iterating over *iterable*." +"Return an enumerate object. *iterable* must be a sequence, " +"an :term:`iterator`, or some other object which supports iteration. " +"The :meth:`~iterator.__next__` method of the iterator returned " +"by :func:`enumerate` returns a tuple containing a count (from *start* which " +"defaults to 0) and the values obtained from iterating over *iterable*." msgstr "" -"Renvoie un objet énumérant. *iterable* doit être une séquence, un :term:" -"`itérateur `, ou tout autre objet prenant en charge l'itération. " -"La méthode :meth:`~iterator.__next__` de l'itérateur donné par :func:" -"`enumerate` renvoie un *n*-uplet contenant un compte (démarrant à *start*, 0 " -"par défaut) et les valeurs obtenues de l'itération sur *iterable*." +"Renvoie un objet énumérant. *iterable* doit être une séquence, " +"un :term:`itérateur `, ou tout autre objet prenant en charge " +"l'itération. La méthode :meth:`~iterator.__next__` de l'itérateur donné " +"par :func:`enumerate` renvoie un *n*-uplet contenant un compte (démarrant à " +"*start*, 0 par défaut) et les valeurs obtenues de l'itération sur *iterable*." -#: library/functions.rst:564 +#: library/functions.rst:581 msgid "Equivalent to::" msgstr "Équivalent à ::" @@ -1203,15 +1252,15 @@ msgstr "Équivalent à ::" msgid "Parameters" msgstr "Paramètres" -#: library/functions.rst:576 +#: library/functions.rst:593 msgid "A Python expression." msgstr "" -#: library/functions.rst:580 +#: library/functions.rst:597 msgid "The global namespace (default: ``None``)." msgstr "" -#: library/functions.rst:584 +#: library/functions.rst:601 msgid "The local namespace (default: ``None``)." msgstr "" @@ -1219,7 +1268,7 @@ msgstr "" msgid "Returns" msgstr "Renvoie" -#: library/functions.rst:588 +#: library/functions.rst:605 msgid "The result of the evaluated expression." msgstr "" @@ -1227,43 +1276,43 @@ msgstr "" msgid "raises" msgstr "" -#: library/functions.rst:589 +#: library/functions.rst:606 msgid "Syntax errors are reported as exceptions." msgstr "" -#: library/functions.rst:654 +#: library/functions.rst:676 msgid "" -"This function executes arbitrary code. Calling it with user-supplied input " -"may lead to security vulnerabilities." +"This function executes arbitrary code. Calling it with untrusted user-" +"supplied input will lead to security vulnerabilities." msgstr "" -#: library/functions.rst:596 +#: library/functions.rst:613 #, fuzzy msgid "" -"The *expression* argument is parsed and evaluated as a Python expression " +"The *source* argument is parsed and evaluated as a Python expression " "(technically speaking, a condition list) using the *globals* and *locals* " "mappings as global and local namespace. If the *globals* dictionary is " "present and does not contain a value for the key ``__builtins__``, a " "reference to the dictionary of the built-in module :mod:`builtins` is " -"inserted under that key before *expression* is parsed. That way you can " -"control what builtins are available to the executed code by inserting your " -"own ``__builtins__`` dictionary into *globals* before passing it to :func:" -"`eval`. If the *locals* mapping is omitted it defaults to the *globals* " -"dictionary. If both mappings are omitted, the expression is executed with " -"the *globals* and *locals* in the environment where :func:`eval` is called. " +"inserted under that key before *source* is parsed. Overriding " +"``__builtins__`` can be used to restrict or change the available names, but " +"this is **not** a security mechanism: the executed code can still access all " +"builtins. If the *locals* mapping is omitted it defaults to the *globals* " +"dictionary. If both mappings are omitted, the source is executed with the " +"*globals* and *locals* in the environment where :func:`eval` is called. " "Note, *eval()* will only have access to the :term:`nested scopes ` (non-locals) in the enclosing environment if they are already " -"referenced in the scope that is calling :func:`eval` (e.g. via a :keyword:" -"`nonlocal` statement)." +"referenced in the scope that is calling :func:`eval` (e.g. via " +"a :keyword:`nonlocal` statement)." msgstr "" "L'argument *expression* est analysé et évalué comme une expression Python " "(techniquement, une *condition list*) en utilisant les dictionnaires " "*globals* et *locals* comme espaces de nommage global et local. Si le " "dictionnaire *globals* est présent mais ne contient pas de valeur pour la " -"clé ``__builtins__``, une référence au dictionnaire du module :mod:" -"`builtins` y est insérée avant qu'*expression* ne soit évaluée. Ainsi, vous " -"pouvez contrôler quels objets natifs sont disponibles pour le code à " -"exécuter en insérant votre propre dictionnaire ``__builtins__`` dans " +"clé ``__builtins__``, une référence au dictionnaire du " +"module :mod:`builtins` y est insérée avant qu'*expression* ne soit évaluée. " +"Ainsi, vous pouvez contrôler quels objets natifs sont disponibles pour le " +"code à exécuter en insérant votre propre dictionnaire ``__builtins__`` dans " "*globals* avant de le passer à :func:`eval`. Si le dictionnaire *locals* est " "omis, sa valeur par défaut est le dictionnaire *globals*. Si les deux " "dictionnaires sont omis, l'expression est exécutée avec les dictionnaires " @@ -1271,12 +1320,12 @@ msgstr "" "Notez que *eval()* n'a pas accès aux :term:`portées imbriquées ` (non locales) dans l'environnement englobant." -#: library/functions.rst:612 +#: library/functions.rst:630 #, fuzzy msgid "Example:" msgstr "Exemple ::" -#: library/functions.rst:618 +#: library/functions.rst:636 msgid "" "This function can also be used to execute arbitrary code objects (such as " "those created by :func:`compile`). In this case, pass a code object instead " @@ -1288,19 +1337,19 @@ msgstr "" "code plutôt qu'une chaîne. Si l'objet code a été compilé avec l'argument " "*mode* à ``'exec'``, :func:`eval` renvoie ``None``." -#: library/functions.rst:623 +#: library/functions.rst:641 msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " "function. The :func:`globals` and :func:`locals` functions return the " "current global and local dictionary, respectively, which may be useful to " "pass around for use by :func:`eval` or :func:`exec`." msgstr "" -"Conseils : l'exécution dynamique d'instructions est gérée par la fonction :" -"func:`exec`. Les fonctions :func:`globals` et :func:`locals` renvoient " -"respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " -"lors de l'usage de :func:`eval` et :func:`exec`." +"Conseils : l'exécution dynamique d'instructions est gérée par la " +"fonction :func:`exec`. Les fonctions :func:`globals` et :func:`locals` " +"renvoient respectivement les dictionnaires globaux et locaux, qui peuvent " +"être utiles lors de l'usage de :func:`eval` et :func:`exec`." -#: library/functions.rst:628 +#: library/functions.rst:646 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." @@ -1308,16 +1357,17 @@ msgstr "" "Si la source donnée est une chaîne, les espaces de début et de fin et les " "tabulations sont supprimées." -#: library/functions.rst:631 +#: library/functions.rst:649 +#, fuzzy msgid "" -"See :func:`ast.literal_eval` for a function that can safely evaluate strings " -"with expressions containing only literals." +"See :func:`ast.literal_eval` for a function to evaluate strings with " +"expressions containing only literals." msgstr "" "Utilisez :func:`ast.literal_eval` si vous avez besoin d'une fonction qui " "peut évaluer en toute sécurité des chaînes avec des expressions ne contenant " "que des valeurs littérales." -#: library/functions.rst:636 library/functions.rst:698 +#: library/functions.rst:654 library/functions.rst:721 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." @@ -1326,17 +1376,21 @@ msgstr "" "comme argument. Les événements de compilation de code peuvent également être " "levés." -#: library/functions.rst:718 +#: library/functions.rst:741 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -#: library/functions.rst:722 +#: library/functions.rst:745 msgid "" "The semantics of the default *locals* namespace have been adjusted as " "described for the :func:`locals` builtin." msgstr "" -#: library/functions.rst:657 +#: library/functions.rst:750 +msgid "*globals* can now be a :class:`frozendict`." +msgstr "" + +#: library/functions.rst:679 #, fuzzy msgid "" "This function supports dynamic execution of Python code. *source* must be " @@ -1344,10 +1398,10 @@ msgid "" "as a suite of Python statements which is then executed (unless a syntax " "error occurs). [#]_ If it is a code object, it is simply executed. In all " "cases, the code that's executed is expected to be valid as file input (see " -"the section :ref:`file-input` in the Reference Manual). Be aware that the :" -"keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may " -"not be used outside of function definitions even within the context of code " -"passed to the :func:`exec` function. The return value is ``None``." +"the section :ref:`file-input` in the Reference Manual). Be aware that " +"the :keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements " +"may not be used outside of function definitions even within the context of " +"code passed to the :func:`exec` function. The return value is ``None``." msgstr "" "Cette fonction permet l'exécution dynamique de code Python. *object* doit " "être soit une chaîne soit un objet code. Si c'est une chaîne, elle est " @@ -1356,12 +1410,12 @@ msgstr "" "simplement exécuté. Dans tous les cas, le code fourni doit être valide selon " "les mêmes critères que s'il était un script dans un fichier (voir la " "section :ref:`Fichier d'entrée ` dans le manuel de référence du " -"langage). Gardez en tête que les mots clés :keyword:`nonlocal`, :keyword:" -"`yield` et :keyword:`return` ne peuvent pas être utilisés en dehors d'une " -"fonction, même dans du code passé à :func:`exec`. La fonction renvoie " -"``None``." +"langage). Gardez en tête que les mots " +"clés :keyword:`nonlocal`, :keyword:`yield` et :keyword:`return` ne peuvent " +"pas être utilisés en dehors d'une fonction, même dans du code passé " +"à :func:`exec`. La fonction renvoie ``None``." -#: library/functions.rst:668 +#: library/functions.rst:690 #, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " @@ -1382,7 +1436,7 @@ msgstr "" "``exec`` reçoit deux objets distincts dans *globals* et *locals*, le code " "est exécuté comme s'il était inclus dans une définition de classe." -#: library/functions.rst:678 +#: library/functions.rst:700 msgid "" "When ``exec`` gets two separate objects as *globals* and *locals*, the code " "will be executed as if it were embedded in a class definition. This means " @@ -1391,13 +1445,15 @@ msgid "" "are treated as class variables in a class definition)." msgstr "" -#: library/functions.rst:684 +#: library/functions.rst:706 +#, fuzzy msgid "" "If the *globals* dictionary does not contain a value for the key " -"``__builtins__``, a reference to the dictionary of the built-in module :mod:" -"`builtins` is inserted under that key. That way you can control what " -"builtins are available to the executed code by inserting your own " -"``__builtins__`` dictionary into *globals* before passing it to :func:`exec`." +"``__builtins__``, a reference to the dictionary of the built-in " +"module :mod:`builtins` is inserted under that key. Overriding " +"``__builtins__`` can be used to restrict or change the available names, but " +"this is **not** a security mechanism: the executed code can still access all " +"builtins." msgstr "" "Si le dictionnaire *globals* ne contient pas de valeur pour la clé " "``__builtins__``, une référence au dictionnaire du module :mod:`builtins` y " @@ -1405,7 +1461,7 @@ msgstr "" "exposées au code exécuté en insérant votre propre dictionnaire " "``__builtins__`` dans *globals* avant de le donner à :func:`exec`." -#: library/functions.rst:690 +#: library/functions.rst:713 #, fuzzy msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " @@ -1420,7 +1476,7 @@ msgstr "" "l'objet code." # suit un : -#: library/functions.rst:703 +#: library/functions.rst:726 #, fuzzy msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " @@ -1432,25 +1488,25 @@ msgstr "" "en deuxième et troisième argument de :func:`exec`." # suit un : -#: library/functions.rst:709 +#: library/functions.rst:732 #, fuzzy msgid "" "The default *locals* act as described for function :func:`locals` below. " "Pass an explicit *locals* dictionary if you need to see effects of the code " "on *locals* after function :func:`exec` returns." msgstr "" -"la valeur par défaut pour *locals* se comporte comme la fonction :func:" -"`locals` : il est déconseillé de modifier le dictionnaire *locals* par " -"défaut. Donnez un dictionnaire explicitement à *locals* si vous désirez " -"observer l'effet du code sur les variables locales, après que :func:`exec` " -"soit terminée." +"la valeur par défaut pour *locals* se comporte comme la " +"fonction :func:`locals` : il est déconseillé de modifier le dictionnaire " +"*locals* par défaut. Donnez un dictionnaire explicitement à *locals* si vous " +"désirez observer l'effet du code sur les variables locales, après " +"que :func:`exec` soit terminée." # suit un : -#: library/functions.rst:713 +#: library/functions.rst:736 msgid "Added the *closure* parameter." msgstr "ajout du paramètre *closure*." -#: library/functions.rst:728 +#: library/functions.rst:755 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1463,7 +1519,7 @@ msgstr "" "est ``None``, la fonction identité est prise, c'est-à-dire que tous les " "éléments faux d'*iterable* sont supprimés." -#: library/functions.rst:734 +#: library/functions.rst:761 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1475,7 +1531,7 @@ msgstr "" "``None``, et de ``(item for item in iterable if item)`` si *function* est " "``None``." -#: library/functions.rst:739 +#: library/functions.rst:766 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." @@ -1483,13 +1539,13 @@ msgstr "" "Voir :func:`itertools.filterfalse` pour la fonction complémentaire qui donne " "les éléments d'*iterable* pour lesquels *function* renvoie ``False``." -#: library/functions.rst:750 +#: library/functions.rst:777 #, fuzzy msgid "Return a floating-point number constructed from a number or a string." msgstr "" "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." -#: library/functions.rst:767 +#: library/functions.rst:794 #, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " @@ -1509,7 +1565,7 @@ msgstr "" "conformer à ``floatvalue`` tel que défini la grammaire suivante, après que " "les espaces en début et fin de chaîne aient été retirées :" -#: library/functions.rst:788 +#: library/functions.rst:815 #, fuzzy msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " @@ -1520,7 +1576,7 @@ msgstr "" "exemple, ``\"inf\"``, ``\"Inf\"``, ``\"INFINITY\"`` et ``\"iNfiNity\"`` sont " "toutes des orthographes valides pour un infini positif." -#: library/functions.rst:791 +#: library/functions.rst:818 #, fuzzy msgid "" "Otherwise, if the argument is an integer or a floating-point number, a " @@ -1531,29 +1587,34 @@ msgstr "" "Autrement, si l'argument est un entier ou un nombre à virgule flottante, un " "nombre à virgule flottante de même valeur (en accord avec la précision des " "nombres à virgule flottante de Python) est donné. Si l'argument est en " -"dehors de l'intervalle d'un nombre a virgule flottante pour Python, :exc:" -"`OverflowError` est levée." +"dehors de l'intervalle d'un nombre a virgule flottante pour " +"Python, :exc:`OverflowError` est levée." + +#: library/functions.rst:823 +msgid "" +"For a general Python object ``x``, ``float(x)`` delegates to " +"``x.__float__()``. If :meth:`~object.__float__` is not defined then it " +"falls back to :meth:`~object.__index__`." +msgstr "" +"Pour un objet Python général ``x``, ``float(x)`` est délégué à " +"``x.__float__()``. Si :meth:`~object.__float__` n'est pas défini alors il " +"est délégué à :meth:`~object.__index__`." -#: library/functions.rst:796 +#: library/functions.rst:827 msgid "" -"For a general Python object ``x``, ``float(x)`` delegates to ``x." -"__float__()``. If :meth:`~object.__float__` is not defined then it falls " -"back to :meth:`~object.__index__`." +"See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -"Pour un objet Python général ``x``, ``float(x)`` est délégué à ``x." -"__float__()``. Si :meth:`~object.__float__` n'est pas défini alors il est " -"délégué à :meth:`~object.__index__`." -#: library/functions.rst:800 +#: library/functions.rst:829 msgid "If no argument is given, ``0.0`` is returned." msgstr "Sans argument, ``0.0`` est renvoyé." -#: library/functions.rst:802 +#: library/functions.rst:831 msgid "The float type is described in :ref:`typesnumeric`." msgstr "Le type *float* est décrit dans :ref:`typesnumeric`." # suit un : -#: library/functions.rst:810 +#: library/functions.rst:839 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." @@ -1561,7 +1622,7 @@ msgstr "" "délègue à :meth:`~object.__index__` si :meth:`~object.__float__` n'est pas " "définie." -#: library/functions.rst:820 +#: library/functions.rst:849 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1573,7 +1634,7 @@ msgstr "" "valeur. Cependant, il existe une syntaxe standard utilisée par la plupart " "des types natifs : :ref:`formatspec`." -#: library/functions.rst:825 +#: library/functions.rst:854 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1581,24 +1642,25 @@ msgstr "" "Par défaut, *format_spec* est une chaîne vide. Dans ce cas, appeler cette " "fonction a généralement le même effet qu'appeler :func:`str(value) `." -#: library/functions.rst:828 +#: library/functions.rst:857 #, fuzzy msgid "" -"A call to ``format(value, format_spec)`` is translated to ``type(value)." -"__format__(value, format_spec)`` which bypasses the instance dictionary when " -"searching for the value's :meth:`~object.__format__` method. A :exc:" -"`TypeError` exception is raised if the method search reaches :mod:`object` " -"and the *format_spec* is non-empty, or if either the *format_spec* or the " -"return value are not strings." +"A call to ``format(value, format_spec)`` is translated to " +"``type(value).__format__(value, format_spec)`` which bypasses the instance " +"dictionary when searching for the value's :meth:`~object.__format__` method. " +"A :exc:`TypeError` exception is raised if the method search " +"reaches :mod:`object` and the *format_spec* is non-empty, or if either the " +"*format_spec* or the return value are not strings." msgstr "" -"Un appel à ``format(value, format_spec)`` est transformé en ``type(value)." -"__format__(value, format_spec)``, qui contourne le dictionnaire de " -"l'instance lors de la recherche de la méthode :meth:`__fornat__`. Une " -"exception :exc:`TypeError` est levée si la recherche de la méthode atteint :" -"mod:`object` et que *format_spec* n'est pas vide, ou si *format_spec* ou le " -"résultat ne sont pas des chaînes de caractères." +"Un appel à ``format(value, format_spec)`` est transformé en " +"``type(value).__format__(value, format_spec)``, qui contourne le " +"dictionnaire de l'instance lors de la recherche de la " +"méthode :meth:`__fornat__`. Une exception :exc:`TypeError` est levée si la " +"recherche de la méthode atteint :mod:`object` et que *format_spec* n'est pas " +"vide, ou si *format_spec* ou le résultat ne sont pas des chaînes de " +"caractères." -#: library/functions.rst:835 +#: library/functions.rst:864 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1606,26 +1668,50 @@ msgstr "" "``object().__format__(format_spec)`` lève :exc:`TypeError` si *format_spec* " "n'est pas une chaîne vide." -#: library/functions.rst:844 +#: library/functions.rst:875 +#, fuzzy +msgid "" +"Create a new frozen dictionary. The :class:`frozendict` object is a built-" +"in class. See :class:`frozendict` and :ref:`typesmapping` for documentation " +"about this class." +msgstr "" +"Crée un nouveau dictionnaire. L'objet :class:`dict` est la classe du " +"dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " +"sur cette classe." + +#: library/functions.rst:878 +#, fuzzy +msgid "" +"For other containers see the built-" +"in :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple` classes, " +"as well as the :mod:`collections` module." +msgstr "" +"Pour les autres conteneurs, voir les classes " +"natives :class:`list`, :class:`set`, et :class:`tuple`, ainsi que le " +"module :mod:`collections`." + +#: library/functions.rst:888 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " -"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" -"ref:`types-set` for documentation about this class." +"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` " +"and :ref:`types-set` for documentation about this class." msgstr "" "Renvoie un nouveau :class:`frozenset`, dont les objets sont éventuellement " -"tirés d'*iterable*. ``frozenset`` est une classe native. Voir :class:" -"`frozenset` et :ref:`types-set` pour la documentation sur cette classe." +"tirés d'*iterable*. ``frozenset`` est une classe native. " +"Voir :class:`frozenset` et :ref:`types-set` pour la documentation sur cette " +"classe." -#: library/functions.rst:848 +#: library/functions.rst:892 msgid "" -"For other containers see the built-in :class:`set`, :class:`list`, :class:" -"`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." +"For other containers see the built-" +"in :class:`set`, :class:`list`, :class:`tuple`, and :class:`dict` classes, " +"as well as the :mod:`collections` module." msgstr "" -"Pour d'autres conteneurs, voyez les classes natives :class:`set`, :class:" -"`list`, :class:`tuple`, et :class:`dict`, ainsi que le module :mod:" -"`collections`." +"Pour d'autres conteneurs, voyez les classes " +"natives :class:`set`, :class:`list`, :class:`tuple`, et :class:`dict`, ainsi " +"que le module :mod:`collections`." -#: library/functions.rst:856 +#: library/functions.rst:900 msgid "" "Return the value of the named attribute of *object*. *name* must be a " "string. If the string is the name of one of the object's attributes, the " @@ -1638,24 +1724,24 @@ msgstr "" "doit être une chaîne. Si la chaîne est le nom d'un des attributs de l'objet, " "le résultat est la valeur de cet attribut. Par exemple, ``getattr(x, " "'foobar')`` est équivalent à ``x.foobar``. Si l'attribut n'existe pas, mais " -"que *default* est fourni, celui-ci est renvoyé. Sinon l'exception :exc:" -"`AttributeError` est levée. *name* n'a pas besoin d'être un identifiant " -"Python (voir :func:`setattr`)." +"que *default* est fourni, celui-ci est renvoyé. Sinon " +"l'exception :exc:`AttributeError` est levée. *name* n'a pas besoin d'être un " +"identifiant Python (voir :func:`setattr`)." # suit un : -#: library/functions.rst:865 +#: library/functions.rst:909 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " -"with two leading underscores) name in order to retrieve it with :func:" -"`getattr`." +"with two leading underscores) name in order to retrieve it " +"with :func:`getattr`." msgstr "" "étant donné que la :ref:`transformation des noms privés ` se produit au moment de la compilation, il faut modifier " "manuellement le nom d'un attribut privé (attributs avec deux traits de " "soulignement en tête) afin de le récupérer avec :func:`getattr`." -#: library/functions.rst:873 +#: library/functions.rst:917 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " @@ -1665,7 +1751,7 @@ msgstr "" "Pour le code dans les fonctions, il est défini lorsque la fonction est " "définie et reste le même quel que soit le moment où la fonction est appelée." -#: library/functions.rst:880 +#: library/functions.rst:924 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1677,7 +1763,7 @@ msgstr "" "``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " "une exception :exc:`AttributeError` a été levée)." -#: library/functions.rst:888 +#: library/functions.rst:932 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1691,18 +1777,19 @@ msgstr "" "pour ``1`` et ``1.0``)." # suit un : -#: library/functions.rst:895 +#: library/functions.rst:939 #, fuzzy msgid "" -"For objects with custom :meth:`~object.__hash__` methods, note that :func:" -"`hash` truncates the return value based on the bit width of the host machine." +"For objects with custom :meth:`~object.__hash__` methods, note " +"that :func:`hash` truncates the return value based on the bit width of the " +"host machine." msgstr "" -"pour les objets dont la méthode :meth:`__hash__` est implémentée, notez que :" -"func:`hash` tronque la valeur donnée en fonction du nombre de bits de la " -"machine hôte. Voir :meth:`__hash__ ` pour plus " +"pour les objets dont la méthode :meth:`__hash__` est implémentée, notez " +"que :func:`hash` tronque la valeur donnée en fonction du nombre de bits de " +"la machine hôte. Voir :meth:`__hash__ ` pour plus " "d'information." -#: library/functions.rst:902 +#: library/functions.rst:946 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1719,7 +1806,7 @@ msgstr "" "la console. Si l'argument est d'un autre type, une page d'aide sur cet objet " "est générée." -#: library/functions.rst:909 +#: library/functions.rst:953 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1732,15 +1819,15 @@ msgstr "" "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:914 +#: library/functions.rst:958 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" -"Cette fonction est ajoutée à l'espace de nommage natif par le module :mod:" -"`site`." +"Cette fonction est ajoutée à l'espace de nommage natif par le " +"module :mod:`site`." # suit un : -#: library/functions.rst:916 +#: library/functions.rst:960 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1748,17 +1835,18 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:923 +#: library/functions.rst:967 +#, fuzzy msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " -"\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" -"meth:`~object.__index__` method that returns an integer. Some examples:" +"\"0x\". If *integer* is not a Python :class:`int` object, it has to define " +"an :meth:`~object.__index__` method that returns an integer. Some examples:" msgstr "" "Convertit un entier en chaîne hexadécimale préfixée de \"0x\". Si *x* n'est " "pas un :class:`int`, il doit définir une méthode :meth:`~object.__index__` " "qui renvoie un entier. Quelques exemples :" -#: library/functions.rst:932 +#: library/functions.rst:976 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1768,7 +1856,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:944 +#: library/functions.rst:988 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1777,15 +1865,15 @@ msgstr "" "(en affectant 16 à l'argument *base*)." # suit un : -#: library/functions.rst:949 +#: library/functions.rst:993 msgid "" -"To obtain a hexadecimal string representation for a float, use the :meth:" -"`float.hex` method." +"To obtain a hexadecimal string representation for a float, use " +"the :meth:`float.hex` method." msgstr "" "pour obtenir une représentation hexadécimale sous forme de chaîne d'un " "nombre à virgule flottante, utilisez la méthode :meth:`float.hex`." -#: library/functions.rst:955 +#: library/functions.rst:999 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1797,11 +1885,11 @@ msgstr "" "de vie ne se chevauchent pas peuvent partager le même :func:`id`." # suit un : -#: library/functions.rst:960 +#: library/functions.rst:1004 msgid "This is the address of the object in memory." msgstr "c'est l'adresse de l'objet en mémoire." -#: library/functions.rst:962 +#: library/functions.rst:1006 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." @@ -1809,7 +1897,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " "``id``." -#: library/functions.rst:968 +#: library/functions.rst:1012 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1821,7 +1909,7 @@ msgstr "" "standard et la convertit en chaîne (supprimant le retour à la ligne final) " "qu'elle renvoie. Lorsque EOF est lu, :exc:`EOFError` est levée. Exemple ::" -#: library/functions.rst:978 +#: library/functions.rst:1022 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1829,7 +1917,7 @@ msgstr "" "Si le module :mod:`readline` est chargé, :func:`input` l'utilisera pour " "fournir des fonctionnalités d'édition et d'historique élaborées." -#: library/functions.rst:983 +#: library/functions.rst:1027 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1837,7 +1925,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.input`` avec " "l'argument ``prompt`` avant de lire l'entrée." -#: library/functions.rst:988 +#: library/functions.rst:1032 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." @@ -1845,7 +1933,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``builtins.input/result`` avec " "le résultat après avoir lu avec succès l'entrée." -#: library/functions.rst:995 +#: library/functions.rst:1039 #, fuzzy msgid "" "Return an integer object constructed from a number or a string, or return " @@ -1853,23 +1941,22 @@ msgid "" msgstr "" "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." -#: library/functions.rst:1015 +#: library/functions.rst:1059 #, fuzzy msgid "" -"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." -"__int__()``. If the argument defines :meth:`~object.__index__`, it returns " -"``x.__index__()``. If the argument defines :meth:`~object.__trunc__`, it " -"returns ``x.__trunc__()``. For floating-point numbers, this truncates " +"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns " +"``x.__int__()``. If the argument defines :meth:`~object.__index__`, it " +"returns ``x.__index__()``. For floating-point numbers, this truncates " "towards zero." msgstr "" "Renvoie un entier construit depuis un nombre ou une chaîne *x*, ou ``0`` si " -"aucun argument n'est fourni. Si *x* définit une méthode :meth:`~object." -"__int__`, ``int(x)`` renvoie ``x.__int__()``. Si *x* définit :meth:`~object." -"__index__`, ``int(x)`` renvoie ``x.__index__()`` Si *x* définit :meth:" -"`~object.__trunc__`, ``int(x)`` renvoie ``x.__trunc__()``. Les nombres à " -"virgule flottante sont tronqués vers zéro." +"aucun argument n'est fourni. Si *x* définit une " +"méthode :meth:`~object.__int__`, ``int(x)`` renvoie ``x.__int__()``. Si *x* " +"définit :meth:`~object.__index__`, ``int(x)`` renvoie ``x.__index__()`` Si " +"*x* définit :meth:`~object.__trunc__`, ``int(x)`` renvoie ``x.__trunc__()``. " +"Les nombres à virgule flottante sont tronqués vers zéro." -#: library/functions.rst:1021 +#: library/functions.rst:1064 #, fuzzy msgid "" "If the argument is not a number or if *base* is given, then it must be a " @@ -1885,7 +1972,7 @@ msgstr "" "significatifs, être entourée de caractères d'espacement et avoir des tirets " "bas (un seul à la fois) intercalés entre les chiffres." -#: library/functions.rst:1027 +#: library/functions.rst:1070 msgid "" "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 " @@ -1905,35 +1992,35 @@ msgstr "" "``Z``). 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 " -"le code. Fournir 0 comme *base* demande d'interpréter exactement comme un :" -"ref:`entier littéral dans du code ` Python, donc la base sera 2, " -"8, 10, ou 16 en fonction du préfixe. Indiquer 0 comme base interdit les " +"le code. Fournir 0 comme *base* demande d'interpréter exactement comme " +"un :ref:`entier littéral dans du code ` Python, donc la base sera " +"2, 8, 10, ou 16 en fonction du préfixe. Indiquer 0 comme base interdit les " "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:1038 +#: library/functions.rst:1081 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "Le type des entiers est décrit dans :ref:`typesnumeric`." # suit un : -#: library/functions.rst:1040 +#: library/functions.rst:1083 msgid "" -"If *base* is not an instance of :class:`int` and the *base* object has a :" -"meth:`base.__index__ ` method, that method is called to " +"If *base* is not an instance of :class:`int` and the *base* object has " +"a :meth:`base.__index__ ` method, that method is called to " "obtain an integer for the base. Previous versions used :meth:`base.__int__ " "` instead of :meth:`base.__index__ `." msgstr "" -"si *base* n'est pas une instance d':class:`int` et que *base* a une méthode :" -"meth:`base.__index__ `, cette méthode est appelée pour " -"obtenir un entier pour cette base. Les versions précédentes utilisaient :" -"meth:`base.__int__ ` au lieu de :meth:`base.__index__ " -"`." +"si *base* n'est pas une instance d':class:`int` et que *base* a une " +"méthode :meth:`base.__index__ `, cette méthode est appelée " +"pour obtenir un entier pour cette base. Les versions précédentes " +"utilisaient :meth:`base.__int__ ` au lieu " +"de :meth:`base.__index__ `." -#: library/functions.rst:1050 +#: library/functions.rst:1093 msgid "The first parameter is now positional-only." msgstr "" -#: library/functions.rst:1053 +#: library/functions.rst:1096 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." @@ -1941,30 +2028,32 @@ msgstr "" "Revient à :meth:`~object.__index__` si :meth:`~object.__int__` n'est pas " "définie." -# suit un : -#: library/functions.rst:1056 -msgid "The delegation to :meth:`~object.__trunc__` is deprecated." -msgstr "le repli vers :meth:`~object.__trunc__` est obsolète." - -#: library/functions.rst:1059 +#: library/functions.rst:1099 #, fuzzy msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " "limit is exceeded while converting a string to an :class:`int` or when " -"converting an :class:`int` into a string would exceed the limit. See the :" -"ref:`integer string conversion length limitation ` " +"converting an :class:`int` into a string would exceed the limit. See " +"the :ref:`integer string conversion length limitation ` " "documentation." msgstr "" "les chaînes données à :class:`int` et les représentations de chaîne peuvent " -"être limitées pour aider à éviter les attaques par déni de service. Une :exc:" -"`ValueError` est levée lorsque la limite est dépassée lors de la conversion " -"d'une chaîne *x* en un :class:`int` ou lorsque la conversion d'un :class:" -"`int` en une chaîne dépasserait la limite. Voir la documentation relative à " -"la :ref:`limites de longueur lors de la conversion de chaînes en entiers " -"`." +"être limitées pour aider à éviter les attaques par déni de service. " +"Une :exc:`ValueError` est levée lorsque la limite est dépassée lors de la " +"conversion d'une chaîne *x* en un :class:`int` ou lorsque la conversion " +"d'un :class:`int` en une chaîne dépasserait la limite. Voir la documentation " +"relative à la :ref:`limites de longueur lors de la conversion de chaînes en " +"entiers `." -#: library/functions.rst:1069 +# suit un : +#: library/functions.rst:1107 +#, fuzzy +msgid "" +":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." +msgstr "le repli vers :meth:`~object.__trunc__` est obsolète." + +#: library/functions.rst:1112 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual ` différents, renvoie ``True`` si *object* est une instance de " "n'importe quel de ces types. Si *classinfo* n'est ni un type ni un *n*-uplet " -"de types (et récursivement), une exception :exc:`TypeError` est levée. :exc:" -"`TypeError` ne peut pas être levée pour un type invalide si une des " -"vérifications précédentes réussit." +"de types (et récursivement), une exception :exc:`TypeError` est " +"levée. :exc:`TypeError` ne peut pas être levée pour un type invalide si une " +"des vérifications précédentes réussit." -#: library/functions.rst:1094 +#: library/functions.rst:1137 msgid "*classinfo* can be a :ref:`types-union`." msgstr "*classinfo* peut être une :ref:`union de types `." -#: library/functions.rst:1086 +#: library/functions.rst:1129 +#, fuzzy msgid "" -"Return ``True`` if *class* is a subclass (direct, indirect, or :term:" -"`virtual `) of *classinfo*. A class is considered a " -"subclass of itself. *classinfo* may be a tuple of class objects (or " -"recursively, other such tuples) or a :ref:`types-union`, in which case " -"return ``True`` if *class* is a subclass of any entry in *classinfo*. In " -"any other case, a :exc:`TypeError` exception is raised." +"Return ``True`` if *cls* is a subclass (direct, indirect, or :term:`virtual " +"`) of *classinfo*. A class is considered a subclass of " +"itself. *classinfo* may be a tuple of class objects (or recursively, other " +"such tuples) or a :ref:`types-union`, in which case return ``True`` if *cls* " +"is a subclass of any entry in *classinfo*. In any other case, " +"a :exc:`TypeError` exception is raised." msgstr "" -"Renvoie ``True`` si *class* est une classe fille (directe, indirecte ou :" -"term:`abstraite `) de *classinfo*. Une classe est " +"Renvoie ``True`` si *class* est une classe fille (directe, indirecte " +"ou :term:`abstraite `) de *classinfo*. Une classe est " "considérée sous-classe d'elle-même. *classinfo* peut être un *n*-uplet de " "classes (ou récursivement, d'autres *n*-uplets) ou une :ref:`union de types " "`, dans ce cas elle renvoie ``True`` si *class* est une sous-" -"classe d'une partie de *classinfo*. Dans tous les autres cas, une :exc:" -"`TypeError` est levée." +"classe d'une partie de *classinfo*. Dans tous les autres cas, " +"une :exc:`TypeError` est levée." -#: library/functions.rst:1101 +#: library/functions.rst:1144 #, fuzzy msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " -"second argument, *object* must be a collection object which supports the :" -"term:`iterable` protocol (the :meth:`~object.__iter__` method), or it must " -"support the sequence protocol (the :meth:`~object.__getitem__` method with " -"integer arguments starting at ``0``). If it does not support either of " -"those protocols, :exc:`TypeError` is raised. If the second argument, " -"*sentinel*, is given, then *object* must be a callable object. The iterator " -"created in this case will call *object* with no arguments for each call to " +"second argument, the single argument must be a collection object which " +"supports the :term:`iterable` protocol (the :meth:`~object.__iter__` " +"method), or it must support the sequence protocol " +"(the :meth:`~object.__getitem__` method with integer arguments starting at " +"``0``). If it does not support either of those protocols, :exc:`TypeError` " +"is raised. If the second argument, *sentinel*, is given, then the first " +"argument must be a callable object. The iterator created in this case will " +"call *callable* with no arguments for each call to " "its :meth:`~iterator.__next__` method; if the value returned is equal to " "*sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be " "returned." msgstr "" "Renvoie un objet :term:`itérateur `. La signification du premier " "argument dépend grandement de la présence du second. Sans cet argument, " -"*object* doit être une collection d'objets prenant en charge le protocole d':" -"term:`itération ` (la méthode :meth:`__iter__`) ou le protocole " +"*object* doit être une collection d'objets prenant en charge le protocole " +"d':term:`itération ` (la méthode :meth:`__iter__`) ou le protocole " "des séquences (la méthode :meth:`__getitem__`, avec des nombres entiers " "commençant par ``0`` comme argument). S'il ne gère aucun de ces protocoles, " "une :exc:`TypeError` est levée. Si le second argument *sentinel* est fourni, " @@ -2036,11 +2127,11 @@ msgstr "" "reçue est égale à *sentinel*, une :exc:`StopIteration` est levée, sinon la " "valeur est renvoyée." -#: library/functions.rst:1115 +#: library/functions.rst:1158 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:1117 +#: library/functions.rst:1160 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " @@ -2050,7 +2141,7 @@ msgstr "" "construire un lecteur par blocs. Par exemple, lire des blocs de taille fixe " "d'une base de donnée binaire jusqu'à ce que la fin soit atteinte ::" -#: library/functions.rst:1129 +#: library/functions.rst:1172 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -2061,50 +2152,50 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:1135 +#: library/functions.rst:1178 msgid "" -"``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." -"maxsize`, such as :class:`range(2 ** 100) `." +"``len`` raises :exc:`OverflowError` on lengths larger " +"than :data:`sys.maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -"``len`` lève une :exc:`OverflowError` sur des longueurs supérieures à :data:" -"`sys.maxsize`, par exemple pour :class:`range(2 ** 100) `." +"``len`` lève une :exc:`OverflowError` sur des longueurs supérieures " +"à :data:`sys.maxsize`, par exemple pour :class:`range(2 ** 100) `." -#: library/functions.rst:1144 +#: library/functions.rst:1186 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." msgstr "" "Contrairement aux apparences, :class:`list` n'est pas une fonction mais un " -"type séquentiel mutable, comme décrit dans :ref:`typesseq-list` et :ref:" -"`typesseq`." +"type séquentiel mutable, comme décrit dans :ref:`typesseq-list` " +"et :ref:`typesseq`." -#: library/functions.rst:1150 +#: library/functions.rst:1192 msgid "" "Return a mapping object representing the current local symbol table, with " "variable names as the keys, and their currently bound references as the " "values." msgstr "" -#: library/functions.rst:1154 +#: library/functions.rst:1196 msgid "" "At module scope, as well as when using :func:`exec` or :func:`eval` with a " -"single namespace, this function returns the same namespace as :func:" -"`globals`." +"single namespace, this function returns the same namespace " +"as :func:`globals`." msgstr "" -#: library/functions.rst:1158 +#: library/functions.rst:1200 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." msgstr "" -#: library/functions.rst:1161 +#: library/functions.rst:1203 msgid "" "When using ``exec()`` or ``eval()`` with separate local and global " "arguments, it returns the local namespace passed in to the function call." msgstr "" -#: library/functions.rst:1164 +#: library/functions.rst:1206 msgid "" "In all of the above cases, each call to ``locals()`` in a given frame of " "execution will return the *same* mapping object. Changes made through the " @@ -2114,7 +2205,7 @@ msgid "" "returned mapping object." msgstr "" -#: library/functions.rst:1171 +#: library/functions.rst:1213 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -2126,7 +2217,7 @@ msgid "" "previously returned dictionaries." msgstr "" -#: library/functions.rst:1180 +#: library/functions.rst:1222 msgid "" "Calling ``locals()`` as part of a comprehension in a function, generator, or " "coroutine is equivalent to calling it in the containing scope, except that " @@ -2135,45 +2226,54 @@ msgid "" "function." msgstr "" -#: library/functions.rst:1186 +#: library/functions.rst:1228 msgid "" "Calling ``locals()`` as part of a generator expression is equivalent to " "calling it in a nested generator function." msgstr "" -#: library/functions.rst:1189 +#: library/functions.rst:1231 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." msgstr "" -#: library/functions.rst:1193 +#: library/functions.rst:1235 msgid "" "As part of :pep:`667`, the semantics of mutating the mapping objects " -"returned from this function are now defined. The behavior in :term:" -"`optimized scopes ` is now as described above. Aside from " -"being defined, the behaviour in other scopes remains unchanged from previous " -"versions." +"returned from this function are now defined. The behavior " +"in :term:`optimized scopes ` is now as described above. " +"Aside from being defined, the behaviour in other scopes remains unchanged " +"from previous versions." msgstr "" -#: library/functions.rst:1203 +#: library/functions.rst:1245 +#, fuzzy msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " "*function* must take that many arguments and is applied to the items from " "all iterables in parallel. With multiple iterables, the iterator stops when " -"the shortest iterable is exhausted. For cases where the function inputs are " -"already arranged into argument tuples, see :func:`itertools.starmap`\\." +"the shortest iterable is exhausted. If *strict* is ``True`` and one of the " +"iterables is exhausted before the others, a :exc:`ValueError` is raised. For " +"cases where the function inputs are already arranged into argument tuples, " +"see :func:`itertools.starmap`." msgstr "" "Renvoie un itérateur appliquant *function* à chaque élément de *iterable*, " "et donnant ses résultats au fur et à mesure avec ``yield``. Si d'autres " "*iterables* sont fournis, *function* doit prendre autant d'arguments, et est " "appelée avec les éléments de tous les itérables en parallèle. Avec plusieurs " "itérables, l'itération s'arrête avec l'itérable le plus court. Pour les cas " -"où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" -"`itertools.starmap`." +"où les arguments sont déjà rangés sous forme de *n*-uplets, " +"voir :func:`itertools.starmap`." -#: library/functions.rst:1215 +# suit un : +#: library/functions.rst:1254 +#, fuzzy +msgid "Added the *strict* parameter." +msgstr "ajout du paramètre *closure*." + +#: library/functions.rst:1262 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -2181,7 +2281,7 @@ msgstr "" "Renvoie le plus grand élément d'un itérable, ou l'argument le plus grand " "parmi au moins deux arguments." -#: library/functions.rst:1218 +#: library/functions.rst:1265 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -2192,26 +2292,26 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:1261 +#: library/functions.rst:1308 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " "*default* argument specifies an object to return if the provided iterable is " -"empty. If the iterable is empty and *default* is not provided, a :exc:" -"`ValueError` is raised." +"empty. If the iterable is empty and *default* is not provided, " +"a :exc:`ValueError` is raised." msgstr "" "Elle accepte deux arguments nommés optionnels. L'argument *key* spécifie une " "fonction à un argument permettant de trier comme pour :meth:`list.sort`. " "L'argument *default* fournit quant à lui un objet à donner si l'itérable " -"fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" -"exc:`ValueError` est levée." +"fourni est vide. Si l'itérable est vide et que *default* n'est pas " +"fourni, :exc:`ValueError` est levée." -#: library/functions.rst:1229 +#: library/functions.rst:1276 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " -"such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and ``heapq." -"nlargest(1, iterable, key=keyfunc)``." +"such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and " +"``heapq.nlargest(1, iterable, key=keyfunc)``." msgstr "" "Si plusieurs éléments représentent la plus grande valeur, le premier " "rencontré est renvoyé. C'est cohérent avec d'autres outils préservant une " @@ -2219,25 +2319,25 @@ msgstr "" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." # suit un : -#: library/functions.rst:1272 +#: library/functions.rst:1319 #, fuzzy msgid "Added the *default* keyword-only parameter." msgstr "l'argument nommé (et seulement donné par son nom) *default*." # suit un : -#: library/functions.rst:1275 +#: library/functions.rst:1322 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:1245 +#: library/functions.rst:1292 msgid "" -"Return a \"memory view\" object created from the given argument. See :ref:" -"`typememoryview` for more information." +"Return a \"memory view\" object created from the given argument. " +"See :ref:`typememoryview` for more information." msgstr "" -"Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" -"ref:`typememoryview` pour plus d'informations." +"Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. " +"Voir :ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:1253 +#: library/functions.rst:1300 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -2245,7 +2345,7 @@ msgstr "" "Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " "arguments." -#: library/functions.rst:1256 +#: library/functions.rst:1303 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -2255,7 +2355,7 @@ msgstr "" "plus petit élément de l'itérable est renvoyé. Si au moins deux arguments " "positionnels sont fournis, le plus petit argument positionnel est renvoyé." -#: library/functions.rst:1267 +#: library/functions.rst:1314 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -2264,20 +2364,21 @@ msgid "" msgstr "" "Si plusieurs éléments sont minimaux, la fonction renvoie le premier " "rencontré. C'est cohérent avec d'autres outils préservant une stabilité lors " -"du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." -"nsmallest(1, iterable, key=keyfunc)``." +"du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et " +"``heapq.nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1282 +#: library/functions.rst:1329 msgid "" -"Retrieve the next item from the :term:`iterator` by calling its :meth:" -"`~iterator.__next__` method. If *default* is given, it is returned if the " -"iterator is exhausted, otherwise :exc:`StopIteration` is raised." +"Retrieve the next item from the :term:`iterator` by calling " +"its :meth:`~iterator.__next__` method. If *default* is given, it is " +"returned if the iterator is exhausted, otherwise :exc:`StopIteration` is " +"raised." msgstr "" "Donne l'élément suivant de l':term:`itérateur ` en appelant sa " "méthode :meth:`~iterator.__next__`. Si *default* est fourni, il est renvoyé " "quand l'itérateur est épuisé, sinon une :exc:`StopIteration` est levée." -#: library/functions.rst:1289 +#: library/functions.rst:1336 #, fuzzy msgid "" "This is the ultimate base class of all other classes. It has methods that " @@ -2289,29 +2390,30 @@ msgstr "" "classes. Elle possède des méthodes communes à toutes les instances de " "classes en Python. Cette fonction n'accepte aucun argument." -#: library/functions.rst:1296 +#: library/functions.rst:1343 #, fuzzy msgid "" ":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " "so you can't assign arbitrary attributes to an instance of :class:`object`." msgstr "" ":class:`object` n'a *pas* d'attribut :attr:`~object.__dict__`, vous ne " -"pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" -"`object`." +"pouvez donc pas assigner d'attributs arbitraires à une instance " +"d':class:`object`." -#: library/functions.rst:1303 +#: library/functions.rst:1350 +#, fuzzy msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " -"result is a valid Python expression. If *x* is not a Python :class:`int` " -"object, it has to define an :meth:`~object.__index__` method that returns an " -"integer. For example:" +"result is a valid Python expression. If *integer* is not a " +"Python :class:`int` object, it has to define an :meth:`~object.__index__` " +"method that returns an integer. For example:" msgstr "" "Convertit un entier en sa représentation octale dans une chaîne préfixée de " "\"0o\". Le résultat est une expression Python valide. Si *x* n'est pas un " "objet :class:`int`, il doit définir une méthode :meth:`~object.__index__` " "qui donne un entier, par exemple :" -#: library/functions.rst:1313 +#: library/functions.rst:1360 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." @@ -2319,17 +2421,17 @@ msgstr "" "Si vous voulez convertir un nombre entier en une chaîne octale, avec ou sans " "le préfixe ``0o``, vous pouvez utiliser l'une des méthodes suivantes." -#: library/functions.rst:1330 +#: library/functions.rst:1377 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " "examples of how to use this function." msgstr "" "Ouvre *file* et donne un :term:`objet fichier ` correspondant. " -"Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. Voir :" -"ref:`tut-files` pour plus d'exemples d'utilisation de cette fonction." +"Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. " +"Voir :ref:`tut-files` pour plus d'exemples d'utilisation de cette fonction." -#: library/functions.rst:1334 +#: library/functions.rst:1381 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -2343,7 +2445,7 @@ msgstr "" "descripteur de fichier est donné, il sera fermé en même temps que l'objet " "d'entrée-sortie renvoyé, sauf si *closefd* est mis à ``False``)." -#: library/functions.rst:1340 +#: library/functions.rst:1387 #, fuzzy msgid "" "*mode* is an optional string that specifies the mode in which the file is " @@ -2352,10 +2454,10 @@ msgid "" "already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending " "(which on *some* Unix systems, means that *all* writes append to the end of " "the file regardless of the current seek position). In text mode, if " -"*encoding* is not specified the encoding used is platform-dependent: :func:" -"`locale.getencoding` is called to get the current locale encoding. (For " -"reading and writing raw bytes use binary mode and leave *encoding* " -"unspecified.) The available modes are:" +"*encoding* is not specified the encoding used is platform-" +"dependent: :func:`locale.getencoding` is called to get the current locale " +"encoding. (For reading and writing raw bytes use binary mode and leave " +"*encoding* unspecified.) The available modes are:" msgstr "" "*mode* est une chaîne optionnelle permettant de spécifier dans quel mode le " "fichier est ouvert. Par défaut, *mode* vaut ``'r'`` qui signifie « ouvrir en " @@ -2370,71 +2472,71 @@ msgstr "" "régionaux (pour lire et écrire des octets bruts, utilisez le mode binaire " "sans préciser *encoding*). Les modes disponibles sont :" -#: library/functions.rst:1357 +#: library/functions.rst:1404 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1357 +#: library/functions.rst:1404 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1359 +#: library/functions.rst:1406 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1359 +#: library/functions.rst:1406 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1360 +#: library/functions.rst:1407 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1360 +#: library/functions.rst:1407 msgid "open for writing, truncating the file first" msgstr "ouvre en écriture, en effaçant le contenu du fichier" -#: library/functions.rst:1361 +#: library/functions.rst:1408 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1361 +#: library/functions.rst:1408 msgid "open for exclusive creation, failing if the file already exists" msgstr "ouvre pour une création exclusive, échouant si le fichier existe déjà" -#: library/functions.rst:1362 +#: library/functions.rst:1409 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1362 +#: library/functions.rst:1409 msgid "open for writing, appending to the end of file if it exists" msgstr "ouvre en écriture, ajoutant à la fin du fichier s'il existe" -#: library/functions.rst:1363 +#: library/functions.rst:1410 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1363 +#: library/functions.rst:1410 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1364 +#: library/functions.rst:1411 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1364 +#: library/functions.rst:1411 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1365 +#: library/functions.rst:1412 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1365 +#: library/functions.rst:1412 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1368 +#: library/functions.rst:1415 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2444,7 +2546,7 @@ msgstr "" "pour ``'rt'``). Les modes ``'w+'`` et ``'w+b'`` ouvrent et vident le " "fichier. Les modes ``'r+'`` et ``'r+b'`` ouvrent le fichier sans le vider." -#: library/functions.rst:1372 +#: library/functions.rst:1419 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2462,7 +2564,7 @@ msgstr "" "octets ayant été décodés au préalable en utilisant un encodage déduit de " "l'environnement ou *encoding* s'il est donné." -#: library/functions.rst:1382 +#: library/functions.rst:1429 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " @@ -2472,7 +2574,7 @@ msgstr "" "jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " "indépendant de la plate-forme." -#: library/functions.rst:1386 +#: library/functions.rst:1433 #, fuzzy msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " @@ -2493,36 +2595,38 @@ msgstr "" "tampon de cette manière s'applique aux entrées-sorties binaires avec tampon, " "mais que ``TextIOWrapper`` (c'est-à-dire, les fichiers ouverts avec " "``mode='r+'``) a un autre tampon. Pour désactiver la mise en mémoire tampon " -"dans ``TextIOWrapper``, utilisez le drapeau ``write_through`` de :func:`io." -"TextIOWrapper.reconfigure`. Sans l'argument *buffering*, les comportements " -"par défaut sont les suivants :" +"dans ``TextIOWrapper``, utilisez le drapeau ``write_through`` " +"de :func:`io.TextIOWrapper.reconfigure`. Sans l'argument *buffering*, les " +"comportements par défaut sont les suivants :" # énumération -#: library/functions.rst:1396 +#: library/functions.rst:1443 +#, fuzzy msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " -"chosen using a heuristic trying to determine the underlying device's \"block " -"size\" and falling back on :const:`io.DEFAULT_BUFFER_SIZE`. On many " -"systems, the buffer will typically be 4096 or 8192 bytes long." +"``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block " +"size is available. On most systems, the buffer will typically be 128 " +"kilobytes long." msgstr "" "les fichiers binaires sont mis dans un tampon de taille fixe, dont la taille " "est choisie par une heuristique essayant de déterminer la taille des blocs " -"du système sous-jacent, ou en utilisant par défaut :attr:`io." -"DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon est de 4096 ou " -"8192 octets ;" +"du système sous-jacent, ou en utilisant par " +"défaut :attr:`io.DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon " +"est de 4096 ou 8192 octets ;" # fin d'énumération -#: library/functions.rst:1401 +#: library/functions.rst:1448 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -"les fichiers texte « interactifs » (fichiers pour lesquels :meth:`io.IOBase." -"isatty` renvoie ``True``) utilisent un tampon ligne par ligne. Les autres " -"fichiers textes sont traités comme les fichiers binaires." +"les fichiers texte « interactifs » (fichiers pour " +"lesquels :meth:`io.IOBase.isatty` renvoie ``True``) utilisent un tampon " +"ligne par ligne. Les autres fichiers textes sont traités comme les fichiers " +"binaires." -#: library/functions.rst:1405 +#: library/functions.rst:1452 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2537,13 +2641,14 @@ msgstr "" "Python peut être utilisé. Voir :mod:`codecs` pour une liste des encodages " "pris en charge." -#: library/functions.rst:1411 +#: library/functions.rst:1458 +#, fuzzy msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " -"standard error handlers are available (listed under :ref:`error-handlers`), " -"though any error handling name that has been registered with :func:`codecs." -"register_error` is also valid. The standard names include:" +"standard error handlers are available, though any error handling name that " +"has been registered with :func:`codecs.register_error` is also valid. The " +"standard names can be found in :ref:`error-handlers`." msgstr "" "*errors* est une chaîne facultative spécifiant comment les erreurs " "d'encodage et de décodage sont gérées, ce n'est pas utilisable en mode " @@ -2552,73 +2657,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1419 -msgid "" -"``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " -"error. The default value of ``None`` has the same effect." -msgstr "" -"``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage est " -"rencontrée. La valeur par défaut, ``None``, a le même effet." - -#: library/functions.rst:1423 -msgid "" -"``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " -"data loss." -msgstr "" -"``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " -"peut mener à des pertes de données." - -#: library/functions.rst:1426 -msgid "" -"``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " -"where there is malformed data." -msgstr "" -"``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " -"des données mal formées." - -#: library/functions.rst:1429 -msgid "" -"``'surrogateescape'`` will represent any incorrect bytes as low surrogate " -"code units ranging from U+DC80 to U+DCFF. These surrogate code units will " -"then be turned back into the same bytes when the ``surrogateescape`` error " -"handler is used when writing data. This is useful for processing files in " -"an unknown encoding." -msgstr "" -"``'surrogateescape'`` représentera tous les octets incorrects comme des " -"points de code de substitution de l'intervalle bas U+DC80 à U+DCFF. Ces " -"points de code de substitution sont ensuite retransformés dans les mêmes " -"octets lorsque le gestionnaire d'erreurs ``surrogateescape`` est utilisé " -"pour l'écriture des données. C'est utile pour traiter des fichiers d'un " -"encodage inconnu." - -#: library/functions.rst:1436 -#, fuzzy -msgid "" -"``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " -"not supported by the encoding are replaced with the appropriate XML " -"character reference :samp:`&#{nnn};`." -msgstr "" -"``'xmlcharrefreplace'`` est seulement pris en charge à l'écriture vers un " -"fichier. Les caractères non gérés par l'encodage sont remplacés par une " -"entité XML de la forme ``&#nnn;``." - -#: library/functions.rst:1440 -msgid "" -"``'backslashreplace'`` replaces malformed data by Python's backslashed " -"escape sequences." -msgstr "" -"``'backslashreplace'`` remplace les données mal formées par des séquences " -"d'échappement Python (utilisant des barres obliques inverses)." - -#: library/functions.rst:1443 -msgid "" -"``'namereplace'`` (also only supported when writing) replaces unsupported " -"characters with ``\\N{...}`` escape sequences." -msgstr "" -"``'namereplace'`` (aussi supporté lors de l'écriture) remplace les " -"caractères non gérés par des séquences d'échappement ``\\N{...}``." - -#: library/functions.rst:1451 +#: library/functions.rst:1470 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " @@ -2628,7 +2667,7 @@ msgstr "" "``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " "suit :" -#: library/functions.rst:1455 +#: library/functions.rst:1474 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2646,13 +2685,13 @@ msgstr "" "valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " "qui est rendue telle quelle." -#: library/functions.rst:1463 +#: library/functions.rst:1482 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " -"characters written are translated to the system default line separator, :" -"data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no translation " -"takes place. If *newline* is any of the other legal values, any ``'\\n'`` " -"characters written are translated to the given string." +"characters written are translated to the system default line " +"separator, :data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no " +"translation takes place. If *newline* is any of the other legal values, any " +"``'\\n'`` characters written are translated to the given string." msgstr "" "Lors de l'écriture, si *newline* est ``None``, chaque ``'\\n'`` est remplacé " "par le séparateur de lignes par défaut du système :data:`os.linesep`. Si " @@ -2660,7 +2699,7 @@ msgstr "" "*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " "la chaîne donnée." -#: library/functions.rst:1469 +#: library/functions.rst:1488 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2672,7 +2711,7 @@ msgstr "" "le fichier sera fermé. Si un nom de fichier est donné, *closefd* doit rester " "``True`` (la valeur par défaut) ; sinon, une erreur est levée." -#: library/functions.rst:1474 +#: library/functions.rst:1493 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2686,57 +2725,58 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1480 +#: library/functions.rst:1499 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" "Il n'est :ref:`pas possible d'hériter du descripteur de fichier " "` nouvellement créé." -#: library/functions.rst:1482 +#: library/functions.rst:1501 msgid "" -"The following example uses the :ref:`dir_fd ` parameter of the :func:" -"`os.open` function to open a file relative to a given directory::" +"The following example uses the :ref:`dir_fd ` parameter of " +"the :func:`os.open` function to open a file relative to a given directory::" msgstr "" "L'exemple suivant utilise le paramètre :ref:`dir_fd ` de la " "fonction :func:`os.open` pour ouvrir un fichier relatif au dossier courant ::" -#: library/functions.rst:1495 +#: library/functions.rst:1514 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " -"mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of :" -"class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When used " -"to open a file in a binary mode with buffering, the returned class is a " +"mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass " +"of :class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When " +"used to open a file in a binary mode with buffering, the returned class is a " "subclass of :class:`io.BufferedIOBase`. The exact class varies: in read " "binary mode, it returns an :class:`io.BufferedReader`; in write binary and " "append binary modes, it returns an :class:`io.BufferedWriter`, and in read/" "write mode, it returns an :class:`io.BufferedRandom`. When buffering is " -"disabled, the raw stream, a subclass of :class:`io.RawIOBase`, :class:`io." -"FileIO`, is returned." -msgstr "" -"Le type d'\\ :term:`objet fichier ` renvoyé par la fonction :" -"func:`open` dépend du mode. Lorsque :func:`open` est utilisé pour ouvrir un " -"fichier en mode texte (``w``, ``r``, ``wt``, ``rt``, etc.), il renvoie une " -"classe fille de :class:`io.TextIOBase` (spécifiquement : :class:`io." -"TextIOWrapper`). Lors de l'ouverture d'un fichier en mode binaire avec " -"tampon, la classe renvoyée sera une fille de :class:`io.BufferedIOBase`. La " -"classe exacte varie : en lecture en mode binaire elle renvoie une :class:`io." -"BufferedReader`, en écriture et ajout en mode binaire c'est une :class:`io." -"BufferedWriter`, et en lecture-écriture, c'est une :class:`io." -"BufferedRandom`. Lorsque le tampon est désactivé, le flux brut, une classe " -"fille de :class:`io.RawIOBase`, :class:`io.FileIO` est renvoyée." - -#: library/functions.rst:1516 +"disabled, the raw stream, a subclass " +"of :class:`io.RawIOBase`, :class:`io.FileIO`, is returned." +msgstr "" +"Le type d'\\ :term:`objet fichier ` renvoyé par la " +"fonction :func:`open` dépend du mode. Lorsque :func:`open` est utilisé pour " +"ouvrir un fichier en mode texte (``w``, ``r``, ``wt``, ``rt``, etc.), il " +"renvoie une classe fille de :class:`io.TextIOBase` " +"(spécifiquement : :class:`io.TextIOWrapper`). Lors de l'ouverture d'un " +"fichier en mode binaire avec tampon, la classe renvoyée sera une fille " +"de :class:`io.BufferedIOBase`. La classe exacte varie : en lecture en mode " +"binaire elle renvoie une :class:`io.BufferedReader`, en écriture et ajout en " +"mode binaire c'est une :class:`io.BufferedWriter`, et en lecture-écriture, " +"c'est une :class:`io.BufferedRandom`. Lorsque le tampon est désactivé, le " +"flux brut, une classe fille de :class:`io.RawIOBase`, :class:`io.FileIO` est " +"renvoyée." + +#: library/functions.rst:1535 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " -"(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" -"`tempfile`, and :mod:`shutil`." +"(where :func:`open` is " +"declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, and :mod:`shutil`." msgstr "" -"Consultez aussi les modules de gestion de fichiers tels que :mod:" -"`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." -"path`, :mod:`tempfile`, et :mod:`shutil`." +"Consultez aussi les modules de gestion de fichiers tels " +"que :mod:`fileinput`, :mod:`io` (où :func:`open` est " +"déclarée), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, et :mod:`shutil`." -#: library/functions.rst:1520 +#: library/functions.rst:1539 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " @@ -2745,7 +2785,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``open`` avec les arguments " "``file``, ``mode`` et ``flags``." -#: library/functions.rst:1522 +#: library/functions.rst:1541 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2754,22 +2794,22 @@ msgstr "" "l'appel original." # suit un : -#: library/functions.rst:1527 +#: library/functions.rst:1546 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." # suit un : -#: library/functions.rst:1528 +#: library/functions.rst:1547 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1529 +#: library/functions.rst:1548 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" -"`OSError`." +":exc:`IOError` était normalement levée, elle est maintenant un alias " +"de :exc:`OSError`." -#: library/functions.rst:1530 +#: library/functions.rst:1549 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2777,56 +2817,68 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1535 +#: library/functions.rst:1554 msgid "The file is now non-inheritable." msgstr "Il n'est plus possible d'hériter de *file*." -#: library/functions.rst:1539 +#: library/functions.rst:1558 msgid "" "If the system call is interrupted and the signal handler does not raise an " -"exception, the function now retries the system call instead of raising an :" -"exc:`InterruptedError` exception (see :pep:`475` for the rationale)." +"exception, the function now retries the system call instead of raising " +"an :exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" "Si l'appel système est interrompu et que le gestionnaire de signal ne lève " -"aucune exception, la fonction réessaye l'appel système au lieu de lever une :" -"exc:`InterruptedError` (voir la :pep:`475` pour la justification)." +"aucune exception, la fonction réessaye l'appel système au lieu de lever " +"une :exc:`InterruptedError` (voir la :pep:`475` pour la justification)." # suit un : -#: library/functions.rst:1542 +#: library/functions.rst:1561 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." # suit un : -#: library/functions.rst:1546 +#: library/functions.rst:1565 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "prise en charge des objets implémentant :class:`os.PathLike`." -#: library/functions.rst:1547 +#: library/functions.rst:1566 msgid "" -"On Windows, opening a console buffer may return a subclass of :class:`io." -"RawIOBase` other than :class:`io.FileIO`." +"On Windows, opening a console buffer may return a subclass " +"of :class:`io.RawIOBase` other than :class:`io.FileIO`." msgstr "" "Sous Windows, ouvrir un *buffer* du terminal peut renvoyer une sous-classe " "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." # suit un : -#: library/functions.rst:1550 +#: library/functions.rst:1569 msgid "The ``'U'`` mode has been removed." msgstr "le mode ``'U``` a été enlevé." -#: library/functions.rst:1555 +#: library/functions.rst:1574 +msgid "Return the ordinal value of a character." +msgstr "" + +#: library/functions.rst:1576 +#, fuzzy msgid "" -"Given a string representing one Unicode character, return an integer " -"representing the Unicode code point of that character. For example, " -"``ord('a')`` returns the integer ``97`` and ``ord('€')`` (Euro sign) returns " -"``8364``. This is the inverse of :func:`chr`." +"If the argument is a one-character string, return the Unicode code point of " +"that character. For example, ``ord('a')`` returns the integer ``97`` and " +"``ord('€')`` (Euro sign) returns ``8364``. This is the inverse " +"of :func:`chr`." msgstr "" "Renvoie le nombre entier représentant le code Unicode du caractère " "représenté par la chaîne donnée. Par exemple, ``ord('a')`` renvoie le nombre " "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "la réciproque de :func:`chr`." -#: library/functions.rst:1563 +#: library/functions.rst:1581 +msgid "" +"If the argument is a :class:`bytes` or :class:`bytearray` object of length " +"1, return its single byte value. For example, ``ord(b'a')`` returns the " +"integer ``97``." +msgstr "" + +#: library/functions.rst:1588 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2838,10 +2890,10 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1568 +#: library/functions.rst:1593 #, fuzzy msgid "" -"The arguments must have numeric types. With mixed operand types, the " +"When arguments are builtin numeric types with mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " "operands, the result has the same type as the operands (after coercion) " "unless the second argument is negative; in that case, all arguments are " @@ -2849,22 +2901,22 @@ msgid "" "2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " "base of type :class:`int` or :class:`float` and a non-integral exponent, a " "complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " -"close to ``3j``. Whereas, for a negative base of type :class:`int` or :class:" -"`float` with an integral exponent, a float result is delivered. For example, " -"``pow(-9, 2.0)`` returns ``81.0``." +"close to ``3j``. Whereas, for a negative base of type :class:`int` " +"or :class:`float` with an integral exponent, a float result is delivered. " +"For example, ``pow(-9, 2.0)`` returns ``81.0``." msgstr "" "Les arguments doivent être de types numériques. Avec des opérandes de " "différents types, les mêmes règles de coercition que celles des opérateurs " -"arithmétiques binaires s'appliquent. Pour des opérandes de type :class:" -"`int`, le résultat sera de même type que les opérandes (après coercition) " -"sauf si le second argument est négatif, dans ce cas, les arguments sont " -"convertis en ``float``, et le résultat sera un ``float`` aussi. Par exemple, " -"``pow(10, 2)`` donne ``100``, alors que ``pow(10, -2)`` donne ``0.01``. Pour " -"une base négative de type :class:`int` ou :class:`float` et un exposant non " -"entier, le résultat est complexe. Par exemple, ``pow(-9, 0.5)`` renvoie une " -"valeur proche de ``3j``." +"arithmétiques binaires s'appliquent. Pour des opérandes de " +"type :class:`int`, le résultat sera de même type que les opérandes (après " +"coercition) sauf si le second argument est négatif, dans ce cas, les " +"arguments sont convertis en ``float``, et le résultat sera un ``float`` " +"aussi. Par exemple, ``pow(10, 2)`` donne ``100``, alors que ``pow(10, -2)`` " +"donne ``0.01``. Pour une base négative de type :class:`int` " +"ou :class:`float` et un exposant non entier, le résultat est complexe. Par " +"exemple, ``pow(-9, 0.5)`` renvoie une valeur proche de ``3j``." -#: library/functions.rst:1580 +#: library/functions.rst:1605 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2878,12 +2930,12 @@ msgstr "" "être premiers entre eux. Dans ce cas, ``pow(inv_base, -exp, mod)`` est " "renvoyé, où *inv_base* est un inverse de *base* modulo *mod*." -#: library/functions.rst:1586 +#: library/functions.rst:1611 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "Voici un exemple de calcul d'un inverse de ``38`` modulo ``97`` ::" # suit un : -#: library/functions.rst:1593 +#: library/functions.rst:1618 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." @@ -2893,14 +2945,14 @@ msgstr "" "des inverses modulaires." # suit un : -#: library/functions.rst:1598 +#: library/functions.rst:1623 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" "autorise les arguments nommés. Auparavant, seuls les arguments positionnels " "étaient autorisés." -#: library/functions.rst:1605 +#: library/functions.rst:1630 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " @@ -2910,7 +2962,7 @@ msgstr "" "*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " "doivent être passés en arguments nommés." -#: library/functions.rst:1609 +#: library/functions.rst:1634 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2918,13 +2970,13 @@ msgid "" "default values. If no *objects* are given, :func:`print` will just write " "*end*." msgstr "" -"Tous les arguments positionnels sont convertis en chaîne comme le fait :func:" -"`str`, puis écrits sur le flux, séparés par *sep* et terminés par *end*. " -"*sep* et *end* doivent être des chaînes, ou ``None``, indiquant de prendre " -"les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écrit " -"seulement *end*." +"Tous les arguments positionnels sont convertis en chaîne comme le " +"fait :func:`str`, puis écrits sur le flux, séparés par *sep* et terminés par " +"*end*. *sep* et *end* doivent être des chaînes, ou ``None``, indiquant de " +"prendre les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` " +"écrit seulement *end*." -#: library/functions.rst:1615 +#: library/functions.rst:1640 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2937,7 +2989,7 @@ msgstr "" "peut pas être utilisée avec des fichiers ouverts en mode binaire. Pour ceux-" "ci utilisez plutôt ``file.write(...)``." -#: library/functions.rst:1620 +#: library/functions.rst:1645 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." @@ -2946,15 +2998,15 @@ msgstr "" "Cependant, si l'argument *flush* est vrai, le tampon du flux est vidé " "explicitement." -#: library/functions.rst:1624 +#: library/functions.rst:1649 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1630 +#: library/functions.rst:1655 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1632 +#: library/functions.rst:1657 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " @@ -2965,11 +3017,11 @@ msgstr "" "supprimer la valeur d'un attribut, et *doc* crée une chaîne de documentation " "(*docstring*) pour l'attribut." -#: library/functions.rst:1636 +#: library/functions.rst:1661 msgid "A typical use is to define a managed attribute ``x``::" msgstr "Une utilisation courante est de définir un attribut managé ``x`` ::" -#: library/functions.rst:1653 +#: library/functions.rst:1678 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." @@ -2978,19 +3030,19 @@ msgstr "" "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1656 +#: library/functions.rst:1681 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " -"possible to create read-only properties easily using :func:`property` as a :" -"term:`decorator`::" +"possible to create read-only properties easily using :func:`property` as " +"a :term:`decorator`::" msgstr "" "Si elle est fournie, *doc* est la chaîne de documentation de l'attribut. " "Autrement la propriété copie celle de *fget* (si elle existe). Cela rend " -"possible la création de propriétés en lecture seule en utilisant simplement :" -"func:`property` comme :term:`décorateur ` ::" +"possible la création de propriétés en lecture seule en utilisant " +"simplement :func:`property` comme :term:`décorateur ` ::" -#: library/functions.rst:1669 +#: library/functions.rst:1694 #, fuzzy msgid "" "The ``@property`` decorator turns the :meth:`!voltage` method into a " @@ -3001,7 +3053,7 @@ msgstr "" "accesseur de l'attribut du même nom, et donne *\"Get the current voltage\"* " "comme chaîne de documentation de *voltage*." -#: library/functions.rst:1677 +#: library/functions.rst:1702 #, fuzzy msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " @@ -3009,12 +3061,13 @@ msgid "" "accessor function set to the decorated function. This is best explained " "with an example:" msgstr "" -"Un objet propriété a les méthodes :attr:`~property.getter`, :attr:`~property." -"setter` et :attr:`~property.deleter` utilisables comme décorateurs créant " -"une copie de la propriété avec les accesseurs correspondants définis par la " -"fonction de décoration. C'est plus clair avec un exemple ::" +"Un objet propriété a les " +"méthodes :attr:`~property.getter`, :attr:`~property.setter` " +"et :attr:`~property.deleter` utilisables comme décorateurs créant une copie " +"de la propriété avec les accesseurs correspondants définis par la fonction " +"de décoration. C'est plus clair avec un exemple ::" -#: library/functions.rst:1701 +#: library/functions.rst:1726 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " @@ -3024,7 +3077,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1705 +#: library/functions.rst:1730 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -3033,28 +3086,28 @@ msgstr "" "``fdel`` correspondants aux arguments du constructeur." # suit un : -#: library/functions.rst:1708 +#: library/functions.rst:1733 msgid "The docstrings of property objects are now writeable." msgstr "" "les chaînes de documentation des objets *property* sont maintenant en " "lecture-écriture." -#: library/functions.rst:1713 +#: library/functions.rst:1738 msgid "" "Attribute holding the name of the property. The name of the property can be " "changed at runtime." msgstr "" -#: library/functions.rst:1724 +#: library/functions.rst:1749 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" "Contrairement aux apparences, :class:`range` n'est pas une fonction mais un " -"type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" -"`typesseq`." +"type de séquence immuable, comme décrit dans :ref:`typesseq-range` " +"et :ref:`typesseq`." -#: library/functions.rst:1730 +#: library/functions.rst:1755 #, fuzzy msgid "" "Return a string containing a printable representation of an object. For " @@ -3073,28 +3126,28 @@ msgstr "" "valeur ; sinon la représentation sera une chaîne entourée de chevrons " "contenant le nom du type et quelques informations supplémentaires, souvent " "le nom et l'adresse de l'objet. Une classe peut contrôler ce que cette " -"fonction renvoie pour ses instances en définissant une méthode :meth:" -"`__repr__`. Si :func:`sys.displayhook` n'est pas accessible, cette fonction " -"lève une :exc:`RuntimeError`." +"fonction renvoie pour ses instances en définissant une " +"méthode :meth:`__repr__`. Si :func:`sys.displayhook` n'est pas accessible, " +"cette fonction lève une :exc:`RuntimeError`." -#: library/functions.rst:1741 +#: library/functions.rst:1766 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: library/functions.rst:1754 +#: library/functions.rst:1779 #, fuzzy msgid "" -"Return a reverse :term:`iterator`. *seq* must be an object which has a :" -"meth:`~object.__reversed__` method or supports the sequence protocol (the :" -"meth:`~object.__len__` method and the :meth:`~object.__getitem__` method " -"with integer arguments starting at ``0``)." +"Return a reverse :term:`iterator`. The argument must be an object which has " +"a :meth:`~object.__reversed__` method or supports the sequence protocol " +"(the :meth:`~object.__len__` method and the :meth:`~object.__getitem__` " +"method with integer arguments starting at ``0``)." msgstr "" "Renvoie un :term:`itérateur ` inversé. *seq* doit être un objet " "ayant une méthode :meth:`__reverse__` ou prenant en charge le protocole " "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1762 +#: library/functions.rst:1787 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " @@ -3104,7 +3157,7 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1766 +#: library/functions.rst:1791 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -3122,16 +3175,16 @@ msgstr "" "zéro, ou négatif). La valeur renvoyée est un entier si *ndigits* n'est pas " "donné (ou est ``None``). Sinon elle est du même type que *number*." -#: library/functions.rst:1775 +#: library/functions.rst:1800 msgid "" -"For a general Python object ``number``, ``round`` delegates to ``number." -"__round__``." +"For a general Python object ``number``, ``round`` delegates to " +"``number.__round__``." msgstr "" -"Pour tout autre objet Python ``number``, ``round`` délègue à ``number." -"__round__``." +"Pour tout autre objet Python ``number``, ``round`` délègue à " +"``number.__round__``." # suit un : -#: library/functions.rst:1780 +#: library/functions.rst:1805 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -3145,26 +3198,27 @@ msgstr "" "fractions de décimaux ne peuvent pas être représentés exactement en nombre a " "virgule flottante. Voir :ref:`tut-fp-issues` pour plus d'information." -#: library/functions.rst:1792 +#: library/functions.rst:1816 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" "Renvoie un nouvel :class:`ensemble `, dont les éléments sont extraits " -"d'*iterable* s'il est fourni. ``set`` est une classe native. Voir :class:" -"`set` et :ref:`types-set` pour la documentation de cette classe." +"d'*iterable* s'il est fourni. ``set`` est une classe native. " +"Voir :class:`set` et :ref:`types-set` pour la documentation de cette classe." -#: library/functions.rst:1796 +#: library/functions.rst:1820 msgid "" -"For other containers see the built-in :class:`frozenset`, :class:`list`, :" -"class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " -"module." +"For other containers see the built-" +"in :class:`frozenset`, :class:`list`, :class:`tuple`, and :class:`dict` " +"classes, as well as the :mod:`collections` module." msgstr "" -"D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" -"class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." +"D'autres conteneurs existent, " +"comme : :class:`frozenset`, :class:`list`, :class:`tuple`, et :class:`dict`, " +"ainsi que le module :mod:`collections`." -#: library/functions.rst:1803 +#: library/functions.rst:1827 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -3178,23 +3232,23 @@ msgstr "" "l'attribut, si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', " "123)`` équivaut à ``x.foobar = 123``." -#: library/functions.rst:1809 +#: library/functions.rst:1833 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " -"unless the object chooses to enforce that, for example in a custom :meth:" -"`~object.__getattribute__` or via :attr:`~object.__slots__`. An attribute " -"whose name is not an identifier will not be accessible using the dot " -"notation, but is accessible through :func:`getattr` etc.." -msgstr "" -"*name* n'a pas besoin d'être un identifiant Python tel que défini dans :ref:" -"`identifiers` sauf si l'objet choisit de l'imposer, par exemple en " -"personnalisant :meth:`~object.__getattribute__` ou *via* :attr:`~object." -"__slots__`. Un attribut dont le nom n'est pas un identifiant ne sera pas " -"accessible en utilisant la notation pointée, mais est accessible *via* :func:" -"`getattr` etc." +"unless the object chooses to enforce that, for example in a " +"custom :meth:`~object.__getattribute__` or via :attr:`~object.__slots__`. An " +"attribute whose name is not an identifier will not be accessible using the " +"dot notation, but is accessible through :func:`getattr` etc.." +msgstr "" +"*name* n'a pas besoin d'être un identifiant Python tel que défini " +"dans :ref:`identifiers` sauf si l'objet choisit de l'imposer, par exemple en " +"personnalisant :meth:`~object.__getattribute__` ou " +"*via* :attr:`~object.__slots__`. Un attribut dont le nom n'est pas un " +"identifiant ne sera pas accessible en utilisant la notation pointée, mais " +"est accessible *via* :func:`getattr` etc." # suit un : -#: library/functions.rst:1817 +#: library/functions.rst:1841 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -3205,57 +3259,128 @@ msgstr "" "manuellement le nom d'un attribut privé (attributs avec deux traits de " "soulignement en tête) afin de le définir avec :func:`setattr`." -#: library/functions.rst:1826 +#: library/functions.rst:1849 +msgid "" +"Return a new unique sentinel object. *name* must be a :class:`str`, and is " +"used by default as the returned object's representation::" +msgstr "" + +#: library/functions.rst:1856 +#, fuzzy +msgid "" +"The optional *repr* argument can be used to specify a different " +"representation::" +msgstr "" +"Le paramètre optionnel *source* peut être utilisé pour initialiser le " +"tableau de plusieurs façons :" + +#: library/functions.rst:1862 +msgid "" +"Sentinel objects are truthy and compare equal only to themselves. They are " +"intended to be compared with the :keyword:`is` operator." +msgstr "" + +#: library/functions.rst:1865 +msgid "``sentinel`` does not support subclassing." +msgstr "" + +#: library/functions.rst:1867 +msgid "Shallow and deep copies of a sentinel object return the object itself." +msgstr "" + +#: library/functions.rst:1869 +msgid "" +"Sentinels are conventionally assigned to a variable with a matching name. " +"Sentinels defined in this way can be used in :term:`type hints `::" +msgstr "" + +#: library/functions.rst:1877 +msgid "" +"Sentinel objects support the :ref:`| ` operator for use in type " +"expressions." +msgstr "" + +#: library/functions.rst:1879 +msgid "" +":mod:`Pickling ` is supported for sentinel objects that are placed " +"in the global scope of a module under a name matching the sentinel's name, " +"and for sentinels placed in class scopes with a name matching " +"the :term:`qualified name` of the sentinel. Other sentinels, such as those " +"defined in a function scope, are not picklable. The identity of the sentinel " +"is preserved after pickling::" +msgstr "" + +#: library/functions.rst:1897 +msgid "Sentinel objects have the following attributes:" +msgstr "" + +#: library/functions.rst:1901 +msgid "The sentinel's name." +msgstr "" + +#: library/functions.rst:1905 +msgid "" +"The name of the module where the sentinel was created. This attribute is " +"writable." +msgstr "" + +#: library/functions.rst:1913 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``." msgstr "" -#: library/functions.rst:1834 +#: library/functions.rst:1917 msgid "" -"Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " -"and :attr:`!step` which merely return the argument values (or their " -"default). They have no other explicit functionality; however, they are used " -"by NumPy and other third-party packages." +"Slice objects are also generated when :ref:`slicing syntax ` is " +"used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." +msgstr "" + +#: library/functions.rst:1920 +msgid "" +"See :func:`itertools.islice` for an alternate version that returns " +"an :term:`iterator`." msgstr "" -#: library/functions.rst:1839 +#: library/functions.rst:1927 msgid "" -"Slice objects are also generated when extended indexing syntax is used. For " -"example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:" -"`itertools.islice` for an alternate version that returns an :term:`iterator`." +"These read-only attributes are set to the argument values (or their " +"default). They have no other explicit functionality; however, they are used " +"by NumPy and other third-party packages." msgstr "" -#: library/functions.rst:1844 +#: library/functions.rst:1931 msgid "" -"Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" -"`~slice.stop`, and :attr:`~slice.step` are hashable)." +"Slice objects are now :term:`hashable` " +"(provided :attr:`~slice.start`, :attr:`~slice.stop`, and :attr:`~slice.step` " +"are hashable)." msgstr "" -#: library/functions.rst:1850 +#: library/functions.rst:1937 msgid "Return a new sorted list from the items in *iterable*." msgstr "Renvoie une nouvelle liste triée depuis les éléments d'*iterable*." -#: library/functions.rst:1852 +#: library/functions.rst:1939 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "" "Possède deux arguments optionnels qui doivent être spécifiés par arguments " "nommés." -#: library/functions.rst:1854 +#: library/functions.rst:1941 msgid "" "*key* specifies a function of one argument that is used to extract a " -"comparison key from each element in *iterable* (for example, ``key=str." -"lower``). The default value is ``None`` (compare the elements directly)." +"comparison key from each element in *iterable* (for example, " +"``key=str.lower``). The default value is ``None`` (compare the elements " +"directly)." msgstr "" "*key* spécifie une fonction à un argument utilisée pour extraire une clé de " -"comparaison de chaque élément de l'itérable (par exemple, ``key=str." -"lower``). La valeur par défaut est ``None`` (compare les éléments " +"comparaison de chaque élément de l'itérable (par exemple, " +"``key=str.lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1858 +#: library/functions.rst:1945 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -3263,7 +3388,7 @@ msgstr "" "*reverse* est une valeur booléenne. Si elle est ``True``, la liste " "d'éléments est triée comme si toutes les comparaisons étaient inversées." -#: library/functions.rst:1861 +#: library/functions.rst:1948 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -3271,7 +3396,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1864 +#: library/functions.rst:1951 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -3283,7 +3408,8 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par direction " "puis par salaire)." -#: library/functions.rst:1869 +#: library/functions.rst:1956 +#, fuzzy msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -3291,7 +3417,7 @@ msgid "" "implemented. This will help avoid bugs when using the same data with other " "ordering tools such as :func:`max` that rely on a different underlying " "method. Implementing all six comparisons also helps avoid confusion for " -"mixed type comparisons which can call reflected the :meth:`~object.__gt__` " +"mixed type comparisons which can call the reflected :meth:`~object.__gt__` " "method." msgstr "" "L'algorithme de tri utilise uniquement l'opérateur ``<`` pour comparer les " @@ -3304,17 +3430,17 @@ msgstr "" "confusion lors de comparaisons de types mixtes qui peuvent appeler la " "méthode :meth:`~object.__gt__`." -#: library/functions.rst:1878 +#: library/functions.rst:1965 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`." -#: library/functions.rst:1882 +#: library/functions.rst:1969 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1884 +#: library/functions.rst:1971 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -3322,27 +3448,27 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voici " "comment déclarer une méthode statique ::" -#: library/functions.rst:1891 +#: library/functions.rst:1978 msgid "" -"The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" -"`function` for details." +"The ``@staticmethod`` form is a function :term:`decorator` -- " +"see :ref:`function` for details." msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1894 +#: library/functions.rst:1981 #, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " -"an instance (such as ``C().f()``). Moreover, the static method :term:" -"`descriptor` is also callable, so it can be used in the class definition " -"(such as ``f()``)." +"an instance (such as ``C().f()``). Moreover, the static " +"method :term:`descriptor` is also callable, so it can be used in the class " +"definition (such as ``f()``)." msgstr "" -"Une méthode statique peut être appelée sur une classe (par exemple, ``C." -"f()``) comme sur une instance (par exemple, ``C().f()``). De plus, elles " +"Une méthode statique peut être appelée sur une classe (par exemple, " +"``C.f()``) comme sur une instance (par exemple, ``C().f()``). De plus, elles " "peuvent être appelées comme des fonctions habituelles (comme ``f()``)." -#: library/functions.rst:1899 +#: library/functions.rst:1986 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " @@ -3352,7 +3478,7 @@ msgstr "" "Java ou en C++. Consultez :func:`classmethod` pour une variante utile " "permettant de créer des constructeurs alternatifs." -#: library/functions.rst:1903 +#: library/functions.rst:1990 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -3366,33 +3492,33 @@ msgstr "" "depuis le corps d'une classe, et voulez éviter sa transformation en méthode " "d'instance. Dans ce cas, faites comme suit ::" -#: library/functions.rst:1915 +#: library/functions.rst:2002 msgid "For more information on static methods, see :ref:`types`." msgstr "" "Pour plus d'informations sur les méthodes statiques, consultez :ref:`types`." # suit un : -#: library/functions.rst:1917 +#: library/functions.rst:2004 #, fuzzy msgid "" -"Static methods now inherit the method attributes (:attr:`~function." -"__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" -"attr:`~function.__doc__` and :attr:`~function.__annotations__`), have a new " -"``__wrapped__`` attribute, and are now callable as regular functions." +"Static methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " +"and :attr:`~function.__annotations__`), have a new ``__wrapped__`` " +"attribute, and are now callable as regular functions." msgstr "" "les méthodes statiques héritent dorénavant des attributs des méthodes " "(``__module__``, ``__name__``, ``__qualname__``, ``__doc__`` et " "``__annotations__``), ont un nouvel attribut ``__wrapped__`` et sont " "maintenant appelables comme les fonctions habituelles." -#: library/functions.rst:1933 +#: library/functions.rst:2022 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" "Renvoie une version d'*object* sous forme de :class:`str`. Voir :func:`str` " "pour plus de détails." -#: library/functions.rst:1935 +#: library/functions.rst:2024 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -3400,7 +3526,7 @@ msgstr "" "``str`` est la :term:`classe ` native des chaînes de caractères. Pour " "des informations générales à propos des chaînes, consultez :ref:`textseq`." -#: library/functions.rst:1941 +#: library/functions.rst:2030 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " @@ -3410,33 +3536,39 @@ msgstr "" "donne le total. Les éléments de l'*iterable* sont normalement des nombres, " "et la valeur de *start* ne peut pas être une chaîne de caractères." -#: library/functions.rst:1945 +#: library/functions.rst:2034 #, fuzzy msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " -"preferred, fast way to concatenate a sequence of strings is by calling ``''." -"join(sequence)``. To add floating-point values with extended precision, " -"see :func:`math.fsum`\\. To concatenate a series of iterables, consider " -"using :func:`itertools.chain`." +"preferred, fast way to concatenate a sequence of strings is by calling " +"``''.join(sequence)``. To add floating-point values with extended " +"precision, see :func:`math.fsum`\\. To concatenate a series of iterables, " +"consider using :func:`itertools.chain`." msgstr "" "Pour certains cas, il existe de bonnes alternatives à :func:`sum`. La bonne " -"méthode, rapide, pour concaténer une séquence de chaînes est d'appeler ``''." -"join(séquence)``. Pour additionner des nombres à virgule flottante avec une " -"meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " +"méthode, rapide, pour concaténer une séquence de chaînes est d'appeler " +"``''.join(séquence)``. Pour additionner des nombres à virgule flottante avec " +"une meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " "d'itérables, utilisez plutôt :func:`itertools.chain`." # suit un : -#: library/functions.rst:1951 +#: library/functions.rst:2040 msgid "The *start* parameter can be specified as a keyword argument." msgstr "le paramètre *start* peut être passé comme un argument nommé." -#: library/functions.rst:1954 +#: library/functions.rst:2043 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy and " "better commutativity on most builds." msgstr "" -#: library/functions.rst:1961 +#: library/functions.rst:2046 +msgid "" +"Added specialization for summation of complexes, using same algorithm as for " +"summation of floats." +msgstr "" + +#: library/functions.rst:2054 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " @@ -3446,7 +3578,7 @@ msgstr "" "de méthode à une classe parente ou sœur de *type*. C'est utile pour accéder " "aux méthodes héritées qui ont été remplacées dans une classe." -#: library/functions.rst:1965 +#: library/functions.rst:2058 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." @@ -3455,31 +3587,31 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1969 +#: library/functions.rst:2062 #, fuzzy msgid "" -"For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C -" -"> A -> object`` and the value of *type* is ``B``, then :func:`super` " +"For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C " +"-> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" "Par exemple, si :attr:`~class.__mro__` de *object_or_type* est ``D -> B -> C " "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1973 +#: library/functions.rst:2066 #, fuzzy msgid "" "The :attr:`~type.__mro__` attribute of the class corresponding to " -"*object_or_type* lists the method resolution search order used by both :func:" -"`getattr` and :func:`super`. The attribute is dynamic and can change " -"whenever the inheritance hierarchy is updated." +"*object_or_type* lists the method resolution search order used by " +"both :func:`getattr` and :func:`super`. The attribute is dynamic and can " +"change whenever the inheritance hierarchy is updated." msgstr "" "L'attribut :attr:`~class.__mro__` de *object_or_type* liste l'ordre de " -"recherche de la méthode de résolution utilisée par :func:`getattr` et :func:" -"`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " -"d'héritage est modifiée." +"recherche de la méthode de résolution utilisée par :func:`getattr` " +"et :func:`super`. L'attribut est dynamique et peut changer lorsque la " +"hiérarchie d'héritage est modifiée." -#: library/functions.rst:1978 +#: library/functions.rst:2071 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -3491,7 +3623,7 @@ msgstr "" "le second argument est un type, ``issubclass(type2, type)`` doit être vrai " "(c'est utile pour les méthodes de classe)." -#: library/functions.rst:1983 +#: library/functions.rst:2076 msgid "" "When called directly within an ordinary method of a class, both arguments " "may be omitted (\"zero-argument :func:`!super`\"). In this case, *type* will " @@ -3501,7 +3633,7 @@ msgid "" "including generator expressions, which implicitly create nested functions.)" msgstr "" -#: library/functions.rst:1990 +#: library/functions.rst:2083 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -3514,7 +3646,7 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:1995 +#: library/functions.rst:2088 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -3537,22 +3669,22 @@ msgstr "" "changements dans la hiérarchie, et parce que l'ordre peut inclure des " "classes sœurs inconnues avant l'exécution)." -#: library/functions.rst:2005 +#: library/functions.rst:2098 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" "Dans tous les cas, un appel typique à une classe parente ressemble à ::" -#: library/functions.rst:2012 +#: library/functions.rst:2105 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" "En plus de la recherche de méthodes, :func:`super` fonctionne également pour " -"la recherche d'attributs. Un cas d'utilisation possible est l'appel d'un :" -"term:`descripteur ` d'une classe parente ou sœur." +"la recherche d'attributs. Un cas d'utilisation possible est l'appel " +"d'un :term:`descripteur ` d'une classe parente ou sœur." -#: library/functions.rst:2016 +#: library/functions.rst:2109 #, fuzzy msgid "" "Note that :func:`super` is implemented as part of the binding process for " @@ -3563,14 +3695,14 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" "Notez que :func:`super` fait partie de l'implémentation du processus de " -"liaison lors de la recherche explicite d'attributs pointés comme ``super()." -"__getitem__(name)``. Elle le fait en implémentant sa propre méthode :meth:" -"`__getattribute__` pour rechercher les classes dans un ordre prévisible " -"gérant l'héritage multiple coopératif. En conséquence, :func:`super` n'est " -"pas définie pour les recherches implicites via des instructions ou des " -"opérateurs tels que ``super()[name]``." +"liaison lors de la recherche explicite d'attributs pointés comme " +"``super().__getitem__(name)``. Elle le fait en implémentant sa propre " +"méthode :meth:`__getattribute__` pour rechercher les classes dans un ordre " +"prévisible gérant l'héritage multiple coopératif. En " +"conséquence, :func:`super` n'est pas définie pour les recherches implicites " +"via des instructions ou des opérateurs tels que ``super()[name]``." -#: library/functions.rst:2024 +#: library/functions.rst:2117 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -3587,17 +3719,23 @@ msgstr "" "nécessaires à propos de la classe en cours de définition, ainsi qu'accéder à " "l'instance courante pour les méthodes ordinaires." -#: library/functions.rst:2031 +#: library/functions.rst:2124 msgid "" -"For practical suggestions on how to design cooperative classes using :func:" -"`super`, see `guide to using super() `_." +"For practical suggestions on how to design cooperative classes " +"using :func:`super`, see `guide to using super() `_." msgstr "" "Pour des suggestions pratiques sur la conception de classes coopératives " "utilisant :func:`super`, consultez `guide to using super() `_." -#: library/functions.rst:2041 +#: library/functions.rst:2128 +msgid "" +":class:`super` objects are now :mod:`pickleable ` " +"and :mod:`copyable `." +msgstr "" + +#: library/functions.rst:2137 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." @@ -3605,18 +3743,18 @@ msgstr "" "Ce n'est pas une fonction, :class:`tuple` est en fait un type de séquence " "immuable, comme documenté dans :ref:`typesseq-tuple` et :ref:`typesseq`." -#: library/functions.rst:2050 +#: library/functions.rst:2146 #, fuzzy msgid "" "With one argument, return the type of an *object*. The return value is a " -"type object and generally the same object as returned by :attr:`object." -"__class__`." +"type object and generally the same object as returned " +"by :attr:`object.__class__`." msgstr "" "Avec un argument, renvoie le type d'*object*. La valeur renvoyée est un " -"objet type et généralement la même que la valeur de l'attribut :attr:`object." -"__class__ `." +"objet type et généralement la même que la valeur de " +"l'attribut :attr:`object.__class__ `." -#: library/functions.rst:2054 +#: library/functions.rst:2150 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." @@ -3624,7 +3762,7 @@ msgstr "" "La fonction native :func:`isinstance` est recommandée pour tester le type " "d'un objet, car elle prend en compte l'héritage." -#: library/functions.rst:2057 +#: library/functions.rst:2153 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3633,37 +3771,37 @@ msgid "" "tuple contains the base classes and becomes the :attr:`~type.__bases__` " "attribute; if empty, :class:`object`, the ultimate base of all classes, is " "added. The *dict* dictionary contains attribute and method definitions for " -"the class body; it may be copied or wrapped before becoming the :attr:`~type." -"__dict__` attribute. The following two statements create identical :class:`!" -"type` objects:" +"the class body; it may be copied or wrapped before becoming " +"the :attr:`~type.__dict__` attribute. The following two statements create " +"identical :class:`!type` objects:" msgstr "" "Avec trois arguments, renvoie un nouveau type. C'est essentiellement une " "forme dynamique de l'instruction :keyword:`class`. La chaîne *name* est le " "nom de la classe et deviendra l'attribut :attr:`~definition.__name__`. Le " -"*n*-uplet *bases* contient les classes mères et deviendra l'attribut :attr:" -"`~class.__bases__`. S'il est vide, :class:`object`, la classe mère ultime de " -"toutes les classes, est ajoutée. Le dictionnaire *dict* contient les " -"définitions des attributs et des méthodes du corps de la classe ; il peut " -"être copié ou encapsulé vers un dictionnaire standard pour devenir " -"l'attribut :attr:`~object.__dict__`. Par exemple, les deux instructions " -"suivantes créent deux instances identiques de :class:`type` :" - -#: library/functions.rst:2072 +"*n*-uplet *bases* contient les classes mères et deviendra " +"l'attribut :attr:`~class.__bases__`. S'il est vide, :class:`object`, la " +"classe mère ultime de toutes les classes, est ajoutée. Le dictionnaire " +"*dict* contient les définitions des attributs et des méthodes du corps de la " +"classe ; il peut être copié ou encapsulé vers un dictionnaire standard pour " +"devenir l'attribut :attr:`~object.__dict__`. Par exemple, les deux " +"instructions suivantes créent deux instances identiques de :class:`type` :" + +#: library/functions.rst:2168 msgid "See also:" msgstr "" -#: library/functions.rst:2074 +#: library/functions.rst:2170 msgid "" ":ref:`Documentation on attributes and methods on classes `." msgstr "" -#: library/functions.rst:2075 +#: library/functions.rst:2171 #, fuzzy msgid ":ref:`bltin-type-objects`" msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:2077 +#: library/functions.rst:2173 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -3671,16 +3809,16 @@ msgid "" "would." msgstr "" "Les arguments nommés fournis à la forme à trois arguments sont passés au " -"mécanisme de métaclasse approprié (généralement :meth:`~object." -"__init_subclass__`) de la même manière que les arguments nommés dans une " -"définition de classe (en plus de *metaclass*)." +"mécanisme de métaclasse approprié " +"(généralement :meth:`~object.__init_subclass__`) de la même manière que les " +"arguments nommés dans une définition de classe (en plus de *metaclass*)." -#: library/functions.rst:2082 +#: library/functions.rst:2178 msgid "See also :ref:`class-customization`." msgstr "Voir aussi :ref:`class-customization`." # suit un : -#: library/functions.rst:2084 +#: library/functions.rst:2180 #, fuzzy msgid "" "Subclasses of :class:`!type` which don't override ``type.__new__`` may no " @@ -3690,35 +3828,41 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:2091 +#: library/functions.rst:2186 +msgid "*dict* can now be a :class:`frozendict`." +msgstr "" + +#: library/functions.rst:2191 #, fuzzy msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`!__dict__` attribute." msgstr "" "Renvoie l'attribut :attr:`~object.__dict__` d'un module, d'une classe, d'une " -"instance ou de n'importe quel objet avec un attribut :attr:`~object." -"__dict__`." +"instance ou de n'importe quel objet avec un " +"attribut :attr:`~object.__dict__`." -#: library/functions.rst:2094 +#: library/functions.rst:2194 #, fuzzy msgid "" -"Objects such as modules and instances have an updateable :attr:`~object." -"__dict__` attribute; however, other objects may have write restrictions on " -"their :attr:`!__dict__` attributes (for example, classes use a :class:`types." -"MappingProxyType` to prevent direct dictionary updates)." +"Objects such as modules and instances have an " +"updateable :attr:`~object.__dict__` attribute; however, other objects may " +"have write restrictions on their :attr:`!__dict__` attributes (for example, " +"classes use a :class:`types.MappingProxyType` to prevent direct dictionary " +"updates)." msgstr "" -"Certains objets, comme les modules et les instances, ont un attribut :attr:" -"`~object.__dict__` modifiable ; cependant, d'autres objets peuvent avoir des " -"restrictions en écriture sur leurs attributs :attr:`~object.__dict__` (par " -"exemple, les classes utilisent un :class:`types.MappingProxyType` pour " -"éviter les modifications directes du dictionnaire)." +"Certains objets, comme les modules et les instances, ont un " +"attribut :attr:`~object.__dict__` modifiable ; cependant, d'autres objets " +"peuvent avoir des restrictions en écriture sur leurs " +"attributs :attr:`~object.__dict__` (par exemple, les classes utilisent " +"un :class:`types.MappingProxyType` pour éviter les modifications directes du " +"dictionnaire)." -#: library/functions.rst:2099 +#: library/functions.rst:2199 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "" -#: library/functions.rst:2101 +#: library/functions.rst:2201 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " @@ -3728,13 +3872,13 @@ msgstr "" "n'a pas d'attribut :attr:`~object.__dict__` (par exemple, si sa classe " "définit l'attribut :attr:`~object.__slots__`)." -#: library/functions.rst:2107 +#: library/functions.rst:2207 msgid "" "The result of calling this function without an argument has been updated as " "described for the :func:`locals` builtin." msgstr "" -#: library/functions.rst:2113 +#: library/functions.rst:2213 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." @@ -3742,11 +3886,11 @@ msgstr "" "Itère sur plusieurs itérables en parallèle, produisant des *n*-uplets avec " "un élément provenant de chacun." -#: library/functions.rst:2116 +#: library/functions.rst:2216 msgid "Example::" msgstr "Exemple ::" -#: library/functions.rst:2125 +#: library/functions.rst:2225 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." @@ -3755,27 +3899,27 @@ msgstr "" "*i*:sup:`e` *n*-uplet contient le *i*:sup:`e` élément de chacun des " "itérables passés en arguments." -#: library/functions.rst:2128 +#: library/functions.rst:2228 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " -"columns into rows. This is similar to `transposing a matrix `_." +"columns into rows. This is similar to `transposing a matrix `_." msgstr "" "Une autre façon de voir :func:`zip` est qu'elle transforme les lignes en " "colonnes et les colonnes en lignes, fournissant la `matrice transposée " "`_." -#: library/functions.rst:2132 +#: library/functions.rst:2232 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " -"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" -"`list`." +"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in " +"a :class:`list`." msgstr "" ":func:`zip` est paresseuse : les éléments ne sont traités qu'au moment où " "l'on itère, par exemple avec une boucle :keyword:`!for` ou en les plaçant " "dans une :class:`liste `." -#: library/functions.rst:2136 +#: library/functions.rst:2236 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -3788,7 +3932,7 @@ msgstr "" "différentes pour traiter ce problème :" # énumération -#: library/functions.rst:2141 +#: library/functions.rst:2241 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " @@ -3798,7 +3942,7 @@ msgstr "" "épuisé. Elle ignore les éléments restants dans les itérables plus longs, " "coupant le résultat à la longueur de l'itérable le plus court ::" -#: library/functions.rst:2148 +#: library/functions.rst:2248 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " @@ -3808,15 +3952,15 @@ msgstr "" "être de même longueur. Dans ce cas, il est recommandé d'utiliser l'option " "``strict=True``. Cela produit la même chose que la :func:`zip` habituelle ::" -#: library/functions.rst:2155 +#: library/functions.rst:2255 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -"Mais, contrairement au comportement par défaut, elle lève une :exc:" -"`ValueError` si un itérable est épuisé avant les autres :" +"Mais, contrairement au comportement par défaut, elle lève " +"une :exc:`ValueError` si un itérable est épuisé avant les autres :" -#: library/functions.rst:2173 +#: library/functions.rst:2273 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " @@ -3827,17 +3971,17 @@ msgstr "" "comme un bogue difficile à trouver dans une autre partie du programme." # énumération. -#: library/functions.rst:2177 +#: library/functions.rst:2277 msgid "" "Shorter iterables can be padded with a constant value to make all the " -"iterables have the same length. This is done by :func:`itertools." -"zip_longest`." +"iterables have the same length. This is done " +"by :func:`itertools.zip_longest`." msgstr "" "les itérables plus courts peuvent être remplis avec une valeur constante " -"pour que tous les itérables aient la même longueur. C'est le cas pour :func:" -"`itertools.zip_longest`." +"pour que tous les itérables aient la même longueur. C'est le cas " +"pour :func:`itertools.zip_longest`." -#: library/functions.rst:2181 +#: library/functions.rst:2281 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." @@ -3845,12 +3989,12 @@ msgstr "" "Cas extrêmes : avec un seul argument itérable, :func:`zip` renvoie un " "itérateur de « 1-uplet ». Sans argument, elle renvoie un itérateur vide." -#: library/functions.rst:2184 +#: library/functions.rst:2284 msgid "Tips and tricks:" msgstr "Trucs et astuces :" # suit un : -#: library/functions.rst:2186 +#: library/functions.rst:2286 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -3865,7 +4009,7 @@ msgstr "" "appels à l'itérateur. Cela a pour effet de diviser la séquence en morceaux " "de taille *n*." -#: library/functions.rst:2192 +#: library/functions.rst:2292 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3874,12 +4018,12 @@ msgstr "" "dézipper une liste ::" # suit un : -#: library/functions.rst:2203 +#: library/functions.rst:2303 msgid "Added the ``strict`` argument." msgstr "ajout de l'argument ``strict``." # suit un : -#: library/functions.rst:2215 +#: library/functions.rst:2315 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3887,7 +4031,7 @@ msgstr "" "c'est une fonction avancée qui n'est pas fréquemment nécessaire, " "contrairement à :func:`importlib.import_module`." -#: library/functions.rst:2218 +#: library/functions.rst:2318 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3900,14 +4044,15 @@ msgid "" msgstr "" "Cette fonction est invoquée via l'instruction :keyword:`import`. Elle peut " "être remplacée (en important le module :mod:`builtins` et en y remplaçant " -"``builtins.__import__``) afin de changer la sémantique de l'instruction :" -"keyword:`!import`, mais c'est extrêmement déconseillé, car il est plus " -"simple d'utiliser des points d'entrée pour les importations (*import hooks*, " -"voir la :pep:`302`) pour le même résultat sans perturber du code s'attendant " -"à trouver l'implémentation par défaut. L'usage direct de :func:`__import__` " -"est aussi déconseillé en faveur de :func:`importlib.import_module`." +"``builtins.__import__``) afin de changer la sémantique de " +"l'instruction :keyword:`!import`, mais c'est extrêmement déconseillé, car il " +"est plus simple d'utiliser des points d'entrée pour les importations " +"(*import hooks*, voir la :pep:`302`) pour le même résultat sans perturber du " +"code s'attendant à trouver l'implémentation par défaut. L'usage direct " +"de :func:`__import__` est aussi déconseillé en faveur " +"de :func:`importlib.import_module`." -#: library/functions.rst:2227 +#: library/functions.rst:2327 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3923,7 +4068,7 @@ msgstr "" "l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " "du paquet de l'instruction :keyword:`import`." -#: library/functions.rst:2234 +#: library/functions.rst:2334 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3936,7 +4081,7 @@ msgstr "" "positive indique le nombre de dossiers parents relativement au dossier du " "module appelant :func:`__import__` (voir la :pep:`328`)." -#: library/functions.rst:2240 +#: library/functions.rst:2340 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3948,7 +4093,7 @@ msgstr "" "et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " "*fromlist* est fourni, le module nommé par *name* est renvoyé." -#: library/functions.rst:2245 +#: library/functions.rst:2345 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -3956,11 +4101,11 @@ msgstr "" "Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " "(*bytecode* en anglais) ressemblant au code suivant ::" -#: library/functions.rst:2250 +#: library/functions.rst:2350 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:2254 +#: library/functions.rst:2354 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." @@ -3968,7 +4113,7 @@ msgstr "" "Notez comment :func:`__import__` renvoie ici le module de plus haut niveau " "parce que c'est l'objet lié à un nom par l'instruction :keyword:`import`." -#: library/functions.rst:2257 +#: library/functions.rst:2357 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -3976,7 +4121,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:2264 +#: library/functions.rst:2364 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " @@ -3985,7 +4130,7 @@ msgstr "" "Ici le module ``spam.ham`` est renvoyé par :func:`__import__`. De cet objet, " "les noms à importer sont récupérés et assignés à leurs noms respectifs." -#: library/functions.rst:2268 +#: library/functions.rst:2368 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -3994,7 +4139,7 @@ msgstr "" "paquet) par son nom, utilisez :func:`importlib.import_module`." # suit un : -#: library/functions.rst:2271 +#: library/functions.rst:2371 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -4002,7 +4147,7 @@ msgstr "" "les valeurs négatives pour *level* ne sont plus prises en charge (et sa " "valeur par défaut est 0)." -#: library/functions.rst:2275 +#: library/functions.rst:2375 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." @@ -4010,11 +4155,11 @@ msgstr "" "Quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " "de commande, la variable d'environnement :envvar:`PYTHONCASEOK` est ignorée." -#: library/functions.rst:2280 +#: library/functions.rst:2380 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:2281 +#: library/functions.rst:2381 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -4024,6 +4169,65 @@ msgstr "" "lisez le code depuis un fichier, assurez-vous d'utiliser la conversion de " "retours à la ligne pour convertir les fin de lignes Windows et Mac." +#~ msgid "" +#~ "``'strict'`` to raise a :exc:`ValueError` exception if there is an " +#~ "encoding error. The default value of ``None`` has the same effect." +#~ msgstr "" +#~ "``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage " +#~ "est rencontrée. La valeur par défaut, ``None``, a le même effet." + +#~ msgid "" +#~ "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead " +#~ "to data loss." +#~ msgstr "" +#~ "``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " +#~ "peut mener à des pertes de données." + +#~ msgid "" +#~ "``'replace'`` causes a replacement marker (such as ``'?'``) to be " +#~ "inserted where there is malformed data." +#~ msgstr "" +#~ "``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en " +#~ "place des données mal formées." + +#~ msgid "" +#~ "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " +#~ "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " +#~ "then be turned back into the same bytes when the ``surrogateescape`` " +#~ "error handler is used when writing data. This is useful for processing " +#~ "files in an unknown encoding." +#~ msgstr "" +#~ "``'surrogateescape'`` représentera tous les octets incorrects comme des " +#~ "points de code de substitution de l'intervalle bas U+DC80 à U+DCFF. Ces " +#~ "points de code de substitution sont ensuite retransformés dans les mêmes " +#~ "octets lorsque le gestionnaire d'erreurs ``surrogateescape`` est utilisé " +#~ "pour l'écriture des données. C'est utile pour traiter des fichiers d'un " +#~ "encodage inconnu." + +#, fuzzy +#~ msgid "" +#~ "``'xmlcharrefreplace'`` is only supported when writing to a file. " +#~ "Characters not supported by the encoding are replaced with the " +#~ "appropriate XML character reference :samp:`&#{nnn};`." +#~ msgstr "" +#~ "``'xmlcharrefreplace'`` est seulement pris en charge à l'écriture vers un " +#~ "fichier. Les caractères non gérés par l'encodage sont remplacés par une " +#~ "entité XML de la forme ``&#nnn;``." + +#~ msgid "" +#~ "``'backslashreplace'`` replaces malformed data by Python's backslashed " +#~ "escape sequences." +#~ msgstr "" +#~ "``'backslashreplace'`` remplace les données mal formées par des séquences " +#~ "d'échappement Python (utilisant des barres obliques inverses)." + +#~ msgid "" +#~ "``'namereplace'`` (also only supported when writing) replaces unsupported " +#~ "characters with ``\\N{...}`` escape sequences." +#~ msgstr "" +#~ "``'namereplace'`` (aussi supporté lors de l'écriture) remplace les " +#~ "caractères non gérés par des séquences d'échappement ``\\N{...}``." + #~ msgid "Boolean" #~ msgstr "booléen" @@ -4108,14 +4312,14 @@ msgstr "" #~ msgid "" #~ "Update and return a dictionary representing the current local symbol " #~ "table. Free variables are returned by :func:`locals` when it is called in " -#~ "function blocks, but not in class blocks. Note that at the module level, :" -#~ "func:`locals` and :func:`globals` are the same dictionary." +#~ "function blocks, but not in class blocks. Note that at the module " +#~ "level, :func:`locals` and :func:`globals` are the same dictionary." #~ msgstr "" #~ "Met à jour et renvoie un dictionnaire représentant la table des symboles " -#~ "locaux. Les variables libres sont renvoyées par la fonction :func:" -#~ "`locals` lorsque celle-ci est appelée dans le corps d'une fonction, mais " -#~ "pas dans le corps d'une classe. Notez qu’au niveau d’un module, :func:" -#~ "`locals` et :func:`globals` sont le même dictionnaire." +#~ "locaux. Les variables libres sont renvoyées par la " +#~ "fonction :func:`locals` lorsque celle-ci est appelée dans le corps d'une " +#~ "fonction, mais pas dans le corps d'une classe. Notez qu’au niveau d’un " +#~ "module, :func:`locals` et :func:`globals` sont le même dictionnaire." #~ msgid "" #~ "The contents of this dictionary should not be modified; changes may not " @@ -4165,13 +4369,13 @@ msgstr "" #~ msgid "" #~ "When converting from a string, the string must not contain whitespace " #~ "around the central ``+`` or ``-`` operator. For example, " -#~ "``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises :exc:" -#~ "`ValueError`." +#~ "``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` " +#~ "raises :exc:`ValueError`." #~ msgstr "" #~ "lors de la conversion depuis une chaîne, elle ne doit pas contenir " #~ "d'espaces autour des opérateurs binaires ``+`` ou ``-``. Par exemple " -#~ "``complex('1+2j')`` est correct, mais ``complex('1 + 2j')`` lève une :exc:" -#~ "`ValueError`." +#~ "``complex('1+2j')`` est correct, mais ``complex('1 + 2j')`` lève " +#~ "une :exc:`ValueError`." #~ msgid "" #~ "The arguments are a string and optional globals and locals. If provided, " @@ -4213,33 +4417,35 @@ msgstr "" #~ msgid "" #~ "Return a :term:`slice` object representing the set of indices specified " #~ "by ``range(start, stop, step)``. The *start* and *step* arguments " -#~ "default to ``None``. Slice objects have read-only data attributes :attr:" -#~ "`~slice.start`, :attr:`~slice.stop`, and :attr:`~slice.step` which merely " -#~ "return the argument values (or their default). They have no other " -#~ "explicit functionality; however, they are used by NumPy and other third-" -#~ "party packages. Slice objects are also generated when extended indexing " -#~ "syntax is used. For example: ``a[start:stop:step]`` or ``a[start:stop, " -#~ "i]``. See :func:`itertools.islice` for an alternate version that returns " -#~ "an iterator." +#~ "default to ``None``. Slice objects have read-only data " +#~ "attributes :attr:`~slice.start`, :attr:`~slice.stop`, " +#~ "and :attr:`~slice.step` which merely return the argument values (or their " +#~ "default). They have no other explicit functionality; however, they are " +#~ "used by NumPy and other third-party packages. Slice objects are also " +#~ "generated when extended indexing syntax is used. For example: " +#~ "``a[start:stop:step]`` or ``a[start:stop, i]``. " +#~ "See :func:`itertools.islice` for an alternate version that returns an " +#~ "iterator." #~ msgstr "" #~ "Renvoie une :term:`tranche ` représentant un ensemble d'indices " #~ "spécifiés par ``range(start, stop, step)``. Les arguments *start* et " #~ "*step* valent ``None`` par défaut. Les objets « tranches » ont les " -#~ "attributs suivants en lecture seule : :attr:`~slice.start`, :attr:`~slice." -#~ "stop` et :attr:`~slice.step` qui valent simplement les trois arguments " -#~ "(ou leurs valeurs par défaut). Ils n'ont pas d'autre fonctionnalité " -#~ "explicite, cependant ils sont utilisés par *NumPy* et d'autres paquets. " -#~ "Les objets « tranches » sont aussi générés par la notation par indice " -#~ "étendue. Par exemple ``a[start:stop:step]`` ou ``a[start:stop, i]``. " +#~ "attributs suivants en lecture " +#~ "seule : :attr:`~slice.start`, :attr:`~slice.stop` et :attr:`~slice.step` " +#~ "qui valent simplement les trois arguments (ou leurs valeurs par défaut). " +#~ "Ils n'ont pas d'autre fonctionnalité explicite, cependant ils sont " +#~ "utilisés par *NumPy* et d'autres paquets. Les objets « tranches » sont " +#~ "aussi générés par la notation par indice étendue. Par exemple " +#~ "``a[start:stop:step]`` ou ``a[start:stop, i]``. " #~ "Voir :func:`itertools.islice` pour une version alternative renvoyant un " #~ "itérateur." #~ msgid "" #~ "There is an additional mode character permitted, ``'U'``, which no longer " -#~ "has any effect, and is considered deprecated. It previously enabled :term:" -#~ "`universal newlines` in text mode, which became the default behavior in " -#~ "Python 3.0. Refer to the documentation of the :ref:`newline ` parameter for further details." +#~ "has any effect, and is considered deprecated. It previously " +#~ "enabled :term:`universal newlines` in text mode, which became the default " +#~ "behavior in Python 3.0. Refer to the documentation of the :ref:`newline " +#~ "` parameter for further details." #~ msgstr "" #~ "Il y a un mode « caractères » supplémentaire autorisé, ``’U’``, qui n'a " #~ "plus d'effet, et est considéré comme obsolète. Auparavant, il activait " @@ -4296,5 +4502,5 @@ msgstr "" #~ msgid "For more information on class methods, see :ref:`types`." #~ msgstr "" -#~ "Pour plus d'informations sur les méthodes de classe, consultez :ref:" -#~ "`types`." +#~ "Pour plus d'informations sur les méthodes de classe, " +#~ "consultez :ref:`types`." diff --git a/library/functools.po b/library/functools.po index 1b7c40b41..4a22b7c3c 100644 --- a/library/functools.po +++ b/library/functools.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-10-18 15:58+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -24,13 +24,14 @@ msgstr "" ":mod:`functools` — Fonctions d'ordre supérieur et opérations sur des objets " "appelables" -#: library/functools.rst:14 +#: library/functools.rst:7 msgid "**Source code:** :source:`Lib/functools.py`" msgstr "**Code source :** :source:`Lib/functools.py`" -#: library/functools.rst:23 +#: library/functools.rst:16 +#, fuzzy msgid "" -"The :mod:`functools` module is for higher-order functions: functions that " +"The :mod:`!functools` module is for higher-order functions: functions that " "act on or return other functions. In general, any callable object can be " "treated as a function for the purposes of this module." msgstr "" @@ -39,11 +40,12 @@ msgstr "" "tout objet appelable peut être considéré comme une fonction dans la " "description de ce module." -#: library/functools.rst:27 -msgid "The :mod:`functools` module defines the following functions:" +#: library/functools.rst:20 +#, fuzzy +msgid "The :mod:`!functools` module defines the following functions:" msgstr "Le module :mod:`functools` définit les fonctions suivantes :" -#: library/functools.rst:31 +#: library/functools.rst:24 msgid "" "Simple lightweight unbounded function cache. Sometimes called `\"memoize\" " "`_." @@ -52,7 +54,7 @@ msgstr "" "parfois appelée `« mémoïsation » `_." -#: library/functools.rst:34 +#: library/functools.rst:27 #, fuzzy msgid "" "Returns the same as ``lru_cache(maxsize=None)``, creating a thin wrapper " @@ -65,25 +67,32 @@ msgstr "" "Comme elle ne nettoie jamais les anciennes entrées, elle est plus simple et " "plus rapide que :func:`lru_cache()` avec une limite." -#: library/functools.rst:291 +#: library/functools.rst:294 msgid "For example::" msgstr "Par exemple ::" -#: library/functools.rst:158 +#: library/functools.rst:155 msgid "" "The cache is threadsafe so that the wrapped function can be used in multiple " "threads. This means that the underlying data structure will remain coherent " "during concurrent updates." msgstr "" -#: library/functools.rst:162 +#: library/functools.rst:159 msgid "" "It is possible for the wrapped function to be called more than once if " "another thread makes an additional call before the initial call has been " "completed and cached." msgstr "" -#: library/functools.rst:65 +#: library/functools.rst:53 +msgid "" +"Call-once behavior is not guaranteed because locks are not held during the " +"function call. Potentially another call with the same arguments could occur " +"while the first call is still running." +msgstr "" + +#: library/functools.rst:62 msgid "" "Transform a method of a class into a property whose value is computed once " "and then cached as a normal attribute for the life of the instance. Similar " @@ -91,18 +100,18 @@ msgid "" "computed properties of instances that are otherwise effectively immutable." msgstr "" -#: library/functools.rst:142 library/functools.rst:383 +#: library/functools.rst:139 library/functools.rst:435 msgid "Example::" msgstr "Exemple ::" -#: library/functools.rst:81 +#: library/functools.rst:78 msgid "" -"The mechanics of :func:`cached_property` are somewhat different from :func:" -"`property`. A regular property blocks attribute writes unless a setter is " -"defined. In contrast, a *cached_property* allows writes." +"The mechanics of :func:`cached_property` are somewhat different " +"from :func:`property`. A regular property blocks attribute writes unless a " +"setter is defined. In contrast, a *cached_property* allows writes." msgstr "" -#: library/functools.rst:85 +#: library/functools.rst:82 msgid "" "The *cached_property* decorator only runs on lookups and only when an " "attribute of the same name doesn't exist. When it does run, the " @@ -111,13 +120,13 @@ msgid "" "and it works like a normal attribute." msgstr "" -#: library/functools.rst:91 +#: library/functools.rst:88 msgid "" "The cached value can be cleared by deleting the attribute. This allows the " "*cached_property* method to run again." msgstr "" -#: library/functools.rst:94 +#: library/functools.rst:91 msgid "" "The *cached_property* does not prevent a possible race condition in multi-" "threaded usage. The getter function could run more than once on the same " @@ -128,14 +137,14 @@ msgid "" "property access." msgstr "" -#: library/functools.rst:102 +#: library/functools.rst:99 msgid "" "Note, this decorator interferes with the operation of :pep:`412` key-sharing " "dictionaries. This means that instance dictionaries can take more space " "than usual." msgstr "" -#: library/functools.rst:106 +#: library/functools.rst:103 msgid "" "Also, this decorator requires that the ``__dict__`` attribute on each " "instance be a mutable mapping. This means it will not work with some types, " @@ -145,16 +154,16 @@ msgid "" "such classes don't provide a ``__dict__`` attribute at all)." msgstr "" -#: library/functools.rst:113 +#: library/functools.rst:110 msgid "" "If a mutable mapping is not available or if space-efficient key sharing is " "desired, an effect similar to :func:`cached_property` can also be achieved " "by stacking :func:`property` on top of :func:`lru_cache`. See :ref:`faq-" -"cache-method-calls` for more details on how this differs from :func:" -"`cached_property`." +"cache-method-calls` for more details on how this differs " +"from :func:`cached_property`." msgstr "" -#: library/functools.rst:120 +#: library/functools.rst:117 msgid "" "Prior to Python 3.12, ``cached_property`` included an undocumented lock to " "ensure that in multi-threaded usage the getter function was guaranteed to " @@ -163,23 +172,21 @@ msgid "" "3.12+ this locking is removed." msgstr "" -#: library/functools.rst:130 +#: library/functools.rst:127 msgid "" "Transform an old-style comparison function to a :term:`key function`. Used " -"with tools that accept key functions (such as :func:`sorted`, :func:`min`, :" -"func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`, :func:" -"`itertools.groupby`). This function is primarily used as a transition tool " -"for programs being converted from Python 2 which supported the use of " -"comparison functions." +"with tools that accept key functions (such " +"as :func:`sorted`, :func:`min`, :func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`, :func:`itertools.groupby`). " +"This function is primarily used as a transition tool for programs being " +"converted from Python 2 which supported the use of comparison functions." msgstr "" "Transforme une fonction de comparaison à l'ancienne en une :term:`fonction " -"clé`. Utilisé avec des outils qui acceptent des fonctions clef (comme :func:" -"`sorted`, :func:`min`, :func:`max`, :func:`heapq.nlargest`, :func:`heapq." -"nsmallest`, :func:`itertools.groupby`). Cette fonction est destinée au " -"portage de fonctions python 2 utilisant des fonctions de comparaison vers " -"Python 3." +"clé`. Utilisé avec des outils qui acceptent des fonctions clef " +"(comme :func:`sorted`, :func:`min`, :func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`, :func:`itertools.groupby`). " +"Cette fonction est destinée au portage de fonctions python 2 utilisant des " +"fonctions de comparaison vers Python 3." -#: library/functools.rst:137 +#: library/functools.rst:134 #, fuzzy msgid "" "A comparison function is any callable that accepts two arguments, compares " @@ -193,13 +200,13 @@ msgstr "" "un appelable qui prend un argument et retourne une autre valeur qui sera " "utilisée comme clé de tri." -#: library/functools.rst:146 +#: library/functools.rst:143 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`." -#: library/functools.rst:154 +#: library/functools.rst:151 msgid "" "Decorator to wrap a function with a memoizing callable that saves up to the " "*maxsize* most recent calls. It can save time when an expensive or I/O " @@ -210,7 +217,7 @@ msgstr "" "une fonction coûteuse en ressources est souvent appelée avec les mêmes " "arguments." -#: library/functools.rst:166 +#: library/functools.rst:163 #, fuzzy msgid "" "Since a dictionary is used to cache results, the positional and keyword " @@ -219,7 +226,7 @@ msgstr "" "Comme un dictionnaire est utilisé pour mettre en cache les résultats, les " "arguments positionnels et nommés de la fonction doivent être hachables." -#: library/functools.rst:169 +#: library/functools.rst:166 #, fuzzy msgid "" "Distinct argument patterns may be considered to be distinct calls with " @@ -232,7 +239,7 @@ msgstr "" "``f(a=1, b=2)`` et ``f(b=2, a=1)`` n'ont pas leurs arguments dans le même " "ordre et peuvent donc avoir des entrées distinctes dans le cache." -#: library/functools.rst:174 +#: library/functools.rst:171 msgid "" "If *user_function* is specified, it must be a callable. This allows the " "*lru_cache* decorator to be applied directly to a user function, leaving the " @@ -242,7 +249,7 @@ msgstr "" "*lru_cache* d'être appliqué directement sur une fonction de l'utilisateur, " "sans préciser *maxsize* (qui est alors défini à sa valeur par défaut, 128) ::" -#: library/functools.rst:182 +#: library/functools.rst:179 msgid "" "If *maxsize* is set to ``None``, the LRU feature is disabled and the cache " "can grow without bound." @@ -250,7 +257,7 @@ msgstr "" "Si *maxsize* est à ``None``, la fonctionnalité LRU est désactivée et le " "cache peut grossir sans limite." -#: library/functools.rst:185 +#: library/functools.rst:182 #, fuzzy msgid "" "If *typed* is set to true, function arguments of different types will be " @@ -262,16 +269,16 @@ msgstr "" "séparément. Par exemple, ``f(3)`` et ``f(3.0)`` seront considérés comme des " "appels distincts avec des résultats distincts." -#: library/functools.rst:191 +#: library/functools.rst:188 msgid "" "Note, type specificity applies only to the function's immediate arguments " "rather than their contents. The scalar arguments, ``Decimal(42)`` and " -"``Fraction(42)`` are be treated as distinct calls with distinct results. In " +"``Fraction(42)`` are treated as distinct calls with distinct results. In " "contrast, the tuple arguments ``('answer', Decimal(42))`` and ``('answer', " "Fraction(42))`` are treated as equivalent." msgstr "" -#: library/functools.rst:197 +#: library/functools.rst:194 #, fuzzy msgid "" "The wrapped function is instrumented with a :func:`!cache_parameters` " @@ -279,56 +286,58 @@ msgid "" "and *typed*. This is for information purposes only. Mutating the values " "has no effect." msgstr "" -"La fonction encapsulée est initialisée par la fonction :func:" -"`cache_parameters` qui renvoie un :class:`dict` contenant les valeurs de " -"*maxsize* et de *typed*. Cela ne sert qu'au débogage, changer ces valeurs " -"n'a pas d'incidence." +"La fonction encapsulée est initialisée par la " +"fonction :func:`cache_parameters` qui renvoie un :class:`dict` contenant les " +"valeurs de *maxsize* et de *typed*. Cela ne sert qu'au débogage, changer ces " +"valeurs n'a pas d'incidence." #: library/functools.rst:202 #, fuzzy msgid "" "To help measure the effectiveness of the cache and tune the *maxsize* " -"parameter, the wrapped function is instrumented with a :func:`cache_info` " +"parameter, the wrapped function is instrumented with a :func:`!cache_info` " "function that returns a :term:`named tuple` showing *hits*, *misses*, " "*maxsize* and *currsize*." msgstr "" "Pour aider à mesurer l'efficacité du cache et ajuster le paramètre " -"*maxsize*, la fonction englobée est surveillée avec une fonction :func:" -"`cache_info` qui renvoie un :term:`named tuple` affichant les *hits*, " -"*misses*, *maxsize* et *currsize*. Dans un environnement *multithread*, les " -"succès et échecs d'appel du cache sont approximatifs." +"*maxsize*, la fonction englobée est surveillée avec une " +"fonction :func:`cache_info` qui renvoie un :term:`named tuple` affichant les " +"*hits*, *misses*, *maxsize* et *currsize*. Dans un environnement " +"*multithread*, les succès et échecs d'appel du cache sont approximatifs." -#: library/functools.rst:207 +#: library/functools.rst:210 +#, fuzzy msgid "" -"The decorator also provides a :func:`cache_clear` function for clearing or " +"The decorator also provides a :func:`!cache_clear` function for clearing or " "invalidating the cache." msgstr "" "Le décorateur fournit également une fonction :func:`cache_clear` pour vider " "ou invalider le cache." -#: library/functools.rst:210 +#: library/functools.rst:213 msgid "" -"The original underlying function is accessible through the :attr:" -"`__wrapped__` attribute. This is useful for introspection, for bypassing " -"the cache, or for rewrapping the function with a different cache." +"The original underlying function is accessible through " +"the :attr:`__wrapped__` attribute. This is useful for introspection, for " +"bypassing the cache, or for rewrapping the function with a different cache." msgstr "" -"La fonction sous-jacente originale est accessible à travers l'attribut :attr:" -"`__wrapped__`. Ceci est utile pour l'introspection, pour outrepasser le " -"cache, ou pour ré-englober la fonction avec un cache différent." +"La fonction sous-jacente originale est accessible à travers " +"l'attribut :attr:`__wrapped__`. Ceci est utile pour l'introspection, pour " +"outrepasser le cache, ou pour ré-englober la fonction avec un cache " +"différent." -#: library/functools.rst:214 +#: library/functools.rst:217 msgid "" "The cache keeps references to the arguments and return values until they age " "out of the cache or until the cache is cleared." msgstr "" -#: library/functools.rst:217 +#: library/functools.rst:220 msgid "" "If a method is cached, the ``self`` instance argument is included in the " "cache. See :ref:`faq-cache-method-calls`" msgstr "" -#: library/functools.rst:220 +#: library/functools.rst:223 #, fuzzy msgid "" "An `LRU (least recently used) cache `_ using a cache to implement a `dynamic " -"programming `_ technique::" +"Example of efficiently computing `Fibonacci numbers `_ using a cache to implement a " +"`dynamic programming `_ " +"technique::" msgstr "" -"Exemple de calcul efficace de `la suite de Fibonacci `_ en utilisant un cache pour implémenter la " -"technique de `programmation dynamique `_ ::" +"Exemple de calcul efficace de `la suite de Fibonacci `_ en utilisant un cache pour " +"implémenter la technique de `programmation dynamique `_ ::" -#: library/functools.rst:272 +#: library/functools.rst:275 msgid "Added the *typed* option." msgstr "L'option *typed* a été ajoutée." -#: library/functools.rst:275 +#: library/functools.rst:278 msgid "Added the *user_function* option." msgstr "Ajout de l'option *user_function*." -#: library/functools.rst:278 +#: library/functools.rst:281 #, fuzzy msgid "Added the function :func:`!cache_parameters`" msgstr "Ajout de la fonction :func:`cache_parameters`" -#: library/functools.rst:283 +#: library/functools.rst:286 msgid "" "Given a class defining one or more rich comparison ordering methods, this " "class decorator supplies the rest. This simplifies the effort involved in " @@ -399,17 +409,19 @@ msgstr "" "riches, ce décorateur de classe fournit le reste. Ceci simplifie l'effort à " "fournir dans la spécification de toutes les opérations de comparaison riche :" -#: library/functools.rst:287 +#: library/functools.rst:290 +#, fuzzy msgid "" -"The class must define one of :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, " -"or :meth:`__ge__`. In addition, the class should supply an :meth:`__eq__` " -"method." +"The class must define one " +"of :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, " +"or :meth:`~object.__ge__`. In addition, the class should supply " +"an :meth:`~object.__eq__` method." msgstr "" -"La classe doit définir au moins une de ces méthodes :meth:`__lt__`, :meth:" -"`__le__`, :meth:`__gt__`, ou :meth:`__ge__`. De plus, la classe doit fournir " -"une méthode :meth:`__eq__`." +"La classe doit définir au moins une de ces " +"méthodes :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, ou :meth:`__ge__`. " +"De plus, la classe doit fournir une méthode :meth:`__eq__`." -#: library/functools.rst:311 +#: library/functools.rst:314 msgid "" "While this decorator makes it easy to create well behaved totally ordered " "types, it *does* come at the cost of slower execution and more complex stack " @@ -424,7 +436,7 @@ msgstr "" "méthodes de comparaison riches résoudra normalement vos problèmes de " "rapidité." -#: library/functools.rst:320 +#: library/functools.rst:323 msgid "" "This decorator makes no attempt to override methods that have been declared " "in the class *or its superclasses*. Meaning that if a superclass defines a " @@ -432,7 +444,7 @@ msgid "" "the original method is abstract." msgstr "" -#: library/functools.rst:327 +#: library/functools.rst:330 #, fuzzy msgid "" "Returning ``NotImplemented`` from the underlying comparison function for " @@ -441,7 +453,13 @@ msgstr "" "Retourner NotImplemented dans les fonction de comparaison sous-jacentes pour " "les types non reconnus est maintenant supporté." -#: library/functools.rst:333 +#: library/functools.rst:336 +msgid "" +"A singleton object used as a sentinel to reserve a place for positional " +"arguments when calling :func:`partial` and :func:`partialmethod`." +msgstr "" + +#: library/functools.rst:344 msgid "" "Return a new :ref:`partial object` which when called will " "behave like *func* called with the positional arguments *args* and keyword " @@ -455,31 +473,73 @@ msgstr "" "à l'appel, ils sont ajoutés à *args*. Si plus d'arguments nommés sont " "fournis, ils étendent et surchargent *keywords*. À peu près équivalent à ::" -#: library/functools.rst:349 +#: library/functools.rst:359 +#, fuzzy msgid "" -"The :func:`partial` is used for partial function application which " +"The :func:`!partial` function is used for partial function application which " "\"freezes\" some portion of a function's arguments and/or keywords resulting " "in a new object with a simplified signature. For example, :func:`partial` " "can be used to create a callable that behaves like the :func:`int` function " -"where the *base* argument defaults to two:" +"where the *base* argument defaults to ``2``:" msgstr "" ":func:`partial` est utilisé pour une application de fonction partielle qui " "\"gèle\" une portion des arguments et/ou mots-clés d'une fonction donnant un " "nouvel objet avec une signature simplifiée. Par exemple, :func:`partial` " -"peut être utilisé pour créer un appelable qui se comporte comme la fonction :" -"func:`int` ou l'argument *base* est deux par défaut :" +"peut être utilisé pour créer un appelable qui se comporte comme la " +"fonction :func:`int` ou l'argument *base* est deux par défaut :" -#: library/functools.rst:364 +#: library/functools.rst:372 msgid "" -"Return a new :class:`partialmethod` descriptor which behaves like :class:" -"`partial` except that it is designed to be used as a method definition " -"rather than being directly callable." +"If :data:`Placeholder` sentinels are present in *args*, they will be filled " +"first when :func:`!partial` is called. This makes it possible to pre-fill " +"any positional argument with a call to :func:`!partial`; without :data:`!" +"Placeholder`, only the chosen number of leading positional arguments can be " +"pre-filled." +msgstr "" + +#: library/functools.rst:377 +msgid "" +"If any :data:`!Placeholder` sentinels are present, all must be filled at " +"call time:" +msgstr "" + +#: library/functools.rst:385 +msgid "" +"Calling ``say_to_world('Hello')`` raises a :exc:`TypeError`, because only " +"one positional argument is provided, but there are two placeholders that " +"must be filled in." +msgstr "" + +#: library/functools.rst:389 +msgid "" +"If :func:`!partial` is applied to an existing :func:`!partial` " +"object, :data:`!Placeholder` sentinels of the input object are filled in " +"with new positional arguments. A placeholder can be retained by inserting a " +"new :data:`!Placeholder` sentinel to the place held by a previous :data:`!" +"Placeholder`:" +msgstr "" + +#: library/functools.rst:409 +msgid "" +":data:`!Placeholder` cannot be passed to :func:`!partial` as a keyword " +"argument." +msgstr "" + +#: library/functools.rst:411 +msgid "Added support for :data:`Placeholder` in positional arguments." +msgstr "" + +#: library/functools.rst:416 +msgid "" +"Return a new :class:`partialmethod` descriptor which behaves " +"like :class:`partial` except that it is designed to be used as a method " +"definition rather than being directly callable." msgstr "" "Retourne un nouveau descripteur :class:`partialmethod` qui se comporte " "comme :class:`partial` sauf qu'il est fait pour être utilisé comme une " "définition de méthode plutôt que d'être appelé directement." -#: library/functools.rst:368 +#: library/functools.rst:420 msgid "" "*func* must be a :term:`descriptor` or a callable (objects which are both, " "like normal functions, are handled as descriptors)." @@ -487,27 +547,28 @@ msgstr "" "*func* doit être un :term:`descriptor` ou un appelable (les objets qui sont " "les deux, comme les fonction normales, sont gérés comme des descripteurs)." -#: library/functools.rst:371 +#: library/functools.rst:423 +#, fuzzy msgid "" -"When *func* is a descriptor (such as a normal Python function, :func:" -"`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or another " -"instance of :class:`partialmethod`), calls to ``__get__`` are delegated to " -"the underlying descriptor, and an appropriate :ref:`partial object` returned as the result." +"When *func* is a descriptor (such as a normal Python " +"function, :func:`classmethod`, :func:`staticmethod`, :func:`~abc.abstractmethod` " +"or another instance of :class:`partialmethod`), calls to ``__get__`` are " +"delegated to the underlying descriptor, and an appropriate :ref:`partial " +"object` returned as the result." msgstr "" -"Quand *func* est un descripteur (comme une fonction Python normale, :func:" -"`classmethod`, :func:`staticmethod`, :func:`abstractmethod` ou une autre " -"instance de :class:`partialmethod`), les appels à ``__get__`` sont délégués " -"au descripteur sous-jacent, et un :ref:`objet partiel ` " -"approprié est renvoyé comme résultat." +"Quand *func* est un descripteur (comme une fonction Python " +"normale, :func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` " +"ou une autre instance de :class:`partialmethod`), les appels à ``__get__`` " +"sont délégués au descripteur sous-jacent, et un :ref:`objet partiel ` approprié est renvoyé comme résultat." -#: library/functools.rst:377 +#: library/functools.rst:429 msgid "" "When *func* is a non-descriptor callable, an appropriate bound method is " "created dynamically. This behaves like a normal Python function when used as " "a method: the *self* argument will be inserted as the first positional " -"argument, even before the *args* and *keywords* supplied to the :class:" -"`partialmethod` constructor." +"argument, even before the *args* and *keywords* supplied to " +"the :class:`partialmethod` constructor." msgstr "" "Quand *func* est un appelable non-descripteur, une méthode liée appropriée " "est crée dynamiquement. Elle se comporte comme une fonction Python normale " @@ -515,7 +576,7 @@ msgstr "" "premier argument positionnel, avant les *args* et *keywords* fournis au " "constructeur :class:`partialmethod`." -#: library/functools.rst:408 +#: library/functools.rst:460 #, fuzzy msgid "" "Apply *function* of two arguments cumulatively to the items of *iterable*, " @@ -538,11 +599,11 @@ msgstr "" "la séquence est vide. Si *initializer* n'est pas renseigné et que *iterable* " "ne contient qu'un élément, le premier élément est renvoyé." -#: library/functools.rst:417 +#: library/functools.rst:469 msgid "Roughly equivalent to::" msgstr "À peu près équivalent à ::" -#: library/functools.rst:431 +#: library/functools.rst:483 msgid "" "See :func:`itertools.accumulate` for an iterator that yields all " "intermediate values." @@ -550,15 +611,19 @@ msgstr "" "Voir :func:`itertools.accumulate` pour un itérateur qui génère toutes les " "valeurs intermédiaires." -#: library/functools.rst:436 +#: library/functools.rst:486 +msgid "*initial* is now supported as a keyword argument." +msgstr "" + +#: library/functools.rst:491 msgid "" -"Transform a function into a :term:`single-dispatch ` :term:" -"`generic function`." +"Transform a function into a :term:`single-dispatch ` :term:`generic function`." msgstr "" "Transforme une fonction en une :term:`fonction générique ` :term:`single-dispatch `." -#: library/functools.rst:439 +#: library/functools.rst:494 #, fuzzy msgid "" "To define a generic function, decorate it with the ``@singledispatch`` " @@ -569,10 +634,10 @@ msgstr "" "``@singledispatch``. Noter que la distribution est effectuée sur le type du " "premier argument, donc la fonction doit être créée en conséquence ::" -#: library/functools.rst:450 +#: library/functools.rst:508 #, fuzzy msgid "" -"To add overloaded implementations to the function, use the :func:`register` " +"To add overloaded implementations to the function, use the :func:`!register` " "attribute of the generic function, which can be used as a decorator. For " "functions annotated with types, the decorator will infer the type of the " "first argument automatically::" @@ -582,11 +647,11 @@ msgstr "" "Pour les fonctions annotées avec des types, le décorateur infère le type du " "premier argument automatiquement ::" -#: library/functools.rst:468 -msgid ":data:`types.UnionType` and :data:`typing.Union` can also be used::" +#: library/functools.rst:526 +msgid ":class:`typing.Union` can also be used::" msgstr "" -#: library/functools.rst:485 +#: library/functools.rst:543 msgid "" "For code which doesn't use type annotations, the appropriate type argument " "can be passed explicitly to the decorator itself::" @@ -594,7 +659,7 @@ msgstr "" "Pour le code qui n’utilise pas les indications de type, le type souhaité " "peut être passé explicitement en argument au décorateur ::" -#: library/functools.rst:495 +#: library/functools.rst:553 msgid "" "For code that dispatches on a collections type (e.g., ``list``), but wants " "to typehint the items of the collection (e.g., ``list[int]``), the dispatch " @@ -602,7 +667,7 @@ msgid "" "going into the function definition::" msgstr "" -#: library/functools.rst:509 +#: library/functools.rst:567 msgid "" "At runtime the function will dispatch on an instance of a list regardless of " "the type contained within the list i.e. ``[1,2,3]`` will be dispatched the " @@ -610,27 +675,28 @@ msgid "" "example is for static type checkers only and has no runtime impact." msgstr "" -#: library/functools.rst:515 +#: library/functools.rst:573 #, fuzzy msgid "" "To enable registering :term:`lambdas` and pre-existing functions, " -"the :func:`register` attribute can also be used in a functional form::" +"the :func:`~singledispatch.register` attribute can also be used in a " +"functional form::" msgstr "" "Pour permettre l'enregistrement de *lambdas* et de fonctions pré-existantes, " "l'attribut :func:`register` peut être utilisé sous forme fonctionnelle ::" -#: library/functools.rst:523 +#: library/functools.rst:581 #, fuzzy msgid "" -"The :func:`register` attribute returns the undecorated function. This " -"enables decorator stacking, :mod:`pickling`, and the creation of " -"unit tests for each variant independently::" +"The :func:`~singledispatch.register` attribute returns the undecorated " +"function. This enables decorator stacking, :mod:`pickling`, and the " +"creation of unit tests for each variant independently::" msgstr "" "L'attribut :func:`register` renvoie la fonction non décorée ce qui permet " "d'empiler les décorateurs, la sérialisation, et la création de tests " "unitaires pour chaque variante indépendamment ::" -#: library/functools.rst:537 +#: library/functools.rst:595 msgid "" "When called, the generic function dispatches on the type of the first " "argument::" @@ -638,14 +704,14 @@ msgstr "" "Quand elle est appelée, la fonction générique distribue sur le type du " "premier argument ::" -#: library/functools.rst:557 +#: library/functools.rst:615 #, fuzzy msgid "" "Where there is no registered implementation for a specific type, its method " "resolution order is used to find a more generic implementation. The original " -"function decorated with ``@singledispatch`` is registered for the base :" -"class:`object` type, which means it is used if no better implementation is " -"found." +"function decorated with ``@singledispatch`` is registered for the " +"base :class:`object` type, which means it is used if no better " +"implementation is found." msgstr "" "Quand il n'y a pas d'implémentation enregistrée pour un type spécifique, son " "ordre de résolution de méthode est utilisé pour trouver une implémentation " @@ -653,14 +719,14 @@ msgstr "" "est enregistrée pour le type d'``object``, et elle sera utilisée si aucune " "implémentation n'est trouvée." -#: library/functools.rst:563 +#: library/functools.rst:621 msgid "" "If an implementation is registered to an :term:`abstract base class`, " "virtual subclasses of the base class will be dispatched to that " "implementation::" msgstr "" -#: library/functools.rst:578 +#: library/functools.rst:636 #, fuzzy msgid "" "To check which implementation the generic function will choose for a given " @@ -669,7 +735,7 @@ msgstr "" "Pour vérifier quelle implémentation la fonction générique choisira pour un " "type donné, utiliser l'attribut ``dispatch()`` ::" -#: library/functools.rst:586 +#: library/functools.rst:644 msgid "" "To access all registered implementations, use the read-only ``registry`` " "attribute::" @@ -677,34 +743,36 @@ msgstr "" "Pour accéder à toutes les implémentations enregistrées, utiliser l'attribut " "en lecture seule ``registry`` ::" -#: library/functools.rst:600 +#: library/functools.rst:658 #, fuzzy -msgid "The :func:`register` attribute now supports using type annotations." +msgid "" +"The :func:`~singledispatch.register` attribute now supports using type " +"annotations." msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:603 +#: library/functools.rst:661 #, fuzzy msgid "" -"The :func:`register` attribute now supports :data:`types.UnionType` and :" -"data:`typing.Union` as type annotations." +"The :func:`~singledispatch.register` attribute now " +"supports :class:`typing.Union` as a type annotation." msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:610 +#: library/functools.rst:668 msgid "" -"Transform a method into a :term:`single-dispatch ` :term:" -"`generic function`." +"Transform a method into a :term:`single-dispatch ` :term:`generic function`." msgstr "" -"Transforme une méthode en une :term:`fonction générique ` :" -"term:`single-dispatch `." +"Transforme une méthode en une :term:`fonction générique ` :term:`single-dispatch `." -#: library/functools.rst:613 +#: library/functools.rst:671 #, fuzzy msgid "" "To define a generic method, decorate it with the ``@singledispatchmethod`` " -"decorator. When defining a function using ``@singledispatchmethod``, note " -"that the dispatch happens on the type of the first non-*self* or non-*cls* " +"decorator. When defining a method using ``@singledispatchmethod``, note that " +"the dispatch happens on the type of the first non-*self* or non-*cls* " "argument::" msgstr "" "Pour définir une fonction générique, il faut la décorer avec le décorateur " @@ -712,23 +780,26 @@ msgstr "" "type du premier argument non *self* ni *cls*, donc la fonction doit être " "conçue en conséquence ::" -#: library/functools.rst:631 +#: library/functools.rst:689 msgid "" -"``@singledispatchmethod`` supports nesting with other decorators such as :" -"func:`@classmethod`. Note that to allow for ``dispatcher." -"register``, ``singledispatchmethod`` must be the *outer most* decorator. " -"Here is the ``Negator`` class with the ``neg`` methods bound to the class, " -"rather than an instance of the class::" +"``@singledispatchmethod`` supports nesting with other decorators such " +"as :deco:`classmethod`. Note that to allow for ``dispatcher.register``, " +"``singledispatchmethod`` must be the *outer most* decorator. Here is the " +"``Negator`` class with the ``neg`` methods bound to the class, rather than " +"an instance of the class::" msgstr "" -#: library/functools.rst:653 +#: library/functools.rst:711 msgid "" -"The same pattern can be used for other similar decorators: :func:" -"`@staticmethod`, :func:`@abstractmethod`, " -"and others." +"The same pattern can be used for other similar " +"decorators: :deco:`staticmethod`, :deco:`~abc.abstractmethod`, and others." msgstr "" -#: library/functools.rst:662 +#: library/functools.rst:716 +msgid "Added support of non-:term:`descriptor` callables." +msgstr "" + +#: library/functools.rst:722 #, fuzzy msgid "" "Update a *wrapper* function to look like the *wrapped* function. The " @@ -737,12 +808,11 @@ msgid "" "function and which attributes of the wrapper function are updated with the " "corresponding attributes from the original function. The default values for " "these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` " -"(which assigns to the wrapper function's :attr:`~function.__module__`, :attr:" -"`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function." -"__annotations__`, :attr:`~function.__type_params__`, and :attr:`~function." -"__doc__`, the documentation string) and ``WRAPPER_UPDATES`` (which updates " -"the wrapper function's :attr:`~function.__dict__`, i.e. the instance " -"dictionary)." +"(which assigns to the wrapper " +"function's :attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__annotations__`, :attr:`~function.__type_params__`, " +"and :attr:`~function.__doc__`, the documentation string) and " +"``WRAPPER_UPDATES`` (which updates the wrapper " +"function's :attr:`~function.__dict__`, i.e. the instance dictionary)." msgstr "" "Met à jour la fonction *wrapper* pour ressembler à la fonction *wrapped*. " "Les arguments optionnels sont des *n*-uplets pour spécifier quels attributs " @@ -756,7 +826,7 @@ msgstr "" "met à jour le ``__dict__`` de la fonction englobante, c'est-à-dire le " "dictionnaire de l'instance)." -#: library/functools.rst:674 +#: library/functools.rst:734 msgid "" "To allow access to the original function for introspection and other " "purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), " @@ -764,11 +834,11 @@ msgid "" "that refers to the function being wrapped." msgstr "" "Pour autoriser l'accès à la fonction originale pour l'introspection ou à " -"d'autres fins (par ex. outrepasser l'accès à un décorateur de cache comme :" -"func:`lru_cache`), cette fonction ajoute automatiquement un attribut " +"d'autres fins (par ex. outrepasser l'accès à un décorateur de cache " +"comme :func:`lru_cache`), cette fonction ajoute automatiquement un attribut " "``__wrapped__`` qui référence la fonction englobée." -#: library/functools.rst:679 +#: library/functools.rst:739 msgid "" "The main intended use for this function is in :term:`decorator` functions " "which wrap the decorated function and return the wrapper. If the wrapper " @@ -782,7 +852,7 @@ msgstr "" "décorateur, au lieu de la définition originale, métadonnées souvent bien " "moins utiles." -#: library/functools.rst:685 +#: library/functools.rst:745 msgid "" ":func:`update_wrapper` may be used with callables other than functions. Any " "attributes named in *assigned* or *updated* that are missing from the object " @@ -796,28 +866,28 @@ msgstr "" "dans la fonction englobante). :exc:`AttributeError` est toujours levée si le " "fonction englobante elle même a des attributs non existants dans *updated*." -#: library/functools.rst:691 +#: library/functools.rst:751 msgid "" -"The ``__wrapped__`` attribute is now automatically added. The :attr:" -"`~function.__annotations__` attribute is now copied by default. Missing " -"attributes no longer trigger an :exc:`AttributeError`." +"The ``__wrapped__`` attribute is now automatically added. " +"The :attr:`~function.__annotations__` attribute is now copied by default. " +"Missing attributes no longer trigger an :exc:`AttributeError`." msgstr "" -#: library/functools.rst:696 +#: library/functools.rst:756 msgid "" "The ``__wrapped__`` attribute now always refers to the wrapped function, " -"even if that function defined a ``__wrapped__`` attribute. (see :issue:" -"`17482`)" +"even if that function defined a ``__wrapped__`` attribute. " +"(see :issue:`17482`)" msgstr "" "L'attribut ``__wrapped__`` renvoie toujours la fonction englobée, même si " "cette fonction définit un attribut ``__wrapped__``. (voir :issue:`17482`)" -#: library/functools.rst:701 +#: library/functools.rst:761 msgid "" "The :attr:`~function.__type_params__` attribute is now copied by default." msgstr "" -#: library/functools.rst:707 +#: library/functools.rst:767 msgid "" "This is a convenience function for invoking :func:`update_wrapper` as a " "function decorator when defining a wrapper function. It is equivalent to " @@ -829,29 +899,30 @@ msgstr "" "C'est équivalent à ``partial(update_wrapper, wrapped=wrapped, " "assigned=assigned, updated=updated)``. Par exemple ::" -#: library/functools.rst:733 +#: library/functools.rst:793 +#, fuzzy msgid "" "Without the use of this decorator factory, the name of the example function " -"would have been ``'wrapper'``, and the docstring of the original :func:" -"`example` would have been lost." +"would have been ``'wrapper'``, and the docstring of the original :func:`!" +"example` would have been lost." msgstr "" "Sans l'utilisation de cette usine à décorateur, le nom de la fonction " "d'exemple aurait été ``'wrapper'``, et la chaîne de documentation de la " "fonction :func:`example` originale aurait été perdue." -#: library/functools.rst:741 +#: library/functools.rst:801 msgid ":class:`partial` Objects" msgstr "Objets :class:`partial`" -#: library/functools.rst:743 +#: library/functools.rst:803 msgid "" ":class:`partial` objects are callable objects created by :func:`partial`. " "They have three read-only attributes:" msgstr "" -"Les objets :class:`partial` sont des objets appelables créés par :func:" -"`partial`. Ils ont trois attributs en lecture seule :" +"Les objets :class:`partial` sont des objets appelables créés " +"par :func:`partial`. Ils ont trois attributs en lecture seule :" -#: library/functools.rst:749 +#: library/functools.rst:809 msgid "" "A callable object or function. Calls to the :class:`partial` object will be " "forwarded to :attr:`func` with new arguments and keywords." @@ -859,7 +930,7 @@ msgstr "" "Un objet ou une fonction appelable. Les appels à l'objet :class:`partial` " "seront transmis à :attr:`func` avec les nouveaux arguments et mots-clés." -#: library/functools.rst:755 +#: library/functools.rst:815 msgid "" "The leftmost positional arguments that will be prepended to the positional " "arguments provided to a :class:`partial` object call." @@ -867,7 +938,7 @@ msgstr "" "Les arguments positionnels qui seront ajoutés avant les arguments fournis " "lors de l'appel d'un objet :class:`partial`." -#: library/functools.rst:761 +#: library/functools.rst:821 msgid "" "The keyword arguments that will be supplied when the :class:`partial` object " "is called." @@ -875,16 +946,14 @@ msgstr "" "Les arguments nommés qui seront fournis quand l'objet :class:`partial` est " "appelé." -#: library/functools.rst:764 +#: library/functools.rst:824 #, fuzzy msgid "" ":class:`partial` objects are like :ref:`function objects ` in that they are callable, weak referenceable, and can have " -"attributes. There are some important differences. For instance, the :attr:" -"`~function.__name__` and :attr:`function.__doc__` attributes are not created " -"automatically. Also, :class:`partial` objects defined in classes behave " -"like static methods and do not transform into bound methods during instance " -"attribute look-up." +"attributes. There are some important differences. For instance, " +"the :attr:`~definition.__name__` and :attr:`~definition.__doc__` attributes " +"are not created automatically." msgstr "" "Les objets :class:`partial` sont comme des objets :class:`function` de par " "le fait qu'il sont appelables, référençables, et peuvent avoir des " @@ -894,6 +963,13 @@ msgstr "" "classes se comportent comme des méthodes statiques et ne se transforment pas " "en méthodes liées durant la recherche d'attributs dans l'instance." +#, fuzzy +#~ msgid "" +#~ "The :func:`register` attribute now supports :data:`types.UnionType` " +#~ "and :data:`typing.Union` as type annotations." +#~ msgstr "" +#~ "L’attribut :func:`register` gère l’utilisation des indications de type." + #~ msgid "Automatic addition of the ``__wrapped__`` attribute." #~ msgstr "Ajout automatique de l'attribut ``__wrapped__``." diff --git a/library/gc.po b/library/gc.po index c9c360d39..bdcc09094 100644 --- a/library/gc.po +++ b/library/gc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-09-07 00:51+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" @@ -20,7 +20,7 @@ msgstr "" msgid ":mod:`!gc` --- Garbage Collector interface" msgstr ":mod:`gc` — Interface du ramasse-miettes" -#: library/gc.rst:12 +#: library/gc.rst:9 msgid "" "This module provides an interface to the optional garbage collector. It " "provides the ability to disable the collector, tune the collection " @@ -45,24 +45,25 @@ msgstr "" "option fait que les objets inatteignables, au lieu d'être détruits, sont " "placés dans la liste ``gc.garbage`` pour pouvoir y être examinés." -#: library/gc.rst:23 -msgid "The :mod:`gc` module provides the following functions:" +#: library/gc.rst:20 +#, fuzzy +msgid "The :mod:`!gc` module provides the following functions:" msgstr "Le module :mod:`gc` contient les fonctions suivantes :" -#: library/gc.rst:28 +#: library/gc.rst:25 msgid "Enable automatic garbage collection." msgstr "Active le ramasse-miettes." -#: library/gc.rst:33 +#: library/gc.rst:30 msgid "Disable automatic garbage collection." msgstr "Désactive le ramasse-miettes." -#: library/gc.rst:38 +#: library/gc.rst:35 msgid "Return ``True`` if automatic collection is enabled." msgstr "" "Renvoie ``True`` ou ``False`` selon que le ramasse-miettes est activé ou non." -#: library/gc.rst:43 +#: library/gc.rst:40 #, fuzzy msgid "" "With no arguments, run a full collection. The optional argument " @@ -76,7 +77,7 @@ msgstr "" "numéro de la génération n'est pas valide. Cette fonction renvoie le nombre " "d'objets inatteignables qui ont été détectés." -#: library/gc.rst:48 +#: library/gc.rst:45 msgid "" "The free lists maintained for a number of built-in types are cleared " "whenever a full collection or collection of the highest generation (2) is " @@ -84,13 +85,21 @@ msgid "" "implementation, in particular :class:`float`." msgstr "" -#: library/gc.rst:53 +#: library/gc.rst:50 msgid "" "The effect of calling ``gc.collect()`` while the interpreter is already " "performing a collection is undefined." msgstr "" -#: library/gc.rst:59 +#: library/gc.rst:53 +msgid "``generation=1`` performs an increment of collection." +msgstr "" + +#: library/gc.rst:56 +msgid "``generation=1`` performs collection of the middle generation." +msgstr "" + +#: library/gc.rst:62 msgid "" "Set the garbage collection debugging flags. Debugging information will be " "written to ``sys.stderr``. See below for a list of debugging flags which " @@ -100,11 +109,11 @@ msgstr "" "d'informations sur ``sys.stderr``. Une liste d'options se trouve plus bas. " "Les options peuvent se combiner par les opérateurs bit à bit." -#: library/gc.rst:66 +#: library/gc.rst:69 msgid "Return the debugging flags currently set." msgstr "Renvoie les options de débogage actives." -#: library/gc.rst:71 +#: library/gc.rst:74 #, fuzzy msgid "" "Returns a list of all objects tracked by the collector, excluding the list " @@ -115,11 +124,19 @@ msgstr "" "cette liste elle-même. Le paramètre facultatif *generation* restreint la " "liste aux objets d'une génération particulière." -#: library/gc.rst:75 +#: library/gc.rst:78 msgid "New *generation* parameter." msgstr "ajout du paramètre *generation*." -#: library/gc.rst:78 +#: library/gc.rst:81 +msgid "Generation 1 is removed" +msgstr "" + +#: library/gc.rst:84 +msgid "Generation 1 is reintroduced to maintain GC behavior from 3.13." +msgstr "" + +#: library/gc.rst:87 msgid "" "Raises an :ref:`auditing event ` ``gc.get_objects`` with argument " "``generation``." @@ -127,7 +144,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_objects`` avec " "l'argument ``generation``." -#: library/gc.rst:82 +#: library/gc.rst:91 msgid "" "Return a list of three per-generation dictionaries containing collection " "statistics since interpreter start. The number of keys may change in the " @@ -138,13 +155,13 @@ msgstr "" "l'interpréteur. Les clés actuellement présentes sont les suivantes (d'autres " "pourraient être ajoutées dans des versions ultérieures) :" -#: library/gc.rst:87 +#: library/gc.rst:96 msgid "``collections`` is the number of times this generation was collected;" msgstr "" "``collections``, le nombre de fois où cette génération a été examinée par le " "ramasse-miettes ;" -#: library/gc.rst:89 +#: library/gc.rst:98 msgid "" "``collected`` is the total number of objects collected inside this " "generation;" @@ -152,17 +169,40 @@ msgstr "" "``collected``, le nombre total d'objets qui ont été détruits alors qu'ils " "étaient dans cette génération ;" -#: library/gc.rst:92 +#: library/gc.rst:101 +#, fuzzy msgid "" "``uncollectable`` is the total number of objects which were found to be " "uncollectable (and were therefore moved to the :data:`garbage` list) inside " -"this generation." +"this generation;" msgstr "" "``uncollectable``, le nombre total d'objets qui ont été identifiés comme " "indestructibles (et donc ajoutés à la liste :data:`garbage`) au sein de " "cette génération." -#: library/gc.rst:101 +#: library/gc.rst:105 +#, fuzzy +msgid "" +"``candidates`` is the total number of objects in this generation which were " +"considered for collection and traversed;" +msgstr "" +"``collections``, le nombre de fois où cette génération a été examinée par le " +"ramasse-miettes ;" + +#: library/gc.rst:108 +#, fuzzy +msgid "" +"``duration`` is the total time in seconds spent in collections for this " +"generation." +msgstr "" +"``collected``, le nombre total d'objets qui ont été détruits alors qu'ils " +"étaient dans cette génération ;" + +#: library/gc.rst:113 +msgid "Add ``duration`` and ``candidates``." +msgstr "" + +#: library/gc.rst:119 msgid "" "Set the garbage collection thresholds (the collection frequency). Setting " "*threshold0* to zero disables collection." @@ -171,7 +211,8 @@ msgstr "" "fréquence de passage. Si *threshold0* est mis à zéro, le ramasse-miettes ne " "passe jamais." -#: library/gc.rst:104 +#: library/gc.rst:122 +#, fuzzy msgid "" "The GC classifies objects into three generations depending on how many " "collection sweeps they have survived. New objects are placed in the " @@ -185,8 +226,9 @@ msgid "" "examined. If generation ``0`` has been examined more than *threshold1* " "times since generation ``1`` has been examined, then generation ``1`` is " "examined as well. With the third generation, things are a bit more " -"complicated, see `Collecting the oldest generation `_ for more " +"complicated, see `Collecting the oldest generation `_ for more " "information." msgstr "" "Les objets sont répartis en trois générations en fonction du nombre de " @@ -205,14 +247,28 @@ msgstr "" "devguide.python.org/garbage_collector/#collecting-the-oldest-generation>`_ " "(dans le guide du développeur, en anglais)." -#: library/gc.rst:121 +#: library/gc.rst:136 +msgid "" +"See `Garbage collector design `_ for more information." +msgstr "" + +#: library/gc.rst:138 +msgid "*threshold2* is ignored" +msgstr "" + +#: library/gc.rst:141 +msgid "*threshold2* is restored to match Python 3.13 behavior." +msgstr "" + +#: library/gc.rst:147 msgid "" "Return the current collection counts as a tuple of ``(count0, count1, " "count2)``." msgstr "" "Renvoie un triplet des nombres totaux de passages effectués par génération." -#: library/gc.rst:127 +#: library/gc.rst:153 msgid "" "Return the current collection thresholds as a tuple of ``(threshold0, " "threshold1, threshold2)``." @@ -220,7 +276,7 @@ msgstr "" "Renvoie les seuils de passage sous la forme du triplet ``(threshold0, " "threshold1, threshold2)``." -#: library/gc.rst:133 +#: library/gc.rst:159 msgid "" "Return the list of objects that directly refer to any of objs. This function " "will only locate those containers which support garbage collection; " @@ -233,7 +289,7 @@ msgstr "" "instances de certains types d'extension qui contiennent bien des références " "sans pour autant prendre en charge le ramassage des miettes." -#: library/gc.rst:138 +#: library/gc.rst:164 msgid "" "Note that objects which have already been dereferenced, but which live in " "cycles and have not yet been collected by the garbage collector can be " @@ -244,7 +300,7 @@ msgstr "" "mémoire à cause d'un cycle. Pour les exclure, appelez :func:`collect` juste " "avant :func:`get_referrers`." -#: library/gc.rst:144 +#: library/gc.rst:170 msgid "" "Care must be taken when using objects returned by :func:`get_referrers` " "because some of them could still be under construction and hence in a " @@ -256,7 +312,7 @@ msgstr "" "temporairement instable. Mieux vaut réserver :func:`get_referrers` au " "débogage." -#: library/gc.rst:149 +#: library/gc.rst:175 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." @@ -264,30 +320,31 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_referrers`` avec " "l'argument ``objs``." -#: library/gc.rst:154 +#: library/gc.rst:180 msgid "" "Return a list of objects directly referred to by any of the arguments. The " -"referents returned are those objects visited by the arguments' C-level :c:" -"member:`~PyTypeObject.tp_traverse` methods (if any), and may not be all " -"objects actually directly reachable. :c:member:`~PyTypeObject.tp_traverse` " -"methods are supported only by objects that support garbage collection, and " -"are only required to visit objects that may be involved in a cycle. So, for " -"example, if an integer is directly reachable from an argument, that integer " -"object may or may not appear in the result list." +"referents returned are those objects visited by the arguments' C-" +"level :c:member:`~PyTypeObject.tp_traverse` methods (if any), and may not be " +"all objects actually directly " +"reachable. :c:member:`~PyTypeObject.tp_traverse` methods are supported only " +"by objects that support garbage collection, and are only required to visit " +"objects that may be involved in a cycle. So, for example, if an integer is " +"directly reachable from an argument, that integer object may or may not " +"appear in the result list." msgstr "" "Renvoie une liste des objets pointés par les références que contiennent les " -"arguments. Ils sont déterminés en appelant, si présente, la méthode C :c:" -"member:`~PyTypeObject.tp_traverse` de chaque argument, qui visite les objets " -"auxquels cet argument fait référence. Il est à noter que :c:member:" -"`~PyTypeObject.tp_traverse` n'est définie que par les objets qui gèrent le " -"ramassage des miettes, et n'a l'obligation de visiter que les objets qui " -"peuvent potentiellement faire partie d'un cycle. Ainsi, la liste renvoyée " -"par cette fonction ne contient par forcément tous les objets qu'il est " -"possible d'atteindre à partir des arguments. Par exemple, si l'un des " +"arguments. Ils sont déterminés en appelant, si présente, la méthode " +"C :c:member:`~PyTypeObject.tp_traverse` de chaque argument, qui visite les " +"objets auxquels cet argument fait référence. Il est à noter " +"que :c:member:`~PyTypeObject.tp_traverse` n'est définie que par les objets " +"qui gèrent le ramassage des miettes, et n'a l'obligation de visiter que les " +"objets qui peuvent potentiellement faire partie d'un cycle. Ainsi, la liste " +"renvoyée par cette fonction ne contient par forcément tous les objets qu'il " +"est possible d'atteindre à partir des arguments. Par exemple, si l'un des " "arguments contient un entier, ce dernier objet peut être présent ou non dans " "la liste." -#: library/gc.rst:162 +#: library/gc.rst:188 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." @@ -295,7 +352,7 @@ msgstr "" "Lève un :ref:`événement d'audit ` ``gc.get_referents`` avec " "l'argument ``objs``." -#: library/gc.rst:166 +#: library/gc.rst:192 msgid "" "Returns ``True`` if the object is currently tracked by the garbage " "collector, ``False`` otherwise. As a general rule, instances of atomic " @@ -312,7 +369,7 @@ msgstr "" "ramasse-miettes dans les cas simples, comme les dictionnaires dont toutes " "les clés et valeurs sont atomiques ::" -#: library/gc.rst:191 +#: library/gc.rst:215 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" @@ -320,13 +377,13 @@ msgstr "" "Renvoie ``True`` ou ``False`` selon que l'argument a été finalisé par le " "ramasse-miettes. ::" -#: library/gc.rst:212 +#: library/gc.rst:236 msgid "" "Freeze all the objects tracked by the garbage collector; move them to a " "permanent generation and ignore them in all the future collections." msgstr "" -#: library/gc.rst:215 +#: library/gc.rst:239 msgid "" "If a process will ``fork()`` without ``exec()``, avoiding unnecessary copy-" "on-write in child processes will maximize memory sharing and reduce overall " @@ -338,17 +395,17 @@ msgid "" "``gc.enable()`` early in child processes." msgstr "" -#: library/gc.rst:229 +#: library/gc.rst:253 msgid "" "Unfreeze the objects in the permanent generation, put them back into the " "oldest generation." msgstr "" -#: library/gc.rst:237 +#: library/gc.rst:261 msgid "Return the number of objects in the permanent generation." msgstr "" -#: library/gc.rst:242 +#: library/gc.rst:266 msgid "" "The following variables are provided for read-only access (you can mutate " "the values but should not rebind them):" @@ -356,7 +413,7 @@ msgstr "" "Les variables suivantes sont publiques, mais elles ne sont pas censées être " "modifiées (vous pouvez les muter, mais pas les redéfinir) :" -#: library/gc.rst:247 +#: library/gc.rst:271 msgid "" "A list of objects which the collector found to be unreachable but could not " "be freed (uncollectable objects). Starting with Python 3.4, this list " @@ -369,7 +426,7 @@ msgstr "" "types d'extension définis en C avec un champ ``tp_del`` différent de " "``NULL``." -#: library/gc.rst:252 +#: library/gc.rst:276 msgid "" "If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added " "to this list rather than freed." @@ -377,29 +434,29 @@ msgstr "" "Si :const:`DEBUG_SAVEALL` est actif, tous les objets inatteignables sont " "ajoutés à cette liste au lieu d'être détruits." -#: library/gc.rst:255 +#: library/gc.rst:279 msgid "" -"If this list is non-empty at :term:`interpreter shutdown`, a :exc:" -"`ResourceWarning` is emitted, which is silent by default. If :const:" -"`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable objects are " -"printed." +"If this list is non-empty at :term:`interpreter shutdown`, " +"a :exc:`ResourceWarning` is emitted, which is silent by default. " +"If :const:`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable " +"objects are printed." msgstr "" "Si cette liste n'est pas vide lors de l':term:`arrêt de l'interpréteur " "`, un :exc:`ResourceWarning` est émis (les " -"avertissements de ce type sont silencieux par défaut). De plus, si :const:" -"`DEBUG_UNCOLLECTABLE` est actif, tous les objets indestructibles sont " -"affichés." +"avertissements de ce type sont silencieux par défaut). De plus, " +"si :const:`DEBUG_UNCOLLECTABLE` est actif, tous les objets indestructibles " +"sont affichés." -#: library/gc.rst:261 +#: library/gc.rst:285 #, fuzzy msgid "" "Following :pep:`442`, objects with a :meth:`~object.__del__` method don't " "end up in :data:`gc.garbage` anymore." msgstr "" -"en application de la :pep:`442`, les objets qui définissent une méthode :" -"meth:`__del__` ne finissent plus dans :attr:`gc.garbage`." +"en application de la :pep:`442`, les objets qui définissent une " +"méthode :meth:`__del__` ne finissent plus dans :attr:`gc.garbage`." -#: library/gc.rst:267 +#: library/gc.rst:291 msgid "" "A list of callbacks that will be invoked by the garbage collector before and " "after collection. The callbacks will be called with two arguments, *phase* " @@ -408,20 +465,20 @@ msgstr "" "Liste de fonctions de rappel lancées par le ramasse-miettes avant et après " "un passage. Elles prennent deux arguments, *phase* et *info*." -#: library/gc.rst:271 +#: library/gc.rst:295 msgid "*phase* can be one of two values:" msgstr "*phase* peut prendre deux valeurs :" -#: library/gc.rst:273 +#: library/gc.rst:297 msgid "\"start\": The garbage collection is about to start." msgstr "``\"start\"`` lorsque le passage du ramasse-miettes est imminent." -#: library/gc.rst:275 +#: library/gc.rst:299 msgid "\"stop\": The garbage collection has finished." msgstr "" "``\"stop\"`` lorsque le passage du ramasse-miettes vient de se terminer." -#: library/gc.rst:277 +#: library/gc.rst:301 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" @@ -429,11 +486,11 @@ msgstr "" "*info* est un dictionnaire qui donne plus d'informations à la fonction de " "rappel. Les clés suivantes sont actuellement présentes :" -#: library/gc.rst:280 +#: library/gc.rst:304 msgid "\"generation\": The oldest generation being collected." msgstr "``\"generation\"``, la génération la plus âgée intégrée à ce passage ;" -#: library/gc.rst:282 +#: library/gc.rst:306 msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." @@ -441,7 +498,7 @@ msgstr "" "``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " "détruits avec succès ;" -#: library/gc.rst:285 +#: library/gc.rst:309 msgid "" "\"uncollectable\": When *phase* is \"stop\", the number of objects that " "could not be collected and were put in :data:`garbage`." @@ -449,7 +506,25 @@ msgstr "" "``\"uncollectable\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " "indestructibles ajoutés à :data:`garbage`." -#: library/gc.rst:288 +#: library/gc.rst:312 +#, fuzzy +msgid "" +"\"candidates\": When *phase* is \"stop\", the total number of objects in " +"this generation which were considered for collection and traversed." +msgstr "" +"``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"détruits avec succès ;" + +#: library/gc.rst:315 +#, fuzzy +msgid "" +"\"duration\": When *phase* is \"stop\", the time in seconds spent in the " +"collection." +msgstr "" +"``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"détruits avec succès ;" + +#: library/gc.rst:318 msgid "" "Applications can add their own callbacks to this list. The primary use " "cases are:" @@ -457,7 +532,7 @@ msgstr "" "Toute application peut ajouter ses propres fonctions de rappel à cette " "liste. Voici les principales applications :" -#: library/gc.rst:291 +#: library/gc.rst:321 msgid "" "Gathering statistics about garbage collection, such as how often various " "generations are collected, and how long the collection takes." @@ -466,7 +541,7 @@ msgstr "" "fréquence à laquelle chaque génération est examinée, ou bien le temps d'un " "passage ;" -#: library/gc.rst:295 +#: library/gc.rst:325 msgid "" "Allowing applications to identify and clear their own uncollectable types " "when they appear in :data:`garbage`." @@ -474,13 +549,17 @@ msgstr "" "Identifier les types définis par une application dont les instances " "s'ajoutent à :data:`garbage` car elles sont indestructibles." -#: library/gc.rst:301 +#: library/gc.rst:330 +msgid "Add \"duration\" and \"candidates\"." +msgstr "" + +#: library/gc.rst:334 msgid "The following constants are provided for use with :func:`set_debug`:" msgstr "" "Les constantes suivantes définissent les options de débogage que l'on peut " "passer à :func:`set_debug` :" -#: library/gc.rst:306 +#: library/gc.rst:339 msgid "" "Print statistics during collection. This information can be useful when " "tuning the collection frequency." @@ -488,11 +567,11 @@ msgstr "" "Affiche des statistiques durant les passages du ramasse-miettes. Utile pour " "pouvoir régler la fréquence des passages." -#: library/gc.rst:312 +#: library/gc.rst:345 msgid "Print information on collectable objects found." msgstr "Affiche des informations sur les objets détruits." -#: library/gc.rst:317 +#: library/gc.rst:350 msgid "" "Print information of uncollectable objects found (objects which are not " "reachable but cannot be freed by the collector). These objects will be " @@ -502,7 +581,7 @@ msgstr "" "ajoutés à la liste ``garbage``, qui sont inatteignables mais dont la mémoire " "ne peut pas être libérée)." -#: library/gc.rst:321 +#: library/gc.rst:354 msgid "" "Also print the contents of the :data:`garbage` list at :term:`interpreter " "shutdown`, if it isn't empty." @@ -511,7 +590,7 @@ msgstr "" "l'interpréteur `, pour peu que cette liste ne soit pas " "vide." -#: library/gc.rst:327 +#: library/gc.rst:360 msgid "" "When set, all unreachable objects found will be appended to *garbage* rather " "than being freed. This can be useful for debugging a leaking program." @@ -520,7 +599,7 @@ msgstr "" "liste *garbage* au lieu d'être supprimés. Ceci est utile pour déboguer une " "fuite de mémoire." -#: library/gc.rst:333 +#: library/gc.rst:366 msgid "" "The debugging flags necessary for the collector to print information about a " "leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | " diff --git a/library/getopt.po b/library/getopt.po index 4dd14684b..b6a7a8e74 100644 --- a/library/getopt.po +++ b/library/getopt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2025-10-17 09:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -24,33 +24,20 @@ msgstr "" msgid "**Source code:** :source:`Lib/getopt.py`" msgstr "**Code source :** :source:`Lib/getopt.py`" -#: library/getopt.rst:10 +#: library/getopt.rst:12 msgid "" -"The :mod:`getopt` module is :term:`soft deprecated` and will not be " -"developed further; development will continue with the :mod:`argparse` module." +"This module is considered feature complete. A more declarative and " +"extensible alternative to this API is provided in the :mod:`optparse` " +"module. Further functional enhancements for command line parameter " +"processing are provided either as third party modules on PyPI, or else as " +"features in the :mod:`argparse` module." msgstr "" -#: library/getopt.rst:17 +#: library/getopt.rst:20 #, fuzzy msgid "" -"The :mod:`getopt` module is a parser for command line options whose API is " -"designed to be familiar to users of the C :c:func:`!getopt` function. Users " -"who are unfamiliar with the C :c:func:`!getopt` function or who would like " -"to write less code and get better help and error messages should consider " -"using the :mod:`argparse` module instead." -msgstr "" -"Le module :mod:`getopt` est un analyseur pour les options de ligne de " -"commande dont l’API est conçue pour être familière aux utilisateurs de la " -"fonction C :c:func:`getopt`. Les utilisateurs qui ne connaissent pas la " -"fonction :c:func:`getopt` ou qui aimeraient écrire moins de code, obtenir " -"une meilleure aide et de meilleurs messages d’erreur devraient utiliser le " -"module :mod:`argparse`." - -#: library/getopt.rst:25 -#, fuzzy -msgid "" -"This module helps scripts to parse the command line arguments in ``sys." -"argv``. It supports the same conventions as the Unix :c:func:`!getopt` " +"This module helps scripts to parse the command line arguments in " +"``sys.argv``. It supports the same conventions as the Unix :c:func:`!getopt` " "function (including the special meanings of arguments of the form '``-``' " "and '``--``'). Long options similar to those supported by GNU software may " "be used as well via an optional third argument." @@ -62,19 +49,37 @@ msgstr "" "celles prises en charge par le logiciel GNU peuvent également être utilisées " "via un troisième argument facultatif." -#: library/getopt.rst:31 +#: library/getopt.rst:26 +#, fuzzy +msgid "" +"Users who are unfamiliar with the Unix :c:func:`!getopt` function should " +"consider using the :mod:`argparse` module instead. Users who are familiar " +"with the Unix :c:func:`!getopt` function, but would like to get equivalent " +"behavior while writing less code and getting better help and error messages " +"should consider using the :mod:`optparse` module. See :ref:`choosing-an-" +"argument-parser` for additional details." +msgstr "" +"Le module :mod:`getopt` est un analyseur pour les options de ligne de " +"commande dont l’API est conçue pour être familière aux utilisateurs de la " +"fonction C :c:func:`getopt`. Les utilisateurs qui ne connaissent pas la " +"fonction :c:func:`getopt` ou qui aimeraient écrire moins de code, obtenir " +"une meilleure aide et de meilleurs messages d’erreur devraient utiliser le " +"module :mod:`argparse`." + +#: library/getopt.rst:33 msgid "This module provides two functions and an exception:" msgstr "Ce module fournit deux fonctions et une exception :" -#: library/getopt.rst:37 +#: library/getopt.rst:39 #, fuzzy msgid "" "Parses command line options and parameter list. *args* is the argument list " "to be parsed, without the leading reference to the running program. " "Typically, this means ``sys.argv[1:]``. *shortopts* is the string of option " "letters that the script wants to recognize, with options that require an " -"argument followed by a colon (``':'``; i.e., the same format that Unix :c:" -"func:`!getopt` uses)." +"argument followed by a colon (``':'``) and options that accept an optional " +"argument followed by two colons (``'::'``); i.e., the same format that " +"Unix :c:func:`!getopt` uses." msgstr "" "Analyse les options de ligne de commande et la liste des paramètres. *args* " "est la liste d’arguments à analyser, sans la référence principale au " @@ -82,10 +87,10 @@ msgstr "" "(donc que le premier argument contenant le nom du programme n’est pas dans " "la liste). *shortopts* est la chaîne de lettres d’options que le script doit " "reconnaître, avec des options qui requièrent un argument suivi d’un signe " -"deux-points (``:``, donc le même format que la version Unix de :c:func:" -"`getopt` utilise)." +"deux-points (``:``, donc le même format que la version Unix " +"de :c:func:`getopt` utilise)." -#: library/getopt.rst:45 +#: library/getopt.rst:48 #, fuzzy msgid "" "Unlike GNU :c:func:`!getopt`, after a non-option argument, all further " @@ -96,18 +101,20 @@ msgstr "" "une option, aucun argument ne sera considéré comme appartenant à une option. " "Ceci est similaire à la façon dont les systèmes UNIX non-GNU fonctionnent." -#: library/getopt.rst:49 +#: library/getopt.rst:52 +#, fuzzy msgid "" "*longopts*, if specified, must be a list of strings with the names of the " "long options which should be supported. The leading ``'--'`` characters " "should not be included in the option name. Long options which require an " -"argument should be followed by an equal sign (``'='``). Optional arguments " -"are not supported. To accept only long options, *shortopts* should be an " -"empty string. Long options on the command line can be recognized so long as " -"they provide a prefix of the option name that matches exactly one of the " -"accepted options. For example, if *longopts* is ``['foo', 'frob']``, the " -"option ``--fo`` will match as ``--foo``, but ``--f`` will not match " -"uniquely, so :exc:`GetoptError` will be raised." +"argument should be followed by an equal sign (``'='``). Long options which " +"accept an optional argument should be followed by an equal sign and question " +"mark (``'=?'``). To accept only long options, *shortopts* should be an empty " +"string. Long options on the command line can be recognized so long as they " +"provide a prefix of the option name that matches exactly one of the accepted " +"options. For example, if *longopts* is ``['foo', 'frob']``, the option ``--" +"fo`` will match as ``--foo``, but ``--f`` will not match uniquely, " +"so :exc:`GetoptError` will be raised." msgstr "" "*longopts*, si spécifié, doit être une liste de chaînes avec les noms des " "options longues qui doivent être prises en charge. Le premier ``'--'`` ne " @@ -121,15 +128,15 @@ msgstr "" "fo`` correspondra à ``--foo``, mais ``--f`` ne correspondra pas de façon " "unique, donc :exc:`GetoptError` sera levé." -#: library/getopt.rst:60 +#: library/getopt.rst:65 msgid "" "The return value consists of two elements: the first is a list of ``(option, " "value)`` pairs; the second is the list of program arguments left after the " "option list was stripped (this is a trailing slice of *args*). Each option-" "and-value pair returned has the option as its first element, prefixed with a " -"hyphen for short options (e.g., ``'-x'``) or two hyphens for long options (e." -"g., ``'--long-option'``), and the option argument as its second element, or " -"an empty string if the option has no argument. The options occur in the " +"hyphen for short options (e.g., ``'-x'``) or two hyphens for long options " +"(e.g., ``'--long-option'``), and the option argument as its second element, " +"or an empty string if the option has no argument. The options occur in the " "list in the same order in which they were found, thus allowing multiple " "occurrences. Long and short options may be mixed." msgstr "" @@ -145,7 +152,11 @@ msgstr "" "trouvées, permettant ainsi plusieurs occurrences. Les options longues et " "courtes peuvent être mélangées." -#: library/getopt.rst:73 +#: library/getopt.rst:75 +msgid "Optional arguments are supported." +msgstr "" + +#: library/getopt.rst:81 msgid "" "This function works like :func:`getopt`, except that GNU style scanning mode " "is used by default. This means that option and non-option arguments may be " @@ -157,7 +168,7 @@ msgstr "" "option peuvent être **intermixés**. La fonction :func:`getopt` arrête le " "traitement des options dès qu’un argument de non-option est rencontré." -#: library/getopt.rst:78 +#: library/getopt.rst:86 #, fuzzy msgid "" "If the first character of the option string is ``'+'``, or if the " @@ -168,7 +179,21 @@ msgstr "" "d’environnement :envvar:`POSIXLY_CORRECT` est définie, le traitement des " "options s’arrête dès qu’un argument non-option est rencontré." -#: library/getopt.rst:85 +#: library/getopt.rst:90 +msgid "" +"If the first character of the option string is ``'-'``, non-option arguments " +"that are followed by options are added to the list of option-and-value pairs " +"as a pair that has ``None`` as its first element and the list of non-option " +"arguments as its second element. The second element of the :func:`!" +"gnu_getopt` result is a list of program arguments after the last option." +msgstr "" + +#: library/getopt.rst:97 +msgid "" +"Support for returning intermixed options and non-option arguments in order." +msgstr "" + +#: library/getopt.rst:103 #, fuzzy msgid "" "This is raised when an unrecognized option is found in the argument list or " @@ -188,38 +213,78 @@ msgstr "" "connexe. S’il n’existe aucune option spécifique à laquelle l’exception se " "rapporte, :attr:`opt` est une chaîne vide." -#: library/getopt.rst:96 +#: library/getopt.rst:114 msgid "Alias for :exc:`GetoptError`; for backward compatibility." msgstr "Alias pour :exc:`GetoptError` ; pour la rétrocompatibilité." -#: library/getopt.rst:98 +#: library/getopt.rst:116 msgid "An example using only Unix style options:" msgstr "Un exemple utilisant uniquement les options de style UNIX :" -#: library/getopt.rst:110 +#: library/getopt.rst:130 msgid "Using long option names is equally easy:" msgstr "L’utilisation de noms d’options longs est tout aussi simple :" -#: library/getopt.rst:123 -msgid "In a script, typical usage is something like this::" +#: library/getopt.rst:145 +msgid "Optional arguments should be specified explicitly:" +msgstr "" + +#: library/getopt.rst:159 +msgid "The order of options and non-option arguments can be preserved:" +msgstr "" + +#: library/getopt.rst:173 +#, fuzzy +msgid "In a script, typical usage is something like this:" msgstr "Dans un script, l’utilisation typique ressemble à ceci ::" -#: library/getopt.rst:152 +#: library/getopt.rst:204 +#, fuzzy msgid "" "Note that an equivalent command line interface could be produced with less " -"code and more informative help and error messages by using the :mod:" -"`argparse` module::" +"code and more informative help and error messages by using " +"the :mod:`optparse` module:" msgstr "" "Notez qu’une interface de ligne de commande équivalente peut être produite " "avec moins de code et des messages d’erreur et d’aide plus informatifs à " "l’aide du module :mod:`argparse` module ::" -#: library/getopt.rst:167 +#: library/getopt.rst:218 +#, fuzzy +msgid "" +"A roughly equivalent command line interface for this case can also be " +"produced by using the :mod:`argparse` module:" +msgstr "" +"Notez qu’une interface de ligne de commande équivalente peut être produite " +"avec moins de code et des messages d’erreur et d’aide plus informatifs à " +"l’aide du module :mod:`argparse` module ::" + +#: library/getopt.rst:233 +msgid "" +"See :ref:`choosing-an-argument-parser` for details on how the ``argparse`` " +"version of this code differs in behaviour from the ``optparse`` (and " +"``getopt``) version." +msgstr "" + +#: library/getopt.rst:239 +#, fuzzy +msgid "Module :mod:`optparse`" +msgstr "Module :mod:`argparse`" + +#: library/getopt.rst:240 +#, fuzzy +msgid "Declarative command line option parsing." +msgstr "" +"Option de ligne de commande alternative et bibliothèque d’analyse " +"d’arguments." + +#: library/getopt.rst:242 msgid "Module :mod:`argparse`" msgstr "Module :mod:`argparse`" -#: library/getopt.rst:168 -msgid "Alternative command line option and argument parsing library." +#: library/getopt.rst:243 +#, fuzzy +msgid "More opinionated command line option and argument parsing library." msgstr "" "Option de ligne de commande alternative et bibliothèque d’analyse " "d’arguments." diff --git a/library/getpass.po b/library/getpass.po index 3e89a8f40..39e046fe7 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-09-28 12:39+0200\n" "Last-Translator: Paquerette \n" "Language-Team: FRENCH \n" @@ -19,13 +19,13 @@ msgstr "" msgid ":mod:`!getpass` --- Portable password input" msgstr "Saisie de mot de passe portable" -#: library/getpass.rst:11 +#: library/getpass.rst:7 msgid "**Source code:** :source:`Lib/getpass.py`" msgstr "**Source code:** :source:`Lib/getpass.py`" #: includes/wasm-notavail.rst:3 msgid "Availability" -msgstr "" +msgstr "Disponibilité" #: includes/wasm-notavail.rst:5 msgid "" @@ -33,11 +33,12 @@ msgid "" "availability` for more information." msgstr "" -#: library/getpass.rst:17 -msgid "The :mod:`getpass` module provides two functions:" +#: library/getpass.rst:13 +#, fuzzy +msgid "The :mod:`!getpass` module provides two functions:" msgstr "Le module :mod:`getpass` fournit 2 fonctions :" -#: library/getpass.rst:21 +#: library/getpass.rst:17 msgid "" "Prompt the user for a password without echoing. The user is prompted using " "the string *prompt*, which defaults to ``'Password: '``. On Unix, the " @@ -53,17 +54,26 @@ msgstr "" "par défaut le terminal de contrôle (:file:`/dev/tty`), ou si celui ci n'est " "pas disponible ce sera ``sys.stderr`` (cet argument sera ignoré sur Windows)." -#: library/getpass.rst:28 +#: library/getpass.rst:24 +msgid "" +"The *echo_char* argument controls how user input is displayed while typing. " +"If *echo_char* is ``None`` (default), input remains hidden. Otherwise, " +"*echo_char* must be a single printable ASCII character and each typed " +"character is replaced by it. For example, ``echo_char='*'`` will display " +"asterisks instead of the actual input." +msgstr "" + +#: library/getpass.rst:30 msgid "" "If echo free input is unavailable getpass() falls back to printing a warning " -"message to *stream* and reading from ``sys.stdin`` and issuing a :exc:" -"`GetPassWarning`." +"message to *stream* and reading from ``sys.stdin`` and issuing " +"a :exc:`GetPassWarning`." msgstr "" "Si aucune saisie en mode sans affichage n'est disponible, ``getpass()`` se " "résoudra à afficher un message d'avertissement vers *stream*, puis lire " "l'entrée depuis ``sys.stdin``, en levant une :exc:`GetPassWarning`." -#: library/getpass.rst:33 +#: library/getpass.rst:35 msgid "" "If you call getpass from within IDLE, the input may be done in the terminal " "you launched IDLE from rather than the idle window itself." @@ -71,37 +81,92 @@ msgstr "" "Si vous appelez *getpass* depuis IDLE, la saisie peut être faite dans le " "terminal depuis lequel IDLE a été lancé, plutôt que dans la fenêtre d'IDLE." -#: library/getpass.rst:38 +#: library/getpass.rst:39 +msgid "" +"On Unix systems, when *echo_char* is set, the terminal will be configured to " +"operate in :manpage:`noncanonical mode " +"`. Common terminal control " +"characters are supported:" +msgstr "" + +#: library/getpass.rst:44 +msgid ":kbd:`Ctrl+A` - Move cursor to beginning of line" +msgstr "" + +#: library/getpass.rst:45 +msgid ":kbd:`Ctrl+E` - Move cursor to end of line" +msgstr "" + +#: library/getpass.rst:46 +msgid ":kbd:`Ctrl+K` - Kill (delete) from cursor to end of line" +msgstr "" + +#: library/getpass.rst:47 +msgid ":kbd:`Ctrl+U` - Kill (delete) entire line" +msgstr "" + +#: library/getpass.rst:48 +msgid ":kbd:`Ctrl+W` - Erase previous word" +msgstr "" + +#: library/getpass.rst:49 +msgid ":kbd:`Ctrl+V` - Insert next character literally (quote)" +msgstr "" + +#: library/getpass.rst:50 +msgid ":kbd:`Backspace`/:kbd:`DEL` - Delete character before cursor" +msgstr "" + +#: library/getpass.rst:52 +msgid "" +"These shortcuts work by reading the terminal's configured control character " +"mappings from termios settings." +msgstr "" + +#: library/getpass.rst:55 +msgid "Added the *echo_char* parameter for keyboard feedback." +msgstr "" + +#: library/getpass.rst:58 +msgid "" +"When using non-empty *echo_char* on Unix, keyboard shortcuts (including " +"cursor movement and line editing) are now properly handled using the " +"terminal's control character configuration." +msgstr "" + +#: library/getpass.rst:65 msgid "A :exc:`UserWarning` subclass issued when password input may be echoed." msgstr "" "Une sous classe d'exception :exc:`UserWarning` est levée quand le mot de " "passe saisi pourrait être affiché." -#: library/getpass.rst:43 +#: library/getpass.rst:70 msgid "Return the \"login name\" of the user." msgstr "Renvoie le *login name* de l'utilisateur." -#: library/getpass.rst:45 +#: library/getpass.rst:72 #, fuzzy msgid "" -"This function checks the environment variables :envvar:`LOGNAME`, :envvar:" -"`USER`, :envvar:`!LNAME` and :envvar:`USERNAME`, in order, and returns the " -"value of the first one which is set to a non-empty string. If none are set, " -"the login name from the password database is returned on systems which " -"support the :mod:`pwd` module, otherwise, an :exc:`OSError` is raised." -msgstr "" -"Cette fonction examine les variables d'environnement :envvar:`LOGNAME`, :" -"envvar:`USER`, :envvar:`LNAME` et :envvar:`USERNAME`, dans cet ordre, et " -"renvoie la valeur de la première qui a comme valeur une string non vide. Si " -"aucune des variables n'est renseignée, dans le cas de systèmes qui prennent " -"en charge le module :mod:`pwd`, le *login name* de la base de données des " -"mots de passes est renvoyé, pour les autres systèmes une exception est levée." +"This function checks the environment " +"variables :envvar:`LOGNAME`, :envvar:`USER`, :envvar:`!LNAME` " +"and :envvar:`USERNAME`, in order, and returns the value of the first one " +"which is set to a non-empty string. If none are set, the login name from " +"the password database is returned on systems which support the :mod:`pwd` " +"module, otherwise, an :exc:`OSError` is raised." +msgstr "" +"Cette fonction examine les variables " +"d'environnement :envvar:`LOGNAME`, :envvar:`USER`, :envvar:`LNAME` " +"et :envvar:`USERNAME`, dans cet ordre, et renvoie la valeur de la première " +"qui a comme valeur une string non vide. Si aucune des variables n'est " +"renseignée, dans le cas de systèmes qui prennent en charge le " +"module :mod:`pwd`, le *login name* de la base de données des mots de passes " +"est renvoyé, pour les autres systèmes une exception est levée." -#: library/getpass.rst:52 +#: library/getpass.rst:79 #, fuzzy msgid "In general, this function should be preferred over :func:`os.getlogin`." msgstr "En général, préférez cette fonction à :func:`os.getlogin()`." -#: library/getpass.rst:54 +#: library/getpass.rst:81 msgid "Previously, various exceptions beyond just :exc:`OSError` were raised." msgstr "" diff --git a/library/gettext.po b/library/gettext.po index a73d62e83..6c9154a3d 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,28 +5,29 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2022-11-15 14:49+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 10:50+0200\n" +"Last-Translator: Julien Palard \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\n" +"X-Generator: Poedit 3.6\n" #: library/gettext.rst:2 #, fuzzy msgid ":mod:`!gettext` --- Multilingual internationalization services" msgstr ":mod:`gettext` — Services d'internationalisation multilingue" -#: library/gettext.rst:10 +#: library/gettext.rst:7 msgid "**Source code:** :source:`Lib/gettext.py`" msgstr "**Code source :** :source:`Lib/gettext.py`" -#: library/gettext.rst:14 +#: library/gettext.rst:11 +#, fuzzy msgid "" -"The :mod:`gettext` module provides internationalization (I18N) and " +"The :mod:`!gettext` module provides internationalization (I18N) and " "localization (L10N) services for your Python modules and applications. It " "supports both the GNU :program:`gettext` message catalog API and a higher " "level, class-based API that may be more appropriate for Python files. The " @@ -36,27 +37,28 @@ msgid "" msgstr "" "Le module :mod:`gettext` fournit un service d'internationalisation (*I18N*) " "et de localisation linguistique (*L10N*) pour vos modules et applications " -"Python. Il est compatible avec l'API du catalogue de messages GNU :program:" -"`gettext` et à un plus haut niveau, avec l'API basée sur les classes qui " -"serait peut-être plus adaptée aux fichiers Python. L'interface décrite ci-" -"dessous vous permet d'écrire les textes de vos modules et applications dans " -"une langue naturelle, puis de fournir un catalogue de traductions pour les " -"lancer ensuite dans d'autres langues naturelles." +"Python. Il est compatible avec l'API du catalogue de messages " +"GNU :program:`gettext` et à un plus haut niveau, avec l'API basée sur les " +"classes qui serait peut-être plus adaptée aux fichiers Python. L'interface " +"décrite ci-dessous vous permet d'écrire les textes de vos modules et " +"applications dans une langue naturelle, puis de fournir un catalogue de " +"traductions pour les lancer ensuite dans d'autres langues naturelles." -#: library/gettext.rst:22 +#: library/gettext.rst:19 msgid "" "Some hints on localizing your Python modules and applications are also given." msgstr "" "Quelques astuces sur la localisation de vos modules et applications Python " "sont également données." -#: library/gettext.rst:26 +#: library/gettext.rst:23 msgid "GNU :program:`gettext` API" msgstr "API GNU :program:`gettext`" -#: library/gettext.rst:28 +#: library/gettext.rst:25 +#, fuzzy msgid "" -"The :mod:`gettext` module defines the following API, which is very similar " +"The :mod:`!gettext` module defines the following API, which is very similar " "to the GNU :program:`gettext` API. If you use this API you will affect the " "translation of your entire application globally. Often this is what you " "want if your application is monolingual, with the choice of language " @@ -72,23 +74,26 @@ msgstr "" "module Python ou si votre application a besoin de changer de langue à la " "volée, il est plus judicieux d'utiliser l'API basée sur des classes." -#: library/gettext.rst:39 +#: library/gettext.rst:36 +#, fuzzy msgid "" -"Bind the *domain* to the locale directory *localedir*. More concretely, :" -"mod:`gettext` will look for binary :file:`.mo` files for the given domain " -"using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}." -"mo`, where *language* is searched for in the environment variables :envvar:" -"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, and :envvar:`LANG` " -"respectively." +"Bind the *domain* to the locale directory *localedir*. More " +"concretely, :mod:`!gettext` will look for binary :file:`.mo` files for the " +"given domain using the path (on Unix): :file:`{localedir}/{language}/" +"LC_MESSAGES/{domain}.mo`, where *language* is searched for in the " +"environment " +"variables :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, " +"and :envvar:`LANG` respectively." msgstr "" "Lie *domain* au répertoire *localedir* des localisations. Plus " "spécifiquement, :mod:`gettext` va chercher les fichiers binaires :file:`.mo` " -"pour un domaine donné, en utilisant le chemin suivant (sous Unix) : :file:" -"`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, où *language* est " -"recherché dans l'une des variables d'environnement suivantes : :envvar:" -"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` et :envvar:`LANG`." +"pour un domaine donné, en utilisant le chemin suivant (sous " +"Unix) : :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, où " +"*language* est recherché dans l'une des variables d'environnement " +"suivantes : :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` " +"et :envvar:`LANG`." -#: library/gettext.rst:45 +#: library/gettext.rst:42 msgid "" "If *localedir* is omitted or ``None``, then the current binding for *domain* " "is returned. [#]_" @@ -96,7 +101,7 @@ msgstr "" "Si *localedir* n'est pas renseigné ou vaut ``None``, alors le lien actuel de " "*domain* est renvoyé. [#]_" -#: library/gettext.rst:51 +#: library/gettext.rst:48 msgid "" "Change or query the current global domain. If *domain* is ``None``, then " "the current global domain is returned, otherwise the global domain is set to " @@ -106,7 +111,7 @@ msgstr "" "alors le domaine global actuel est renvoyé. Sinon, le domaine global est " "positionné à *domain*, puis renvoyé." -#: library/gettext.rst:59 +#: library/gettext.rst:56 #, fuzzy msgid "" "Return the localized translation of *message*, based on the current global " @@ -118,13 +123,13 @@ msgstr "" "est typiquement renommée :func:`_` dans le namespace courant (voir les " "exemples ci-dessous)." -#: library/gettext.rst:66 +#: library/gettext.rst:63 msgid "" "Like :func:`.gettext`, but look the message up in the specified *domain*." msgstr "" "Comme :func:`gettext`, mais cherche le message dans le domaine spécifié." -#: library/gettext.rst:71 +#: library/gettext.rst:68 msgid "" "Like :func:`.gettext`, but consider plural forms. If a translation is found, " "apply the plural formula to *n*, and return the resulting message (some " @@ -137,7 +142,7 @@ msgstr "" "pluriel). Si aucune traduction n'a été trouvée, renvoie *singular* si *n* " "vaut 1, *plural* sinon." -#: library/gettext.rst:76 +#: library/gettext.rst:73 msgid "" "The Plural formula is taken from the catalog header. It is a C or Python " "expression that has a free variable *n*; the expression evaluates to the " @@ -150,26 +155,27 @@ msgstr "" "catalogue. C'est une expression en C ou en Python qui a une variable libre " "*n* et qui évalue l'index du pluriel dans le catalogue. Voir `la " "documentation de GNU gettext `__ pour la syntaxe précise à utiliser dans les fichiers :file:" -"`.po` et pour les formules dans différents langues." +"gettext.html>`__ pour la syntaxe précise à utiliser dans les " +"fichiers :file:`.po` et pour les formules dans différents langues." -#: library/gettext.rst:86 +#: library/gettext.rst:83 msgid "" "Like :func:`ngettext`, but look the message up in the specified *domain*." msgstr "" "Comme :func:`ngettext`, mais cherche le message dans le domaine spécifié." -#: library/gettext.rst:94 +#: library/gettext.rst:91 msgid "" "Similar to the corresponding functions without the ``p`` in the prefix (that " "is, :func:`gettext`, :func:`dgettext`, :func:`ngettext`, :func:`dngettext`), " "but the translation is restricted to the given message *context*." msgstr "" "Semblable aux fonctions correspondantes sans le ``p`` dans le préfixe (c'est-" -"à-dire :func:`gettext`, :func:`dgettext`, :func:`ngettext` et :func:" -"`dngettext`), mais la traduction est limitée au *context* du message donné." +"à-dire :func:`gettext`, :func:`dgettext`, :func:`ngettext` " +"et :func:`dngettext`), mais la traduction est limitée au *context* du " +"message donné." -#: library/gettext.rst:101 +#: library/gettext.rst:98 #, fuzzy msgid "" "Note that GNU :program:`gettext` also defines a :func:`!dcgettext` method, " @@ -179,18 +185,18 @@ msgstr "" "elle a été considérée comme inutile et donc actuellement marquée comme non " "implémentée." -#: library/gettext.rst:104 +#: library/gettext.rst:101 msgid "Here's an example of typical usage for this API::" msgstr "Voici un exemple classique d'utilisation de cette API ::" -#: library/gettext.rst:115 +#: library/gettext.rst:112 msgid "Class-based API" msgstr "API basée sur les classes" -#: library/gettext.rst:117 +#: library/gettext.rst:114 #, fuzzy msgid "" -"The class-based API of the :mod:`gettext` module gives you more flexibility " +"The class-based API of the :mod:`!gettext` module gives you more flexibility " "and greater convenience than the GNU :program:`gettext` API. It is the " "recommended way of localizing your Python applications and modules. :mod:`!" "gettext` defines a :class:`GNUTranslations` class which implements the " @@ -207,39 +213,40 @@ msgstr "" "de cette classe \"translations\" peuvent également s'installer dans l'espace " "de nommage natif en tant que fonction :func:`_`." -#: library/gettext.rst:127 +#: library/gettext.rst:124 msgid "" "This function implements the standard :file:`.mo` file search algorithm. It " "takes a *domain*, identical to what :func:`textdomain` takes. Optional " "*localedir* is as in :func:`bindtextdomain`. Optional *languages* is a list " "of strings, where each string is a language code." msgstr "" -"Cette fonction implémente l'algorithme standard de recherche de fichier :" -"file:`mo`. Il prend en entrée un *domain*, tout comme la fonction :func:" -"`textdomain`. Le paramètre optionnel *localedir* est le même que celui de :" -"func:`bindtextdomain`. Le paramètre optionnel *langages* est une liste de " -"chaînes de caractères correspondants au code d'une langue." +"Cette fonction implémente l'algorithme standard de recherche de " +"fichier :file:`mo`. Il prend en entrée un *domain*, tout comme la " +"fonction :func:`textdomain`. Le paramètre optionnel *localedir* est le même " +"que celui de :func:`bindtextdomain`. Le paramètre optionnel *langages* est " +"une liste de chaînes de caractères correspondants au code d'une langue." -#: library/gettext.rst:132 +#: library/gettext.rst:129 msgid "" "If *localedir* is not given, then the default system locale directory is " "used. [#]_ If *languages* is not given, then the following environment " -"variables are searched: :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:" -"`LC_MESSAGES`, and :envvar:`LANG`. The first one returning a non-empty " -"value is used for the *languages* variable. The environment variables should " -"contain a colon separated list of languages, which will be split on the " -"colon to produce the expected list of language code strings." +"variables are " +"searched: :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, " +"and :envvar:`LANG`. The first one returning a non-empty value is used for " +"the *languages* variable. The environment variables should contain a colon " +"separated list of languages, which will be split on the colon to produce the " +"expected list of language code strings." msgstr "" "Si *localedir* n'est pas renseigné, alors le répertoire de la locale par " "défaut du système est utilisé. [#]_ Si *languages* n'est pas renseigné, " -"alors les variables d'environnement suivantes sont utilisées : :envvar:" -"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` et :envvar:`LANG`. La " -"première à renvoyer une valeur non vide est alors utilisée pour " -"*languages*. Ces variables d'environnement doivent contenir une liste de " -"langues, séparées par des deux-points, qui sera utilisée pour générer la " -"liste des codes de langues attendue." +"alors les variables d'environnement suivantes sont " +"utilisées : :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` " +"et :envvar:`LANG`. La première à renvoyer une valeur non vide est alors " +"utilisée pour *languages*. Ces variables d'environnement doivent contenir " +"une liste de langues, séparées par des deux-points, qui sera utilisée pour " +"générer la liste des codes de langues attendue." -#: library/gettext.rst:140 +#: library/gettext.rst:137 msgid "" ":func:`find` then expands and normalizes the languages, and then iterates " "through them, searching for an existing file built of these components:" @@ -248,11 +255,11 @@ msgstr "" "sur la liste obtenue afin de trouver un fichier de traduction existant et " "correspondant :" -#: library/gettext.rst:143 +#: library/gettext.rst:140 msgid ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" msgstr ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" -#: library/gettext.rst:145 +#: library/gettext.rst:142 msgid "" "The first such file name that exists is returned by :func:`find`. If no such " "file is found, then ``None`` is returned. If *all* is given, it returns a " @@ -264,7 +271,7 @@ msgstr "" "renvoyée la liste de tous les noms de fichiers, dans l'ordre dans lequel ils " "apparaissent dans *languages* ou dans les variables d'environnement." -#: library/gettext.rst:153 +#: library/gettext.rst:150 #, fuzzy msgid "" "Return a ``*Translations`` instance based on the *domain*, *localedir*, and " @@ -282,10 +289,11 @@ msgstr "" "renseigné, soit une classe :class:`GNUTranslations`. Le constructeur de " "cette classe doit prendre en argument un seul :term:`file object`. Si " "renseigné, *codeset* modifiera le jeu de caractères utilisé pour encoder les " -"chaînes de caractères traduites, dans les méthodes :meth:`~NullTranslations." -"lgettext` et :meth:`~NullTranslations.lngettext`." +"chaînes de caractères traduites, dans les " +"méthodes :meth:`~NullTranslations.lgettext` " +"et :meth:`~NullTranslations.lngettext`." -#: library/gettext.rst:160 +#: library/gettext.rst:157 msgid "" "If multiple files are found, later files are used as fallbacks for earlier " "ones. To allow setting the fallback, :func:`copy.copy` is used to clone each " @@ -293,53 +301,54 @@ msgid "" "with the cache." msgstr "" "Si plusieurs fichiers ont été trouvés, les derniers sont utilisés comme " -"substitut des premiers. Pour rendre possible cette substitution, :func:" -"`copy.copy` est utilisé pour copier chaque objet traduit depuis le cache ; " -"les vraies données de l'instance étant toujours recopiées dans le cache." +"substitut des premiers. Pour rendre possible cette " +"substitution, :func:`copy.copy` est utilisé pour copier chaque objet traduit " +"depuis le cache ; les vraies données de l'instance étant toujours recopiées " +"dans le cache." -#: library/gettext.rst:165 +#: library/gettext.rst:162 msgid "" "If no :file:`.mo` file is found, this function raises :exc:`OSError` if " -"*fallback* is false (which is the default), and returns a :class:" -"`NullTranslations` instance if *fallback* is true." +"*fallback* is false (which is the default), and returns " +"a :class:`NullTranslations` instance if *fallback* is true." msgstr "" "Si aucun fichier :file:`.mo` n'a été trouvé, soit *fallback* vaut *False* " "(valeur par défaut) et une exception :exc:`OSError` est levée, soit " "*fallback* vaut *True* et une instance :class:`NullTranslations` est " "renvoyée." -#: library/gettext.rst:169 +#: library/gettext.rst:166 #, fuzzy msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -"Avant, c'était l'exception :exc:`IOError` qui était levée, au lieu de :exc:" -"`OSError`." +"Avant, c'était l'exception :exc:`IOError` qui était levée, au lieu " +"de :exc:`OSError`." -#: library/gettext.rst:172 +#: library/gettext.rst:169 #, fuzzy msgid "*codeset* parameter is removed." msgstr "Le paramètre *codeset*." -#: library/gettext.rst:177 +#: library/gettext.rst:174 #, fuzzy msgid "" "This installs the function :func:`!_` in Python's builtins namespace, based " -"on *domain* and *localedir* which are passed to the function :func:" -"`translation`." +"on *domain* and *localedir* which are passed to the " +"function :func:`translation`." msgstr "" "Positionne la fonction :func:`_` dans l'espace de nommage natif de Python, " "en se basant sur *domain*, *localedir* et *codeset*, qui sont passés en " "argument de la fonction :func:`translation`." -#: library/gettext.rst:180 +#: library/gettext.rst:177 msgid "" "For the *names* parameter, please see the description of the translation " "object's :meth:`~NullTranslations.install` method." msgstr "" -"Concernant le paramètre *names*, se référer à la description de la méthode :" -"meth:`~NullTranslations.install`." +"Concernant le paramètre *names*, se référer à la description de la " +"méthode :meth:`~NullTranslations.install`." -#: library/gettext.rst:183 +#: library/gettext.rst:180 #, fuzzy msgid "" "As seen below, you usually mark the strings in your application that are " @@ -349,7 +358,7 @@ msgstr "" "Habituellement, la fonction :func:`_` est appliquée aux chaînes de " "caractères qui doivent être traduites comme suit ::" -#: library/gettext.rst:189 +#: library/gettext.rst:186 #, fuzzy msgid "" "For convenience, you want the :func:`!_` function to be installed in " @@ -360,15 +369,15 @@ msgstr "" "l'espace de nommage natif de Python pour la rendre plus accessible dans tous " "les modules de votre application." -#: library/gettext.rst:193 +#: library/gettext.rst:190 msgid "*names* is now a keyword-only parameter." msgstr "*names* est désormais un paramètre à mot-clé uniquement." -#: library/gettext.rst:197 +#: library/gettext.rst:194 msgid "The :class:`NullTranslations` class" msgstr "La classe :class:`NullTranslations`" -#: library/gettext.rst:199 +#: library/gettext.rst:196 msgid "" "Translation classes are what actually implement the translation of original " "source file message strings to translated message strings. The base class " @@ -383,7 +392,7 @@ msgstr "" "spécifiques à la traduction. Voici les méthodes de :class:`!" "NullTranslations` :" -#: library/gettext.rst:208 +#: library/gettext.rst:205 msgid "" "Takes an optional :term:`file object` *fp*, which is ignored by the base " "class. Initializes \"protected\" instance variables *_info* and *_charset* " @@ -397,7 +406,7 @@ msgstr "" "*_fallback* qui est définie au travers de :meth:`add_fallback`. Puis " "appelle ``self._parse(fp)`` si *fp* ne vaut pas ``None``." -#: library/gettext.rst:216 +#: library/gettext.rst:213 msgid "" "No-op in the base class, this method takes file object *fp*, and reads the " "data from the file, initializing its message catalog. If you have an " @@ -409,7 +418,7 @@ msgstr "" "catalogue de messages dont le format n'est pas pris en charge, vous devriez " "surcharger cette méthode pour analyser votre format." -#: library/gettext.rst:224 +#: library/gettext.rst:221 msgid "" "Add *fallback* as the fallback object for the current translation object. A " "translation object should consult the fallback if it cannot provide a " @@ -419,7 +428,7 @@ msgstr "" "courant. Un objet de traduction devrait interroger cet objet de " "substitution s'il ne peut fournir une traduction pour un message donné." -#: library/gettext.rst:231 +#: library/gettext.rst:228 msgid "" "If a fallback has been set, forward :meth:`!gettext` to the fallback. " "Otherwise, return *message*. Overridden in derived classes." @@ -427,7 +436,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`!gettext` à celui-" "ci. Sinon, renvoie *message*. Surchargé dans les classes dérivées." -#: library/gettext.rst:237 +#: library/gettext.rst:234 msgid "" "If a fallback has been set, forward :meth:`!ngettext` to the fallback. " "Otherwise, return *singular* if *n* is 1; return *plural* otherwise. " @@ -437,7 +446,7 @@ msgstr "" "ci. Sinon, renvoie *singular* si *n* vaut 1, *plural* sinon. Surchargé " "dans les classes dérivées." -#: library/gettext.rst:244 +#: library/gettext.rst:241 msgid "" "If a fallback has been set, forward :meth:`pgettext` to the fallback. " "Otherwise, return the translated message. Overridden in derived classes." @@ -445,7 +454,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`pgettext` à celui-" "ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." -#: library/gettext.rst:252 +#: library/gettext.rst:249 msgid "" "If a fallback has been set, forward :meth:`npgettext` to the fallback. " "Otherwise, return the translated message. Overridden in derived classes." @@ -453,7 +462,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`npgettext` à celui-" "ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." -#: library/gettext.rst:260 +#: library/gettext.rst:257 #, fuzzy msgid "" "Return a dictionary containing the metadata found in the message catalog " @@ -462,11 +471,11 @@ msgstr "" "Renvoie l'attribut \"protégé\" :attr:`_info`, dictionnaire contenant les " "métadonnées trouvées dans le fichier de catalogue de messages." -#: library/gettext.rst:266 +#: library/gettext.rst:263 msgid "Return the encoding of the message catalog file." msgstr "Renvoie l'encodage du fichier du catalogue de messages." -#: library/gettext.rst:271 +#: library/gettext.rst:268 msgid "" "This method installs :meth:`.gettext` into the built-in namespace, binding " "it to ``_``." @@ -474,7 +483,7 @@ msgstr "" "Cette méthode positionne :meth:`.gettext` dans l'espace de nommage natif, en " "le liant à ``_``." -#: library/gettext.rst:274 +#: library/gettext.rst:271 #, fuzzy msgid "" "If the *names* parameter is given, it must be a sequence containing the " @@ -488,23 +497,24 @@ msgstr "" "sont ``'gettext'``, ``'ngettext'``, ``'pgettext'``, ``'npgettext'``, " "``'lgettext'`` et ``'lngettext'``." -#: library/gettext.rst:279 +#: library/gettext.rst:276 #, fuzzy msgid "" -"Note that this is only one way, albeit the most convenient way, to make the :" -"func:`!_` function available to your application. Because it affects the " -"entire application globally, and specifically the built-in namespace, " +"Note that this is only one way, albeit the most convenient way, to make " +"the :func:`!_` function available to your application. Because it affects " +"the entire application globally, and specifically the built-in namespace, " "localized modules should never install :func:`!_`. Instead, they should use " "this code to make :func:`!_` available to their module::" msgstr "" "Notez que ce n'est là qu'un moyen parmi d'autres, quoique le plus pratique, " "pour rendre la fonction :func:`_` accessible à votre application. Puisque " "cela affecte toute l'application, et plus particulièrement l'espace de " -"nommage natif, les modules localisés ne devraient jamais y positionner :func:" -"`_`. Au lieu de cela, ces derniers doivent plutôt utiliser le code suivant " -"pour rendre :func:`_` accessible par leurs modules ::" +"nommage natif, les modules localisés ne devraient jamais y " +"positionner :func:`_`. Au lieu de cela, ces derniers doivent plutôt " +"utiliser le code suivant pour rendre :func:`_` accessible par leurs " +"modules ::" -#: library/gettext.rst:289 +#: library/gettext.rst:286 #, fuzzy msgid "" "This puts :func:`!_` only in the module's global namespace and so only " @@ -513,34 +523,34 @@ msgstr "" "Cela met :func:`_` dans l'espace de nommage global du module uniquement et " "donc n'affectera ses appels que dans ce module." -#: library/gettext.rst:292 +#: library/gettext.rst:289 msgid "Added ``'pgettext'`` and ``'npgettext'``." msgstr "Ajout de ``'pgettext'`` et ``'npgettext'``." -#: library/gettext.rst:297 +#: library/gettext.rst:294 msgid "The :class:`GNUTranslations` class" msgstr "La classe :class:`GNUTranslations`" -#: library/gettext.rst:299 +#: library/gettext.rst:296 #, fuzzy msgid "" -"The :mod:`!gettext` module provides one additional class derived from :class:" -"`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:`!" -"_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files in " -"both big-endian and little-endian format." +"The :mod:`!gettext` module provides one additional class derived " +"from :class:`NullTranslations`: :class:`GNUTranslations`. This class " +"overrides :meth:`!_parse` to enable reading GNU :program:`gettext` " +"format :file:`.mo` files in both big-endian and little-endian format." msgstr "" -"Le module :mod:`gettext` fournit une classe supplémentaire qui hérite de :" -"class:`NullTranslations` : :class:`GNUTranslations`. Cette classe " -"surcharge :meth:`_parse` pour permettre de lire les fichiers GNU :program:" -"`gettext` :file:`.mo` au format petit et gros-boutiste." +"Le module :mod:`gettext` fournit une classe supplémentaire qui hérite " +"de :class:`NullTranslations` : :class:`GNUTranslations`. Cette classe " +"surcharge :meth:`_parse` pour permettre de lire les fichiers " +"GNU :program:`gettext` :file:`.mo` au format petit et gros-boutiste." -#: library/gettext.rst:304 +#: library/gettext.rst:301 #, fuzzy msgid "" ":class:`GNUTranslations` parses optional metadata out of the translation " "catalog. It is convention with GNU :program:`gettext` to include metadata as " -"the translation for the empty string. This metadata is in :rfc:`822`\\ -" -"style ``key: value`` pairs, and should contain the ``Project-Id-Version`` " +"the translation for the empty string. This metadata is in :rfc:`822`\\ " +"-style ``key: value`` pairs, and should contain the ``Project-Id-Version`` " "key. If the key ``Content-Type`` is found, then the ``charset`` property is " "used to initialize the \"protected\" :attr:`!_charset` instance variable, " "defaulting to ``None`` if not found. If the charset encoding is specified, " @@ -560,7 +570,7 @@ msgstr "" "convertis en chaînes Unicode via cet encodage, ou via l'encodage ASCII si " "non renseigné." -#: library/gettext.rst:314 +#: library/gettext.rst:311 #, fuzzy msgid "" "Since message ids are read as Unicode strings too, all ``*gettext()`` " @@ -570,7 +580,7 @@ msgstr "" "chaînes Unicode, toutes les méthodes :meth:`*gettext` les considéreront " "ainsi, et pas comme des chaînes d'octets." -#: library/gettext.rst:317 +#: library/gettext.rst:314 #, fuzzy msgid "" "The entire set of key/value pairs are placed into a dictionary and set as " @@ -579,7 +589,7 @@ msgstr "" "La totalité des paires clef / valeur est insérée dans un dictionnaire et " "représente la variable d'instance \"protégée\" :attr:`_info`." -#: library/gettext.rst:320 +#: library/gettext.rst:317 msgid "" "If the :file:`.mo` file's magic number is invalid, the major version number " "is unexpected, or if other problems occur while reading the file, " @@ -590,14 +600,14 @@ msgstr "" "lecture du fichier, instancier une classe :class:`GNUTranslations` peut " "lever une exception :exc:`OSError`." -#: library/gettext.rst:326 +#: library/gettext.rst:323 msgid "" "The following methods are overridden from the base class implementation:" msgstr "" "Les méthodes suivantes, provenant de l'implémentation de la classe de base, " "ont été surchargée :" -#: library/gettext.rst:330 +#: library/gettext.rst:327 msgid "" "Look up the *message* id in the catalog and return the corresponding message " "string, as a Unicode string. If there is no entry in the catalog for the " @@ -608,10 +618,11 @@ msgstr "" "Recherche l'identifiant de *message* dans le catalogue et renvoie le message " "de la chaîne de caractères correspondante comme une chaîne Unicode. Si " "aucun identifiant n'a été trouvé pour *message* et qu'un substitut a été " -"défini, la recherche est transmise à la méthode :meth:`~NullTranslations." -"gettext` du substitut. Sinon, l'identifiant de *message* est renvoyé." +"défini, la recherche est transmise à la " +"méthode :meth:`~NullTranslations.gettext` du substitut. Sinon, " +"l'identifiant de *message* est renvoyé." -#: library/gettext.rst:339 +#: library/gettext.rst:336 msgid "" "Do a plural-forms lookup of a message id. *singular* is used as the message " "id for purposes of lookup in the catalog, while *n* is used to determine " @@ -622,23 +633,23 @@ msgstr "" "catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser. " "La chaîne de caractère du message renvoyée est une chaîne Unicode." -#: library/gettext.rst:343 +#: library/gettext.rst:340 msgid "" "If the message id is not found in the catalog, and a fallback is specified, " -"the request is forwarded to the fallback's :meth:`~NullTranslations." -"ngettext` method. Otherwise, when *n* is 1 *singular* is returned, and " -"*plural* is returned in all other cases." +"the request is forwarded to the " +"fallback's :meth:`~NullTranslations.ngettext` method. Otherwise, when *n* " +"is 1 *singular* is returned, and *plural* is returned in all other cases." msgstr "" "Si l'identifiant du message n'est pas trouvé dans le catalogue et qu'un " -"substitut a été spécifié, la requête est transmise à la méthode :meth:" -"`~NullTranslations.ngettext` du substitut. Sinon, est renvoyé *singular* " -"lorsque *n* vaut 1, *plural* dans tous les autres cas." +"substitut a été spécifié, la requête est transmise à la " +"méthode :meth:`~NullTranslations.ngettext` du substitut. Sinon, est renvoyé " +"*singular* lorsque *n* vaut 1, *plural* dans tous les autres cas." -#: library/gettext.rst:348 +#: library/gettext.rst:345 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: library/gettext.rst:360 +#: library/gettext.rst:357 msgid "" "Look up the *context* and *message* id in the catalog and return the " "corresponding message string, as a Unicode string. If there is no entry in " @@ -653,7 +664,7 @@ msgstr "" "transmise à la méthode :meth:`pgettext` du substitut. Sinon, l'identifiant " "de *message* est renvoyé." -#: library/gettext.rst:371 +#: library/gettext.rst:368 msgid "" "Do a plural-forms lookup of a message id. *singular* is used as the message " "id for purposes of lookup in the catalog, while *n* is used to determine " @@ -663,7 +674,7 @@ msgstr "" "message. *singular* est utilisé pour la recherche de l'identifiant dans le " "catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser." -#: library/gettext.rst:375 +#: library/gettext.rst:372 msgid "" "If the message id for *context* is not found in the catalog, and a fallback " "is specified, the request is forwarded to the fallback's :meth:`npgettext` " @@ -675,11 +686,11 @@ msgstr "" "méthode :meth:`npgettext` du substitut. Sinon, est renvoyé *singular* " "lorsque *n* vaut 1, *plural* dans tous les autres cas." -#: library/gettext.rst:384 +#: library/gettext.rst:381 msgid "Solaris message catalog support" msgstr "Support du catalogue de message de Solaris" -#: library/gettext.rst:386 +#: library/gettext.rst:383 msgid "" "The Solaris operating system defines its own binary :file:`.mo` file format, " "but since no documentation can be found on this format, it is not supported " @@ -689,29 +700,31 @@ msgstr "" "binaire :file:`.mo`, mais pour l'heure, puisqu'on ne peut trouver de " "documentation sur ce format, il n'est pas géré." -#: library/gettext.rst:392 +#: library/gettext.rst:389 msgid "The Catalog constructor" msgstr "Le constructeur *Catalog*" -#: library/gettext.rst:396 +#: library/gettext.rst:393 +#, fuzzy msgid "" -"GNOME uses a version of the :mod:`gettext` module by James Henstridge, but " +"GNOME uses a version of the :mod:`!gettext` module by James Henstridge, but " "this version has a slightly different API. Its documented usage was::" msgstr "" "GNOME utilise une version du module :mod:`gettext` de James Henstridge, mais " "qui a une API légèrement différente. D'après la documentation, elle " "s'utilise ainsi ::" -#: library/gettext.rst:404 +#: library/gettext.rst:401 #, fuzzy msgid "" "For compatibility with this older module, the function :func:`!Catalog` is " "an alias for the :func:`translation` function described above." msgstr "" -"Pour des raisons de compatibilité avec cet ancien module, la fonction :func:" -"`Catalog` est un alias de la fonction :func:`translation` décrite ci-dessous." +"Pour des raisons de compatibilité avec cet ancien module, la " +"fonction :func:`Catalog` est un alias de la fonction :func:`translation` " +"décrite ci-dessous." -#: library/gettext.rst:407 +#: library/gettext.rst:404 msgid "" "One difference between this module and Henstridge's: his catalog objects " "supported access through a mapping API, but this appears to be unused and so " @@ -721,11 +734,11 @@ msgstr "" "catalogue étaient accessibles depuis un schéma de l'API, mais cela semblait " "ne pas être utilisé et donc n'est pas pris en charge." -#: library/gettext.rst:414 +#: library/gettext.rst:411 msgid "Internationalizing your programs and modules" msgstr "Internationaliser vos programmes et modules" -#: library/gettext.rst:416 +#: library/gettext.rst:413 msgid "" "Internationalization (I18N) refers to the operation by which a program is " "made aware of multiple languages. Localization (L10N) refers to the " @@ -739,33 +752,35 @@ msgstr "" "locales, une fois celui-ci internationalisé. Afin de fournir du texte " "multilingue à votre programme Python, les étapes suivantes sont nécessaires :" -#: library/gettext.rst:422 +#: library/gettext.rst:419 msgid "" "prepare your program or module by specially marking translatable strings" msgstr "" "préparer votre programme ou module en marquant spécifiquement les chaînes à " "traduire" -#: library/gettext.rst:424 +#: library/gettext.rst:421 msgid "" "run a suite of tools over your marked files to generate raw messages catalogs" msgstr "" "lancer une suite d'outils sur les fichiers contenant des chaînes à traduire " "pour générer des catalogues de messages brut" -#: library/gettext.rst:426 +#: library/gettext.rst:423 msgid "create language-specific translations of the message catalogs" msgstr "" "créer les traductions spécifiques à une langue des catalogues de messages" -#: library/gettext.rst:428 +#: library/gettext.rst:425 +#, fuzzy msgid "" -"use the :mod:`gettext` module so that message strings are properly translated" +"use the :mod:`!gettext` module so that message strings are properly " +"translated" msgstr "" "utiliser le module :mod:`gettext` pour que les chaînes de caractères soient " "bien traduites" -#: library/gettext.rst:430 +#: library/gettext.rst:427 #, fuzzy msgid "" "In order to prepare your code for I18N, you need to look at all the strings " @@ -775,10 +790,10 @@ msgid "" msgstr "" "Afin de préparer votre code à être traduit (*I18N*), vous devrez rechercher " "toutes les chaînes de caractères de vos fichiers. À chaque chaîne de " -"caractères à traduire doit être appliqué le marqueur ``_('...')`` --- c'est-" -"à-dire en appelant la fonction :func:`_`. Par exemple ::" +"caractères à traduire doit être appliqué le marqueur ``_('...')``, c'est-à-" +"dire en appelant la fonction :func:`_`. Par exemple ::" -#: library/gettext.rst:439 +#: library/gettext.rst:436 msgid "" "In this example, the string ``'writing a log message'`` is marked as a " "candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are " @@ -787,7 +802,7 @@ msgstr "" "Dans cet exemple, la chaîne ``'writing a log message'`` est maquée comme " "traduite, contrairement aux chaînes ``'mylog.txt'`` et ``'w'``." -#: library/gettext.rst:442 +#: library/gettext.rst:439 #, fuzzy msgid "" "There are a few tools to extract the strings meant for translation. The " @@ -802,45 +817,46 @@ msgid "" msgstr "" "Il existe quelques outils pour extraire les chaînes de caractères destinées " "à la traduction. Le programme d'origine GNU :program:`gettext` ne prenait " -"en charge que les codes sources en C ou C++, mais sa version étendue :" -"program:`xgettext` peut lire du code écrit dans de nombreux langages, dont " -"le Python, afin de trouver les chaînes notées comme traduisibles. `Babel " -"`__ est une bibliothèque en Python " -"d'internationalisation, qui inclut un script :file:`pybabel` permettant " -"d'extraire et de compiler des catalogues de messages. Le programme de " -"François Pinard, nommé :program:`xpot`, fait de même et est disponible dans " -"son `paquet po-utils `__." - -#: library/gettext.rst:452 -msgid "" -"(Python also includes pure-Python versions of these programs, called :" -"program:`pygettext.py` and :program:`msgfmt.py`; some Python distributions " -"will install them for you. :program:`pygettext.py` is similar to :program:" -"`xgettext`, but only understands Python source code and cannot handle other " -"programming languages such as C or C++. :program:`pygettext.py` supports a " -"command-line interface similar to :program:`xgettext`; for details on its " -"use, run ``pygettext.py --help``. :program:`msgfmt.py` is binary compatible " -"with GNU :program:`msgfmt`. With these two programs, you may not need the " -"GNU :program:`gettext` package to internationalize your Python applications.)" -msgstr "" -"(Python inclut également des versions en Python de ces programmes, :program:" -"`pygettext.py` et :program:`msgfmt.py`, que certaines distributions Python " -"installeront pour vous. :program:`pygettext.py` est similaire à :program:" -"`xgettext`, mais ne comprend que le code source écrit en Python et ne peut " -"prendre en charge d'autres langages de programmation tels que le C ou C++. :" -"program:`pygettext.py` possède une interface en ligne de commande similaire " -"à celle de :program:`xgettext` --- pour plus de détails sur son utilisation, " -"exécuter ``pygettext.py --help``. :program:`msgfmt.py` est compatible avec " -"GNU :program:`msgfmt`. Avec ces deux programmes, vous ne devriez pas avoir " -"besoin du paquet GNU :program:`gettext` pour internationaliser vos " -"applications en Python.)" - -#: library/gettext.rst:464 -msgid "" -":program:`xgettext`, :program:`pygettext`, and similar tools generate :file:" -"`.po` files that are message catalogs. They are structured human-readable " -"files that contain every marked string in the source code, along with a " -"placeholder for the translated versions of these strings." +"en charge que les codes sources en C ou C++, mais sa version " +"étendue :program:`xgettext` peut lire du code écrit dans de nombreux " +"langages, dont le Python, afin de trouver les chaînes notées comme " +"traduisibles. `Babel `__ est une bibliothèque en " +"Python d'internationalisation, qui inclut un script :file:`pybabel` " +"permettant d'extraire et de compiler des catalogues de messages. Le " +"programme de François Pinard, nommé :program:`xpot`, fait de même et est " +"disponible dans son `paquet po-utils `__." + +#: library/gettext.rst:449 +msgid "" +"(Python also includes pure-Python versions of these programs, " +"called :program:`pygettext.py` and :program:`msgfmt.py`; some Python " +"distributions will install them for you. :program:`pygettext.py` is similar " +"to :program:`xgettext`, but only understands Python source code and cannot " +"handle other programming languages such as C or C++. :program:`pygettext.py` " +"supports a command-line interface similar to :program:`xgettext`; for " +"details on its use, run ``pygettext.py --help``. :program:`msgfmt.py` is " +"binary compatible with GNU :program:`msgfmt`. With these two programs, you " +"may not need the GNU :program:`gettext` package to internationalize your " +"Python applications.)" +msgstr "" +"(Python inclut également des versions en Python de ces " +"programmes, :program:`pygettext.py` et :program:`msgfmt.py`, que certaines " +"distributions Python installeront pour vous. :program:`pygettext.py` est " +"similaire à :program:`xgettext`, mais ne comprend que le code source écrit " +"en Python et ne peut prendre en charge d'autres langages de programmation " +"tels que le C ou C++. :program:`pygettext.py` possède une interface en " +"ligne de commande similaire à celle de :program:`xgettext`. Pour plus de " +"détails sur son utilisation, exécuter ``pygettext.py --" +"help``. :program:`msgfmt.py` est compatible avec GNU :program:`msgfmt`. " +"Avec ces deux programmes, vous ne devriez pas avoir besoin du paquet " +"GNU :program:`gettext` pour internationaliser vos applications en Python.)" + +#: library/gettext.rst:461 +msgid "" +":program:`xgettext`, :program:`pygettext`, and similar tools " +"generate :file:`.po` files that are message catalogs. They are structured " +"human-readable files that contain every marked string in the source code, " +"along with a placeholder for the translated versions of these strings." msgstr "" ":program:`xgettext`, :program:`pygettext` et d'autres outils similaires " "génèrent des fichiers :file:`.po` représentant les catalogues de messages. " @@ -848,15 +864,16 @@ msgstr "" "contiennent toutes les chaînes du code source marquées comme traduisible, " "ainsi que leur traduction à utiliser." -#: library/gettext.rst:470 +#: library/gettext.rst:467 +#, fuzzy msgid "" "Copies of these :file:`.po` files are then handed over to the individual " "human translators who write translations for every supported natural " -"language. They send back the completed language-specific versions as a :" -"file:`.po` file that's compiled into a machine-readable :file:" -"`.mo` binary catalog file using the :program:`msgfmt` program. The :file:`." -"mo` files are used by the :mod:`gettext` module for the actual translation " -"processing at run-time." +"language. They send back the completed language-specific versions as " +"a :file:`.po` file that's compiled into a machine-" +"readable :file:`.mo` binary catalog file using the :program:`msgfmt` " +"program. The :file:`.mo` files are used by the :mod:`!gettext` module for " +"the actual translation processing at run-time." msgstr "" "Les copies de ces fichiers :file:`.po` sont ensuite remises à des êtres " "humains qui traduisent le contenu pour chaque langue naturelle prise en " @@ -867,9 +884,10 @@ msgstr "" "fichiers :file:`.mo` sont utilisés par le module :mod:`gettext` pour la " "traduction lors de l'exécution." -#: library/gettext.rst:479 +#: library/gettext.rst:476 +#, fuzzy msgid "" -"How you use the :mod:`gettext` module in your code depends on whether you " +"How you use the :mod:`!gettext` module in your code depends on whether you " "are internationalizing a single module or your entire application. The next " "two sections will discuss each case." msgstr "" @@ -877,21 +895,21 @@ msgstr "" "de si vous internationalisez un seul module ou l'ensemble de votre " "application. Les deux sections suivantes traitent chacune des cas." -#: library/gettext.rst:485 +#: library/gettext.rst:482 msgid "Localizing your module" msgstr "Localiser votre module" -#: library/gettext.rst:487 +#: library/gettext.rst:484 msgid "" "If you are localizing your module, you must take care not to make global " -"changes, e.g. to the built-in namespace. You should not use the GNU :program:" -"`gettext` API but instead the class-based API." +"changes, e.g. to the built-in namespace. You should not use the " +"GNU :program:`gettext` API but instead the class-based API." msgstr "" "Si vous localisez votre module, veillez à ne pas faire de changements " "globaux, e.g. dans l'espace de nommage natif. Vous ne devriez pas utiliser " "l’API GNU :program:`gettext` mais plutôt celle basée sur les classes." -#: library/gettext.rst:491 +#: library/gettext.rst:488 msgid "" "Let's say your module is called \"spam\" and the module's various natural " "language translation :file:`.mo` files reside in :file:`/usr/share/locale` " @@ -903,11 +921,11 @@ msgstr "" "usr/share/locale` au format GNU :program:`gettext`. Voici ce que vous " "pouvez alors mettre en haut de votre module ::" -#: library/gettext.rst:502 +#: library/gettext.rst:499 msgid "Localizing your application" msgstr "Localiser votre application" -#: library/gettext.rst:504 +#: library/gettext.rst:501 #, fuzzy msgid "" "If you are localizing your application, you can install the :func:`!_` " @@ -915,13 +933,13 @@ msgid "" "file of your application. This will let all your application-specific files " "just use ``_('...')`` without having to explicitly install it in each file." msgstr "" -"Si vous localisez votre application, vous pouvez positionner la fonction :" -"func:`_` de manière globale dans l'espace de nommage natif, généralement " -"dans le fichier principal de votre application. Cela permettra à tous les " -"fichiers de votre application de n'utiliser que ``_('...')`` sans devoir le " -"redéfinir explicitement dans chaque fichier." +"Si vous localisez votre application, vous pouvez positionner la " +"fonction :func:`_` de manière globale dans l'espace de nommage natif, " +"généralement dans le fichier principal de votre application. Cela permettra " +"à tous les fichiers de votre application de n'utiliser que ``_('...')`` sans " +"devoir le redéfinir explicitement dans chaque fichier." -#: library/gettext.rst:509 +#: library/gettext.rst:506 msgid "" "In the simple case then, you need only add the following bit of code to the " "main driver file of your application::" @@ -929,19 +947,19 @@ msgstr "" "Dans ce cas, vous n'aurez à ajouter que le bout de code suivant au fichier " "principal de votre application ::" -#: library/gettext.rst:515 +#: library/gettext.rst:512 msgid "" -"If you need to set the locale directory, you can pass it into the :func:" -"`install` function::" +"If you need to set the locale directory, you can pass it into " +"the :func:`install` function::" msgstr "" "Si vous avez besoin de définir le dossier des localisations, vous pouvez le " "mettre en argument de la fonction :func:`install` ::" -#: library/gettext.rst:523 +#: library/gettext.rst:520 msgid "Changing languages on the fly" msgstr "Changer de langue à la volée" -#: library/gettext.rst:525 +#: library/gettext.rst:522 msgid "" "If your program needs to support many languages at the same time, you may " "want to create multiple translation instances and then switch between them " @@ -951,11 +969,11 @@ msgstr "" "temps, vous pouvez créer plusieurs instances de traduction, puis basculer " "entre elles de façon explicite, comme ceci ::" -#: library/gettext.rst:546 +#: library/gettext.rst:543 msgid "Deferred translations" msgstr "Traductions différées" -#: library/gettext.rst:548 +#: library/gettext.rst:545 msgid "" "In most coding situations, strings are translated where they are coded. " "Occasionally however, you need to mark strings for translation, but defer " @@ -966,7 +984,7 @@ msgstr "" "ayez besoin de traduire une chaîne de caractères un peu plus loin. Un " "exemple classique est ::" -#: library/gettext.rst:561 +#: library/gettext.rst:558 msgid "" "Here, you want to mark the strings in the ``animals`` list as being " "translatable, but you don't actually want to translate them until they are " @@ -975,11 +993,11 @@ msgstr "" "Ici, vous voulez marquer les chaînes de caractères de la liste ``animals`` " "comme étant traduisibles, mais ne les traduire qu'au moment de les afficher." -#: library/gettext.rst:565 +#: library/gettext.rst:562 msgid "Here is one way you can handle this situation::" msgstr "Voici un moyen de gérer ce cas ::" -#: library/gettext.rst:581 +#: library/gettext.rst:578 #, fuzzy msgid "" "This works because the dummy definition of :func:`!_` simply returns the " @@ -995,7 +1013,7 @@ msgstr "" "Attention toutefois si vous avez déjà une autre définition de :func:`_` dans " "l'espace de nommage local." -#: library/gettext.rst:587 +#: library/gettext.rst:584 #, fuzzy msgid "" "Note that the second use of :func:`!_` will not identify \"a\" as being " @@ -1006,11 +1024,11 @@ msgstr "" "comme traduisible par le programme :program:`gettext` car ce n'est pas un " "chaîne au sens propre." -#: library/gettext.rst:591 +#: library/gettext.rst:588 msgid "Another way to handle this is with the following example::" msgstr "Voici une autre solution ::" -#: library/gettext.rst:605 +#: library/gettext.rst:602 #, fuzzy msgid "" "In this case, you are marking translatable strings with the function :func:`!" @@ -1022,20 +1040,21 @@ msgid "" "totally arbitrary; it could have just as easily been :func:`!" "MarkThisStringForTranslation`." msgstr "" -"Dans ce cas, les chaînes à traduire sont identifiées avec la fonction :func:" -"`N_`, qui n'entre pas en conflit avec définition de :func:`_`. Cependant, " -"il faudra apprendre à votre programme d'extraction de messages à rechercher " -"les chaînes de caractères à traduire parmi celles ayant le marqueur :func:" -"`N_`. :program:`xgettext`, :program:`pygettext`, ``pybabel extract`` et :" -"program:`xpot` prennent tous en charge cela grâce à l'option en ligne de " -"commande :option:`!-k`. Le choix du nom :func:`N_` ici est totalement " -"arbitraire et aurait très bien pu être :func:`MarqueurDeTraduction`." - -#: library/gettext.rst:616 +"Dans ce cas, les chaînes à traduire sont identifiées avec la " +"fonction :func:`N_`, qui n'entre pas en conflit avec définition " +"de :func:`_`. Cependant, il faudra apprendre à votre programme d'extraction " +"de messages à rechercher les chaînes de caractères à traduire parmi celles " +"ayant le marqueur :func:`N_`. :program:`xgettext`, :program:`pygettext`, " +"``pybabel extract`` et :program:`xpot` prennent tous en charge cela grâce à " +"l'option en ligne de commande :option:`!-k`. Le choix du nom :func:`N_` ici " +"est totalement arbitraire et aurait très bien pu " +"être :func:`MarqueurDeTraduction`." + +#: library/gettext.rst:613 msgid "Acknowledgements" msgstr "Remerciements" -#: library/gettext.rst:618 +#: library/gettext.rst:615 msgid "" "The following people contributed code, feedback, design suggestions, " "previous implementations, and valuable experience to the creation of this " @@ -1045,43 +1064,43 @@ msgstr "" "participé aux suggestions de conception et aux implémentations précédentes, " "et ont partagé leur expérience précieuse pour la création de ce module :" -#: library/gettext.rst:621 +#: library/gettext.rst:618 msgid "Peter Funk" msgstr "Peter Funk" -#: library/gettext.rst:623 +#: library/gettext.rst:620 msgid "James Henstridge" msgstr "James Henstridge" -#: library/gettext.rst:625 +#: library/gettext.rst:622 msgid "Juan David Ibáñez Palomar" msgstr "Juan David Ibáñez Palomar" -#: library/gettext.rst:627 +#: library/gettext.rst:624 msgid "Marc-André Lemburg" msgstr "Marc-André Lemburg" -#: library/gettext.rst:629 +#: library/gettext.rst:626 msgid "Martin von Löwis" msgstr "Martin von Löwis" -#: library/gettext.rst:631 +#: library/gettext.rst:628 msgid "François Pinard" msgstr "François Pinard" -#: library/gettext.rst:633 +#: library/gettext.rst:630 msgid "Barry Warsaw" msgstr "Barry Warsaw" -#: library/gettext.rst:635 +#: library/gettext.rst:632 msgid "Gustavo Niemeyer" msgstr "Gustavo Niemeyer" -#: library/gettext.rst:638 +#: library/gettext.rst:635 msgid "Footnotes" msgstr "Notes" -#: library/gettext.rst:639 +#: library/gettext.rst:636 #, fuzzy msgid "" "The default locale directory is system dependent; for example, on Red Hat " @@ -1093,15 +1112,15 @@ msgid "" "your application." msgstr "" "Le dossier par défaut pour les localisations dépend du système : par " -"exemple, sur RedHat c'est :file:`/usr/share/locale`, mais sur Solaris c'est :" -"file:`/usr/lib/locale`. Le module :mod:`gettext` n'essaie pas de prendre en " -"charge ce paramètre système dépendant du système d'exploitation, mais " -"utilise le dossier :file:`{sys.base_prefix}/share/locale` (voir :data:`sys." -"base_prefix`). C'est pour cette raison qu'il est toujours préférable " -"d'appeler :func:`bindtextdomain` en donnant explicitement un chemin absolu " -"au début de votre application." - -#: library/gettext.rst:647 +"exemple, sur RedHat c'est :file:`/usr/share/locale`, mais sur Solaris " +"c'est :file:`/usr/lib/locale`. Le module :mod:`gettext` n'essaie pas de " +"prendre en charge ce paramètre système dépendant du système d'exploitation, " +"mais utilise le dossier :file:`{sys.base_prefix}/share/locale` " +"(voir :data:`sys.base_prefix`). C'est pour cette raison qu'il est toujours " +"préférable d'appeler :func:`bindtextdomain` en donnant explicitement un " +"chemin absolu au début de votre application." + +#: library/gettext.rst:644 msgid "See the footnote for :func:`bindtextdomain` above." msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." @@ -1112,22 +1131,23 @@ msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." #~ "current binding is returned." #~ msgstr "" #~ "Lie *domain* à *codeset*, en changeant l'encodage des chaînes d'octets " -#~ "retournées par les fonctions :func:`lgettext`, :func:`ldgettext`, :func:" -#~ "`lngettext` et :func:`ldngettext`. Si *codeset* n'est pas renseigné, " -#~ "alors le lien actuel est renvoyé." +#~ "retournées par les " +#~ "fonctions :func:`lgettext`, :func:`ldgettext`, :func:`lngettext` " +#~ "et :func:`ldngettext`. Si *codeset* n'est pas renseigné, alors le lien " +#~ "actuel est renvoyé." #~ msgid "" -#~ "Equivalent to the corresponding functions without the ``l`` prefix (:func:" -#~ "`.gettext`, :func:`dgettext`, :func:`ngettext` and :func:`dngettext`), " -#~ "but the translation is returned as a byte string encoded in the preferred " -#~ "system encoding if no other encoding was explicitly set with :func:" -#~ "`bind_textdomain_codeset`." +#~ "Equivalent to the corresponding functions without the ``l`` prefix " +#~ "(:func:`.gettext`, :func:`dgettext`, :func:`ngettext` " +#~ "and :func:`dngettext`), but the translation is returned as a byte string " +#~ "encoded in the preferred system encoding if no other encoding was " +#~ "explicitly set with :func:`bind_textdomain_codeset`." #~ msgstr "" -#~ "Équivalent aux fonctions correspondantes non préfixées par ``l`` (:func:`." -#~ "gettext`, :func:`dgettext`, :func:`ngettext` et :func:`dngettext`), mais " -#~ "la traduction est retournée en tant que chaîne d'octets, encodée avec " -#~ "l'encodage du système si aucun autre n'a été explicitement défini avec :" -#~ "func:`bind_textdomain_codeset`." +#~ "Équivalent aux fonctions correspondantes non préfixées par ``l`` " +#~ "(:func:`.gettext`, :func:`dgettext`, :func:`ngettext` " +#~ "et :func:`dngettext`), mais la traduction est retournée en tant que " +#~ "chaîne d'octets, encodée avec l'encodage du système si aucun autre n'a " +#~ "été explicitement défini avec :func:`bind_textdomain_codeset`." #~ msgid "" #~ "These functions should be avoided in Python 3, because they return " @@ -1152,19 +1172,19 @@ msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." #~ msgstr "" #~ "Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction " #~ "est renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage " -#~ "du système si aucun autre n'a été défini avec :meth:" -#~ "`set_output_charset`. Surchargé dans les classes dérivées." +#~ "du système si aucun autre n'a été défini " +#~ "avec :meth:`set_output_charset`. Surchargé dans les classes dérivées." #~ msgid "" -#~ "These methods should be avoided in Python 3. See the warning for the :" -#~ "func:`lgettext` function." +#~ "These methods should be avoided in Python 3. See the warning for " +#~ "the :func:`lgettext` function." #~ msgstr "" #~ "L'utilisation de ces méthodes doivent être évitée en Python 3. Voir " #~ "l'avertissement de la fonction :func:`lgettext`." #~ msgid "" -#~ "Return the encoding used to return translated messages in :meth:`." -#~ "lgettext` and :meth:`.lngettext`." +#~ "Return the encoding used to return translated messages " +#~ "in :meth:`.lgettext` and :meth:`.lngettext`." #~ msgstr "" #~ "Renvoie l'encodage utilisé par :meth:`.lgettext` et :meth:`.lngettext` " #~ "pour la traduction des messages." @@ -1175,10 +1195,10 @@ msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." #~ msgid "" #~ "Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation " #~ "is returned as a byte string encoded in the preferred system encoding if " -#~ "no encoding was explicitly set with :meth:`~NullTranslations." -#~ "set_output_charset`." +#~ "no encoding was explicitly set " +#~ "with :meth:`~NullTranslations.set_output_charset`." #~ msgstr "" #~ "Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction " #~ "est renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage " -#~ "du système si aucun autre n'a été défini avec :meth:`~NullTranslations." -#~ "set_output_charset`." +#~ "du système si aucun autre n'a été défini " +#~ "avec :meth:`~NullTranslations.set_output_charset`." diff --git a/library/glob.po b/library/glob.po index cf3fb7916..23f9b88a9 100644 --- a/library/glob.po +++ b/library/glob.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-02-11 13:53+0100\n" "Last-Translator: Arnaud Fréalle \n" "Language-Team: FRENCH \n" @@ -27,9 +27,8 @@ msgstr "**Code source :** :source:`Lib/glob.py`" #: library/glob.rst:21 #, fuzzy msgid "" -"The :mod:`glob` module finds all the pathnames matching a specified pattern " -"according to the rules used by the Unix shell, although results are returned " -"in arbitrary order. No tilde expansion is done, but ``*``, ``?``, and " +"The :mod:`!glob` module finds pathnames using pattern matching rules similar " +"to the Unix shell. No tilde expansion is done, but ``*``, ``?``, and " "character ranges expressed with ``[]`` will be correctly matched. This is " "done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions " "in concert, and not by actually invoking a subshell." @@ -39,22 +38,29 @@ msgstr "" "renvoyés dans un ordre arbitraire. Aucun remplacement du tilde n'est " "réalisé, mais les caractères ``*``, ``?``, et les caractères ``[]`` " "exprimant un intervalle sont correctement renvoyés. Cette opération est " -"réalisée en utilisant les fonctions :func:`os.scandir` et :func:`fnmatch." -"fnmatch` de concert, et sans invoquer une sous-commande. Notons qu'à la " -"différence de :func:`fnmatch.fnmatch`, :mod:`glob` traite les noms de " -"fichiers commençant par un point (``.``) comme des cas spéciaux. (Pour " -"remplacer le tilde et les variables shell, nous vous conseillons d'utiliser " -"les fonctions :func:`os.path.expanduser` et :func:`os.path.expandvars`.)" - -#: library/glob.rst:28 +"réalisée en utilisant les fonctions :func:`os.scandir` " +"et :func:`fnmatch.fnmatch` de concert, et sans invoquer une sous-commande. " +"Notons qu'à la différence de :func:`fnmatch.fnmatch`, :mod:`glob` traite les " +"noms de fichiers commençant par un point (``.``) comme des cas spéciaux. " +"(Pour remplacer le tilde et les variables shell, nous vous conseillons " +"d'utiliser les fonctions :func:`os.path.expanduser` " +"et :func:`os.path.expandvars`.)" + +#: library/glob.rst:29 msgid "" -"Note that files beginning with a dot (``.``) can only be matched by patterns " -"that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib." -"Path.glob`. (For tilde and shell variable expansion, use :func:`os.path." -"expanduser` and :func:`os.path.expandvars`.)" +"The pathnames are returned in no particular order. If you need a specific " +"order, sort the results." msgstr "" -#: library/glob.rst:34 +#: library/glob.rst:32 +msgid "" +"Files beginning with a dot (``.``) can only be matched by patterns that also " +"start with a dot, unlike :func:`fnmatch.fnmatch` " +"or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, " +"use :func:`os.path.expanduser` and :func:`os.path.expandvars`." +msgstr "" + +#: library/glob.rst:38 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``'[?]'`` matches the character ``'?'``." @@ -62,36 +68,37 @@ msgstr "" "Pour une correspondance littérale, il faut entourer le métacaractère par des " "crochets. Par exemple, ``'[?]'`` reconnaît le caractère ``'?'``." -#: library/glob.rst:37 -msgid "The :mod:`glob` module defines the following functions:" +#: library/glob.rst:41 +msgid "The :mod:`!glob` module defines the following functions:" msgstr "" -#: library/glob.rst:43 +#: library/glob.rst:47 #, fuzzy msgid "" "Return a possibly empty list of path names that match *pathname*, which must " "be a string containing a path specification. *pathname* can be either " -"absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like :file:" -"`../../Tools/\\*/\\*.gif`), and can contain shell-style wildcards. Broken " -"symlinks are included in the results (as in the shell). Whether or not the " -"results are sorted depends on the file system. If a file that satisfies " -"conditions is removed or added during the call of this function, whether a " -"path name for that file will be included is unspecified." +"absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative " +"(like :file:`../../Tools/\\*/\\*.gif`), and can contain shell-style " +"wildcards. Broken symlinks are included in the results (as in the shell). " +"Whether or not the results are sorted depends on the file system. If a file " +"that satisfies conditions is removed or added during the call of this " +"function, whether a path name for that file will be included is unspecified." msgstr "" "Renvoie une liste, potentiellement vide, de chemins correspondant au motif " "*pathname*, qui doit être une chaîne de caractères contenant la " "spécification du chemin. *pathname* peut être soit absolu (comme :file:`/usr/" -"src/Python-1.5/Makefile`) soit relatif (comme :file:`../../Tools/\\*/\\*." -"gif`), et contenir un caractère de remplacement de style shell. Les liens " -"symboliques cassés sont aussi inclus dans les résultats (comme pour le " +"src/Python-1.5/Makefile`) soit relatif (comme :file:`../../Tools/\\*/" +"\\*.gif`), et contenir un caractère de remplacement de style shell. Les " +"liens symboliques cassés sont aussi inclus dans les résultats (comme pour le " "shell). Le fait que les résultats soient triés ou non dépend du système de " "fichiers." -#: library/glob.rst:52 +#: library/glob.rst:56 +#, fuzzy msgid "" "If *root_dir* is not ``None``, it should be a :term:`path-like object` " -"specifying the root directory for searching. It has the same effect on :" -"func:`glob` as changing the current directory before calling it. If " +"specifying the root directory for searching. It has the same effect " +"on :func:`!glob` as changing the current directory before calling it. If " "*pathname* is relative, the result will contain paths relative to *root_dir*." msgstr "" "Si *root_dir* n'est pas ``None``, cela doit être un :term:`objet simili-" @@ -100,7 +107,7 @@ msgstr "" "avant l'appel de la fonction. Si *pathname* est relatif, les chemins du " "résultat seront relatifs au *root_dir* ." -#: library/glob.rst:58 +#: library/glob.rst:62 msgid "" "This function can support :ref:`paths relative to directory descriptors " "` with the *dir_fd* parameter." @@ -108,7 +115,7 @@ msgstr "" "Cette fonction prend en charge les :ref:`chemins relatifs aux descripteurs " "de dossier ` avec le paramètre *dir_fd*." -#: library/glob.rst:64 +#: library/glob.rst:68 msgid "" "If *recursive* is true, the pattern \"``**``\" will match any files and zero " "or more directories, subdirectories and symbolic links to directories. If " @@ -120,13 +127,13 @@ msgstr "" "répertoires. Si le motif est suivi par :data:`os.sep` ou :data:`os.altsep` " "alors les fichiers ne sont pas inclus dans le résultat." -#: library/glob.rst:69 +#: library/glob.rst:73 msgid "" "If *include_hidden* is true, \"``**``\" pattern will match hidden " "directories." msgstr "" -#: library/glob.rst:98 +#: library/glob.rst:107 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." @@ -134,7 +141,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``glob.glob`` avec les arguments " "``pathname``, ``recursive``." -#: library/glob.rst:99 +#: library/glob.rst:108 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." @@ -142,7 +149,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``glob.glob/2`` avec les " "arguments ``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." -#: library/glob.rst:75 +#: library/glob.rst:79 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." @@ -150,33 +157,40 @@ msgstr "" "Utiliser le motif \"``**``\" dans de grandes arborescences de dossier peut " "consommer une quantité de temps démesurée." -#: library/glob.rst:102 +#: library/glob.rst:111 msgid "" "This function may return duplicate path names if *pathname* contains " "multiple \"``**``\" patterns and *recursive* is true." msgstr "" -#: library/glob.rst:105 +#: library/glob.rst:115 +msgid "" +"Any :exc:`OSError` exceptions raised from scanning the filesystem are " +"suppressed. This includes :exc:`PermissionError` when accessing directories " +"without read permission." +msgstr "" + +#: library/glob.rst:119 msgid "Support for recursive globs using \"``**``\"." msgstr "Prise en charge des chemins récursifs utilisant le motif \"``**``\"." -#: library/glob.rst:108 +#: library/glob.rst:122 msgid "Added the *root_dir* and *dir_fd* parameters." msgstr "Paramètres *root_dir* et *dir_fd* ajoutés." -#: library/glob.rst:111 +#: library/glob.rst:125 msgid "Added the *include_hidden* parameter." msgstr "" -#: library/glob.rst:95 +#: library/glob.rst:104 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." msgstr "" -"Renvoie un :term:`itérateur ` qui produit les mêmes valeurs que :" -"func:`glob`, sans toutes les charger en mémoire simultanément." +"Renvoie un :term:`itérateur ` qui produit les mêmes valeurs " +"que :func:`glob`, sans toutes les charger en mémoire simultanément." -#: library/glob.rst:117 +#: library/glob.rst:131 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " @@ -188,86 +202,88 @@ msgstr "" "utile pour reconnaître une chaîne de caractère littérale arbitraire qui " "contiendrait ce type de caractères. Les caractères spéciaux dans les disques " "et répertoires partagés (chemins UNC) ne sont pas échappés, e.g. sous " -"Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo vadis[?]." -"txt'``." +"Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo " +"vadis[?].txt'``." -#: library/glob.rst:128 +#: library/glob.rst:142 msgid "" -"Convert the given path specification to a regular expression for use with :" -"func:`re.match`. The path specification can contain shell-style wildcards." +"Convert the given path specification to a regular expression for use " +"with :func:`re.prefixmatch`. The path specification can contain shell-style " +"wildcards." msgstr "" -#: library/glob.rst:131 +#: library/glob.rst:146 msgid "For example:" msgstr "Par exemple :" -#: library/glob.rst:142 +#: library/glob.rst:157 msgid "" -"Path separators and segments are meaningful to this function, unlike :func:" -"`fnmatch.translate`. By default wildcards do not match path separators, and " -"``*`` pattern segments match precisely one path segment." +"Path separators and segments are meaningful to this function, " +"unlike :func:`fnmatch.translate`. By default wildcards do not match path " +"separators, and ``*`` pattern segments match precisely one path segment." msgstr "" -#: library/glob.rst:146 +#: library/glob.rst:161 msgid "" "If *recursive* is true, the pattern segment \"``**``\" will match any number " "of path segments." msgstr "" -#: library/glob.rst:149 +#: library/glob.rst:164 msgid "" "If *include_hidden* is true, wildcards can match path segments that start " "with a dot (``.``)." msgstr "" -#: library/glob.rst:152 +#: library/glob.rst:167 msgid "" "A sequence of path separators may be supplied to the *seps* argument. If not " "given, :data:`os.sep` and :data:`~os.altsep` (if available) are used." msgstr "" -#: library/glob.rst:157 +#: library/glob.rst:172 msgid "" ":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, " "which call this function to implement pattern matching and globbing." msgstr "" -#: library/glob.rst:165 +#: library/glob.rst:180 msgid "Examples" msgstr "Exemples" -#: library/glob.rst:167 +#: library/glob.rst:182 #, fuzzy msgid "" -"Consider a directory containing the following files: :file:`1.gif`, :file:`2." -"txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only " -"the file :file:`3.txt`. :func:`glob` will produce the following results. " +"Consider a directory containing the following " +"files: :file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a " +"subdirectory :file:`sub` which contains only the " +"file :file:`3.txt`. :func:`glob` will produce the following results. " "Notice how any leading components of the path are preserved. ::" msgstr "" -"Par exemple, considérons un répertoire contenant les fichiers suivants : :" -"file:`1.gif`, :file:`2.txt`, :file:`card.gif` et un sous-répertoire :file:" -"`sub` contenant seulement le fichier :file:`3.txt`. :func:`glob` produit " -"les résultats suivants. Notons que les composantes principales des chemins " -"sont préservées. ::" +"Par exemple, considérons un répertoire contenant les fichiers " +"suivants : :file:`1.gif`, :file:`2.txt`, :file:`card.gif` et un sous-" +"répertoire :file:`sub` contenant seulement le " +"fichier :file:`3.txt`. :func:`glob` produit les résultats suivants. Notons " +"que les composantes principales des chemins sont préservées. ::" -#: library/glob.rst:185 +#: library/glob.rst:200 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " -"default. For example, consider a directory containing :file:`card.gif` and :" -"file:`.card.gif`::" +"default. For example, consider a directory containing :file:`card.gif` " +"and :file:`.card.gif`::" msgstr "" "Si le répertoire contient des fichiers commençant par ``.``, ils ne sont pas " -"reconnus par défaut. Par exemple, considérons un répertoire contenant :file:" -"`card.gif` et :file:`.card.gif` ::" +"reconnus par défaut. Par exemple, considérons un répertoire " +"contenant :file:`card.gif` et :file:`.card.gif` ::" -#: library/glob.rst:196 +#: library/glob.rst:211 #, fuzzy msgid "" "The :mod:`fnmatch` module offers shell-style filename (not path) expansion." msgstr "" "Recherche de noms de fichiers de style shell (ne concerne pas les chemins)" -#: library/glob.rst:199 +#: library/glob.rst:214 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" "Le module :mod:`pathlib` offre une représentation objet de haut niveau des " diff --git a/library/graphlib.po b/library/graphlib.po index fd913840b..5d00dcc8b 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-11-17 10:01+0100\n" "Last-Translator: Jeffd \n" "Language-Team: FRENCH \n" @@ -107,8 +107,8 @@ msgstr "" #: library/graphlib.rst:49 msgid "" "In case just an immediate sorting of the nodes in the graph is required and " -"no parallelism is involved, the convenience method :meth:`TopologicalSorter." -"static_order` can be used directly:" +"no parallelism is involved, the convenience " +"method :meth:`TopologicalSorter.static_order` can be used directly:" msgstr "" "Si vous souhaitez simplement trier des nœuds du graphe sans parallélisme, la " "méthode :meth:`TopologicalSorter.static_order` peut être utilisée " @@ -156,42 +156,55 @@ msgstr "" msgid "" "Raises :exc:`ValueError` if called after :meth:`~TopologicalSorter.prepare`." msgstr "" -"Lève une :exc:`ValueError` si appelée après :meth:`~TopologicalSorter." -"prepare`." +"Lève une :exc:`ValueError` si appelée " +"après :meth:`~TopologicalSorter.prepare`." #: library/graphlib.rst:102 msgid "" "Mark the graph as finished and check for cycles in the graph. If any cycle " -"is detected, :exc:`CycleError` will be raised, but :meth:`~TopologicalSorter." -"get_ready` can still be used to obtain as many nodes as possible until " -"cycles block more progress. After a call to this function, the graph cannot " -"be modified, and therefore no more nodes can be added using :meth:" -"`~TopologicalSorter.add`." +"is detected, :exc:`CycleError` will be raised, " +"but :meth:`~TopologicalSorter.get_ready` can still be used to obtain as many " +"nodes as possible until cycles block more progress. After a call to this " +"function, the graph cannot be modified, and therefore no more nodes can be " +"added using :meth:`~TopologicalSorter.add`." msgstr "" "Indique que le graphe est terminé et vérifie les circuits du graphe. Si un " -"circuit est détecté, une :exc:`CycleError` est levée mais :meth:" -"`~TopologicalSorter.get_ready` peut encore être utilisée pour obtenir autant " -"de nœuds que possible avant que les circuits ne bloquent la progression. " -"Après un appel de cette fonction, le graphe ne peut pas être modifié, et " -"donc aucun nœud ne peut être ajouté avec :meth:`~TopologicalSorter.add`." +"circuit est détecté, une :exc:`CycleError` est levée " +"mais :meth:`~TopologicalSorter.get_ready` peut encore être utilisée pour " +"obtenir autant de nœuds que possible avant que les circuits ne bloquent la " +"progression. Après un appel de cette fonction, le graphe ne peut pas être " +"modifié, et donc aucun nœud ne peut être ajouté " +"avec :meth:`~TopologicalSorter.add`." + +#: library/graphlib.rst:109 +msgid "" +"A :exc:`ValueError` will be raised if the sort has been started " +"by :meth:`~.static_order` or :meth:`~.get_ready`." +msgstr "" + +#: library/graphlib.rst:114 +msgid "" +"``prepare()`` can now be called more than once as long as the sort has not " +"started. Previously this raised :exc:`ValueError`." +msgstr "" -#: library/graphlib.rst:111 +#: library/graphlib.rst:119 msgid "" "Returns ``True`` if more progress can be made and ``False`` otherwise. " "Progress can be made if cycles do not block the resolution and either there " -"are still nodes ready that haven't yet been returned by :meth:" -"`TopologicalSorter.get_ready` or the number of nodes marked :meth:" -"`TopologicalSorter.done` is less than the number that have been returned by :" -"meth:`TopologicalSorter.get_ready`." +"are still nodes ready that haven't yet been returned " +"by :meth:`TopologicalSorter.get_ready` or the number of nodes " +"marked :meth:`TopologicalSorter.done` is less than the number that have been " +"returned by :meth:`TopologicalSorter.get_ready`." msgstr "" "Renvoie ``True`` si une progression peut être faite et ``False`` dans le cas " "contraire. La progression est possible si des circuits ne bloquent pas la " "résolution ou qu'il reste des nœuds prêts qui n'ont pas encore été renvoyés " -"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds marqués :" -"meth:`TopologicalSorter.done` est inférieur au nombre qui a été renvoyé par :" -"meth:`TopologicalSorter.get_ready`." +"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds " +"marqués :meth:`TopologicalSorter.done` est inférieur au nombre qui a été " +"renvoyé par :meth:`TopologicalSorter.get_ready`." -#: library/graphlib.rst:118 +#: library/graphlib.rst:126 #, fuzzy msgid "" "The :meth:`~object.__bool__` method of this class defers to this function, " @@ -200,19 +213,19 @@ msgstr "" "La méthode :meth:`~TopologicalSorter.__bool__` de cette classe renvoie à " "cette fonction donc au lieu de ::" -#: library/graphlib.rst:124 +#: library/graphlib.rst:132 msgid "it is possible to simply do::" msgstr "il est plus simple de faire ::" -#: library/graphlib.rst:152 +#: library/graphlib.rst:160 msgid "" -"Raises :exc:`ValueError` if called without calling :meth:`~TopologicalSorter." -"prepare` previously." +"Raises :exc:`ValueError` if called without " +"calling :meth:`~TopologicalSorter.prepare` previously." msgstr "" "Lève une :exc:`ValueError` si l'appel à :meth:`~TopologicalSorter.prepare` " "n'a pas été fait au préalable." -#: library/graphlib.rst:134 +#: library/graphlib.rst:142 msgid "" "Marks a set of nodes returned by :meth:`TopologicalSorter.get_ready` as " "processed, unblocking any successor of each node in *nodes* for being " @@ -222,13 +235,13 @@ msgstr "" "comme traités, permettant aux successeurs de chaque nœud de *nodes* d'être " "renvoyés lors d'un prochain appel à :meth:`~TopologicalSorter.get_ready`." -#: library/graphlib.rst:138 +#: library/graphlib.rst:146 msgid "" "Raises :exc:`ValueError` if any node in *nodes* has already been marked as " "processed by a previous call to this method or if a node was not added to " -"the graph by using :meth:`TopologicalSorter.add`, if called without calling :" -"meth:`~TopologicalSorter.prepare` or if node has not yet been returned by :" -"meth:`~TopologicalSorter.get_ready`." +"the graph by using :meth:`TopologicalSorter.add`, if called without " +"calling :meth:`~TopologicalSorter.prepare` or if node has not yet been " +"returned by :meth:`~TopologicalSorter.get_ready`." msgstr "" "Lève une :exc:`ValueError` si n'importe quel nœud dans *nodes* a déjà été " "marqué comme traité par un précédent appel à cette méthode ou si un nœud n'a " @@ -236,7 +249,7 @@ msgstr "" "l'appel est fait sans appel à :meth:`~TopologicalSorter.prepare` ou si le " "nœud n'a pas encore été renvoyé par :meth:`~TopologicalSorter.get_ready`." -#: library/graphlib.rst:146 +#: library/graphlib.rst:154 msgid "" "Returns a ``tuple`` with all the nodes that are ready. Initially it returns " "all nodes with no predecessors, and once those are marked as processed by " @@ -250,20 +263,20 @@ msgstr "" "nouveaux nœuds dont tous les prédécesseurs sont traités. Une fois que la " "progression n'est plus possible, des tuples vides sont renvoyés." -#: library/graphlib.rst:157 +#: library/graphlib.rst:165 #, fuzzy msgid "" "Returns an iterator object which will iterate over nodes in a topological " -"order. When using this method, :meth:`~TopologicalSorter.prepare` and :meth:" -"`~TopologicalSorter.done` should not be called. This method is equivalent " -"to::" +"order. When using this method, :meth:`~TopologicalSorter.prepare` " +"and :meth:`~TopologicalSorter.done` should not be called. This method is " +"equivalent to::" msgstr "" "Renvoie un itérable contenant les nœuds dans un ordre topologique. " -"L'utilisation de cette méthode permet d'éviter l'appel à :meth:" -"`TopologicalSorter.prepare` ou :meth:`TopologicalSorter.done` Cette méthode " -"est équivalente à ::" +"L'utilisation de cette méthode permet d'éviter l'appel " +"à :meth:`TopologicalSorter.prepare` ou :meth:`TopologicalSorter.done` Cette " +"méthode est équivalente à ::" -#: library/graphlib.rst:169 +#: library/graphlib.rst:177 msgid "" "The particular order that is returned may depend on the specific order in " "which the items were inserted in the graph. For example:" @@ -271,51 +284,54 @@ msgstr "" "Le tri obtenu peut dépendre de l'ordre dans lequel les éléments ont été " "ajoutés dans le graphe. Par exemple :" -#: library/graphlib.rst:186 +#: library/graphlib.rst:194 msgid "" "This is due to the fact that \"0\" and \"2\" are in the same level in the " -"graph (they would have been returned in the same call to :meth:" -"`~TopologicalSorter.get_ready`) and the order between them is determined by " -"the order of insertion." +"graph (they would have been returned in the same call " +"to :meth:`~TopologicalSorter.get_ready`) and the order between them is " +"determined by the order of insertion." msgstr "" "Ceci est dû au fait que \"0\" et \"2\" sont au même niveau dans le graphe " -"(ils auraient été renvoyés dans le même appel à :meth:`~TopologicalSorter." -"get_ready`) et l'ordre entre eux est déterminé par l'ordre lors de " -"l'insertion." +"(ils auraient été renvoyés dans le même appel " +"à :meth:`~TopologicalSorter.get_ready`) et l'ordre entre eux est déterminé " +"par l'ordre lors de l'insertion." -#: library/graphlib.rst:192 +#: library/graphlib.rst:200 msgid "If any cycle is detected, :exc:`CycleError` will be raised." msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." -#: library/graphlib.rst:198 +#: library/graphlib.rst:206 msgid "Exceptions" msgstr "Exceptions" -#: library/graphlib.rst:199 -msgid "The :mod:`graphlib` module defines the following exception classes:" +#: library/graphlib.rst:207 +#, fuzzy +msgid "The :mod:`!graphlib` module defines the following exception classes:" msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" -#: library/graphlib.rst:203 +#: library/graphlib.rst:211 msgid "" "Subclass of :exc:`ValueError` raised by :meth:`TopologicalSorter.prepare` if " "cycles exist in the working graph. If multiple cycles exist, only one " "undefined choice among them will be reported and included in the exception." msgstr "" -"Une classe héritant de :exc:`ValueError` levée par :meth:`TopologicalSorter." -"prepare` si un circuit existe dans le graphe courant. Si plusieurs circuits " -"existent, un seul est inclus dans l'exception." +"Une classe héritant de :exc:`ValueError` levée " +"par :meth:`TopologicalSorter.prepare` si un circuit existe dans le graphe " +"courant. Si plusieurs circuits existent, un seul est inclus dans l'exception." -#: library/graphlib.rst:207 +#: library/graphlib.rst:215 #, fuzzy msgid "" -"The detected cycle can be accessed via the second element in the :attr:" -"`~BaseException.args` attribute of the exception instance and consists in a " -"list of nodes, such that each node is, in the graph, an immediate " -"predecessor of the next node in the list. In the reported list, the first " -"and the last node will be the same, to make it clear that it is cyclic." +"The detected cycle can be accessed via the second element in " +"the :attr:`~BaseException.args` attribute of the exception instance and " +"consists in a list of nodes, such that each node is, in the graph, an " +"immediate predecessor of the next node in the list. In the reported list, " +"the first and the last node will be the same, to make it clear that it is " +"cyclic." msgstr "" -"On accède au circuit détecté via le second élément de l'attribut :attr:" -"`~CycleError.args` de l'instance de l'exception. Cet attribut est une liste " -"de nœuds où chaque nœud est, dans le graphe, un prédécesseur immédiat du " -"nœud suivant de la liste. Dans la liste renvoyée, le premier et le dernier " -"nœud sont les mêmes afin de bien indiquer que c'est un circuit." +"On accède au circuit détecté via le second élément de " +"l'attribut :attr:`~CycleError.args` de l'instance de l'exception. Cet " +"attribut est une liste de nœuds où chaque nœud est, dans le graphe, un " +"prédécesseur immédiat du nœud suivant de la liste. Dans la liste renvoyée, " +"le premier et le dernier nœud sont les mêmes afin de bien indiquer que c'est " +"un circuit." diff --git a/library/grp.po b/library/grp.po index 416041bb3..ffc92aa40 100644 --- a/library/grp.po +++ b/library/grp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 22:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,124 +18,124 @@ msgstr "" msgid ":mod:`!grp` --- The group database" msgstr "" -#: library/grp.rst:10 +#: library/grp.rst:9 msgid "" "This module provides access to the Unix group database. It is available on " "all Unix versions." msgstr "" -#: library/grp.rst:13 +#: library/grp.rst:12 msgid "Availability" -msgstr "" +msgstr "Disponibilité" -#: library/grp.rst:15 +#: library/grp.rst:14 msgid "" "Group database entries are reported as a tuple-like object, whose attributes " "correspond to the members of the ``group`` structure (Attribute field below, " "see ````):" msgstr "" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Index" msgstr "Index" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Attribute" msgstr "Attribut" -#: library/grp.rst:20 +#: library/grp.rst:19 msgid "Meaning" msgstr "Signification" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "0" msgstr "0" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "gr_name" msgstr "gr_name" -#: library/grp.rst:22 +#: library/grp.rst:21 msgid "the name of the group" msgstr "" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "1" msgstr "1" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "gr_passwd" msgstr "gr_passwd" -#: library/grp.rst:24 +#: library/grp.rst:23 msgid "the (encrypted) group password; often empty" msgstr "" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "2" msgstr "2" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "gr_gid" msgstr "gr_gid" -#: library/grp.rst:27 +#: library/grp.rst:26 msgid "the numerical group ID" msgstr "" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "3" msgstr "3" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "gr_mem" msgstr "gr_mem" -#: library/grp.rst:29 +#: library/grp.rst:28 msgid "all the group member's user names" msgstr "" -#: library/grp.rst:33 +#: library/grp.rst:32 msgid "" "The gid is an integer, name and password are strings, and the member list is " "a list of strings. (Note that most users are not explicitly listed as " "members of the group they are in according to the password database. Check " "both databases to get complete membership information. Also note that a " "``gr_name`` that starts with a ``+`` or ``-`` is likely to be a YP/NIS " -"reference and may not be accessible via :func:`getgrnam` or :func:" -"`getgrgid`.)" +"reference and may not be accessible via :func:`getgrnam` " +"or :func:`getgrgid`.)" msgstr "" -#: library/grp.rst:40 +#: library/grp.rst:39 msgid "It defines the following items:" msgstr "" -#: library/grp.rst:45 +#: library/grp.rst:44 msgid "" -"Return the group database entry for the given numeric group ID. :exc:" -"`KeyError` is raised if the entry asked for cannot be found." +"Return the group database entry for the given numeric group " +"ID. :exc:`KeyError` is raised if the entry asked for cannot be found." msgstr "" -#: library/grp.rst:48 +#: library/grp.rst:47 msgid "" ":exc:`TypeError` is raised for non-integer arguments like floats or strings." msgstr "" -#: library/grp.rst:53 +#: library/grp.rst:52 msgid "" "Return the group database entry for the given group name. :exc:`KeyError` is " "raised if the entry asked for cannot be found." msgstr "" -#: library/grp.rst:59 +#: library/grp.rst:58 msgid "Return a list of all available group entries, in arbitrary order." msgstr "" -#: library/grp.rst:64 +#: library/grp.rst:63 msgid "Module :mod:`pwd`" msgstr "Module :mod:`pwd`" -#: library/grp.rst:65 +#: library/grp.rst:64 #, fuzzy msgid "An interface to the user database, similar to this." msgstr "Interface pour la base de données des groupes, similaire à celle-ci." diff --git a/library/gzip.po b/library/gzip.po index 762eecc2c..fda3eaf74 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2018-10-07 15:03+0200\n" "Last-Translator: Lomanic \n" "Language-Team: FRENCH \n" @@ -30,43 +30,53 @@ msgid "" "just like the GNU programs :program:`gzip` and :program:`gunzip` would." msgstr "" "Ce module fournit une interface simple pour compresser et décompresser des " -"fichiers tout comme le font les programmes GNU :program:`gzip` et :program:" -"`gunzip`." +"fichiers tout comme le font les programmes GNU :program:`gzip` " +"et :program:`gunzip`." -#: library/gzip.rst:14 +#: includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + +#: library/gzip.rst:16 msgid "The data compression is provided by the :mod:`zlib` module." msgstr "La compression de données est fournie par le module :mod:`zlib`." -#: library/gzip.rst:16 +#: library/gzip.rst:18 +#, fuzzy msgid "" -"The :mod:`gzip` module provides the :class:`GzipFile` class, as well as the :" -"func:`.open`, :func:`compress` and :func:`decompress` convenience functions. " -"The :class:`GzipFile` class reads and writes :program:`gzip`\\ -format " -"files, automatically compressing or decompressing the data so that it looks " -"like an ordinary :term:`file object`." +"The :mod:`!gzip` module provides the :class:`GzipFile` class, as well as " +"the :func:`.open`, :func:`compress` and :func:`decompress` convenience " +"functions. The :class:`GzipFile` class reads and writes :program:`gzip`\\ " +"-format files, automatically compressing or decompressing the data so that " +"it looks like an ordinary :term:`file object`." msgstr "" "Le module :mod:`gzip` fournit la classe :class:`GzipFile` ainsi que les " "fonctions pratiques :func:`.open`, :func:`compress` et :func:`decompress`. " -"La classe :class:`GzipFile` lit et écrit des fichiers au format :program:" -"`gzip`, compressant et décompressant automatiquement les données pour " -"qu'elles aient l'apparence d'un objet :term:`file object` ordinaire." +"La classe :class:`GzipFile` lit et écrit des fichiers au " +"format :program:`gzip`, compressant et décompressant automatiquement les " +"données pour qu'elles aient l'apparence d'un objet :term:`file object` " +"ordinaire." -#: library/gzip.rst:22 +#: library/gzip.rst:24 msgid "" -"Note that additional file formats which can be decompressed by the :program:" -"`gzip` and :program:`gunzip` programs, such as those produced by :program:" -"`compress` and :program:`pack`, are not supported by this module." +"Note that additional file formats which can be decompressed by " +"the :program:`gzip` and :program:`gunzip` programs, such as those produced " +"by :program:`compress` and :program:`pack`, are not supported by this module." msgstr "" "Notez que les formats de fichier supplémentaires qui peuvent être " "décompressés par les programmes :program:`gzip` et :program:`gunzip`, comme " "ceux produits par le programmes :program:`compress` et :program:`pack`, ne " "sont pas gérés par ce module." -#: library/gzip.rst:26 +#: library/gzip.rst:28 msgid "The module defines the following items:" msgstr "Le module définit les éléments suivants :" -#: library/gzip.rst:31 +#: library/gzip.rst:33 msgid "" "Open a gzip-compressed file in binary or text mode, returning a :term:`file " "object`." @@ -74,16 +84,17 @@ msgstr "" "Ouvre un fichier compressé en *gzip* en mode binaire ou texte, renvoie un " "objet :term:`file object`." -#: library/gzip.rst:34 +#: library/gzip.rst:36 msgid "" -"The *filename* argument can be an actual filename (a :class:`str` or :class:" -"`bytes` object), or an existing file object to read from or write to." +"The *filename* argument can be an actual filename (a :class:`str` " +"or :class:`bytes` object), or an existing file object to read from or write " +"to." msgstr "" -"L'argument *filename* peut être un nom de fichier (un objet :class:`str` ou :" -"class:`bytes`) ou un objet fichier existant que l'on peut lire, ou où l'on " -"peut écrire." +"L'argument *filename* peut être un nom de fichier (un objet :class:`str` " +"ou :class:`bytes`) ou un objet fichier existant que l'on peut lire, ou où " +"l'on peut écrire." -#: library/gzip.rst:37 +#: library/gzip.rst:39 msgid "" "The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, " "``'w'``, ``'wb'``, ``'x'`` or ``'xb'`` for binary mode, or ``'rt'``, " @@ -93,15 +104,15 @@ msgstr "" "``'wb'``, ``'x'`` ou ``'xb'`` pour le mode binaire ou ``'rt'``, ``'at'``, " "``'wt'``, ou ``'xt'`` pour le mode texte. Le mode par défaut est ``'rb'``." -#: library/gzip.rst:41 +#: library/gzip.rst:43 msgid "" -"The *compresslevel* argument is an integer from 0 to 9, as for the :class:" -"`GzipFile` constructor." +"The *compresslevel* argument is an integer from 0 to 9, as for " +"the :class:`GzipFile` constructor." msgstr "" "L'argument *compresslevel* est un entier de 0 à 9, comme pour le " "constructeur de la classe :class:`GzipFile`." -#: library/gzip.rst:44 +#: library/gzip.rst:46 msgid "" "For binary mode, this function is equivalent to the :class:`GzipFile` " "constructor: ``GzipFile(filename, mode, compresslevel)``. In this case, the " @@ -112,17 +123,17 @@ msgstr "" "ce cas, les arguments *encoding*, *errors* et *newline* ne doivent pas être " "fournis." -#: library/gzip.rst:48 +#: library/gzip.rst:50 msgid "" -"For text mode, a :class:`GzipFile` object is created, and wrapped in an :" -"class:`io.TextIOWrapper` instance with the specified encoding, error " +"For text mode, a :class:`GzipFile` object is created, and wrapped in " +"an :class:`io.TextIOWrapper` instance with the specified encoding, error " "handling behavior, and line ending(s)." msgstr "" "En mode texte, un objet :class:`GzipFile` est créé et empaqueté dans une " "instance de :class:`io.TextIOWrapper` avec l'encodage, la gestion d'erreur " "et les fins de ligne spécifiés." -#: library/gzip.rst:52 +#: library/gzip.rst:54 msgid "" "Added support for *filename* being a file object, support for text mode, and " "the *encoding*, *errors* and *newline* arguments." @@ -130,35 +141,42 @@ msgstr "" "Ajout de la prise en charge de *filename* en tant qu'objet *file*, du mode " "texte et des arguments *encoding*, *errors* et *newline*." -#: library/gzip.rst:56 +#: library/gzip.rst:58 msgid "Added support for the ``'x'``, ``'xb'`` and ``'xt'`` modes." msgstr "Ajout de la prise en charge des modes ``'x'``, ``'xb'`` et ``'xt'``." -#: library/gzip.rst:175 +#: library/gzip.rst:184 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: library/gzip.rst:64 +#: library/gzip.rst:195 library/gzip.rst:225 msgid "" -"An exception raised for invalid gzip files. It inherits from :exc:" -"`OSError`. :exc:`EOFError` and :exc:`zlib.error` can also be raised for " -"invalid gzip files." +"The default compression level was reduced to 6 (down from 9). It is the " +"default level used by most compression tools and a better tradeoff between " +"speed and performance." msgstr "" -#: library/gzip.rst:72 +#: library/gzip.rst:71 +msgid "" +"An exception raised for invalid gzip files. It inherits " +"from :exc:`OSError`. :exc:`EOFError` and :exc:`zlib.error` can also be " +"raised for invalid gzip files." +msgstr "" + +#: library/gzip.rst:79 #, fuzzy msgid "" "Constructor for the :class:`GzipFile` class, which simulates most of the " -"methods of a :term:`file object`, with the exception of the :meth:`~io." -"IOBase.truncate` method. At least one of *fileobj* and *filename* must be " -"given a non-trivial value." +"methods of a :term:`file object`, with the exception of " +"the :meth:`~io.IOBase.truncate` method. At least one of *fileobj* and " +"*filename* must be given a non-trivial value." msgstr "" "Constructeur de la classe :class:`GzipFile` qui simule la plupart des " -"méthodes d'un objet :term:`file object` à l'exception de la méthode :meth:" -"`truncate`. Au moins un des arguments *fileobj* et *filename* doit avoir une " -"valeur non triviale." +"méthodes d'un objet :term:`file object` à l'exception de la " +"méthode :meth:`truncate`. Au moins un des arguments *fileobj* et *filename* " +"doit avoir une valeur non triviale." -#: library/gzip.rst:77 +#: library/gzip.rst:84 msgid "" "The new class instance is based on *fileobj*, which can be a regular file, " "an :class:`io.BytesIO` object, or any other object which simulates a file. " @@ -170,7 +188,7 @@ msgstr "" "un fichier. *fileobj* est par défaut à *None*, dans ce cas *filename* est " "ouvert afin de fournir un objet fichier." -#: library/gzip.rst:82 +#: library/gzip.rst:89 msgid "" "When *fileobj* is not ``None``, the *filename* argument is only used to be " "included in the :program:`gzip` file header, which may include the original " @@ -185,7 +203,7 @@ msgstr "" "défaut défini à une chaîne de caractères vide et dans ce cas le nom du " "fichier orignal n'est pas inclus dans l'entête." -#: library/gzip.rst:88 +#: library/gzip.rst:95 #, fuzzy msgid "" "The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, " @@ -200,7 +218,7 @@ msgstr "" "Par défaut prend la valeur du mode de *fileobj* si discernable ; sinon, la " "valeur par défaut est ``'rb'``." -#: library/gzip.rst:94 +#: library/gzip.rst:101 msgid "" "Note that the file is always opened in binary mode. To open a compressed " "file in text mode, use :func:`.open` (or wrap your :class:`GzipFile` with " @@ -210,7 +228,7 @@ msgstr "" "fichier compressé en mode texte, utilisez la fonction :func:`.open` (ou " "empaquetez votre classe :class:`GzipFile` avec un :class:`io.TextIOWrapper`)." -#: library/gzip.rst:98 +#: library/gzip.rst:105 msgid "" "The *compresslevel* argument is an integer from ``0`` to ``9`` controlling " "the level of compression; ``1`` is fastest and produces the least " @@ -222,82 +240,88 @@ msgstr "" "plus faible et ``9`` est le plus rapide et produit la compression la plus " "élevée. ``0`` désactive la compression. Par défaut à ``9``." -#: library/gzip.rst:103 +#: library/gzip.rst:110 msgid "" "The optional *mtime* argument is the timestamp requested by gzip. The time " -"is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. If " -"*mtime* is omitted or ``None``, the current time is used. Use *mtime* = 0 to " -"generate a compressed stream that does not depend on creation time." +"is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. Set " +"*mtime* to ``0`` to generate a compressed stream that does not depend on " +"creation time. If *mtime* is omitted or ``None``, the current time is used; " +"however, if the current time is outside the range 00:00:00 UTC, January 1, " +"1970 through 06:28:15 UTC, February 7, 2106, or explicitly passed *mtime* " +"argument is outside the range ``0`` to ``2**32-1``, then the value ``0`` is " +"used instead." msgstr "" -#: library/gzip.rst:108 +#: library/gzip.rst:119 msgid "" "See below for the :attr:`mtime` attribute that is set when decompressing." msgstr "" -#: library/gzip.rst:110 +#: library/gzip.rst:121 #, fuzzy msgid "" "Calling a :class:`GzipFile` object's :meth:`!close` method does not close " "*fileobj*, since you might wish to append more material after the compressed " "data. This also allows you to pass an :class:`io.BytesIO` object opened for " -"writing as *fileobj*, and retrieve the resulting memory buffer using the :" -"class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method." +"writing as *fileobj*, and retrieve the resulting memory buffer using " +"the :class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method." msgstr "" "Appeler la méthode :meth:`close` d'un objet :class:`GzipFile` ne ferme pas " "*fileobj*, puisque vous pourriez avoir besoin d'ajouter des informations " -"après les données compressées. Cela vous permet aussi de passer un objet :" -"class:`io.BytesIO` ouvert en écriture en tant que *fileobj* et récupérer le " -"tampon mémoire final en utilisant la méthode :meth:`~io.BytesIO.getvalue` de " -"l'objet :class:`io.BytesIO`." +"après les données compressées. Cela vous permet aussi de passer un " +"objet :class:`io.BytesIO` ouvert en écriture en tant que *fileobj* et " +"récupérer le tampon mémoire final en utilisant la " +"méthode :meth:`~io.BytesIO.getvalue` de l'objet :class:`io.BytesIO`." -#: library/gzip.rst:116 +#: library/gzip.rst:127 #, fuzzy msgid "" ":class:`GzipFile` supports the :class:`io.BufferedIOBase` interface, " -"including iteration and the :keyword:`with` statement. Only the :meth:`~io." -"IOBase.truncate` method isn't implemented." +"including iteration and the :keyword:`with` statement. Only " +"the :meth:`~io.IOBase.truncate` method isn't implemented." msgstr "" -":La classe :class:`GzipFile` implémente l'interface :class:`io." -"BufferedIOBase`, incluant l'itération, la déclaration :keyword:`with`. La " -"méthode :meth:`truncate` est la seule non implémentée." +":La classe :class:`GzipFile` implémente " +"l'interface :class:`io.BufferedIOBase`, incluant l'itération, la " +"déclaration :keyword:`with`. La méthode :meth:`truncate` est la seule non " +"implémentée." -#: library/gzip.rst:120 +#: library/gzip.rst:131 msgid ":class:`GzipFile` also provides the following method and attribute:" msgstr "" "La classe :class:`GzipFile` fournit aussi la méthode et l'attribut suivant :" -#: library/gzip.rst:124 +#: library/gzip.rst:135 +#, fuzzy msgid "" -"Read *n* uncompressed bytes without advancing the file position. At most one " -"single read on the compressed stream is done to satisfy the call. The " -"number of bytes returned may be more or less than requested." +"Read *n* uncompressed bytes without advancing the file position. The number " +"of bytes returned may be more or less than requested." msgstr "" "Lit *n* octets non compressés sans avancer la position dans le fichier. Au " "plus une seule lecture sur le flux compressé est faite pour satisfaire " "l'appel. Le nombre d'octets retournés peut être supérieur ou inférieur au " "nombre demandé." -#: library/gzip.rst:129 +#: library/gzip.rst:138 msgid "" -"While calling :meth:`peek` does not change the file position of the :class:" -"`GzipFile`, it may change the position of the underlying file object (e.g. " -"if the :class:`GzipFile` was constructed with the *fileobj* parameter)." +"While calling :meth:`peek` does not change the file position of " +"the :class:`GzipFile`, it may change the position of the underlying file " +"object (e.g. if the :class:`GzipFile` was constructed with the *fileobj* " +"parameter)." msgstr "" "Bien que l'appel à :meth:`peek` ne change pas la position dans le fichier de " "l'objet :class:`GzipFile`, il peut changer la position de l'objet de fichier " "sous-jacent (par exemple, si l'instance de :class:`GzipFile` a été " "construite avec le paramètre *fileobj*)." -#: library/gzip.rst:138 +#: library/gzip.rst:147 msgid "``'rb'`` for reading and ``'wb'`` for writing." msgstr "" -#: library/gzip.rst:140 +#: library/gzip.rst:149 msgid "In previous versions it was an integer ``1`` or ``2``." msgstr "" -#: library/gzip.rst:145 +#: library/gzip.rst:154 #, fuzzy msgid "" "When decompressing, this attribute is set to the last timestamp in the most " @@ -310,14 +334,14 @@ msgstr "" "attribut, comme un entier. La valeur initiale avant lecture d'un en-tête est " "``None``." -#: library/gzip.rst:152 +#: library/gzip.rst:161 msgid "" "The path to the gzip file on disk, as a :class:`str` or :class:`bytes`. " "Equivalent to the output of :func:`os.fspath` on the original input path, " "with no other normalization, resolution or expansion." msgstr "" -#: library/gzip.rst:156 +#: library/gzip.rst:165 msgid "" "Support for the :keyword:`with` statement was added, along with the *mtime* " "constructor argument and :attr:`mtime` attribute." @@ -325,21 +349,21 @@ msgstr "" "Ajout de la prise en charge du mot-clef :keyword:`with`, ainsi que de " "l'argument *mtime* du constructeur et de l'attribut :attr:`mtime`." -#: library/gzip.rst:160 +#: library/gzip.rst:169 msgid "Support for zero-padded and unseekable files was added." msgstr "" "Ajout de la prise en charge des fichiers non navigables ou commençant par " "des octets nuls." -#: library/gzip.rst:163 +#: library/gzip.rst:172 msgid "The :meth:`io.BufferedIOBase.read1` method is now implemented." msgstr "La méthode :meth:`io.BufferedIOBase.read1` est désormais implémentée." -#: library/gzip.rst:166 +#: library/gzip.rst:175 msgid "Added support for the ``'x'`` and ``'xb'`` modes." msgstr "Ajout de la prise en charge des modes ``'x'`` et ``'xb'``." -#: library/gzip.rst:169 +#: library/gzip.rst:178 msgid "" "Added support for writing arbitrary :term:`bytes-like objects `. The :meth:`~io.BufferedIOBase.read` method now accepts an argument " @@ -349,49 +373,56 @@ msgstr "" "` arbitraires. La méthode :meth:`~io.BufferedIOBase.read` " "accepte désormais un argument de valeur ``None``." -#: library/gzip.rst:178 +#: library/gzip.rst:187 msgid "" "Opening :class:`GzipFile` for writing without specifying the *mode* argument " "is deprecated." msgstr "" -#: library/gzip.rst:182 +#: library/gzip.rst:191 msgid "" "Remove the ``filename`` attribute, use the :attr:`~GzipFile.name` attribute " "instead." msgstr "" -#: library/gzip.rst:189 +#: library/gzip.rst:203 #, fuzzy msgid "" "Compress the *data*, returning a :class:`bytes` object containing the " "compressed data. *compresslevel* and *mtime* have the same meaning as in " -"the :class:`GzipFile` constructor above." +"the :class:`GzipFile` constructor above, but *mtime* defaults to 0 for " +"reproducible output." msgstr "" "Compresse les données *data*, renvoie un objet :class:`bytes` contenant les " "données compressées. L'argument *compresslevel* a la même signification que " "dans le constructeur de la classe :class:`GzipFile` ci-dessus." -#: library/gzip.rst:194 +#: library/gzip.rst:209 msgid "Added the *mtime* parameter for reproducible output." msgstr "" -#: library/gzip.rst:196 +#: library/gzip.rst:211 msgid "" "Speed is improved by compressing all data at once instead of in a streamed " -"fashion. Calls with *mtime* set to ``0`` are delegated to :func:`zlib." -"compress` for better speed. In this situation the output may contain a gzip " -"header \"OS\" byte value other than 255 \"unknown\" as supplied by the " -"underlying zlib implementation." +"fashion. Calls with *mtime* set to ``0`` are delegated " +"to :func:`zlib.compress` for better speed. In this situation the output may " +"contain a gzip header \"OS\" byte value other than 255 \"unknown\" as " +"supplied by the underlying zlib implementation." msgstr "" -#: library/gzip.rst:203 +#: library/gzip.rst:218 msgid "" "The gzip header OS byte is guaranteed to be set to 255 when this function is " "used as was the case in 3.10 and earlier." msgstr "" -#: library/gzip.rst:209 +#: library/gzip.rst:221 +msgid "" +"The *mtime* parameter now defaults to 0 for reproducible output. For the " +"previous behaviour of using the current time, pass ``None`` to *mtime*." +msgstr "" + +#: library/gzip.rst:232 msgid "" "Decompress the *data*, returning a :class:`bytes` object containing the " "uncompressed data. This function is capable of decompressing multi-member " @@ -400,40 +431,40 @@ msgid "" "*wbits* set to 31 is faster." msgstr "" -#: library/gzip.rst:216 +#: library/gzip.rst:239 msgid "" "Speed is improved by decompressing members at once in memory instead of in a " "streamed fashion." msgstr "" -#: library/gzip.rst:223 +#: library/gzip.rst:246 msgid "Examples of usage" msgstr "Exemples d'utilisation" -#: library/gzip.rst:225 +#: library/gzip.rst:248 msgid "Example of how to read a compressed file::" msgstr "Exemple montrant comment lire un fichier compressé ::" -#: library/gzip.rst:231 +#: library/gzip.rst:254 msgid "Example of how to create a compressed GZIP file::" msgstr "Exemple montrant comment créer un fichier GZIP ::" -#: library/gzip.rst:238 +#: library/gzip.rst:261 msgid "Example of how to GZIP compress an existing file::" msgstr "" "Exemple montrant comment compresser dans un GZIP un fichier existant ::" -#: library/gzip.rst:246 +#: library/gzip.rst:269 msgid "Example of how to GZIP compress a binary string::" msgstr "" "Exemple montrant comment compresser dans un GZIP un binaire dans une " "chaîne ::" -#: library/gzip.rst:254 +#: library/gzip.rst:277 msgid "Module :mod:`zlib`" msgstr "Module :mod:`zlib`" -#: library/gzip.rst:255 +#: library/gzip.rst:278 msgid "" "The basic data compression module needed to support the :program:`gzip` file " "format." @@ -441,47 +472,55 @@ msgstr "" "Le module de compression de données de base nécessaire pour gérer le format " "de fichier :program:`gzip`." -#: library/gzip.rst:264 -msgid "Command Line Interface" +#: library/gzip.rst:281 +msgid "" +"In case gzip (de)compression is a bottleneck, the `python-isal`_ package " +"speeds up (de)compression with a mostly compatible API." +msgstr "" + +#: library/gzip.rst:291 +#, fuzzy +msgid "Command-line interface" msgstr "Interface en ligne de commande" -#: library/gzip.rst:266 +#: library/gzip.rst:293 msgid "" -"The :mod:`gzip` module provides a simple command line interface to compress " +"The :mod:`!gzip` module provides a simple command line interface to compress " "or decompress files." msgstr "" -#: library/gzip.rst:269 -msgid "Once executed the :mod:`gzip` module keeps the input file(s)." +#: library/gzip.rst:296 +msgid "Once executed the :mod:`!gzip` module keeps the input file(s)." msgstr "" -#: library/gzip.rst:273 +#: library/gzip.rst:300 msgid "" "Add a new command line interface with a usage. By default, when you will " "execute the CLI, the default compression level is 6." msgstr "" -#: library/gzip.rst:277 -msgid "Command line options" +#: library/gzip.rst:304 +#, fuzzy +msgid "Command-line options" msgstr "Options de la ligne de commande" -#: library/gzip.rst:281 +#: library/gzip.rst:308 msgid "If *file* is not specified, read from :data:`sys.stdin`." msgstr "" -#: library/gzip.rst:285 +#: library/gzip.rst:312 msgid "Indicates the fastest compression method (less compression)." msgstr "" -#: library/gzip.rst:289 +#: library/gzip.rst:316 msgid "Indicates the slowest compression method (best compression)." msgstr "" -#: library/gzip.rst:293 +#: library/gzip.rst:320 msgid "Decompress the given file." msgstr "" -#: library/gzip.rst:297 +#: library/gzip.rst:324 msgid "Show the help message." msgstr "Affiche le message d'aide." @@ -500,15 +539,15 @@ msgstr "Affiche le message d'aide." #~ msgid "" #~ "All :program:`gzip` compressed streams are required to contain this " #~ "timestamp field. Some programs, such as :program:`gunzip`\\ , make use " -#~ "of the timestamp. The format is the same as the return value of :func:" -#~ "`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of the " -#~ "object returned by :func:`os.stat`." +#~ "of the timestamp. The format is the same as the return value " +#~ "of :func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute " +#~ "of the object returned by :func:`os.stat`." #~ msgstr "" #~ "Tous les flux compressés en :program:`gzip` doivent contenir ce champ " #~ "*timestamp*. Certains programmes, comme :program:`gunzip`\\ , utilisent " -#~ "ce *timestamp*. Ce format est le même que la valeur retour de :func:`time." -#~ "time` et l'attribut :attr:`~os.stat_result.st_mtime` de l'objet retourné " -#~ "par :func:`os.stat`." +#~ "ce *timestamp*. Ce format est le même que la valeur retour " +#~ "de :func:`time.time` et l'attribut :attr:`~os.stat_result.st_mtime` de " +#~ "l'objet retourné par :func:`os.stat`." #~ msgid "" #~ "Decompress the *data*, returning a :class:`bytes` object containing the " diff --git a/library/hashlib.po b/library/hashlib.po index 3841c681a..70f9e6c79 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -5,34 +5,33 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" -"PO-Revision-Date: 2024-11-01 15:56+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-25 10:50+0200\n" +"Last-Translator: Julien Palard \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.1\n" +"X-Generator: Poedit 3.6\n" #: library/hashlib.rst:2 msgid ":mod:`!hashlib` --- Secure hashes and message digests" msgstr "" -":mod:`hashlib` --- Algorithmes de hachage sécurisés et synthèse de messages" +":mod:`hashlib` — Algorithmes de hachage sécurisés et synthèse de messages" -#: library/hashlib.rst:10 +#: library/hashlib.rst:7 msgid "**Source code:** :source:`Lib/hashlib.py`" msgstr "**Code source :** :source:`Lib/hashlib.py`" -#: library/hashlib.rst:23 +#: library/hashlib.rst:20 +#, fuzzy msgid "" -"This module implements a common interface to many different secure hash and " -"message digest algorithms. Included are the FIPS secure hash algorithms " -"SHA1, SHA224, SHA256, SHA384, SHA512, (defined in `the FIPS 180-4 " -"standard`_), the SHA-3 series (defined in `the FIPS 202 standard`_) as well " -"as RSA's MD5 algorithm (defined in internet :rfc:`1321`). The terms " -"\"secure hash\" and \"message digest\" are interchangeable. Older " -"algorithms were called message digests. The modern term is secure hash." +"This module implements a common interface to many different hash algorithms. " +"Included are the FIPS secure hash algorithms SHA224, SHA256, SHA384, SHA512, " +"(defined in `the FIPS 180-4 standard`_), the SHA-3 series (defined in `the " +"FIPS 202 standard`_) as well as the legacy algorithms SHA1 (`formerly part " +"of FIPS`_) and the MD5 algorithm (defined in internet :rfc:`1321`)." msgstr "" "Ce module implémente une interface commune à différents algorithmes de " "hachage sécurisés et de synthèse de messages. Sont inclus les algorithmes " @@ -45,80 +44,78 @@ msgstr "" "de synthèse de messages ». Le terme moderne est « algorithme de hachage " "sécurisé »." -#: library/hashlib.rst:33 +#: library/hashlib.rst:28 msgid "" -"If you want the adler32 or crc32 hash functions, they are available in the :" -"mod:`zlib` module." +"If you want the adler32 or crc32 hash functions, they are available in " +"the :mod:`zlib` module." msgstr "" "Si vous préférez utiliser les fonctions de hachage *adler32* ou *crc32*, " "elles sont disponibles dans le module :mod:`zlib`." -#: library/hashlib.rst:40 +#: library/hashlib.rst:35 msgid "Hash algorithms" msgstr "Algorithmes de hachage" -#: library/hashlib.rst:42 +#: library/hashlib.rst:37 msgid "" "There is one constructor method named for each type of :dfn:`hash`. All " -"return a hash object with the same simple interface. For example: use :func:" -"`sha256` to create a SHA-256 hash object. You can now feed this object with :" -"term:`bytes-like objects ` (normally :class:`bytes`) " -"using the :meth:`update` method. At any point you can ask it " -"for the :dfn:`digest` of the concatenation of the data fed to it so far " -"using the :meth:`digest()` or :meth:`hexdigest()` methods." -msgstr "" -"Il y a un constructeur nommé selon chaque type de calcul d'empreinte (:dfn:" -"`hash`). Tous renvoient un objet haché avec la même interface. Par exemple : " -"utilisez :func:`sha256` pour créer un objet de calcul d'empreinte avec " -"l'algorithme SHA-256. Vous pouvez maintenant utiliser cet objet avec des :" -"term:`objets octets-compatibles ` (normalement des :class:" -"`bytes`) en utilisant la méthode :meth:`update`. À tout moment " -"vous pouvez demander l'empreinte (aussi appelée le :dfn:`digest` ou le " -"condensat) de la concaténation des données fournies en utilisant les " -"méthodes :meth:`digest()` ou :meth:`hexdigest()`." +"return a hash object with the same simple interface. For example: " +"use :func:`sha256` to create a SHA-256 hash object. You can now feed this " +"object with :term:`bytes-like objects ` " +"(normally :class:`bytes`) using the :meth:`update` method. At " +"any point you can ask it for the :dfn:`digest` of the concatenation of the " +"data fed to it so far using the :meth:`digest()` " +"or :meth:`hexdigest()` methods." +msgstr "" +"Il y a un constructeur nommé selon chaque type de calcul d'empreinte " +"(:dfn:`hash`). Tous renvoient un objet haché avec la même interface. Par " +"exemple : utilisez :func:`sha256` pour créer un objet de calcul d'empreinte " +"avec l'algorithme SHA-256. Vous pouvez maintenant utiliser cet objet avec " +"des :term:`objets octets-compatibles ` (normalement " +"des :class:`bytes`) en utilisant la méthode :meth:`update`. À " +"tout moment vous pouvez demander l'empreinte (aussi appelée le :dfn:`digest` " +"ou le condensat) de la concaténation des données fournies en utilisant les " +"méthodes :meth:`digest()` " +"ou :meth:`hexdigest()`." # suit un : -#: library/hashlib.rst:50 +#: library/hashlib.rst:45 msgid "" "To allow multithreading, the Python :term:`GIL` is released while computing " -"a hash supplied more than 2047 bytes of data at once in its constructor or :" -"meth:`.update` method." +"a hash supplied more than 2047 bytes of data at once in its constructor " +"or :meth:`.update` method." msgstr "" -"pour de meilleures performances avec de multiples fils d'exécution, le :term:" -"`GIL` Python est relâché pour des données dont la taille est supérieure à " -"2047 octets lors de leur création ou leur mise à jour (méthode :meth:`." -"update`.)." +"pour de meilleures performances avec de multiples fils d'exécution, " +"le :term:`GIL` Python est relâché pour des données dont la taille est " +"supérieure à 2047 octets lors de leur création ou leur mise à jour " +"(méthode :meth:`.update`.)." -#: library/hashlib.rst:57 +#: library/hashlib.rst:52 msgid "" -"Constructors for hash algorithms that are always present in this module are :" -"func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:" -"`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:" -"`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, and :func:" -"`blake2s`. :func:`md5` is normally available as well, though it may be " -"missing or blocked if you are using a rare \"FIPS compliant\" build of " -"Python. These correspond to :data:`algorithms_guaranteed`." +"Constructors for hash algorithms that are always present in this module " +"are :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, " +"and :func:`blake2s`. :func:`md5` is normally available as well, though it " +"may be missing or blocked if you are using a rare \"FIPS compliant\" build " +"of Python. These correspond to :data:`algorithms_guaranteed`." msgstr "" "Les constructeurs pour les algorithmes de hachage qui sont toujours présents " -"dans ce module sont :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:" -"`sha384`, :func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:" -"`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:" -"`blake2b`, et :func:`blake2s`. :func:`md5` est normalement disponible aussi, " -"mais il peut être manquant ou bloqué si vous utilisez une forme rare de " -"Python « conforme FIPS ». Cette liste correspond au résultat de la fonction :" -"data:`algorithms_guaranteed`." +"dans ce module " +"sont :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, " +"et :func:`blake2s`. :func:`md5` est normalement disponible aussi, mais il " +"peut être manquant ou bloqué si vous utilisez une forme rare de Python " +"« conforme FIPS ». Cette liste correspond au résultat de la " +"fonction :data:`algorithms_guaranteed`." -#: library/hashlib.rst:65 +#: library/hashlib.rst:60 msgid "" -"Additional algorithms may also be available if your Python distribution's :" -"mod:`hashlib` was linked against a build of OpenSSL that provides others. " -"Others *are not guaranteed available* on all installations and will only be " -"accessible by name via :func:`new`. See :data:`algorithms_available`." +"Additional algorithms may also be available if your Python " +"distribution's :mod:`!hashlib` was linked against a build of OpenSSL that " +"provides others. Others *are not guaranteed available* on all installations " +"and will only be accessible by name via :func:`new`. " +"See :data:`algorithms_available`." msgstr "" -#: library/hashlib.rst:72 +#: library/hashlib.rst:67 msgid "" "Some algorithms have known hash collision weaknesses (including MD5 and " "SHA1). Refer to `Attacks on cryptographic hash algorithms`_ and the `hashlib-" @@ -129,19 +126,18 @@ msgstr "" "à la section `Voir aussi`_ à la fin du document." # suit un : -#: library/hashlib.rst:76 +#: library/hashlib.rst:71 msgid "" -"SHA3 (Keccak) and SHAKE constructors :func:`sha3_224`, :func:`sha3_256`, :" -"func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256` were " -"added. :func:`blake2b` and :func:`blake2s` were added." +"SHA3 (Keccak) and SHAKE " +"constructors :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256` " +"were added. :func:`blake2b` and :func:`blake2s` were added." msgstr "" -"les constructeurs SHA3 (Keccak) et SHAKE :func:`sha3_224`, :func:" -"`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:" -"`shake_256` ont été ajoutés. :func:`blake2b` et :func:`blake2s` ont été " -"ajoutés." +"les constructeurs SHA3 (Keccak) et " +"SHAKE :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256` " +"ont été ajoutés. :func:`blake2b` et :func:`blake2s` ont été ajoutés." # suit un : -#: library/hashlib.rst:84 +#: library/hashlib.rst:79 msgid "" "All hashlib constructors take a keyword-only argument *usedforsecurity* with " "default value ``True``. A false value allows the use of insecure and blocked " @@ -156,22 +152,30 @@ msgstr "" "ne sera pas utilisé dans un contexte de sécurité, par exemple en tant que " "fonction de compression à sens unique non cryptographique." -#: library/hashlib.rst:91 +#: library/hashlib.rst:86 msgid "Hashlib now uses SHA3 and SHAKE from OpenSSL if it provides it." msgstr "*Hashlib* utilise désormais SHA3 et SHAKE d'OpenSSL s'il les fournit." -#: library/hashlib.rst:94 +#: library/hashlib.rst:89 msgid "" "For any of the MD5, SHA1, SHA2, or SHA3 algorithms that the linked OpenSSL " "does not provide we fall back to a verified implementation from the `HACL\\* " "project`_." msgstr "" -#: library/hashlib.rst:100 +#: library/hashlib.rst:94 +msgid "" +"The undocumented ``string`` keyword parameter in :func:`!_hashlib.new` and " +"hash-named constructors such as :func:`!_md5.md5` is deprecated. Prefer " +"passing the initial data as a positional argument for maximum backwards " +"compatibility." +msgstr "" + +#: library/hashlib.rst:102 msgid "Usage" msgstr "Utilisation" -#: library/hashlib.rst:102 +#: library/hashlib.rst:104 #, fuzzy msgid "" "To obtain the digest of the byte string ``b\"Nobody inspects the spammish " @@ -180,15 +184,15 @@ msgstr "" "Par exemple, pour obtenir l'empreinte de la chaîne ``b\"Nobody inspects the " "spammish repetition\"`` ::" -#: library/hashlib.rst:114 +#: library/hashlib.rst:116 msgid "More condensed:" msgstr "En plus condensé :" -#: library/hashlib.rst:120 +#: library/hashlib.rst:122 msgid "Constructors" msgstr "Constructeurs" -#: library/hashlib.rst:124 +#: library/hashlib.rst:126 #, fuzzy msgid "" "Is a generic constructor that takes the string *name* of the desired " @@ -201,26 +205,26 @@ msgstr "" "algorithmes listés ci-dessus ainsi qu'aux autres algorithmes que votre " "bibliothèque OpenSSL peut offrir." -#: library/hashlib.rst:129 +#: library/hashlib.rst:131 #, fuzzy msgid "Using :func:`new` with an algorithm name:" msgstr "En utilisant :func:`new` avec un algorithme fourni par OpenSSL :" -#: library/hashlib.rst:148 +#: library/hashlib.rst:150 msgid "" "Named constructors such as these are faster than passing an algorithm name " "to :func:`new`." msgstr "" -#: library/hashlib.rst:152 +#: library/hashlib.rst:154 msgid "Attributes" msgstr "" -#: library/hashlib.rst:154 +#: library/hashlib.rst:156 msgid "Hashlib provides the following constant module attributes:" msgstr "*Hashlib* fournit les constantes de module suivantes :" -#: library/hashlib.rst:158 +#: library/hashlib.rst:160 msgid "" "A set containing the names of the hash algorithms guaranteed to be supported " "by this module on all platforms. Note that 'md5' is in this list despite " @@ -232,11 +236,11 @@ msgstr "" "dans cette liste bien que certains éditeurs diffusent une implémentation " "Python dont la bibliothèque « compatible FIPS » le bloque." -#: library/hashlib.rst:167 +#: library/hashlib.rst:169 msgid "" "A set containing the names of the hash algorithms that are available in the " -"running Python interpreter. These names will be recognized when passed to :" -"func:`new`. :attr:`algorithms_guaranteed` will always be a subset. The " +"running Python interpreter. These names will be recognized when passed " +"to :func:`new`. :attr:`algorithms_guaranteed` will always be a subset. The " "same algorithm may appear multiple times in this set under different names " "(thanks to OpenSSL)." msgstr "" @@ -246,11 +250,11 @@ msgstr "" "ensemble. Le même algorithme peut apparaître plusieurs fois dans cet " "ensemble sous un nom différent (grâce à OpenSSL)." -#: library/hashlib.rst:176 +#: library/hashlib.rst:178 msgid "Hash Objects" msgstr "Objets de calcul d'empreinte" -#: library/hashlib.rst:178 +#: library/hashlib.rst:180 msgid "" "The following values are provided as constant attributes of the hash objects " "returned by the constructors:" @@ -258,19 +262,19 @@ msgstr "" "Les valeurs suivantes sont fournies en tant qu'attributs constants des " "objets de calcul d'empreintes renvoyés par les constructeurs :" -#: library/hashlib.rst:183 +#: library/hashlib.rst:185 msgid "The size of the resulting hash in bytes." msgstr "La taille du *hash* résultant en octets." -#: library/hashlib.rst:187 +#: library/hashlib.rst:189 msgid "The internal block size of the hash algorithm in bytes." msgstr "La taille interne d'un bloc de l'algorithme de hachage en octets." -#: library/hashlib.rst:189 +#: library/hashlib.rst:191 msgid "A hash object has the following attributes:" msgstr "L'objet de hachage possède les attributs suivants :" -#: library/hashlib.rst:193 +#: library/hashlib.rst:195 msgid "" "The canonical name of this hash, always lowercase and always suitable as a " "parameter to :func:`new` to create another hash of this type." @@ -280,7 +284,7 @@ msgstr "" "autre objet de calcul d'empreinte de ce type." # suit un : -#: library/hashlib.rst:196 +#: library/hashlib.rst:198 msgid "" "The name attribute has been present in CPython since its inception, but " "until Python 3.4 was not formally specified, so may not exist on some " @@ -290,11 +294,11 @@ msgstr "" "pas spécifié formellement jusqu'à Python 3.4, il peut ne pas exister sur " "certaines plate-formes." -#: library/hashlib.rst:201 +#: library/hashlib.rst:203 msgid "A hash object has the following methods:" msgstr "L'objet de calcul d'empreinte possède les méthodes suivantes :" -#: library/hashlib.rst:206 +#: library/hashlib.rst:208 msgid "" "Update the hash object with the :term:`bytes-like object`. Repeated calls " "are equivalent to a single call with the concatenation of all the arguments: " @@ -304,17 +308,17 @@ msgstr "" "répétés sont équivalents à un simple appel avec la concaténation de tous les " "arguments : ``m.update(a); m.update(b)`` est équivalent à ``m.update(a+b)``." -#: library/hashlib.rst:214 +#: library/hashlib.rst:216 msgid "" "Return the digest of the data passed to the :meth:`update` method so far. " "This is a bytes object of size :attr:`digest_size` which may contain bytes " "in the whole range from 0 to 255." msgstr "" -"Renvoie l'empreinte (le *hash*) des données passées à la méthode :meth:" -"`update`. C'est un objet de type *bytes* de taille :attr:`digest_size` qui " -"contient des octets dans l'intervalle 0 à 255." +"Renvoie l'empreinte (le *hash*) des données passées à la " +"méthode :meth:`update`. C'est un objet de type *bytes* de " +"taille :attr:`digest_size` qui contient des octets dans l'intervalle 0 à 255." -#: library/hashlib.rst:221 +#: library/hashlib.rst:223 msgid "" "Like :meth:`digest` except the digest is returned as a string object of " "double length, containing only hexadecimal digits. This may be used to " @@ -325,7 +329,7 @@ msgstr "" "hexadécimaux. Elle peut être utilisée pour échanger sans risque des valeurs " "dans les *e-mails* ou dans les environnements non binaires." -#: library/hashlib.rst:228 +#: library/hashlib.rst:230 msgid "" "Return a copy (\"clone\") of the hash object. This can be used to " "efficiently compute the digests of data sharing a common initial substring." @@ -334,11 +338,11 @@ msgstr "" "être utilisé pour calculer efficacement des empreintes de données qui " "commencent par la même sous-chaine." -#: library/hashlib.rst:233 +#: library/hashlib.rst:235 msgid "SHAKE variable length digests" msgstr "Empreintes de messages de taille variable SHAKE" -#: library/hashlib.rst:238 +#: library/hashlib.rst:240 msgid "" "The :func:`shake_128` and :func:`shake_256` algorithms provide variable " "length digests with length_in_bits//2 up to 128 or 256 bits of security. As " @@ -351,7 +355,7 @@ msgstr "" "d'empreinte requièrent une longueur. Les longueurs maximales ne sont pas " "limitées par l'algorithme SHAKE." -#: library/hashlib.rst:245 +#: library/hashlib.rst:247 msgid "" "Return the digest of the data passed to the :meth:`~hash.update` method so " "far. This is a bytes object of size *length* which may contain bytes in the " @@ -361,7 +365,7 @@ msgstr "" "C'est un objet de type *bytes* de taille *length* qui contient des octets " "dans l'intervalle 0 à 255." -#: library/hashlib.rst:252 +#: library/hashlib.rst:254 msgid "" "Like :meth:`digest` except the digest is returned as a string object of " "double length, containing only hexadecimal digits. This may be used to " @@ -372,15 +376,15 @@ msgstr "" "hexadécimaux. Elle peut être utilisée pour échanger sans risque des valeurs " "dans les *e-mails* ou dans les environnements non binaires." -#: library/hashlib.rst:256 +#: library/hashlib.rst:258 msgid "Example use:" msgstr "Exemple :" -#: library/hashlib.rst:263 +#: library/hashlib.rst:265 msgid "File hashing" msgstr "Calcul d'empreinte (ou hachage) de fichiers" -#: library/hashlib.rst:265 +#: library/hashlib.rst:267 msgid "" "The hashlib module provides a helper function for efficient hashing of a " "file or file-like object." @@ -389,19 +393,35 @@ msgstr "" "efficacement l'empreinte (aussi appelée condensat) d'un fichier ou d'un " "objet fichier-compatible." -#: library/hashlib.rst:270 +#: library/hashlib.rst:272 msgid "" "Return a digest object that has been updated with contents of file object." msgstr "" "Renvoie un objet de calcul d'empreinte qui a été mis à jour avec le contenu " "de *fileobj*." -#: library/hashlib.rst:272 +#: library/hashlib.rst:274 +#, fuzzy msgid "" "*fileobj* must be a file-like object opened for reading in binary mode. It " "accepts file objects from builtin :func:`open`, :class:`~io.BytesIO` " "instances, SocketIO objects from :meth:`socket.socket.makefile`, and " -"similar. The function may bypass Python's I/O and use the file descriptor " +"similar. *fileobj* must be opened in blocking mode, otherwise " +"a :exc:`BlockingIOError` may be raised." +msgstr "" +"*fileobj* doit être un objet fichier-compatible ouvert en lecture en mode " +"binaire. Sont acceptés les instances d'objets fichiers produites par la " +"fonction native :func:`open`, :class:`~io.BytesIO`, les objets connecteurs " +"produits par :meth:`socket.socket.makefile` et similaires. La fonction peut " +"court-circuiter les entrées-sorties de Python et utiliser directement le " +"descripteur de fichier de :meth:`~io.IOBase.fileno`. Vous devez supposer que " +"*fileobj* est dans un état inconnu après le retour de cette fonction ou si " +"elle a levé une exception. C'est à l'appelant de fermer *fileobj*." + +#: library/hashlib.rst:280 +#, fuzzy +msgid "" +"The function may bypass Python's I/O and use the file descriptor " "from :meth:`~io.IOBase.fileno` directly. *fileobj* must be assumed to be in " "an unknown state after this function returns or raises. It is up to the " "caller to close *fileobj*." @@ -415,7 +435,7 @@ msgstr "" "*fileobj* est dans un état inconnu après le retour de cette fonction ou si " "elle a levé une exception. C'est à l'appelant de fermer *fileobj*." -#: library/hashlib.rst:280 +#: library/hashlib.rst:285 msgid "" "*digest* must either be a hash algorithm name as a *str*, a hash " "constructor, or a callable that returns a hash object." @@ -423,15 +443,21 @@ msgstr "" "*digest* doit être un nom d'algorithme de hachage fourni en tant que *str*, " "un constructeur de hachage ou un appelable qui renvoie un objet de hachage." -#: library/hashlib.rst:283 +#: library/hashlib.rst:288 msgid "Example:" msgstr "Exemple :" -#: library/hashlib.rst:306 +#: library/hashlib.rst:309 +msgid "" +"Now raises a :exc:`BlockingIOError` if the file is opened in non-blocking " +"mode. Previously, spurious null bytes were added to the digest." +msgstr "" + +#: library/hashlib.rst:315 msgid "Key derivation" msgstr "Dérivation de clé" -#: library/hashlib.rst:308 +#: library/hashlib.rst:317 msgid "" "Key derivation and key stretching algorithms are designed for secure " "password hashing. Naive algorithms such as ``sha1(password)`` are not " @@ -445,7 +471,7 @@ msgstr "" "bonne fonction de hachage doit être paramétrable, lente et inclure un " "`salage `_." -#: library/hashlib.rst:316 +#: library/hashlib.rst:325 msgid "" "The function provides PKCS#5 password-based key derivation function 2. It " "uses HMAC as pseudorandom function." @@ -454,7 +480,7 @@ msgstr "" "Key Cryptographic Standards #5 v2.0*). Elle utilise HMAC comme fonction de " "génération d'un pseudo-aléa." -#: library/hashlib.rst:319 +#: library/hashlib.rst:328 msgid "" "The string *hash_name* is the desired name of the hash digest algorithm for " "HMAC, e.g. 'sha1' or 'sha256'. *password* and *salt* are interpreted as " @@ -469,7 +495,7 @@ msgstr "" "``1024``). *salt* doit être de 16 octets ou plus et provenir d'une source " "correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:325 +#: library/hashlib.rst:334 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " "computing power. As of 2022, hundreds of thousands of iterations of SHA-256 " @@ -486,7 +512,7 @@ msgstr "" "recommandées lorsqu'on utilise pbkdf2`_ (page en anglais) expliquent tout en " "détail." -#: library/hashlib.rst:331 +#: library/hashlib.rst:340 msgid "" "*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` " "then the digest size of the hash algorithm *hash_name* is used, e.g. 64 for " @@ -496,17 +522,17 @@ msgstr "" "Python utilise la taille du condensat produit par l'algorithme de hachage " "*hash_name*, par exemple 64 pour SHA-512." -#: library/hashlib.rst:340 +#: library/hashlib.rst:349 msgid "Function only available when Python is compiled with OpenSSL." msgstr "" -#: library/hashlib.rst:344 +#: library/hashlib.rst:353 msgid "" "Function now only available when Python is built with OpenSSL. The slow pure " "Python implementation has been removed." msgstr "" -#: library/hashlib.rst:350 +#: library/hashlib.rst:359 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." @@ -514,7 +540,7 @@ msgstr "" "La fonction fournit la fonction de dérivation de clé *scrypt* comme définie " "dans la :rfc:`7914`." -#: library/hashlib.rst:353 +#: library/hashlib.rst:362 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -526,7 +552,7 @@ msgstr "" "*password* à une longueur raisonnable (par ex. 1024). *salt* doit être de 16 " "octets ou plus et provenir d'une source correcte, par ex. :func:`os.urandom`." -#: library/hashlib.rst:358 +#: library/hashlib.rst:367 msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " @@ -537,19 +563,19 @@ msgstr "" "(OpenSSL 1.1.0 limite à 32 Mio par défaut). *dklen* est la longueur de la " "clé dérivée en octets." -#: library/hashlib.rst:368 +#: library/hashlib.rst:377 msgid "BLAKE2" msgstr "BLAKE2" -#: library/hashlib.rst:375 +#: library/hashlib.rst:382 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" msgstr "" -"BLAKE2_ est une fonction de hachage cryptographique définie dans la :rfc:" -"`7693` et disponible en deux versions :" +"BLAKE2_ est une fonction de hachage cryptographique définie dans " +"la :rfc:`7693` et disponible en deux versions :" -#: library/hashlib.rst:378 +#: library/hashlib.rst:385 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," @@ -557,7 +583,7 @@ msgstr "" "**BLAKE2b**, optimisée pour les plates-formes 64 bits et produisant des " "condensats de toutes tailles entre 1 et 64 octets," -#: library/hashlib.rst:381 +#: library/hashlib.rst:388 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." @@ -565,7 +591,7 @@ msgstr "" "**BLAKE2s**, optimisée pour les plates-formes de 8 à 32 bits et produisant " "des empreintes de toutes tailles entre 1 et 32 octets." -#: library/hashlib.rst:384 +#: library/hashlib.rst:391 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." @@ -574,25 +600,26 @@ msgstr "" "plus simple que HMAC_), **salted hashing**, **personalization** et le **tree " "hashing**." -#: library/hashlib.rst:387 +#: library/hashlib.rst:394 +#, fuzzy msgid "" -"Hash objects from this module follow the API of standard library's :mod:" -"`hashlib` objects." +"Hash objects from this module follow the API of standard library's :mod:`!" +"hashlib` objects." msgstr "" "Les objets de calcul d'empreinte de ce module suivent l'API des objets du " "module :mod:`hashlib` de la bibliothèque standard." -#: library/hashlib.rst:392 +#: library/hashlib.rst:399 msgid "Creating hash objects" msgstr "Création d'objets de calcul d'empreinte" -#: library/hashlib.rst:394 +#: library/hashlib.rst:401 msgid "New hash objects are created by calling constructor functions:" msgstr "" "Les nouveaux objets de calcul d'empreinte sont créés en appelant les " "constructeurs :" -#: library/hashlib.rst:408 +#: library/hashlib.rst:415 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" @@ -600,7 +627,7 @@ msgstr "" "Ces fonctions produisent l'objet de calcul d'empreinte correspondant aux " "algorithmes BLAKE2b ou BLAKE2s. Elles prennent ces paramètres optionnels :" -#: library/hashlib.rst:411 +#: library/hashlib.rst:418 msgid "" "*data*: initial chunk of data to hash, which must be :term:`bytes-like " "object`. It can be passed only as positional argument." @@ -609,11 +636,11 @@ msgstr "" "octets-compatible `. Il ne peut être passé que comme " "argument positionnel." -#: library/hashlib.rst:414 +#: library/hashlib.rst:421 msgid "*digest_size*: size of output digest in bytes." msgstr "*digest_size* : taille en octets de l'empreinte produite." -#: library/hashlib.rst:416 +#: library/hashlib.rst:423 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." @@ -621,7 +648,7 @@ msgstr "" "*key* : clé pour les codes d'authentification de message *keyed hashing* " "(jusqu'à 64 octets pour BLAKE2b, jusqu'à 32 octets pour BLAKE2s)." -#: library/hashlib.rst:419 +#: library/hashlib.rst:426 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." @@ -629,7 +656,7 @@ msgstr "" "*salt* : sel pour le hachage randomisé *randomized hashing* (jusqu'à 16 " "octets pour BLAKE2b, jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:422 +#: library/hashlib.rst:429 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." @@ -637,57 +664,57 @@ msgstr "" "*person* : chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " "jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:425 +#: library/hashlib.rst:432 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" "Le tableau suivant présente les limites des paramètres généraux (en octets) :" -#: library/hashlib.rst:428 +#: library/hashlib.rst:435 msgid "Hash" msgstr "Hash" -#: library/hashlib.rst:428 +#: library/hashlib.rst:435 msgid "digest_size" msgstr "digest_size" -#: library/hashlib.rst:428 +#: library/hashlib.rst:435 msgid "len(key)" msgstr "len(key)" -#: library/hashlib.rst:428 +#: library/hashlib.rst:435 msgid "len(salt)" msgstr "len(salt)" -#: library/hashlib.rst:428 +#: library/hashlib.rst:435 msgid "len(person)" msgstr "len(person)" -#: library/hashlib.rst:430 +#: library/hashlib.rst:437 msgid "BLAKE2b" msgstr "BLAKE2b" -#: library/hashlib.rst:430 +#: library/hashlib.rst:437 msgid "64" msgstr "64" -#: library/hashlib.rst:430 +#: library/hashlib.rst:437 msgid "16" msgstr "16" -#: library/hashlib.rst:431 +#: library/hashlib.rst:438 msgid "BLAKE2s" msgstr "BLAKE2s" -#: library/hashlib.rst:431 +#: library/hashlib.rst:438 msgid "32" msgstr "32" -#: library/hashlib.rst:431 +#: library/hashlib.rst:438 msgid "8" msgstr "8" # suit un : -#: library/hashlib.rst:436 +#: library/hashlib.rst:443 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -704,26 +731,26 @@ msgstr "" "exemple, ``b'salt'`` et ``b'salt\\x00'`` sont la même valeur (ce n'est pas " "le cas pour *key*)." -#: library/hashlib.rst:443 +#: library/hashlib.rst:450 msgid "These sizes are available as module `constants`_ described below." msgstr "" "Ces tailles sont disponibles en tant que `constantes`_ du module et décrites " "ci-dessous." -#: library/hashlib.rst:445 +#: library/hashlib.rst:452 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" "Les fonctions constructeurs acceptent aussi les paramètres suivants pour le " "calcul d'empreintes en mode arbre :" -#: library/hashlib.rst:447 +#: library/hashlib.rst:454 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "" "*fanout* : *étalement* (0 à 255, 0 si illimité, 1 correspond au mode " "séquentiel)." -#: library/hashlib.rst:449 +#: library/hashlib.rst:456 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." @@ -731,7 +758,7 @@ msgstr "" "*depth* : profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 " "correspond au mode séquentiel)." -#: library/hashlib.rst:452 +#: library/hashlib.rst:459 msgid "" "*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " "or in sequential mode)." @@ -739,7 +766,7 @@ msgstr "" "*leaf_size* : taille maximale en octets d'une feuille (0 à ``2**32-1``, 0 si " "illimité ou en mode séquentiel)." -#: library/hashlib.rst:455 +#: library/hashlib.rst:462 msgid "" "*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " "for BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." @@ -748,14 +775,14 @@ msgstr "" "``2**48-1`` pour BLAKE2s, 0 pour la première feuille la plus à gauche, ou en " "mode séquentiel)." -#: library/hashlib.rst:458 +#: library/hashlib.rst:465 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" "*node_depth* : profondeur du nœud (0 à 255, 0 pour les feuilles, ou en mode " "séquentiel)." -#: library/hashlib.rst:460 +#: library/hashlib.rst:467 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." @@ -763,7 +790,7 @@ msgstr "" "*inner_size* : taille de l'empreinte interne (0 à 64 pour BLAKE2b, 0 à 32 " "pour BLAKE2s, 0 en mode séquentiel)." -#: library/hashlib.rst:463 +#: library/hashlib.rst:470 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(``False`` for sequential mode)." @@ -771,11 +798,11 @@ msgstr "" "*last_node* : booléen indiquant si le nœud traité est le dernier (``False`` " "pour le mode séquentiel)." -#: library/hashlib.rst:466 +#: library/hashlib.rst:473 msgid "Explanation of tree mode parameters." msgstr "Explication des paramètres du mode arbre." -#: library/hashlib.rst:470 +#: library/hashlib.rst:477 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." @@ -783,44 +810,45 @@ msgstr "" "Voir la section 2.10 dans `BLAKE2 specification `_ pour une approche globale du hachage en mode arbre." -#: library/hashlib.rst:476 +#: library/hashlib.rst:483 msgid "Constants" msgstr "Constantes" -#: library/hashlib.rst:481 +#: library/hashlib.rst:488 msgid "Salt length (maximum length accepted by constructors)." msgstr "Longueur du sel (longueur maximale acceptée par les constructeurs)." -#: library/hashlib.rst:487 +#: library/hashlib.rst:494 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" "Longueur de la chaîne de personnalisation (longueur maximale acceptée par " "les constructeurs)." -#: library/hashlib.rst:493 +#: library/hashlib.rst:500 msgid "Maximum key size." msgstr "Taille maximale de clé." -#: library/hashlib.rst:499 +#: library/hashlib.rst:506 msgid "Maximum digest size that the hash function can output." msgstr "Taille maximale du message que peut fournir la fonction de hachage." -#: library/hashlib.rst:503 +#: library/hashlib.rst:510 msgid "Examples" msgstr "Exemples" -#: library/hashlib.rst:506 +#: library/hashlib.rst:513 msgid "Simple hashing" msgstr "Hachage simple" -#: library/hashlib.rst:508 +#: library/hashlib.rst:515 msgid "" "To calculate hash of some data, you should first construct a hash object by " -"calling the appropriate constructor function (:func:`blake2b` or :func:" -"`blake2s`), then update it with the data by calling :meth:`~hash.update` on " -"the object, and, finally, get the digest out of the object by calling :meth:" -"`~hash.digest` (or :meth:`~hash.hexdigest` for hex-encoded string)." +"calling the appropriate constructor function (:func:`blake2b` " +"or :func:`blake2s`), then update it with the data by " +"calling :meth:`~hash.update` on the object, and, finally, get the digest out " +"of the object by calling :meth:`~hash.digest` (or :meth:`~hash.hexdigest` " +"for hex-encoded string)." msgstr "" "Pour calculer l'empreinte (ou *hash*) d'une quantité de données, vous devez " "d'abord construire un objet de calcul d'empreinte en appelant la fonction " @@ -830,7 +858,7 @@ msgstr "" "méthode :meth:`~hash.digest` (ou :meth:`~hash.hexdigest` pour les chaînes " "hexadécimales)." -#: library/hashlib.rst:521 +#: library/hashlib.rst:528 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the positional argument:" @@ -839,7 +867,7 @@ msgstr "" "argument positionnel, le premier morceau du message pour le mettre " "directement à jour :" -#: library/hashlib.rst:528 +#: library/hashlib.rst:535 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" @@ -847,11 +875,11 @@ msgstr "" "Vous pouvez appeler la méthode :meth:`hash.update` autant de fois que " "nécessaire pour mettre à jour l'empreinte de manière itérative :" -#: library/hashlib.rst:542 +#: library/hashlib.rst:549 msgid "Using different digest sizes" msgstr "Production de tailles d'empreintes différentes" -#: library/hashlib.rst:544 +#: library/hashlib.rst:551 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " @@ -862,7 +890,7 @@ msgstr "" "par BLAKE2b sans changer la taille de la sortie, nous pouvons dire à BLAKE2b " "de produire une empreinte de 20 octets :" -#: library/hashlib.rst:558 +#: library/hashlib.rst:565 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " @@ -874,16 +902,16 @@ msgstr "" "produisent des sorties différentes même si les longueurs de sortie sont les " "mêmes :" -#: library/hashlib.rst:574 +#: library/hashlib.rst:581 msgid "Keyed hashing" msgstr "Hachage avec clé – Code d'authentification de message" -#: library/hashlib.rst:576 +#: library/hashlib.rst:583 msgid "" "Keyed hashing can be used for authentication as a faster and simpler " -"replacement for `Hash-based message authentication code `_ (HMAC). BLAKE2 can be securely used in prefix-MAC " -"mode thanks to the indifferentiability property inherited from BLAKE." +"replacement for `Hash-based message authentication code `_ (HMAC). BLAKE2 can be securely used in prefix-" +"MAC mode thanks to the indifferentiability property inherited from BLAKE." msgstr "" "Le hachage avec clé (*keyed hashing* en anglais) est une alternative plus " "simple et plus rapide à un `code d’authentification de message de hachage à " @@ -891,7 +919,7 @@ msgstr "" "(HMAC). BLAKE2 peut être utilisé de manière sécurisée dans le mode préfixe " "MAC grâce à la propriété d'indifférentiabilité héritée de BLAKE." -#: library/hashlib.rst:582 +#: library/hashlib.rst:589 msgid "" "This example shows how to get a (hex-encoded) 128-bit authentication code " "for message ``b'message data'`` with key ``b'pseudorandom key'``::" @@ -900,7 +928,7 @@ msgstr "" "128 bits (en hexadécimal) pour un message ``b'message data'`` avec la clé " "``b'pseudorandom key'`` ::" -#: library/hashlib.rst:592 +#: library/hashlib.rst:599 msgid "" "As a practical example, a web application can symmetrically sign cookies " "sent to users and later verify them to make sure they weren't tampered with::" @@ -909,7 +937,7 @@ msgstr "" "*cookies* envoyés aux utilisateurs et les vérifier plus tard pour être " "certaine qu'ils n'ont pas été altérés ::" -#: library/hashlib.rst:621 +#: library/hashlib.rst:628 msgid "" "Even though there's a native keyed hashing mode, BLAKE2 can, of course, be " "used in HMAC construction with :mod:`hmac` module::" @@ -918,11 +946,11 @@ msgstr "" "(MAC), BLAKE2 peut, bien sûr, être utilisé pour construire un HMAC en " "combinaison avec le module :mod:`hmac` ::" -#: library/hashlib.rst:632 +#: library/hashlib.rst:639 msgid "Randomized hashing" msgstr "Hachage randomisé" -#: library/hashlib.rst:634 +#: library/hashlib.rst:641 msgid "" "By setting *salt* parameter users can introduce randomization to the hash " "function. Randomized hashing is useful for protecting against collision " @@ -933,7 +961,7 @@ msgstr "" "se protéger des attaques par collisions sur les fonctions de hachage " "utilisées dans les signatures numériques." -#: library/hashlib.rst:638 +#: library/hashlib.rst:645 msgid "" "Randomized hashing is designed for situations where one party, the message " "preparer, generates all or part of a message to be signed by a second party, " @@ -973,7 +1001,7 @@ msgstr "" "sécurité fourni par une signature numérique si tous les morceaux du message " "sont préparés par le signataire." -#: library/hashlib.rst:657 +#: library/hashlib.rst:664 msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" @@ -981,7 +1009,7 @@ msgstr "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" -#: library/hashlib.rst:660 +#: library/hashlib.rst:667 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." @@ -989,7 +1017,7 @@ msgstr "" "Dans BLAKE2, le sel est passé une seule fois lors de l'initialisation de la " "fonction de hachage, plutôt qu'à chaque appel de la fonction de hachage." -#: library/hashlib.rst:665 +#: library/hashlib.rst:672 msgid "" "*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose " "cryptographic hash function, such as SHA-256, is not suitable for hashing " @@ -1001,11 +1029,11 @@ msgstr "" "de passe. Voir `la FAQ BLAKE2 `_ (page en anglais) " "pour plus d'informations." -#: library/hashlib.rst:688 +#: library/hashlib.rst:695 msgid "Personalization" msgstr "Personnalisation" -#: library/hashlib.rst:690 +#: library/hashlib.rst:697 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " @@ -1015,7 +1043,7 @@ msgstr "" "différentes empreintes de message d'une même entrée pour différentes " "utilisations. Pour citer les auteurs de la fonction de hachage Skein :" -#: library/hashlib.rst:694 +#: library/hashlib.rst:701 msgid "" "We recommend that all application designers seriously consider doing this; " "we have seen many protocols where a hash that is computed in one part of the " @@ -1032,7 +1060,7 @@ msgstr "" "prendre en entrée la même empreinte. Personnaliser chaque fonction de " "hachage utilisée dans le protocole stoppe immédiatement ce genre d'attaque." -#: library/hashlib.rst:701 +#: library/hashlib.rst:708 msgid "" "(`The Skein Hash Function Family `_, p. 21)" @@ -1040,12 +1068,12 @@ msgstr "" "(`The Skein Hash Function Family `_, p. 21, article en anglais)" -#: library/hashlib.rst:705 +#: library/hashlib.rst:712 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" "BLAKE2 peut être personnalisé en passant des *bytes* à l'argument *person* ::" -#: library/hashlib.rst:719 +#: library/hashlib.rst:726 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." @@ -1053,17 +1081,17 @@ msgstr "" "La personnalisation et le *keyed mode* peuvent être utilisés ensemble pour " "dériver différentes clés à partir d'une seule." -#: library/hashlib.rst:733 +#: library/hashlib.rst:740 msgid "Tree mode" msgstr "Mode Arbre" -#: library/hashlib.rst:735 +#: library/hashlib.rst:742 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" "L'exemple ci-dessous présente comment hacher un arbre minimal avec deux " "nœuds terminaux ::" -#: library/hashlib.rst:741 +#: library/hashlib.rst:748 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" @@ -1071,11 +1099,11 @@ msgstr "" "Cet exemple utilise en interne des empreintes de 64 octets, et produit " "finalement des empreintes 32 octets ::" -#: library/hashlib.rst:771 +#: library/hashlib.rst:778 msgid "Credits" msgstr "Crédits" -#: library/hashlib.rst:773 +#: library/hashlib.rst:780 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " @@ -1087,7 +1115,7 @@ msgstr "" "qui a participé à la finale de la compétition du NIST SHA-3_ créée par *Jean-" "Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, et *Raphael C.-W. Phan*." -#: library/hashlib.rst:778 +#: library/hashlib.rst:785 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." @@ -1095,7 +1123,7 @@ msgstr "" "Il utilise le cœur de l'algorithme de chiffrement de ChaCha_ conçu par " "*Daniel J. Bernstein*." -#: library/hashlib.rst:780 +#: library/hashlib.rst:787 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " @@ -1106,12 +1134,12 @@ msgstr "" "l'implémentation C écrite par *Samuel Neves*. La documentation a été copiée " "depuis pyblake2_ et écrite par *Dmitry Chestnykh*." -#: library/hashlib.rst:784 +#: library/hashlib.rst:791 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" "Le code C a été partiellement réécrit pour Python par *Christian Heimes*." -#: library/hashlib.rst:786 +#: library/hashlib.rst:793 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" @@ -1119,7 +1147,7 @@ msgstr "" "Le transfert dans le domaine public s'applique pour l'implémentation C de la " "fonction de hachage, ses extensions et cette documentation :" -#: library/hashlib.rst:789 +#: library/hashlib.rst:796 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " @@ -1130,7 +1158,7 @@ msgstr "" "domaine public dans le monde entier. Ce logiciel est distribué sans aucune " "garantie." -#: library/hashlib.rst:793 +#: library/hashlib.rst:800 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see https://creativecommons.org/publicdomain/" @@ -1140,7 +1168,7 @@ msgstr "" "Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" "zero/1.0/." -#: library/hashlib.rst:797 +#: library/hashlib.rst:804 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " @@ -1150,58 +1178,58 @@ msgstr "" "modifications du projet et au domaine public selon la licence Creative " "Commons Public Domain Dedication 1.0 Universal :" -#: library/hashlib.rst:801 +#: library/hashlib.rst:808 msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: library/hashlib.rst:821 +#: library/hashlib.rst:829 msgid "Module :mod:`hmac`" msgstr "Module :mod:`hmac`" -#: library/hashlib.rst:822 +#: library/hashlib.rst:830 msgid "A module to generate message authentication codes using hashes." msgstr "" "Un module pour générer des codes d'authentification utilisant des *hash*." -#: library/hashlib.rst:824 +#: library/hashlib.rst:832 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/hashlib.rst:825 +#: library/hashlib.rst:833 msgid "Another way to encode binary hashes for non-binary environments." msgstr "" "Un autre moyen d'encoder des *hash* binaires dans des environnements non " "binaires." -#: library/hashlib.rst:827 +#: library/hashlib.rst:835 msgid "https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf" msgstr "https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf" -#: library/hashlib.rst:828 +#: library/hashlib.rst:836 msgid "The FIPS 180-4 publication on Secure Hash Algorithms." msgstr "La publication FIPS 180-4 sur les algorithmes de hachage sécurisés." -#: library/hashlib.rst:830 +#: library/hashlib.rst:838 msgid "https://csrc.nist.gov/pubs/fips/202/final" msgstr "https://csrc.nist.gov/pubs/fips/202/final" -#: library/hashlib.rst:831 +#: library/hashlib.rst:839 msgid "The FIPS 202 publication on the SHA-3 Standard." msgstr "La publication FIPS 202 sur le standard SHA-3." -#: library/hashlib.rst:833 +#: library/hashlib.rst:841 msgid "https://www.blake2.net/" msgstr "https://www.blake2.net/" -#: library/hashlib.rst:834 +#: library/hashlib.rst:842 msgid "Official BLAKE2 website." msgstr "Site officiel de BLAKE2." -#: library/hashlib.rst:836 +#: library/hashlib.rst:844 msgid "https://en.wikipedia.org/wiki/Cryptographic_hash_function" msgstr "https://en.wikipedia.org/wiki/Cryptographic_hash_function" -#: library/hashlib.rst:837 +#: library/hashlib.rst:845 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." @@ -1209,21 +1237,21 @@ msgstr "" "Article Wikipedia contenant les informations relatives aux algorithmes ayant " "des problèmes et leur interprétation au regard de leur utilisation." -#: library/hashlib.rst:840 +#: library/hashlib.rst:848 msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc8018.txt" -#: library/hashlib.rst:841 +#: library/hashlib.rst:849 msgid "PKCS #5: Password-Based Cryptography Specification Version 2.1" msgstr "PKCS #5 : Password-Based Cryptography Specification Version 2.1" -#: library/hashlib.rst:843 +#: library/hashlib.rst:851 msgid "" "https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" msgstr "" "https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" -#: library/hashlib.rst:844 +#: library/hashlib.rst:852 msgid "NIST Recommendation for Password-Based Key Derivation." msgstr "" "Recommandations du NIST pour la dérivation de clé à partir de mot de passe " @@ -1276,11 +1304,11 @@ msgstr "" #~ "*bytes* et pas sur des caractères." #~ msgid "" -#~ "https://csrc.nist.gov/csrc/media/publications/fips/180/2/" -#~ "archive/2002-08-01/documents/fips180-2.pdf" +#~ "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/" +#~ "2002-08-01/documents/fips180-2.pdf" #~ msgstr "" -#~ "https://csrc.nist.gov/csrc/media/publications/fips/180/2/" -#~ "archive/2002-08-01/documents/fips180-2.pdf" +#~ "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/" +#~ "2002-08-01/documents/fips180-2.pdf" #~ msgid "" #~ "The number of *iterations* should be chosen based on the hash algorithm " diff --git a/library/heapq.po b/library/heapq.po index e840e1524..dc7da1743 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-05-10 23:09+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" msgid ":mod:`!heapq` --- Heap queue algorithm" msgstr ":mod:`heapq` — File de priorité basée sur un tas" -#: library/heapq.rst:12 +#: library/heapq.rst:7 msgid "**Source code:** :source:`Lib/heapq.py`" msgstr "**Code source :** :source:`Lib/heapq.py`" -#: library/heapq.rst:16 +#: library/heapq.rst:11 msgid "" "This module provides an implementation of the heap queue algorithm, also " "known as the priority queue algorithm." @@ -32,21 +32,21 @@ msgstr "" "Ce module expose une implémentation de l'algorithme de file de priorité, " "basée sur un tas." -#: library/heapq.rst:19 +#: library/heapq.rst:14 msgid "" -"Heaps are binary trees for which every parent node has a value less than or " -"equal to any of its children. We refer to this condition as the heap " +"Min-heaps are binary trees for which every parent node has a value less than " +"or equal to any of its children. We refer to this condition as the heap " "invariant." msgstr "" -#: library/heapq.rst:22 +#: library/heapq.rst:18 #, fuzzy msgid "" -"This implementation uses arrays for which ``heap[k] <= heap[2*k+1]`` and " -"``heap[k] <= heap[2*k+2]`` for all *k*, counting elements from zero. For " -"the sake of comparison, non-existing elements are considered to be " -"infinite. The interesting property of a heap is that its smallest element " -"is always the root, ``heap[0]``." +"For min-heaps, this implementation uses lists for which ``heap[k] <= " +"heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k* for which the " +"compared elements exist. Elements are counted from zero. The interesting " +"property of a min-heap is that its smallest element is always the root, " +"``heap[0]``." msgstr "" "Les tas sont des arbres binaires pour lesquels chaque valeur portée par un " "nœud est inférieure ou égale à celle de ses deux fils. Cette implémentation " @@ -56,15 +56,26 @@ msgstr "" "considérés comme porteur d'une valeur infinie. L'intérêt du tas est que son " "plus petit élément est toujours la racine, ``tas[0]``." -#: library/heapq.rst:28 +#: library/heapq.rst:24 msgid "" -"The API below differs from textbook heap algorithms in two aspects: (a) We " -"use zero-based indexing. This makes the relationship between the index for " -"a node and the indexes for its children slightly less obvious, but is more " -"suitable since Python uses zero-based indexing. (b) Our pop method returns " -"the smallest item, not the largest (called a \"min heap\" in textbooks; a " -"\"max heap\" is more common in texts because of its suitability for in-place " -"sorting)." +"Max-heaps satisfy the reverse invariant: every parent node has a value " +"*greater* than any of its children. These are implemented as lists for " +"which ``maxheap[2*k+1] <= maxheap[k]`` and ``maxheap[2*k+2] <= maxheap[k]`` " +"for all *k* for which the compared elements exist. The root, ``maxheap[0]``, " +"contains the *largest* element; ``heap.sort(reverse=True)`` maintains the " +"max-heap invariant." +msgstr "" + +#: library/heapq.rst:31 +#, fuzzy +msgid "" +"The :mod:`!heapq` API differs from textbook heap algorithms in two aspects: " +"(a) We use zero-based indexing. This makes the relationship between the " +"index for a node and the indexes for its children slightly less obvious, but " +"is more suitable since Python uses zero-based indexing. (b) Textbooks often " +"focus on max-heaps, due to their suitability for in-place sorting. Our " +"implementation favors min-heaps as they better correspond to " +"Python :class:`lists `." msgstr "" "L'API ci-dessous diffère de la file de priorité classique par deux aspects : " "(a) l'indiçage commence à zéro. Cela complexifie légèrement la relation " @@ -74,38 +85,65 @@ msgstr "" "les manuels scolaires ; le « tas-max » étant généralement plus courant dans " "la littérature car il permet le classement sans tampon)." -#: library/heapq.rst:35 +#: library/heapq.rst:38 +#, fuzzy msgid "" -"These two make it possible to view the heap as a regular Python list without " -"surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains " -"the heap invariant!" +"These two aspects make it possible to view the heap as a regular Python list " +"without surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` " +"maintains the heap invariant!" msgstr "" "Ces deux points permettent d'aborder le tas comme une liste Python standard " "sans surprise : ``heap[0]`` est le plus petit élément et ``heap.sort()`` " "conserve l'invariant du tas !" -#: library/heapq.rst:39 +#: library/heapq.rst:42 +msgid "" +"Like :meth:`list.sort`, this implementation uses only the ``<`` operator for " +"comparisons, for both min-heaps and max-heaps." +msgstr "" + +#: library/heapq.rst:45 +msgid "" +"In the API below, and in this documentation, the unqualified term *heap* " +"generally refers to a min-heap. The API for max-heaps is named using a " +"``_max`` suffix." +msgstr "" + +#: library/heapq.rst:49 +#, fuzzy msgid "" -"To create a heap, use a list initialized to ``[]``, or you can transform a " -"populated list into a heap via function :func:`heapify`." +"To create a heap, use a list initialized as ``[]``, or transform an existing " +"list into a min-heap or max-heap using the :func:`heapify` " +"or :func:`heapify_max` functions, respectively." msgstr "" "Pour créer un tas, utilisez une liste initialisée à ``[]`` ou bien utilisez " -"une liste existante et transformez la en tas à l'aide de la fonction :func:" -"`heapify`." +"une liste existante et transformez la en tas à l'aide de la " +"fonction :func:`heapify`." -#: library/heapq.rst:42 -msgid "The following functions are provided:" +#: library/heapq.rst:53 +#, fuzzy +msgid "The following functions are provided for min-heaps:" msgstr "Les fonctions suivantes sont fournies :" -#: library/heapq.rst:47 -msgid "Push the value *item* onto the *heap*, maintaining the heap invariant." +#: library/heapq.rst:58 +#, fuzzy +msgid "Transform list *x* into a min-heap, in-place, in linear time." +msgstr "" +"Transforme une liste *x* en un tas, sans utiliser de tampon et en temps " +"linéaire." + +#: library/heapq.rst:63 +#, fuzzy +msgid "" +"Push the value *item* onto the *heap*, maintaining the min-heap invariant." msgstr "" "Introduit la valeur *item* dans le tas *heap*, en conservant l'invariance du " "tas." -#: library/heapq.rst:52 +#: library/heapq.rst:68 +#, fuzzy msgid "" -"Pop and return the smallest item from the *heap*, maintaining the heap " +"Pop and return the smallest item from the *heap*, maintaining the min-heap " "invariant. If the heap is empty, :exc:`IndexError` is raised. To access " "the smallest item without popping it, use ``heap[0]``." msgstr "" @@ -113,7 +151,7 @@ msgstr "" "le tas est vide, une exception :exc:`IndexError` est levée. Pour accéder au " "plus petit élément sans le retirer, utilisez ``heap[0]``." -#: library/heapq.rst:59 +#: library/heapq.rst:75 msgid "" "Push *item* on the heap, then pop and return the smallest item from the " "*heap*. The combined action runs more efficiently than :func:`heappush` " @@ -123,23 +161,17 @@ msgstr "" "de *heap*. Cette action combinée est plus efficace que :func:`heappush` " "suivie par un appel séparé à :func:`heappop`." -#: library/heapq.rst:66 -msgid "Transform list *x* into a heap, in-place, in linear time." -msgstr "" -"Transforme une liste *x* en un tas, sans utiliser de tampon et en temps " -"linéaire." - -#: library/heapq.rst:71 +#: library/heapq.rst:82 msgid "" "Pop and return the smallest item from the *heap*, and also push the new " -"*item*. The heap size doesn't change. If the heap is empty, :exc:" -"`IndexError` is raised." +"*item*. The heap size doesn't change. If the heap is " +"empty, :exc:`IndexError` is raised." msgstr "" "Extraie le plus petit élément de *heap* et introduit le nouvel élément " -"*item*. La taille du tas ne change pas. Si le tas est vide, une exception :" -"exc:`IndexError` est levée." +"*item*. La taille du tas ne change pas. Si le tas est vide, une " +"exception :exc:`IndexError` est levée." -#: library/heapq.rst:74 +#: library/heapq.rst:85 msgid "" "This one step operation is more efficient than a :func:`heappop` followed " "by :func:`heappush` and can be more appropriate when using a fixed-size " @@ -151,7 +183,7 @@ msgstr "" "est de taille fixe. La combinaison *pop*/*push* renvoie toujours un élément " "du tas et le remplace par *item*." -#: library/heapq.rst:79 +#: library/heapq.rst:90 msgid "" "The value returned may be larger than the *item* added. If that isn't " "desired, consider using :func:`heappushpop` instead. Its push/pop " @@ -163,12 +195,72 @@ msgstr "" "Sa combinaison *push*/*pop* renvoie le plus petit élément des deux valeurs " "et laisse la plus grande sur le tas." -#: library/heapq.rst:85 +#: library/heapq.rst:96 +#, fuzzy +msgid "For max-heaps, the following functions are provided:" +msgstr "Les fonctions suivantes sont fournies :" + +#: library/heapq.rst:101 +#, fuzzy +msgid "Transform list *x* into a max-heap, in-place, in linear time." +msgstr "" +"Transforme une liste *x* en un tas, sans utiliser de tampon et en temps " +"linéaire." + +#: library/heapq.rst:108 +#, fuzzy +msgid "" +"Push the value *item* onto the max-heap *heap*, maintaining the max-heap " +"invariant." +msgstr "" +"Introduit la valeur *item* dans le tas *heap*, en conservant l'invariance du " +"tas." + +#: library/heapq.rst:116 +#, fuzzy +msgid "" +"Pop and return the largest item from the max-heap *heap*, maintaining the " +"max-heap invariant. If the max-heap is empty, :exc:`IndexError` is raised. " +"To access the largest item without popping it, use ``maxheap[0]``." +msgstr "" +"Extraie le plus petit élément de *heap* en préservant l'invariant du tas. Si " +"le tas est vide, une exception :exc:`IndexError` est levée. Pour accéder au " +"plus petit élément sans le retirer, utilisez ``heap[0]``." + +#: library/heapq.rst:125 +#, fuzzy +msgid "" +"Push *item* on the max-heap *heap*, then pop and return the largest item " +"from *heap*. The combined action runs more efficiently " +"than :func:`heappush_max` followed by a separate call to :func:`heappop_max`." +msgstr "" +"Introduit l'élément *item* dans le tas, puis extraie le plus petit élément " +"de *heap*. Cette action combinée est plus efficace que :func:`heappush` " +"suivie par un appel séparé à :func:`heappop`." + +#: library/heapq.rst:135 +#, fuzzy +msgid "" +"Pop and return the largest item from the max-heap *heap* and also push the " +"new *item*. The max-heap size doesn't change. If the max-heap is " +"empty, :exc:`IndexError` is raised." +msgstr "" +"Extraie le plus petit élément de *heap* et introduit le nouvel élément " +"*item*. La taille du tas ne change pas. Si le tas est vide, une " +"exception :exc:`IndexError` est levée." + +#: library/heapq.rst:140 +msgid "" +"The value returned may be smaller than the *item* added. Refer to the " +"analogous function :func:`heapreplace` for detailed usage notes." +msgstr "" + +#: library/heapq.rst:146 msgid "The module also offers three general purpose functions based on heaps." msgstr "" "Ce module contient également trois fonctions génériques utilisant les tas." -#: library/heapq.rst:90 +#: library/heapq.rst:151 msgid "" "Merge multiple sorted inputs into a single sorted output (for example, merge " "timestamped entries from multiple log files). Returns an :term:`iterator` " @@ -178,7 +270,7 @@ msgstr "" "exemple, fusionne des entrées datées provenant de multiples journaux " "applicatifs). Renvoie un :term:`iterator` sur les valeurs ordonnées." -#: library/heapq.rst:94 +#: library/heapq.rst:155 msgid "" "Similar to ``sorted(itertools.chain(*iterables))`` but returns an iterable, " "does not pull the data into memory all at once, and assumes that each of the " @@ -188,12 +280,12 @@ msgstr "" "itérable, ne stocke pas toutes les données en mémoire en une fois et suppose " "que chaque flux d'entrée est déjà classé (en ordre croissant)." -#: library/heapq.rst:98 +#: library/heapq.rst:159 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "A deux arguments optionnels qui doivent être fournis par mot clef." -#: library/heapq.rst:100 +#: library/heapq.rst:161 msgid "" "*key* specifies a :term:`key function` of one argument that is used to " "extract a comparison key from each input element. The default value is " @@ -203,7 +295,7 @@ msgstr "" "une clef de comparaison de chaque élément de la liste. La valeur par défaut " "est ``None`` (compare les éléments directement)." -#: library/heapq.rst:104 +#: library/heapq.rst:165 msgid "" "*reverse* is a boolean value. If set to ``True``, then the input elements " "are merged as if each comparison were reversed. To achieve behavior similar " @@ -212,15 +304,15 @@ msgid "" msgstr "" "*reverse* est une valeur booléenne. Si elle est ``True``, la liste " "d'éléments est fusionnée comme si toutes les comparaisons étaient inversées. " -"Pour obtenir un comportement similaire à ``sorted(itertools." -"chain(*iterables), reverse=True)``, tous les itérables doivent être classés " -"par ordre décroissant." +"Pour obtenir un comportement similaire à " +"``sorted(itertools.chain(*iterables), reverse=True)``, tous les itérables " +"doivent être classés par ordre décroissant." -#: library/heapq.rst:109 +#: library/heapq.rst:170 msgid "Added the optional *key* and *reverse* parameters." msgstr "Ajout des paramètres optionnels *key* et *reverse*." -#: library/heapq.rst:115 +#: library/heapq.rst:176 msgid "" "Return a list with the *n* largest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -234,13 +326,13 @@ msgstr "" "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " "Équivalent à : ``sorted(iterable, key=key, reverse=True)[:n]``." -#: library/heapq.rst:124 +#: library/heapq.rst:185 msgid "" "Return a list with the *n* smallest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " "is used to extract a comparison key from each element in *iterable* (for " -"example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key)[:" -"n]``." +"example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key)" +"[:n]``." msgstr "" "Renvoie une liste contenant les *n* plus petits éléments du jeu de données " "défini par *iterable*. Si l'option *key* est fournie, celle-ci spécifie une " @@ -248,13 +340,13 @@ msgstr "" "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " "Équivalent à : ``sorted(iterable, key=key)[:n]``." -#: library/heapq.rst:130 +#: library/heapq.rst:191 msgid "" "The latter two functions perform best for smaller values of *n*. For larger " "values, it is more efficient to use the :func:`sorted` function. Also, when " -"``n==1``, it is more efficient to use the built-in :func:`min` and :func:" -"`max` functions. If repeated usage of these functions is required, consider " -"turning the iterable into an actual heap." +"``n==1``, it is more efficient to use the built-in :func:`min` " +"and :func:`max` functions. If repeated usage of these functions is " +"required, consider turning the iterable into an actual heap." msgstr "" "Les deux fonctions précédentes sont les plus efficaces pour des petites " "valeurs de *n*. Pour de grandes valeurs, il est préférable d'utiliser la " @@ -263,11 +355,11 @@ msgstr "" "utiliser ces fonctions de façon répétée, il est préférable de transformer " "l'itérable en tas." -#: library/heapq.rst:138 +#: library/heapq.rst:199 msgid "Basic Examples" msgstr "Exemples simples" -#: library/heapq.rst:140 +#: library/heapq.rst:201 msgid "" "A `heapsort `_ can be implemented by " "pushing all values onto a heap and then popping off the smallest values one " @@ -277,15 +369,15 @@ msgstr "" "implémenté en introduisant toutes les valeurs dans un tas puis en effectuant " "l'extraction des éléments un par un ::" -#: library/heapq.rst:153 +#: library/heapq.rst:214 msgid "" "This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this " "implementation is not stable." msgstr "" -"Ceci est similaire à ``sorted(iterable)`` mais, contrairement à :func:" -"`sorted`, cette implémentation n'est pas stable." +"Ceci est similaire à ``sorted(iterable)`` mais, contrairement " +"à :func:`sorted`, cette implémentation n'est pas stable." -#: library/heapq.rst:156 +#: library/heapq.rst:217 msgid "" "Heap elements can be tuples. This is useful for assigning comparison values " "(such as task priorities) alongside the main record being tracked::" @@ -294,11 +386,37 @@ msgstr "" "assigner des valeurs de comparaison (par exemple, des priorités de tâches) " "en plus de l'élément qui est suivi ::" -#: library/heapq.rst:169 +#: library/heapq.rst:230 +msgid "Other Applications" +msgstr "" + +#: library/heapq.rst:232 +msgid "" +"`Medians `_ are a measure of central " +"tendency for a set of numbers. In distributions skewed by outliers, the " +"median provides a more stable estimate than an average (arithmetic mean). A " +"running median is an `online algorithm `_ that updates continuously as new data arrives." +msgstr "" + +#: library/heapq.rst:239 +msgid "" +"A running median can be efficiently implemented by balancing two heaps, a " +"max-heap for values at or below the midpoint and a min-heap for values above " +"the midpoint. When the two heaps have the same size, the new median is the " +"average of the tops of the two heaps; otherwise, the median is at the top of " +"the larger heap::" +msgstr "" + +#: library/heapq.rst:259 +msgid "For example::" +msgstr "" + +#: library/heapq.rst:266 msgid "Priority Queue Implementation Notes" msgstr "Notes d'implémentation de la file de priorité" -#: library/heapq.rst:171 +#: library/heapq.rst:268 msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" @@ -307,7 +425,7 @@ msgstr "" "File_de_priorit%C3%A9>`_ est une application courante des tas et présente " "plusieurs défis d'implémentation :" -#: library/heapq.rst:174 +#: library/heapq.rst:271 msgid "" "Sort stability: how do you get two tasks with equal priorities to be " "returned in the order they were originally added?" @@ -315,7 +433,7 @@ msgstr "" "Stabilité du classement : comment s'assurer que deux tâches avec la même " "priorité sont renvoyées dans l'ordre de leur ajout ?" -#: library/heapq.rst:177 +#: library/heapq.rst:274 msgid "" "Tuple comparison breaks for (priority, task) pairs if the priorities are " "equal and the tasks do not have a default comparison order." @@ -323,7 +441,7 @@ msgstr "" "La comparaison des couples (priorité, tâche) échoue si les priorités sont " "identiques et que les tâches n'ont pas de relation d'ordre par défaut." -#: library/heapq.rst:180 +#: library/heapq.rst:277 msgid "" "If the priority of a task changes, how do you move it to a new position in " "the heap?" @@ -331,7 +449,7 @@ msgstr "" "Si la priorité d'une tâche change, comment la déplacer à sa nouvelle " "position dans le tas ?" -#: library/heapq.rst:183 +#: library/heapq.rst:280 msgid "" "Or if a pending task needs to be deleted, how do you find it and remove it " "from the queue?" @@ -339,7 +457,7 @@ msgstr "" "Si une tâche en attente doit être supprimée, comment la trouver et la " "supprimer de la file ?" -#: library/heapq.rst:186 +#: library/heapq.rst:283 msgid "" "A solution to the first two challenges is to store entries as 3-element list " "including the priority, an entry count, and the task. The entry count " @@ -355,7 +473,7 @@ msgstr "" "comparaison des triplets ne va jamais chercher à comparer des tâches entre " "elles." -#: library/heapq.rst:192 +#: library/heapq.rst:289 msgid "" "Another solution to the problem of non-comparable tasks is to create a " "wrapper class that ignores the task item and only compares the priority " @@ -365,7 +483,7 @@ msgstr "" "d'ordre est de créer une classe d'encapsulation qui ignore l'élément tâche " "et ne compare que le champ priorité ::" -#: library/heapq.rst:203 +#: library/heapq.rst:300 msgid "" "The remaining challenges revolve around finding a pending task and making " "changes to its priority or removing it entirely. Finding a task can be done " @@ -375,7 +493,7 @@ msgstr "" "priorité ou la supprimer. Trouver une tâche peut être réalisé à l'aide d'un " "dictionnaire pointant vers une entrée dans la file." -#: library/heapq.rst:207 +#: library/heapq.rst:304 msgid "" "Removing the entry or changing its priority is more difficult because it " "would break the heap structure invariants. So, a possible solution is to " @@ -386,11 +504,11 @@ msgstr "" "marquer l'entrée comme supprimée et d'ajouter une nouvelle entrée avec sa " "priorité modifiée ::" -#: library/heapq.rst:241 +#: library/heapq.rst:338 msgid "Theory" msgstr "Théorie" -#: library/heapq.rst:243 +#: library/heapq.rst:340 msgid "" "Heaps are arrays for which ``a[k] <= a[2*k+1]`` and ``a[k] <= a[2*k+2]`` for " "all *k*, counting elements from 0. For the sake of comparison, non-existing " @@ -403,15 +521,20 @@ msgstr "" "étant infinis. L'intérêt des tas est que ``a[0]`` est toujours leur plus " "petit élément." -#: library/heapq.rst:248 +#: library/heapq.rst:345 +#, fuzzy msgid "" "The strange invariant above is meant to be an efficient memory " -"representation for a tournament. The numbers below are *k*, not ``a[k]``::" +"representation for a tournament. The numbers below are *k*, not ``a[k]``:" msgstr "" "L'invariant étrange ci-dessus est une représentation efficace en mémoire " "d'un tournoi. Les nombres ci-dessous sont *k* et non ``a[k]`` ::" -#: library/heapq.rst:261 +#: library/heapq.rst:348 +msgid "Example (min-heap) binary tree." +msgstr "" + +#: library/heapq.rst:353 msgid "" "In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a " "usual binary tournament we see in sports, each cell is the winner over the " @@ -435,7 +558,7 @@ msgstr "" "trois éléments différents, mais le nœud supérieur « gagne » contre les deux " "nœuds inférieurs." -#: library/heapq.rst:270 +#: library/heapq.rst:362 #, fuzzy msgid "" "If this heap invariant is protected at all time, index 0 is clearly the " @@ -456,7 +579,7 @@ msgstr "" "l'arbre. En itérant sur tous les éléments, le classement s'effectue en O(n " "log n) opérations." -#: library/heapq.rst:277 +#: library/heapq.rst:369 msgid "" "A nice feature of this sort is that you can efficiently insert new items " "while the sort is going on, provided that the inserted items are not " @@ -478,7 +601,7 @@ msgstr "" "implémenter un ordonnanceur (et c'est ce que j'ai utilisé pour mon " "séquenceur MIDI ☺)." -#: library/heapq.rst:286 +#: library/heapq.rst:378 msgid "" "Various structures for implementing schedulers have been extensively " "studied, and heaps are good for this, as they are reasonably speedy, the " @@ -492,7 +615,7 @@ msgstr "" "trop du cas moyen. S'il existe des représentations qui sont plus efficaces " "en général, les pires cas peuvent être terriblement mauvais." -#: library/heapq.rst:292 +#: library/heapq.rst:384 msgid "" "Heaps are also very useful in big disk sorts. You most probably all know " "that a big sort implies producing \"runs\" (which are pre-sorted sequences, " @@ -518,7 +641,7 @@ msgstr "" "de la mémoire pour une entrée aléatoire et bien mieux pour une entrée " "approximativement triée." -#: library/heapq.rst:302 +#: library/heapq.rst:394 msgid "" "Moreover, if you output the 0'th item on disk and get an input which may not " "fit in the current tournament (because the value \"wins\" over the last " @@ -537,7 +660,7 @@ msgstr "" "décroît. Lorsque le premier tas a complètement disparu, vous échangez les " "tas et démarrez une nouvelle séquence. Malin et plutôt efficace !" -#: library/heapq.rst:310 +#: library/heapq.rst:402 msgid "" "In a word, heaps are useful memory structures to know. I use them in a few " "applications, and I think it is good to keep a 'heap' module around. :-)" @@ -546,11 +669,11 @@ msgstr "" "connaître. Je les utilise dans quelques applications et je pense qu'il est " "bon de garder le module *heap* sous le coude. ☺" -#: library/heapq.rst:314 +#: library/heapq.rst:406 msgid "Footnotes" msgstr "Notes" -#: library/heapq.rst:315 +#: library/heapq.rst:407 msgid "" "The disk balancing algorithms which are current, nowadays, are more annoying " "than clever, and this is a consequence of the seeking capabilities of the " diff --git a/library/hmac.po b/library/hmac.po index 16798d19a..a3fd99bd1 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2021-04-28 21:10+0200\n" "Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" @@ -22,14 +22,17 @@ msgstr "" ":mod:`hmac` — Authentification de messages par hachage en combinaison avec " "une clé secrète" -#: library/hmac.rst:10 +#: library/hmac.rst:7 msgid "**Source code:** :source:`Lib/hmac.py`" msgstr "**Code source :** :source:`Lib/hmac.py`" -#: library/hmac.rst:14 -msgid "This module implements the HMAC algorithm as described by :rfc:`2104`." +#: library/hmac.rst:11 +msgid "" +"This module implements the HMAC algorithm as described by :rfc:`2104`. The " +"interface allows to use any hash function with a *fixed* digest size. In " +"particular, extendable output functions such as SHAKE-128 or SHAKE-256 " +"cannot be used with HMAC." msgstr "" -"Ce module implémente l'algorithme HMAC tel que décrit par la :rfc:`2104`." #: library/hmac.rst:19 msgid "" @@ -73,8 +76,8 @@ msgid "" "Return digest of *msg* for given secret *key* and *digest*. The function is " "equivalent to ``HMAC(key, msg, digest).digest()``, but uses an optimized C " "or inline implementation, which is faster for messages that fit into memory. " -"The parameters *key*, *msg*, and *digest* have the same meaning as in :func:" -"`~hmac.new`." +"The parameters *key*, *msg*, and *digest* have the same meaning as " +"in :func:`~hmac.new`." msgstr "" "Renvoie le code d'authentification de *msg*, pour la clé secrète *key* et à " "l'algorithme *digest* donné. La fonction est équivalente à ``HMAC(key, msg, " @@ -93,26 +96,26 @@ msgstr "" "que lorsque le *digest* est une chaîne de caractères et le nom d'un " "algorithme de hachage implémenté dans OpenSSL." -#: library/hmac.rst:50 +#: library/hmac.rst:52 msgid "An HMAC object has the following methods:" msgstr "Un objet HMAC a les méthodes suivantes :" -#: library/hmac.rst:54 +#: library/hmac.rst:56 msgid "" "Update the hmac object with *msg*. Repeated calls are equivalent to a " -"single call with the concatenation of all the arguments: ``m.update(a); m." -"update(b)`` is equivalent to ``m.update(a + b)``." +"single call with the concatenation of all the arguments: ``m.update(a); " +"m.update(b)`` is equivalent to ``m.update(a + b)``." msgstr "" "Met à jour l'objet HMAC avec *msg*. Des appels répétés sont équivalents à un " -"seul appel avec la concaténation de tous les arguments : ``m.update(a); m." -"update(b)`` est équivalent à ``m.update(a + b)``." +"seul appel avec la concaténation de tous les arguments : ``m.update(a); " +"m.update(b)`` est équivalent à ``m.update(a + b)``." -#: library/hmac.rst:58 +#: library/hmac.rst:60 msgid "Parameter *msg* can be of any type supported by :mod:`hashlib`." msgstr "" "Le paramètre *msg* peut être de n'importe quel type géré par :mod:`hashlib`." -#: library/hmac.rst:64 +#: library/hmac.rst:66 msgid "" "Return the digest of the bytes passed to the :meth:`update` method so far. " "This bytes object will be the same length as the *digest_size* of the digest " @@ -124,20 +127,20 @@ msgstr "" "la fonction de hachage donnée au constructeur. Il peut contenir des octets " "qui ne sont pas dans la table ASCII, y compris des octets NUL." -#: library/hmac.rst:71 +#: library/hmac.rst:73 #, fuzzy msgid "" "When comparing the output of :meth:`digest` to an externally supplied digest " -"during a verification routine, it is recommended to use the :func:" -"`compare_digest` function instead of the ``==`` operator to reduce the " -"vulnerability to timing attacks." +"during a verification routine, it is recommended to use " +"the :func:`compare_digest` function instead of the ``==`` operator to reduce " +"the vulnerability to timing attacks." msgstr "" "Si vous devez vérifier la sortie de :meth:`digest` avec un condensat obtenu " "par ailleurs par un service extérieur durant une routine de vérification, il " "est recommandé d'utiliser la fonction :func:`compare_digest` au lieu de " "l'opérateur ``==`` afin de réduire la vulnérabilité aux attaques temporelles." -#: library/hmac.rst:79 +#: library/hmac.rst:81 msgid "" "Like :meth:`digest` except the digest is returned as a string twice the " "length containing only hexadecimal digits. This may be used to exchange the " @@ -148,13 +151,13 @@ msgstr "" "Cela permet d’échanger le résultat sans problèmes par e-mail ou dans " "d'autres environnements ne gérant pas les données binaires." -#: library/hmac.rst:85 +#: library/hmac.rst:87 #, fuzzy msgid "" "When comparing the output of :meth:`hexdigest` to an externally supplied " -"digest during a verification routine, it is recommended to use the :func:" -"`compare_digest` function instead of the ``==`` operator to reduce the " -"vulnerability to timing attacks." +"digest during a verification routine, it is recommended to use " +"the :func:`compare_digest` function instead of the ``==`` operator to reduce " +"the vulnerability to timing attacks." msgstr "" "Si l'on compare la sortie de :meth:`hexdigest` avec celle d'un condensat " "connu obtenu par un service extérieur durant une routine de vérification, il " @@ -162,7 +165,7 @@ msgstr "" "l'opérateur ``==`` afin de réduire la vulnérabilité aux attaques basées sur " "les temps de réponse." -#: library/hmac.rst:93 +#: library/hmac.rst:95 msgid "" "Return a copy (\"clone\") of the hmac object. This can be used to " "efficiently compute the digests of strings that share a common initial " @@ -172,29 +175,29 @@ msgstr "" "manière efficace les empreintes cryptographiques de chaînes de caractères " "qui ont en commun une sous-chaîne initiale." -#: library/hmac.rst:97 +#: library/hmac.rst:99 msgid "A hash object has the following attributes:" msgstr "" "Un objet *code d'authentification de message* (HMAC) possède les attributs " "suivants :" -#: library/hmac.rst:101 +#: library/hmac.rst:103 msgid "The size of the resulting HMAC digest in bytes." msgstr "" "La taille du code d'authentification (c.-à-d. de l'empreinte " "cryptographique) en octets." -#: library/hmac.rst:105 +#: library/hmac.rst:107 msgid "The internal block size of the hash algorithm in bytes." msgstr "La taille interne d'un bloc de l'algorithme de hachage en octets." -#: library/hmac.rst:111 +#: library/hmac.rst:113 msgid "The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``." msgstr "" "Le nom canonique de ce HMAC, toujours en lettres minuscules, par exemple " "``hmac-md5``." -#: library/hmac.rst:116 +#: library/hmac.rst:118 #, fuzzy msgid "" "Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, " @@ -204,17 +207,17 @@ msgstr "" "documentés) sont des détails d'implémentation internes et seront supprimés " "en Python 3.10." -#: library/hmac.rst:120 +#: library/hmac.rst:122 msgid "This module also provides the following helper function:" msgstr "Ce module fournit également la fonction utilitaire suivante :" -#: library/hmac.rst:124 +#: library/hmac.rst:126 msgid "" "Return ``a == b``. This function uses an approach designed to prevent " "timing analysis by avoiding content-based short circuiting behaviour, making " "it appropriate for cryptography. *a* and *b* must both be of the same type: " -"either :class:`str` (ASCII only, as e.g. returned by :meth:`HMAC." -"hexdigest`), or a :term:`bytes-like object`." +"either :class:`str` (ASCII only, as e.g. returned " +"by :meth:`HMAC.hexdigest`), or a :term:`bytes-like object`." msgstr "" "Renvoie ``a == b``. Cette fonction a été conçue pour prévenir les attaques " "temporelles en évitant l'implémentation de courts-circuits basés sur le " @@ -223,7 +226,7 @@ msgstr "" "comme retourné par :meth:`HMAC.hexdigest` par exemple), ou :term:`bytes-like " "object`." -#: library/hmac.rst:132 +#: library/hmac.rst:134 msgid "" "If *a* and *b* are of different lengths, or if an error occurs, a timing " "attack could theoretically reveal information about the types and lengths of " @@ -233,17 +236,22 @@ msgstr "" "attaque temporelle pourrait en théorie obtenir des informations sur les " "types et longueurs de *a* et de *b*, mais pas sur leurs valeurs." -#: library/hmac.rst:140 +#: library/hmac.rst:142 msgid "" "The function uses OpenSSL's ``CRYPTO_memcmp()`` internally when available." msgstr "" "Cette fonction utilise la fonction ``CRYPTO_memcmp()`` de OpenSSL quand " "celle-ci est disponible." -#: library/hmac.rst:146 +#: library/hmac.rst:148 msgid "Module :mod:`hashlib`" msgstr "Module :mod:`hashlib`" -#: library/hmac.rst:147 +#: library/hmac.rst:149 msgid "The Python module providing secure hash functions." msgstr "Le module Python fournissant des fonctions de hachage sécurisé." + +#~ msgid "" +#~ "This module implements the HMAC algorithm as described by :rfc:`2104`." +#~ msgstr "" +#~ "Ce module implémente l'algorithme HMAC tel que décrit par la :rfc:`2104`." diff --git a/library/html.entities.po b/library/html.entities.po index eb74d6778..9092d81a5 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-29 21:40+0100\n" -"PO-Revision-Date: 2021-11-06 21:41+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" +"PO-Revision-Date: 2025-10-24 10:39+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -20,35 +20,37 @@ msgstr "" msgid ":mod:`!html.entities` --- Definitions of HTML general entities" msgstr ":mod:`html.entities` — Définitions des entités HTML générales" -#: library/html.entities.rst:9 +#: library/html.entities.rst:7 msgid "**Source code:** :source:`Lib/html/entities.py`" msgstr "**Source code:** :source:`Lib/html/entities.py`" -#: library/html.entities.rst:13 +#: library/html.entities.rst:11 msgid "" -"This module defines four dictionaries, :data:`html5`, :data:" -"`name2codepoint`, :data:`codepoint2name`, and :data:`entitydefs`." +"This module defines four " +"dictionaries, :data:`html5`, :data:`name2codepoint`, :data:`codepoint2name`, " +"and :data:`entitydefs`." msgstr "" -"Ce module définit quatre dictionnaires, :data:`html5`, :data:" -"`name2codepoint`, :data:`codepoint2name`, et :data:`entitydefs`." +"Ce module définit quatre " +"dictionnaires, :data:`html5`, :data:`name2codepoint`, :data:`codepoint2name`, " +"et :data:`entitydefs`." -#: library/html.entities.rst:19 +#: library/html.entities.rst:17 msgid "" "A dictionary that maps HTML5 named character references [#]_ to the " "equivalent Unicode character(s), e.g. ``html5['gt;'] == '>'``. Note that the " "trailing semicolon is included in the name (e.g. ``'gt;'``), however some of " "the names are accepted by the standard even without the semicolon: in this " -"case the name is present with and without the ``';'``. See also :func:`html." -"unescape`." +"case the name is present with and without the ``';'``. See " +"also :func:`html.unescape`." msgstr "" "Un dictionnaire qui fait correspondre les références de caractères nommés " "HTML5 [#]_ aux caractères Unicode équivalents, e.g. ``html5['gt;'] == '>'``. " "À noter que le point-virgule en fin de chaîne est inclus dans le nom (e.g. " "``'gt;'``), toutefois certains noms sont acceptés par le standard même sans " "le point-virgule: dans ce cas, le nom est présent à la fois avec et sans le " -"``;``. Voir aussi :func:`html.unescape()`." +"``;``. Voir aussi :func:`html.unescape`." -#: library/html.entities.rst:31 +#: library/html.entities.rst:29 msgid "" "A dictionary mapping XHTML 1.0 entity definitions to their replacement text " "in ISO Latin-1." @@ -56,25 +58,25 @@ msgstr "" "Un dictionnaire qui fait correspondre les définitions d'entités XHTML 1.0 " "avec leur remplacement en ISO Latin-1." -#: library/html.entities.rst:37 +#: library/html.entities.rst:35 #, fuzzy msgid "A dictionary that maps HTML4 entity names to the Unicode code points." msgstr "" "Un dictionnaire qui fait correspondre les noms d'entités HTML avec les " "points de code Unicode." -#: library/html.entities.rst:42 +#: library/html.entities.rst:40 #, fuzzy msgid "A dictionary that maps Unicode code points to HTML4 entity names." msgstr "" "Un dictionnaire qui fait correspondre les points de code Unicode avec les " "noms d'entités HTML." -#: library/html.entities.rst:46 +#: library/html.entities.rst:44 msgid "Footnotes" msgstr "Notes" -#: library/html.entities.rst:47 +#: library/html.entities.rst:45 #, fuzzy msgid "" "See https://html.spec.whatwg.org/multipage/named-characters.html#named-" diff --git a/library/html.parser.po b/library/html.parser.po index b7b8274d3..8e300c5a0 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-01 00:16+0100\n" +"POT-Creation-Date: 2026-10-17 14:27+0200\n" "PO-Revision-Date: 2022-05-08 09:48+0200\n" "Last-Translator: Thierry Pellé \n" "Language-Team: FRENCH \n" @@ -43,10 +43,11 @@ msgstr "" "invalide." #: library/html.parser.rst:22 +#, fuzzy msgid "" -"If *convert_charrefs* is ``True`` (the default), all character references " -"(except the ones in ``script``/``style`` elements) are automatically " -"converted to the corresponding Unicode characters." +"If *convert_charrefs* is true (the default), all character references " +"(except the ones in elements like ``script`` and ``style``) are " +"automatically converted to the corresponding Unicode characters." msgstr "" "Si *convert_charrefs* est ``True`` (valeur par défaut), toute référence de " "caractère (sauf ceux enchâssés dans des éléments ``script``/``style``) est " @@ -54,6 +55,13 @@ msgstr "" #: library/html.parser.rst:26 msgid "" +"If *scripting* is false (the default), the content of the ``noscript`` " +"element is parsed normally; if it's true, it's returned as is without being " +"parsed." +msgstr "" + +#: library/html.parser.rst:30 +msgid "" "An :class:`.HTMLParser` instance is fed HTML data and calls handler methods " "when start tags, end tags, text, comments, and other markup elements are " "encountered. The user should subclass :class:`.HTMLParser` and override its " @@ -65,7 +73,7 @@ msgstr "" "commentaires… Pour implémenter le comportement désiré, l'utilisateur crée " "une sous-classe de :class:`.HTMLParser` en surchargeant ses méthodes." -#: library/html.parser.rst:31 +#: library/html.parser.rst:35 msgid "" "This parser does not check that end tags match start tags or call the end-" "tag handler for elements which are closed implicitly by closing an outer " @@ -75,55 +83,60 @@ msgstr "" "balises ouvrantes, ni n'invoque le gestionnaire de balises fermantes pour " "les éléments implicitement fermés par un élément extérieur." -#: library/html.parser.rst:34 +#: library/html.parser.rst:38 msgid "*convert_charrefs* keyword argument added." msgstr "L'argument *convert_charrefs* a été ajouté." -#: library/html.parser.rst:37 +#: library/html.parser.rst:41 msgid "The default value for argument *convert_charrefs* is now ``True``." msgstr "" "La valeur par défaut de l'argument *convert_charrefs* est désormais ``True``." -#: library/html.parser.rst:42 +#: library/html.parser.rst:44 +msgid "Added the *scripting* parameter." +msgstr "" + +#: library/html.parser.rst:49 msgid "Example HTML Parser Application" msgstr "Exemple d'application de l'analyseur HTML" -#: library/html.parser.rst:44 +#: library/html.parser.rst:51 +#, fuzzy msgid "" -"As a basic example, below is a simple HTML parser that uses the :class:" -"`HTMLParser` class to print out start tags, end tags, and data as they are " -"encountered::" +"As a basic example, below is a simple HTML parser that uses " +"the :class:`HTMLParser` class to print out start tags, end tags, and data as " +"they are encountered:" msgstr "" -"Comme exemple simple, un analyseur HTML minimal qui utilise la classe :class:" -"`HTMLParser` pour afficher les balises ouvrantes, les balises fermantes " -"ainsi que les données quand elles apparaissent ::" +"Comme exemple simple, un analyseur HTML minimal qui utilise la " +"classe :class:`HTMLParser` pour afficher les balises ouvrantes, les balises " +"fermantes ainsi que les données quand elles apparaissent ::" -#: library/html.parser.rst:64 +#: library/html.parser.rst:73 msgid "The output will then be:" msgstr "La sortie est alors :" -#: library/html.parser.rst:83 +#: library/html.parser.rst:92 msgid ":class:`.HTMLParser` Methods" msgstr "Méthodes de la classe :class:`.HTMLParser`" -#: library/html.parser.rst:85 +#: library/html.parser.rst:94 msgid ":class:`HTMLParser` instances have the following methods:" msgstr "" "Les instances de :class:`HTMLParser` disposent des méthodes suivantes :" -#: library/html.parser.rst:90 +#: library/html.parser.rst:99 msgid "" "Feed some text to the parser. It is processed insofar as it consists of " -"complete elements; incomplete data is buffered until more data is fed or :" -"meth:`close` is called. *data* must be :class:`str`." +"complete elements; incomplete data is buffered until more data is fed " +"or :meth:`close` is called. *data* must be :class:`str`." msgstr "" "Alimente l'analyseur avec du texte. Ce texte est traité dans la mesure où il " "constitue des éléments complets ; les données incomplètes sont mises dans un " -"tampon jusqu'à ce que d'autres données soient fournies ou que la méthode :" -"meth:`close` soit appelée. L'argument *data* doit être de classe :class:" -"`str`." +"tampon jusqu'à ce que d'autres données soient fournies ou que la " +"méthode :meth:`close` soit appelée. L'argument *data* doit être de " +"classe :class:`str`." -#: library/html.parser.rst:97 +#: library/html.parser.rst:106 msgid "" "Force processing of all buffered data as if it were followed by an end-of-" "file mark. This method may be redefined by a derived class to define " @@ -136,7 +149,7 @@ msgstr "" "de l'entrée, mais la version redéfinie devra impérativement appeler la " "méthode :meth:`close` de la classe de base :class:`HTMLParser`." -#: library/html.parser.rst:105 +#: library/html.parser.rst:114 msgid "" "Reset the instance. Loses all unprocessed data. This is called implicitly " "at instantiation time." @@ -144,13 +157,13 @@ msgstr "" "Réinitialise l'instance. Toutes les données non traitées sont perdues. Cette " "méthode est appelée implicitement lors de l'instanciation." -#: library/html.parser.rst:111 +#: library/html.parser.rst:120 msgid "Return current line number and offset." msgstr "" "Renvoie le numéro de ligne et le numéro du caractère dans la ligne où le " "curseur est positionné." -#: library/html.parser.rst:116 +#: library/html.parser.rst:125 #, fuzzy msgid "" "Return the text of the most recently opened start tag. This should not " @@ -164,19 +177,19 @@ msgstr "" "ou pour ré-générer la balise avec des changements mineurs (les espaces entre " "les attributs pouvant être préservés, etc. …)." -#: library/html.parser.rst:122 +#: library/html.parser.rst:131 msgid "" "The following methods are called when data or markup elements are " "encountered and they are meant to be overridden in a subclass. The base " -"class implementations do nothing (except for :meth:`~HTMLParser." -"handle_startendtag`):" +"class implementations do nothing (except " +"for :meth:`~HTMLParser.handle_startendtag`):" msgstr "" "Les méthodes suivantes sont appelées lors de la rencontre de données ou " "d'éléments de balisage ; elles sont destinées à être surchargées par la sous-" "classe. L'implémentation de la classe de base ne fait rien (sauf pour ce qui " "est de :meth:`~HTMLParser.handle_startendtag`) :" -#: library/html.parser.rst:129 +#: library/html.parser.rst:138 msgid "" "This method is called to handle the start tag of an element (e.g. ``
``)." @@ -184,13 +197,15 @@ msgstr "" "Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``
``)." -#: library/html.parser.rst:131 +#: library/html.parser.rst:140 +#, fuzzy msgid "" "The *tag* argument is the name of the tag converted to lower case. The " "*attrs* argument is a list of ``(name, value)`` pairs containing the " "attributes found inside the tag's ``<>`` brackets. The *name* will be " "translated to lower case, and quotes in the *value* have been removed, and " -"character and entity references have been replaced." +"character and entity references have been replaced. For empty attributes, " +"*value* is ``None``." msgstr "" "L'argument *tag* contient le nom de la balise en minuscules. L'argument " "*attrs* contient une liste de *n-uplets* ``(name, value)`` regroupant les " @@ -199,17 +214,17 @@ msgstr "" "du paramètre *value* et toute entité de référence ou de caractère est " "remplacée." -#: library/html.parser.rst:137 +#: library/html.parser.rst:146 msgid "" "For instance, for the tag ````, this method " -"would be called as ``handle_starttag('a', [('href', 'https://www.cwi." -"nl/')])``." +"would be called as ``handle_starttag('a', [('href', 'https://" +"www.cwi.nl/')])``." msgstr "" "Par exemple, pour la balise ````, cette " -"méthode est appelée par ``handle_starttag('a', [('href', 'https://www.cwi." -"nl/')])``." +"méthode est appelée par ``handle_starttag('a', [('href', 'https://" +"www.cwi.nl/')])``." -#: library/html.parser.rst:140 +#: library/html.parser.rst:149 msgid "" "All entity references from :mod:`html.entities` are replaced in the " "attribute values." @@ -217,59 +232,61 @@ msgstr "" "Toute référence d'entité présente dans :mod:`html.entities` est remplacée " "dans la valeur des attributs." -#: library/html.parser.rst:146 +#: library/html.parser.rst:155 msgid "" "This method is called to handle the end tag of an element (e.g. ``
``)." msgstr "" "Cette méthode est appelée pour traiter les balises fermantes (p. ex. ````)." -#: library/html.parser.rst:148 +#: library/html.parser.rst:157 msgid "The *tag* argument is the name of the tag converted to lower case." msgstr "L'argument *tag* est le nom de la balise en minuscules." -#: library/html.parser.rst:153 +#: library/html.parser.rst:162 msgid "" "Similar to :meth:`handle_starttag`, but called when the parser encounters an " "XHTML-style empty tag (````). This method may be overridden by " "subclasses which require this particular lexical information; the default " -"implementation simply calls :meth:`handle_starttag` and :meth:" -"`handle_endtag`." +"implementation simply calls :meth:`handle_starttag` " +"and :meth:`handle_endtag`." msgstr "" "Traitée de façon similaire à :meth:`handle_starttag`, mais appelée quand " "l'analyseur rencontre une balise vide de type *XHTML* (p. ex. ````). Cette méthode peut-être surchargée par les sous-classes demandant " -"cette information lexicale ; l'implémentation par défaut appelle simplement :" -"meth:`handle_starttag` et :meth:`handle_endtag`." +"cette information lexicale ; l'implémentation par défaut appelle " +"simplement :meth:`handle_starttag` et :meth:`handle_endtag`." -#: library/html.parser.rst:161 +#: library/html.parser.rst:170 +#, fuzzy msgid "" "This method is called to process arbitrary data (e.g. text nodes and the " -"content of ```` and ````)." +"content of elements like ``script`` and ``style``)." msgstr "" "Cette méthode est appelée pour traiter toute donnée arbitraire (p. ex. les " "nœuds textuels ou les contenus de ```` et ``